solve a complex differential Riccati equation numerically

조회 수: 15 (최근 30일)
jalal khodaparast
jalal khodaparast 2019년 10월 23일
댓글: jalal khodaparast 2019년 10월 25일
I want to solve a complex differential Riccati equation numerically. I used ODE45 and ODE15s but The solution has unstable oscillation.
How can I solve a differential Riccati equation with complex values?
For example:
d/dt y(t)=((-1+(0.5*cost)) (y(t)^2) )+1
  댓글 수: 7
jalal khodaparast
jalal khodaparast 2019년 10월 23일
It is a part of biger code.
In the main code matrix ''A'' is calculated and send it to riccati m.file to be solved.
Matrix ''A'' is :
A=[a11=0 a12=-1+0.5*cos(t);
a21=1 a22=0]
jalal khodaparast
jalal khodaparast 2019년 10월 25일
I have attached a simplified mfile.
Even though the initial value () makes the riccati equation zero at t=0, the solution is unstable for t>0. !!

댓글을 달려면 로그인하십시오.

채택된 답변

jalal khodaparast
jalal khodaparast 2019년 10월 23일
It is my code for ODE:
y0=[-1i*sqrt(2)];
tspan = [t_curr-h t_curr];
M = [1];
%%% A=[0 -1+0.5*cos(t);
%%% 1 0]
par = [A(1,1);A(1,2);A(2,1);A(2,2)];
options = odeset('Mass',M,'RelTol',1e-6,'AbsTol',[1e-6]);
[T_LL,LL] = ode45(@tabe,tspan,y0,options,par);
%%%%%%%%%%%
function out = tabe(t,y,parameters)
a11=parameters(1);
a12=parameters(2);
a21=parameters(3);
a22=parameters(4);
out = [(-a12*(y(1)^2))+(-(a11-a22)*y(1))+a21];
end
%%%%%%%%%%%%%%%%%%%%%%%%%
It is the answer of ODE45:
answer.png

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Computations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by