solve matrix differential equations with ode45

5 次查看(过去 30 天)
I want to use ode to solve for a riccati differential equation. But it seems that it cannot be implemented directly in MATLAB.
is a known matrix. I want to get the S matrix at t by integrating backward in time.
  3 个评论
Zicheng Cai
Zicheng Cai 2019-10-2
编辑:Zicheng Cai 2019-10-3
I unrolled the matrix and made it one vector to solve it. I also need to write a separate function to calculate and return the derivatives in a vector.
This is the function I defined to get derivates in a vector form.
function ds=deriv(t,S,A,B,Q_f,Q,R)
% adjust dimension and return S in a vector
Fs=reshape(S,size(Q_f)); % reshape S into matrix form
Rinv=inv(R);
dsv=-Q+Fs*B*Rinv*B'*Fs-Fs*A - A'*Fs; % derivation of S in matrix form
ds=dsv(:);% unroll the matrix to return a vector
end
This reference
is of great help
darova
darova 2019-10-4
So what do you need help with? oder function looks ok as for me

请先登录,再进行评论。

回答(2 个)

Naveen Shanmuganantham
I understand that you want to solve for a riccati differential equation in MATLAB.
The "CARE" function within the Control System Toolbox solves the matrix Riccati equation.
The following MATLAB Answers link will help you in solving the matrix Riccati differential equation within MATLAB,

Maximilian Behr
Maximilian Behr 2022-12-8
The repo https://zenodo.org/record/4460618#.Yt6LGsHP2de contains a solver (Modified Davison-Maki method) to solve the differential Riccati with MATLAB.

类别

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