MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space...

25
MM2 MM2. State Space Analysis 0. Review of MM1 & exercise one 1 SS model from block diagram 1. SS model from block diagram 2. Nonlinear SS model and linearization 3 P t l i St bilit 3. Property analysis: Stability, Controllability, Observability Reading Material: 2/11/2009 Modern Control 1

Transcript of MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space...

Page 1: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

MM2MM2. State Space Analysis

0. Review of MM1 & exercise one 1 SS model from block diagram1. SS model from block diagram2. Nonlinear SS model and linearization3 P t l i St bilit3. Property analysis: Stability,

Controllability, Observability

Reading Material:g

2/11/2009 Modern Control 1

Page 2: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

StateState--Space DescriptionSpace Description –– from MM1from MM1The state-space representation is given by the equations:

StateState--Space Description Space Description –– from MM1from MM1

)()()( tButAXdttdX

+= State equation )()()( tDutCXtY

dt+=

qOutput equation

where X(t) is an nx1 vector representing the state (e.g., position and velocity variables in mechanical systems)position and velocity variables in mechanical systems)u(t) is a scalar representing the input

( ) i l i hy(t) is a scalar representing the output. The matrices A (nxn), B (nx1), and C (1xn) determine the relationships between the state and input and output variables.

2/11/2009 Modern Control 2

Page 3: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

To get a State Space model –– from MM1from MM1To get a State Space model –– from MM1from MM1

P dProcedure Define system states, input(s), output(s)Derive system matrices: A,B,C,D

Resources Via transfer functions: [A,B,C,D] = tf2ss(NUM,DEN)

Via other SS descriptions: sysT = ss2ss(sys,T)p y ( y , )Via system identification: ident in Matlab…

2/11/2009 Modern Control 3

Page 4: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

How about your exercise?SS model of your systemSS model of your system

K/s^2motor

SS model of Each block...Entire system’s SS modelEntire system s SS model ...

Order, states, input(s), output(s), system matrices...System configuration – serial, parrallel, feedback...

2/11/2009 Modern Control 4

Page 5: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

MM2MM2. State Space Analysis

0. Review of MM1 & exercise one 1 SS model from block diagram1. SS model from block diagram2. Nonlinear SS model and linearization3 P t l i St bilit3. Property analysis: Stability,

Controllability, Observability

2/11/2009 Modern Control 5

Page 6: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

2/11/2009 Modern Control 6

Page 7: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

2/11/2009 Modern Control 7

Page 8: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

MM2MM2. State Space Analysis

0. Review of MM1 & exercise one 1 SS model from block diagram1. SS model from block diagram2. Nonlinear SS model and linearization3 P t l i St bilit3. Property analysis: Stability,

Controllability, Observability

2/11/2009 Modern Control 8

Page 9: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

⎤⎡⎤⎡

, :system linearized The .),(ˆ

),(

),(),(

),,(ˆ

),(

),(),(

:model) (SS systemnonlinear Original 2

1

2

1

DUCXYBUAXXUXG

UXg

UXgUXg

YUXF

UXf

UXfUXf

X

nn

+=+==

⎥⎥⎥⎥

⎢⎢⎢⎢

==

⎥⎥⎥⎥

⎢⎢⎢⎢

= &MM

&

e gpoint(s)mequilibriuofCalculaton(1):ionLinearizat

00 )U(X

nn ⎦⎣⎦⎣

),(),(),(),(),(),( wherematrices,Jacobian ofn Calculatio(2)

e.g.point(s),mequilibriuofCalculaton (1)

111111

00

UXfUXfUXfUXfUXfUXf

),U(X

⎥⎤

⎢⎡

∂∂

∂∂

∂∂

⎥⎤

⎢⎡

∂∂

∂∂

∂∂

LL

,),(),(),(

,),(),(),( 2

2

2

1

2

21

2

2

2

1

2

21

m

m

n

n

uUXf

uUXf

uUXf

uuu

BxUXf

xUXf

xUXf

xxx

A⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

∂∂

∂∂

∂∂

∂∂∂

=⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

∂∂

∂∂

∂∂

∂∂∂

=MOMM

L

MOMM

L

),(),(),(),(),(),(

00|2100|21 ),U(Xm

nnn

),U(Xn

nnn

uUXf

uUXf

uUXf

xUXf

xUXf

xUXf

⎥⎥⎥

⎦⎢⎢⎢

⎣ ∂∂

∂∂

∂∂

⎥⎥⎥

⎦⎢⎢⎢

⎣ ∂∂

∂∂

∂∂

L

MOMM

L

MOMM

)()()(

),(),(),(

)()()(

),(),(),(

222

1

2

1

1

1

222

1

2

1

1

1

0000

mnUXgUXgUXg

uUXg

uUXg

uUXg

UXgUXgUXgxUXg

xUXg

xUXg

⎥⎥⎥⎤

⎢⎢⎢⎡

∂∂∂∂

∂∂

∂∂

⎥⎥⎥⎤

⎢⎢⎢⎡

∂∂∂∂

∂∂

∂∂

∂LL

,

),(),(),(

),(),(),(,

),(),(),(

),(),(),( 2

2

2

1

22

2

2

1

2

ppp

m

ppp

n

UXgUXgUXg

uUXg

uUXg

uUXg

D

UXfUXfUXg

xUXg

xUXg

xUXg

C

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

∂∂∂

∂∂

∂∂

∂∂

=

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

∂∂∂

∂∂

∂∂

∂∂

=MOMM

L

MOMM

L

2/11/2009 Modern Control 9

),(),(),(),(),(),(

00|2100|21 ),U(Xm

ppp

),U(Xn

ppp

uUg

uUg

uUg

xUf

xUf

xUg

⎥⎦

⎢⎣ ∂

∂∂

∂∂

∂⎥⎦

⎢⎣ ∂

∂∂

∂∂

∂LL

Page 10: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

Control of suspended ball- Modellingp g

The equations for the system are given q y gby:

where h is the vertical position of thewhere h is the vertical position of the ball, i is the current through the electromagnet V is the applied voltageelectromagnet, V is the applied voltage, M is the mass of the ball, g is gravity, L is the inductance R is the resistanceis the inductance, R is the resistance, and K is a coefficient that determines the magnetic force exerted on the ball

M = 0.05 Kg, K = 0.0001, L = 0.01 H, R = 1 Ohm,

2/11/2009 Modern Control 10

the magnetic force exerted on the ball g = 9.81 m/sec^2

Page 11: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

Control of suspended ball- SS Model

Th t i t ilib i (th b ll i d d iThe system is at equilibrium (the ball is suspended in midair) whenever h = K i^2/Mg (dh/dt = 0). Li i h i b h i h 0 01 ( hLinearize the equations about the point h = 0.01 m (where the nominal current is about 7 amp) and get the state

tispace equations:

A = [ 0 1 0 980 0 -2.8 0 0 -100]; B = [0 0 100]; C = [1 0 [ ]; [ ]; [0];

2/11/2009 Modern Control 11

Page 12: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

Dynamic Behavior of SS Model Dynamic Behavior of SS Model –– Scalar Case Scalar Case

2/11/2009 Modern Control 12

Page 13: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

StateState--Space Description Space Description –– General CaseGeneral Case

CXYBUAXX

.

⎪⎩

⎪⎨⎧ +=

XAsICsUBAsICsY

CXY

)()()()( 011 −− −+−=

⎪⎩ =

τττ dBUCeXCetYt

t

tAttA )()(

)()()()(

0

0 )(0

)(

0

∫ −− +=

Transition matrix

Matlab: Step(sys), imp(sys), ... Ltiview(sys)...

2/11/2009 Modern Control 13

Page 14: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

MM2MM2. State Space Analysis

0. Review of MM1 & exercise one 1 SS model from block diagram1. SS model from block diagram2. Nonlinear SS model and linearization3 P t l i St bilit3. Property analysis: Stability,

Controllability, Observability

2/11/2009 Modern Control 14

Page 15: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

T f F ti f St t E tiT f F ti f St t E tiTransform function

Transfer Function from State EquationsTransfer Function from State Equations[A B C D] = tf2ss(NUM DEN)Transform function

DBAsICsYsGBUAXX +−==⇒⎪⎨⎧ += − 1

.

)()()(

[A,B,C,D] = tf2ss(NUM,DEN)[NUM,DEN] = ss2tf(A,B,C,D)

DBAsICsU

sGDUCXY

+⇒⎪⎩⎨

+=)(

)()(

State space description fequency response description

det.DCBAsI

BUAXX⎥⎦

⎤⎢⎣

⎡ −−

⎪⎧

State-space description fequency response description

)det()(

AsIDC

sGDUCXYBUAXX

−⎦⎣=⇒

⎪⎩

⎪⎨⎧

+=+=

Ei l f A P l f G( )Eigenvalues of Aeig(A)

Poles of G(s)roots(denominator)

Transmission zero Zeros of G(s)

2/11/2009 Modern Control 15tzero(A,B,C,D)

( )roots(numerator)

Page 16: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

StabilityStabilityThe continuous-time LTI system is stable iff theThe continuous time LTI system is stable iff the eigenvalues of the system matrix A all lie in the left half s planeleft-half s-planeThe discrete-time LTI system is stable iff the eigenvalues of the system matrix Φ all lie inside the unit circleCharacterisitc equation

d ( I A) 0det(sI-A)=0det(zI-Φ)=0det(zI Φ) 0

2/11/2009 Modern Control 16

Page 17: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

Control suspended ball-Open-loop AnalysisControl suspended ball Open loop Analysis

St bilit l i (A)Stability: poles = eig(A)

It looks like the distance between the ball and the electromagnet will go to infinity, but probably the y, p yball hits the table or the floor first (and also probably goes out of the range whereour linearization is valid).

2/11/2009 Modern Control 17

Page 18: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

C i i fi i iControllability – Definition

Controllability is concerned with the question whether it is at all possible to control all states, disregarding how this p , g gmight be done

Controllability: for any given initial state, there always exists a piecewise continuous control input such that within a finite period the LTI system will reach thewithin a finite period the LTI system will reach the original point from the initial state.

A LTI system is controllable if and only if TC=[B AB A2B An-1B ]TC [B AB A B .... A B ]

is full row rank

2/11/2009 Modern Control 18

is full row rank

Page 19: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

Controllability - BenefitsIf the system is controllable, then the system can be

Controllability Benefits

transformed into a control canonical formIf the system is controllable, then the closed-loop y , psystem’s poles can be put in any arbitrary locations through state feedback; g ;

N i l li t f ti d t h thNosingular linear transformation does not change the system’s controllability; Controllability can not be decided from the transfer function

2/11/2009 Modern Control 19

Page 20: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

T f t C t l C i l FT f t C t l C i l FTransform to Control Canonical FormTransform to Control Canonical Form

Step one: computer the controllability matrixTC=[A AB A2B .... An-1B ] ( ctrb(A,B), ctrb(sys))C [ ] ( ( , ), ( y ))

Step two: computer the row tn throught =[ 0 0 1]T -1tn=[ 0 0 .... 1]TC

1

Step three: computer the entire transform matrix

⎥⎥⎤

⎢⎢⎡

=−

−n

n

nn

AtAt

T2

1

1

⎥⎥⎥

⎦⎢⎢⎢

=

nt

TM

Step four: computer new system matrices using T and T-1

⎦⎣

11

2/11/2009 Modern Control 20DDCTCBTBATTA cccc ==== −− ,,, 11

Page 21: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

Full State Feedback ControlFull State Feedback ControlFull State Feedback ControlFull State Feedback Control

X=AX+Bu C

u=-KX

Open loop system Closed loop system

)(..

⎪⎧ =⎪⎧ += XBKAXBUAXX

p p y p y

0))(det(0)det(

)(

=−−=−

⎪⎩

⎪⎨

=−=⇒

⎪⎩

⎪⎨

=+=

BKAsIAsICXY

XBKAXCXY

BUAXX

0))(det(0)det( BKAsIAsI

2/11/2009 Modern Control 21Continue...

Page 22: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

ObservabilityObservability -- DefinitionDefinitionObservability is concerned with the question whether it is at ll ibl t fi d ll t t f th d t t

Observability Observability -- DefinitionDefinition

all possible to find all states from the measured outputs, disregarding how this might be done

Observability: any given initial state can be determined from the knowledge of input U and output Y over a finite time g p pinterval

The considered system is called observable if and only if the observability matrix is full column rank: y

⎥⎤

⎢⎡ C

⎥⎥⎥⎥

⎢⎢⎢⎢

=:CA

OmatrixityobservabilM

2/11/2009 Introduction to Process Control 22⎥⎦

⎢⎣

−1nCA

Page 23: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

Observer canonical formObserver canonical form

A⎪⎧.

oo

oooo

XCYUBXAX

⎪⎩

⎪⎨⎧

=+=

oo

ba⎥⎤

⎢⎡

⎥⎤

⎢⎡ −

M

L 11 01

oo

bB

aA

⎥⎥⎥⎥

⎢⎢⎢⎢

=

⎥⎥⎥⎥

⎢⎢⎢⎢ −

=MOMM

ML 22 ,,1

0

[ ]nn ba ⎥⎥

⎦⎢⎢

⎣⎥⎥

⎦⎢⎢

⎣ − 000[ ]

nno

bsbsbsbwhere

C

+++=

=−− L

L2

21

1 ,)(

001

nnnn

n

asasassa

bsbsbsbwhere

++++=

+++−− L2

21

1

21

)(

,)(

2/11/2009 Introduction to Process Control 23

Page 24: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

EstimatorEstimator DesignDesignObjective

Estimator Estimator Design Design

Estimate the system state through output and input⎪⎧⎥

⎤⎢⎡l .1

⎪⎩

⎪⎨⎧

=+=

⎥⎥⎥

⎦⎢⎢⎢

=−++=CXY

BUAXXandl

LwhereXCyLBuXAX

n

1.

,)ˆ(ˆˆ M

Estimator Structure

(A B) Cu(t) Y(t)X(t)

(A,B)

(A B)

C

C

Y(t)

+(A,B)

L

C -

2/11/2009 Introduction to Process Control 24

L

Page 25: MM2MM2. State Space Analysishomes.et.aau.dk/yang/course/modcon08/mm2-08... · State-Space Description – from MM1 The state-space representation is given by the equations: Space

Exercise Two(1) Obtain the nonlinear SS model of your system(1) Obtain the nonlinear SS model of your system(2) Linearize your nonlinear SS system(3) Compare the system features (e.g., step

response bode plot) of the obtained linearresponse, bode plot) of the obtained linear model with the linear SS model you obtained through the linearized equation (MM1)

(4) Determine the stabilit controllabilit and(4) Determine the stability, controllability and observability of your obtained linear model

2/11/2009 Modern Control 25