Professional Documents
Culture Documents
Learning objectives
Given state-space description of a dynamic system, initial states and input sequences (if
applicable) we will learn different solutions method to obtain the system’s state / output
response in continuous and discrete time.
No. Topic
1 Introduction (admin, system classes, motivating example)
2 Linear algebra basics
3 Response of linear systems incl. discrete-time representations
4 Laplace and z-transforms (complex frequency domain)
5 Frequency response
6 Stability
7 Controllability and observability
8 State transformation and realizations
9 State feedback and state observers
where A(t) : Rn → Rn is the dynamic matrix, r(t) ∈ Rn is the system input and x(t) ∈ Rn is
the system state.
I For specified initial conditions x(t0 ) = x0 , these systems possess unique solutions for
every (t0 , x0 ).
I The solutions depend continuously on the initial conditions.
Oliver Wallscheid AST Topic 03 4
Solution space
Ψ0 = ΨP . (3.4)
Oliver Wallscheid AST Topic 03 5
Solution space example
Consider the homogenous ODE
I The state transition matrix is uniquely determined by A(t) and independent of the
particular choice of Ψ(t).
I Proof: Applying (3.4) for any arbitrary, constant non-singular matrix P it directly follows
The question that remains is how to find the state transition matrix?!
1 For LTI systems we can utilize a multitude of solution approaches (next section).
2 For linear time-variant (LTV) systems there is no general, closed-form solution.
However, we can try to find (or approximate) Φ(t, t0 ) also for the LTV case:
I We can superpose n solutions of ψ̇ = A(t)ψ for initial conditions
1 0 0
0 1 0
ψ1 (t0 ) = . , ψ2 (t0 ) = . , ··· ψn (t0 ) = . , (3.10)
.. .. ..
0 0 1
obtaining the fundamental matrix Ψ = ψ1 · · · ψn .By utilizing (3.5) we can find
Φ(t, t0 ) = Ψ(t)Ψ−1 (t0 ) for any t, t0 , ∈ J.
Oliver Wallscheid AST Topic 03 10
State transition matrix for time-variant systems (2)
I By direct insertion it becomes clear that the above series satisfies (3.6).
I A closed-form solution of (3.11) is only available for some special system classes.
I The homogeneous solution xh is the solution to (3.1) with specified initial conditions.
For nonzero initial conditions but zero forcing term r(t) = 0, the solution of (3.2)
reduces to x = xh (zero input response).
I The particular solution xp is due to the forcing term r(t). For zero initial conditions
x0 = 0, the solution of (3.2) reduces to x = xp (zero state response).
I For given initial conditions x0 and given forcing term, the behavior of (3.2) is summarized
by x and is known for all t. This is why we call x the state of (3.1) at time t.
I A formal proof (3.12) solves the nonhomogeneous system ODE will be given later.
Oliver Wallscheid AST Topic 03 12
Table of contents
Proof that the above proposal is a fundamental matrix (i.e., it solves the autonom. LTI ODE):
∞ ∞ k
d X ktk−1 X t k+1
I exp(At) = Ak = A = A exp(At) (i.e., satisfies Ψ̇ = AΨ).
dt k(k − 1)! k!
k=1 k=0
I det(exp(At)|t=0 ) = det(I) = 1 6= 0.
Oliver Wallscheid AST Topic 03 14
Determining exp(At): similarity transform method
The above system matrix has the eigenvalues λ1,2 = {1, 3} as well as the corresponding
T T
eigenvectors u1 = 1 −1 and u2 = 1 1 . Using (3.14) and (3.15) we can find the
transition matrix
1 1 et−t0
t−t
e 0 + e3(t−t0 ) −et−t0 + e3(t−t0 ) 1
0 1 −1 1
Φ(t, t0 ) = = .
−1 1 0 e3(t−t0 ) 1 1 2 −et−t0 + e3(t−t0 ) et−t0 + e3(t−t0 ) 2
T
Assuming x0 (t0 = 0) = 1 1 , we obtain the ODE solution
3t
1 e
x(t) = Φ(t, t0 = 0) = 3t .
1 e
Likewise we might calculate (3.14) for non-nilpotent matrices by considering only a certain
order of the matrix exponential if the elements in exp(At) converge to sufficiently small values.
Oliver Wallscheid AST Topic 03 17
Modes
Let’s assume that A is orthogonally diagonalizable (e.g., if it is real symmetric). We have
already seen that, since A = P ΛP −1 ,
exp(At) = P exp(Λt)P −1 .
This can also be written as a sum of n modes
n
X
exp(At) = pi p̃i eλi t (3.16)
i=1
where pi is the i-th column of P (the i-th eigenvector) and p̃i is the i-th row of P −1 .
I Each term in the sum (3.16) is called a mode of the system ẋ = Ax.
I In general, the solution x(t) contains contributions of all modes.
I However, if we choose the initial value x(0) = αpi , then the corresponding mode eλi t is
the only mode in the solution
x(t) = exp(At)x(0) = αpi eλi t . (3.17)
This follows from p̃i pi = 1 and p̃j pi = 0 for i 6= j.
Oliver Wallscheid AST Topic 03 18
Example
The eigenvalues of
−1 1
A=
0 1
are λ1,2 = {−1, 1}. Hence, the matrix is diagonalizable using its eigenvectors
1 1 −1 p̃1 1 −1/2
P = u1 u2 = p1 p2 = , P = = .
0 2 p̃2 0 1/2
Applying (3.16), the transition matrix is
At λ1 t λ2 t 1 −1/2 −t 0 1/2
Φ(t, t0 = 0) = e = p1 p̃1 e + p2 p̃2 e = e + et .
0 0 0 1
T
If the initial value is of the form x0 = α 0 , we receive the system response
T
x(t) = α 0 e−t ,
i.e., only the mode corresponding to λ1 is present while the mode of λ2 is suppressed.
Oliver Wallscheid AST Topic 03 19
Determining exp(At): similarity transform method for Jordan matrices (1)
If A is non-diagonalizable, we can still perform a similarity transform into the Jordan
canoncial form
J0 0
J1
J = P −1 AP = (3.18)
..
.
0 Js
where J0 is a diagonal matrix with elements λ1 , . . . , λk and each Ji , i ≥ 1 is a matrix of the
form
λk+i 1 0 ··· 0
0
λk+i 1 · · · 0
.. .. .. .. ..
Ji = .
. . . .
. (3.19)
.
· · · ..
0 0 1
0 0 0 · · · λk+1
I The Vandermonde matrix V is invertible if and only if all λi eigenvalues are distinct.
I If that applies, we can solve (3.24) for the unknown coefficients αi (t) by matrix inversion:
−1 λ t
1 λ1 · · · λn−1
α0 (t) 1 e 1
α1 (t) 1 λ2 · · · λn−1 eλ2 t
2
= .. .. .. .. . (3.25)
.. ..
. . . . . .
αn−1 (t) 1 λn · · · λn−1
n eλn t
Oliver Wallscheid AST Topic 03 23
Determining exp(At): Cayley-Hamilton theorem method (3)
Then we can insert the known coefficients αi (t) from (3.25) into (3.22) and obtain
exp(At) = α0 (t)I + α1 (t)A + · · · + αn−1 (t)An−1 . (3.26)
Example: The system
0 1
ẋ(t) = Ax(t), A=
−1 0
has a characteristic equation of the form λ2 + 1 = 0 leading to the complex eigenvalue pair
λ1,2 = ±j. Applying (3.23) delivers the equation system
ejt = cos(t) + j sin(t) = α0 + α1 j
e−jt = cos(t) − j sin(t) = α0 − α1 j
revealing α0 (t) = cos(t) and α1 (t) = sin(t). The transition matrix an be found by (3.26):
At cos(t) sin(t)
Φ(t, t0 = 0) = e = cos(t)I + sin(t)A = .
− sin(t) cos(t)
Oliver Wallscheid AST Topic 03 24
Determining exp(At): Cayley-Hamilton theorem method (4)
I Problem: if any eigenvalue λi has analgebraic multiplicity µi ≥ 2 (i.e., non-distinct
eigenvalues), the Vandermonde matrix V becomes singular and we cannot use (3.25).
I Solution: produce µi − 1 additional independent equations by taking the derivative of
f (λi ) = eλi t w.r.t. λi :
f (λi ) = eλi t = α0 + α1 λi + · · · + αn−1 λn−1 ,
df (λi ) deλi t
= = teλi t = α1 + 2α2 λi + · · · + (n − 1)αn−1 λn−2 ,
dλi dλi
..
.
dµi −1 f (λi ) dµi −1 eλi t
µ −1
= µi −1 = tµi −1 eλi t = (µi − 1)!αµi −1 + · · · + (n − µi ) · · · (n − 2)(n − 1)αn−1 λn−1−µi .
d i λi d λi
(3.27)
I The produced equations replace the rows in (3.24) associated with the repeating
eigenvalue.
Oliver Wallscheid AST Topic 03 25
Determining exp(At): Cayley-Hamilton theorem method (5)
Example (with a repeating eigenvalue): Consider the system
0 0 −2
ẋ(t) = Ax(t), A = 0 1 0
1 0 −3
with the eigenvalues λ1 = 2 and λ2,3 = 1. Our general ansatz is then
eλi t = α0 (t) + α1 (t)λi + α2 (t)λ2i .
Inserting the non-repeating eigenvalues we obtain two out of three necessary equations
et = α0 (t) + α1 (t) + α2 (t),
e2t = α0 (t) + 2α1 (t) + 4α2 (t).
For the repeated eigenvalue λ2,3 = 1 we differentiate our ansatz equation w.r.t. λi receiving
teλi t = α1 (t) + 2α2 (t)λi .
Oliver Wallscheid AST Topic 03 26
Determining exp(At): Cayley-Hamilton theorem method (6)
Inserting λ3 = 1 we get our third independent equation
tet = α1 (t) + 2α2 (t).
The overall equation system yields
t
e 1 1 1 α0 (t)
tet = 0 1 2 α1 (t) .
e2t 1 2 4 α2 (t)
By matrix inversion we receive
α0 (t) = −2tet + e2t , α1 (t) = (2 + 3t)et − 2e2t , α2 (t) = −(t + 1)et + e2t .
The resulting transition matrix is
(2 − et )et 0 (−12t + 10et − 10)et
The proof for the homogenous solution (r(t) = 0) with xh (t) = Φ(t, t0 ) = exp[A(t − t0 )]x0
is straightforward:
X ktk−1 ∞ X tk ∞
d d !
xh (t) = exp(At)x0 = Ak x0 = Ak+1 x0 = A exp(At)x0 = Axh (t).
dt dt k(k − 1)! k!
k=1 k=0
For the particular solution we make use variation of parameters approach with the ansatz:
and, therefore,
Z t
ṗ(t) = exp(−At)r(t) ⇔ p(t) = exp(−Aτ )r(τ ) dτ + p(t0 ) (3.30)
t0
with (exp(At))−1 = exp(−At). Moreover, we set p(t0 ) = 0 since the initial condition is
already considered in xh (t). Hence, the particular solution is
Z t Z t
xp (t) = exp(At)p(t) = exp(A(t − τ ))r(τ ) dτ = Φ(t, τ )r(τ ) dτ. (3.31)
t0 t0
Hence, we could show that x(t) = xh (t) + xp (t) is a solution of ẋ(t) = A(t)x(t) + r(t).
Oliver Wallscheid AST Topic 03 30
Response of linear continuous-time systems (3)
To solve the state equation ẋ(t) = Ax(t) + Bu(t), we note that r(t) = Bu(t), thus
Z t
x(t, t0 , x0 ) = Φ(t, t0 )x0 + Φ(t, τ )Bu(τ ) dτ. (3.32)
t0
Here, the input matrix B represents the actuator structure, i.e., there might be certain
limitations on how u(t) can act upon the system states. To solve the output equation
y(t) = Cx(t) + Du(t), we substitute the solution for x and obtain:
Total response
Z t
y(t) = CΦ(t, t0 )x0 + C Φ(t, τ )Bu(τ ) dτ + Du(t). (3.33)
| {z } t0
zero-input response/
| {z }
zero-state response/forced response
natural response
Interpretation of H(t)
The elements hij (t) of H(t) can be considered as some dynamic input-to-output sensitivity:
how dependent output i is, on what input j was, t seconds ago. In the above example, this
sensitivity is constant over time (special case).
Oliver Wallscheid AST Topic 03 36
Table of contents
Control algorithm
Discrete time
Continuous time
Fig. 3.2: A continuous-time system within a discrete-time control framework
Note: The discrete-time system matrices {A[k], B[k]} are not just their continuous-time
counter parts inserting another counting variable. The transformation between the time
domains is explained in the upcoming slides.
Oliver Wallscheid AST Topic 03 39
Solution of the homogeneous difference equation
(−1)k−k0 1 − (−1)k−k0
Φ[k, k0 ] = ,
0 1
i.e.,
Φ[k, k0 ] = A if (k − k0 ) is odd, Φ[k, k0 ] = I if (k − k0 ) is even.
T
Consider the initial state x[k0 = 0] = 2 1 , then the system response is
T T
x[k] = 0 1 for k = 1, 3, 5, . . . x[k] = 2 1 for k = 2, 4, 6, . . .
with σ[k] being the discrete-time unit step. With a given initial state x[0] we can calculate the
natural response. According to (3.52) the impulse response matrix is
0, k ≤ 0,
" #" #
H[k] = h i δ[k − 1] (−1)k−2 σ[k − 2] 0
H[k] = 1 0
= (−1)k−2 σ[k − 2], k ≥ 1.
0 (−1)k−1 σ[k − 1] 1
We can just compare the system responses in both time domains: for given time points
tk = Ts k (Ts : sampling interval) the state transition matrices for both continuous-time and
discrete-time must be equal for an exact system representation:
!
Φ(tk ) = eAtk = eATs k = Akd = Φd [k]. (3.55)
Ad = eATs . (3.56)
Assuming ideal zero-order hold, i.e., u(t) is constant during two sampling steps {k, k + 1} we
can simplify to
Z tk =Ts k k−1
! (k−1)−j
X
Aτ
e B dτ = Ad Bd . (3.58)
0 j=0
The above equation must hold true for any k, hence we can set k = 1 and we find an exact
mapping of the discrete-time input matrix:
Z Ts Z Ts
Aτ !
e B dτ = Φ(τ )dτ B = IBd = Bd . (3.59)
0 0
Ad ≈ I + Ts A, Bd ≈ Ts B. (3.62)
Oliver Wallscheid AST Topic 03 49
Example (1)
Consider the continuous-time system
0 −1 0
ẋ(t) = 1 x(t) + u(t) with C = I, D = 0.
/2 −1 1
The characteristic polynomial is
1
det(A − Iλ) = λ2 + λ +
2
resulting in the complex eigenvalue pair λ1,2 = −0.5 ± j0.5. To investigate the zero-input
response we apply Cayley-Hamilton (3.24) to find the continuous-time transition matrix:
λ1 − 12 t 1 1 ! 1 1
e =e cos( t) + j sin( t) = α0 (t) + α1 (t) − + j = α0 (t)λ01 + α1 (t)λ1 ,
2 2 2 2
λ2 − 12 t 1 1 ! 1 1
e =e cos( t) − j sin( t) = α0 (t) + α1 (t) − − j = α0 (t)λ02 + α1 (t)λ2 .
2 2 2 2
Oliver Wallscheid AST Topic 03 50
Example (2)
From the previous equation system we can find
− 12 t 1 1 1 1
α0 (t) = e cos( t) + sin( t) , α1 (t) = e− 2 t sin( t)
2 2 2
From (3.56) follows the discrete-time system and corresponding transition matrices
1 1
e− 2 Ts cos( 21 Ts ) + sin( 12 Ts ) −2e− 2 Ts sin( 12 Ts )
k
Ad = , Φd [k] = Ad .
− 12 Ts 1 − 12 Ts 1 1
e sin( 2 Ts ) e cos( 2 Ts ) − sin( 2 Ts )
For comparison reasons the simplified Euler approximation using (3.62) is also considered:
1 −Ts
Ad ≈ Ãd = I + Ts A = Ts , Φ̃d [k] = Ãkd .
2 1 − Ts
0.5
0
0 1 2 3 4 5 6 7 8 9 10
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
T
Fig. 3.3: Zero-input system response for different solution approaches (x0 = 1 0 )
Oliver Wallscheid AST Topic 03 53
Example (5)
Additionally, the system response to a unit step u(t) = σ(t) should be investigated. From
(3.33) we can calculate the forced response:
Z t
xp (t) = Φ(τ )Bu(τ )dτ
0
" #
Z t e− 12 τ cos( 1 τ ) + sin( 1 τ ) −2e − 12 τ
sin( 1
τ ) 0
2 2 2
=
1 1
σ(τ )dτ
e− 2 τ sin( 21 τ ) e− 2 τ cos( 21 τ ) − sin( 12 τ ) 1
0
1
1
Z t −2e− 2 τ sin( 21 τ ) Z t 2e− 2 τ sin(− 12 τ )
=
1 dτ =
1 dτ.
0 e− 2 τ cos( 12 τ ) − sin( 12 τ ) 0 e− 2 τ cos(− 12 τ ) + sin(− 12 τ )
To solve the above integral we can make use of the following equations:
Z t x t Z t x t
x e x e
e sin(x)dx = (sin(x) − cos(x)) , e cos(x)dx = (cos(x) + sin(x)) .
0 2 0 0 2 0
Note: Instead of recalculating the above forced response series for each new k again and
again, we can calculate the discrete-time response directly using x[k + 1] = Ad x[k] + Bd u[k].
Oliver Wallscheid AST Topic 03 57
Example (9)
1
-1
-2
0 1 2 3 4 5 6 7 8 9 10
0.5
0
0 1 2 3 4 5 6 7 8 9 10
T
Fig. 3.4: Total system response for different solution approaches (x0 = 1 0 , u(t) = σ(t))
Oliver Wallscheid AST Topic 03 58
Important Matlab / GNU Octave commands
1 = =
sys = ss(A,B,C,D); % Creates a cont. time state space model
2 = =
sysd = ss(A,B,C,D,Ts); % Creates a discrete time state space model
3
4 sysd = c2d(sysc,Ts); % Converts model from continuous to discrete time
5 sysc = d2c(sysd); % Converts model from discrete to continuous time
6 =
sys1 = d2d(sys, Ts); % Resamples discrete time model
7
8 Y = expm(X); % Matrix exponential (both numeric & symbolic)
9
10 step(sys); % Step response plot of dynamic system
11 y = step(sys,t) % returns the step response data at times t
12 impulse(sys); % impulse response plot of dynamic system
13 y = impulse(sys,t); % returns the impulse response data at times t
14 lsim(sys,u,t); % Plot simulated time response with arbitrary input u
15 y = lsim(sys,u,t); % returns system response to arbitrary input u
Note that above commands are from Matlab; GNU Octave commands might slightly differ.
And some commands require special toolboxes (e.g., Control System Toolbox).
Oliver Wallscheid AST Topic 03 59
Summary: what you’ve learned in this section
I Due to the superposition principle of linear systems we can find the forced and natural
responses separately to finally obtain the total response.
I For linear time-variant (LTV) systems a general closed-form solution is not available.
Only for special cases we can find a direct response solution.
I In contrast, that is always possible for linear time-invariant (LTI) systems.
I The state transition matrix is of prime importance to calculate any natural and forced LTI
system response.
I It is defined via the matrix exponential which can be found using multiple approaches
(e.g., Cayley-Hamilton or similarity transforms).
I Same circumstances apply for LTI systems in discrete time, however, calculating their
response is much easier.
I By comparing the discrete and continuous-time responses we can find an exact
transformation between the two state-space representations.
Oliver Wallscheid AST Topic 03 60
End of this section