Overview

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 trick(sI−A)X(s)=BU(s)X(s)=(sI−A)−1BU(s).\begin{align*} sX(s) - AX(s) & = BU(s) & & \| \quad \text{To factor out } X(s) \text{ we need to do a little matrix trick} \newline (sI - A)X(s) & = BU(s) \newline X(s) & = (sI - A)^{-1}B U(s). \end{align*}

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

Y(s)=C((sI−A)−1B)U(s)+DU(s)  ⟹  Guy(s)=C(sI−A)−1B+D.\begin{align*} Y(s) & = C((sI - A)^{-1} B) U(s) + D U(s) \newline \implies & \boxed{G_{uy}(s) = C(sI - A)^{-1}B + D}. \end{align*}
Example 1

From our feather-mass example, we found that:

A=[01−km−bm]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:

Guy(s)=[10]([s00s]−[01−km−bm])−1[01m]=[10]([s−1kms+bm])−1[01m]=[10](1s2+bsm+km[s+bm1−kms])[01m]=1s2+bsm+km[s+bm1][01m]=1m(s2+bsm+km)=1ms2+bs+k.\begin{align*} G_{uy}(s) & = \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} \newline & = \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} \newline & = \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} \newline & = \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} \newline & = \dfrac{1}{m\left(s^2 + \dfrac{bs}{m} + \dfrac{k}{m}\right)} \newline & = \boxed{\dfrac{1}{ms^2 + bs + k}}. \end{align*}

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:

{x˙1=x2x˙2=x3x˙3=au(t)−bx3−cx2−dx1.\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. \end{cases}

Which yields:

{x˙=[010001−d−c−b][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}}.

Search

Essays, lecture notes, and research

Type to search the site.