Let's say that I have a discrete state space model:

$$x(k+1) = Ax(k) + Bu(k) \\ y(k) = Cx(k) + Du(k)$$

If I want to have this state space model as a balanced model realization. I need to exchange the state vector $x$ to $x = T\xi $. My model will then become.

$$x(k+1) = TAT^{-1}x(k) + TBu(k) \\ y(k) = CT^{-1}x(k) + Du(k)$$

According to my book. Then I need to find the matrix $T$. One good way to find the matrix $T$ is to solve controllability/reachability gramian matrix $P$ and obserability gramian $Q$ from the lyapunov equations:

$$ A^TQA - Q + C^TC = 0$$ $$ APA^T - P + BB^T = 0 $$

Once I have found $P, Q$, I need to find $T$ from the Cholesky factors $Q_1, U, \Sigma_1$.

$$ Q = Q_1^TQ_1 \\ Q_1 P Q_1^T = U \Sigma^2 U^T \\ U^T U = I \\ \Sigma = \Sigma_1^T \Sigma_1 \\ T = \Sigma_1^{-1}U^TQ_1$$

So my question is how I can find the Cholesky factors $\Sigma_1^{-1}U^TQ_1$ if I know $Q, P$? Here I not asking for deep theory. I would be very glad if I got a hint that I can use built in functions from Octave/Matlab.


I can use matlab command

Q1 = chol(Q)

To find $Q_1$ or if I use

U = chol(I) % I is the identify matrix of same dimension as P and Q - I assume.

I found $U$. Now it's $\Sigma$ left. If I know $U,Q_1,P $

Can I transform this $$Q_1 P Q_1^T = U \Sigma^2 U^T$$


$$ [Q_1 P Q_1^TU^{-1}U^{-T}]^{1/2} = \Sigma $$


  • $\begingroup$ Your model after transformation seems to be wrong. $\endgroup$ – MrYouMath Oct 26 '17 at 6:21
  • $\begingroup$ My answer is correct :) $\endgroup$ – Daniel Mårtensson Oct 26 '17 at 8:57
  • $\begingroup$ I did not mean your answer I mean your similarity transformation in your question. $\endgroup$ – MrYouMath Oct 26 '17 at 9:11
  • $\begingroup$ That's not correct transformation, but it's a question. And then it's OK if the question does not have the correct answer. $\endgroup$ – Daniel Mårtensson Oct 26 '17 at 13:01

Here is the answer.

Assume we got the discrete state space model:

$$ x(k+1) = Ax(k) + Bu(k) \\ y(k) = Cx(k) $$

We want a balanced realization state space model.

$$ x(k+1) = TAT^{-1}x(k) + TBu(k) \\ y(k) = CT^{-1}x(k) $$

Then we need to find matrix $T $. To find $T$ we need to solve the reachability/controlability matrix $P $ from Lyapunov equation:

$$APA^T - P + BB^T = 0$$

And obserability matrix $Q $ from Lyapunov equation: $$A^TQA - Q + C^TC = 0 $$

Once we have found $P,Q $ we need to find the hankel singular values from $$ \sigma_i = \sqrt{\lambda_i(PQ)} $$

The hankel singular values are square root eigenvalues of product of $PQ$ matrix.

Now we need to find $Q_1, \Sigma_1, U $ matrecies. They are Cholesky factors.

Be begin first with $Q_1$. We can use Matlab or Octave for this.

> Q1 = chol(Q)

> U = chol(I) % I is identity matrix.

Then sigma:

$$ \Sigma = diag(\sigma_1, \sigma_2, \sigma_3,....,\sigma_i)$$

And then

> Sigma1 = chol(Sigma)

At last: $$ T = \Sigma_1^{-1}U^TQ_1$$

Done! Book: System modeling and identification, second edition August 2017, Rolf Johansson, Lund, Sweden. Can be purchased by KFSAB.se because the book is out of print in every store.


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.