필터 지우기
필터 지우기

solve matrix differential equations with ode45

조회 수: 4 (최근 30일)
Zicheng Cai
Zicheng Cai 2019년 10월 2일
답변: Maximilian Behr 2022년 12월 8일
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
Naveen Shanmuganantham 2020년 12월 17일
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