1. MAHATMA GANDHI INSTITUTE OF
TECHNICAL EDUCATION &
RESEARCH CENTER
ELECTRONICS & COMMUNICATIONELECTRONICS & COMMUNICATION
SUB:CONTROL SYSTEM ENGINEERING
2nd
year (4th
sem)
2. ENROLLMENT NO. : NAME:
140330111001 AMETA KRUSHNAKANT G.
140330111009 POTTBATNI SANJAY A.
140330111012 YAGNIK GAGAN R.
Guided by: Prof. Shruti Dholariya
4. STATE VARIABLE MODELS
We consider physical sytems described by nth-order ordinary differential
equation. Utilizing a set of variables, known as state variables, we can obtain
a set of first-order differential equations. We group these first-order
equations using a compact matrix notation in a model known as the state
variable model.
The time-domain state variable model lends itself readily to computer
solution and analysis. The Laplace transform is utilized to transform the
differential equations representing the system to an algebraic equation
expressed in terms of the complex variable s. Utilizing this algebraic
equation, we are able to obtain a transfer function representation of the
input-output relationship.
With the ready availability of digital computers, it is convenient to consider
the time-domain formulation of the equations representing control system.
The time domain techniques can be utilized for nonlinear, time varying, and
multivariable systems.
5. dt
)t(dy
)t(x
)t(y)t(x
2
1
=
=
yycy)t(uW,yk
2
1
E,ym
2
1
E 2
2
2
1 δ−δ=δ==
Kinetic and Potential energies, virtual work.
Therefore we will define a set of variables as [x1 x2], where
Lagrange’s equation ( ) ( )
y
2121
Q
y
EE
y
EE
dt
d
=
∂
−∂
−
∂
−∂
21 EEL −=Lagrangian of the system is expressed as Generalized Force
)t(uxkxc
dt
dx
m
)t(ukx
dt
dy
c
dt
yd
m
12
2
2
2
=++
=++
Equation of motion in terms of state variables.
We can write the equations that describe the behavior of the spring-mass-
damper system as the set of two first-order differential equations.
6. )t(u
m
1
x
m
k
x
m
c
dt
dx
x
dt
dx
12
2
2
1
+−−=
= This set of difefrential equations
describes the behavior of the state of
the system in terms of the rate of
change of each state variables.
As another example of the state variable characterization of a system, consider the
RLC circuit shown in Figure 3.
u(t)
Current
source
L
C
R
Vc
Vo
iL
ic
( ) 2
c
2
c2
2
L1 vC
2
1
dti
C2
1
E,iL
2
1
E === ∫
The state of this system can
be described in terms of a set
of variables [x1 x2], where x1 is
the capacitor voltage vc(t) and
x2 is equal to the inductor
current iL(t). This choice of
state variables is intuitively
satisfactory because the
stored energy of the network
can be described in terms of
these variables.
Figure 3
7. Therefore x1(t0) and x2(t0) represent the total initial energy of the network and
thus the state of the system at t=t0.
Utilizing Kirchhoff’s current low at the junction, we obtain a first order differential
equation by describing the rate of change of capacitor voltage
L
c
c i)t(u
dt
dv
Ci −==
Kirchhoff’s voltage low for the right-hand loop provides the equation describing
the rate of change of inducator current as
cL
L
viR
dt
di
L +−=
The output of the system is represented by the linear algebraic equation
)t(iRv L0 =
8. We can write the equations as a set of two first order differential equations in
terms of the state variables x1 [vC(t)] and x2 [iL(t)] as follows:
21
2
2
1
x
L
R
x
L
1
dt
dx
)t(u
C
1
x
C
1
dt
dx
−=
+−=L
c
i)t(u
dt
dv
C −=
cL
L
viR
dt
di
L +−=
The output signal is then 201 xR)t(v)t(y ==
Utilizing the first-order differential equations and the initial conditions of the
network represented by [x1(t0) x2(t0)], we can determine the system’s future
and its output.
The state variables that describe a system are not a unique set, and several
alternative sets of state variables can be chosen. For the RLC circuit, we
might choose the set of state variables as the two voltages, vC(t) and vL(t).
9. In an actual system, there are several choices of a set of state variables that
specify the energy stored in a system and therefore adequately describe the
dynamics of the system.
The state variables of a system characterize the dynamic behavior of a
system. The engineer’s interest is primarily in physical, where the variables
are voltages, currents, velocities, positions, pressures, temperatures, and
similar physical variables.
The State Differential Equation:
The state of a system is described by the set of first-order differential
equations written in terms of the state variables [x1 x2 ... xn]. These first-order
differential equations can be written in general form as
mnm11nnnn22n11nn
mm2121nn22221212
mm1111nn12121111
ububxaxaxax
ububxaxaxax
ububxaxaxax
++++=
++++=
++++=
10. Thus, this set of simultaneous differential equations can be written in matrix
form as follows:
+
=
m
1
nm1n
m111
n
2
1
nn2n1n
n22221
n11211
n
2
1
u
u
bb
bb
x
x
x
aaa
aaa
aaa
x
x
x
dt
d
n: number of state variables, m: number of inputs.
The column matrix consisting of the state variables is called the state vector
and is written as
=
n
2
1
x
x
x
x
11. THE TRANSFER FUNCTION FROM THE STATE EQUATION
The transfer function of a single input-single output (SISO) system can be
obtained from the state variable equations.
uBxAx +=
xCy =
where y is the single output and u is the single input. The Laplace transform
of the equations
)s(CX)s(Y
)s(UB)s(AX)s(sX
=
+=
where B is an nx1 matrix, since u is a single input. We do not include initial
conditions, since we seek the transfer function. Reordering the equation
12. [ ]
)s(BU)s(C)s(Y
)s(BU)s()s(BUAsI)s(X
)s(UB)s(X]AsI[
1
φ=
φ=−=
=−
−
Therefore, the transfer function G(s)=Y(s)/U(s) is
B)s(C)s(G φ=
Example:
Determine the transfer function G(s)=Y(s)/U(s) for the RLC circuit as described
by the state differential function
[ ]xR0y,u
0
C
1
x
L
R
L
1
C
1
0
x =
+
−
−
=
15. We can use the function expm to compute the transition matrix for a given
time. The expm(A) function computes the matrix exponential. By contrast the
exp(A) function calculates ea
ij for each of the elements aijϵA.
∫ ττ+= τ−
t
0
)t(AAt
d)(uBe)0(xe)t(x
∫ τττ−φ+φ=
t
0
d)(uB)t()0(x)t()t(x
For the RLC network, the state-space representation is given as:
[ ] [ ]0Dand01C,
0
2
B,
31
20
A ==
=
−
−
=
The initial conditions are x1(0)=x2(0)=1 and the input u(t)=0. At t=0.2, the state
transition matrix is calculated as
>>A=[0 -2;1 -3], dt=0.2; Phi=expm(A*dt)
Phi =
0.9671 -0.2968
0.1484 0.5219
16. The state at t=0.2 is predicted by the state transition method to be
=
−
=
==
6703.0
6703.0
x
x
5219.01484.0
2968.09671.0
x
x
0t2
1
2.0t2
1
The time response of a system can also be obtained by using lsim
function. The lsim function can accept as input nonzero initial conditions
as well as an input function. Using lsim function, we can calculate the
response for the RLC network as shown below.
t
u(t)
DuCxy
BuAxx
+=
+=
System
Arbitrary Input Output
t
y(t)
y(t)=output response at t
T: time vector
X(t)=state response at t
t=times at which
response is
computed
Initial conditions
(optional)
u=input
[y,T,x]=lsim(sys,u,t,x0)
17. THE DESIGN OF STATE VARIABLE FEEDBACK SYSTEMS
The time-domain method, expressed in terms of state variables, can also be utilized
to design a suitable compensation scheme for a control system. Typically, we are
interested in controlling the system with a control signal, u(t), which is a function of
several measurable state variables. Then we develop a state variable controller that
operates on the information available in measured form.
State variable design is typically comprised of three steps. In the first step, we
assume that all the state variables are measurable and utilize them in a full-state
feedback control law. Full-state feedback is not usually practical because it is not
possible (in general) to measure all the states. In paractice, only certain states (or
linear combinations thereof) are measured and provided as system outputs. The
second step in state varaible design is to construct an observer to estimate the
states that are not directly sensed and available as outputs. Observers can either
be full-state observers or reduced-order observers. Reduced-order observers
account for the fact that certain states are already available as system outputs;
hence they do not need to be estimated. The final step in the design process is to
appropriately connect the observer to the full-state feedback conrol low. It is
common to refer to the state-varaible controller as a compensator. Additionally, it is
possible to consider reference inputs to the state variable compensator to complete
the design.
18. note that the initial condition is included in the transformationsF(s) - f(0+)=L
t
f t( )
d
d
⋅
s
0
∞
tf t( ) e
s t⋅( )−
⋅
⌠
⌡
d⋅-f(0+) +=
0
∞
tf t( ) s− e
s t⋅( )−
⋅ ⋅
⌠
⌡
d−f t( ) e
s t⋅( )−
⋅=
0
∞
vu
⌠
⌡
d
we obtain
v f t( )anddu s− e
s t⋅( )−
⋅ dt⋅
and, from which
dv df t( )u e
s t⋅( )−where
u v⋅ uv
⌠
⌡
d−=vu
⌠
⌡
dby the use of
L
t
f t( )
d
d
0
∞
t
t
f t( ) e
s t⋅( )−
⋅
d
d
⌠
⌡
d
Evaluate the laplace transform of the derivative of a function
The Laplace Transform
19. Practical Example - Consider the circuit.
The KVL equation is
4 i t( )⋅ 2
t
i t( )
d
d
⋅+ 0 assume i(0+) = 5 A
Applying the Laplace Transform, we have
0
∞
t4 i t( )⋅ 2
t
i t( )
d
d
⋅+
e
s t⋅( )−
⋅
⌠
⌡
d 0 4
0
∞
ti t( ) e
s t⋅( )−
⋅
⌠
⌡
d⋅ 2
0
∞
t
t
i t( ) e
s t⋅( )−
⋅
d
d
⌠
⌡
d⋅+ 0
4 I s( )⋅ 2 s I s( )⋅ i 0( )−( )⋅+ 0 4 I s( )⋅ 2 s⋅ I s( )⋅+ 10− 0
transforming back to the time domain, with our present knowledge of
Laplace transform, we may say thatI s( )
5
s 2+
:=
0 1 2
0
2
4
6
i t( )
t
t 0 0.01, 2..( )≡
i t( ) 5 e
2 t⋅( )−
⋅≡
20. The Partial-Fraction Expansion (or Heaviside expansion theorem)
Suppose that
The partial fraction expansion indicates that F(s) consists of
a sum of terms, each of which is a factor of the denominator.
The values of K1 and K2 are determined by combining the
individual fractions by means of the lowest common
denominator and comparing the resultant numerator
coefficients with those of the coefficients of the numerator
before separation in different terms.
F s( )
s z1+
s p1+( ) s p2+( )⋅
or
F s( )
K1
s p1+
K2
s p2+
+
Evaluation of Ki in the manner just described requires the simultaneous solution of n equations.
An alternative method is to multiply both sides of the equation by (s + pi) then setting s= - pi, the
right-hand side is zero except for Ki so that
Ki
s pi+( ) s z1+( )⋅
s p1+( ) s p2+( )+
s = - pi
21. s -> 0t -> infinite
Lim s F s( )⋅( )Lim f t( )( )7. Final-value Theorem
s -> infinitet -> 0
Lim s F s( )⋅( )Lim f t( )( ) f 0( )6. Initial-value Theorem
0
∞
sF s( )
⌠
⌡
d
f t( )
t
5. Frequency Integration
F s a+( )f t( ) e
a t⋅( )−
⋅4. Frequency shifting
s
F s( )
d
d
−t f t( )⋅3. Frequency differentiation
f at( )2. Time scaling
1
a
F
s
a
⋅
f t T−( ) u t T−( )⋅1. Time delay
e
s T⋅( )−
F s( )⋅
Property Time Domain Frequency Domain
22. The Transfer Function of Linear Systems
V1 s( ) R
1
Cs
+
I s( )⋅ Z1 s( ) R
Z2 s( )
1
CsV2 s( )
1
Cs
I s( )⋅
V2 s( )
V1 s( )
1
Cs
R
1
Cs
+
Z2 s( )
Z1 s( ) Z2 s( )+
30. Signal-Flow Graph Models
For complex systems, the block diagram method can
become difficult to complete. By using the signal-flow
graph model, the reduction procedure (used in the block
diagram method) is not necessary to determine the
relationship between system variables.
33. Example 2.8
Y s( )
R s( )
G1 G2⋅ G3⋅ G4⋅ 1 L 3− L 4−( )⋅ G5 G6⋅ G7⋅ G8⋅ 1 L 1− L 2−( )⋅ +
1 L 1− L 2− L 3− L 4− L 1 L 3⋅+ L 1 L 4⋅+ L 2 L 3⋅+ L 2 L 4⋅+
34. Example
2.10
Y s( )
R s( )
G1 G2⋅ G3⋅ G4⋅
1 G2 G3⋅ H 2⋅+ G3 G4⋅ H 1⋅− G1 G2⋅ G3⋅ G4⋅ H 3⋅+