7.3. Time Response for State Space Models

In this section we shall determine the time response of a system represented by a state-space model. We shall take as a starting point the transformed state space model developed in the last section.

It is possible to derive the time response directly in the time domain from the state-equations. I believe however, that the following development will be easier to understand. I advise you to consult any text book for the time domain development.

In the last section, we showed that the state space model was

˙x(t)=Ax(t)+Bu(t)y(t)=Cx(t)+Du(t)

and that the transformed equation was

sX(s)x(0)=AX(s)+BU(s)Y(s)=CX(s)+DU(s)

In this section we will show how the time response of the state space model may be derived from the transformed model.

7.3.1. Zero Input Response

We first consider the response of the system to its initial conditions and zero input. This is the zero input response or homogeneous response of the system.

With the input transform U(s)=0 the state equation becomes

X(s)=[sIA]1x(0).

We define $Φ(s)=[sIA]1$

so that

X(s)=Φ(s)x(0)

is the transform of the zero input state response.

In the time domain, the corresponding state response is given by the inverse Laplace transform of equation (1)

x(t)=L1{Φ(s)x(0)},

which, since the initial condition vector x(0) is a vector of constants becomes:

x(t)=L1{Φ(s)}x(0)=ϕ(t)x(0).

7.3.1.1. Resolvent matrix

The resolvent matrix is defined as

Φ(s)=[sIA]1=adj[sIA]|sIA|.

The resolvent matrix is a matrix of rational polynomials in the Laplace transform variable s.

The state transition matrix is

ϕ(t)=L1{adj[sIA]|sIA|}.

What is the form of this function?

7.3.2. State Transition Matrix

The vector of time functions ϕ(t) is known as the state transition matrix. It defines the motion (or trajectory) of the state variables through the n-dimensional state space from a given set of initial states.

7.3.2.1. Characteristic Polynomial

The adjoint matrix adj[sIA] is a matrix of polynomials each of which is of order n1 or less.

The determinant $|sIA|=|sa11a12a1na21sa22a2nan1a2nsann|$

is called the characteristic polynomial. It is always a polynomial of degree n.

Therefore each element of the resolvent matrix Φ(s) is of the form

bn1sn1++b0sn+an1sn1++a0.

7.3.2.2. System Characteristic (or Eigen) Values

The coefficients bi of each element of the resolvent matrix Φ(s) depend on the form of the system. The characteristic polynomial |sIA| is the common denominator of all elements of Φ(s).

Φ(s) may be factorized:

|sIA|=sn+an1sn1++a1s+a0=(sp1)(sp2)(spn)

The values pi are known as the characteristic (or eigen) values of the state matrix A. The characteristic values are the poles of the system!

7.3.3. Zero-input response

If we make a partial fraction expansion of the characteristic equation, then for the i-jth element of the resolvent matrix we have

Φij(s)=r1sp1+r2sp2++rnspn

(where the coefficient ri is the so called residue of the partial fraction expansion determined at the value s=pi).

Inverse Laplace transforming this equation we finally obtain the state transition function:

ϕij(t)=r1ep1t+r2ep2t++rnepnt.

7.3.3.1. System ‘modes’

The state transition matrix ϕ(t) is an n×n matrix, each element of which is a linear combination of the n “mode functions” (or simply modes)

ep1t, ep2t, , epnt.

Each mode is constructed from the eigenvalues (p1, p2, , pn) of the state matrix A.

The eigenvalues are also known as the poles of the system.

7.3.3.2. Example

If

A=[0165]
sIA=[s16s+5]

so

|sIA|=s2+5s+6=(s+2)(s+3).

The characteristic values of the system are p1=2 and p2=3 so the modes are e2t and e3t.

Now

adj[sIA]=[s+516s]

so the resolvent matrix is

Φ(s)=[s+5(s+2)(s+3)1(s+2)(s+3)6(s+2)(s+3)s(s+2)(s+3)].

Expanding each element of Φ(s) we get

Φ(s)=[3s+22s+31s+21s+36s+2+6s+32s+2+3s+3].

Inverse Laplace transforming this we get the final state transition matrix, representing the zero-input response of the system:

ϕ(t)=[3e2t2e3te2te3t6e2t+6e3t2e2t+3e3t].

Note that, by an alternative derivation1, we can show that

ϕ(t)=eAt

where eAt is called the matrix exponential.

7.3.3.3. Zero Input System Response

For non-zero initial conditions and zero input we have

X(s)=[sIA]1x(0)=Φ(s)x(0)

The zero-input system output transform is therefore given by

Yzi(s)=CΦ(s)x(0).

Because we have already shown that ϕ(t) will be a linear combination of modes, the unforced system response y(t) will be another linear combination of the same modes.

We now consider the case where the initial condition vector x(0)=0 and we will obtain the response of the system to an input. This is called the zero state response of the system.

7.3.4. The Zero State Response

For zero initial conditions we have

X(s)=[sIA]1BU(s)=Φ(s)BU(s)

The system output transform (forced response) is given by

Yzs(s)=[CΦ(s)B+D]U(s)

(where CΦ(s)B+D is the system transfer matrix).

7.3.5. Full System Response

The full system response for the state-space model is simply the sum of the zero-state and zero-input responses:

Yfull(s)=Yzs(s)+Yzi(s)=CΦ(s)[x(0)+BU(s)]+DU(s).

7.3.6. End of Pre-Class Presentation

In the class we will reinforce these concepts by working through an example in detail.

7.3.7. Example

Let

˙x=[0165]x+[2110]uy=[2101]xu=[etϵ(t)].

Calculate the full system response for this system given that the initial conditions are x(0)=[1,1]T.

7.3.7.1. Solution to Example

The transfer function is

G(s)=CΦ(s)B=[2101][s+5(s+2)(s+3)1(s+2)(s+3)6(s+2)(s+3)s(s+2)(s+3)][2110]=[2101][2s+9(s+2)(s+3)s+5(s+2)(s+3)s12(s+2)(s+3)6(s+2)(s+3)]=[5s+30(s+2)(s+3)2s+16(s+2)(s+3)s12(s+2)(s+3)6(s+2)(s+3)]

The transform of the input vector is

U(s)=L[etϵ(t)]=[1s+11s].$$Hence$$Y(s)=[5s+30(s+2)(s+3)2s+16(s+2)(s+3)s12(s+2)(s+3)6(s+2)(s+3)][1s+11s]=[7s2+48s+16s(s+1)(s+2)(s+3)(s2+18s+6)s(s+1)(s+2)(s+3)]=[8/3s+25/2s+126s+2+65/6s+31s11/2s+1+13s+213/2s+3]

Inverse Laplace transforming the previous result gives the zero-state output response of the system:

[83ϵ(t)+252et26e2t+656e3tϵ(t)112et+13e2t132e3t].

Note that response is now a linear combination of the system modes (e2t and e3t) and the input modes (ϵ(t) [the unit step function] and et).

If the initial condition vector x(0)=[1,1]T what is the total response of the system?

Y(s)=[2101][s+5(s+2)(s+3)1(s+2)(s+3)6(s+2)(s+3)s(s+2)(s+3)]×{[11]+[2110][1s+11s]}=[2s+16(s+2)(s+3)s+2(s+2)(s+3)6(s+2)(s+3)s(s+2)(s+3)][s2+2s+1s(s+1)s2s(s+1)]
Y(s)=[3s210s2+34s+16s(s+1)(s+2)(s+3)s3+6s212s6s(s+1)(s+2)(s+3)]y(t)=[83ϵ(t)+252et34e2t+596e3tϵ(t)112et+17e2t192e3t].

7.3.7.2. Solving this problem in MATLAB

We can use the symbolic toolbox!

Set up the problem … we can use ordinary matrices for this

format compact
imatlab_export_fig('print-svg')  % Static svg figures.
Copy to clipboard
A = [0, 1; -6, -5]; B = [2, 1; -1, 0];
C = [2, -1; 0, 1]; D = [0, 0; 0, 0];
x0 = [-1, 1]';
Copy to clipboard

Now define s and t as symbolic variables

 syms t s
Copy to clipboard

Define input vector U(s)

u = [exp(-t);heaviside(t)];
Us = laplace(u)
Copy to clipboard
Us =
Copy to clipboard
1/(s + 1)
Copy to clipboard
      1/s
Copy to clipboard

Compute Φ(s)

PhiS = inv(s*eye(2) - A)
Copy to clipboard
PhiS =
Copy to clipboard
[(s + 5)/(s^2 + 5*s + 6), 1/(s^2 + 5*s + 6)]
Copy to clipboard
[     -6/(s^2 + 5*s + 6), s/(s^2 + 5*s + 6)]
Copy to clipboard

Now compute zero state response:

Yzs(s)=(CΦ(s)B+D)
Yzs = (C*PhiS*B + D)*Us
Copy to clipboard
Yzs =
Copy to clipboard
(s/(s^2 + 5*s + 6) + 10/(s^2 + 5*s + 6) + (4*(s + 5))/(s^2 + 5*s + 6))/(s + 1) + (6/(s^2 + 5*s + 6) + (2*(s + 5))/(s^2 + 5*s + 6))/s
Copy to clipboard
                                                          - 6/(s*(s^2 + 5*s + 6)) - (s/(s^2 + 5*s + 6) + 12/(s^2 + 5*s + 6))/(s + 1)
Copy to clipboard

Unforced (zero-initial condition) response:

Yzi(s)=(CΦ(s)B+D)
Yzi = C*PhiS*x0
Copy to clipboard
Yzi =
Copy to clipboard
- s/(s^2 + 5*s + 6) - 4/(s^2 + 5*s + 6) - (2*(s + 5))/(s^2 + 5*s + 6)
Copy to clipboard
                                s/(s^2 + 5*s + 6) + 6/(s^2 + 5*s + 6)
Copy to clipboard

Total response:

Y(s)=Yzs(s)+Yzi(s)
Ytotal = Yzs + Yzi
Copy to clipboard
Ytotal =
Copy to clipboard
(s/(s^2 + 5*s + 6) + 10/(s^2 + 5*s + 6) + (4*(s + 5))/(s^2 + 5*s + 6))/(s + 1) - 4/(s^2 + 5*s + 6) - s/(s^2 + 5*s + 6) - (2*(s + 5))/(s^2 + 5*s + 6) + (6/(s^2 + 5*s + 6) + (2*(s + 5))/(s^2 + 5*s + 6))/s
Copy to clipboard
                                                                                          s/(s^2 + 5*s + 6) + 6/(s^2 + 5*s + 6) - 6/(s*(s^2 + 5*s + 6)) - (s/(s^2 + 5*s + 6) + 12/(s^2 + 5*s + 6))/(s + 1)
Copy to clipboard

Finally compute the time response y(t)

y = ilaplace(Ytotal)
Copy to clipboard
y =
Copy to clipboard
(25*exp(-t))/2 - 34*exp(-2*t) + (95*exp(-3*t))/6 + 8/3
Copy to clipboard
  17*exp(-2*t) - (11*exp(-t))/2 - (19*exp(-3*t))/2 - 1
Copy to clipboard

Plot response

subplot(211)
ezplot(y(1),[0,6]),grid,title('y_1(t)')
subplot(212)
ezplot(y(2),[0,6]),grid,title('y_2(t)')
Copy to clipboard
../../_images/tr4ss_72_0.svg

7.3.7.3. Simulation of State Space Models in Matlab

  • The functions step and impulse will produce step impulse responses of a system with zero initial conditions.

  • The function lsim can be used to determine the state space response to arbitrary inputs.

  • If you need to simulate a system with arbitrary inputs and predefined initial conditions, you should use the Linear Simulation Tool which is opened when you execute lsim(model).

Visit the MATLAB Control Systems Toolbox help pages to find out more.

7.3.8. Footnote

  1. For a first order differential equation

    dxdt=ax

    so the Laplace transform is

    sX(s)x(0)=aX(s)X(s)(sa)=x(0)X(s)=x(0)sa.

    The inverse laplace transform of the final equation gives

    x(t)=x(0)eat.

    For the vector case

    sX(s)x(0)=AX(s)

    so by comparison

    x(t)=x(0)eAt.

    The proper proof is of course a little more involved and will be explored in Section 7.6!