solve matrix differential equations with ode45

5 Ansichten (letzte 30 Tage)
Zicheng Cai
Zicheng Cai am 2 Okt. 2019
Beantwortet: Maximilian Behr am 8 Dez. 2022
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 Kommentare
Zicheng Cai
Zicheng Cai am 2 Okt. 2019
Bearbeitet: Zicheng Cai am 3 Okt. 2019
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 am 4 Okt. 2019
So what do you need help with? oder function looks ok as for me

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Naveen Shanmuganantham
Naveen Shanmuganantham am 17 Dez. 2020
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 am 8 Dez. 2022
The repo https://zenodo.org/record/4460618#.Yt6LGsHP2de contains a solver (Modified Davison-Maki method) to solve the differential Riccati with MATLAB.

Kategorien

Mehr zu Matrix Computations finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by