Introduction, LTI Systems - Representations and Solutions: Morten O. Alver (Based On Slides by Morten D. Pedersen)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 58

TTK4115

Lecture 1
Introduction, LTI systems - representations and solutions

Morten O. Alver (based on slides by Morten D. Pedersen)

TTK4115 (MOA) Lecture 1 1 / 58


This lecture

1. Motivation, Course goals

What will you learn?


7 main topics

2. LTI systems

State space models

Transfer functions

Solutions

Convolution

More connections

3. Summary

TTK4115 (MOA) Lecture 1 2 / 58


Topic

1. Motivation, Course goals

What will you learn?


7 main topics

2. LTI systems

State space models

Transfer functions

Solutions

Convolution

More connections

3. Summary

TTK4115 (MOA) Lecture 1 3 / 58


Motivation

Why linear systems?


Linear systems are easier to analyze, and allow a wide range of controller and estimator design
methods. Nonlinear systems can often be approximated by linear systems through linearization.

Why state space theory?


In the first course on control engineering, most of you have focused on frequency domain methods
and SISO-systems.
State space theory gives us:
A mathematical description which easily handles many physical models
An easier way to handle multiple-input multiple-output (MIMO) systems
A form that generalizes to nonlinear systems
A form suitable for many advanced control design and estimation methods

TTK4115 (MOA) Lecture 1 4 / 58


Example: Dynamic positioning system

Most of what you learn in this course is applied here!

TTK4115 (MOA) Lecture 1 5 / 58


Topic

1. Motivation, Course goals

What will you learn?


7 main topics

2. LTI systems

State space models

Transfer functions

Solutions

Convolution

More connections

3. Summary

TTK4115 (MOA) Lecture 1 6 / 58


What will you learn? 7 main topics

1. Solution of state equations


Consider the state equation
ẋ(t) = Ax(t) + Bu(t)
and the output equation
y(t) = Cx(t) + Du(t).
Given the initial condition x(t0 ) and the input u(t), t0 ≤ t ≤ t1 . What is x(t1 ) and y(t1 )?

Why?
Basic knowledge. Understand the structure of the solution.

TTK4115 (MOA) Lecture 1 7 / 58


What will you learn? 7 main topics

2. Stability
What happens if we change the initial conditions x(0) of ẋ(t) = Ax(t) slightly?
Given the model ŷ(s) = Ĝ(s)û(s): if our input signals are bounded, will the outputs be bounded?

Why?
Fundamental properties of a dynamic system.
Unstable systems are generally useless without feedback control.
Simpler to analyse stability than to solve the differential equations.
Extensions to nonlinear systems.

TTK4115 (MOA) Lecture 1 8 / 58


What will you learn? 7 main topics

3. Canonical forms of state equations


By a change of coordinates, transform from

ẋ(t) = Ax(t) + Bu(t)


y(t) = Cx(t) + Du(t)

to
˙
x̄(t) = Āx̄(t) + B̄u(t)
y(t) = C̄x̄(t) + D̄u(t)

where the new matrices Ā, B̄, C̄, D̄ have some desired properties, e.g. Ā being diagonal, or makes
the control design easier.

Why?
Basic knowledge. Understand your alternatives.

TTK4115 (MOA) Lecture 1 9 / 58


What will you learn? 7 main topics

4. Realizations
Given ŷ(s) = Ĝ(s)û(s). Find a state space model

ẋ(t) = Ax(t) + Bu(t)


y(t) = Cx(t) + Du(t)

Why?
Enables state space analysis.
Basis for implementing filters, controllers and estimators in software and analog hardware.

TTK4115 (MOA) Lecture 1 10 / 58


What will you learn? 7 main topics
5. Controllability, State Feedback, Linear Quadratic Regulator (LQR)
We want to use the feedback u(t) = −Kx(t). How do we choose K to get a desirable response?
When can we control a system to a desired state?

Controllability: Do we have the right actuators to control the system to the desired set-point?

Why?
Control design for MIMO systems.

TTK4115 (MOA) Lecture 1 11 / 58


What will you learn? 7 main topics
6. Representing random signals and systems
How to describe a stochastic/random signal u(t) in term of its statistical properties?

How to describe the response ŷ(s) = ĝ(s)û(s) when u(t) is a random input signal?

Why?
Most interesting real-world systems have disturbances/uncertainties.
Most measurements have some uncertainty/noise.
Analyse and minimize the effects of noise, disturbances and other uncertainty.

TTK4115 (MOA) Lecture 1 12 / 58


What will you learn? 7 main topics

7. Observability, state estimation, Kalman Filter


Assume the model

ẋ(t) = Ax(t) + Bu(t)


y(t) = Cx(t).

Given u(t), y(t) for any t0 ≤ t ≤ t1 . What is x(t0 )? What is x(t1 )?


Observability: Do we have the right measurements? What if our measurements are noisy? What if
estimated states are used for control feedback?

Why?
In real world applications we often cannot measure all states
Estimation allows us to compute what we cannot measure - combining sensors and model

TTK4115 (MOA) Lecture 1 13 / 58


Topic

1. Motivation, Course goals

What will you learn?


7 main topics

2. LTI systems

State space models

Transfer functions

Solutions

Convolution

More connections

3. Summary

TTK4115 (MOA) Lecture 1 14 / 58


Representations of linear systems

We will encounter three different representations of linear systems in this course. Our models will
appear as:

State-space models

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


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

Transfer functions
y(s) = G(s)u(s)

Input-output descriptions
Z t
y(t) = G(t, τ )u(τ )dτ
t0

TTK4115 (MOA) Lecture 1 15 / 58


Topic

1. Motivation, Course goals

What will you learn?


7 main topics

2. LTI systems

State space models

Transfer functions

Solutions

Convolution

More connections

3. Summary

TTK4115 (MOA) Lecture 1 16 / 58


LTI systems overview

ẋ(t) = Ax(t) + Bu(t)


y(t) = Cx(t) + Du(t)

State-space model
Most of our models will be put on the state space form.

TTK4115 (MOA) Lecture 1 17 / 58


System states

Definition of state
The state x(t0 ) of a system at a time t0 is the information at t0 that, together with the input u(t), for
t ≥ t0 , determines uniquely the output y(t) for all t ≥ t0 .

Explanation
We do not need u(t) for t < t0 to predict what will happen after t0 .
We do not need x(t) for t < t0 to predict what will happen after t0 .
The state acts as a memory of these!

Concise statement

x(t0 )
→ y(t), t ≥ t0
u(t), t > t0

TTK4115 (MOA) Lecture 1 18 / 58


Water heater

C◦

u(t) y(t)

Question
What could be the state of the system?

Hints
If we know how hot the water is now at t0 ....
... do we need to know the past temperatures to predict the future ones?

TTK4115 (MOA) Lecture 1 19 / 58


Pendulum

u(t) y(t)

Question
What could be the states of the system? How many are there?

Hints
Say that we know the position of the mass at t0 .
Since the mass may be moving vertically, we also need to know its speed at t0 .

TTK4115 (MOA) Lecture 1 20 / 58


Wave tank

u(t) y(t)

Question
What could be the states of the system? How many are there?

Answer
The height of the water surface varies with time and along the horizontal axis.
This is a distributed system (as opposed to lumped), it has infinitely many states!

TTK4115 (MOA) Lecture 1 21 / 58


About states
The choice of state variables is not unique
States do not have to be measurable
States do not have to be physical quantities
The states summarize the history of the system

TTK4115 (MOA) Lecture 1 22 / 58


Example: Mass spring damper
Second order dynamics:
mẍ(t) + d ẋ(t) + kx(t) = f (t)

k d
m

Input/Output: force and displacement


y(t) , x(t), u(t) , f (t)

States: displacement and velocity


x1 (t) , x(t), x2 (t) , ẋ(t)

TTK4115 (MOA) Lecture 1 23 / 58


Example: Mass spring damper
Second order dynamics:
mẍ(t) + d ẋ(t) + kx(t) = f (t)

Input/Output and states


y(t) , x(t), u(t) , f (t)
x1 (t) , x(t), x2 (t) , ẋ(t)

Array form
ẋ A x B
z }| { z
 }| { 
z }| { z }| {
ẋ1 0 1 x1 0
= + u
ẋ2 −(k/m) −(d/m) x2 1/m
 
  x1  
y= 1 0 + 0 u
| {z } x2 | {z }
C D
| {z }
x

TTK4115 (MOA) Lecture 1 24 / 58


Topic

1. Motivation, Course goals

What will you learn?


7 main topics

2. LTI systems

State space models

Transfer functions

Solutions

Convolution

More connections

3. Summary

TTK4115 (MOA) Lecture 1 25 / 58


LTI systems overview

L(. . .) x̂(s) = (sI − A)−1 [x0 + Bû(s)]


ŷ(s) = C(sI − A)−1 [x0 + Bû(s)] + Dû(s)

ẋ(t) = Ax(t) + Bu(t)


y(t) = Cx(t) + Du(t)

Laplace Transform
We can convert state space models (time domain) to the frequency domain with the Laplace
Transform.

Transfer functions
Transfer functions model the system in the frequency domain.

TTK4115 (MOA) Lecture 1 26 / 58


State-space model

ẋ(t) = Ax(t) + Bu(t)


y(t) = Cx(t) + Du(t)

Transform rule

x(t) ⇔ x̂(s)
ẋ(t) ⇔ sx̂(s) − x0

Applying the rule

sx̂(s) − x0 = Ax̂(s) + Bû(s)


(sI − A)x̂(s) = x0 + Bû(s)

Laplace Transform of the state space model

x̂(s) = (sI − A)−1 [x0 + Bû(s)]


ŷ(s) = C(sI − A)−1 [x0 + Bû(s)] + Dû(s)

TTK4115 (MOA) Lecture 1 27 / 58


Zero-state response, Zero-input response

Response
Zero-input Zero-state
z }| { zh }| i {
ŷ(s) = C(sI − A)−1 x0 + C(sI − A)−1 B + D û(s)

Transfer matrix
In many cases the zero-input response is uninteresting because:
1 The zero-input response dies away exponentially fast if the system is stable.
2 The plant is initialized at x0 = 0.
Then the we may focus on the input/output response:

ŷ(s) = Ĝ(s)û(s), Ĝ(s) = C(sI − A)−1 B + D


| {z }
transfer matrix

which is determined by the transfer matrix Ĝ(s).

TTK4115 (MOA) Lecture 1 28 / 58


Example: Mass spring damper in the Laplace domain

Model
ẋ A x B
z }| { z
 }| { 
z }| { z }| {
ẋ1 0 1 x1 0
= + u
ẋ2 −(k/m) −(d/m) x2 1/m
 
  x1  
y= 1 0 + 0 u
| {z } x2 | {z }
C D
| {z }
x

Transform
Using:
ŷ(s) = C(sI − A)−1 [x0 + Bû(s)] + Dû(s)
leads to:
   −1     
  s 0 0 1 x1 (0) 0
ŷ(s) = 1 0 − + û(s)
0 s −(k /m) −(d/m) x2 (0) 1/m

TTK4115 (MOA) Lecture 1 29 / 58


Example: Mass spring damper in the Laplace domain

Laplace model:
    −1     
  1 0 0 1 x1 (0) 0
ŷ(s) = 1 0 s − + û(s)
0 1 −(k/m) −(d/m) x2 (0) 1/m

Inversion:
    −1  
1 0 0 1 1 d + ms m
s − =
0 1 −(k/m) −(d/m) ms2 + sd + k −k ms

Result
 
1   x1 (0) 1
ŷ(s) = d + ms m + û(s)
ms2 + sd + k x2 (0) ms2 + sd + k
| {z } | {z }
Zero input response ĝ(s)

TTK4115 (MOA) Lecture 1 30 / 58


Topic

1. Motivation, Course goals

What will you learn?


7 main topics

2. LTI systems

State space models

Transfer functions

Solutions

Convolution

More connections

3. Summary

TTK4115 (MOA) Lecture 1 31 / 58


LTI systems overview

L(. . .) x̂(s) = (sI − A)−1 [x0 + Bû(s)]


ŷ(s) = C(sI − A)−1 [x0 + Bû(s)] + Dû(s)

ẋ(t) = Ax(t) + Bu(t)


y(t) = Cx(t) + Du(t)

LTI sol.

Rt
x(t) = eAt x0 + 0 eA(t−τ ) Bu(τ )dτ
Rt
y(t) = CeAt x0 + C 0 eA(t−τ ) Bu(τ )dτ + Du(t)

Solutions in time
We may need to know the behavior of the system in time. This requires a solution of the
differential state space model.

TTK4115 (MOA) Lecture 1 32 / 58


Solutions of LTI state equations

We want to solve:

ẋ(t) = Ax(t) + Bu(t)


y(t) = Cx(t) + Du(t)

Initial value problem


We wish to find y(t) given x0 = x(t0 ) and u(t).

TTK4115 (MOA) Lecture 1 33 / 58


First order homogenous case

Let’s try something simpler first:


ẋ(t) = ax(t), y (t) = cx(t)
No input, one state.

Step 1: Premultiply and reformulate


d −at
e−at ẋ(t) = e−at ax(t) ⇒ [e x(t)] = 0
dt

Step 2: Integrate
Z t d −aτ
[e x(τ )]dτ = e−at x(t) − e−a0 x(0) = 0
0 dτ | {z }
x(0)

Step 3: Recover solution


e−at x(t) = x0 ⇒ x(t) = x0 eat

TTK4115 (MOA) Lecture 1 34 / 58


First order homogenous case

Insertion of solution:

z }| { ax
d at
z }| {
[e x0 ] = aeat x0
dt

Check of the initial condition


x(0)
z }| {
eat x0 = x0

t=0

TTK4115 (MOA) Lecture 1 35 / 58


First order nonhomogenous case
Let’s try something harder:
ẋ(t) = ax(t) + bu(t), y(t) = cx(t) + du(t)
One input, one state.

Step 1: Premultiply and reformulate


d −at
e−at ẋ(t) = e−at ax(t) + e−at bu(t) ⇒ [e x(t)] = e−at bu(t)
dt

Step 2: Integrate
Z t d −aτ
Z t Z t
[e x(τ )]dτ = e−aτ bu(τ )dτ ⇒ e−at x(t) − e−a0 x(0) = e−aτ bu(τ )dτ
0 dτ 0 | {z } 0
x(0)

Step 3: Recover solution


Z t Z t
e−at x(t) = x0 + e−aτ bu(τ )dτ ⇒ x(t) = eat x0 + ea(t−τ ) bu(τ )dτ
0 0

TTK4115 (MOA) Lecture 1 36 / 58


Output response
Convolution integral
Free decay
z }| {
z }| { Z t
at a(t−τ )
y(t) = cx(t) + du(t) = ce x0 +c e bu(τ )dτ +du(t)
0

TTK4115 (MOA) Lecture 1 37 / 58


Convolution

Consider now the SISO system:

u(t) System y(t)

TTK4115 (MOA) Lecture 1 38 / 58


Convolution

Experiment 1
Jolt at t=0: u(t) = 1 × δ(t)

uHtL gHtL
2 2

1 1

t t
-1.0 -0.5 0.5 1.0 1.5 2.0 -1.0 -0.5 0.5 1.0 1.5 2.0
-1 -1

-2 -2

Impulse response
y(t) = g(t) is the system’s response to an impulse.

Causality
There is no response before the impulse.

TTK4115 (MOA) Lecture 1 39 / 58


Convolution
Experiment 2
Larger jolt: u(t) = 1.5 × δ(t)

uHtL yHtL
2 2

1 1

t t
-1.0 -0.5 0.5 1.0 1.5 2.0 -1.0 -0.5 0.5 1.0 1.5 2.0
-1 -1

-2 -2

Result
The response grows proportionally with the jolt magnitude.

Homogeneity
αu(t) → αy(t)

TTK4115 (MOA) Lecture 1 40 / 58


Convolution
Experiment 3
Jolt is shifted to t=1: u(t) = 1 × δ(t − 1)

uHtL yHtL
2 2

1 1

t t
-1.0 -0.5 0.5 1.0 1.5 2.0 -1.0 -0.5 0.5 1.0 1.5 2.0
-1 -1

-2 -2

Result
The response is the same, just shifted y(t) = g(t − 1)

Time invariance
u(t − T ) → y(t − T )

TTK4115 (MOA) Lecture 1 41 / 58


Convolution
Experiment 4
Two jolts are superposed: u(t) = 1 × δ(t) + 1 × δ(t − 1)

uHtL yHtL
2 2

1 1

t t
-1.0 -0.5 0.5 1.0 1.5 2.0 -1.0 -0.5 0.5 1.0 1.5 2.0
-1 -1

-2 -2

Result
The responses are superposed.

Additivity
u1 (t) + u2 (t) → y1 (t) + y2 (t)

TTK4115 (MOA) Lecture 1 42 / 58


Convolution
Experiment 5
Two jolts with different amplitudes are added: u(t) = 1.5 × δ(t) − 2 × δ(t − 1)

yHtL yHtL
2 2

1 1

t t
-1.0 -0.5 0.5 1.0 1.5 2.0 -1.0 -0.5 0.5 1.0 1.5 2.0
-1 -1

-2 -2

Result
We see that the responses have been added proportionally.

Superposition
α1 u1 (t) + α2 u2 (t) → α1 y1 (t) + α2 y2 (t)

TTK4115 (MOA) Lecture 1 43 / 58


Convolution

In mathematics
Z t
y(t) = g(t − τ )u(τ )dτ
0

The idea
Convolution is simply:
adding up all the impulse responses
shifted to the time when the input happened: τ
scaled proportionally with the input

Output response
Convolution integral
Free decay
z }| {
z }| { Z t
at a(t−τ )
y (t) = cx(t) + du(t) = ce x0 +c e bu(τ )dτ +du(t)
0
The output response of an LTI system is described in terms of convolution.

TTK4115 (MOA) Lecture 1 44 / 58


Solution of an LTI system

Let’s go for the whole thing:


ẋ(t) = Ax(t) + Bu(t), y(t) = Cx(t) + Du(t)
p inputs, n states, q outputs.

TTK4115 (MOA) Lecture 1 45 / 58


Step 1: Premultiply and reformulate
e−At ẋ(t) = e−At Ax(t) + e−At Bu(t)

Wait a minute!
What is e−At ?

The matrix exponential


A matrix analogue to the scalar exponential function
eAt is the most important function of the matrix A.

TTK4115 (MOA) Lecture 1 46 / 58


Analogy to eat
The ordinary exponential function is defined by series expansion:

(at)2 X (at)k
eat = 1 + at + + ··· =
2! k!
k =0

Series expansion
The matrix exponential is defined analogously:

t2 2 X tk
eAt = I + tA + A + ··· = Ak
2! k!
k=0

Computing eAt
We will learn how to compute the matrix exponential exactly next lesson.

TTK4115 (MOA) Lecture 1 47 / 58


Important properties of eAt
Properties

e0 = I
eA(t1 +t2 ) = eAt1 eAt2
h i−1
eAt = e−At

Warning
eAt eBt 6= e(A+B)t

Derivative of eAt

∞ k ∞
" #
d At d X t X t (k−1) k
[e ] = Ak = A
dt dt k! (k − 1)!
k =0 k =1
∞ k
X t
= Ak +1 = AeAt = eAt A
k!
k =0

TTK4115 (MOA) Lecture 1 48 / 58


Step 1: Premultiply and reformulate
d h −At i
e−At ẋ(t) = e−At Ax(t) + e−At Bu(t) ⇒ e x(t) = e−At Bu(t)
dt

Step 2: Integrate
Z t d h −Aτ i Z t Z t
e x(τ ) dτ = e−Aτ Bu(τ )dτ ⇒ e−At x(t) − e−A0 x(0) = e−Aτ Bu(τ )dτ
0 dτ 0 | {z } 0
x(0)

Step 3: Recover solution


Z t Z t
e−At x(t) = x0 + e−Aτ Bu(τ )dτ ⇒ x(t) = eAt x0 + eA(t−τ ) Bu(τ )dτ
0 0

TTK4115 (MOA) Lecture 1 49 / 58


Output response
Zero-state
Zero-inputz }| {
z }| { Z t
y(t) = CeAt x0 + C eA(t−τ ) Bu(τ )dτ + Du(t)
0

Impulse response matrix


G(t − τ ) = CeA(t−τ ) B + Dδ(t − τ )

TTK4115 (MOA) Lecture 1 50 / 58


Example: Mass spring damper solution

Definitions
We redefine the constants for simplicity:

k/m = ω02 , d =0

Model
ẋ A x B
z }| { z
 }| { z }| { z }| {
ẋ1 0 1 x1 0
= + u
ẋ2 −ω02 0 x2 1/m
 
  x1  
y= 1 0 + 0 u
| {z } x2 | {z }
C D
| {z }
x

TTK4115 (MOA) Lecture 1 51 / 58


Example: Mass spring damper solution

Response
Z t
y(t) = CeAt x0 + C eA(t−τ ) Bu(τ )dτ + Du(t)
0

F.y.i.
" #
sin(tω0 )
cos(tω0 )
eAt = ω0
−ω0 sin(tω0 ) cos(tω0 )

Response
h i  x (0)  Z t sin[(t − τ )ω ]
sin(tω0 ) 1 0
y (t) = cos(tω0 ) ω0
+ u(τ )dτ
x2 (0) 0 mω0
| {z } | {z }
Zero input response g(t−τ )

TTK4115 (MOA) Lecture 1 52 / 58


Topic

1. Motivation, Course goals

What will you learn?


7 main topics

2. LTI systems

State space models

Transfer functions

Solutions

Convolution

More connections

3. Summary

TTK4115 (MOA) Lecture 1 53 / 58


LTI systems overview

L(. . .) x̂(s) = (sI − A)−1 [x0 + Bû(s)]


ŷ(s) = C(sI − A)−1 [x0 + Bû(s)] + Dû(s)

ẋ(t) = Ax(t) + Bu(t)


y(t) = Cx(t) + Du(t) L−1 (. . .)

LTI sol.

Rt
x(t) = eAt x0 + 0 eA(t−τ ) Bu(τ )dτ
Rt
y(t) = CeAt x0 + C 0 eA(t−τ ) Bu(τ )dτ + Du(t)

Inverse Laplace transform


The inverse Laplace transform gives us another route to the solution.

TTK4115 (MOA) Lecture 1 54 / 58


Frequency domain model
y(s) = C(sI − A)−1 [x0 + Bu(s)] + Du(s)

Important relations

L−1 [(sI − A)−1 ] = eAt


Z t
L−1 [f (s)g(s)] = f (t − τ )g(τ )dτ
0

Inverse Laplace Transform


y(t) = L−1 [y(s)] = L−1 [C(sI − A)−1 [x0 + Bu(s)] + Du(s)]

y(t) = L−1 [C(sI − A)−1 x0 ] + L−1 [C(sI − A)−1 Bu(s)] + L−1 [Du(s)]
| {z } | {z } | {z }
Rt
CeAt x0 0 CeA(t−τ ) Bu(τ )dτ Du(t)

TTK4115 (MOA) Lecture 1 55 / 58


LTI systems overview

L(. . .) x(s) = (sI − A)−1 [x0 + Bu(s)]


y(s) = C(sI − A)−1 [x0 + Bu(s)] + Du(s)

ẋ(t) = Ax(t) + Bu(t)


y(t) = Cx(t) + Du(t) L−1 (. . .) L(. . .)

LTI sol.

Rt
x(t) = eAt x0 + 0 eA(t−τ ) Bu(τ )dτ
Rt
y(t) = CeAt x0 + C 0 eA(t−τ ) Bu(τ )dτ + Du(t)

Laplace transform
It is also possible to reverse the procedure.

TTK4115 (MOA) Lecture 1 56 / 58


Topic

1. Motivation, Course goals

What will you learn?


7 main topics

2. LTI systems

State space models

Transfer functions

Solutions

Convolution

More connections

3. Summary

TTK4115 (MOA) Lecture 1 57 / 58


LTI systems overview

L(. . .) x̂(s) = (sI − A)−1 [x0 + Bû(s)]


ŷ(s) = C(sI − A)−1 [x0 + Bû(s)] + Dû(s)

ẋ(t) = Ax(t) + Bu(t)


y(t) = Cx(t) + Du(t) L−1 (. . .) L(. . .)

LTI sol.

Rt
x(t) = eAt x0 + 0 eA(t−τ ) Bu(τ )dτ
Rt
y(t) = CeAt x0 + C 0 eA(t−τ ) Bu(τ )dτ + Du(t)

Lumped LTI systems


We have seen the different flavors of Lumped LTI systems and how to convert one representation
to another.

TTK4115 (MOA) Lecture 1 58 / 58

You might also like