chapter 04 state - unimore...chapter 04 state 04 state variables models the state variables of a...

18
Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici ” of 27 Feb 2013 Cesare Fantuzzi , Università degli Studi di Modena e Reggio Emilia 04 State.1 1 Content and Learning Objectives The learning objectives of this lesson and exercises. 1. Understand the concept of state variables, state differential equations, and output equations, 2. Recognize that state variable models can describe the dynamic behavior of physical systems 3. Know how to obtain the transfer function model from a state variable model, and viceversa. 4. Understand the important role of state variable modeling in control system design. 04 State.2 Contents 1 Content and Learning Objectives 1 2 The State Variables of a Dynamic System 1 3 The State Differential Equation 4 4 Control examples 5 5 Solution of state equation 10 6 Some exmples 16 7 Adjoint Matrix 18 7.1 Cofactor ............................................ 18 7.2 Adjoint Matrix ........................................ 18 7.3 Internet resource ....................................... 18 04 State.3 2 The State Variables of a Dynamic System Concept of a State of a System The state of a system . The state of a system is a set of variables whose values, together with the input signals and the equations describing the dynamics, will provide the future state and output of the system. For a dynamic system, the state of a system is described in terms of a set of state variables [x 1 (t ), x 2 (t ),..., x n (t )] The state variables are those variables that determine the future behavior of a system when the present state of the system and the excitation signals are known. Consider a system where y i (t ), i = i,..., n are the output signals and u i (t ), i = i,..., m are the input signals. A set of state variables x i (t ), i = i,..., p for the system is a set such that knowledge of the initial values of the state variables x i (t 0 ), i = i,..., p at the initial time t 0 , and of the input signals u i (t ), i = i,..., m for t > t 0 , suffices to determine the future values of the outputs and state variables. State Variable The state variables describe the present configuration of a system and can be used to determine the future response, given the excitation inputs and the equations describing the dynamics. 04 State.4 1

Upload: others

Post on 01-Mar-2020

34 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

Chapter 04 State04 State Variables ModelsThe State Variables of a Dynamic System.

Lesson of the Course “Controlli Automatici” of 27 Feb 2013

Cesare Fantuzzi , Università degli Studi di Modena e Reggio Emilia

04 State.1

1 Content and Learning Objectives

The learning objectives of this lesson and exercises.1. Understand the concept of state variables, state differential equations, and output equations,2. Recognize that state variable models can describe the dynamic behavior of physical systems3. Know how to obtain the transfer function model from a state variable model, and viceversa.4. Understand the important role of state variable modeling in control system design.

04 State.2

Contents

1 Content and Learning Objectives 1

2 The State Variables of a Dynamic System 1

3 The State Differential Equation 4

4 Control examples 5

5 Solution of state equation 10

6 Some exmples 16

7 Adjoint Matrix 187.1 Cofactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187.2 Adjoint Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187.3 Internet resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 04 State.3

2 The State Variables of a Dynamic System

Concept of a State of a System

The state of a system .The state of a system is a set of variables whose values, together with the input signals and the equations

describing the dynamics, will provide the future state and output of the system.

For a dynamic system, the state of a system is described in terms of a set of state variables

[x1(t),x2(t), . . . ,xn(t)]

The state variables are those variables that determine the future behavior of a system when the presentstate of the system and the excitation signals are known.

Consider a system where yi(t), i = i, . . . ,n are the output signals and ui(t), i = i, . . . ,m are the inputsignals.

A set of state variables xi(t), i = i, . . . , p for the system is a set such that knowledge of the initial valuesof the state variables xi(t0), i = i, . . . , p at the initial time t0, and of the input signals ui(t), i = i, . . . ,m fort > t0, suffices to determine the future values of the outputs and state variables.

State VariableThe state variables describe the present configuration of a system and can be used to determine the futureresponse, given the excitation inputs and the equations describing the dynamics.

04 State.4

1

Page 2: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

State variables and energy of the system

• The concept of a a set of state variables that represent a dynamic system can be illustrated in termsof the energy stored in the system.Let’s consider the shock absorber physical model in Figure (1):

a

a v1 = 0

Fk Fb

a

a a

a

6

....................

....................

....................

....................

....................

....................

....................

....................

....................

....................

....................

....................

....................

6

?

M

F

v2

r

6.......................................................... ......................................................................................................................... ......................................................................................................................... ........................................

Figure 1: The model of a the shock absorber system (mass–damper system)

04 State.5

• The system has two elements that store energy, the spring and the mass, which can be computed as:

Em =12

Mv2, Es =12

F2

k=

12

k(y2− y1)2,

• Thus a candidate set for state variables is the velocity v and the position y.In fact, if we define the state variables as:

x1(t) = y(t), and x2(t) =dy(t)

dt• The differential equation describes the behavior of the system:

Md2yd2t

+bdydt

+ ky = u(t).

• We can write the above equation in terms of the state variables ,we substitute the state variables asalready defined and obtain:

Mdx2

dt+bx2 + kx1 = u(t).

04 State.6

• Therefore, we can write the equations that describe the behavior of the spring-mass-damper systemas the set of two first-order differential equations.

• This set of differential equations describes the behavior of the state of the system in terms of the rateof change of each state variable. dx1

dt = x2dx2dt = − b

M x2 − kM x1 + 1

M u(t)04 State.7

An example: a RLC circuitConsider the RLC circuit

• The state of this system can be described by a set of state variables

xl(t),x2(t),where

x1(t) = vc(t), is the capacitor voltage

x2(t) = iL(t), is the inductor current04 State.8

• This choice of state variables is intuitively satisfactory because the stored energy of the network canbe described in terms of these variables as

E =12

Li2L +12

Cv2c

2

Page 3: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

Figure 2: RLC Circuit

• Therefore x1(t0) and x2(t0) provide the total initial energ of the network and the state of the systemat t = t0.

• For a passive RLC network, the number of state variables required is equal to the number of indepen-dent energy-storage elements.

04 State.9

• Utilizing Kirchhoffs current law at the junction, we obtain a first-order differential equation by de-scribin the rate of change of capacitor voltage as:

ic =Cdvc

dt= u(t)− iL

• Kirchhoff’s voltage law for the right-hand loop provides the equation describing the rate of changeof inductor current as

LdiLdt

=−RiL + vc

• The output of this system is represented by the linear algebraic equation

v0 = RiL(t)04 State.10

• We can rewrite the above equations as a set of two first-order differential equations in terms of thestate variables x1(t) and x2(t) as follows:

dx1dt = − 1

C x2 + 1C u

dx2dt = 1

L x1 −RL x2

• in matrix format: dx1dt

dx2dt

=

0 − 1C

1L −R

L

[ x1x2

]+

1C

0

u (1)

• The output signal is then y(t) = vo(t) = Rx2, and in matrix format:

y(t) = [0 R][

x1x2

](2)

04 State.11

On the choiche of state variables

• The state variables that describe a system are not a unique set, and several alternative sets of statevariables can be chosen. For example, for a second-order system, such as the spring-mass-damper orRLC circuit, the state variables may be any two independent linear combinations of x1(t) and x2(t).

• For the RLC circuit, we might choose the set of state variables as the two voltages, vc(t) and VL(t),where vL(t) is the voltage drop across the inductor.

• Then the new state variables, x∗1 and x∗2, are related to the old state variables, x1 and x2, as

x∗1 = vc = x1

x∗2 = vL− vc = RiL = x1−Rx2

• The above equation represents the relation between the inductor voltage and the former state variablesvc and iL.

04 State.12

3

Page 4: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

On general view of System State

• In a typical system, there are several choices of a set of state variables that specify the energy storedin a system and therefore adequately describe the dynamics of the system.

• It is usual to choose a set of state variables that can be readily measured.• The state variables of a system characterize the dynamic behavior of a system. The engineer’s interest

is primarily in physical systems, where the variables are voltages, currents, velocities, positions,pressures, temperatures, and similar physical variables.

• However, the concept of system state is not limited to the analysis of physical systems and is partic-ularly useful in analyzing biological, social, and economic systems.

• For these systems, the concept of state is extended beyond the concept of the current configuration ofa physical system to the broader viewpoint of variables that will be capable of describing the futurebehavior of the system.

04 State.13

3 The State Differential Equation

State equation

• Let’s consider a system with the state variables (x1, . . . ,xn), the inputs (u1, . . . ,um) and the outputs(y1, . . . ,yr).

• The response of a system is described by the set of first-order differential equations.• The state equation that describes input–to–state (variation) relationship x = f (x,u):

x1 = a1,1x1+ . . . +a1,nxn +b1,1u1+ . . . +b1,mum...

......

......

xn = an,1x1+ . . . +an,nxn +bn,1u1+ . . . +bn,mum

Where x = dx(t)/dt is the first order time derivative of the state variable.• The output equation that describes state–to–output relationship y = g(x,u):

y1 = c1,1x1+ . . . +c1,nxn +d1,1u1+ . . . +d1,mum...

......

......

yr = cr,1x1+ . . . +cr,nxn +dr,1u1+ . . . +dr,mum04 State.14

Matrix notationThe set of simultaneous differential equations can be written in matrix form as follows: x1

...xn

=

a1,1 . . . a1,n...

...an,1 . . . an,n

x1

...xn

+ b1,1 . . . b1,m

......

bn,1 . . . bn,m

u1

...um

The column matrix consisting of the state variables is called the state vector. The vector of input signals

is defined as u. Then the system can be represented by the compact notation of the state differential equation

x = Ax+Bu

The above differential equation is also commonly called the state equation. The matrix A is an n× nsquare matrix, and B is an n×m matrix. The state differential equation relates the rate of change of thestate of the system to the state of the system and the input signals.

In general, the outputs of a linear system can be related to the state variables and the input signals bythe output equatio n: y1

...yr

=

c1,1 . . . c1,n...

...cr,1 . . . cr,n

x1

...xn

+ d1,1 . . . d1,m

......

dr,1 . . . dr,m

u1

...um

or in matrix fromat:

y = Cx+Du

where y is the set of output signals expressed in column vector form.The state-space representation (or state-variable representation) comprises the state differential equation

and the output equation. 04 State.15

4

Page 5: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

Figure 3: A system with two carts linked.

Figure 4: Free-body diagrams of the two rolling carts: (a) Cart 2; (b) Cart 1

4 Control examples

An Example Two rollling carts 04 State.16

• Now, given the free-body diagram with forces and directions appropriately applied, we use Newton’ssecond law (sum of the forces equals mass of the object multiplied by its acceleration) to obtain theequations of motion–one equation for each mass. For masses M1 amd M2, respectively, we have:

M1 p = u+ fs + fd = u− k1(p−q)−b1(p− q),

M2q = k1(p−q)+b1(p− q)− k2q−b2q

where p adn q are the acceleration of M1 and M2 respectively,• which can be re-written as:

M1 p+b1 p+ k1 p = u+ k1q+b1q

M2q+(b1 +b2)q+(k1 + k2)q = k1 p+b1 p04 State.17

A two carts system A state space model

• We can start developing a state-space model from the previous two second-order ordinary differentialequations by defining:

x1 = p, x2 = q, x3 = x1 = p, x4 = x2 = q

• and then:

x3 = p =− b1

M1p− k1

M1p+

1M1

u+k1

M1q− b1

M1q

x4 = q =−b1 +b2

M2q− k1 + k2

M2q+

k1

M2p+

b1

M2p

• and recalling that p = x3 and q = x4:

x3 =−k1

M1x1 +

k1

M1x2−

b1

M1x3−

b1

M1x4 +

1M1

u

x4 =k1

M2x1−

k1 + k2

M2x2 +

b1

M2x3−

b1 +b2

M2x4

04 State.18

• and by posing:

x =

x1x2x3x4

=

pqpq

,

5

Page 6: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

A =

0 0 1 00 0 0 1− k1

M1

k1M1

− b1M1

b1M1

k1M2

− k1+k2M2

b1M2

− b1+b2M2

and B =

001

M1

0

and u is the external force acting on the system. If we choose p as the output, we have:

y = [ 1 0 0 0 ]x

• In matrix form:

x = Ax+Bu, y = Cx

• since there are no direct link between the input u and output y, the matrix D is a null matrix.04 State.19

Inverted pendulum controlThe problem of balancing a broomstick on a person’s hand is illustrated in Figure 5

Figure 5: An inverted pendulum balanced on a person’s hand by moving the hand to reduce the angle θ(t).The pendulum is constrained to pivot in the vertical plane.

04 State.20

The only equilibrium condition is θ(t) = 0 and θ = 0. The problem of balancing a broomstick on one’shand is not unlike the problem of controlling the attitude of a Segway or a missile during the initial stagesof launch

Figure 6: The problem of controlling the attitude of a Segway

04 State.21

Mathmatical ModelThis problem is the classic and intriguing problem of the inverted pendulum mounted on a cart. The

cart must be moved so that mass m is always in an upright position. The state variables must be expressedin terms of the angular rotation θ(t) and the position of the cart x(t)

6

Page 7: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

Figure 7: Control F to keep the pendulum in upright position.

M Mass of the cart 0.5 kgm Mass of the pendulum 0.5 kgb Friction of the cart 0.1 N/m/seclp Length to pendulum center of mass 0.3 mI Inertia of the pendulum 0.006 kg∗m2

F force applied to the cartx cart position coordinateθ pendulum angle from vertical

04 State.22

Force analysis and system equations The differential equations describing the motion of the system canbe obtained by analyzing the free body diagrams:

Figure 8: The two Free Body Diagrams of the system.

1. Summing the forces in the Free Body Diagram of (a) the cart and (b) the pendulum in the horizontaldirection, you get two equations:

2. Summing the moments about the pendulum pivot point.04 State.23

Force in horizontal direction

• Summing the forces in the Free Body Diagram of the cart in the horizontal direction:

Mx+bx+N = F

• Summing the force in the free body diagram of the pendulum in the horizontal direction:

N = mx+mlpθ cos(θ)−mlpθ2 sin(θ)

Note that you could also sum the forces in the vertical direction, but no useful information would begained.

• If you substitute this equation into the first equation, you get the first equation of motion on horizontalaxis:

(M+m)x+bx+mlpθ cos(θ)−mlpθ2 sin(θ) = F (3)

04 State.24

The moments about the pendulum pivot point

• Summing the moments about the pendulum pivot point lead to:

−Plp sin(θ)−Nlp cos(θ) = Iθ

7

Page 8: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

• that needs to be combined with the sum of forces perpendicular to the pendulum:

Psin(θ)+N cos(θ)−mgsin(θ) = mlpθ +mxcos(θ)

• combining the two above, we get:

(I +ml2p)θ +mlpgsin(θ) =−mlpxcos(θ) (4)

04 State.25

Linearization around vertical position: θ = π Linearization around the vertical upward direction.

• Linearizing (cfr. lesson number 2 ) the non linear functions around θ = π we obtain:

sin(θ)≈ sin(π)+d sin(θ)

∣∣∣∣θ=π

(θ −π) =−1 · (θ −π) =−φ

cos(θ)≈ cos(π)+d cos(θ)

∣∣∣∣θ=π

(θ −π) = cos(π)+0 =−1

θ2 ≈ π

2 +dθ 2

∣∣∣∣θ=π

(θ −π) = 0

in fact the pendulum velocity θ doesn’t depend on position θ for small variation of θ .• we obtain:

(I +ml2p)φ −mglpφ = mlpx

(M+m)x+bx−mlpφ = u(5)

04 State.26

State space model of the car - pendulum system• by setting: y1 = x1 = x, x2 = x, y2 = x3 = φ , x4 = φ , we obtain:

x1x2x3x4

=

0 1 0 0

0−(I+ml2

p)bI(M+m)+Mml2

p

m2g l2p

I(M+m)+Mml2p

0

0 0 0 10 −mlpb

I(M+m)+Mml2p

mglp(M+m)I(M+m)+Mml2

p0

x1x2x3x4

+

+

0

I+ml2p

I(M+m)+Mml2p

0mlp

I(M+m)+Mml2p

u

(6)

y =[

1 0 0 00 0 1 0

]x1x2x3x4

+[ 00

]u (7)

The C matrix is 2 by 4, because both the cart’s position and the pendulum’s position are part of theoutput. For the state-space design problem we will be controlling a multi-output system so we willbe observing the cart’s position from the first row of output and the pendulum’s with the second row.

04 State.27

The Transfer Function from the State Equation• We can determine the transfer function G(s) of a single-input u, single-output y (SISO) system de-

scribed using state space form:

x = Ax+Bu

y = Cx+du

• The Laplace transform is:

sX(s) = AX(s)+BU(s)

Y (s) = CX(s)+dU(s)

• Rearranging the above equations:

(sI−A)X(s) = BU(s)⇒ X(s) = (sI−A)−1BU(s)

• then substituting X(s):

Y (s) = C(sI−A)−1BU(s)+dU(s) = (C(sI−A)−1B+d)U(s)04 State.28

8

Page 9: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

An example Transfer function of an RLC circuit

• Let u s determine the transfer function G(s) =Y (s)/U(s) for the RLC circuit of figure 2 as describedby the differential equations: (see Eq. 1 and Eq. 2):

x =

0 − 1C

1L −R

L

x+

1C

0

u, y(t) = [0 R]x

• Then we have:

[sI−A] =

s 1C

− 1L

(s+ R

L)

• therefore we obtain:

[sI−A]−1 =adj([sI−A])

det([sI−A)]=

(s+ R

L)− 1

C

1L s

det([sI−A)]

04 State.29

• It’s interesting to note that the determinant of matrix [sI− a] is nothing but the chararteristic polino-mial of the transfer function one can derive from RLC circuit.

• As matter of fact:

det([sI−A)] = s(

s+RL

)+

1LC

= s2 + sRL+

1LC

• the the transfer function is:

G(s) =[0 R]

(s+ R

L )s2+s R

L +1

LC

− 1C

s2+s RL +

1LC

1L

s2+s RL +

1LC

ss2+s R

L +1

LC

1

C

0

=

=R

LC

s2 + s RL + 1

LC

(8)

04 State.30

Assignment 4.1 Determine a transfer function from a state-space equation.Determine the Transfer Function with input u and output φ of the system formed by cart and the pen-

dulum, with model described by Equation:

x1x2x3x4

=

0 1 0 0

0−(I+ml2

p)bI(M+m)+Mml2

p

m2g l2p

I(M+m)+Mml2p

0

0 0 0 10 −mlpb

I(M+m)+Mml2p

mglp(M+m)I(M+m)+Mml2

p0

x1x2x3x4

+

+

0

I+ml2p

I(M+m)+Mml2p

0mlp

I(M+m)+Mml2p

u

y =[

1 0 0 00 0 1 0

]x1x2x3x4

+[ 00

]u

in which x3 = φ . 04 State.31

9

Page 10: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

5 Solution of state equation

Solution of sate equation• Every finite linear system regular is describable by means of a state function and a Output function,• to which corresponds, uniquely, a description on the basis a transition function and an output function.

x(t) = Ax(t)+Bu(t)

y(t) = Cx(t)+Du(t)

x(t) = eAtx(ti)++∫ t

t0 eA(t−τ)Bu(τ)dτ

y(t) = Cx(t)+Du(t)

'

&

$

%-

'

&

$

%04 State.32

Solution of the state function Case (a): free dynamics

• Let’s consider the free dynamics, that is the evolution of the system for zero input between initialtime t = 0 and final time t:

x(t) = Ax(t)• then the solution of the matrix differential equation is;

ddt

Φ(t) = AΦ(t)

• that is the matrix power series:

Φ(t) = I+At +A2 t2

2!+ . . .+A j t j

j!+ . . .=

∑k=0

Ak tk

k!

• in fact:ddt

(I+At +A2 t2

2!+ . . .+A j t j

j!

)= A+A2t + . . .+A j jt j−1

j!=

= A(

I+At + . . .+A j−1 t j−1

( j−1)!

)= AΦ(t)

04 State.33• The matrix power series can be arranged by defining the exponential series:

Φ(t) = eAt

• and the we can write the evolution of the system for the free dynamics case (zero input):

x(t) = eAtx(0)

y(t) = CeAtx(0)• The matrix power series can be calculated using the Matlab function expm(A)

>> A= [3,1;2,4];>> t = 0.1;>> expm(A*t)ans =

1.3638 0.14240.2849 1.5063 04 State.34

Solution of the state function Case (b): full dynamics

• Let’s consider the full dynamics of the system:

x(t) = Ax(t)+Bu(t)y(t) = Cx(t)+Du(t)

• the solution of state equation is:

x(t) = eAtx(0)+∫ t

t=0eA(t−τ)Bu(τ)dτ

• in fact, since ddt∫ b(t)

a(t) f (t,τ)dτ = f (t,b(t)) ddt b(t)− f (t,a(t)) d

dt a(t)+∫ b(t)

a(t)ddt f (t,τ)dτ

x(t) =ddt

eAtx(0)+ eA(t−t)Bu(t)+0+∫ t

t=0

ddt

eA(t−τ)Bu(τ)dτ

= A(t)eAtx(0)+Bu(t)+∫ t

t=0AeA(t−τ)Bu(τ)dτ

= A(

eAtx(0)+∫ t

t0eA(t−τ)Bu(τ)dτ

)+Bu(t)

= Ax(t)+Bu(t)04 State.35

10

Page 11: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

Eigenvalues

• Equation:

det(A−λ I) = 0

gives all and only eigenvalues of the matrix A.• The polynomial:

det(λ I−A)4= ∆A

is said to be the characteristic polynomial of matrix A.• the order of each solution of ∆A is said to be the algebraic multiplicities of that value (eigenvalue)

04 State.36

Jordan standard form

• Every square matrix A there exists a non-singular matrix F, so that matrix J = F−1AF is as follows(matrix of matrix):

J =

J1 0 · · · 00 J2 · · · 0...

...... 0

0 0 · · · Jh

• Each Ji is called i−th Jordan block.• Such a Matrix Ji is linked to i−th distinct eigenvalue λi of the original matrix A.• The dimension ai×ai of Ji are equal to the algebraic multeplicity of eigenvalue λi in the characteristic

polynomial4A.04 State.37

• Each Jordan block Ji has the following structure (matrix of matrices ):

Ji =

J1

i 0 · · · 00 J2

i · · · 0...

...... 0

0 0 · · · Jgii

• The generic matrx Jk

i ,k = 1, . . . ,gi, is called Jordan miniblock and features the eigenvalue λi on theprincipal diagonal and a unitary chain on the pseudoprincipal :

Jki =

λi 1 0 · · · 0

0 λi 1...

......

......

......

0 0 · · · λi 10 0 · · · 0 λi

• nk

i × nki being the dimension of the k−th Jordan’s miniblock, and such miniblock are all ordered in

descendant dimensions: (n1i ≥ . . .≥ ngi

i ).• then n1

i (dimension of the maximum miniblock) is said index of the eigenvalue λi04 State.38

System modes in the State Model

• Let’s consider the free dynamics of a system:

x′(t) = A′x′(t) ,x′(0) = x′o• let’s consider the transformation:

x′(t) = x1(t)v1 + . . .+ xn(t)vn = [v1, . . . ,vn]x(t) = Fx(t)

where v1, . . . ,vn are the eigenvector of matrix A.• The system dynamics can be described as:

x(t) = (F−1A′F)x(t) = Ax(t) ,xo = F−1x′o• which solutions:

x(t) = eAtxo

• The functions of the matrix eAt are defined as the modes of the system.04 State.39

11

Page 12: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

An example This example shows how to calculate the Jordan normal form of a given matrix.

• Consider the matrix: A =

5 4 2 10 1 −1 −1−1 −1 3 01 1 −1 2

• The characteristic polynomial of A is :∆A = det(λ I−A) = λ 4− 11λ 3 + 42λ 2− 64λ + 32 = (λ −

1)(λ −2)(λ −4)4

• This shows that the eigenvalues are 1, 2, 4 and 4, according to algebraic multiplicity.• The eigenspace corresponding to each eigenvalue can be found by solving the equation:

Av = λv04 State.40

• The eigenvalue and eigenvector can be determined using Matlab program:

>> A = [5,4,2,1;0,1,-1,-1;-1,-1,3,0;1,1,-1,2]A =

5 4 2 10 1 -1 -1

-1 -1 3 01 1 -1 2

>> [F,lambda]=eig(A)F =

0.5774 0.5774 0.5774 0.70710.0000 0.0000 -0.5774 -0.7071

-0.5774 -0.5774 0.0000 0.00000.5774 0.5774 0.5774 -0.0000

lambda =4.0000 0 0 0

0 4.0000 0 00 0 2.0000 00 0 0 1.0000

04 State.41

• The computation of Jordan canonical form can be done using definition J = F−1 ·A ·F :

>> J=inv(F)*A*FWarning: Matrix is close to singular or badly scaled.

Results may be inaccurate. RCOND = 1.602469e-016.J =

4.3453 0.3453 2.5016 2.61660.1547 3.6547 -2.0016 -1.61660.0000 0.0000 2.0000 -0.00000.0000 0.0000 0.0000 1.0000

• however the use of matrix inversion function in Matlab inv(F) is numerically weak.04 State.42

• It’s convenient using the function [F,J]=jordan(A) that returns diectly the Jordan canonicalform:

F =1 1 -1 10 0 1 -1

-1 0 0 01 0 0 1

J =4 1 0 00 4 0 00 0 1 00 0 0 2

• Hence the matrix F is formed by the eigenvectors correspondent to

– λ = 1 it is spanned by the column vector v = (−1,1,0,0)T .

– the eigenspace corresponding to the eigenvalue λ = 2 is spanned by w = (1,−1,0,1)T .

– Finally, the eigenspace corresponding to the eigenvalue λ = 4 is also one-dimensional (eventhough this is a double eigenvalue) and is spanned by z = (1,0,−1,1)T . Therefore, the twoeigenvalues equal to 4 correspond to a single Jordan block.

04 State.43

12

Page 13: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

Distinct eigenvalues• In the case of all the eigenvalues of matrix A are distinct, the Jordan matrix is diagonal:

A =

λ1 0 0 · · · 00 λ2 0 · · · 0...

......

......

0 0 0 · · · λn

• and the correspondent transition matrix is:

eAt =

eλ1t 0 0 · · · 0

0 eλ2t 0 · · · 0...

......

......

0 0 0 · · · eλnt

• The modes of the system are functions eλ1t , . . . ,eλnt which are linearly independent, since the eigen-

values are distinct. 04 State.44

Schematic representation

The matrix equation:

x1(t)...

xn(t)

=

λ1 . . . 0...

...0 . . . λn

x1(t)

...xn(t)

+ b1,1 . . . b1,m

......

bn,1 . . . bn,m

u1(t)

...um(t)

describes n first order linear non–interacting systems:

Figure 9: Non interacting eigenvalues04 State.45

04 State.46

04 State.47

Complex eigenvalues• In case of complex eigenvalues, we want to describe the evolution of the system through real func-

tions.• in that case, let σi and ωi the real and complex part of the eigenvalue λi, then the Jordan form can be

written as:

A = diag([

σ1 ω1−ω1 σ1

], . . .

[σh ωh−ωh σh

],λ2h+1, . . . ,λn)

• and thus:

eAt = diag(eσ1t[

cos(ω1t) sin(ω1t)−sin(ω1t) cos(ω1t)

], . . . ,

eσht[

cos(ωht) sin(ωht)−sin(ωht) cos(ωht)

],eλ2h+1t , . . . ,eλnt)

• the real modes are the functions:

– eσit cos(ωit),eσit sin(ωit), i = 1, . . . ,h,– eλ jt , j = 2h+1, . . . ,n

04 State.48

13

Page 14: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

Figure 10: Real eigenvalues

Figure 11: Real eigenvalues

Figure 12: Complex eigenvalues

04 State.49

04 State.50

Example

• We consider the RLC circuit described by transfer function (8), with values R= 3, L= 1, and C = 1/2,then we have:

Φ(s) =

[s+3

(s+1)(s+2)−2

(s+1)(s+2)1

(s+1)(s+2)s

(s+1)(s+2)

]

14

Page 15: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

Figure 13: Complex eigenvalues

• the state traansition matrix can be obtained by calculatin the inverse Laplace transform for each entryof the transfer function matrix:

Φ(t) = L −1(Φ(s)) =[

(2e−t − e−2t) (−2e−t +2e−2t)(e−t − e−2t) (−e−t +2e−2t)

]04 State.51

• Let’s consider again the state function of the RLC circuit:

A =

[0 −21 −3

]• usign the jordan function in Matlab:

>>[F,J]=jordan(A)F =

1 21 1

J =-2 00 -1

>> F^-1ans =

-1 21 -1

• therefore, we can write

x′(t) = eJtx′(0) =[

e−2t 00 e−t

]x′(0)

04 State.52

• and since:eAt = F−1eJtF

• we have obtained again the expression for the transition matrix:

Φ(t) = eAt =

[−1 21 −1

][e−2t 0

0 e−t

][1 21 1

]=

=

[(2e−t − e−2t) (−2e−t +2e−2t)(e−t − e−2t) (−e−t +2e−2t)

]04 State.53

15

Page 16: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

6 Some exmples

Printer belt drive modelingA commonly used low-cost printer for a computer uses a belt drive to move the printing device laterally

across the printed page.The printing device may be a laser printer, a print ball, o thermal printhead. An example of a belt drive

printer with a electrical motor actuator is shown in figure 14.In this model, a light sensor is used to measure the position of the printing device, and the belt tension

adjusts the spring flexibility of the belt.The goal of the design is to determine the effect of the belt spring constant k and select appropriate

parameters for the motor, the belt pulley, and the controller.To achieve the analysis, we will determine a model of the belt-drive system and select many of its

parameters.Using this model, we will obtain the signal-flow graph model and select the state variables. We then

will determine an appropriate transfer function for the system and select its other parameters, except for thespring constant. Finally, we will examine the effect of varying the spring constant within a realistic range.

We propose the model of the belt-drive system shown in Figure 15. This model assumes that the springconstant of the belt is k, the radius of the pulley is r, the angular rotation of the motor shaft is θ , and theangular rotation of the right-hand pulley is θp. The mass of the printing device is m, and its position is y(t).A light sensor is used to measure y(t), and the output of the sensor is a voltage v1 = k1y.

Figure 14: A printer belt drive system. In this model, a light sensor is used to measure the position of theprinting device, and the belt tension adjusts the spring flexibility of the belt.

04 State.54

Figure 15: Printer belt-drive model

04 State.55

• The controller provides an output voltage v2, where v2 is function of v1. The voltage v2 is a functionof v1.The voltage v2 is connected to the field of the motor. Let’s assume that we can use the linear rela-tionship

v2 =−[

k2dv1

dt+ k3v1

]and select to use k2 = 0.1 and k3 = 0 (velocity feedback).

• System parameters:

– The inertia of the motor and pulley is J = Jmotor + Jpulley.

16

Page 17: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

– Let’s consider a moderate DC motor, with a typical 1/8–hp power, with J = 0.01 kg m2,– field inductance is negligible, the field resistance is R = 2Ω,– the motor constant is Km = 2 Nm/A, and the motor and– pulley friction is b = 0.25 Nms/rad.– The radius of the pulley is r = 0.15 m.

04 State.56

System model• Then the tension from equilibrium T1 is:

T1 = k(rθ − y) = k(rθ − rθp)

in which we have y = rθp• The tension form equilibrium T2 is:

T2 = k(y− rθ)

• The net tension at the mass m is:

T1−T2 = md2ydt2

• and, by considering the state variables x1 = rθ − y, x2 = dy/dt and x3 = dθ/dt:

T1−T2 = k(rθ − y)− k(y− rθ) = 2k(rθ − y) = 2kx1dx2dt = 2k

m x1x1dt = r dθ

dt −dydt = rx3− x2

04 State.57

A model of the the motor rotation• We assume that L = 0, then we have the field current i = v2/R and the motor torque Tm = Kmi.

ThereforeTm =

Km

Rv2 and, because the feedback: v2 =−k1k2

dydt

=−k1k2x2

• and the motor torque provides the torque to drive the belts plus the disturbance or undesired loadtorque, so that:

Tm = T +Td

• The torque T drives the shaft to the pulley, so that:

T = Jd2θ

dt2 +bdθ

dt+ r(T1−T2)

• since: dx3dt = d2θ

dt2 , we have:dx3

dt=

Tm−Td

J− b

Jx3−

2krJ

x1

and finally:

dx3

dt=−Kmk1k2

JR− b

Jx3−

2krJ

x1−Td

J 04 State.58

State space model• The matrix differential equation is:

x =

0 −1 r2km 0 0− 2kr

J −Kmk1k2JR − b

J

x+

00− 1

J

Td

y(t) = [ 1 0 0 ]x• Let’s obtain the transfer function:

G(s) =Y (s)Td(s)

=C(sI−A)−1B =Cadj(sI−A)det(sI−A)

B

• since

(sI−A)−1 =

s2 + bsJ − b

J − s− k1k2KmrJR rs

2skm + 2bk

Jm2kr2

J + s2 + bsJ 2kr

− 2kk1k2KmJmR − 2krs

J2krJ −

k1k2KmsJR s2 + 2k

m

s3 + bs2

J + 2kr2sJ + 2ks

m + 2bkJm + 2kk1k2Kmr

JmR• we have:

G(s) =− r

J s

s3 + bs2

J + 2kr2sJ + 2ks

m + 2bkJm + 2kk1k2Kmr

JmR 04 State.59

17

Page 18: Chapter 04 State - Unimore...Chapter 04 State 04 State Variables Models The State Variables of a Dynamic System. Lesson of the Course “Controlli Automatici” of 27 Feb 2013 Cesare

7 Adjoint Matrix

Consider the n×n matrix A =

a11 a12 a13 ... a1na21 a22 a23 ... a2n. . .. . .. . .an1 an2 an3 ... ann

.

7.1 Cofactor

The cofactor of an entry ai j is defined to be the number Ai j = (−1)i+ j Di j, where Di j is the determinant ofthe (n−1)× (n−1) matrix obtained from A by omitting the ith row and jth column of A.

7.2 Adjoint Matrix

For each entry ai j of A, let Ai j be the cofactor of ai j . The adjoint matrix of A is defined to be the n× nmatrix whose entry in the ith row and jth column is A ji.

• If A is a nonsingular square matrix, then

A−1 =1

detA· adjA

7.3 Internet resource

For some example on adj matrix, see the wikipedia page: http://en.wikipedia.org/wiki/Adjugate_matrix.

18