solve matrix differential equations with ode45

5 visualizzazioni (ultimi 30 giorni)
Zicheng Cai
Zicheng Cai il 2 Ott 2019
Risposto: Maximilian Behr il 8 Dic 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 Commenti
Zicheng Cai
Zicheng Cai il 2 Ott 2019
Modificato: Zicheng Cai il 3 Ott 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 il 4 Ott 2019
So what do you need help with? oder function looks ok as for me

Accedi per commentare.

Risposte (2)

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

Categorie

Scopri di più su Matrix Computations in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by