solve matrix differential equations with ode45

5 visualizaciones (últimos 30 días)
Zicheng Cai
Zicheng Cai el 2 de Oct. de 2019
Respondida: Maximilian Behr el 8 de Dic. de 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 comentarios
Zicheng Cai
Zicheng Cai el 2 de Oct. de 2019
Editada: Zicheng Cai el 3 de Oct. de 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 el 4 de Oct. de 2019
So what do you need help with? oder function looks ok as for me

Iniciar sesión para comentar.

Respuestas (2)

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

Categorías

Más información sobre Matrix Computations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by