Sie sind auf Seite 1von 10

State-space systems

Approach:

Represent

Represent n th order di erential equation as a 1st order matrix di erential equation with dimension n .

Design methods now involve linear algebra.

Easy to handle large systems (with Matlab).

Easy to handle systems with multiple inputs and outputs.

Easy to simulate systems.

the plant, P ( z ) (or P ( s)) as an n th order di erential equation.

x ( k + 1) = A x ( k ) + B u ( k ) ,

y ( k ) = C x ( k ) + D u ( k ) .

A , B , C and D can be matrices. x ( k ) is a vector (state vector).

Roy Smith: ECE 147b 8 : 1

State-space systems

Representations: From transfer function to state-space.

Consider a linear, shift invariant, system:

y

( k )

P ( z )

u

(

k )

We can express this as a transfer function,

y ( z )

=

P ( z ) u ( z )

=

a( b ( z z ) ) u ( z )

where a( z ) and b ( z ) are polynomials, so,

P ( z )

=

b ( z )

=

b 0 z m + b 1 z m 1 + ··· + b m

a( z

) z n + a 1 z n 1 + ··· + a n

.

For causal systems the order of b ( z ) is less than or equal to the order of a( z ). So m n above.

Assume for now that m < n ,

State-space systems

Outline:

1. Draw the system as an interconnected “chain of delays”,

2. Relabel the signals in the system,

3. Rewrite the input/output equations in terms of the new signals,

4. Abbreviate the equations to a matrix form (state-space).

Drawing a digital system block diagram in terms of delays is exactly the same as drawing a continuous system block diagram in terms of integrators.

Split the system,

y

( z )

b

( z )

ζ ( z )

1

a( z )

u

ζ ( z )

=

a( 1 z ) u ( z )

and

y ( z )

=

b ( z ) ζ ( z ) .

( z )

Roy Smith: ECE 147b 8 : 3

State-space systems

Chain of delays:

Consider

the first equation:

ζ ( z )

=

a( 1 z ) u ( z )

We want to develop a chain of delay model to get ζ ( k ):

First step: Write the expression for n delays:

 

ζ ( k )

=

z 1 ζ ( k + 1)

.

.

.

.

ζ ( k +

n 1) =

z 1 ζ ( k + n )

In pictures

ζ (k )

z

1

ζ (k + 1)

ζ (k + n 2)

z

1

ζ (k + n 1)

z

1

ζ (k + n )

Second step:

Express ζ ( k + n ) in terms of ζ ( k ),

, ζ ( k + n 1) and u ( k ).

State-space systems

Second step:

Express ζ ( k + n ) in terms of ζ ( k ),

To do this, write this as: ζ ( z ) a( z ) = u ( z ),

Expanding a( z ) gives,

z n + a 1 z n 1 +

··· + a n ζ ( z ) = u ( z )

, ζ ( k + n 1) and u ( k ).

and expressing this in terms of the highest power of z gives:

z n ζ ( z ) = u ( z ) a 1 z n 1 + ··· + a n ζ ( z ) .

Now write this is the time domain, ζ ( k + n ) = u ( k ) (a 1 ζ ( k + n 1) + ··· + a n ζ ( k )) .

This is the form we need to include in our block diagram.

Roy Smith: ECE 147b 8 : 5

State-space systems

Block diagram of:

ζ ( z )

=

a( 1 z ) u ( z )

ζ ( k + n ) = u ( k ) (a 1 ζ ( k + n 1) + ··· + a n ζ ( k )) .

ζ ( k ) ζ ( k + 1) ζ ( k + n −
ζ ( k )
ζ ( k + 1)
ζ ( k
+ n − 1)
ζ ( k + n )
u ( k )
✓✏
✈ z − 1
✛ ✈
✈ z − 1
+
✒✑
✓✏
a 1
+
✒✑
✓✏
a n − 1
+
✒✑
a n

State-space systems

Numerator term:

y ( z )

=

b ( z ) ζ ( z )

Expanding the b ( z ) polynomial gives,

y ( z ) =

b ( z

)

ζ ( z ) ,

=

b 0 z m + b 1 z m 1 +

··· + b m ζ ( z )

and in the time domain this is,

y ( k ) =

b 0 ζ ( k + m) + b 1 ζ ( k + m 1) + ··· + b m ζ ( k ) .

As m < n all of the signals ζ ( k ) to ζ ( k + m) are available along to the top of the chain of delays.

So y ( k ) is just a linear combination of signals from the previous block diagram.

Roy Smith: ECE 147b 8 : 7

“Chain of delays” block diagram b ✛ 0 ζ ( k + m) ζ (
“Chain of delays” block diagram
b
0
ζ
( k + m)
ζ
( k + 1)
✎☞
+
b
m − 1
✍✌
ζ ( k + n − 1)
ζ ( k + n )
y
( k )
ζ
( k )
u
( k )
✎☞
✎☞
+
b
z − 1
z − 1
+
m
✍✌
✍✌
✎☞
a
+
1
✍✌
✎☞
a
n − 1
+
✍✌
a
n

This could actually be constructed from shift registers, summers and multipliers.

State-space representations

What if

m = n

?

Remove the highest order terms by polynomial division,

b

( z

)

a( z

)

=

d

+

ˆ

b

( z

)

a( z ) .

ˆ

Now d is a constant and b ( z ) has order m 1 < n .

We deal with

In pictures

ˆ

b

( z )

a( z

) exactly as before and then add the constant, d , to the result.

y

( k )

 

ˆ

 

u

✎☞

✍✌

+

b

( z )

 

a( z )

 

 
 

 

d

   

(

k )

Roy Smith: ECE 147b 8 : 9

State-space representations

Developing the matrix equations

Relabel our intermediate variables,

x 1 ( k ) = x 2 ( k ) =

ζ ( k + n 1) ζ ( k + n 2)

.

.

.

.

x n ( k ) =

ζ ( k )

Now work out what happens to each of them at time k + 1:

x 1 ( k + 1)

=

ζ ( k

+ n )

=

u ( k ) ( a 1 ζ ( k + n 1) + ··· + a n ζ ( k ))

 

=

u ( k ) ( a 1 x 1 ( n ) + ··· + a n x n ( k ))

x 2 ( k + 1)

=

ζ ( k + n 2 + 1)

=

x

1 ( k )

.

.

.

.

.

x n ( k + 1)

=

ζ ( k

+ 1)

=

x n 1 ( k )

Now look at this as a matrix multiplication.

State-space representations

Matrix equations

x 1 ( k + 1) = a 1 x 1 ( k ) a 2 x 2 ( k ) · · · a n 1 x n 1 ( k ) a n x n ( k ) + u ( k )

x 2 ( k + 1)

=

x 1 ( k

)

x 3 ( k + 1)

=

x

2 ( k

)

.

.

.

x n ( k + 1) =

or

.

.

.

x n 1 ( k )

x 2 ( k + 1)

  =

x 1 ( k + 1)

.

.

.

x n ( k + 1)

a 1

1

.

.

.

0

x

a 2

0

.

···

.

.

1 ( k )

· · · a n 1 a n

···

.

.

.

0

1

0

.

.

.

0

x

x

x

1 ( k )

2 ( k )

.

.

.

n ( k )

+

   u ( k )

1

0

.

.

.

0

Define the state: x ( k ) =

x

x

2 ( k )

.

.

.

n ( k )

to get the final equations.

 

Roy Smith: ECE 147b 8 : 11

 

State-space representations

Matrix equations

x ( k + 1)

=

A x ( k )

+

B u ( k ) ,

 

where

A

=

.

a 1

1

.

.

a 2

0

.

···

.

.

· · · a n 1 a n

 

1

0

 

.

.

 
 

0

0

.

 

and

B

=

.

0

.

···

.

1

0

.

0

This is the “state-update” equation (or sometimes just the “state”equation).

What about the output y ( k ) ?

y ( k )

b 0 ζ ( k + m)

=

= C x ( k )

b 0 x n m ( k )

=

where

C = 0

0

b 0

.

+b 1 ζ ( k + m 1)

+b m ζ ( k )

+b 1 x n m 1 ( k ) ··· +b m x n ( k )

···

.

.

b m .

If m = n 1 then there are no leading zeros in C .

Roy Smith: ECE 147b 8 : 12

State-space systems

Equal numerator and denominator order case:

y

( k )

 

yˆ( k )

ˆ

 

u

✎☞

✍✌

+

b

( z )

 

a( z )

 

 
 

 

d

   

(

k )

We can calcuate the state-space representation for

x ( k + 1) =

A x ( k )

+

yˆ( k ) = C x ( k ) ,

B u ( k ) ,

and as, y ( k ) = yˆ( k )

+ d u ( k ), we have,

x ( k + 1) =

A x ( k )

)

y ( k ) = C

x ( k

+

+

B u ( k ) , d u ( k ) .

ˆ

b

a( z ) :

( z )

Roy Smith: ECE 147b 8 : 13

State-space systems

Other domains:

Discrete time,

time invariant:

x ( k + 1) = A x ( k ) + B u ( k ) ,

y ( k ) = C x ( k ) + D u ( k )

Continuous time,

time invariant:

d x ( t)

= A x ( t) + B u ( t) ,

dt y ( t) = C x ( t) + D u ( t)

Nonlinear,

time invariant:

Nonlinear,

time varying:

d

x ( t)

dt y ( t)

d

x ( t)

=

=

=

f ( x ( t) , u ( t)) ,

g ( x ( t) , u ( t))

f ( t, x ( t) , u ( t)) ,

dt y ( t) = g ( t, x ( t) , u ( t))

Roy Smith: ECE 147b 8 : 14

State-space systems

Examples: A thermal control system:

T 0 (t)

T (t) 2 Heater terminals T (t) 1 e(t)
T
(t)
2
Heater
terminals
T
(t)
1
e(t)

T i ( t) temperature of volume i e( t) energy into the volume 1

m i

c i

k ij

mass of volume i

specific heat for volume i thermal conductance for i, j interface

We can derive the state-space representation directly from the thermal energy equations.

For

volume

1:

For

volume

2:

m 1 c 1 d T 1 ( t) dt

m 2 c 2 d T 2 ( t) dt

= k 12 ( T 2 ( t) T 1 ( t))

=

k 12 ( T 2 ( t) T 1 ( t))

k 20 ( T 2 ( t) T 0 ( t))

+ e( t)

Roy Smith: ECE 147b 8 : 15

State-space examples:

Thermal system:

Suppose that T 1 ( t) is the output of interest and e( t) and T 0 ( t) are both inputs.

Now select state variables which will allow us to put this into the generic state-space matrix equation form.

Try x ( t) =

T

1

T

(

t)

2 ( t) .

Then, rearranging gives,

So,

d T 1 ( t) dt

d T 2 ( t) dt

= k 12

=

m

k

1 c 1

k 12 c 1 T 2 ( t)

m

1

T 1 ( t) +

c 2 T 1 ( t) + k 12 k 20 T 2 ( t) +

12

m

2

m

2 c 2

k 20 c 2 T 0 ( t) +

m

2

1 c 2 e( t)

m

2

A =

d

T 1 ( t) dt

T 2 ( t) dt

d

= A

T 2 ( t) + B T 0 ( t)

T 1

(

t)

e( t)

,

where A =

k 12

m

k

1 c

1

12

m

2 c

2

k

12

m

1 c 1

k 12 k 20

m

2 c 2

Roy Smith: ECE 147b 8 : 16

State-space examples

Exercises:

1. What is B ?

2.

3. What is D ?

4. What would C and D be if we had both T 1 ( t) and T 2 ( t) as outputs?

5. Calculate the transfer functions from e( t) and T 0 ( t) to T 1 ( t).

What is C ?

Roy Smith: ECE 147b 8 : 17

State-space examples:

DC Motor connected to a rotational load

θ

τ f J τ
τ f
J
τ

i

+ L R + V V in emf − −
+
L
R
+
V
V in
emf

The “back emf” is proportional to motor speed: V emf = K d θ

dt .

The motor has a series resistance, R , and inductance, L , so V in = V emf + L d dt i + R i.

The motor torque is proportional to the motor current: τ = K τ i.

There is a friction torque, τ f opposing the motor and proportional to its speed: τ f = b d θ

dt .

The rotational load has inertia J so the torque balance equation is: J d 2 θ

dt 2

+ τ f = τ .

Roy Smith: ECE 147b 8 : 18

State-space examples:

DC Motor connected to a rotational load

We are interested in the model from the input voltage, V in , to the rotor angle, θ .

Exercise:

1. How many states are required for this model?

2. Derive a state-space representation.

3. What are the poles of the system?

Roy Smith: ECE 147b 8 : 19