Part 6 - Space-state representation (2)

Introduction

In this part we’ll see how we can go from a given space-state representation to the systems transfer function and vice-versa.

From space-state to transfer function

Given this space-state representation:

{x˙=Ax+Bu(1)y=Cx+Du(2)\begin{cases} \dot{x} & = Ax + Bu & (1) \newline y & = Cx + Du & (2) \end{cases}

We want to find Guy(s)=Y(s)U(s)G_{uy}(s) = \dfrac{Y(s)}{U(s)}

Let’s Laplace our equation system:

{sX(s)=AX(s)+BU(s)(1)Y(s)=CX(s)+DU(S)(2)\begin{cases} sX(s) & = AX(s) + BU(s) & (1) \newline Y(s) & = CX(s) + DU(S) & (2) \end{cases}

From (1)(1) we can find that:

sX(s)AX(S)=BU(s)  To factor out X(s) we need to do a little matrix trickX(s)(sIA)=BU(S)X(s)=(sIA)1)B U(s)sX(s) - AX(S) = BU(s) \ | \ \text{To factor out X(s) we need to do a little matrix trick} \newline X(s)(sI - A) = BU(S) \newline X(s) = (sI - A)^{-1})B\ U(s)

If we substitute this into (2)(2):

Y(s)=C((sIA)1B)U(s)+DU(s)Guy(s)=C(sIA)1B+DY(s) = C((sI - A)^{-1} B) U(s) + D U(s) \newline \boxed{G_{uy}(s) = C(sI - A)^{-1}B + D}

Example

From our feather-mass example, we found that:

A=[01kmbm]B=[01m]C=[10]D=[0]A = \begin{bmatrix} 0 & 1 \newline -\dfrac{k}{m} & -\dfrac{b}{m} \end{bmatrix} \quad B = \begin{bmatrix} 0 \newline \dfrac{1}{m} \end{bmatrix} \quad C = \begin{bmatrix} 1 & 0 \end{bmatrix} \quad D = \begin{bmatrix} 0 \end{bmatrix}

We therefore get:

[10]([s00s][01kmbm])1[01m]\begin{bmatrix} 1 & 0 \end{bmatrix} \left( \begin{bmatrix} s & 0 \newline 0 & s \end{bmatrix} - \begin{bmatrix} 0 & 1 \newline -\dfrac{k}{m} & -\dfrac{b}{m} \end{bmatrix}\right)^{-1} \begin{bmatrix} 0 \newline \dfrac{1}{m} \end{bmatrix} [10]([s1kms+bm])1[01m]\begin{bmatrix} 1 & 0 \end{bmatrix} \left( \begin{bmatrix} s & -1 \newline \dfrac{k}{m} & s+\dfrac{b}{m} \end{bmatrix}\right)^{-1} \begin{bmatrix} 0 \newline \dfrac{1}{m} \end{bmatrix} [10](1s2+bsm+km[s+bm1kms])[01m]\begin{bmatrix} 1 & 0 \end{bmatrix} \left( \dfrac{1}{s^2 + \dfrac{bs}{m} + \dfrac{k}{m}} \begin{bmatrix} s + \dfrac{b}{m} & 1 \newline -\dfrac{k}{m} & s \end{bmatrix}\right) \begin{bmatrix} 0 \newline \dfrac{1}{m} \end{bmatrix} 1s2+bsm+km[s+bm1][01m]\dfrac{1}{s^2 + \dfrac{bs}{m} + \dfrac{k}{m}} \begin{bmatrix} s + \dfrac{b}{m} & 1 \end{bmatrix} \begin{bmatrix} 0 \newline \dfrac{1}{m} \end{bmatrix} 1m(s2+bsm+km)\dfrac{1}{m(s^2 + \dfrac{bs}{m} + \dfrac{k}{m})} 1ms2+bs+k\boxed{\dfrac{1}{ms^2 + bs + k}}

From transfer function to space-state representation

Given:

G(s)=as3+bs2+cs+d=Y(s)U(s)G(s) = \dfrac{a}{s^3 + bs^2 + cs + d} = \dfrac{Y(s)}{U(s)}

Which means:

s3Y(s)+bs2Y(s)+csY(s)+dY(s)=aU(s)s^3 Y(s) + bs^2 Y(s) + cs Y(s) + d Y(s) = a U(s)

Inverse-Laplace yields:

y(3)(t)+by¨(t)+cy˙(t)+dy(t)=au(t)y^{(3)}(t) + b \ddot{y}(t) + c \dot{y}(t) + dy(t) = a u(t)

Introduce state variables, x1=y,x2=y˙,x3=y¨x_1 = y, x_2 = \dot{y}, x_3 = \ddot{y}.

This means:

{x1˙=x2x2˙=x3x3˙=au(t)bx3cx2dx1\begin{cases} \dot{x_1} = x_2 \newline \dot{x_2} = x_3 \newline \dot{x_3} = au(t) - bx_3 - cx_2 - dx_1 \newline \end{cases}

Which yields:

{x˙=[010001dcb][x1x2x3]+[00a]uy=x1\boxed{ \begin{cases} \dot{x} & = \begin{bmatrix} 0 & 1 & 0 \newline 0 & 0 & 1 \newline -d & -c & -b \end{bmatrix} \begin{bmatrix} x_1 \newline x_2 \newline x_3 \end{bmatrix} + \begin{bmatrix} 0 \newline 0 \newline a \end{bmatrix} u \newline y = x_1 \end{cases}}