0% found this document useful (0 votes)
17 views46 pages

Module 1 2021-2022 Introduction

The document provides an introduction to state-space representation of dynamical systems, detailing the concept of state variables and their significance in determining system behavior. It outlines the advantages of using state-variable models, including their applicability to both linear and nonlinear systems, and presents methods for deriving state-space models from differential equations. Examples of state-space models for electrical and mechanical systems are included to illustrate the application of these concepts.

Uploaded by

hawkins.agwere
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views46 pages

Module 1 2021-2022 Introduction

The document provides an introduction to state-space representation of dynamical systems, detailing the concept of state variables and their significance in determining system behavior. It outlines the advantages of using state-variable models, including their applicability to both linear and nonlinear systems, and presents methods for deriving state-space models from differential equations. Examples of state-space models for electrical and mechanical systems are included to illustrate the application of these concepts.

Uploaded by

hawkins.agwere
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

[Link].

ed

Raising a new Generation of Leaders

Module 1: Introduction
Contents
• Concept of state of a dynamical system
• State-variable representation of a dynamical system
• Derivation of state-space models for simple electrical
and mechanical systems
• Computer simulation I

• Tutorial

2
2
1.1 The state of a dynamical system
• State-space representation (or representation
by first-order differential equations) is one of
the mathematical methods employed in the
analysis of dynamic systems. The other
method is the transfer-function
representation (or representation by higher-
order differential equations).

3
3
• “The state of a dynamic system is the
smallest set of variables (called state
variables) such that the knowledge of these
variables at t = t0, together with the
knowledge of the input for t ≥ t0, completely
determines the behaviour of the system for
any time t ≥ t0”(Ogata, 1997).

4
4
• This definition means that state variables of
a dynamic system provide information which
helps to determine the behaviour of the
dynamic system. These variables are usually
represented by x1, x2, x3,…, xn , and form what
is termed state space whose dimension is n
(the number of the variables).

5
5
• In choosing the state variables for a dynamic
system, one method is to choose physical
variables associated with energy storage. For
example, the potential and kinetic energy of a
mass are stored in the position and velocity,
respectively. Therefore, position and velocity
can be chosen as state variables for a mass.
• Likewise, for an electric circuit, the capacitor
voltages and inductor currents can be chosen as
state variables.

6
6
• The state-variable approach has the following
advantages:
It applies even if the initial state is non zero.
It describes not only the output, but also the
internal information, of the system.
The state variables reside inside the system, and
are not necessarily accessible from the input and
output terminals. Hence, the state variable
equation is also called the internal description of
the system.
7
7
Other advantages are:
• Once the state variable description of a system is
obtained, the system can be readily simulated on a
digital computer.
• It is popular in describing control systems. In fact,
systems in general, including both linear and
nonlinear ones, can be represented by it. Also, it is
commonly used for analysis and design of
advanced control systems.

8
8
1.2 State-variable representation of a dynamical system
The state-space model for a linear, time-invariant,
multiple-input multiple-output dynamical system can be
generally represented by
   
x t  Ax t  Bu t  Ed t State equations
   
y t  Cx t  Du t  Hd t Output equations
where x is an n x 1 state vector, y is an m x 1 output vector,
u is a p x 1 input vector, d is a q x 1 disturbance vector, A
is an n x n system matrix, B is an n x p input matrix, C is
an m x n output matrix, D is an m x p transmission matrix,
E and H are input and output disturbance matrices.
9
9
• The state and output equations are presented in
block diagram form as shown in Fig. 1.
H
d E
u x x y
B +
+  dt C +
+

A
D
Fig. 1: State-space model in block diagram form
• It is very common to obtain the state-space model
of a dynamic system from its differential equation.
10
10
The following steps are useful:

• Rewrite the differential equation or set of differential


equations so that the highest derivatives are on the left
hand side (L.H.S.) of each of the equations in the set.
This is always possible for a reducible set of equations.
• These equations are then reduced to sets of first order
equations by choosing the lower derivatives as new
variables as necessary.
• Then write the state model, which consists of the state
equations and output equation in matrix form.
11
11
Example 1
Express the following differential equation in
state-space form.
y  a1 y  a2 y  a3 y  u
Solution:
Applying the above steps, we proceed as follows:
• Step 1: Rewriting the differential equation so that
the highest derivative is on the left hand side gives
y  a1 y  a2 y  a3 y  u
12
12
Step 2: The order of the differential equation
is 3. Thus, we have 3 state variables. Any of
the following sets constitutes the state
variables.
1. x1  y; x2  y ; x3  y
2. x1  y ; x2  y; x3  y
3. x1  y; x2  y; x3  y
• Step 3: If the first set above is taken as state
variables, the first order differential equations are as
follows:
13
13
x1  y; x2  y ; x3  y
In matrix form, we have
x1  y  x2  0.x1  1.x2  0.x3  0.u
x2  y  x3  0.x1  0.x2  1.x3  0.u
x3  y  a1 y  a2 y  a3 y  u
 a1 x3  a2 x2  a3 x1  u
 a3 x1  a2 x2  a1 x3  u
 x1   0 1 0   x1  0
 x    0 0    
1   x2   0  u 
 2 
 x3   a3  a2  a1   x3  1
14
14
The output equation can be written out
similarly, while the whole model is presented
in a block diagram as shown below.

15
15
1.3 Derivation of state-space models for simple
electrical and mechanical systems
Example 2
Consider a mass-spring-damper system shown in
Fig. 2. If the force u is the input and the
displacement y of the mass is the output, find the
suitable state-space equations to describe the
system. F is the viscous friction coefficient and k
is the spring constant.
y

K
u(t) M
F

Fig. 2: Mass-spring-damper system 16


16
Solution:
The differential equation describing the
2
system is as follows: u(t )  M y  F dy  ky
d
dt 2 dt
The above equation can be rewritten so as to make the
highest derivative the subject of the formula:
d 2 y( t )F dy(t ) k u(t )
  y( t ) 
dt 2 M dt M M
The mass stores its potential energy and kinetic
energy in its position and velocity, respectively.
Therefore, position and velocity can be chosen as
state variables of the system.
17
17
The two state variables x1(t) and x2(t) are
selected as x1(t) = y(t) for position
x2(t) = dy(t)/dt for velocity
Hence, the state equations are
x 1  y (t )  x 2 (t )  0.x1  1.x 2  0.u
x 2  y   F y  k y  u   F .x 2  k .x1  1 .u
M M M M M M
And the output equation is
y(t )  x1  1.x1  0.x 2  0.u

18
18
The overall state-space model of the
system in matrix form is now
 x 1   0 1   x1   0 
   k F      1  u(t )
x 2   M  M  x 2   M 
 x1( t ) 
y( t )  1 0  
x 2 ( t )
The block diagram as well as the state diagram is
shown below.

19
19
For RLC circuits, the following are the procedure for
developing state variable equations for them.
 Identify the branches containing capacitors and
inductors, and assign all capacitor voltages and
inductor currents as state variables. Write down
capacitor currents and inductor voltages as shown in
Fig. 3 below. Note that current flows from a positive
terminal to a negative one.
_o + +_o
+- +-
dx j .
xi C L L  Lxj
dt
dxi .
C  C xi xj
dt
_o _- _-_o
Fig. 3
+- +- +-+-

20 20
 Use Kirchhoff’s voltage and/or current laws to
express every resistor’s voltage and current in
terms of state variables and, if necessary, the
input.
 Use Kirchhoff’s voltage and/or current laws to
develop a state equation.

21 21
Example 3
Consider the RLC network shown in Fig. 4 with all
the parameters as indicated. Determine the state-
variable equations. The input u(t) is a voltage source
and the output is chosen as the voltage across the 2-
Ω resistor.
2H 3H
0.5Ω
0.5F 2Ω y(t)
+
u(t)
-

Fig. 4

22 22
Solution
Consider the network of Fig. 5, and follow the steps
outlined above.
2H 3H
0.5x1 0.5 Ω
x2 2Ω
+ 0.5F y = 2x3
u(t)
- Loop 1 Loop 2

Fig. 5
– Three branches of the network contain inductors
and capacitor. Therefore, three state variables will
be chosen.
– Let the two inductor currents x1(t), x3(t) and the
capacitor voltage x2(t) be chosen as state variables.
23 23
 Using Kirchhoff’s voltage and/or current laws,
the voltage drop across the resistors, inductors
and the current through the capacitor are as
indicated.
 Then, using Kirchhoff’s voltage and current laws
at the loops and nodes, respectively, develop the
state equations.
2H 3H
0.5x1 0.5 Ω
x2 2Ω
+ 0.5F y = 2x3
u(t)
- Loop 1 Loop 2

Fig. 5

24 24
2H 3H
0.5x1 0.5 Ω
x2 2Ω
 Applying KVL to Loop 2, we
+ 0.5F y = 2x
3
u(t) get
x 2  3x 3  2x 3
- Loop 1 Loop 2

Fig. 5  x 3  0.33x 2  0.67 x 3 (1)


 Applying KCL to the node, we get
x1  0.5x 2  x 3
 The output y(t) is
 x 2  2x1  2x 3 given as
(2)
 Applying KVL to Loop 1, we obtain y(t) = 2x3 (4)
u ( t )  0.5x1  2x 1  x 2  0
 x 1  0.25x1  0.5x 2  0.5u ( t ) (3)
25 25
In matrix form, we have x 1  0.25x1  0.5x 2  0.5u(t )
 x 1 ( t )   0.25  0.5 0   x1( t )  0.5
x 2  2x1  2x 3
       x 3  0.33x 2  0.67x 3
 x 2 ( t )   2 0  2   x 2 ( t )   0  u ( t )
       y(t) = 2x3
 x 3 ( t )   0 0.33  0.67  x 3 ( t )   0 
 x1( t ) 
 
y( t )  0 0 2 x 2 ( t )
 
 x 3 ( t ) 

26 26
Example 4
Represent the system shown in Fig. 6 below in
state-space form. The input or control signals are
u1(t) and u2(t), while the outputs are y1(t) and y2(t).
v2 v1
R2 R3 R1
y2 y1
+ C2 C1 +
u2(t) u1(t)
- -

Solution: Fig. 6
As can be seen from the figure, three loop equations
and two node equations can be written.
27 27
v2=x2 v1=x1
R2 R3 R1 The node equations
y2 y1 are: dx 2
i1  i 2  C 2
dt
(4)
+ C2 C1 + dx1
u2(t) i1 i2 u1(t) i 2  i3  C1 (5)
i3 dt
- - Substituting equations
Fig. 7 (1), (2), & (3) into
The loop equations are: equations (4) & (5)
u2  x2
(1) yields the equations:
u 2  R 2i1  x 2  0  i1 
R2 u 2  x 2 x 2  x1 dx 2
x 2  x1   C2 (6)
x 2  R 3i 2  x1  0  i 2  (2) R2 R3 dt
R3 x 2  x1 dx1 x1  u1
x1  u1  C1  (7)
x1  R1i3  u1  0  i3  (3) R3 dt R1
R1
28 28
The state and output equations are:
dx 2 1  R 2  R3  1 u
 x1    2
x  2
dt C2R 3 C R
 2 2 3 R C R
2 2
dx1  R1  R 3  1 x  1 u
   x1  2 CR 1
dt C
 1 1 3R R C R
1 3 1 1
y1  x1
y2  x 2
  R1  R 3  1   1 

 x 1   C R R     x1   C R 0
C R   u1 
   1 1 3 1 3     1 1  
 x 2   1  R 2  R 3   x   0 1  u 
  2  
 C R 
 C2R 2   2 
 2 3  C 2 R 2 R 3 

 y1  1 0  x1 
   
 y 2  0 1  x 2 
29 29
Example 5*
Obtain the state-variable equations for the circuit of
Fig. 8. The output is the voltage v1; the input or
control variable is a current source i(t).
L2 i2
v2 v1

L3 i3 C2 C1 L1 i1
i(t)

Solution: Fig. 8
Again three loop equations and two node equations
can be written.
30 30
L2 i2
v2 v1

L3 i3 C2 C1 L1 i1
i(t)

Fig. 8di
v1  L1 d i1  1  1 v1 (1)
dt dt L1
d di 2
v 2  L 2 i 2  v1    1 v1  1 v 2 (2)
dt dt L2 L2
d di3
v 2  L3 i3   1 v2 (3)
dt dt L3
d dv1
i 2  C1 v1  i1    1 i1  1 i 2
dt dt C1 C1 (4)
dv
i  i3  C 2 d v 2  i 2  2  1 i  1 i 2  1 i3
dt dt C2 C2 C2 (5)
31 31
di
v1  L1 d i1  1  1 v1
Let x1 = v1, x2 = v2, x3 = i1, x4=i2, dt dt L1
di
and x5 = i3. v 2  L 2 d i 2  v1  2   1 v1  1 v 2
dt dt L2 L2
di
Also, u = i and y = v1. v 2  L3 d i3  3  1 v 2
dt dt L3
dv
Therefore, i 2  C1 d v1  i1  1   1 i1  1 i 2
dt dt C1 C1
dv
dx1 i  i3  C 2 d v 2  i 2  2  1 i  1 i 2  1 i3
  1 x3  1 x 4 dt dt C2 C2 C2
dt C1 C1
dx1
dx 2  0 x1  0 x 2  1 x 3  1 x 4  0 x 5  0u
 1 u  1 x 4  1 x5 dt C1 C1
dt C2 C2 C2 dx 2
 0 x1  0 x 2  0 x 3  1 x 4  1 x 5  1 u
dx 3 1 dt C2 C2 C2
 x1 dx 3
dt L1  1 x1  0 x 2  0 x 3  0 x 4  0 x 5  0u
dx 4 dt L1
  1 x1  1 x 2 dx 4
  1 x1  1 x 2  0 x 3  0 x 4  0 x 5  0u
dt L2 L2 dt L2 L2
dx 5
 1 x1
dx 5
 1 x1  0 x 2  0 x 3  0 x 4  0 x 5  0u
dt L3 dt L3
y  x1  0 x 2  0 x 3  0 x 4  0 x 5
y  x1
32 32
In matrix form, we have
 x 1   0 0  1 / C1 1 / C1 0   x1   0 
      
 x 2   0 0 0  1 / C 2  1 / C 2   x 2  1 / C 2 
      
 x 3    1 / L1 0 0 0 0   x 3    0 u(t)
      
 x 4   1 / L 2 1 / L 2 0 0 0  x 4   0 
      
 x   0 1 / L3 0 0 0   x 5   0 
 5 
 x1 
 
x 2 
  Y s 2
y( t )  1 0 0 0 0 x 3  U 
  L1L3 (L1C1L2C2L3s5  (L1C1L3 + L1C1L2 + L2C2L3 + C2L1L3 )s3 + (L1  L3 + L2 )s)
x 4  s
  
 x  L1L3 (L1C1L2C2L3s4  (L1C1L3 + L1C1L2 + L2C2L3 + C2L1L3 )s2 + (L1  L3 + L2 ))
 5
33 33
Example 5 Revisited*
Obtain the minimum state-variable equations for the
circuit of Fig. 8. The output is the voltage v1; the input
or control variable is a current source i(t).
L2 i2
v2 v1

L3 i3 C2 C1 L1 i1
i(t)

Solution: Fig. 8
As can be seen from the figure, three loop equations
and two node equations can be written.
34 34
L2 i2
v2 v1

L3 i3 C2 C1 L1 i1
i(t)

d Fig. 6
v1  L1 i1 (1) Substituting equation 1 into
dt
v 2  L 2 d i 2  v1 (2) equation 2 and equating the
dt result with equation 3 yields:
v 2  L3 d i3 (3) d d d
dt L3 i3  L2 i 2  L1 i1
dt dt dt
i 2  C1 d v1  i1 (4)
dt L3  di3  L 2  di 2  L1  di1
i  i3  C 2 d v 2  i 2 (5)  L3i3  L 2i 2  L1i1  k (6)
dt
Equation 6 reveals that one inductor current is
dependent upon the other two inductor currents.
35 35
Thus, there are only four independent physical
state variables: two inductor currents and two
capacitor voltages. That is, v1  L1 d i1
dt
d i v
x1 = v1, x2 = v2, x3 = i1, and x4=i2. 2 2 dt 2 1
v  L

And the overall state-space v 2  L3 d i3


dt
representation in matrix is i 2  C1 d v1  i1
dt
 0 0 1 1  i  i3  C 2 d v 2  i 2
 C1 C1   0  dt
  L1  L 2  L3   1 

L3i3  L2i 2  L1i1  k
 0 0 
x   C 2 L3 L3C 2  x   C2  u
1 
 L1 0 0 0   0 
 1   
 L 1 0 0   0 
 2 L2 
y  1 0 0 0x 36 36
The transfer function from this minimal
representation is
Y s
U L L (L C L C L s 4  (L C L + L C L + L C L + C L L )s2 + (L  L + L ))
1 3 1 1 2 2 3 1 1 3 1 1 2 2 2 3 2 1 3 1 3 2

37 37
Example 6*
Consider the sensor shown in Fig. 9 [Harold, 2007]
below. It is a variable capacitance transducer which
converts sound waves to an electrical signal. The input
is the pressure p(t), and the output is the voltage vR
across the resistor. Derive the state-space representation
for the system.
Membrane
Black Membrane Fixed plate
Output
+ plate
signal, vR p
Sound + F h
vs
waves -

0 x L
Insulator (b)
(a)
Fig. 9
38 38
Solution:
 The arrangement results in a varying capacitance
between the elastic membrane(a variable plate) and
a stationary plate, which is due to the movement of
the membrane in response to the pressure from the
sound waves. The charge on the plates is derived
from the voltage source vs.
 There are two principal differential equations
composing the overall mathematical model of the
transducer. The first one is a first-order differential
equation resulting from the application of a KVL to
the electrical circuit in the arrangement.
39 39
 The second one is a second-order differential
equation resulting from the equation of motion of
the membrane (here the Newton’s second law of
motion is used). dvc
RC  v c  vs (1)
2 dt
where M dx  F  Fe  Fd  Fh (2)
dt 2
F is due to the pressure from the waves, i.e.,F = pA;
Fe is due to electrostatic interaction between the
membrane and the fixed plate, i.e., 1/2Cv2 = Fe h or Fe
= Cv2/2h;
Fd is due to damping, and proportional to the velocity
of motion of the membrane, i.e., Fd = Bdx/dt;
40 40
Fh is due to the elasticity of the membrane, i.e.,
Fh = kx.
From electrostatics, we know that C = Aε/h, where A
is the area of each plate, ε is the permittivity of the
insulator or dielectric between the plates, and h(=L-x)
is the separation distance between the plates.
dvc dvc L  x L  x
RC  v c  vs   vs  vc (3)
dt dt RA RA
2
2 2 A v
M dx  F  Fe  Fd  Fh  M dx  pA  c  B dx  kx (4)
dt 2 dt 2 2(L  x )(L  x ) dt
By choosing the state variables as x1 = vc, x2 = x, and
x3 = dx/dt, the state and output equations are
41 41
x1 = vc, x2 = x, and x3 = dx/dt,
dvc dvc L  x
RC  v c  vs   vs  L  x v c (3)
dt dt RA RA
2
2 2 Av
M dx  F  Fe  Fd  Fh  M dx  pA  c  B dx  kx (4)
dt 2 dt 2 2(L  x )(L  x ) dt
dvc
x1  v c   1 x1x2  L x1  vs x2  Lvs 
dt RA
x2  x  x3
2 x12
x3  x  dx   A  k x2  B x3  A p
dt 2 2M L  x 2 M M M
2
y  vR  vs  vc   x1 vs

42 42
These equations, according to the general form of a
nonlinear state-space representation,
x  f x   g(x)u
y  hx 
can be written as
 vs 
Lv s   
 L 1
 x1    x1  x2  x1x2    0
  RA RA RA RA
 x      
2  x3    0 p
 
 x   x 2  A
 A 1  k x Bx  
 3  
 2M L  x 2 M 2 M 3   M 
 2 
y   x1  vs 
43 43
1.4 Computer simulation
The following are few of the important MATLAB commands for
computer analysis of systems represented in state-space model.
[A,B,C,D] = tf2ss(num, den); Example 6
[A,B,C,D] = zp2ss(z,p,k); Use the commands
[num, den] = ss2tf(A,B,C,D); given above to perform
[z,p,k] = ss2zp(A,B,C,D);
a simple computer
analysis on the transfer
pvalues = eig(A);
function
step(A,B,C,D);
Y 25
[y,x,t] = step(A,B,C,D); U s 2  4s + 25
[y,x,t] = step(A,B,C,D,u);

44 44
1.5 Tutorial 1
See the course instructor for the list of tutorial
problems for this module.

45 45
46 46

You might also like