6
$\begingroup$

I've found that the latest MATLAB icare() solver includes the possibility to find also the anti-stabilizing solution of the Riccati equation. I haven't found a similar option on Mathematica. Is there something undocumented or any alternative way?

$\endgroup$

1 Answer 1

5
$\begingroup$

Unfortunately, there is no such option as of now.

But based on this example we can compute such a solution.

{a, b, q, r} = {{{3, 0}, {0, 3}}, {{1, 0}, {0, 1}}, {{1, 0}, {0, 1}}, {{1, 0}, {0, 1}}};

{vals, vecs} = 
  Eigensystem[ArrayFlatten[{{a, -b.Inverse[r].Transpose[b]}, {-q, -Transpose[a]}}]];

unstableBasis = Extract[vecs, Position[vals, _?(#1 > 0 & ), {1}]];

{{x1, x2}} = Partition[unstableBasis, {2, 2}]; 

MatrixRank[x1] == 2

x = Simplify[x2.Inverse[x1]]

Simplify[ConjugateTranspose[a].x + x.a - x.b.Inverse[r].ConjugateTranspose[b].x + q]

(* True *) 

(* {{3 - Sqrt[10], 0}, {0, 3 - Sqrt[10]}} *)

(* {{0, 0}, {0, 0}} *)
$\endgroup$
2
  • $\begingroup$ Hi Suba! Thanks for answering. I would like to ask how you used Partition in this. Say my matrix system was sized n, would I have to use {n,n}? Also, it is unclear to me why you used {1} in Extract. $\endgroup$ Apr 17, 2020 at 15:15
  • $\begingroup$ Yes, in general, we would use $\{n,n\}$. That is to partition the $n\ \times 2n$ matrix of eigenvalues into two $n\ \times n$ blocks. I used $\{1\}$ in Position because it's default is $\{0, \infty\}$. In this case, vals is a vector so we can omit $\{1\}$. $\endgroup$ Apr 17, 2020 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.