How to solve a Riccati Control (differential) Equation?
45 views (last 30 days)
Show older comments
Hi everyone! First time writing in this forum :)
My problem is that I have to solve the Riccati Control Equation, of the form:
dS/dt = -A' S -S A - Q + S G S
where A' is the transpose. A, S, Q and G are real matrices in R^(N x N). I need the steady state solution of this equation (within a real time simulink scheme, but this for now is not necessary).
Should I use a ODE solver? But how i define the function with matrices? and what about the timespan?
Thank you for your help!
0 Comments
Answers (2)
Giovanni Mottola
on 4 Oct 2016
You don't need to solve a differential equation. "Steady-state" means the solution (here, the matrix S) remains constant, which means that the derivative is zero. Substituting dS/dt=0 in your equation we get:
0= -A' S -S A - Q + S G S
which is an algebraic problem (no derivatives involved) in N x N equations and N x N unknowns.
This can be solved directly. You may define a function func.m as follows:
function diff = func( A, Q, G, x )
diff = A.'*x+x*a+Q-x*G*x;
end
Then from the command window define your initial guess x0 and call:
fsolve(@(x) func(A, Q, G, x), x0)
The alternative would be to use the "care" command ( http://it.mathworks.com/help/control/ref/care.html ), but you first have to find the vector B such that B*B.'=G.
2 Comments
jalal khodaparast
on 23 Oct 2019
I want to solve a complex differential Riccati equation numerically. I used ODE45 and ODE15s but The solution has unstable oscillation.
How can I solve a differential Riccati equation with complex values?
See Also
Categories
Find more on Matrix Computations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!