Register to reply 
On The Solution of Matrix Ricatti Equation ODE 
Share this thread: 
#1
Feb1413, 01:08 AM

P: 151

I've become a little confused about why noone cares to actually explicitly solve the Matrix Ricatti Differential Equation (RDE) of the form:
$$ {\dot{P}} = Q + PA^T + A^TP + PBB^TP $$ where [itex] BB^T, Q, P [/itex] are a positivedefinite matrices, and [itex] A, BB^T, Q, P \in \mathbb{R}^{n \times n} [/itex] This equation pops up all the time in controls. A solution to this ode also appears to be avoided for some reason, even though deriving it (in my opinion) is nontrivial. Neither professors nor textbooks seem to address solving this other than to comment away the need to discuss a solution by saying "Often you need to solve this numerically". I asked about this and still felt curious but rather than asking more questions and just looking stupid, I wanted to fill what seems to be a void with my solution. It was also a good exercise for me. Note: In the following derivation, [itex] P,R,X,J [/itex] are timevarying matrices, yet I will only explicitly show a time argument when this needs to be emphasized. Step 1: Introduce change of coordinates. Define $$ R(t) = P(t)  R_o $$ where [itex] R_o [/itex] is constant and must be positivedefinite (PD). Solving for [itex] P [/itex] and substituting this into the RDE and collecting terms results in $$ {\dot{R}} = (Q + R_oA + A^TR_o  R_oBB^TR_o) + R(ABB^TR_o)+(ABB^TR_o)^TR  RBB^TR $$ and select [itex] R_o [/itex] to satisfy $$0=Q + R_oA + A^TR_o  R_oBB^TR_o $$ to get rid of the constant, resulting in a new RDE below $$ {\dot{R}} = R(ABB^TR_o)+(ABB^TR_o)^TR  RBB^TR $$ Notice that the constraint resulting in the equation above is actually the Algebraic RE (no derivative term) and the solution to this will be discussed later, and remember now that [itex] R_o [/itex] is no longer arbitrary. In fact, for my application (I believe) I may not need to solve for this matrix due to something really really really convenient, but this post should solve the RDE given the solution to this algebraic Step 2: Decompose [itex] R(t) [/itex] define matrices $$ X(t), J(t) $$ as both N x N matrices such that they satisfy $$R(t) = X^T(t)J(t)X(t)$$ and note that while [itex] J(t) [/itex] is positivedefinite (PD), [itex] X(t) [/itex] is not. Plugging this into the RDE results in (this will get messy) $$ {\dot{R}} = {\dot{X}}^TJX  X^T{\dot{J}}X  X^TJ{\dot{X}} = X^TJX(ABB^TR_o)(ABB^TR_o)^TX^TJX  X^TJXBB^TX^TJX $$ Step 3: Undetermined Coefficients At this point you do "pattern matching" or "undetermined coefficients". You get two equations from this (two identifical equations for [itex] X(t) [/itex]). The first equation is: $${\dot{X}} = X(BB^TR_oA)$$ and the second is $${\dot{J}} = JXBB^TX^TJ$$ Step 4: A Solution. The first equation in step 3 represents the matrix ODE for linear timeinvariant systems. $${\dot{X}} = X(BB^TR_oA)$$ Inverting the system and integrating yields $${\dot{X}}(t)X^{1}(t) = (BB^TR_oA)$$ $$\int_{t}^{T}{\dot{X}}(s)X^{1}(s)ds = \int_{t}^{T}(BB^TR_oA)ds$$ $$log(X(Tt)) = (BB^TR_oA)(Tt)$$ and exponentiating... $$X(Tt) = e^{(BB^TR_oA)(Tt)}$$ The second equation in step 3 is a bit more complex and requires some more manipulation and thought, and the previously solved solution [itex] X(t) [/itex]. Inverse [itex] J [/itex] on both sides to get $$J^{1}{\dot{J}}J^{1} = XBB^TX^T$$ Integrating (the odd looking limits again come from my particular application, optimal control). $$\int_{t}^{T}J(s)^{1}{\dot{J(s)}}J(s)^{1}ds = \int_{t}^{T}X(s)BB^TX^T(s)ds$$ This integral looks nasty, but on the left hand side is actually setup for chain rule of PD matrices, on the right hand side is a controllability grammian for an LTI system with the system matrix [itex] BB^TR_oA [/itex]. But keep in mind controllability grammians have to be full rank (i.e., invertible) for all time in order for the related system to be controllable. To be sure that it plays the role of the controllability grammian as it does in linear systems, trying to solve for [itex] J(t) [/itex] $$J^{1}(Tt) = \int_{t}^{T}X(s)BB^TX^T(s)ds$$ Inversing gives $$J(Tt) = \left( \int_{t}^{T}X(s)BB^TX^T(s)ds \right) ^{1}$$ and THAT is why the controllability grammian needs to be invertible for all time. If the controllability grammian is not full rank, we cannot control the system, and thus we cannot invert this matrix to create our solution to the system. Combining [itex] X(Tt), J(Tt) [/itex] we have $$R(t) = X^T(Tt)J(Tt)X(Tt) = e^{(BB^TR_oA)^Tt}\left( \int_{t}^{T}X(s)BB^TX^T(s)ds \right) ^{1}e^{(BB^TR_oA)t}$$ And yet we still need to add the constant term to find the solution in the original coordinate system $$P(t) = R(t) + R_o = X^T(Tt)J(Tt)X(Tt) + R_o = e^{(BB^TR_oA)^T(Tt)}\left( \int_{t}^{1}X(s)BB^TX^T(s)ds \right) ^{1}e^{(BB^TR_oA)(Tt)} + R_o$$ (Conclusion) I've reduced the problem of finding [itex] P(t) [/itex] for $$ {\dot{P}} = Q + PA + A^TP  PBB^TP$$ to finding [itex] R_o [/itex] that solves $$0=Q + R_oA + A^TR_o  R_oBB^TR_o $$ I left out some details I think, partly because I'm still learning them for myself, and some things may only make sense here if you're using this for optimal control like me. Regardless, I think I've left the meat and potatoes here. Let me know what you think! 


#2
Feb1513, 12:10 PM

P: 151

I put some effort into this and if you want to print this out for w/e reason or save this, I've made a pdf file same post here
https://dl.dropbox.com/u/25124237/Bl...n%20140213.pdf 


#3
Feb1613, 05:42 AM

P: 3,243

Well, in your first step it should be:
[tex] +R_0 BB^T R_0[/tex] and not with a minus sign, also the rest of RHS should be with plus signs, cause you plug [tex] P=R+R_0 [/tex]. I've noticed some more misprints, such as you forgot Transpose in some of A's. A piece of advice don't hurry, be precise and slow. 


#4
Feb1713, 01:24 AM

P: 151

On The Solution of Matrix Ricatti Equation ODE
Actually it looks like the I wrote the original equation wrong. It should be
$$ {\dot{P}} = Q + PA^T + A^TP  PBB^TP $$ Grrr. . 


#5
Feb1813, 01:24 PM

P: 3,243

OK, I spotted another mistake (or so I think).
The integral [tex]\int_{t}^{T}{\dot{X}}(s)X^{1}(s)ds[/tex] Shoule be [tex] \log(X(T))\log(X(t))=\log (X(T)/X(t))[/tex] and not [tex] \log X(Tt)[/tex] 


#6
Feb1813, 01:28 PM

P: 151

Yes I believe you're right.
Aside from these notation mistakes, do you believe the final answer to be correct? 


#7
Feb1813, 01:36 PM

P: 3,243

I'll be reading it tomorrow again, by the weekend I hope I'll have time to respond to you.
I just spotted these mistakes first, btw I think it's best to read your own stuff once more and be sure that every step is justified, and write your justification down for every equality. I myself have exams the next two days and next monday, not sure why I am being so altruistic... :) 


#8
Feb1813, 01:37 PM

P: 151

I understand. I have related issues.



#9
Feb1813, 04:45 PM

P: 298

I haven't studied your derivation, but I believe writing the differential Riccati system as a algebraic Riccati system is called Chandrasekhar decomposition. The problem has now moved to solving the algebraic system, which is still difficult to solve in general.
There is also the Bernoulli substitution method, which transforms the Riccati ode system to a (larger) system of linear ode's (Hamilton ode's). A large number of books have been written on the subject of solving matrix riccati equations, they might give you some more ideas. 


#10
Feb2013, 07:16 PM

P: 151

Thanks for the ideas!
I'll see if I can get my hands on some of those books. 


Register to reply 
Related Discussions  
Ricatti Differential Equation  Calculus & Beyond Homework  0  
Ricatti's Equation (non linear ODE)  Calculus & Beyond Homework  5  
Solution to Matrix Differential Equation  Calculus & Beyond Homework  2  
Ricatti Equation  Introductory Physics Homework  4  
Ricatti equation  Introductory Physics Homework  5 