# State space representation of transfer function $1/s$

I have three questions here:

1) I'm looking for a method to compute state-space equations by hand when given a transfer function, so far I think the best I've found is here.

2) Here's an example just to help me understand things:

Give the transfer function $1/s$, find the corresponding state-space model

$\dot{x} = Ax + Bu$

$y = Cx$

That's both controllable and observable!

From what I can tell, the system looks like this so far:

$A = \begin{bmatrix} 0 \ 1 \\ 0 \ 0 \end{bmatrix}, \space B = \begin{bmatrix} 0 \\ 1 \end{bmatrix}, \space$ and $C = \begin{bmatrix} 0 \ 1 \end{bmatrix}$

This also doesn't seem correct, because it's a different order than the $1/s$ function, also the rank is 0, which would imply that it's not controllable.

I need to find a state-space system that's both controllable and observable, and it seems that this system (unless I'm wrong) doesn't fit the bill, which confuses me since I thought a transfer function could only be represented one way, while a state-space could be represented by various transfer functions.

3) If there are multiple models to represent $1/s$, is it possible that there are systems that are observable but not controllable, and also controllable but not observable?

-

Given the triple $(A,B,C)$ above, the corresponding transfer function is $\hat{h}(s) = C (sI-A)^{-1}B$.

(1) There are many techniques for realizing a given $\hat{h}(s)$. See http://en.wikipedia.org/wiki/State_space_representation#Canonical_realizations for example.

The technique you used above (controller canonical realization) works well in this case, that is, $A=\begin{bmatrix} 0 & 1 \\ 0 & 0\end{bmatrix}$, $B=\begin{bmatrix} 0 \\ 1 \end{bmatrix}$, $C=\begin{bmatrix} 0 & 1 \end{bmatrix}$. By construction $(A,B)$ is cc., however $(A,C$) is not co. The 'textbook' approach is to use the Kalman decomposition to reduce $(A,B,C)$ to minimal form. Obtaining the Kalman decomposition is typically tedious, but in this case it has a simple form.

Let ${\cal C} = \begin{bmatrix} B & A B\end{bmatrix}$, ${\cal O} = \begin{bmatrix} C \\ C A\end{bmatrix}$. We note that ${\cal R} C = \mathbb{R}^2$, and $\ker O = \ker C = \operatorname{sp} \{ e_1 \}$ (the unobservable subspace).

Since $S_{cu} = {\cal R} C \cap \ker O =\operatorname{sp} \{ e_1 \}$ (the controllable and unobservable subspace), we can take $S_{c\overline{u}} = \operatorname{sp} \{ e_2 \}$, and then in the (ordered) basis $e_2,e_1$ we can find a minimal representation.

Let $P = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}^{-1}$ (which, conveniently, has $P= P^{-1}$), and let $(\tilde{A}= P^{-1}AP, \tilde{B}=P^{-1}B, \tilde{C}=CP)$ be the representation in the new basis. Then $([\tilde{A}]_{11}, [\tilde{B}]_{11}, [\tilde{C}]_{11})$ will be a minimal representation.

This gives $\tilde{A}=\begin{bmatrix} 0 & 0 \\ 1 & 0\end{bmatrix}$, $\tilde{B}=\begin{bmatrix} 1 \\ 0 \end{bmatrix}$, $\tilde{C}=\begin{bmatrix} 1 & 0 \end{bmatrix}$, hence the minimal representation is $(\begin{bmatrix} 0 \end{bmatrix}, \begin{bmatrix} 1 \end{bmatrix}, \begin{bmatrix} 1 \end{bmatrix})$.

(2) You want $\hat{h}(s) = \frac{1}{s}$. Take $A=0, C=1,B=1$. That is, a single state system $\dot{x} = u$, $y=x$.

It is possible to show that all minimal realizations are similar, and since this realization is minimal (it is cc. and co.), it is essentially the only realization (all minimal realizations are given by $B\neq 0$ and $C = \frac{1}{B}$).

(3) Let $A=\begin{bmatrix} 0 & 0 \\ 0 & 1\end{bmatrix}$.

With $B=\begin{bmatrix} 1 \\ 1 \end{bmatrix}$, $C=\begin{bmatrix} 1 & 0 \end{bmatrix}$, the system $(A,B,C)$ is cc. but not co., and the corresponding transfer function is $\hat{h}(s) = \frac{1}{s}$.

With $B=\begin{bmatrix} 1 \\ 0 \end{bmatrix}$, $C=\begin{bmatrix} 1 & 1 \end{bmatrix}$, the system $(A,B,C)$ is co. but not cc., and the corresponding transfer function is $\hat{h}(s) = \frac{1}{s}$.

-
Could you explain a little further about how to obtain the realizations? From what you linked for instance...there are no $d$ values, or at least I'm not sure what I'd use for $d$. I'd have simply $1/s$ which would give me a 1 dimensional matrix? Obviously that's not right, so I want to clear up my confusion. –  afrotaint Oct 28 '13 at 13:54
@afrotaint: You are correct, the controllable canonical form is not minimal in this case. You can use the Kalman decomposition to find a minimal representation. –  copper.hat Oct 28 '13 at 14:51
@afrotaint: I added some details to (2). I'm not sure how helpful it is, as the particular case makes the computations very simple. –  copper.hat Oct 28 '13 at 18:18