EE/ME/AE324: Dynamical Systems - Clarkson...

Preview:

Citation preview

EE/ME/AE324:Dynamical Systems

Chapter 3: Standard Forms for System Models

State‐Variables• A common way to model systems is using state‐variables:y y g

0

independent variables that completely describe the systemresponse for all t t given knowledge of the state variables≥ 0

0 0

response for all t t given knowledge of the state variablesat t (initial conditions) and the system inputs for all t t

• 1 1

1 2 m 1 2

Suppose a system has state variables , ,..., , inputs u , u ,..., u , and outputs , ,..., ;

n

p

q q qy y y

1 11 1 12 2 1 11 1 12 2 1

a general state equation for a linear system is:... ...n n m mq a q a q a q b u b u b u= + + + + + + +

q2 21 1 22 2 2 21 1 22 2 2... ...n n m ma q a q a q b u b u b u= + + + + + + +

1 1 2 2 1 1 2 2... ...n n n nn n n n nm mq a q a q a q b u b u b u= + + + + + + +

State‐Variables(Space) Equations• This set of -first order differential state equationsn q

can be written in matrix form as:q = Aq +Buwhere

q u

q Aq Bu

1 1

2 2, ,

q uq u

q = u =

n mq u b b b 11 12 1

21 22 2 and

n

n

a a aa a a = =

A B

11 12 1

21 22 2

m

m

b b bb b b

1 2n n nna a a 1 2n n nmb b b

State‐Variables(Space) Equations• Similarly, the system outputs can be expressedpSimilarly, the system outputs can be expressed

algebraically as:p

y = Cq +Duwhere

yq u

y Cq +Du

11 1

22 2, ,

yq uyq u

q = u = y =

pn m yq u

d d d 11 12 1

21 22 2 and

n

n

c c cc c c =

C

11 12 1

21 22 2

m

m

d d dd d d =

D

1 2

and

p p pnc c c

C

1 2p p pmd d d

D

State‐Variables(Space) Equations• The complete state variable model can now be expressed as:The complete state variable model can now be expressed as:q = Aq +Buy = Cq +Duwhere

n m p∈ ∈ ∈

y Cq Du

q u yR R R

• The choice of system states is not unique meaning

, , , , and n n n m p n p m× × × ×

∈ ∈ ∈

∈ ∈ ∈ ∈

q u yA B C D

R R RR R R R

• The choice of system states is not unique, meaning different A, B, C, D can describe the same system

• Mechanical systems typically require two states per• Mechanical systems typically require two states per inertial element, e.g., and x x

Steps to Create State‐Variable Eqns. • Use free‐body diagrams to develop system EoM

• Manipulate EoM into state‐space form, i.e., first‐order diff. state eqns. = fcns. of states + inputs

• Express system outputs in terms of the desired p y psystem states and specified inputs

• Ex 3 1:Ex 3.1:

Ex. 3.1: Mass‐Spring‐Damper System

• EoM: ( )Mx Bx Kx f t+ + =EoM:

• Desired outputs are spring force, and velocity and acceleration of the mass

( )aMx Bx Kx f t+ + =

and acceleration of the mass

• Generally, you can choose system states as d l f hposition and velocity of each system mass, e.g.:

1 2q qx x

1 2

2 TBD from EoM

q qx q x

= = ⇒ = =

q q

Ex. 3.1: Mass‐Spring‐Damper System• Manipulating the EoM we obtain:Manipulating the EoM, we obtain:

1 ( )aK Bx x x f tM M M

= − − +

( )

1 ( )

afM M MK B f t

• Substituting the RHS of the above term into the

1 2 ( )aq q f tM M M

= − − +

Substituting the RHS of the above term into the state eqn. yields:

q 2

1 ( )

qx

K B f

= =

q1 2 ( )aq q f tx

M M M − − +

q

Ex. 3.1: Mass‐Spring‐Damper System• Assuming the applied force f (t) as the input e gAssuming the applied force fa(t) as the input, e.g.,

u = fa(t), we can express the state eqn. as:

q 2

1 ( )

qK B f

=

q1 2 ( )aq q f t

M M M − − +

q

0 1 01K B

+ 1K B

M M M

= + − −

q uM M M

= Aq+Bu

Ex. 3.1: Mass‐Spring‐Damper SystemW th d i d t t• We can now express the desired outputs as:

1Kf Kx Kq= =

2

1x q

B K=

2 1

1 B Kx u q qM M M = − −

Ex. 3.1: Mass‐Spring‐Damper System[ ]If th t t b ittTf• [ ]If , , , the output eqn. can be written:Kf x x=y

0 0K

0 1 01K B

= +

y q u1K B

M M M − −

=Cq+Du

Why Model Using State Eqns.?• The use of state eqns. allows the application of

more sophisticated system analysis and design techniques, e.g., “modern” state‐space control

• Assume all parameters in the MSD system of Ex. 3.1 were unity and the applied force was a unit step, then the state space representation is:

1 0 00 1 0

0 1 0

, , 0 1 , 01 1 1

1 1 1

= = = = − − − −

A B C D1 1 1

Why Model Using State Eqns.?• This model can be entered directly into Simulink• This model can be entered directly into Simulink

to simulate the system response, as shown:

Click to open scope window

Spring force (mass position)

Mass velocity

Mass acceleration

Ex. 3.2

1 1 1 1 2 1 2 2 1

EoM:( ) ( )M x K x B x x K x x+ = − + −1 1 1 1 2 1 2 2 1

2 2 2 2 1 2 1

( ) ( )( ) ( ) ( )a

M x K x B x x K x xM x K x x B x x f t

+ ++ − + − =

Ex. 3.2• Input is f (t) output is tensile spring force of K2 andInput is fa(t), output is tensile spring force of K2 and

total momentum of the masses mT

• Choose state variables as shown:x x x x• 1 2 1 2

1 1 1 2

Choose state variables , , , , as shown:x x x x

x q x q

1 2 1 TBD from EoMx q x = ⇒ =

q = q =2 3 2 4

2 4 2 TBD from EoM

x q x qx q x

q q

2 4 2 TBD from EoMx q x

Ex. 3.2• EoM:

1 1 1 1 2 1 2 2 1

EoM:

( ) ( )M x K x B x x K x x+ = − + −

2 2 2 2 1 2 1( ) ( ) ( )aM x K x x B x x f t+ − + − =

From the EoM, we have:

K K KB B 1 2 21 1 1 2 2

1 1 1 1

K K KB B

M M M Mx x x x x

+= − − + +

2 22 1 1 2 2

1( )a

K KB B

M M M M Mx x x x x f t= + − − +

2 2 2 2 2M M M M M

Ex. 3.2• Substituting the EoM into the state eqn. yields:

0 1 0 0 1 2 2

1 1 1 1

K K KB B

M M M M

+− −

q = q0 0 0 1

K KB B

q = q

2 2

2 2 2 2

K KB B

M M M M− −

0

+

u = Aq + Bu

2

1

M

+

u = Aq + Bu

Ex. 3.2• The desired outputs can now be expressed as:

2 2 2 1 2 1 2 3

p p( )Kf K x x K q K q= − = − +

1 1 2 2 1 2 2 4

0 0 0T

K K

m M x M x M q M q−

= + = +

2 2

1 2 0

0 0 0

0 0

K K

M M⇒

+ y = u = Cq + Duq

• The complete state‐space system is given by

A B C DA, B, C, D

• See Matlab file EX3_2_Main.m and Simulinkfile EX3_1.mdl for simulation on class web site

Spring force (relative position)

Momentum of masses

Repeat Ex. 3.2 Using New States• Repeat Ex 3 2 using the following states:

1 2 1 1

Repeat Ex. 3.2 using the following states:, , , R Rx x x x x x= −

2 1 2 1 R Rx x x x x xx x x x x x x x x

⇒ = − ⇒ = −⇒ = + ⇒ = + ⇒ = +2 1 2 1 2 1R R Rx x x x x x x x x⇒ = + ⇒ = + ⇒ = +

( )f

2 1( )RM x x+

( )af t2 RK x

RBx

Repeat Ex. 3.2 Using New States• Substituing the new state info. into the prior EoM:

1 1 1 1 2

( ) ( )R RM x K x Bx K x

M x x K x Bx f t

+ = +

+ + +2 1 2

1 2

( ) ( )R R R aM x x K x Bx f t

K K Bx x x x

+ + + =

⇒ = − + + 1 1

1 1 1

1

R Rx x x xM M M

K B

⇒ = − + + 2

1

2 2 2

1( )R R R a

K Bx x x x f t

M M M= − − − +

11 2 2

1 1 2 1 2 2

1 ( )R R a

K K K B B

M M M M M Mx x x f t+ += − − + +

1 1 2 1 2 2

Repeat Ex. 3.2 Using New States• Substituting into the new state eqn. yields:

1 1 1 2x q x q

1 2 1

3 4

TBD from EoM

R R

x q xx q x q

⇒ =

q = = q =3 4

4 TBD from EoMR R

R R

x q x qx q x

Repeat Ex. 3.2 Using New States

1x

q =

1 2

1

K K Bx x x

x

− + +

1

1 1 1

R Rx x xM M M

x

+ +

1 2 21

( )

R

K K K B Bf

x

1 2 2

1

1 1 2 1 2 2

( )R R a

x x x f tM M M M M M

− + − + +

Repeat Ex. 3.2 Using New States• Substituting into the new state eqn. yields:

0 1 0 0

q =

1 2

0 1 0 0

0

00

K K B

1 2

1 1 1

0 00

M M M−

+

q u

1 2 2

0 0 0 11

K K K B B

q

1 2 2

2

1 1 2 1 2

0 MM M M M M

− + − +

= Aq+Bu

Repeat Ex. 3.2 Using New States•The desired outputs can now be expressed as:

2 2 2 1 2 2 3

The desired outputs can now be expressed as:( )K Rf K x x K x K q= − = =

1 1 2 2 1 1 2 1( )( ) ( )

T Rm M x M x M x M x xM q M q q M M q M q

= + = + += + + = + +

2

1 2 2 2 4 1 2 2 2 4

0 0 0 0

( ) ( )K

M q M q q M M q M q

= + + = + +

+ y = u = Cq + Duq

St t t i i b A B C D

1 2 2 00 ( 0)M M M⇒ + + y u Cq + Duq

• State‐space system is given by A, B, C, D

• See Matlab file EX3_2b_Main.m and Simulink file EX3_1.mdl for simulation on class web site

Spring force (relative position)

Momentum of masses

Ex. 3.4• The following system is similar to Ex.3.2, except forThe following system is similar to Ex.3.2, except for

the addition of grounded spring K3

• What is the effect of this additional element on theWhat is the effect of this additional element on the state‐space representation of the system?

Ex. 3.4• The new EoM yields the following state eqn.:

0 1 0 0 1 2 2

1 1 1 1

K K KB B

M M M M

+− −

q = q0 0 0 1

KK B BK+

q = q

322

2 2 2 2

KK B B

M M M M

K− −

+ 0

+

u = Aq + Bu

2

1

M

+

u = Aq + Bu

Ex. 3.7• Find the state‐space representation of the systemFind the state space representation of the system

when the input is fa(t) and the output is x2

• Assume EQ when 0 and 0 (as drawn);x x x x> >• 1 2 1 2

2 2 2 2

Assume EQ when 0, and 0 (as drawn);this implies that: stretched by , stretched by ,

x x x xK x B x

= = > >

1 1 1 1 2 stretched by and stretched by B x K x x−

Ex. 3.7

E M i t f fi t d d d d diff•1 1 1 1 1 1 2

EoM consist of a first order and a second order diff. eqn: ( ) ( )aM x B x K x x f t+ + − =

•2 2 2 2 1 1 2( )B x K x K x x+ = −

1 1 2EoM can be rewritten in terms of the states and :x x x1 1 2

1 1 11 1 1 2

EoM can be rewritten in terms of the states , and : 1 ( )a

x x xK B Kx x x x f tM M M M

= − − + +

1 1 1 2

1 1 2

aM M M M

K K Kx x x

+= − 2 1 2

2 2

x x xB B

= −

Ex. 3.7Manipulating the system into matrix form yields:•

1 1

Manipulating the system into matrix form yields:x q

1 2

2 3

x qx q

=

q =

2q

1 1 11 2 3

21

11

( )a

K B Kf t

M M M Mq q

qxx q− − + +

⇒ =

q =

1 1 21 3

2

M M M M

K K Kx

q q+−

1 3

2 2B Bq q

Ex. 3.7

0 1 0 0

1K B K

1 1 1 1K B K

M M M M− −

q = q + u

1 1 2

2 2

00

K K K

B B

+−

= Aq +Bu

Si th t t i it•[ ] [ ]

2Since the output is , we can write:0 0 1 0

x=y = q + u Cq +Du

• How does model change if B2 is removed?

Ex. 3.7 with B2 Removed

• As shown is Chapter 2, the springs are in series and can be combined to form a simple MSD s stem ithcan be combined to form a simple MSD system with

1 2 1dK K KK 1 2 1

2 11 2 1 2

and eqK x xK K K K

= = + + • System can be expressed in terms of either x1 or x2

Ex. 3.9• Here x2(t) is an input• Here x2(t) is an input,

so the motion of M2 is knownknown

• As shown is Chapter 2, the EoM is:the EoM is:

1 1 1 1 2 2 2 2( ) ( ) ( )eqM x Bx K x B x t K x t u t+ + = +• This be can treated like a simple MSD system, or

alternately we rewrite the system as:

1 1 2 2 1 1 2 2 ( ) ( )eqM x B x t K x Bx K x t

KB KB

− = − − +

2 21 2 1 1 2

1 1 1 1

( ) ( )eqKB KBx x t x x x tM M M M

⇒ − = − − +

Ex. 3.91Defining the system states as and where:Ax x1Defining the system states as and where:

( ) ( )

Ax x

B Bx x x t x x x t

= − ⇒ = + 1 2 1 21 1

( ) ( )A Ax x x t x x x tM M

B

= ⇒ = +

1 2

1

( )ABx x x tM

⇒ = −

21 1 2 ( )eqK KBx x x t

= − − + 1 1 21 1 1

( )M M M

K B

2K B

11 1

eqK BxM M

= − −

2

221 1

( )AK Bx x tM M

+ −

Ex. 3.91 1

This yields the state eqn.: x q 1 1

2A

x qx q

= ⇒

q =

211

( )ABx x tMx

+

11

22

1 22 ( )A eqA

x K KB Bx x x tM M M M

= − − + −

q =

1 221 1 1 1

0 1

AM M M M

B

1

2

0 1

eq

BM

K B

= + q

=

u Aq +Bu2

21 1

1

qK BM MM

− − − 21M

Input‐Output Eqns.• For a system with scalar input u(t) and output y(t)For a system with scalar input u(t) and output y(t),

the system input‐output eqn. has the form:( ) ( )n mb b b

• The derivatives can be expressed using the p

( ) ( )2 1 0 1 0

n mn ma y a y a y a y b u b u b u+ + + + = + + +

• The derivatives can be expressed using the p‐operator with the equation factored as shown:

n mb b b

( ) ( )1 0 1 0

n mn m

n m

a p y a py a y b p u b pu b u

a p a p a y b p b p b u

+ + + = + + +

+ + + = + + +

• This is a useful first step towards developing f f i b d d l l d

( ) ( )1 0 1 0n ma p a p a y b p b p b u+ + + = + + +

transfer function based system models, explored further in Chapter 8, e.g., replace “p” by “s”

Ex. 3.2 Revisited

• EoM:

1 1 1 1 2 1 2 2 1

2 2 2 1 2 2 1

( ) ( )( ) ( ) ( )a

M x K x B x x K x xM x B x x K x x f t

+ = − + −+ − + − =

• Find the input‐output eqn. assuming input fa(t) and output x1

2 2 2 1 2 2 1( ) ( ) ( )af

and output x1

( ) ( )21 1 2 1 2 2M p Bp K K x Bp K x+ + + = +

( ) ( )22 2 2 2 1 ( )aM p Bp K x Bp K x f t+ + − + =

Ex. 3.2 Revisited2Eliminate from the eqns. as shown:x

( )2

21 1 2

Eliminate from the eqns. as shown:x

M p Bp K Kx x

+ + +=

( )( )( )

2 12

2 2

x xBp K

=+

( )( )( )( ) ( )

2 22 2 1 1 2 1

( )

M p Bp K M p Bp K K x

Bp K Bp K x Bp K f t

⇒ + + + + +

− + + = +( )( ) ( )2 2 1 2

4 32 1 1 2 1 1

( )

( )aBp K Bp K x Bp K f t

M M p x M M Bp x

+ + = +

⇒ + +2

2 1 2 1 2 1 1 1( ( ) )( ) ( )

M K K M K p x BK pxK K B f t K f t

+ + + ++ +2 1 1 2( ) ( )a aK K x Bpf t K f t+ = +

Ex. 3.2 RevisitedConverting from p notation back to diff eq formConverting from p-notation back to diff. eq. formyields the input-output eqn.:

( )4 (3)2 1 1 2 1 1( )

( ( ) )M M x M M BxM K K M K BK K K

⇒ + ++ + + + +2 1 2 1 2 1 1 1 2 1 1

2

( ( ) )

( ) ( )a a

M K K M K x BK x K K x

Bf t K f t

+ + + + +

= + 2( ) ( )a af f

System1x( )af t

System

Questions?

Recommended