You are on page 1of 22

Lecture 7: State Variables Analysis II

1
Course Outline
Control Elements: Transducer, Switches, Actuators, Valves,
Motors
Control Fundamentals: Open loop and closed loop systems,
transfer function, signal flow graph, gain formula
Modeling: Mathematical modeling of linear electrical and
mechanical systems, state variables, state equations and
state diagrams
Analysis and Design: Stability, controllability and
observability of systems, state variables, state transition
matrix, transient and steady state response, root locus
method. Nyquist criterion, PID controllers, lead lag
compensators, pole-zero cancellations.
Practical systems: Analog and microprocessor based
control systems, design examples

2
Recap - Example 1
3
The motion of any finite dynamic system can be expressed as a set of first-order ordinary
differential equations. This is often referred to as the state-variable representation. For
example, Newtons law for a single mass M moving in one dimension x under force F is:


We define one state variable as the position and the other state variable as the velocity
, this equation can be written as:




Furthermore, first-order linear differential equations can be concisely expressed using matrix
notation. If we collect the state into a column vector x, and the coefficients of the state
equations into a square matrix F, and the coefficients of the input into the column vector G,
these equations can be written in matrix form as:




Where F is the system matrix and G is the input matrix. If we take the input to be
F x M =
x x =
1
x x =
2
2 1
x x =
M
F
x =
2

M
F
(

+
(

=
(

1
0
x
x
0 0
1 0
x
x
2
1
2
1

Gu Fx x + =
1
x y =
Recap
4
This to can be expressed in matrix form as:





Where H is a row vector, referred to as the output matrix. Collecting these matrix notations, we
have an extremely compact notation..

Similarly, the differential-equation models of more complex systems, such as those developed in
earlier lectures on mechanical, electrical, and electromechanical systems, can be described by
state variables through selection of positions, velocities, capacitor voltages, and inductor
currents as state variables.






| |
(

=
2
1
0 1
x
x
y
Hx y =
Recap - Example 2
5
A robot-arm drive system for one joint can be represented by the following differential equation:



where v(t) = velocity, y(t) = position and i(t) is the control-motor current. Put the equations in state variable form
and set up the matrix form for

We know that the velocity is the derivative of the position, therefore we have



and from the problem statement



This can be written in matrix form as
), ( ) ( ) (
) (
3 2 1
t i k t y k t v k
dt
t dv
+ =
1
2 1
= = k k
v
dt
dy
=
) ( ) ( ) (
3 2 1
t i k t y k t v k
dt
dv
+ =
i
k v
y
k k v
y
dt
dv
(

+
|
|
.
|

\
|
(


=
|
|
.
|

\
|
3 1 2
0 1 0
Recap - Example 3
6
As an example of the formulation of equations in state-variable form, consider the two-mass
system below:



If we take the state as the position and velocity of each mass as follows:



d x
d x
y x
y x

=
=
=
=
4
3
2
1
u d y k d y b y M = + + ) ( ) (


0 ) ( ) ( = + + y d k y d b d m

Recap
7
the equations in state-variable form are:






The state-space matrices are:
4 3 2 1 4
4 3
4 3 2 1 2
2 1
x
M
b
x
M
k
x
M
b
x
M
k
x
x x
M
u
x
M
b
x
M
k
x
M
b
x
M
k
x
x x
+ =
=
+ + + =
=

(
(
(
(
(


=
M
b
M
k
M
b
M
k
1 0 0 0
M
b
M
k
M
b
-
M
k
-
0 0 1 0
F
(
(
(
(
(

=
0
0
1
0
M G | | 0 0 0 1 = H
Recap - Example 4
8
Consider the equation of motion for the simple pendulum shown below:


where . If we choose as the state variables and , then the equations are:




These equations are nonlinear but are in state-variable form. We can linearize the equations and
hence for small x.

2
1 2
2
2 1
sin
ml
T x
x
x x
c
+
|
|
.
|

\
|
=
=
o
o
o
e
e
e

2
2
sin
ml
T
c
= + u e u
o

l g =
2
o
e u e
o
=
1
x u

=
2
x
( ) u u ~ sin
2
2
2 1
sin
ml
T
x
x x
c
+ =
=
o
o
e
e

=
0
0
F
o
o
e
e
(
(

=
2
1
0
ml
G
(

= 0
1
o
e
H
State Diagrams
9
Phase-variable format
Input feedforward format

Controllability Canonical form
Observability Canonical form
Diagonal Canonical form
Jordan Canonical form





State Diagrams
10
To illustrate the derivation of the state diagram, we consider the fourth-order transfer function:






Note that the system, is fourth order and hence we identify 4 state variables, hence we will use
four integrators. The state diagram will be:








The numerator terms represent forward-path factors in Masons gain formula.













4 3
1
2
2
1
3
4
1
2
2
3
3
4
1
) (

+ + + +
=
+ + + +
=
s a s a s a s a
s b
a s a s a s a s
b
s G
o
o
o
o
State Diagrams II
11
To illustrate the derivation of the state diagram, we consider the fourth-order transfer function:





The state diagram will be:








The numerator terms represent forward-path factors in Masons gain formula. The general form
shown above is called the phase variable format.

What is
The output is simply:











4 3
1
2
2
1
3
4 3
1
2
2
1
3
1
2
2
3
3
4
1
2
2
3
3
1
) (


+ + + +
+ + +
=
+ + + +
+ + +
=
s a s a s a s a
s b s b s b s b
a s a s a s a s
b s b s b s b
s G
o
o
o
o
u x a x a x a x a +
4 3 3 2 2 1 1 o
=
4
x
4 3 3 2 2 1 1
) ( x b x b x b x b t c + + + =
o
4 3 3 2 2 1
, , x x x x x x = = =
State Diagrams II
12
State equations




Then in matrix form we have:








and the output is:



















u x a x a x a x a +
4 3 3 2 2 1 1 o
=
4
x
4 3 3 2 2 1 1
) ( x b x b x b x b t c + + + =
o
4 3 3 2 2 1
, , x x x x x x = = =
u b Ax x + =
) (
1
0
0
0
1 0 0 0
0 1 0 0
0 0 1 0
4
3
2
1
3 2 1 0 4
3
2
1
t u
x
x
x
x
a a a a x
x
x
x
dt
d
(
(
(
(

+
(
(
(
(

(
(
(
(


=
(
(
(
(

| |
(
(
(
(

= =
4
3
2
1
3 2 1 0
, , , Dx ) (
x
x
x
x
b b b b t c
State Diagrams III
13
The state diagram in the previous example is not a unique representation of the given transfer
function and other equally useful structures can be designed. An alternative form known as the
input feedforward format is illustrated below.







Using the state diagram we can obtain the following set of first-order differential equations:
























4 3
1
2
2
1
3
4 3
1
2
2
1
3
1
2
2
3
3
4
1
2
2
3
3
1
) (


+ + + +
+ + +
=
+ + + +
+ + +
=
s a s a s a s a
s b s b s b s b
a s a s a s a s
b s b s b s b
s G
o
o
o
o
u b x x a x
3 2 1 3 1
+ + = u b x x a x
2 3 1 2 2
+ + =
u b x x a x
1 4 1 1 3
+ + =
u b x a x
o o
+ =
1 4

) (
0 0 0
1 0 0
0 1 0
0 0 1
0
1
2
3
4
3
2
1
0
1
2
3
4
3
2
1
t u
b
b
b
b
x
x
x
x
a
a
a
a
x
x
x
x
dt
d
(
(
(
(

+
(
(
(
(

(
(
(
(

=
(
(
(
(

State Diagrams IV
14
Consider the system represented by the equation:











The state variables, the outputs of the integrators are . In these terms,
the equations of motion are:




u y y y y 6 6 11 6 = + + +
u x x x x
x x
x x
6 6 11 6
3 2 1 3
3 2
2 1
+ =
=
=

y x and y x y x = = =
3 2 1
,
State Diagrams V
15
The closed-loop transfer function of a system is:





The first model is the phase variable state diagram as illustrated below:






Recalling Masons gain formula, the denominator can be considered to be one minus the sum of
the loop gains whereas the numerator of the transfer function is equal to the forward-path.
and the output is:
















3 2 1
3 2 1
2 3
2
6 16 8 1
6 8 2
6 16 8
6 8 2
) (
) (
) (


+ + +
+ +
=
+ + +
+ +
= =
s s s
s s s
s s s
s s
s R
s C
s T
) (
1
0
0
8 16 6
1 0 0
0 1 0
3
2
1
3
2
1
t u
x
x
x
x
x
x
dt
d
(
(
(

+
(
(
(

(
(
(


=
(
(
(

| |
(
(
(

=
3
2
1
2 8 6 ) (
x
x
x
t c
State Diagrams VI
16
The closed-loop transfer function of a system is:





The second model is the phase variable state diagram as illustrated below:






Recalling Masons gain formula, the denominator can be considered to be one minus the sum of
the loop gains whereas the numerator of the transfer function is equal to the forward-path.
and the output is:
















3 2 1
3 2 1
2 3
2
6 16 8 1
6 8 2
6 16 8
6 8 2
) (
) (
) (


+ + +
+ +
=
+ + +
+ +
= =
s s s
s s s
s s s
s s
s R
s C
s T
) (
1
0
0
8 16 6
1 0 0
0 1 0
3
2
1
3
2
1
t u
x
x
x
x
x
x
dt
d
(
(
(

+
(
(
(

(
(
(


=
(
(
(

| |
(
(
(

=
3
2
1
2 8 6 ) (
x
x
x
t c
State Diagrams VII
17
The closed-loop transfer function of a system is:





The first model is the input feedforward format as illustrated below:






Recalling Masons gain formula, the denominator can be considered to be one minus the sum of
the loop gains whereas the numerator of the transfer function is equal to the forward-path.
and the output is:
















3 2 1
3 2 1
2 3
2
6 16 8 1
6 8 2
6 16 8
6 8 2
) (
) (
) (


+ + +
+ +
=
+ + +
+ +
= =
s s s
s s s
s s s
s s
s R
s C
s T
) (
6
8
2
0 0 6
1 0 16
0 1 8
3
2
1
3
2
1
t u
x
x
x
x
x
x
dt
d
(
(
(

+
(
(
(

(
(
(

=
(
(
(

) ( ) (
1
t x t c =
System Transfer Functions
18
In order to relate the state-variable equations to our earlier consideration of poles and zeros,
we take the Laplace transform of:


We obtain:


which is now an algebraic equation. We collect the terms involving X(s) on the left-hand side,
we get:


If we multiply both sides by the inverse of , then:


The output of the system is:


Which means






Gu Fx x + =
) ( G ) FX( x(0) ) ( s U s s sX + =
x(0) ) ( G ) ( X ) F I ( + = s U s s
) F I ( s
x(0) ) ( ) ( G ) ( ) ( X
-1 -1
F sI s U F sI s + =
) ( ) ( H ) ( s JU s X s Y + =
) ( x(0) ) ( H ) ( G ) ( H ) (
-1 -1
s JU F sI s U F sI s Y + + =
System Transfer Functions
19
If we assume that the initial conditions are zero, the input-output relationship is:





J G ) ( H
) (
) (
) (
1 -
+ = = F sI
s U
s Y
s G
Example 1
20
Consider the system with state-variable description:






Find the corresponding state diagram and compute the transfer function.



(


=
0 1
6 5
F
(

=
0
1
G
| | 0 1 = H 0 = J
Example 1 (cont.)
21
Compute the transfer function form:




and compute:





Therefore:
(

+
=
s
s
F sI
1
6 5
6 ) 5 (
5 1
6
) (
1
+ +
(

=

s s
s
s
F sI
| | | |
6 ) 5 (
0
1
5 1
6 ) 5 (
0
1
5 1
6
1 0
) (
+ +
(

+
=
+ +
(

=
s s
s
s s
s
s
s G
) 3 )( 2 (
1
) (
+ +
=
s s
s G
State Diagram Example
22
The phase variable form of a system is given by:







Draw the flow graph model.











2

You might also like