Clear Filters
Clear Filters

solve a complex differential Riccati equation numerically

5 views (last 30 days)
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 Comments
jalal khodaparast
jalal khodaparast on 23 Oct 2019
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 on 25 Oct 2019
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. !!

Sign in to comment.

Accepted Answer

jalal khodaparast
jalal khodaparast on 23 Oct 2019
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

More Answers (0)

Community Treasure Hunt

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

Start Hunting!