State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State...

21
2. State equations State equations Solution of the state equations Assumption: We assume that all the Laplace transforms involved in the following reasonings exist. ˙ x(t)= Ax(t)+ Bu(t) y (t)= Cx(t)+ Du(t) L ˆ x(s) = (sI n - A) -1 x(0) +(sI n - A) -1 B ˆ u(s) ˆ y (s) = C (sI n - A) -1 x(0) +[C (sI n - A) -1 B + D] ˆ u(s) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Transcript of State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State...

Page 1: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

State equations

Solution of the state equations

Assumption: We assume that all the Laplace transforms involved in the

following reasonings exist.

x(t) = A x(t) + Bu(t)

y(t) = C x(t) + Du(t)

↓ L x(s) = (sIn − A)−1x(0) + (sIn − A)−1Bu(s)

y(s) = C (sIn − A)−1x(0) + [C(sIn − A)−1B + D]u(s)

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 2: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

Back to the time domain

x(s) = (sIn − A)−1x(0) + (sIn − A)−1Bu(s)

y(s) = C (sIn − A)−1x(0) + [C(sIn − A)−1B + D]u(s)

↓ L−1 x(t) = L−1{(sIn − A)−1} x(0) + L−1{(sIn − A)−1}B ∗ u(t)

y(t) = C L−1{(sIn − A)−1} x(0) + [CL−1{(sIn − A)−1}B + Dδ] ∗ u(t)

L−1{(sIn − A)−1} = ?

(sIn − A)−1 is a rational matrix function that is (strictly) proper. Its

Laplace transform can be computed componentwise.

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 3: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

Example:

Compute L−1{(sIn − A)−1} for A =

1 2

−2 1

.

(sI − A)−1 =

s−1(s−1)2+4

2(s−1)2+4

−2(s−1)2+4

s−1(s−1)2+4

L−1{(sI − A)−1} = et

cos 2t sin 2t

−sin 2t cos 2t

(check this!)

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 4: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

General expression for L−1{(sIn − A)−1}

(sI − A)−1 = s−1I +∞∑

k=1

Aks−k−1

L−1{(sIn − A)−1} = L−1{s−1}I +∞∑

k=1

AkL−1{s−k−1}

= I +∞∑

k=1

AkL−1{dk

(1s

)dsk

(−1)k

k!}

=∞∑

k=0

Aktk

k!=: eAt

this notation is chosen by analogy with the scalar case

L−1{ 1s−a

} = eat =∑∞

k=0aktk

k!

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 5: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

General form of x(t) and y(t)

x(t) = L−1{(sIn − A)−1} x(0) + L−1{(sIn − A)−1}B ∗ u(t)

y(t) = C L−1{(sIn − A)−1} x(0) + [CL−1{(sIn − A)−1}B + Dδ] ∗ u(t)

x(t) = eAt x(0) + eAtB ∗ u(t)

y(t) = C eAt x(0) + [CeAtB + Dδ] ∗ u(t)

x(t) = eAtx(0) +∫ t

0eA(t−τ)B u(τ )dτ

y(t) = CeAtx(0) +∫ t

0CeA(t−τ)B u(τ )dτ + Du(t)

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 6: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

• x(t) = eAtx0 +∫ t

0eA(t−τ)B u(τ )dτ is a solution of x = Ax + Bu.

• It is the only solution of x = Ax + Bu such that x(0) = x0, for a fixed

given u. [Prove this fact using the following theorem.]

Theorem - existence and uniqueness of solution

Consider a first order differential equation x = F (x) with initial condition x(t0) = x0 (IVP

- initial value problem). If F is a lipschitzian, then the (IVP) has a unique solution. This

solution is of class C1, i.e. is continuously differentiable.

• x(t) is defined for all inputs u(t) that guarantee the existence of the

integral∫ t

0eA(t−τ)B u(τ )dτ . Here we take as admissible the inputs u(t)

which are piecewise continuous.

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 7: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

• The solutions of the state eqautions can also be written as follows (if

the initial conditions are given at time t0):

x(t) = eA(t−t0)x(t0) +∫ t

t0eA(t−τ)B u(τ )dτ

y(t) = CeA(t−t0)x(t0) +∫ t

t0CeA(t−τ)B u(τ )dτ + Du(t)

Check this!

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 8: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

Zero-input evolution/response - state and output evolution for zero input

Zero-state evolution/response - state and output evolution for zero initial

state

x(t) = eAtx(0)︸ ︷︷ ︸xl(t)

+

∫ t

0

eA(t−τ)B u(τ )dτ︸ ︷︷ ︸xf (t)

y(t) = CeAtx(0)︸ ︷︷ ︸yl(t)

+

∫ t

0

CeA(t−τ)B u(τ )dτ + Du(t)︸ ︷︷ ︸yf (t)

zero-input evolution zero-state evolution

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 9: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

Impulse response and transfer function

yf(t) =∫ t

0CeA(t−τ)B u(τ )dτ + Du(t)

Impulse response ∗

yf(t) =︷ ︸︸ ︷[CeAtB + Dδ] ∗u(t)

L−1 ↑ ↓ Lyf(s) = [C(sIn − A)−1B + D]︸ ︷︷ ︸ u(s)

Transfer function

∗ Impulse = Dirac δ-function; ui = δ ⇒ yf = CeAtB + Diδ.

ui - i-th component of u Di - i-th colunm of D

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 10: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

Discretization

Discretization starting at time t0, with discretization interval ∆.

xd(k) := x(t0 + k∆); analogous definitions for ud e yd.

Process 1

• Approximate x(t) ' x(t+∆)−x(t)∆

.

• This leads to:

xd(k + 1) = (I + A∆)xd(k) + B∆ud(k)

yd(k) = Cxd(k) + Dud(k) Check!

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 11: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

Process 2

• Suppose u(t) constant in each interval [t0 + k∆ t0 + (k + 1)∆)

• Compute the state trajectories of the continuous system at the

discretization instants:

x(t0 + (k + 1)∆) =

eA((t0+(k+1)∆−(t0+k∆))x(t0 + k∆) +∫ t0+(k+1)∆

t0+k∆ eA(t0+(k+1)∆−τ)Bu(τ)dτ

• This leads to:

xd(k + 1) = eA∆xd(k) +(∫ ∆

0eAτ Bdτ

)ud(k)

yd(k) = Cxd(k) + Dud(k) Check this!

Exercise: Compare the discrete systems obtained by the two different

processes.

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 12: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

Discretização Exacta

EXEMPLO:

Considere-se o sistema compartimental contínuo,

1 0 1 00 0 0 10 1 1 0

x x u−⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥= +⎢ ⎥ ⎢ ⎥⎢ ⎥− ⎢ ⎥⎣ ⎦⎣ ⎦

& (1)

( ) ( ) ( )

0.05 0.05 0.05 0.05

0.05 0.05 0.05

1 1.05 0.05 1.95 2.051 0 1 0 0.05

0 1 0.95

e e e ex k x k u k

e e e

− − − −

− − −

⎡ ⎤ ⎡ ⎤− − +⎢ ⎥ ⎢ ⎥+ = +⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥− − +⎣ ⎦ ⎣ ⎦

E o sistema compartimental discretizado correspondente, para h=0.05seg:

(2)

Assim…

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 13: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

0 50

2

4

6

Tempo (seg)

Am

plitu

de

0 50

2

4

6

Tempo (seg)

Am

plitu

de

0 50

2

4

6RESPOSTA AO DEGRAU UNITÁRIO

Tempo (seg)

Am

plitu

de

Discretização Exacta

Respostas ao degrau do sistema contínuo e da sua discretização exacta

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 14: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

Discretização Exacta

Respostas forçadas do sistema contínuo e da sua discretização exacta nos intervalos de discretização

0 50

5

10

15

Tempo (seg)

Am

plitu

de

0 50

2

4

6

Tempo (seg)

Am

plitu

de

0 50

5

10RESPOSTA FORÇADA

Tempo (seg)

Am

plitu

de

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 15: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

Discretização Aproximada

EXEMPLO:

Considere-se novamente o sistema compartimental contínuo (1):

( ) ( ) ( )0.95 0 0.05 0

1 0 1 0 0.050 0.05 0.95 0

x k x k u k⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥+ = +⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦

E o sistema compartimental discretizado aproximadamente correspondente, para

h=0.05seg:

Assim…

(3)

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 16: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

Discretização Aproximada

Respostas ao degrau do sistema contínuo e da sua discretização aproximada

0 50

2

4

6

Tempo (seg)

Am

plitu

de

0 50

2

4

6

Tempo (seg)

Am

plitu

de

0 50

2

4

6RESPOSTA AO DEGRAU UNITÁRIO

Tempo (seg)

Am

plitu

de

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 17: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

General solution for discrete state equations

x(k + 1) = Ax(k) + Bu(k)

y(k) = Cx(k) + Du(k)

x(k) = Akx(0) +

∑k−1l=0 Ak−1−lBu(l)

y(k) = CAkx(0) +∑

l=0 CAk−1Ak−1−lBu(l) + Du(k)

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 18: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

Invertible transformations (isomorphisms) in the state space

State transformation: x −→ x = Sx

S invertible (i.e., x −→ x = Sx is an isomorphism)

Question: What are the evolution equations for x(t)?

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 19: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

x = Ax + Bu

y = Cx + Du→

˙︷︸︸︷

Sx = SAS−1Sx + SBu

y = CS−1Sx + Du

Replacing Sx by x, yields:

˙x =

A︷ ︸︸ ︷SAS−1 x +

B︷︸︸︷SB u

y = CS−1︸ ︷︷ ︸C

x + Du→

˙x = Ax + Bu

y = Cx + Du

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 20: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

Thus: x = Ax + Bu

y = Cx + Du→

˙x = Ax + Bu

y = Cx + Du

Transformation S

(A, B, C, D) → (A, B, C, D) =

= (SAS−1, SB, CS−1, D)

(A, B, C, D) → Algebraically equivalent

e systems

(A, B, C, D) ∃ invertible matrix S such that

A = SAS−1, B = SB

C = CS−1, D = D

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

Page 21: State equations - Faculdade de Engenharia da Universidade ...mprocha/CL/English CL-2.pdf2. State equations State equations Solution of the state equations Assumption: We assume that

2. State equations

Prove That:

Proposition: If two systems are algebraically equivalent then they have the

same transfer function.

Remark: Two systems with the same transfer function are called

zero-state equivalent.

So, the previous proposition states that whenever two systems are

algebraically equivalent systems, they are also zero-state equivalent.

However: there are systems that are zero-state equivalent, but not

algebraically equivalent.

Give an example!

〈 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21