state space

56
State Space Modeling & Analysis

Upload: vikrant-vicky

Post on 14-Apr-2016

5 views

Category:

Documents


0 download

DESCRIPTION

best state

TRANSCRIPT

Page 1: State Space

State Space Modeling & Analysis

Page 2: State Space

Lecture Outline

– Basic Definitions

– State Equations

– State Diagram

– State Controllability

– State Observability

– Output Controllability

– Transfer Matrix

– Solution of State Equation

Page 3: State Space

Definitions • State of a system: We define the state of a system at time t0 as

the amount of information that must be provided at time t0, which, together with the input signal u(t) for t t0, uniquely determine the output of the system for all t t0.

• State Variable: The state variables of a dynamic system are the smallest set of variables that determine the state of the dynamic system.

• State Vector: If n variables are needed to completely describe the behaviour of the dynamic system then n variables can be considered as n components of a vector x, such a vector is called state vector.

• State Space: The state space is defined as the n-dimensional space in which the components of the state vector represents its coordinate axes.

Page 4: State Space

Definitions

• Let x1 and x2 are two states variables that define the state of the system completely .

4

1x

2x

Two Dimensional State space

State (t=t1)

State Vector x

dt

dx

State space of a Vehicle

Velocity

Position

State (t=t1)

Page 5: State Space

State Space Equations • In state-space analysis we are concerned with three types of

variables that are involved in the modeling of dynamic systems: input variables, output variables, and state variables.

• The dynamic system must involve elements that memorize the values of the input for t> t1 .

• Since integrators in a continuous-time control system serve as memory devices, the outputs of such integrators can be considered as the variables that define the internal state of the dynamic system.

• Thus the outputs of integrators serve as state variables.

• The number of state variables to completely define the dynamics of the system is equal to the number of integrators involved in the system.

Page 6: State Space

State Space Equations • Assume that a multiple-input, multiple-output system involves 𝑛

integrators.

• Assume also that there are 𝑟 inputs 𝑢1 𝑡 , 𝑢2 𝑡 ,⋯ , 𝑢𝑟 𝑡 and 𝑚 outputs 𝑦1 𝑡 , 𝑦2 𝑡 ,⋯ , 𝑦𝑚 𝑡 .

• Define 𝑛 outputs of the integrators as state variables: 𝑥1 𝑡 , 𝑥2 𝑡 ,⋯ , 𝑥𝑛 𝑡 .

• Then the system may be described by

𝑥 1 𝑡 = 𝑓1(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)

𝑥 2 𝑡 = 𝑓2(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)

𝑥 𝑛 𝑡 = 𝑓𝑛(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)

Page 7: State Space

State Space Equations • The outputs 𝑦1 𝑡 , 𝑦2 𝑡 ,⋯ , 𝑦𝑚 𝑡 of the system may be given as.

• If we define

𝑦1 𝑡 = 𝑔1(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)

𝑦2 𝑡 = 𝑔2(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)

𝑦𝑚 𝑡 = 𝑔𝑚(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)

𝒙 𝑡 =

𝑥1𝑥2⋮𝑥𝑛

𝒇 𝒙, 𝒖, 𝑡 =

𝑓1(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡) 𝑓2(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)

⋮𝑓𝑛(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)

𝒚 𝑡 =

𝑦1𝑦2⋮𝑦𝑚

𝒈 𝒙, 𝒖, 𝑡 =

𝑔1(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡) 𝑔2(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)

⋮𝑔𝑚(𝑥1, 𝑥2, ⋯ , 𝑥𝑛; 𝑢1, 𝑢2, ⋯ , 𝑢𝑟; 𝑡)

𝒖 𝑡 =

𝑢1𝑢2⋮𝑢𝑟

Page 8: State Space

State Space Modeling

• State space equations can then be written as

• If vector functions f and/or g involve time t explicitly, then the system is called a time varying system.

𝒙 𝑡 = 𝒇(𝒙, 𝒖, 𝑡)

𝒚 𝑡 = 𝒈(𝒙, 𝒖, 𝑡)

State Equation

Output Equation

Page 9: State Space

State Space Modeling

• If above equations are linearised about the operating state, then we have the following linearised state equation and output equation:

)()()()()( tutBtxtAtx )()()()()( tutDtxtCty

Page 10: State Space

State Space Modeling

• If vector functions f and g do not involve time t explicitly then the system is called a time-invariant system.

• In this case, state and output equations can be simplified to

)()()( tButAxtx )()()( tDutCxty

B

D

A

C

Page 11: State Space

Example-1

• Consider the mechanical system shown in figure. We assume that

the system is linear. The external force u(t) is the input to the

system, and the displacement y(t) of the mass is the output. The

displacement y(t) is measured from the equilibrium position in the

absence of the external force. This system is a single-input, single-

output system.

• From the diagram, the system equation is

𝑚𝑦 (𝑡) + 𝑏𝑦 (𝑡) + 𝑘𝑦(𝑡) = 𝑢(𝑡)

• This system is of second order. This means that

the system involves two integrators. Let us

define state variables 𝑥1(𝑡) and 𝑥2(𝑡) as

𝑥1 𝑡 = 𝑦(𝑡)

𝑥2 𝑡 = 𝑦 (𝑡)

Page 12: State Space

Example-1

𝑚𝑦 (𝑡) + 𝑏𝑦 (𝑡) + 𝑘𝑦(𝑡) = 𝑢(𝑡)

• Then we obtain

• Or

• The output equation is

𝑥1 𝑡 = 𝑦(𝑡) 𝑥2 𝑡 = 𝑦 (𝑡)

𝑥 1 𝑡 = 𝑥2(𝑡)

𝑥 2 𝑡 = −𝑏

𝑚𝑦 𝑡 −

𝑘

𝑚𝑦 𝑡 +

1

𝑚𝑢 (𝑡)

𝑥 1 𝑡 = 𝑥2(𝑡)

𝑥 2 𝑡 = −𝑏

𝑚𝑥2 𝑡 −

𝑘

𝑚𝑥1 𝑡 +

1

𝑚𝑢 (𝑡)

𝑦 𝑡 = 𝑥1 𝑡

Page 13: State Space

Example-1

)(10

)(

)(10

)(

)(

2

1

2

1tu

mtx

tx

m

b

m

ktx

tx

)(

)(01)(

2

1

tx

txty

• In a vector-matrix form,

𝑥 1 𝑡 = 𝑥2(𝑡) 𝑥 2 𝑡 = −𝑏

𝑚𝑥2 𝑡 −

𝑘

𝑚𝑥1 𝑡 +

1

𝑚𝑢 (𝑡) 𝑦 𝑡 = 𝑥1 𝑡

Page 14: State Space

Example-1

• State diagram of the system is

𝑥 1 𝑡 = 𝑥2(𝑡)

𝑥 2 𝑡 = −𝑏

𝑚𝑥2 𝑡 −

𝑘

𝑚𝑥1 𝑡 +

1

𝑚𝑢 (𝑡)

𝑦 𝑡 = 𝑥1 𝑡

1/s 1/s 𝑢(𝑡) 𝑦(𝑡)

-k/m

-b/m 𝑥 2 1/m

𝑥2 = 𝑥 1

𝑥1

Page 15: State Space

Example-1

• State diagram in signal flow and block diagram format

1/s 1/s 𝑢(𝑡) 𝑦(𝑡)

-k/m

-b/m 𝑥 2 1/m

𝑥2 = 𝑥 1

𝑥1

Page 16: State Space

Example-2 • State space representation of armature Controlled D.C Motor.

• ea is armature voltage (i.e. input) and is output.

ea

ia T

Ra La

J

B

eb

ba

aaaa edt

diLiRe

BJT

Page 17: State Space

atiKT bb Ke

abaaa

a

at

eKiRdt

diL

i-KBJ

0

Example-2

• Choosing 𝜃, 𝜃 𝑎𝑛𝑑 𝑖𝑎 as state variables

• Since 𝜃 is output of the system therefore output equation is given as

𝑑

𝑑𝑡

𝜃𝜃

𝑖𝑎

=

0 1 0

0 −𝐵

𝐽

𝐾𝑡𝐽

0 −𝐾𝑏𝐿𝑎

−𝑅𝑎𝐿𝑎

𝜃𝜃

𝑖𝑎

+

001

𝐿𝑎

𝑒𝑎

𝑦 𝑡 = 1 0 0

𝜃𝜃

𝑖𝑎

Page 18: State Space

State Controllability • A system is completely controllable if there exists an

unconstrained control u(t) that can transfer any initial state x(to) to any other desired location x(t) in a finite time, to ≤ t ≤ T.

controllable

uncontrollable

Page 19: State Space

State Controllability • Controllability Matrix CM

• System is said to be state controllable if

BABAABBCM n 12

)( nCMrank

Page 20: State Space

State Controllability (Example) • Consider the system given below

• State diagram of the system is

xy

uxx

21

0

1

30

01

1

1

)(sU

)(sY1

-1s

3-1s

2

1x

2x

Page 21: State Space

State Controllability (Example) • Controllability matrix CM is obtained as

• Thus

• Since 𝑟𝑎𝑛𝑘(𝐶𝑀) ≠ 𝑛 therefore system is not completely

state controllable.

ABBCM

00

11 CM

0

1 B

0

1A B

Page 22: State Space

State Observability • A system is completely observable if and only if there exists a finite

time T such that the initial state x(0) can be determined from the observation history y(t) given the control u(t), 0≤ t ≤ T.

observable

unobservable

Page 23: State Space

State Observability • Observable Matrix (OM)

• The system is said to be completely state observable if

1

2MMatrix ity Observabil

nCA

CA

CA

C

O

nOMrank )(

Page 24: State Space

State Observability (Example) • Consider the system given below

• OM is obtained as

• Where

xy

uxx

40

1

0

20

10

CA

COM

40C

12020

1040

CA

Page 25: State Space

State Observability (Example) • Therefore OM is given as

• Since 𝑟𝑎𝑛𝑘(𝑂𝑀) ≠ 𝑛 therefore system is not completely state

observable.

120

40MO

1)(sU -1s-1s 1x2x

2

4

)(sY

Page 26: State Space
Page 27: State Space

Output Controllability

• Output controllability describes the ability of an external input to move the output from any initial condition to any final condition in a finite time interval.

• Output controllability matrix (OCM) is given as

BCABCACABCBCM n 12O

Page 28: State Space

Home Work

• Check the state controllability, state observability and output controllability of the following system

10,1

0,

01

10

CBA

Page 29: State Space

Transfer Matrix (State Space to T.F)

• Now Let us convert a space model to a transfer function model.

• Taking Laplace transform of equation (1) and (2) considering initial conditions to zero.

• From equation (3)

)()()( tButAxtx (1)

)()()( tDutCxty (2)

)()()( sBUsAXssX (3)

)()()( sDUsCXsY (4)

)()()( sBUsXAsI

)()()( 1 sBUAsIsX (5)

Page 30: State Space

Transfer Matrix (State Space to T.F) • Substituting equation (5) into equation (4) yields

)()()()( 1 sDUsBUAsICsY

)()()( 1 sUDBAsICsY

Page 31: State Space

Example#3

• Convert the following State Space Model to Transfer Function Model if K=3, B=1 and M=10;

)(tf

Mv

x

M

B

M

Kv

x

1010

v

xty 10)(

Page 32: State Space

Example#3

• Substitute the given values and obtain A, B, C and D matrices.

)(

10

10

10

1

10

310

tfv

x

v

x

v

xty 10)(

Page 33: State Space

Example#3

10

1

10

310

A

10C

10

10

B

0D

DBAsICsU

sY 1)(

)(

)(

Page 34: State Space

Example#3

10

1

10

310

A

10C

10

10

B

0D

10

10

10

1

10

310

0

010

)(

)(1

s

s

sU

sY

Page 35: State Space

Example#3

10

10

10

1

10

310

0

010

)(

)(1

s

s

sU

sY

10

10

10

1

10

31

10)(

)(1

s

s

sU

sY

10

10

10

3

110

1

10

3)

10

1(

110

)(

)(

s

s

sssU

sY

Page 36: State Space

Example#3

10

10

10

3

110

1

10

3)

10

1(

110

)(

)(

s

s

sssU

sY

10

10

10

3

10

3)

10

1(

1

)(

)(s

sssU

sY

10

10

3)

10

1(

1

)(

)( s

sssU

sY

Page 37: State Space

Example#3

10

10

3)

10

1(

1

)(

)( s

sssU

sY

3)110()(

)(

ss

s

sU

sY

Page 38: State Space

Home Work

• Obtain the transfer function T(s) from following state space representation.

Answer

Page 39: State Space

Forced and Unforced Response

• Forced Response, with u(t) as forcing function

• Unforced Response (response due to initial conditions)

)(tub

b

x

x

aa

aa

x

x

2

1

2

1

2221

1211

2

1

)(

)(

0

0

2

1

2221

1211

2

1

x

x

aa

aa

x

x

Page 40: State Space

Solution of State Equations • Consider the state equation given below

• Taking Laplace transform of the equation (1) )()( tAxtx (1)

)()0()( sAXxssX

)0()()( xsAXssX

)0()( xsXAsI

)0()(1xAsIsX

)0(1

)( xAsI

sX

Page 41: State Space

Solution of State Equations

• Taking inverse Laplace

)0(1

)( xAsI

sX

)0()( xetx At

Atet )( State Transition Matrix

Page 42: State Space

Example-4 • Consider RLC Circuit obtain the state transition matrix ɸ(t).

Vc

+

-

+

-

Vo iL

)(tuCi

v

L

R

L

Ci

v

L

c

L

c

0

1

1

10

5013 ., CandLR

)(tui

v

i

v

L

c

L

c

0

2

31

20

Page 43: State Space

Example-4 (cont...)

)(tui

v

i

v

L

c

L

c

0

2

31

20

1

111

31

20

0

0

S

SASIt ])[()(

))(())((

))(())(()(

2121

121

2

21

3

1

SS

S

SS

SSSS

S

t

• State transition matrix can be obtained as

• Which is further simplified as

Page 44: State Space

Example-4 (cont...)

))(())((

))(())(()(

2121

121

2

21

3

1

SS

S

SS

SSSS

S

t

• Taking the inverse Laplace transform of each element

)()(

)()()(

tttt

tttt

eeee

eeeet

22

22

2

222

Page 45: State Space

Home Work

• Compute the state transition matrix if

300

020

001

A

])[()( 11 ASIt

Solution

Page 46: State Space

State Space Trajectories

• The unforced response of a system released from any initial point x(to) traces a curve or trajectory in state space, with time

t as an implicit function along the trajectory.

• Unforced system’s response depend upon initial conditions.

• Response due to initial conditions can be obtained as

)()( tAxtx

)()()( 0xttx

Page 47: State Space

State Transition • Any point P in state space represents the state of the system

at a specific time t.

• State transitions provide complete picture of the system

1x

2x

P(x1, x2)

1x

2xt0

t1

t2

t3

t4 t5

t6

Page 48: State Space

Example-5 • For the RLC circuit of example-4 draw the state space trajectory

with following initial conditions.

• Solution

2

1

0

0

)(

)(

L

c

i

v

2

1

)2()(

)22()2(22

22

tttt

tttt

L

c

eeee

eeee

i

v

)()()( 0xttx

tt

tt

L

c

ee

ee

i

v2

2

3

33tt

L

tt

c

eei

eev

2

2

3

33

Page 49: State Space

Example-5 (cont...) • Following trajectory is obtained

-1 -0.5 0 0.5 1 1.5 2-1

-0.5

0

0.5

1

1.5

2

Vc

iLState Space Trajectory of RLC Circuit

t-------->inf

Page 50: State Space

Example-5 (cont...)

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

Vc

iLState Space Trajectories of RLC Circuit

0

1

0

1

1

0

1

0

Page 51: State Space

Equilibrium Point

• The equilibrium or stationary state of the system is when

0)(tx

-2 -1.5 -1 -0.5 0 0.5 1 1.5 2-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

Vc

iL

State Space Trajectories of RLC Circuit

Page 52: State Space

Solution of State Equations • Consider the state equation with u(t) as forcing function

• Taking Laplace transform of the equation (1) )()()( tButAxtx (1)

)()()0()( sBUsAXxssX

)()0()()( sBUxsAXssX

)()0()( sBUxsXAsI

AsI

sBUxsX

)()0()(

Page 53: State Space

Solution of State Equations

• Taking the inverse Laplace transform of above equation.

AsI

sBUxsX

)()0()(

AsI

sBU

AsI

xsX

)()0()(

dtutxttx

t

)()()0()()(0

Natural Response Forced Response

Page 54: State Space

Example#6

• Obtain the time response of the following system:

• Where u(t) is unit step function occurring at t=0. consider x(0)=0.

)(1

0

32

10

2

1

2

1tu

x

x

x

x

Solution

• Calculate the state transition matrix

])[()( 11 ASIt

Page 55: State Space

Example#6

• Obtain the state transition equation of the system

dtutxttx

t

)()()0()()(0

Page 56: State Space

END OF LECTURE