Control System - Unit - 6
Control System - Unit - 6
(Block diagram of the linear, continuous time control system represented in state space)
𝐗 𝐭 = 𝐀𝐗 𝐭 + 𝐁𝐮 𝐭
𝐘 𝐭 = 𝐂𝐗 𝐭 + 𝐃𝐮 𝐭
Consider following nth order LTI system relating the output y(t) to the input u(t).
Phase variables: The phase variables are defined as those particular state variables which are
obtained from one of the system variables & its (n-1) derivatives. Often the variables used is
the system output & the remaining state variables are then derivatives of the output.
𝑥1 = 𝑦
𝑑𝑦 𝑑𝑥
𝑥2 = =
𝑑𝑡 𝑑𝑡
𝑑𝑦 𝑑𝑥2
𝑥3 = =
𝑑𝑡 𝑑𝑡
⋮ ⋮ ⋮
𝑑𝑥𝑛 −1
𝑥𝑛 = 𝑦 𝑛−1 =
𝑑𝑡
5
From the above equations we can write
𝑥1 = 𝑥2
𝑥2 = 𝑥3
⋮ ⋮
𝑥𝑛 −1 = 𝑥𝑛
𝑥𝑛 = −𝑎𝑛 𝑥1 − 𝑎𝑛−1 𝑥2 − ⋯ … … … − 𝑎1 𝑥𝑛 + 𝑢
X t = AX t + Bu t
𝑥1 0 1 0…… 0
𝑥2 0 0 1…… 0
Where 𝑋 = ⋮ , 𝐴= ⋮ ⋮ ⋮ ⋮
⋮ 0 1
𝑥𝑛 𝑛×1 0 0……
−𝑎𝑛 −𝑎𝑛−1 −𝑎𝑛−2 … … . −𝑎1 𝑛×𝑛
Y t = CX t
𝐶 = 1 0……. 0 1×𝑛
6
Freebody Diagram Equation
There are three energy storage elements, so we expect three state equations. The energy
storage elements are the spring, k2, the mass, m, and the spring, k1. Therefore we choose
as our state variables x (the energy in spring k2 is ½k2x²), the velocity at x (the energy in
the mass m is ½mv², where v is the first derivative of x), and y (the energy in spring k 1 is
½k1(y-x)² , so we could pick y-x as a state variable, but we'll just use y (since x is already a
state variable; recall that the choice of state variables is not unique). Our state variables
become:
Now we want equations for their derivatives. The equations of motion from the free body
diagrams yield
or
7
with the input u=fa.
There are three energy storage elements, so we expect three state equations. Try
choosing i1, i2 and e1 as state variables. Now we want equations for their derivatives. The
voltage across the inductor L2 is e1 (which is one of our state variables)
This equation has our input (ia) and two state variable (iL2 and iL1) and the current
through the capacitor. So from this we can get our second state equation
Our third, and final, state equation we get by writing an equation for the voltage across
L1 (which is e2) in terms of our other state variables
8
So our state space representation becomes
Now, take the Laplace Transform (with zero initial conditions since we are finding a
transfer function):
We want to solve for the ratio of Y(s) to U(s), so we need so remove Q(s) from the
output equation. We start by solving the state equation for Q(s)
The matrix Φ(s) is called the state transition matrix. Now we put this into the output
equation
Note that although there are many state space representations of a given system, all
of those representations will result in the same transfer function (i.e., the transfer
function of a system is unique; the state space representation is not).
9
Example: State Space to Transfer Function
Find the transfer function of the system with state space representation
First find (sI-A) and the Φ=(sI-A)-1 (note: this calculation is not obvious. Details
are here). Rules for inverting a 3x3 matrix are here.
To make this task easier, MatLab has a command (ss2tf) for converting from state space
to transfer function.
>> [n,d]=ss2tf(A,B,C,D)
n =
10
0 0 1.0000
5.0000
d =
>> mySys_tf=tf(n,d)
Transfer function:
s + 5
----------------------
s^3 + 2 s^2 + 4 s + 3
For such systems (no derivatives of the input) we can choose as our n state variables the
variable y and its first n-1 derivatives (in this case the first two derivatives)
11
Taking the derivatives we can develop our state space model
Note: For an nth order system the matrices generalize in the obvious way (A has ones above the
main diagonal and the differential equation constants for the last row, B is all zeros with b0 in the
bottom row, C is zero except for the leftmost element which is one, and D is zero)
For such systems (no derivatives of the input) we can choose as our n state variables the
variable y and its first n-1 derivatives (in this case the first two derivatives)
Taking the derivatives we can develop our state space model (which is exactly the same
as when we started from the differential equation).
12
Note: For an nth order system the matrices generalize in the obvious way (A has ones
above the main diagonal and the coefficients of the denominator polynomial for the last
row, B is all zeros with b0 (the numerator coefficient) in the bottom row, C is zero except
for the leftmost element which is one, and D is zero)
If we try this method on a slightly more complicated system, we find that it
initially fails (though we can succeed with a little cleverness).
The method has failed because there is a derivative of the input on the right hand, and
that is not allowed in a state space model.
Fortunately we can solve our problem by revising our choice of state variables.
13
The second and third equations are not correct, because ÿ is not one of the state
variables. However we can make use of the fact:
In the third state variable equation we have successfully removed the derivative of the
input from the right side of the third equation, and we can get rid of the ÿ term using the
same substitution we used for the second state variable.
The process described in the previous example can be generalized to systems with
higher order input derivatives but unfortunately gets increasingly difficult as the order
of the derivative increases. When the order of derivatives is equal on both sides, the
process becomes much more difficult (and the variable "D" is no longer equal to
zero). Clearly more straightforward techniques are necessary. Two are outlined
below, one generates a state space method known as the "controllable canonical form"
and the other generates the "observable canonical form (the meaning of these terms
derives from Control Theory but are not important to us).
We start by multiplying by Z(s)/Z(s) and then solving for Y(s) and U(s) in terms of
Z(s). We also convert back to a differential equation.
14
We can now choose z and its first two derivatives as our state variables
From these results we can easily form the state space model:
In this case, the order of the numerator of the transfer function was less than that of
the denominator. If they are equal, the process is somewhat more complex. A result
that works in all cases is given below; the details are here. For a general nth order
transfer function:
15
Observable Canonical Form (OCF)
Another commonly used state variable form is the "observable canonical form."
This term comes from Control Theory but its exact meaning is not important to us.
To understand how this method works consider a third order system with transfer
function:
We can convert this to a differential equation and solve for the highest order
derivative of y:
Now we integrate twice (the reason for this will be apparent soon), and collect terms
according to order of the integral:
Looking at the right hand side of the differential equation we note that y=q1 and we
call the two integral terms q2:
so
16
Now let's examine q2 and its derivative:
Again we note that y=q1 and we call the integral terms q3:
so
In this case, the order of the numerator of the transfer function was less than that of
the denominator. If they are equal, the process is somewhat more complex. A result
that works in all cases is given below; the details are here. For a general nth order
transfer function:
17
Key Concept: Transfer function to State Space (OCF)
For a general nth order transfer function:
𝐂 Adj SI − A 𝐁 + SI − A D
=
SI − A
SI − A is also known as characteristic equation when equated to zero.
MATLab Code
Y(s) s
= 3 2
U(s) s + 14s + 56s + 160
num=[1 0];
den=[1 14 56 160];
[A,B,C,D]=tf2ss(num,den)
A=
1 0 0
0 1 0
18
B=
C=
0 1 0
D=
The roots of characteristic equation that we have described above are known as eigen values
of matrix A.
Now there are some properties related to eigen values and these properties are written below-
1. Any square matrix A and its transpose AT have the same eigen values.
2. Sum of eigen values of any matrix A is equal to the trace of the matrix A.
3. Product of the eigen values of any matrix A is equal to the determinant of the matrix A.
4. If we multiply a scalar quantity to matrix A then the eigen values are also get multiplied by
the same value of scalar.
5. If we inverse the given matrix A then its eigen values are also get inverses.
6. If all the elements of the matrix are real then the eigen values corresponding to that matrix are
either real or exists in complex conjugate pair.
Eigen Vectors
Any non zero vector 𝑚𝑖 that satisfies the matrix equation 𝜆𝑖 𝐼 − 𝐴 𝑚𝑖 = 0 is called the eigen
vector of A associated with the eigen value 𝜆𝑖 ,. Where𝜆𝑖 , i = 1, 2, 3, ……..n denotes the ith
eigen values of A.
This eigen vector may be obtained by taking cofactors of matrix 𝜆𝑖 𝐼 − 𝐴 along any row &
transposing that row of cofactors.
19
Diagonalization
Y t = CX t + DU t
System matrix A is non diagonal, so let us define a new state vector V(t) such that
X(t)=MV(t).
V t = 𝐴V t + BU t
Y t = CV t + DU t
The above transformed state model is in canonical state model. The transformation described
above is called similarity transformation.
If the system matrix A is in companion form & if all its n eigen values are distinct, then
modal matrix will be special matrix called the Vander Monde matrix.
1 1 1…… 1
𝜆1 𝜆2 𝜆3 … … 𝜆𝑛
𝑉𝑎𝑛𝑑𝑒𝑟 𝑀𝑜𝑛𝑑𝑒 𝑚𝑎𝑡𝑟𝑖𝑥 𝑉 = ⋮ ⋮ ⋮ ⋮
𝜆1𝑛−2 𝜆𝑛−2
2 𝜆𝑛−2
3 …… 𝑛−2
𝜆𝑛
𝑛−1 𝑛−1
𝜆1𝑛−1 𝜆2 𝜆3 … … . 𝜆𝑛−1
𝑛 𝑛×𝑛
We are here interested in deriving the expressions for the state transition matrix and zero state
response. Again taking the state equations that we have derived above and taking their
Laplace transformation we have,
20
Now on rewriting the above equation we have
Let [sI-A]-1 = θ(s) and taking the inverse Laplace of the above equation we have
Now let us discuss some of the properties of the state transition matrix.
1. If we substitute t = 0 in the above equation then we will get 1.Mathematically we can write
θ(0) =1.
2. If we substitute t = -t in the θ(t) then we will get inverse of θ(t). Mathematically we can write
θ(-t) = [θ(t)]-1.
3. We also another important property [θ(t)]n = θ(nt).
The Cayley–hamilton theorem states that every square matrix A satisfies its own
characteristic equation.
This theorem provides a simple procedure for evaluating the functions of a matrix.
To determine the matrix polynomial
𝑓 𝐴 = 𝑘0 𝐼 + 𝑘1 𝐴 + 𝑘2 𝐴2 + ⋯ + 𝑘𝑛 𝐴𝑛 + 𝑘𝑛+1 𝐴𝑛+1 + ⋯
Consider the scalar polynomial
𝑓(𝜆) = 𝑘0 + 𝑘1 𝜆 + 𝑘2 𝜆2 + ⋯ + 𝑘𝑛 𝜆𝑛 + 𝑘𝑛 +1 𝜆𝑛+1 + ⋯
Here A is a square matrix of size (n×n). Its characteristic equation is given by
𝑞 𝜆 = 𝜆𝐼 − 𝐴 = 𝜆𝑛 + 𝑎1 𝜆𝑛−1 + 𝑎2 𝜆𝑛−2 + ⋯ + 𝑎𝑛−1 𝜆 + 𝑎𝑛 = 0
If 𝑓 𝐴 is divided by the characteristic polynomial 𝑞 𝜆 , then
𝑓 𝜆 𝑅 𝜆
=𝑄 𝜆 +
𝑞 𝜆 𝑞 𝜆
𝑓 𝜆 =𝑄 𝜆 𝑞 𝜆 +𝑅 𝜆 … … … … … . . (1)
Where 𝑅 𝜆 is the remainder polynomial of the form
𝑅 𝜆 = 𝑎0 + 𝑎1 𝜆 + 𝑎2 𝜆2 + ⋯ + 𝑎𝑛−1 𝜆𝑛−1 … … … … … (2)
21
If we evaluate 𝑓 𝐴 at the eigen values 𝜆1 , 𝜆2 , … … . . 𝜆𝑛 , then 𝑞 𝜆 = 0 and we have from
equation (1) 𝑓 𝜆𝑖 = 𝑅 𝜆𝑖 ; 𝑖 = 1,2, … . 𝑛 … … … … … … . . (3)
State Controllability
A system is said to be completely state controllable if it is possible to transfer the
system state from any initial state X(to) to any desired state X(t) in specified finite time by a
control vector u(t).
Kalman‟s test
Consider nth order multi input LTI system with m dimensional control vector
X t = AX t + BU t
is completely controllable if & only if the rank of the composite matrix Qc is n.
𝑸𝒄 = 𝑩 ⋮ 𝑨𝑩 ⋮ ⋯ ⋮ 𝑨𝒏−𝟏 𝑩
Observability
A system is said to be completely observable, if every state X(to) can be completely
identified by measurements of the outputs y(t) over a finite time interval(𝑡𝑜 ≤ 𝑡 ≤ 𝑡1 ).
Kalman‟s test
Consider nth order multi input LTI system with m dimensional output vector
X t = AX t + BU t
Y t = CX t + DU t
𝑸𝒐 = [𝑪𝑻 ⋮ 𝑨𝑻 𝑪𝑻 ⋮ ⋯ ⋮ 𝑨𝑻 𝒏−𝟏 𝑻
𝑪 ]
22
Principle of Duality: It gives relationship between controllability & observability.
The Pair (AB) is controllable implies that the pair (AT BT ) is observable.
The pair (AC) is observable implies that the pair (AT CT ) is controllable.
Assumptions:
The system is completely state controllable. ƒ
The state variables are measurable and are available for feedback. ƒ
Control input is unconstrained.
Objective:
The closed loop poles should lie at 𝜇1 , 𝜇2 , … … . . 𝜇𝑛 which are their „desired locations‟
MATLab Code
23
Example
Consider the system with state equation
X t = AX t + BU t
Where
0 1 0 0
A= 0 0 1 ,B = 0
−1 −5 −6 1
By using state feedback control u=-Kx, it is desired to have the closed –loop poles at
𝜇1 = −2 + 𝑗4, 𝜇2 = −2 − 𝑗4, 𝜇3 = −10
k=
199 55 8
k=
• One should note that although state feed back control is very attractive because of precise
computation of the gain matrix K, implementation of a state feedback controller is possible
only when all state variables are directly measurable with help of some kind of sensors.
• Due to the excess number of required sensors or unavailability of states for measurement, in
most of the practical situations this requirement is not met.
• Only a subset of state variables or their combinations may be available for measurements.
Sometimes only output y is available for measurement.
24
• Hence the need for an estimator or observer is obvious which estimates all state variables
while observing input and output.
Full Order Observer : If the state observer estimates all the state variables, regardless of
whether some are available for direct measurements or not, it is called a full order
observer.
Reduced Order Observer : An observer that estimates fewer than ``n'' states of the
system is called reduced order observer.
Minimum Order Observer : If the order of the observer is minimum possible then it is
called minimum order observer.
Design of an Observer
The governing equation for a dynamic system (Plant) in statespace representation may be
written as:
X t = AX t + BU t
Y t = CX t
The governing equation for the Observer based on the block diagram is shown below. The
superscript „∼‟ refers to estimation.
𝑋 = 𝐴𝑋 + 𝐵𝑈 + 𝐾𝑒 (𝑌 − 𝑌)
𝑌 = 𝐶𝑋
25
Define the error in estimation of state vector as
𝑒 = (𝑋 − 𝑋)
The error dynamics could be derived now from the observer governing equation and state
space equations for the system as:
𝑒 = (𝐴 − 𝐾𝑒 𝐶)𝑒
𝑌 − 𝑌 = 𝐶𝑒
The corresponding characteristic equation may be written as:
|𝑆𝐼 − (𝐴 − 𝐾𝑒 𝐶) | = 0
You need to design the observer gains such that the desired error dynamics is obtained.
26
MODEL QUESTIONS
Module-1
Short Questions each carrying Two marks.
1. The System matrix of a continuous time system, described in the state variable form
is
x 0 0
A = 0 y −1
0 1 −2
27
𝑑3 𝑋 𝑑2 𝑋 𝑑𝑋
+ 3 + 4 + 4𝑋 = 𝑢1 𝑡 + 3𝑢2 𝑡 + 4𝑢3 (𝑡)
𝑑𝑡 3 𝑑𝑡 2 𝑑𝑡
and outputs are
𝑑𝑋
𝑦1 = 4 + 3𝑢1
𝑑𝑡
𝑑2𝑋
𝑦2 = + 4𝑢2 + 𝑢3 [8]
𝑑𝑡 2
10. Find the time response of the system described by the equation
−1 1 0
𝑋(𝑡) = 𝑋+ 𝑢(t)
0 −2 1
−1
X 0 = , u t = 1, t > 0 [14]
0
11. (a) Obtain a state space representation of the system
C(s) 10(s+2)
= s 3 +3s 2 +5s+15 [7]
U(s)
(b) A linear system is represented by
−6 4 1 1 0
𝑋= 𝑋+ 𝑈; 𝑌= 𝑋
−2 0 1 1 1
(i) Find the complete solution for Y(t) when U(t)=1(t), 𝑋1 0 = 1, 𝑋2 0 = 0
(ii) Draw a block diagram representing the system. [5+3]
12. Discuss the state controllability of the system
𝑋1 −3 1 𝑋1 1
= + u
𝑋2 −2 1.5 X 2 4
Prove the conditions used. [3+4]
13. If a continuous-time state equation is represented in discrete form as
X[(K+1)T]=G(T)X(KT) + H(T) U(KT)
Deduce the expressions for the matrices G(T) & H(T)
Discretise the continuous-time system described by
0 1 0
𝑋= 𝑋+ 𝑈;
0 0 1
Assume the sampling period is 2 secs. [5+4]
20. (a)Define state of a system, state variables, state space and state vector. What are the
advantages of state space analysis? [5]
(b) A two input two output linear dynamic system is governed by
0 1 2 1
𝑋(𝑡)= X(t)+ R(t)
−2 −3 0 1
1 0
Y(t)= X(t)
1 1
i)Find out the transfer function matrix. [5]
ii)Assuming 𝑋 0 = 0 find the output response Y(t) if [5]
0
R(t)= −3𝑡 for t≥ 0
𝑒
21.(a) A system is described by [8]
−4 1 0
𝑋(t)= 0 −3 1 X(t)
0 0 −2
Diagonalise the above system making use of suitable transformation X=PZ
(b) Show how can you compute 𝑒 𝐴𝑡 using results of (a) [7]
22. Define controllability and observability and of control systems. [4]
23. A feed back system has a closed loop transfer function:
29
𝑌(𝑠) 10𝑠 + 40
= 3
𝑅(𝑠) 𝑠 + 𝑠 2 + 3𝑠
Construct three different state models showing block diagram in each case. [5×3]
24. Explain the method of pole placement by state-feedback. Find the matrix k=[𝑘1 𝑘2 ]
which is called the state feedback gain matrix for the closed loop poles to be located at -1.8+.
j2.4 for the original system governed by the state equation:
0 1 0
𝑋= X+ 𝑈 [6]
20.6 0 1
25.(a) From a system represented by the state equation
𝑥 𝑡 = 𝐴 𝑥(𝑡)
The response of
−2𝑡
X(t)= 𝑒 −2𝑡 when x(0)= −2
1
−2𝑒
−𝑡 1
And x(t)= 𝑒 −𝑡 when x(o)=
−𝑒 −1
Determine the system matrix A and the states transition matrix φ(t). [12]
(b) Prove non uniqueness of state space model. [4]
26.(a) Show the following system is always controllable
0 1 0 0
𝑥 𝑡 = 0 0 1 𝑥+ 0 𝑢
−𝑎3 −𝑎2 −𝑎 1 1
(b) Explain the design of state observer.
(c) Illustrate and explain pole placement by state feedback. [4+4+4]
30
DISCRETE TIME SYSTEMS CONTROL SYSTEM
Discrete time systems in control theory refer to systems where signals and control actions are
defined at distinct time intervals. This contrasts with continuous time systems, where signals are
defined for all time.
Key Concepts:
1. Discrete Signals: Represented as sequences of values, often derived from sampling
continuous signals at regular intervals.
2. Z-Transform: A crucial tool for analyzing discrete systems, it transforms a discrete-time
signal into the z-domain, facilitating the analysis of stability and frequency response.
3. Difference Equations: The discrete counterpart of differential equations, used to
describe the behavior of discrete systems. They express the relationship between input
and output signals over time.
4. Stability: In discrete systems, stability is typically assessed using criteria like the location
of poles in the z-plane. A system is stable if all poles are within the unit circle.
5. Control Strategies: Common techniques include:
o PID Control: Proportional-Integral-Derivative control can be adapted for discrete
systems.
o State Space Control: Utilizing state variables to design controllers.
6. Digital Controllers: Implemented in microcontrollers or DSPs (Digital Signal
Processors), these controllers sample inputs, compute control actions, and send outputs at
discrete intervals.
Applications:
Robotics
Digital signal processing
Communication systems
Process control
Where:
o y[n] is the output at time n.
o x[n] is the input at time n.
o ia and ib are constants that define the system dynamics.
2. Order of the System: The highest index of y (or x) determines the order of the system.
For instance, if the highest order of y is N, the system is of order N.
3. Input-Output Relationship: The difference equation defines how the input signal affects
the output over time, capturing the dynamic behavior of the system.
Control System Design
1. Controller Design: Controllers like PID controllers can be designed in the discrete
domain. The discrete version of a PID controller can be expressed using a difference
equation as follows:
where:
o u[n] is the control output.
o e[n] is the error signal at time n (desired output - actual output).
o Kp,Ki,Kd are the proportional, integral, and derivative gains, respectively.
2. Stability Analysis: Stability can be assessed using the characteristic equation derived
from the difference equation. The roots (or poles) of this equation are analyzed to
determine if they lie within the unit circle in the z-plane.
3. Simulation: Discrete-time systems can be simulated using numerical methods. Tools like
MATLAB or Python libraries can help simulate the response of the system to various
inputs and assess the performance of the controller.
4. Implementation: Digital controllers are implemented using microcontrollers or digital
signal processors (DSPs). They sample the system's output, apply the difference equation,
and compute control actions at discrete intervals.