フィルターのクリア

solve a complex differential Riccati equation numerically

5 ビュー (過去 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 Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by