# Similarity transformation to controllable and observable canonical form.

Consider the system $$\dot{x}=Ax+Bu, \quad y=Cx$$ with:

$$A = \begin{bmatrix}2&4&-5\\3&1&-3\\4&4&-7\\ \end{bmatrix}, \quad B=\begin{bmatrix}4\\1\\3 \end{bmatrix}, \quad C = \begin{bmatrix}0&-1&1 \end{bmatrix} \qquad (1)$$

The minimal realization of this system has the following transfer function:

$$\frac{2s+5}{s^2+5s+6}$$

The following transformation matrix $$M$$ can bring $$(1)$$ into a form with a diagonal $$A$$ matrix $$\Lambda$$ using the relationship $$\Lambda = MAM^{-1}$$

$$M= \begin{bmatrix}1&1&1\\1&-1&0\\1&0&1 \end{bmatrix} \quad \text{Resulting in:} \quad \Lambda=\begin{bmatrix}1&0&0\\0&-2&0\\0&0&-3\\ \end{bmatrix}$$

The question is: Can system $$(1)$$ be transformed under similarity to the controllable canonical form or to the observable canonical form?

My approach: The controllability matrix has rank $$3$$ and the observability matrix has rank $$2$$. Based on this I would say that it is possible to transform the system to the controllability canonical form but not to the observability canonical form. Is this correct?

Your approach is correct. However one could also arrive at the same conclusion by looking at the poles of the transfer function and thus which mode would be either uncontrollable or unobservable. It can be shown that the transfer function has the poles $$-2$$ and $$-3$$, so the mode associated with the remaining eigenvalue $$1$$ has to be uncontrollable or unobservable. A quick way to check this would be with the help of the Hautus lemma.