Clear Filters
Clear Filters

Solve long matrices equation

2 views (last 30 days)
TESSO WOAFO
TESSO WOAFO on 4 May 2024
Commented: TESSO WOAFO on 4 May 2024
Hello,
please I would like help to solve this equation with matlab ( you can see it in the screenshot). I want to find the matrix P11. All other matrices in the equation are known.

Answers (2)

cui,xingxing
cui,xingxing on 4 May 2024
From your screenshot formulas, you should first prioritize the formulas Manipulation and Simplification, and then try to solve the analytical solution using some of the functions of the Symbolic Math Toolbox™, and if the analytical solution doesn't exist theoretically, you should try to get a numerical solution, which is valuable in a lot of engineering. Secondly, based on your equation, which is in matrix expression form, you should do a specific analysis based on your specific application context to simplify your process.
Finally, see the following link for generalities about the functionality of solving with the Symbolic Math Toolbox™:
  1 Comment
TESSO WOAFO
TESSO WOAFO on 4 May 2024
Thank you very much for your answer. I solved it using the MATLAB function fsolve for nonlinear equations.

Sign in to comment.


John D'Errico
John D'Errico on 4 May 2024
Edited: John D'Errico on 4 May 2024
This is a classic algebraic Ricatti equation.
How do you solve it in MATLAB? It looks like the care function does that, which is now obsolete, and superceeded by icare. (I hope they never have to come up with a name to supercede icare. What would they use? Maybe ycare? Ok, I know, who cares?)
help icare
ICARE Implicit solver for continuous-time Riccati equations. [X,K,L] = ICARE(A,B,Q,R,S,E,G) computes the stabilizing solution X of the continuous-time algebraic Riccati equation -1 A'XE + E'XA + E'XGXE - (E'XB + S) R (B'XE + S') + Q = 0 . The matrices Q,R,G must be Hermitian and R,E must be invertible. When omitted or set to [], B,R,S,E,G default to the values B=0, R=I, S=0, E=I, and G=0. Scalar-valued Q,R,G are interpreted as multiples of the identity matrix. ICARE also returns the state-feedback gain K and the closed-loop eigenvalues L given by -1 K = R (B'XE + S'), L = EIG(A+G*X*E-B*K,E) . ICARE returns [] for X,K when there is no finite stabilizing solution. [X,K,L,INFO] = ICARE(...) also returns a structure INFO with the following data: * Vectors SX and SR of state and R scalings * Basis [U;V;W] of the stable invariant subspace of the associated scaled matrix pencil * Diagnostic "Report" with value 0 Accurate solution found (success) 1 Solution accuracy may be poor 2 Solution is not finite 3 Hamiltonian spectrum [L;-L] has eigenvalues on imag. axis. 4 Pencil is singular ([B;S;R] rank deficient) The solution X and gain K are related to DX=diag(SX), DR=diag(SR), and U,V,W by -1 -1 -1 X = DX V U DX E , K = - DR W U DX . [...] = ICARE(...,'noscaling') turns off the built-in scaling and sets all entries of SX and SR to one. This speeds up computation but can be detrimental to accuracy when A,B,Q,R,S,E,G are poorly scaled. [...] = ICARE(...,'anti') computes the anti-stabilizing solution X that puts all eigenvalues of (A+G*X*E-B*K,E) in the right half-plane. See the reference page for additional algorithmic details. See also IDARE. Documentation for icare doc icare
As you can see, it handles exactly your problem. Just plug in your matrices. You would have something like this:
Q = 0
S = B
G = 0
X = P11
E = I
A = 2*A
I think I got them right, but it would be worth a quick check, as the form in icare does not have B factored out and paired with R^-1.
  1 Comment
TESSO WOAFO
TESSO WOAFO on 4 May 2024
Thank you very much for your answer. I solved it using the MATLAB function fsolve for nonlinear equations.

Sign in to comment.

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!