フィルターのクリア

solving differential riccati equation with a boundary condition

18 ビュー (過去 30 日間)
Ifunanya
Ifunanya 2014 年 8 月 18 日
コメント済み: Mingze Yin 2021 年 12 月 3 日
i would like to solve a riccati differential equation using matlab
  1 件のコメント
Esmail Alandoli
Esmail Alandoli 2016 年 11 月 3 日
see this link. it might be helpful for you https://www.mathworks.com/help/control/ref/care.html

サインインしてコメントする。

採用された回答

Aykut Satici
Aykut Satici 2014 年 8 月 18 日
編集済み: Walter Roberson 2016 年 11 月 7 日
Since the Riccati equation is a first-order ordinary differential equation, you can do this easily with any of the ODE solvers available in MATLAB such as "ode45", see
The trick is to find the solution backwards in time.
As an example, let us consider the following example. Let the Riccati equation be given by
y'(t) = q0 + q1*y(t) + q2*y(t)^2,
y(tf) = yf
where q0, q2 are non-vanishing constants (these may be nontrivial functions of t, the fact that they are chosen to be constant is just for simplicity). The second line is the boundary condition that at the end time tf, the value of the solution must be yf. I have chosen, in particular, tf = 2 and yf = 1 in the example code below.
function riccatiEquationRunner()
par = [1;2;1]; % q0, q1, and q2
yf = 1;
ti = 0; tf = 2;
opt = odeset('AbsTol',1.0e-07,'RelTol',1.0e-07);
[t,y] = ode45( @riccatiEquation, [tf,ti], yf ,opt, par);
% Visualize
plot(t,y)
end
function dydx = riccatiEquation(x,y,parameters)
q0 = parameters(1);
q1 = parameters(2);
q2 = parameters(3);
dydx = q0 + q1*y + q2*y*y;
end
  4 件のコメント
jalal khodaparast
jalal khodaparast 2019 年 10 月 23 日
I apply ode45 to the complex differential riccati equation (solution is complex value) but I get unstable fluctuations in the results? Do you know how to solve this problem?
Mingze Yin
Mingze Yin 2021 年 12 月 3 日
Thanks so much for this. However, could you help me on how to write a code for solving a Riccati differential equation of the same form as u suggested, only when q1 and q2 are some function of t (instead of being fixed constants)?
so maybe for example:
y'(t) = q0 + q1*y(t) + q2*y(t)^2;
y(tf) = yf;
where q1 = t, q2 = t^2;
Thanks so much!

サインインしてコメントする。

その他の回答 (1 件)

Esmail Alandoli
Esmail Alandoli 2016 年 11 月 7 日
編集済み: Walter Roberson 2016 年 11 月 7 日
Hi,
May you guys help me if you can please?
I have problem with the system below for solving the riccati equation for Y infinity. I always get the error of "Unable to solve the specified Riccati equation because the Hamiltonian spectrum is too close to the imaginary axis."
g = 40000;
A = [0 0 1 0; 0 0 0 1; 0 673.07 -35.1667 0; 0 -1023.07 35.1667 0];
B = [0; 0; 61.7325; -61.7325]';
B1 =[0 0 0 0]';
B2 = B;
C1 = [0 0 0 0]';
C2 = [1 1 0 0]';
C = [C1 , C2]
m1 = size(C1,2)
m2 = size(C2,2)
R = [-g^2*eye(m1) zeros(m1,m2) ; zeros(m2,m1) eye(m2)]
Y = care(A,C,B'*B,R)
can you please help?
Thank you so much
Esmail
  1 件のコメント
Sana SAAD
Sana SAAD 2018 年 6 月 17 日
hello, did you find an answer i am in the same issue .

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMatrix Computations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by