Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to...

16
Lecture 7: State-Space Modeling 1. Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2. State-space examples 3. Transforming between model types ME 431, Lecture 7 1

Transcript of Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to...

Page 1: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

Lecture 7: State-Space Modeling

1. Introduction to state-space modeling• Definitions• How it relates to other modeling

formalisms

2. State-space examples

3. Transforming between model types

ME 4

31

, L

ect

ure

7

1

Page 2: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

State-Space Modeling

• A state-space model represents a system by a series of first-order differential state equations and algebraic output equations

• State-space models are numerically efficient to solve, can handle complex systems, allow for a more geometric understanding of dynamic systems, and form the basis for much of modern control theory

ME 4

31

, L

ect

ure

7

2

Page 3: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

Example

• Consider the following system where u(t) is the input and is the output

• Can generate a state-space model by pure mathematical manipulation by changing variables

ME 4

31

, L

ect

ure

7

3

5 3 2x x x x u

( )x t

1 2 3, , x x x x x x

Page 4: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

Example (continued)

• System has 1 input (u), 1 output (y), and 3 state variables (x1, x2, x3)

ME 4

31

, L

ect

ure

7

4

1 2

2 3

3 3 2 1

5 3 2

x x

x x

x x x x u

2y x

stateequations

outputequation

Page 5: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

State-Space Modeling

• In general state-space models have the following form (equations can be nonlinear and time varying)

ME 4

31

, L

ect

ure

7

5

1 1 1 2 1

1 2 1

( , , , , , , )

( , , , , , , )

n m

n n n m

x f x x x u u

x f x x x u u

state

equations

outputequations

1 1 1 2 1

1 2 1

( , , , , , , )

( , , , , , , )

n m

p p n m

y h x x x u u

y h x x x u u

Page 6: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

State-Space Modeling

• For linear systems, can write as matrices

• For our prior example

ME 4

31

, L

ect

ure

7

6

x x u

y x u

A B

C D

1 1

2 2

3 3

1

2

3

0 1 0 0

0 0 1 0

2 3 5 1

0 1 0 0

x x

x x u

x x

x

y x u

x

Page 7: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

State-Space Modeling

• There is a more intuitive way to find state-space models• Recall the difference between static and

dynamic models

• Static system – current output depends only on current input• Dynamic system – current output depends on

current and past inputs (can be captured by initial conditions)

ME 4

31

, L

ect

ure

7

7

SYSTEMinput output

Page 8: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

State-Space Modeling

• Question: What initial conditions do I need to capture the system’s state?

• Definition: the state of a dynamic system is the smallest set of variables (called state variables) whose knowledge at t = t0 along with knowledge of the inputs for t ≥ t0 completely determines the behavior of the system for t ≥ t0

# of state variables = # of independent energy storage elements

ME 4

31

, L

ect

ure

7

8

Page 9: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

Example

Equations of motion:

ME 4

31

, L

ect

ure

7

9

1

2

( ) ( ) 0

( ) ( )

m y b y z k y z

m z b z y k z y u

One choice of state variables:

1 2

3 4

, ,

,

x y x y

x z x z

Page 10: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

Example

• Rather, look at where energy is stored

Energy Storage Element State Variablespring (stores elastic PE)

mass 1 (stores KE)

mass 2 (stores KE)

damper does not store energy, it dissipates energy

Also, choice of state variables is not unique

ME 4

31

, L

ect

ure

7

10

1 ( )x y z

2x y

3x z

Page 11: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

Example

ME 4

31

, L

ect

ure

7

11

Page 12: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

Example

• # of state variables ≠ # of energy storage elements if:1. Some elements are constrained together

(dependent)2. Some equations cannot be expressed in

terms of the minimum # of state variables

ME 4

31

, L

ect

ure

7

12

Page 13: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

Transforming Between Model Types• State space to transfer function

ME 4

31

, L

ect

ure

7

13

Page 14: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

Example

ME 4

31

, L

ect

ure

7

14

0 1 1 1 0 0

2 3 0

A B C D

Page 15: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

Transforming Between Model Types• Note, poles (roots of the denominator)

can be found from

poles of transfer function = eigenvalues of A

• From transfer function to state space• The state-space form is not unique,

so there are many choices (transfer function is unique)• Look up a form in a book

ME 4

31

, L

ect

ure

7

15

det =0 s I A

Page 16: Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.

Summary of Model Forms• State space/differential equations (time

domain)• Numerically efficient to solve, simulate• Can include initial conditions• Can model nonlinear, time-varying, MIMO

systems• Facilitates a geometric interpretation of systems • Difficult to see output behavior from inspection

• Transfer function (frequency domain)• Algebraic representation• Easy to connect components• Can use frequency response techniques• Cannot include initial conditions• Can only model LTI, SISO systems

ME 4

31

, L

ect

ure

7

16