Solving State-Space Differential Equations: Laplace Approach and Matrix Exponentials, Study notes of Electrical and Electronics Engineering

An in-depth explanation of how to solve state-space differential equations using the laplace approach and matrix exponentials. It covers the concepts of zero-input solution, convolution, state transition matrix, and transfer functions. The document also includes examples and explanations of continuous and discrete time cases.

Typology: Study notes

Pre 2010

Uploaded on 09/17/2009

koofers-user-56p
koofers-user-56p 🇺🇸

9 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
State-space systems
Solving the state-space differential equation (Laplace approach)
Now consider the case where there is an input.
dx(t)
dt =A x(t) + B u(t).
Taking Laplace transforms gives,
sx(s)x(0) = A x(s) + B u(s),
which means that,
x(s) = (sI A)1x(0) + (sI A)1B u(s).
Now the inverse Laplace gives (recall that Φ(t) is defined as L1(sI A)1),
x(t) = Φ(t)x(0)
|{z } +Zt
0
Φ(tτ)Bu(τ)dτ.
|{z }
zero-input solution convolution of Φ(t) and B u(t)
We can also use this equation for an arbitrary initial time,
x(t) = Φ(tt0)x(t0) + Zt
t0
Φ(tτ)B u(τ)dτ.
Roy Smith: ECE 147b 9: 2
State-space systems
Solving the state-space differential equation (Laplace approach)
Consider a continuous time state-space representation.
dx(t)
dt =A x(t) + B u(t),
y(t) = C x(t) + D u(t).
To begin, look at the zero-input solution
dx(t)
dt =A x(t).
Taking unilateral Laplace transforms gives,
sx(s)x(0) = A x(s) where x(0) = x(t) at t= 0.
This gives,
(sI A)x(s) = x(0),or x(s) = (sI A)1x(0).
Taking an inverse Laplace transform gives,
x(t) = L1(sI A)1x(0) = Φ(t)x(0).
Φ(t), is also known as the “State Transition Matrix”.
Roy Smith: ECE 147b 9: 1
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Solving State-Space Differential Equations: Laplace Approach and Matrix Exponentials and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

State-space systems

Solving the state-space differential equation (Laplace approach)

Now consider the case where there is an input.

dx(t)

dt

= A x(t) + B u(t).

Taking Laplace transforms gives,

sx(s) − x(0) = A x(s) + B u(s),

which means that,

x(s) = (sI − A)

− 1 x(0) + (sI − A)

− 1 B u(s).

Now the inverse Laplace gives (recall that Φ(t) is defined as L−^1

(sI − A)−^1

x(t) = Φ(t) x(0) ︸ ︷︷ ︸

∫ (^) t

0

Φ(t − τ )Bu(τ ) dτ.

︸ ︷︷ ︸

zero-input solution convolution of Φ(t) and B u(t)

We can also use this equation for an arbitrary initial time,

x(t) = Φ(t − t 0 ) x(t 0 ) +

∫ (^) t

t 0

Φ(t − τ ) B u(τ ) dτ.

State-space systems

Solving the state-space differential equation (Laplace approach)

Consider a continuous time state-space representation.

dx(t)

dt

= A x(t) + B u(t),

y(t) = C x(t) + D u(t).

To begin, look at the zero-input solution

dx(t)

dt

= A x(t).

Taking unilateral Laplace transforms gives,

sx(s) − x(0) = A x(s) where x(0) = x(t) at t = 0.

This gives,

(sI − A)x(s) = x(0), or x(s) = (sI − A)

− 1 x(0).

Taking an inverse Laplace transform gives,

x(t) = L−^1

(sI − A)−^1

x(0) = Φ(t)x(0).

Φ(t), is also known as the “State Transition Matrix”.

Roy Smith: ECE 147b 9 : 1

State-space systems

Example (continued)

Now look at the State Transition Matrix,

Φ(t) = L

− 1

(sI − A)

− 1

= L

− 1

s + α

= e

−αt (this looks just like the impulse reponse)

So we can calculate ,

x(t) = e

−αt x(0) +

∫ (^) t

0

e

−α(t−τ ) α u(τ ) dτ.

Step response: Zero initial condition (x(0) = 0).

As u(t) = 1 for t ≥ 0,

y(t) = x(t) = e

−αt 0 +

∫ (^) t

0

e

−α(t−τ ) α dτ, = e

−αt

∫ (^) t

0

e

ατ α dτ,

= e

−αt [e

ατ |τ =t −e

ατ |τ =0] = e

−αt ( e

αt − 1

= 1 − e

−αt .

State-space systems

A simple example: A first order system (α > 0).

α

s + α

 

y(s) u(s)

Take the initial conditions to be zero. The differential equation is,

dy(t)

dt

  • α y(t) = α u(t).

Define the state as, x(t) = y(t), then,

dx(t)

dt

= −α x(t) + αu(t),

y(t) = x(t)

or

dx(t)

dt

[

−α

]

x(t) +

[

α

]

u(t),

y(t) =

[

]

x(t) +

[

]

u(t).

So the state-space representation is: A = −α, B = α, C = 1 and D = 0.

Roy Smith: ECE 147b 9 : 3

Solving state-space differential equations

Matrix exponential approach to solving state-space differential equations.

We can begin by “guessing” a solution of the form,

x(t) = e

At v(t), where v(t) is a time-varying vector.

Differentiate this to get,

dx(t)

dt

= Ae

At v(t) + e

At dv(t) dt = A x(t) + B u(t). (from the differential equation)

= Ae

At v(t) + B u(t) (by substituting for x(t))

and by equating the first & third lines,

e

At dv(t) dt

= B u(t)

dv(t)

dt

= e

−At Bu(t).

Solve this by integrating to get:

v(t) − v(0) =

∫ (^) t

0

e

−Aτ Bu(τ ) dτ.

Matrix exponentials

We can keep differentiating, substituting t = t 0 , and solving for the vi terms.

This eventually gives,

x(t) = x(t 0 ) + A(t − t 0 ) x(t 0 ) +

A^2 2 (t^ −^ t^0 )

2 x(t 0 ) +

A^3 3! (t^ −^ t^0 )

3 x(t 0 ) + · · ·

[

I + A(t − t 0 ) +

A^2

(t − t 0 )

2

A^3

(t − t 0 )

3

  • · · ·

]

x(t 0 ).

define this as e

A(t−t 0 )

If t 0 = 0 (as is usually the case) we have,

x(t) = eAt^ x(0) and so Φ(t) = eAt.

In Matlab the command expm calculates the matrix exponential.

Caveat emptor. This is not the same as the exponential of the individual elements of a

matrix (which is calculated by the Matlab command: exp).

Properties:

e

A× 0 = I, e

A(s+t) = e

As e

At , e

−At e

At = I,

d eAt

dt

= Ae

At .

Roy Smith: ECE 147b 9 : 7

State transition matrix

Example:

P (s) =

(s − 1)

(s + 1)(s + 2)

This system has a state-space representation:

A =

[

]

, B =

[

]

, C =

[

]

, D = 0.

The state transition matrix is Φ(t) = eAt^ = L−^1

(sI − A)−^1

In this example:

e

At = L

− 1

{([

s 0

0 s

]

[

])− 1 }

= L

− 1

{[

s + 3 2

− 1 s

]− 1 }

= L

− 1

s(s + 3) + 2

[

s − 2

1 s + 3

]}

= L

− 1

s + 2

s + 1

s + 2

s + 1

s + 2

s + 1

s + 2

s + 1

2e−^2 t^ − e−t^ 2e−^2 t^ − 2e−t

−e

− 2 t

  • e

−t −e

− 2 t

  • 2e

−t

Solving state-space differential equations

From before,

v(t) − v(0) =

∫ (^) t

0

e

−Aτ Bu(τ ) dτ.

but,

x(t) = e

At v(t) so v(t) = e

−At x(t) and v(0) = x(0).

Substituting these gives,

e

−At x(t) − x(0) =

∫ (^) t

0

e

−Aτ Bu(τ ) dτ.

or,

x(t) = e

At x(0) + e

At

∫ (^) t

0

e

−Aτ Bu(τ ) dτ,

= e

At x(0) +

∫ (^) t

0

e

A(t−τ ) Bu(τ ) dτ,

This is exactly the same solution as before where Φ(t) = eAt.

Roy Smith: ECE 147b 9 : 9

Poles and zeros

Poles and zeros

If a system, P (s), has a pole at s = pi, then its partial fraction expansion is,

P (s) =

a(s)

b(s)

(s − z 1 )... (s − zm)

(s − p 1 )... (s − pi)... (s − pn)

E 1

(s − p 1 )

Ei

(s − pi)

En

(s − pn)

For the moment assume that pi is not repeated.

The impulse response will be of the form,

p(t) = E 1 e

p 1 t

  • · · · + Eie

pit

  • · · · + Ene

pnt .

The zero-input solutions of the corresponding differential equation will have terms of the

form,

y(t) = kie

pit +...

Look at this idea from a state-space point of view.

Transfer functions

Example: (revisted)

P (s) =

(s − 1)

(s + 1)(s + 2)

This system has a state-space representation:

A =

[

]

, B =

[

]

, C =

[

]

, D = 0.

From before we have,

(sI − A)

− 1

s(s + 3) + 2

[

s − 2

1 s + 3

]

so,

C(sI − A)

− 1 B + D =

s(s + 3) + 2

[

]

[

s − 2

1 s + 3

] [

]

s(s + 3) + 2

[

]

[

s

1

]

s − 1

s^2 + 3s + 2

Roy Smith: ECE 147b 9 : 13

Poles and zeros

Example: (yet again)

P (s) =

(s − 1)

(s + 1)(s + 2)

This system has a state-space representation:

A =

[

]

, B =

[

]

, C =

[

]

, D = 0.

We will sometimes abbreviate this to,

P (s) =

 (^). Note that the dimensions always make this possible.

Eigenvalue equation:

The eigenvalues of A satisfy,

det(λI − A) = 0.

But here we see that this is simply the roots of the denominator,

det

[

λ + 3 2

− 1 λ

]

= λ(λ + 3) + 2 = λ

2

  • 3λ + 2 = (λ + 1)(λ + 2) = 0.

Poles and zeros

State-space point of view:

Consider the zero-input case,

dx(t)

dt

= A x(t), and look at solutions of the form,

x(t) = e

pit x(0).

Differentiating this gives,

dx(t)

dt

= pie

pit x 0 = pi x(t).

As

dx(t)

dt

= A x(t), we have,

A x(t) = pix(t),

and taking t = 0 gives,

A x(0) = pi x(0) ←− This is an eigenvalue equation.

The eigenvalues of A are the poles of P (s).

The poles (eigenvalues) are also called “natural frequencies” or “modes” of P (s).

Roy Smith: ECE 147b 9 : 15

Poles and zeros

Zeros

If P (s) =

y(s)

u(s)

has a zero at s = s 0 , then for all inputs u(s 0 ) the output y(s 0 ) = 0.

This is equivalent to,

0 = C(s 0 I − A)

− 1 B + D

Using a state-space Laplace domain form (at s = s 0 ) we have,

s 0 x(s 0 ) = A x(s 0 ) + B u(s 0 )

0 = C x(s 0 ) + D u(s 0 )

This can be rearranged into matrix form,

[ (s 0 I − A) −B

C D

] [

x(s 0 )

u(s 0 )

]

This means that the matrix,

[ (s 0 I − A) −B

C D

]

is singular, or equivalently det

[

(s 0 I − A) −B

C D

]

Similarity transforms

Similarity transforms

Any invertible n × n matrix, V , can be used to transform a matrix,

Aˆ = V A V −^1.

The matrix, Aˆ is “similar” to (has the same eigenvalues as) A.

This is called a “similarity transform”.

Similarity transformed state-space representations

By defining a new state, ξ(t) = V −^1 x(t),

[ A B

C D

]

[

V

− 1 AV V

− 1 B

CV D

]

So there are obviously an infinite number of equivalent state-space representations.

Exercises:

  1. Show that the eigenvalues of A are unchanged by a similarity transform.
  2. Show that the transfer function is unchanged by a similarity transform of A.

Roy Smith: ECE 147b 9 : 19

Poles and zeros

Summary: Continuous time

Poles are given by: det(sI − A) = 0

Zeros are given by: det

[

(sI − A) −B

C D

]

Summary: Discrete time

Poles are given by: det(zI − A) = 0

Zeros are given by: det

[

(zI − A) −B

C D

]