Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Jack H.Dynamic system modeling and control.2004.pdf
Скачиваний:
73
Добавлен:
23.08.2013
Размер:
5.61 Mб
Скачать

state space control - 22.1

22. SYSTEM IDENTIFICATION

Topics:

Objectives:

22.1INTRODUCTION

A simple example

d

----Xout = AXout + BXin

dt

d

----Yout = CXout + DXin

dt

state space control - 22.2

Given a system model for a force applied to a mass,

d

=

v

----x

dt

 

 

 

 

d

=

F

----v

----

dt

 

 

 

M

 

 

 

 

 

d

x

 

=

----

 

 

 

dt

v

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

0

1

 

x

+

 

 

F

0

0

 

v

 

----

 

 

 

 

 

 

 

 

 

M

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

state space control - 22.3

For an unknown second order linear system,

d

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

x

=

 

a b

 

 

 

x

+

e

 

F

----

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

dt

v

 

 

 

c d

 

 

 

v

 

 

 

 

f

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

d

x

i

=

 

a b

 

 

x

i

+

 

 

 

e

F

----

 

 

 

 

 

 

 

 

 

 

 

dt

v

i

 

 

c d

 

 

v

i

 

 

 

 

f

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The state variables can be replaced with backwards difference equations,

 

 

xi xi – 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

--------------------

 

 

 

 

 

 

 

 

xi – 1

 

 

 

 

 

 

 

T

=

a b

 

xi

xi – 2

+

e

F

xi

– 2xi – 1 + xi – 2

 

 

c d

 

 

 

f

 

 

 

--------------------

 

 

 

-----------------------------------------

 

 

 

 

 

 

 

T

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The equations can then be written for three different set of points to yield six equations.

xi xi – 2

 

 

 

xi xi – 2

 

 

 

 

 

 

 

--------------------T

 

= axi – 1 + b--------------------

 

T

+ eF

 

 

 

 

 

a( x

) + b

x--------------------i xi – 2 + c( 0) + d( 0) + e( F) + f( 0) = x--------------------i xi – 2

 

 

 

 

i – 1

 

T

 

 

 

 

 

T

 

 

a( x

) + b

x---------------------------i – 3 xi – 5

+ c( 0) + d( 0) + e( F) + f( 0) =

x---------------------------i – 3 xi – 5

 

 

i – 4

 

 

T

 

 

 

 

 

T

 

a( x

) + b

x---------------------------i – 6 xi – 8

+ c( 0) + d( 0) + e( F) + f( 0) =

x---------------------------i – 6 xi – 8

 

 

i – 7

 

 

T

 

 

 

 

 

T

 

xi – 2xi – 1 + xi – 2

 

 

 

xi

x i – 2

+ fF

 

 

 

 

----------------------------------------T

2

 

= cxi – 1 + d--------------------

 

T

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

a( 0) + b( 0) + c( x

 

) + d x--------------------i xi – 2 + e( 0) + f( F) = x-----------------------------------------i – 2xi – 1 + xi – 2

 

 

 

 

 

i – 1

 

T

 

 

T

2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

a( 0) + b( 0)

+ c( x

 

) + d

x---------------------------i – 3 xi – 5

+ e( 0) + f( F) =

x-----------------------------------------------i – 3 – 2xi – 4 + xi – 5

 

 

 

 

 

i – 4

 

T

 

 

 

T

2

 

 

 

 

 

 

 

 

 

 

 

 

 

a( 0) + b( 0)

+ c( x

 

) + d

---------------------------xi – 6 xi – 7

+ e( 0) + f( F) =

x-----------------------------------------------i – 6 – 2xi – 7 + xi – 8

 

 

 

 

 

i – 7

 

T

 

 

 

T

2

 

 

 

 

 

 

 

 

 

 

 

 

 

state space control - 22.4

The equations can be rewritten in matrix form,

 

xi xi – 2

 

 

 

 

 

 

 

 

 

 

 

 

 

xi xi – 2

 

 

0

 

0

 

F 0

 

 

 

 

 

 

 

xi – 1 ---------

T-----------

 

 

 

 

 

 

 

 

 

T

 

 

 

 

 

 

 

 

 

 

 

 

 

 

xi – 3 xi – 5

 

xi – 3

xi – 5

0

 

0

 

F 0

 

 

 

 

 

 

-------------xi – 4

--------------T

 

 

 

a

 

 

 

T

 

 

 

 

 

 

 

 

 

 

 

xi – 6 xi – 8

 

xi – 6

xi – 8

0

 

0

 

F 0

 

b

 

 

xi – 7 -------------

T--------------

 

 

 

c

=

 

 

T

 

 

 

 

 

 

 

 

 

 

xi – 2xi – 1 + xi – 2

 

 

 

 

xi xi – 2

 

 

 

d

 

0

0

xi – 1

0 F

 

 

 

---------

T--------

---

 

e

 

 

 

T2

 

 

 

x

i – 3

x

i – 5

 

 

 

 

f

 

xi – 3

– 2xi – 4 + xi – 5

0

0

xi – 4

 

0 F

 

 

 

 

 

-----------------------------------------------

 

 

 

 

 

 

----------

T-------

-------

 

 

 

 

 

 

 

T2

0

0

xi – 6

xi – 7

0 F

 

 

 

 

 

xi – 6

– 2xi – 7 + xi – 8

xi – 7 ---

----------

T-------

-------

 

 

 

 

 

-----------------------------------------------

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Some sample data points can be calculated for F=1 and M=1,

x =

1

2

=

1 F

2

F = 1

M = 1

--at

 

-- ----t

T = 1

 

2

 

 

2 M

 

 

 

x( 0) = 0

xi – 8 = 0

x( 1) = 0.5

xi – 7 = 0.5

x( 2) = 2

xi – 6 = 2

x( 3) = 4.5

xi – 5 = 4.5

x( 4) = 8

xi – 4 = 8

x( 5) = 12.5

xi – 3 = 12.5

x( 6) = 18

xi – 2 = 18

x( 7) = 24.5

xi – 1 = 24.5

x( 8) = 32

xi = 32

state space control - 22.5

The values can be substituted into the matrix, and the matrix solved

 

 

 

 

 

32 – 18

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

32 – 18

 

 

 

 

 

24.5

 

0

 

0

 

 

1 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-----------------

 

 

 

1

 

 

 

 

 

1-----------------

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

12.5 – 4.5

 

 

 

 

12.5 – 4.5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

0

 

0

 

 

1 0

 

 

 

 

 

 

-----------------------

 

 

 

1

 

 

 

 

 

 

 

 

-----------------------1

 

 

 

 

 

a

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2 – 0

 

 

 

 

 

 

 

 

 

 

 

2 – 0

 

 

 

 

 

 

 

 

 

 

 

b

 

 

 

 

 

 

 

 

0.5

 

 

 

0

 

0

 

 

1 0

 

 

 

 

-----------

 

 

1

 

 

 

 

 

1-----------

 

 

 

 

 

c

=

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

32 – 2( 24.5) + 18

 

 

 

 

 

 

 

 

 

32 – 18

 

 

 

 

 

d

 

 

 

0

0

 

24.5

0 1

 

 

------------------------------------------1

2

 

 

 

 

 

 

 

 

 

-----------------

1

 

 

 

e

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

 

8

12.5 – 4.5

0

1

 

 

f

 

 

12.5 – 2( 8) + 4.5

 

 

 

 

 

 

 

----------------------------------------

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

 

12

 

 

 

 

 

 

 

 

0

0

 

0.5

2 – 0.5

0

1

 

 

 

 

 

 

2 – 2( 0.5) + 0

 

 

 

 

---------------

1

 

 

 

 

 

 

 

---------------------------------

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

12

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

–1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

a

 

 

24.5 14

0

0

1 0

14

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

a

 

 

0

 

 

b

 

 

8

8

0

0

1 0

 

8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

b

 

 

1

 

 

c

 

 

0.5

2

0

0

1 0

 

2

 

 

 

 

 

 

 

 

 

 

 

 

 

=

 

 

 

 

 

 

 

 

 

 

 

c

 

 

0

 

 

d

 

0

0

24.5

14

0 1

 

1

 

 

 

 

 

 

 

 

 

 

=

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

d

 

0

 

 

e

 

 

0

0

8

8

0 1

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

e

 

 

0

 

 

 

f

 

 

0

0

0.5

1.5 0 1

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

f

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Substituting these values back into the state equation results in the following expression, which matches the exact state equation.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

d

x

 

 

 

 

 

 

 

 

 

 

 

 

 

 

x

 

 

 

 

 

 

 

 

 

 

 

 

 

i

=

 

 

a b

 

 

i

+

e

 

 

 

 

 

 

 

 

 

 

 

F

state equation

----

 

 

 

 

 

 

 

dt

v

i

 

 

 

 

c d

 

v

i

 

 

 

 

f

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

xi

 

=

 

1 0

 

 

xi

+

 

0

0

 

F

output equation

 

0

 

 

 

 

0 0

 

 

vi

 

 

 

0

0

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This can be incorporated as a realtime algorithm to calculate the data parameters based upon realtime updates.

state space control - 22.6

 

 

 

 

 

 

xi xi – 2

 

 

 

 

xi – 1

 

 

 

 

--------------------T

 

 

 

 

 

 

 

 

 

 

xi – 4

xi – 3 xi – 5

a

 

---------------------------T

 

 

 

b

 

xi – 7

xi – 6 xi – 8

c

=

---------------------------T

d

 

 

 

 

0

0

e

 

 

 

 

 

 

f

 

0

0

 

 

 

 

 

 

 

 

0

0

 

 

 

 

 

 

 

0

0

0

xi – 1

xi – 4

xi – 7

0

0

0

xi xi – 2

--------------------

T

xi – 3 xi – 5

---------------------------

T

xi – 6 xi – 7

---------------------------

T

F 0

F 0

F 0

0

F

0

F

0

F

–1

 

 

xi xi – 2

 

 

 

 

--------------------

 

 

 

 

T

 

 

xi – 3 xi – 5

 

---------------------------

 

 

 

 

T

 

 

xi – 6 xi – 8

 

---------------------------

 

 

 

 

T

 

 

xi – 2xi – 1 + xi – 2

 

-----------------------------------------

 

 

 

 

T2

 

xi – 3

– 2xi – 4 + xi – 5

 

-----------------------------------------------

 

 

 

T2

 

xi – 6

– 2xi – 7 + xi – 8

 

-----------------------------------------------

 

 

 

T2

 

This can then be used as a model to calculate a transfer function as shown below using the previous example.

state space control - 22.7

The state equation variables are,

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

d

x

i

=

 

 

a b

 

x

i

+

e

 

 

 

 

A =

 

a b

B =

 

e

----

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

dt

v

i

 

 

 

 

c d

 

v

i

 

 

 

 

f

 

 

 

 

 

 

c d

 

 

 

f

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

xi

 

 

=

 

1 0

 

xi

+

0 0

 

F

C =

1 0

 

D =

0 0

 

 

0

 

 

 

 

 

0 0

 

vi

 

 

 

 

0 0

 

1

 

0 0

 

 

0 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

these can be used to calculate a SISO system transfer function, and its inverse.

 

 

 

 

 

 

 

 

 

 

 

 

 

–1

 

 

 

 

 

 

 

G = C( sI A) –1B + D =

1 0

1 0

a b

e

+

0 0

s

 

 

 

0 0

 

0 1

 

c d

 

 

 

f

 

0 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

–1

 

 

 

 

G =

 

1 0

 

s a b

 

 

e

 

 

 

 

 

 

 

 

0 0

 

 

 

c

s d

 

 

 

f

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

s d b

 

 

 

 

 

 

 

 

 

 

 

 

0

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

G =

 

 

 

 

 

 

 

 

 

e

 

 

 

 

 

 

 

 

 

 

 

 

 

--------------------------------------------

 

 

 

 

 

 

 

 

 

 

 

 

f

 

 

 

 

( s a) ( s d) + bc

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

G–1 =

 

(--------------------------------------------s a) ( s d) + bc

 

 

 

 

 

 

 

 

 

( s d) e + bf

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

s d

b

 

 

 

 

 

 

 

 

 

 

 

 

c

s a

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

=

 

1

0

 

 

 

 

e

 

 

 

 

 

 

 

0

0

 

(--------------------------------------------s a) ( s d) + bc

 

f

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

=

 

 

( s d) e + bf

 

 

 

 

 

 

(--------------------------------------------s a) ( s d) + bc

 

 

 

 

A block diagram for the system may then be written,

 

 

 

G–1

 

 

 

 

+

xa

+

+

F

xd

controller

 

plant

 

 

 

-

 

 

 

1

 

 

state space control - 22.8

Consider the controller with the previous example.

The identified coefficients for the controller are substituted into the inverse transfer func.

a0

b1

c0

=

d0

e0

f 1

G–1 =

(--------------------------------------------s a) ( s d) + bc

=

(-------------------------------------------------s – 0) ( s – 0) + 1( 0)

= s2

 

( s d) e + bf

 

( s – 0) 0 + 1( 1)

 

The identified coefficients for the controller are substituted into the inverse transfer func.

d 2

x =

F

=

F

----

----

---

dt

 

 

M

 

1

x

1

 

 

 

--- =

----

 

 

 

F

s

2

 

 

 

 

 

 

 

 

A state diagram for the system may then be written using a proportional controller,

 

s2

 

 

 

 

 

 

+

 

 

xa

+

+

F

1

xd

P

 

----

 

 

s

2

 

 

 

 

 

 

 

-

 

 

 

 

 

1

 

 

 

 

state space control - 22.9

The state diagram is simplified,

 

 

 

 

 

s

2

1

 

 

 

 

 

--

 

 

 

 

 

 

P

+

 

 

 

 

 

 

 

 

xa

+

 

 

+

1

xd

 

 

P

----

 

 

 

s

2

 

 

 

 

 

 

 

-

 

 

 

 

 

 

 

 

1

 

 

 

 

xd

xd

xd

xd

xd

s2

 

----

 

P

+

 

 

+

- -

s2

 

----

 

P

+

 

 

+

 

s2

 

 

 

 

 

 

 

 

 

----

+ 1

 

 

 

 

 

 

 

 

P

 

 

 

 

 

 

 

 

s2

+ P

 

 

P

 

 

--------------

 

--------------

 

 

P

 

s

2

 

 

 

 

 

 

 

 

+ P

 

 

 

1

 

 

 

 

 

 

 

 

 

 

xa

P

----

 

 

 

 

s2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

xa

 

P

 

--------------

 

 

 

 

 

s2 + P

 

 

 

 

xa

 

 

 

 

 

 

 

P

 

--------------

 

 

 

 

 

s2 + P

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

xa

xa

Note: This suggests that the result is an ideal controller, however in practice there are errors, such as sensor noise, imperfect actuators, and changing system conditions such as mass. This also assumes that the force actuator can generate any requested force.