MSc in Computer Engineering, Cybersecurity and Artificial - - PowerPoint PPT Presentation

msc in computer engineering cybersecurity and artificial
SMART_READER_LITE
LIVE PREVIEW

MSc in Computer Engineering, Cybersecurity and Artificial - - PowerPoint PPT Presentation

MSc in Computer Engineering, Cybersecurity and Artificial Intelligence, Fault Diagnosis and Estimation in Dynamical Systems (FDE), a.a. 2019/2020, Lecture 3 Analysis of continuous-time linear dynamical systems in the state space Prof. Mauro


slide-1
SLIDE 1

MSc in Computer Engineering, Cybersecurity and Artificial Intelligence, Fault Diagnosis and Estimation in Dynamical Systems (FDE), a.a. 2019/2020, Lecture 3 Analysis of continuous-time linear dynamical systems in the state space

  • Prof. Mauro Franceschelli
  • Dept. of Electrical and Electronic Engineering

University of Cagliari, Italy

Monday, 23rd March 2020

1 / 29

slide-2
SLIDE 2

Outline

Introduction The state transition matrix The Lagrange formula

2 / 29

slide-3
SLIDE 3

State variable model

A linear dynamical system, stationary of order n, with r inputs and p

  • utputs, has the following standard representation (or realization) as a

state variable model (SV):

  • ˙

①(t) = ❆①(t) + ❇✉(t) ②(t) = ❈①(t) + ❉✉(t) with ①(t) =      x1(t) x2(t) . . . xn(t)      ; ˙ ①(t) =      ˙ x1(t) ˙ x2(t) . . . ˙ xn(t)      ; ✉(t) =      u1(t) u2(t) . . . ur(t)      ; ②(t) =      y1(t) y2(t) . . . yp(t)     

3 / 29

slide-4
SLIDE 4

Analysis of a linear stationary SV model

Our objective is to determine the evolution of the state variables ①(t) and the output ②(t) for t ≥ t0 given: the value of the initial state ①(t0); the evolution of the inputs ✉(t) per t ≥ t0. Also in this case we separate the natural evolution from the forced evolution: ①(t) = ①ℓ(t) + ①f (t) ②(t) = ② ℓ(t) + ② f (t)

4 / 29

slide-5
SLIDE 5

Outline

Introduction The state transition matrix The Lagrange formula

5 / 29

slide-6
SLIDE 6

State transition matrix

Matrix exponential

Given a scalar z ∈ C its exponential is ez = 1 + z + z2 2! + z3 3! + · · · =

  • k=0

zk k! , and it can be shown that the series is always convergent. Analogously, we the same concept can be applied to square matrices. Definition Given a matrix ❆ n × n, its exponential is ann × n matrix defined as e❆ = ■ + ❆ + ❆2 2! + ❆3 3! + · · · =

  • k=0

❆k k! . it can be shown that the series is always convergent.

6 / 29

slide-7
SLIDE 7

State transition matrix

Matrix exponential

Given a scalar z ∈ C its exponential is ez = 1 + z + z2 2! + z3 3! + · · · =

  • k=0

zk k! , and it can be shown that the series is always convergent. Analogously, we the same concept can be applied to square matrices. Definition Given a matrix ❆ n × n, its exponential is ann × n matrix defined as e❆ = ■ + ❆ + ❆2 2! + ❆3 3! + · · · =

  • k=0

❆k k! . it can be shown that the series is always convergent.

6 / 29

slide-8
SLIDE 8

State transition matrix

Exponential of a diagonal matrix

Given a generic square matrix n × n ❆ =    λ1 · · · . . . ... . . . · · · λn    , it holds e❆ =    eλ1 · · · . . . ... . . . · · · eλn    .

  • Proof. It can be shown that for each k ∈ N it holds

❆k =    λk

1

· · · . . . ... . . . · · · λk

n

   = ⇒ e❆ =

  • k=0

❆k k! =     ∞

k=0 λk

1

k!

· · · . . . ... . . . · · · ∞

k=0 λk

n

k!

    =    eλ1 · · · . . . ... . . . · · · eλn   

7 / 29

slide-9
SLIDE 9

State transition matrix

Exponential of a diagonal matrix

Given a generic square matrix n × n ❆ =    λ1 · · · . . . ... . . . · · · λn    , it holds e❆ =    eλ1 · · · . . . ... . . . · · · eλn    .

  • Proof. It can be shown that for each k ∈ N it holds

❆k =    λk

1

· · · . . . ... . . . · · · λk

n

   = ⇒ e❆ =

  • k=0

❆k k! =     ∞

k=0 λk

1

k!

· · · . . . ... . . . · · · ∞

k=0 λk

n

k!

    =    eλ1 · · · . . . ... . . . · · · eλn   

7 / 29

slide-10
SLIDE 10

State transition matrix

State transition matrix

Definition Given a SV model in which the matrix ❆ has dimension n × n, the state transition matrix is the matrix n × n e❆t =

  • k=0

❆ktk k! Note: the elements of the state transition matrix e❆t are not constant but are function of time.

8 / 29

slide-11
SLIDE 11

State transition matrix

Properties

  • Derivative of the state transition matrix:

d dt e❆t = ❆e❆t = e❆t❆.

  • Product of two state transition matrices:

e❆te❆τ = e❆(t+τ). Note: This result is not trivial. For instance the relationship e❆te❇t = e(❆+❇)t holds if and only if matrix ❆ and ❇ commute, i.e., ❆❇ = ❇❆.

  • Inverse of a state transition matrix

The inverse of e❆t is the matrix e−❆t: e❆te−❆t = e−❆te❆t = ■. Note: This implies that the inverse always exists!

9 / 29

slide-12
SLIDE 12

State transition matrix

Properties

  • Derivative of the state transition matrix:

d dt e❆t = ❆e❆t = e❆t❆.

  • Product of two state transition matrices:

e❆te❆τ = e❆(t+τ). Note: This result is not trivial. For instance the relationship e❆te❇t = e(❆+❇)t holds if and only if matrix ❆ and ❇ commute, i.e., ❆❇ = ❇❆.

  • Inverse of a state transition matrix

The inverse of e❆t is the matrix e−❆t: e❆te−❆t = e−❆te❆t = ■. Note: This implies that the inverse always exists!

9 / 29

slide-13
SLIDE 13

State transition matrix

Properties

  • Derivative of the state transition matrix:

d dt e❆t = ❆e❆t = e❆t❆.

  • Product of two state transition matrices:

e❆te❆τ = e❆(t+τ). Note: This result is not trivial. For instance the relationship e❆te❇t = e(❆+❇)t holds if and only if matrix ❆ and ❇ commute, i.e., ❆❇ = ❇❆.

  • Inverse of a state transition matrix

The inverse of e❆t is the matrix e−❆t: e❆te−❆t = e−❆te❆t = ■. Note: This implies that the inverse always exists!

9 / 29

slide-14
SLIDE 14

State transition matrix

Computation of e❆t for diagonal ❆ matrices

If ❆ is a diagonal matrix of dimension n × n: ❆ =      λ1 · · · λ2 · · · . . . . . . ... . . . · · · λn      vale e❆t =      eλ1t · · · eλ2t · · · . . . . . . ... . . . · · · eλnt      .

  • Proof. It follows from the definition of matrix exponential.

Example: Given ❆ = −1 −2

  • , it holds

e❆t = e−t e−2t

  • For a general matrix we can compute it via the so-called Sylvester formula,

by diagonalization of the SV model or numerically. More on this in the next lecture.

10 / 29

slide-15
SLIDE 15

Outline

Introduction The state transition matrix The Lagrange formula

11 / 29

slide-16
SLIDE 16

The Lagrange formula

Theorem

Theorem [Lagrange formula] The evolution of the state and output of a stationary, linear, SV, continuous-time dynamical system given the initial state ①(t0) and input ✉(t) (for t ≥ t0), is equal to:                          ①(t) = ①ℓ(t)

  • e❆(t−t0)①(t0)

+ ①f (t)

  • t

t0

e❆(t−τ)❇✉(τ)dτ ②(t) = ❈ e❆(t−t0)①(t0)

  • ② ℓ(t)

+ ❈ t

t0

e❆(t−τ)❇✉(τ)dτ + ❉✉(t)

  • ② f (t)

In this formula we can recognize: The natural evolution of the state ①ℓ(t) and the output ② ℓ(t) The forced evolution of the state ①f (t) and the output ② f (t)

12 / 29

slide-17
SLIDE 17

The Lagrange formula

Theorem

In the particular case t0 = 0    ①(t) = e❆t①(0) + t

0 e❆(t−τ)❇✉(τ)dτ

②(t) = ❈ e❆t①(0) + ❈ t

0 e❆(t−τ)❇✉(τ)dτ + ❉✉(t)

13 / 29

slide-18
SLIDE 18

The Lagrange formula

Example

Compute for t ≥ 0 the state and output evolution of the SV model:        ˙ x1(t) ˙ x2(t)

  • =

−1 1 −2

  • x1(t)

x2(t)

  • +

1

  • u(t)

y(t) = 2 1

  • x1(t)

x2(t)

  • given an input u(t) = 2 for t ≥ 0 and an initial state ①(0) =

3 4 T . The matrix exponential of the state transition matrix is: e❆t = e−t e−t − e−2t e−2t

  • The natural state evolution is by the Lagrange formula:

①ℓ(t) = e❆t①(0) =

  • e−t

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

  • ·
  • 3

4

  • =
  • 4e−t − e−2t

e−2t

  • .

14 / 29

slide-19
SLIDE 19

The Lagrange formula

Example

Compute for t ≥ 0 the state and output evolution of the SV model:        ˙ x1(t) ˙ x2(t)

  • =

−1 1 −2

  • x1(t)

x2(t)

  • +

1

  • u(t)

y(t) = 2 1

  • x1(t)

x2(t)

  • given an input u(t) = 2 for t ≥ 0 and an initial state ①(0) =

3 4 T . The matrix exponential of the state transition matrix is: e❆t = e−t e−t − e−2t e−2t

  • The natural state evolution is by the Lagrange formula:

①ℓ(t) = e❆t①(0) =

  • e−t

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

  • ·
  • 3

4

  • =
  • 4e−t − e−2t

e−2t

  • .

14 / 29

slide-20
SLIDE 20

The Lagrange formula

Example

Compute for t ≥ 0 the state and output evolution of the SV model:        ˙ x1(t) ˙ x2(t)

  • =

−1 1 −2

  • x1(t)

x2(t)

  • +

1

  • u(t)

y(t) = 2 1

  • x1(t)

x2(t)

  • given an input u(t) = 2 for t ≥ 0 and an initial state ①(0) =

3 4 T . The matrix exponential of the state transition matrix is: e❆t = e−t e−t − e−2t e−2t

  • The natural state evolution is by the Lagrange formula:

①ℓ(t) = e❆t①(0) =

  • e−t

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

  • ·
  • 3

4

  • =
  • 4e−t − e−2t

e−2t

  • .

14 / 29

slide-21
SLIDE 21

The Lagrange formula

Example

The forced state evolution is by the Lagrange formula: ①f (t) = t e❆(t−τ)❇✉(τ)dτ = t e❆(τ)❇✉(t − τ)dτ where we manipulate the integral with a change of variable. Therefore ①f (t) = t e−τ e−τ − e−2τ e−2τ

  • ·

1

  • · 2 · dτ

= 2 t e−τ − e−2τ e−2τ

  • dτ =

e−2t − 2e−t + 1 −e−2t + 1

  • .

From here, we can compute the output natural and forced state response simply by ② ℓ(t) = C①ℓ(t) and ② f (t) = C①f (t)

15 / 29

slide-22
SLIDE 22

The Lagrange formula

Example

The forced state evolution is by the Lagrange formula: ①f (t) = t e❆(t−τ)❇✉(τ)dτ = t e❆(τ)❇✉(t − τ)dτ where we manipulate the integral with a change of variable. Therefore ①f (t) = t e−τ e−τ − e−2τ e−2τ

  • ·

1

  • · 2 · dτ

= 2 t e−τ − e−2τ e−2τ

  • dτ =

e−2t − 2e−t + 1 −e−2t + 1

  • .

From here, we can compute the output natural and forced state response simply by ② ℓ(t) = C①ℓ(t) and ② f (t) = C①f (t)

15 / 29

slide-23
SLIDE 23

The Lagrange formula

Example

The forced state evolution is by the Lagrange formula: ①f (t) = t e❆(t−τ)❇✉(τ)dτ = t e❆(τ)❇✉(t − τ)dτ where we manipulate the integral with a change of variable. Therefore ①f (t) = t e−τ e−τ − e−2τ e−2τ

  • ·

1

  • · 2 · dτ

= 2 t e−τ − e−2τ e−2τ

  • dτ =

e−2t − 2e−t + 1 −e−2t + 1

  • .

From here, we can compute the output natural and forced state response simply by ② ℓ(t) = C①ℓ(t) and ② f (t) = C①f (t)

15 / 29

slide-24
SLIDE 24

Outline

Choice of a state vector Similarity transformation Important Properties

16 / 29

slide-25
SLIDE 25

Choice of a state vector

The choice of a state vector is not unique

The choice of a particular state vector to represent the input-state-output relationship is not unique. For a given representation of a system by a particular state vector ①(t), it is possible via a similarity transformation to change the representation to use a different, more convenient state vector ③(t). Why it is important? The new state vector ③(t) may have a more intuitive physical meaning. The new representation may be easier to study and analyses.

17 / 29

slide-26
SLIDE 26

Choice of a state vector

Example

h1(t) h2(t) q(t) q1(t) q2(t) v1(t) v2(t)

u(t) = q(t) Input flow rate x1(t) = v1(t) water volume of tank 1 x2(t) = v2(t) water volume of tank 2 y(t) = h2(t) =

1 S2 v2(t)

water height in tank 2 ˙ x1(t) = −q1(t) + q(t) = −K1v1(t) + q(t) ˙ x2(t) = q1(t) − q2(t) = K1v1(t) − K2v2(t)    ˙ x1(t) = −K1 x1(t) + u(t) ˙ x2(t) = K1 x1(t) − K2 x2(t) y(t) =

1 S2 x2(t)

18 / 29

slide-27
SLIDE 27

Choice of a state vector

Example

If K1 = 12, K2 = 3 and S2 = 2 it holds:          ˙ x1(t) ˙ x2(t)

  • =

−12 12 −3 x1(t) x2(t)

  • +

1

  • u(t)

y(t) =

  • 0.5

x1(t) x2(t)

  • Other choices for the state vector a possible

z1(t) = v1(t) + v2(t) total water volume z2(t) = h2(t) = 1

S2 v2(t)

water height in tank 2 In such a case there exist a linear relationship between the old and new state variables: z1(t) = x1(t) + x2(t) z2(t) = 0.5 x2(t) ⇐ ⇒ x1(t) = z1(t) − 2 z2(t) x2(t) = 2 z2(t)

19 / 29

slide-28
SLIDE 28

Choice of a state vector

Example

Since: z1(t) = x1(t) + x2(t) z2(t) = 0.5x2(t) ⇐ ⇒ x1(t) = z1(t) − 2z2(t) x2(t) = 2z2(t) we can write      ˙ z1(t) = ˙ x1(t) + ˙ x2(t) = −3x2(t) + u(t) = −6z2(t) + u(t) ˙ z2(t) = 0.5 ˙ x2(t) = 6x1(t) − 1.5x2(t) = 6z1(t) − 15z2(t) y(t) = 0.5x2(t) = z2(t)    ˙ x1(t) = −12 x1(t) + u(t) ˙ x2(t) = 12 x1(t) − 3 x2(t) y(t) = 0.5 x2(t)

  ˙ z1(t) = −6 z2(t) + u(t) ˙ z2(t) = 6 z1(t) − 15 z2(t) y(t) = z2(t)

20 / 29

slide-29
SLIDE 29

Choice of a state vector

Example

The new representation is:          ˙ z1(t) ˙ z2(t)

  • =

−6 6 −15 z1(t) z2(t)

  • +

1

  • u(t)

y(t) =

  • 1

z1(t) z2(t)

  • Note:

The input and output signals are always the same: u(t) and y(t). The state vector changed from ①(t) to ③(t). The elements of the matrices changed. We are describing the same system: only its mathematical representation is different.

21 / 29

slide-30
SLIDE 30

Outline

Choice of a state vector Similarity transformation Important Properties

22 / 29

slide-31
SLIDE 31

Similarity transformation

A formal definition

Given a representation

  • ˙

①(t) = ❆①(t) + ❇✉(t) ②(t) = ❈①(t) + ❉✉(t) let P be any non-singular matrix n × n. Consider vector ③(t) related to vector ①(t) by the linear map ①(t) = P③(t), The inverse of P always exists and it is ③(t) = P−1①(t). The linear map represented by matrix P is said to be a similarity transformation.

23 / 29

slide-32
SLIDE 32

Similarity transformation

Equivalent representation

By deriving the equation ①(t) = P③(t), it holds ˙ ①(t) = P ˙ ③(t), and substituting for the original representation

  • ˙

①(t) = ❆①(t) + ❇✉(t) ②(t) = ❈①(t) + ❉✉(t) = ⇒

  • P ˙

③(t) = ❆P③(t) + ❇✉(t) ②(t) = ❈P③(t) + ❉✉(t) which is ˙ ③(t) = ❆′ P−1❆P ③(t) + ❇′ P−1❇ ✉(t) ②(t) = ❈P

  • ❈ ′

③(t) + ❉✉(t) The matrices which characterize this new representation are ❆′ = P−1❆P, ❇′ = P−1❇, ❈ ′ = ❈P, ❉′ = ❉.

24 / 29

slide-33
SLIDE 33

Similarity transformation

Homework

Prove that if

        

  • ˙

x1(t) ˙ x2(t)

  • =
  • −12

12 −3 x1(t) x2(t)

  • +
  • 1
  • u(t)

y(t) =

  • 0.5

x1(t) x2(t)

  • and the similarity transformation is defined by:

①(t) = P③(t) = 1 −2 2

  • ③(t)

it holds

         ˙ z1(t) ˙ z2(t)

  • =

−6 6 −15 z1(t) z2(t)

  • +

1

  • u(t)

y(t) =

  • 1 z1(t)

z2(t)

  • 25 / 29
slide-34
SLIDE 34

Outline

Choice of a state vector Similarity transformation Important Properties

26 / 29

slide-35
SLIDE 35

Property

Invariance of the eigenvalues by similarity transformation

Let ❆′ = P−1❆P. The matrices ❆ and ❆′ have the same eigenvalues.

  • Proof. The characteristic polynomial of ❆′ is

det(λ■ − ❆′) = det(λ■ − P−1❆P) = det(λP−1P − P−1❆P) = det(P−1(λ■ − ❆)P) = det(P−1)det(λ■ − ❆)det(P) = det(λ■ − ❆) since by definition it holds P−1P = ■ and therefore it also holds det(P−1) det(P) = 1. The two matrices have the same characteristic polynomial and therefore the same eigenvalues. Note: For any two square matrices A and B, it holds det(AB) = det(A)det(B).

27 / 29

slide-36
SLIDE 36

Property

State transition matrix

Proposition 2. [Similarity and state transition matrix] If ❆′ = P−1❆P then e❆

′t = P−1e❆tP.

Proof. (❆′)k = P−1❆P P−1❆P · · · P−1❆P

  • k times

= P−1 ❆❆ · · · ❆

  • k times

P = P−1❆kP therefore e❆

′t =

  • k=0

(❆′)ktk k! =

  • k=0

P−1❆kPtk k! = P−1 ∞

  • k=0

❆ktk k!

  • P = P−1e❆tP

28 / 29

slide-37
SLIDE 37

Property

Input-output relationship

= ⇒ The two representations describe the same input-output relationship. ② f (t) = ❈ ′ t

t0 e❆

′(t−τ) ❇′ ✉(τ)dτ + ❉′✉(t)

= ❈P t

t0 P−1e❆(t−τ)P P−1❇ ✉(τ)dτ + ❉✉(t)

= ❈ t

t0 e❆(t−τ)❇ ✉(τ)dτ + ❉✉(t)

Note: if ❆′ = P−1❆P e e❆

′t = P−1e❆tP

it also holds ❆ = P❆′P−1 e e❆t = Pe❆

′tP−1

= ⇒ The two state transition matrices e❆t and e❆

′t are different but

contain the same modes.

29 / 29