Eee 4106
Eee 4106
Name of Experiment: Study of the transient response of 1st and 2nd order circuit
Objective: i) Observe the time response of 1st and 2nd order circuit.
ii) Calculate time constant, τ , of 1st order circuit.
iii) Calculate damping constant, ζ , of 2nd order circuit under different conditions
(under/over/critically damped) and obtain voltage expression.
Theory:
Transfer function: It is the ratio of O/P by I/P of any system represented in laplace domain. It fully
describes a control system. The order, type and frequency response can be derived from the open
loop T/F (OLTF). They are used to determine the stability of the system. From the denominator of
T/F, roots of the system can be obtained.
𝑌(𝑠)
R(s) Y(s) 𝑇(𝑠) = 𝑅(𝑠)
G(s)
Order: The order of the system is derived from the denominator of the T/F. The number of poles
(solutions of S in denominator) represents order of the system. Thus a 1st order system will have
one pole, a 2nd order will have 2 poles and so on. Reactive components are responsible for order
1st order circuit:
1
𝑉𝑜(𝑠) 1 𝑅𝐶
= =
𝑉𝑖𝑛(𝑠) 𝑅𝑠𝐶 + 1 𝑠 + 1/𝑅𝐶
jWd
1
To obtain time response, we do inverse laplace:
If Vin(t)=1; t>=0 (a step input)
1
𝑅𝐶
Vo(s)= 𝑠+1/𝑅𝐶 ∗ 1/𝑠
Voltage
Vi(t)
Vo(t)
Time
R
sL
Vin Vo
C
1/sC
2
𝑊𝑛 2
2nd order equation can be compared with: ; where, ζ=damping factor
𝑠 +2𝜁𝑊𝑛𝑠+ 𝑊𝑛 2
2
𝑊𝑛 = 𝑁𝑎𝑡𝑢𝑟𝑎𝑙 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦
comparing the transfer function with the generalized form we obtain:
1
𝑊𝑛 =
√𝐿𝐶
𝑅
𝜁= √𝐶/𝐿
2
Thus by varying pot we can obtain different ζ
ζ=0 Undamped system (oscillatory)
0<ζ<1 Underdamped System
ζ=1 Critically Damped System
ζ>1 Overdamped System
3
Setup circuit:
1st order:
100K POT
Vin
10uF Vo
Figure :Setup 1
2nd order:
3H
100K POT
Vin
10uF Vo
Figure :Setup 2
Procedure:
Setup 1: i) Setup the circuit in a bread board, provide input, ground and oscilloscope connections
from Analog discovery 2 device.
ii) Vary the POT and for a fixed value of R measure the settling time from the output window.
iii) Measure the respective R and compare it with the calculated R from Ts=5τ
Setup 2: For underdamped and overdamped:
i)Setup the circuit in a breadboard, providing required connections from Analog discovery 2
device.
ii) Vary the pot and obtain underdamped condition. Measure R of POT.
iii) Repeat step (ii) for overdamped condition.
4
For critically damped:
𝑅
i)Calculate value of R from the equation : 𝜁 = 2 √𝐶/𝐿
Under damped R= C= L=
Critical R= C= L=
damped
Assignment:
1)Obtain the time constant for your 1st order practical circuit.
2)Obtain the damping constant under all 3 conditions for the practical circuit.
3)For 1st and 2nd order circuit (all 3 conditions) give the output time response using the R,L,C
values used practically.
5
Experiment No:2
Name of the Experiment: Study of the underdamped response of a second order circuit.
Objectives:
a. To observe the characteristics of the underdamped response of a second order circuit .
b. To design a practical circuit using percentage overshoot and settling time (Ts).
Theory:
We have already come across a second order circuit and its transfer function in the previous
experiment.
1
𝑉𝑂 (𝑠) 𝐿𝐶
=
𝑉𝑖𝑛 (𝑠) 𝑠 2 + 𝑅 𝑠 + 1
𝐿 𝐿𝐶
1 𝑅 𝐶
∴ 𝜔𝑛 = √
𝐿𝐶
&𝜁= √
2 𝐿
6
From the underdamped response, we can define different parameters, such as
i) Rise time, Tr: Time for the response to rise from 10%-90% (for overdamped system)
or 0%-100% (for underdamped system) of the final value.
2.16𝜁 + 0.6
𝑇𝑟 ≅
𝜔𝑛
ii) Peak, CP: It is the value of the first peak of the response.
−𝜋𝜁
⁄
√1−𝜁2
𝐶𝑃 = 1 + 𝑒
iii) Peak time, TP: Time required for the response to reach the first peak of the overshoot.
𝜋
𝑇𝑃 =
𝜔𝑛 √1 − 𝜁 2
iv) Settling level, CSS: The value at which the response settles down.
v) Overshoot, MP: Overshoot is the amount by which a response goes beyond the steady
state value before settling down. Overshoot can be measured from the step response. It
is the ratio of the difference between peak and settling value to the settling value.
𝐶𝑃 − 𝐶𝑆𝑆
∴ 𝑀𝑃 =
𝐶𝑆𝑆
𝐶𝑃 − 𝐶𝑆𝑆
𝑎𝑛𝑑 𝑃𝑒𝑟𝑐𝑒𝑛𝑡𝑎𝑔𝑒 𝑂𝑣𝑒𝑟𝑠ℎ𝑜𝑜𝑡, %𝑀𝑃 = × 100%
𝐶𝑆𝑆
vi) Damped Time Period, Td: Difference in time between two successive positive peaks
in damped region.
vii) Settling time, TS: It is the time required for the response to settle down to the settling
level. It can be measured in two ways:
1. Response Settling Time: It is the time when the response settles down to a fixed
value.
Ts
2. Envelope Settling Time: An envelope is defined and the time at which the response
enters the envelope and never leaves again, is called the Envelope Settling time.
7
Ts
*We often work for 2% and 5% envelope settling time, which are actually tolerance level. That is,
if the steady state value is ‘1’, then for 2%, an envelope is defined where lower and upper limits
will be at 0.98 and 1.02 respectively. So on for 5%.
viii) Damping Factor: In the equations describing system behavior, overshoot is not an easy
parameter to handle. Another parameter called Damping Factor is used and this gives
an indication of the mount of overshoot in a system. Damping Factor has the symbol ζ
(Zeta). ζ has a value of 1 when the system is critically damped, less than 1 when
underdamped and greater than 1 when overdamped. The objective of a control system
design is often to achieve a fast response without any overshoot or with just a little
overshoot. Systems are usually designed for ζ in the range 0.7 to 1. The amount of
overshoot is wholly dependent on the Damping Factor. Measuring overshoot allows
the damping factor to be calculated and knowing ζ allows the overshoot to be
calculated.
They are linked by the equations:
1
𝜁= 2
√ 𝜋
1+[ ]
ln(𝑜𝑣𝑒𝑟𝑠ℎ𝑜𝑜𝑡 𝑟𝑎𝑡𝑖𝑜)
−𝜋𝜁
⁄ −𝜋𝜁
√1−𝜁2 ⁄
𝑆𝑜, 𝑂𝑣𝑒𝑟𝑠ℎ𝑜𝑜𝑡 𝑟𝑎𝑡𝑖𝑜 = 𝑒 ⇒%𝑂𝑣𝑒𝑟𝑠ℎ𝑜𝑜𝑡 𝑟𝑎𝑡𝑖𝑜 = 100 × 𝑒 √1−𝜁 2
8
x) Natural Frequency: If there was no damping at all (ζ = 0), the system would
continuously oscillate at a frequency which is called the Natural Frequency of the
system. This is given the symbol𝜔𝑛 . The relationship between Natural and Damped
frequencies is:
𝜔𝑑
𝜔𝑛 = ⇒ 𝜔𝑑 = 𝜔𝑛 √1 − 𝜁2
√1 − 𝜁 2
Circuit diagram:
Data:
R= L=
C= % Overshoot(from figure)=
Assignment:
1. Design a second order circuit using Opamp, R, L and C. You must show the circuit
diagram and the transfer function.
2. You are asked to design a R-L-C circuit that will provide a rise time of 30ms. The
inductor and capacitor are fixed at 5 H and 20uF. What will be the value of R.
3. Design a second order circuit that will provide a overshoot of 60% and settling time of
10s (2% method).
9
Experiment No: 3
Name of the Experiment: Study of the frequency response of first and second order
systems by Bode Plot method and stability analysis.
Objectives:
c. To observe the frequency response of first and second order systems using practical circuits.
d. To observe the frequency response of first and second order systems using Simulink.
e. To analyse the stability of the systems using the concept of gain margin and phase margin.
Theory:
The idea of frequency response originates when we excite a system with unit magnitude sine wave
and the sine wave input produces sine wave output (provided system is linear). Frequency response
describes how the magnitude and phase of the output sine wave varies as a function of the
frequency of the input sine wave.
In the study of control system, we mainly deal with two types of frequency response plots, namely-
i) Polar plot or Nyquist plot
ii) Logarithmic plot or Bode plot.
In this experiment, we will study only Bode plot. The introduction of logarithmic plots, often
called Bode plots, simplifies the determination of the graphical portrayal of the frequency
response. The logarithmic plots are called Bode plots in honor of Engr. Hendry Wade Bode, who
used them extensively in his studies of feedback amplifiers. The logarithmic gain in dB and the
angle Φ(ω) when plotted versus the frequency ω is known as Bode plot.
10
1
The sinusoidal steady-state transfer function is T(jω)= .
𝑗𝜔𝑅𝐶+1
Since T(jω) is a complex quantity, it has a magnitude and a phase.
1 0 𝜔𝑅𝐶
∴ |T(jω)|= 2
and ∠ 𝑇(𝑗𝜔) = tan−1 1 − tan−1 1 = tan−1 𝜔𝑅𝐶
√(𝜔𝑅𝐶) +1
The logarithmic gain is
20 log |T(jω)| = 20 log 1 – 20 log (√(𝜔𝑅𝐶)2 + 1) = 0 - 20 log (√(𝜔𝑅𝐶)2 + 1)
= - 20 log (√(𝜔𝑅𝐶)2 + 1)
1
For small frequencies—that is, ω<< 𝑅𝐶, 20 log |T(jω)|≈ 0 dB
1
For large frequencies—that is, ω>> 𝑅𝐶, 20 log |T(jω)|≈ -20 log 𝜔𝑅𝐶 dB
We call the straight-line approximations asymptotes. The low-frequency approximation is called
the low-frequency asymptote, and the high-frequency approximation is called the high-frequency
1
asymptote. The frequency ω = 𝑅𝐶 , for this system, is called the corner frequency or break
frequency of the system, since it is the break between the low- and the high-frequency asymptotes.
At this frequency, the intersection of the two asymptotes occur as
-20 log 1 = 0 dB = -20 log(𝜔𝑅𝐶)
The actual logarithmic gain at this frequency, is actually 20 log |T(jω)| = -20 log √2 dB = -3 dB.
1
The frequencies equal to or below 10 th of the corner frequency can be termed as small frequencies
and the frequencies equal to or above 10 times the corner frequency can be termed as large
frequencies. From these, the asymptotic logarithmic gain and phase angle can be determined as
follows:
ω 20 log |T(jω)| ∠ 𝑇(𝑗𝜔)
1 0 dB 0°
ω=
10𝑅𝐶
1 0dB -45°
ω = 𝑅𝐶
10 -20 dB -90°
ω = 𝑅𝐶
We can see that the bode plots for this system will be quite similar to that of a first order circuit,
except the fact that the gain plot will have a slope of -40 dB/decade and the phase will vary from
0° to -180° with the cutoff/corner frequency residing at -90°. The peak at the actual logarithmic
gain plot and the slope of the actual phase plot will vary with the variation of damping factor, ζ.
We can see this from figure 3.6. We will have a peak overshoot for underdamped system. This is
due to an inherent phenomenon of a series RLC circuit, known as resonance. For the circuit shown
in figure 3.4, we will obtain the plots shown in figure 3.5.
:
12
Fig. 3.5: VR, VL, VC, and I versus frequency for a series resonant circuit.
Fig. 3.6: Bode plot of second order system with varying damping factor
13
In figure 3.5, the peak VC and VL is obtained such as the value of R makes the system response
underdamped. The peak VC will be on capacitive region and VL will be on inductive region.
By varying the POT (R), we can vary damping factor and observe the change in the peak. The
1
resonance frequency, ωr = will remain unchanged. Thus we conclude that, for increase in order
√𝐿𝐶
of the system, the slope of the logarithmic gain will decline further by -20 dB/decade and phase
will vary extra 90° with cut-off being at the middle.
14
Simulink library:
Sl. Block Name: Symbol: Library:
1. Resistance,Inductor,Capacitor, Simscape/Foundation
Electrical Reference,Opamp Library/Electrical/Electrical
Elements
6. Scope Simulink/Sinks
15
Procedures for Simulink:
i) Enter the Simulink library by pressing the Simulink tab from “Home” window in
MATLAB or by writing “Simulink” in command window.
ii) To start building a new model, press “New Model” on Simulink Library
Browser.
iii) Build the block diagram model as shown.
iv) To observe time response run simulation and double press “scope” to observe.
v) To observe bode plot-
a. Double click on “gain & phase margin block”.
b. To set input and output lines, press ‘+” sign on the window that appears to extend
it.
c. From the model, select the output line by pressing mouse on the line.
d. Press on the gain & phase margin window to take the line under
linearization.
e. Repeat the same procedure for input line.
f. Under “Configuration”, select “Input perturbation” for input line and “Open loop
output” for output line.
g. Select plot type as “Bode” and then press “show plot”. A blank window appears.
Press the run button to generate the plot.
h. To observe stability, right click the mouse on graph and under “characteristics”,
select “All stability margins”.
Assignments:
1. Provide the stability margins for a series RC and series RLC circuit used in the previous
experiments. (Use practical values)
2. For the following systems, plot the Bode plot in Simulink and obtain the stability
margins”
21
a) T(s) = 2
𝑠 +10𝑠+21
10
b) T(s) =
𝑠 3 +3𝑠 2 +3𝑠+1
1
c) T(s) =
𝑠 3 +3𝑠 2 +3𝑠+1
17
Experiment No: 4
Name of the Experiment: Study of the frequency response of first and second order
circuits by Nyquist/Polar Plot method and stability analysis.
Objectives:
f. To observe the frequency response by polar plot of first and second order circuit using
practical circuits.
g. To observe the frequency response of first and second order circuit using Simulink.
h. To analyse the stability of the system from Nyquist plot using the concept of gain margin
and phase margin.
Theory:
The Nyquist criterion relates the stability of a closed-loop system to the open-loop frequency
response and open-loop pole location. Thus, knowledge of the open loop system's frequency
response yields information about the stability of the closed-loop system. The Nyquist Stability
criterion was discovered by the Swedish-American electrical engineer Harry Nyquist at Bell
Telephone Laboratories in 1932.
18
1
The corner frequency or break frequency of the system is ω = 𝑅𝐶 .
From these, the magnitude and phase angle for polar plot can be determined as follows:
ω |T(jω)| ∠ 𝛷(𝑗𝜔)
ω=0 1 0°
ω=∞ 0 -90°
1 0.707 -45°
ω = 𝑅𝐶
ω |T(jω)| ∠ 𝛷(𝑗𝜔)
ω=0 1 0°
ω=∞ 0 -180°
ω=3 0.65 -68.2°
ω=7 0.27 -111.9°
19
*For negative frequencies, we will have a mirror plot.
*Phase angle varies 0°~ − 180° for 2nd order system, 0°~ − 90° for 1st order system,
0°~ − 270° for 3rd order system and so on.
90°/−270°
𝝎𝒑𝒄 𝝎𝒈𝒄
PM
.
−180° -1 𝜃
20
Since at 0 dB=1 crossing point we obtain gain cross over frequency, so we draw a circle with
radius 1.
* To obtain Gain margin, G.M: The -180° axis crossing point frequency is the phase cross over
frequency point, 𝝎𝒑𝒄 . The difference between the 𝝎𝒑𝒄 point and the unity circle gives G.M. Gain
Margin is positive if the 𝝎𝒑𝒄 point < unity circle and negative if 𝝎𝒑𝒄 point > unity circle.
* To obtain Phase margin, P.M.: We draw a straight line to 𝝎𝒈𝒄 point from the center of the unit
circle and the angle from -180° axis is the phase margin, P.M. Phase margin is positive if below
-180° axis and negative if above -180° axis.
21
ix) To observe time response run simulation and double press “scope” to observe.
x) To observe bode plot-
i. Double click on “gain & phase margin block”.
j. To set input and output lines, press ‘+” sign on the window that appears to extend
it.
k. From the model, select the output line by pressing mouse on the line.
l. Press on the gain & phase margin window to take the line under
linearization.
m. Repeat the same procedure for input line.
n. Under “Configuration”, select “Input perturbation” for input line and “Open loop
output” for output line.
o. Select plot type as “Nyquist” and then press “show plot”. A blank window
appears. Press the run button to generate the plot.
p. To observe stability, right click the mouse on graph and under “characteristics”,
select “All stability margins”.
22
xii) Observe the bode plot, check the slope and phase angle at corner frequency and note
down.
xiii) Click the “View” tab on the Network window, and then select “Nyquist”. The
Nyquist plot of the system will appear in a window beside the Bode plot. Remember,
since there is no such thing as negative frequency in real life, you will see only the
positive frequency part of the Nyquist plot
Assignments:
3. For the following systems, obtain the Nyquist plot in Simulink by physical system
design and obtain the stability margins:
21
d) T(s) = 2
𝑠 +10𝑠+21
10
e) T(s) =
𝑠 3 +3𝑠 2 +3𝑠+1
1
f) T(s) =
𝑠 3 +3𝑠 2 +3𝑠+1
1
g) T(s) =
𝑠 2 +2𝑠+1
1
h) T(s) =
𝑠 2 +11𝑠+30
4. Also draw the Nyquist plot fro theoretical calculations for the above mentioned systems.
23
Experiment No: 5
Name of the Experiment: Study of steady state error analysis of different Types of
system.
Objectives:
i. To determine steady state error for different Types of systems using different input signals.
j. To analyse when the steady state error is reduced or nullified.
k. To verify the steady state error analysis using Simulink and practical circuits.
Theory:
In many control system designs, we are specifically interested in the final, or steady state value of
the output. This is known as steady state accuracy. Ideally, in the steady state, the output, y(t),
equals the command signal, r(t), and the error is zero. This ideal situation is rarely met, and so we
need to be able to determine the steady state error for any system.Steady-state error is the difference
between the input and the output for a prescribed test input as t→∞. The steady state error is defined
as:
𝑒𝑆𝑆 = lim 𝑒(𝑡) = lim [𝑟(𝑡 ) − 𝑦(𝑡 )]
𝑡→∞ 𝑡→∞
Only for unity feedback systems, the error is the comparator output signal and we can determine
the steady state error by examining the open loop transfer function G(s). Since error in the final
value can be termed as steady state error, by using “Final Value Theorem”we get,
𝐸𝑆𝑆 = lim 𝑠𝐸(𝑠) … … … … … (1)
𝑠→0
Let us consider the following closed loop system with unity feedback.
E(s)
R(s) G(s) Y(s)
Another term that will be frequently used in the analysis of steady state error is Type of a system.
Type of a system simply means how many poles the system has in the origin. A Type-0 system
has no pole in the origin, a Type-1 system has one pole in the origin, a Type-2 system has two and
1
so on. The type of a system can be increased by simply adding an integrator ( ). We will see how
𝑠
the Type of a system affects its steady state error.
24
Because the actual input signals to a system is usually unknown, standard test input signals are
employed to determine time domain performance specifications. We are interested in the steady
state error for step, ramp, parabolic, and higher order polynomial inputs, i.e
𝑡𝑛 1
𝑟(𝑡) = → R(s) = , n= 0, 1, 2……………..
𝑛! 𝑠 𝑛+1
Test inputs that will be used for steady-state error analysis and design are summarized in Table 5.1.
1
For Step Input:𝑅 (𝑠) =
𝑠
Putting this in equation (3) we get
𝑠 1
𝐸𝑆𝑆 = lim .
𝑠→0 1 + 𝐺(𝑠) 𝑠
1
⇒ 𝐸𝑆𝑆 = lim … … … … … (4)
𝑠→0 1 + 𝐺(𝑠)
In equation (4), only the term G(s) in the denominator will have effect of putting s→0. G(s) is the
open loop transfer function of the system, which can be expressed in terms of zeroes and poles.
Let us denote the poles by ‘p’ and zeroes by ‘z’, then G(s) for a system having ‘n’ no. of zeroes
and poles can be expressed as
(𝑠 + 𝑧1 )(𝑠 + 𝑧2 ) … … … … . (𝑠 + 𝑧𝑛 )
𝐺(𝑠) = … … … … … . (5)
(𝑠 + 𝑝1 )(𝑠 + 𝑝2 ) … … … … . (𝑠 + 𝑝𝑛 )
𝑧 𝑧 …….𝑧
When s→0, 𝐺(𝑠) = 𝑝1 𝑝2 ……𝑝𝑛 = 𝐾𝑃
1 2 𝑛
where, 𝐾𝑝 is called position constant. So equation (4) can be written as
1
𝐸𝑆𝑆 = , 𝑤ℎ𝑖𝑐ℎ 𝑖𝑠 𝑎𝑐𝑡𝑢𝑎𝑙𝑙𝑦 𝑎 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡.
1 + 𝐾𝑝
25
We can see from equation (5) that the system has no pole at the origin. So, from the above
discussion, it can be inferred that for a Type-0 system, the steady state error has a constant value
for Step Input. What should be done to make this value 0?
If we consider a Type-1 system, i.e. a system with one pole at the origin, then G(s) can be
expressed as
(𝑠 + 𝑧1 )(𝑠 + 𝑧2 ) … … … … . (𝑠 + 𝑧𝑛 )
𝐺(𝑠) = … … … … … . (6)
𝒔(𝑠 + 𝑝1 )(𝑠 + 𝑝2 ) … … … … . (𝑠 + 𝑝𝑛 )
1
𝐸𝑆𝑆 = =0
1+∞
So, it can be further inferred that for a Type-1 system, the steady state error becomes 0 for Step
Input. Similarly it can be shown that for a Type-2 system, the steady state error becomes 0 for Step
Input. Similarly, steady state error for other two standard input signals can be determined can be
determined for different types of system.
Following table shows the steady state errors for Type 0, 1, and 2 systems for the standard input
signals.
Steady State Errors for Polynomial Inputs
System Type → 0 1 2
Polynomial Degree ↓
Step Input 1 0 0
1 + 𝐾𝑝
Ramp Input ∞ 1 0
𝐾𝑣
Parabolic Input ∞ ∞ 1
𝐾𝑎
Because we deal with many e1ectromechanical systems, control engineers also define position,
velocity and acceleration error constants as follows.
𝐾𝑝 = 𝐺(0),𝐾𝑣 = lim 𝑠 𝐺(𝑠), 𝐾𝑎 = lim𝑠 2 𝐺(𝑠)
𝑠→0 𝑠→0
Simulink library:
Sl Block Name: Symbol: Library:
1. Resistance,Inductor,Capacitor, Simscape/Foundation
Electrical Reference,Opamp Library/Electrical/Electrical
Elements
26
3. Voltage Sensor Simscape/Foundation
Library/Electrical/Electrical Sensors
Setup Circuit:
Type 0 System:
10uF
27
Type 1 System
10uF
Procedure:
1) Setup the circuit of figure-1 in a breadboard.
2) Connect analog discovery to the circuit in order to provide input, scope, Ground and +/-
Vcc.
3) Provide step input from analog discovery with 1V & 1 Hz. Measure the difference
between input and output from scope window. This value is the Ess.
4) Provide ramp and sine wave sequentially and observe the output.
5) Follow similar procedure for the second circuit and this time measure the difference
when ramp input is given.
6) Build the same circuits in Simulink environment and compare the results.
Results:
Practical Circuit:
Step Ramp Parabolic
Type 0 Ess= Ess= Ess=
Type 1 Ess= Ess= Ess=
Simulink:
Step Ramp Parabolic
Type 0 Ess= Ess= Ess=
Type 1 Ess= Ess= Ess=
Type 2 Ess= Ess= Ess=
Assignment:
1)Design all the circuits (type 0/1/2) in Simulink environment and show output for each of the 3
input types.
28
2) For the following Open loop TF, design the model in Simulink and show outputs for each of
1
the 3 inputs (step/ramp/parabolic): i)𝐺(𝑠)𝐻(𝑠) = (𝑠+4)(𝑠+6)
1
ii) 𝐺(𝑠)𝐻(𝑠) = 𝑠(𝑠+10)
10
iii) 𝐺(𝑠)𝐻(𝑠) = 𝑠2 (𝑠+4)(𝑠+6)
29
Experiment No. : 6
Name of the Experiment: Study of the Root Locus of a System simulated on PC using
the “MATLAB” software.
Objectives:
l. To plot the root locus of a given system using SISOTOOL GUI of MATLAB.
m. To see the changes in the step response by varying the controller gain.
n. To modify root locus to meet some particular system criteria.
Theory:
Root Locus can be referred to as the location of roots of a closed loop system while varying a
system parameter, like gain. It is the path of the roots of the characteristic equation traced out in
the s-plane as a system parameter varies from zero to infinity. The root locus method was invented
by Walter Richard Evans, a noted American control theorist, in 1948 and has been developed
and utilized extensively in control engineering practice. It is a powerful method of analysis and
design for stability and transient response. The root locus can be used to describe qualitatively the
performance of a system as various parameters are changed. For example, the effect of varying
gain upon percent overshoot, settling time, and peak time can be vividly displayed. The qualitative
description can then be verified with quantitative analysis. Besides transient response, the root
locus also gives a graphical representation of a system's stability. We can clearly see ranges of
stability, ranges of instability, and the conditions that cause a system to break into oscillation.
𝑽𝒊𝒏 K G(s) 𝑽𝑶
H(s)
𝑁1
𝑉𝑂 𝐾 𝐷1
𝐶𝐿𝑇𝐹 = = … … … … … … … . (3)
𝑉𝑖𝑛 𝑁1 𝑁2
1 + 𝐾 𝐷1 𝐷2
Where, N1, N2, D1, D2 are the Numerators and Denominators of G(s) and H(s) respectively.
30
𝑉𝑂 𝐾 𝑁1 𝐷2
𝐶𝐿𝑇𝐹 = = … … … … … … … . (4)
𝑉𝑖𝑛 𝐷1 𝐷2 + 𝐾 𝑁1 𝑁2
The characteristic equation of the system is 1+ G(s) H(s) = 0. It is called so because the solution
of this equation provides an idea about the characteristics of the system. From equation (1) and (4)
we can write the characteristic equation as
𝐷1 𝐷2 + 𝐾 𝑁1 𝑁2 = 0 … … … … … (5)
Root locus technique is a graphical method for sketching the locus of the roots of the characteristic
equation in the s-plane as the parameter K is varied. Actually the roots of the characteristic
equation are the poles of the CLTF.
𝐷1 𝐷2
⇒ + 𝑁1 𝑁2 = 0
∞
⇒ 𝑁1 𝑁2 = 0 … … … … … (7)
The solution of equation (7) gives us the open-loop zeroes of the system [refer to equation (2)].
So, we can say that when the controller gain, K =∞, the open loop zeroes and the closed loop poles
of a system are at the same position.
From the aforesaid discussion, we see that as the controller gain, K is varied from 0 to ∞, the closed
loop poles of the system moves from the position of open loop poles to that of open loop zeroes.
This path of movement of the closed loop poles in the s-plane is actually the root locus of the
system. So, it can be inferred that, the root locus of a system begins at Open Loop Poles (or
Closed Loop Poles when K=0) and ends at Open Loop Zeroes (or Closed Loop Poles when
K=∞)of that system.
If the no. of open loop poles and open loop zeroes of a system are equal, each root locus will
find a definite ending point. If they are not equal, then one or more locus/loci will end at infinity
(finding open loop zero(es) at infinity). If there is no open loop zero, all the paths originating
from open loop poles will leave for infinity.
1
Let us consider a unity feedback system, where G(s) = , H(s) = 1. The open loop poles of
𝑠 (𝑠+4)
the system are at 0 and -4. But there is no open loop zero in the system. So how will the root locus
look like? From our above discussion, we can visualize that as the gain, K is varied, the two open
loop poles will look for open loop zeroes and move towards each other, meet at a point on the real
axis, and then leave for infinity in the search of open loop zeroes. We will verify this through
SISOTOOL GUI of MATLAB.
Basic Rules for Sketching the Root Locus
31
• Number of branches: The number of branches of the root locus equals the number of
closed-loop poles.
• Symmetry: The root locus is symmetrical about the real axis.
• Real-axis segments: On the real axis, for K > 0 the root locus exists to the left of an odd
number of real-axis, finite open-loop poles and/or finite open-loop zeros.
• Starting and ending points: The root locus begins at the finite and infinite poles of
G(s)H(s) and ends at the finite and infinite zeros of G(s)H(s).
• Behavior at infinity: The root locus approaches straight lines as asymptotes as the locus
approaches infinity. Further, the equations of the asymptotes are given by the real-axis
intercept and angle in radians as follows:
∑ 𝑓𝑖𝑛𝑖𝑡𝑒 𝑝𝑜𝑙𝑒𝑠 − ∑ 𝑓𝑖𝑛𝑖𝑡𝑒 𝑧𝑒𝑟𝑜𝑒𝑠
𝜎𝑎 =
#𝑓𝑖𝑛𝑖𝑡𝑒 𝑝𝑜𝑙𝑒𝑠 − #𝑓𝑖𝑛𝑖𝑡𝑒 𝑧𝑒𝑟𝑜𝑒𝑠
(2𝑘 + 1)𝜋
𝜃𝑎 = , 𝑤ℎ𝑒𝑟𝑒 𝑘 = 0, ±1, ±2, ±3, … …
#𝑓𝑖𝑛𝑖𝑡𝑒 𝑝𝑜𝑙𝑒𝑠 − #𝑓𝑖𝑛𝑖𝑡𝑒 𝑧𝑒𝑟𝑜𝑒𝑠
The SISO Design Tool is a graphical user interface (GUI) that facilitates the design of
compensators for single-input, single-output feedback loops. The SISO Design Tool allows you to
iterate rapidly on your designs and perform the following tasks:
*Manipulate closed-loop dynamics using root *Inspect closed-loop responses (using the
locus techniques. LTI Viewer).
*Shape open-loop Bode responses. *Adjust phase and gain margins.
*Add compensator poles and zeros. *Convert models between discrete and
*Add and tune lead/lag networks and notch continuous time.
filters.
32
Procedures:
1. Write sisotool in the command window of MATLAB, press enter, SISOTOOL Design
GUI opens. The following two windows will appear on your screen. The window below
in the figure is “SISO Design for SISO Design Task”, or SISO Design tool window.
Real and complex poles and zeroes in the system can be added/deleted using this tool.
2. On SISO Design tool window, click on Edit>SISO Tool Preferences. Select the
Options tab. Select “Zero/pole/gain” in the Compensator Format and Apply it.
3. On SISO Design tool window, click on Design >Edit Compensator. Right click inside the
Dynamics box; the options of adding real and complex poles/zeroes etc. will appear. Add two
33
real poles of OLTF, 𝐺(𝑠)𝐻(𝑠) = 1⁄𝑠(𝑠 + 4). Select a pole added on the Dynamics box, and
then write the pole-position on Location box on the right-side under Edit Selected Dynamics.
4. To see the corresponding step response of the system in a separate window, click on
Analysis, and then select “Response to Step Command”. Evidently it is an over-
damped response for the system chosen. Right click on the response, select “Systems”,
two tick-marks can be seen on “Closed loop r to y (blue)” & on “Closed loop r to u
(green)”. Un-tick “Closed loop r to u (green)”, because we want to see the input to
output closed loop response, and in the architecture, the input node is named as r and
the output node is named as y.
5. Vary the controller gain, ‘K’ or in SISOTOOL, ‘C’ and observe the effect on the step
response. Notice the two pink colored squares on the root locus. Left-click on any
them, hold and drag to vary the gain. Overshoot starts to appear on the step response
when the boxes are on the imaginary axis. When on imaginary axis, click & hold on
34
any of the pink squares, useful informations like current location of the poles, natural
frequency and damping can be seen. Now keep the cursor on anywhere of the root locus
plot, the value of gain at that point can be seen.
6. System parameters like peak overshoot, settling time (2% margin), rise time can be seen
from the step response. Right-click on the step response, go to characteristics,
options like Peak response, settling time, rise time will appear. Each time you can
select one. Some dashed lines and dots will appear, click on the dots to see the system
parameters.
7. To transfer the plots to another application such as MS Word, choose Print to Figure
from the File menu and the Save it by .jpg/.emf/.png etc. format.
8. Observe the root locus and corresponding step response, effect of varying controller
gain and the system parameters for other systems instructed by the teacher.
35
The roots of the denominator (𝑠 2 + 2𝜁𝜔𝑛 𝑠 + 𝜔𝑛 2 ) of a general second order transfer function
are, 𝑠1,2 = − 𝜁𝜔𝑛 ± 𝑗𝜔𝑛 √1 − 𝜁 2 = −𝜎 ± 𝑗𝜔𝑑 . The performance of the system will depend
on the values of 𝜁 & 𝜔𝑛 . The poles of an underdamped system can be shown in s-plane as
follows:
𝑗𝜔
s-plane
× +𝑗𝜔𝑑 = +𝑗𝜔𝑛 √1 − 𝜁 2
r b
𝜃 𝜎 = 𝜁𝜔𝑛
−𝜎 = −𝜁𝜔𝑛 a
× −𝑗𝜔𝑑 = −𝑗𝜔𝑛 √1 − 𝜁 2
From the pole plot, a=−𝜁𝜔𝑛 , b=𝜔𝑛 √1 − 𝜁 2 , thus ‘r’ can be by Pythagoras’ Theorem.
So, 𝑟 2 = 𝑎2 + 𝑏 2 = (−𝜁𝜔𝑛 )2 + 𝜔𝑛 2 (1 − 𝜁 2 )
⇒ 𝑟 2 = 𝜔𝑛 2 ∴ 𝒓 = 𝝎𝒏
|𝑎| 𝜁𝜔𝑛
𝑎𝑔𝑎𝑖𝑛, 𝑐𝑜𝑠𝜃 = = ∴ 𝜻 = 𝒄𝒐𝒔𝜽
|𝑟| 𝜔𝑛
Therefore, it can be inferred that if a semicircle is drawn in the s-plane taking the distance of
any of the complex poles from the origin as radius, all the points on the semicircle the natural
frequency, 𝜔𝑛 is equal. Inside the circle 𝜔𝑛 is smaller and outside the circle 𝜔𝑛 is greater. On
the other hand, straight lines drawn from the origin of the s-plane at an angle θ can represent
damping ratio, 𝜁. So when poles are moved 𝜁 & 𝜔𝑛 also changes accordingly.
*if θ=0, 𝜁=1, so the system is then critically damped.
*if we increase θ, then 𝜁 drecreases and the system becomes more underdamped.
*if r is reduced (i.e. brought closer to the origin) then natural frequency,𝜔𝑛 drops.
36
It is clearly seen that the root locus of the system does not pass through the desired points. So,
to meet the design requirement, the poles have to be moved so that the root locus passes through
the desired points. Follow the steps mentioned below.
i) Go to the Root locus plot.Now right click-on root locus plot , go to design
requirements>New. Here various design requirements can be set. Set the
values of damping ratio and natural frequency as calculated. Each time we can
set one design parameter. Each requirement defines an exclusion region, indicated
by a yellow shaded area. To satisfy a requirement, a response plot must remain
outside of the associated exclusion region. Now a semicircle and two straight lines
at an angle can be seen.
ii) Hold the pole at -4 and drag it towards right until the imaginary axis part of
the root locus passes through the intersecting points of the straight lines and
the semicircle. Then drag the pink square boxes until they reach the
intersecting points. At this stage the requirements are met and can be seen from
the step response, with slight deviations due to the rounded-off calculations. Click
once on any of the pink squares and keep the cursor in the white region of the root
locus plot to see the gain at the desired points at the bottom of the window. The
figures are shown here.
37
Assignment:
1. Show the root locus and the other related plots (including Step response) generated in
SISOTOOL GUI in MATLAB for the following OLTFs:
𝐾 (𝑠+2)
i.) G(s)H(s)= (𝑠2 +4𝑠+13)
𝐾 (𝑠+2)
ii.) G(s)H(s)= (𝑠2 +4𝑠+13)
𝐾 (𝑠2 +4𝑠+8)
iii.) G(s)H(s)= 𝑠2 (𝑠+7)
𝐾 (𝑠+2)
iv.) G(s)H(s)= 𝑠 (𝑠+4)(𝑠2 +4𝑠+32)
𝐾 (𝑠2 +0.105625)
v.) G(s)H(s)= 𝑠(𝑠2 +1)
2
s +6s+8
vi.) G(s) H(s) =
s2 −7s+12
𝐾 𝑠(𝑠+3.75)
2. For the OLTF, G(s)H(s)= , show the root locus and other other related
(𝑠2 +3.75𝑠+13)
plots(including Step response) generated in SISOTOOL GUI in MATLAB. Modify the
root locus to meet a design requirement of 2s settling time (2%) and show the plots
(including Step response).
38
Experiment No:7
Name of the Experiment: Modelling of circuit using root locus and study of lead &
lag Compensator
Objectives:
a) Design of closed loop circuits to meet specific design criteria using root locus
method.
b) Improve the design with the help of lag/lead compensator.
Theory:
A closed loop system is given as follows:
𝑺+𝟏
If the system has an OLTF of 𝐆(𝐬)𝐇(𝐬) = 𝒔(𝒔+𝟐) , it can be deduced that the system has a gain,k=1,
zero at -1 and two poles situated at S1=0 & S2= -2. The system may be expressed as:
R(t)
Y(t)
𝟏 𝟏
S+1
𝑺 𝑺+𝟐
𝟏
The adder block can be designed with the help of a differential amplifier, the 𝑺 block with an integrator,
𝟏
the 𝑺+𝟐 with the help of an integrator having shifted pole and the s+1 block with a shifted zero.
39
C1
+Vcc
Vin
R1
Vo
-Vcc
𝟏
𝑽𝒐 (𝒔) −
𝑹 𝟏 𝑪𝟏
For the integrator circuit above the transfer function is = , Thus if we adjust the value R1 &
𝑽𝒊𝒏 (𝒔) 𝑺
𝟏
C1 such that 𝑹𝟏𝑪𝟏
= 𝟏 (e.g. R1=100K, C1=10µF) then the TF becomes -1/S. The negative sign can be
eliminated with the help of an inverting amplifier.
R2
C1
+Vcc
R2
Vin +Vcc
R1
R1
Vo
C1
-Vcc Vin Vo
-Vcc
𝟏
For design of 𝑺+𝟐 block, the above circuit (Fig. Shifted pole) may be implemented. The TF of the circuit
𝟏
𝑽𝒐 (𝒔) −
𝑹 𝟏 𝑪𝟏
is 𝑽𝒊𝒏 (𝒔)
= 𝟏 .Thus by adjusting R1C1 the numerator can be made to be 1 and by adjusting C1 S+2
𝑺+
𝑹 𝟐 𝑪𝟏
𝟏
is attained such that 𝑹 = 𝟐.
𝟐 𝑪𝟏
For design of shifted Zeros, the circuit (Fig. Shifted zero) can be implemented. The TF of the circuit is
𝒗𝒐(𝒔) 𝟏 𝟏
= −𝑹𝟐 𝑪𝟏 (𝒔 + ) . Here R2C1 is adjusted to control the gain and to maintain the shifted
𝒗𝒊𝒏 (𝒔) 𝑹𝟏 𝑪𝟏 𝑹𝟏 𝑪𝟏
zero position.
40
Thus the overall system can be shown as :
R R4
+Vcc
C1
+Vcc
C2
+Vcc R6
R +Vcc
R5
Vin R1
R R3
-Vcc
C3
R
-Vcc Vo
-Vcc
-Vcc
Design from root locus: As seen from the previous experiment some design criteria may need to be met
𝑽𝒐 𝑲
(e.g.40% O.S. & Ts=5s). Thus a second order system with O.L.T.F., 𝑽𝒊
= 𝑺(𝑺+𝒂) by obtaining ‘K’ and
‘a’ from sisotool and then design the circuit using op-amp in practical field or in Simulink environment.
Updating the design using lead/lag compensator:
Sometimes it may be necessary to update the system without changing the system parameters. This can
be done with the help of compensators. For instance, the design with 40% O.S and 5s Ts have a gain
factor of around k=8 and a=1.6. If this system is to be updated to 20% O.S. and 10s Ts without changing
system parameters, then a zero located at -1.6 can be used to compensate the original pole and a new
pole can be added and adjusted to meet the new design criteria.
Experimental Setup:
Setup 1: Design with root locus (40% O.S. Ts=5s)
Figure: Setup 01
41
Setup 2: Design with compensator (20% O.S. Ts=10s)
Figure : Setup 02
Data table:
Setup 1: For 40% O.S. & Ts=5s ,Damping factor, ζ= Natural Freq. Wn=
From sisotool Gain,K= shifted pole (s+a), a=
For Simulink design calculated R1= C1= R2= C2=
Rf=
Setup 2: For 20% O.S. & Ts=10s ,Damping factor, ζ= Natural Freq. Wn=
From sistool Gain,Knew= Knew=Kold*new gain factor shifted pole (s+b), b=
For Simulink design calculated Rf2= C4= Rf3= C3=
Rf1= R3=
Assignment:
1) Design a second order system using root locus such that %O.S.=30% and Rise time,Tr=2s in
Simulink environment.
2) Update the previous design without changing the original system so that the new % O.S= 20% and
Tr=4s.
42
Experiment No: 08
Name of the Experiment: Control of a conveyor system using Programmable
Logic Controller (PLC)
Introduction:
In industry, many manufacturing process demand a sequence of operation which are to be
performed repetitively. Early automation systems were mechanical in design, timing and
sequencing being affected by gears and cams. Slowly these design concepts were
replaced by electrical drives which were controlled by relays. Even these days the relay
control has not yet been obsolete rather is favorite to the engineers in many industries
who understand a process and its cont better using Relay Ladder diagram.. However, the
relays suffer from a number of problems viz: large size, slower operation, contact wear,
inability to accept more than one input simultaneously, and the necessity of replacing the
whole control panel in case another set of operation different from those for which the
relay are hard wired are to be performed.
The Programmable Logic Controller
The necessity of controlling ever increasing systems, engineers turned to computers. The
computer however was not suited to the industrial environment and the use of the
computer on the factory floor, was not possible, unless costly interfacing filtering was
used.
A programmable logic controller is a. solid-state device, designed to operate in a noisy
environment and perform all the logic function previously achieved using
electromechanical relays, drum switches, mechanical timers and counters.
Basic PLC Operation:
Figure below shows how the PLC controls a machine or plant.
43
The PLC System:
The PLC, like a computer employs a microprocessor chip to do processing and memory
chips to store the program.
Table 1 to 3 show the connection that should be made between the PC45 trainer,
MicroLogix 1500 PLC and Sequence Switch Module in order to complete the
programming exercise.
44
Table 1:
PLC Input Addresses PC45 Connection Description
I0 SWG Green Push Button
I1 SWR Red Push Button
I2 S1 Sensor 1
I3 S2 Sensor 2
I4 R1 Micro Switch 1
I5 R2 Micro Switch 2
I6 R3 Micro Switch 3
Table 2:
PLC Input Addresses PC45 Connection Description
O4 E Conveyor (Forward)
O5 R Conveyor (Backward)
O6 LG Green Lamp
O7 LR Red Lamp
O8 C1 Cylinder 1
O9 C2 Cylinder 2
O10 C3 Cylinder 3
Table 3:
PLC Input Addresses Switch Sequence Module Description
Connection
I1 S1 Switch 1
I8 S2 Switch 2
I9 S3 Switch 3
Other Connections:
DC COMMO and DCCOM1 are shorted and connected to 0 volt of upper block.
VAC VVDC4 and VAC DC5 are shorted and connection to 0 volt of lower block.
Vsw of sequence switch module to be connected to 24 volt of lower block.
45
Note:
When the cylinders of the PC45 Trainer are used, you will need to have the hand
compressor pump connected.
As the cylinders on the PC45n Trainer are operated, air pressure drops in the hand
compressor, so additional air will need to be pumped in as the system is used.
1. Short component should move the full length of the conveyor, being rejected by
falling of the far end.
2. If the red push button is pressed, the conveyor should stop and the red lamp
should lit.
3. Pressing green push button again should start the conveyor.
[Note: Before running the program make sure that the sensors are properly adjusted. The
transmitter and receiver of the sensors should be aligned properly for accurate operation.
The voltage between S1 br S2 arid 0 V should be around 23 volts if they are adjusted
properly. Check the voltage of S1 and S2 in upper block and adjust the sensors if
necessary.]
Procedures:
PART 1 To run the conveyor in forward and backward direction.
1. Open the RSLogix programming software by the following instruction.
Start All Programs Rockwell Software RSLogix500English
RSLogix500English.
2. Open a new project. You will get a window with a list of processor name. Select a
processor of Bul.1764 LSP Series C by scrolling down. A window will appear to
develop the ladder logic diagram.
3. Develop the ladder logic diagram as instructed and save it properly.
4. Now you have to download the file. To download the file click on the drop-down
arrow of the top-left dialogue box appearing offline and select download option.
Before downloading the file make sure that the MicroLogixl500 PLC and the
PC45 trainer is switched on.
5. When the program has been downloaded, you will be asked if you want to go
online. Click yes to go online.
6. The top left dialogue box will change color and read REMOTE PROG. Click on
the down arrow to the right of this and select Run from the drop down menu.
Click on yes to change to run mode.
7. Place the green push button to run the conveyor in forward direction. Press the
Red push button to stop the conveyor.
46
8. Place the object at the right most position of the conveyor. When sensor 2 gets the object
the conveyor should run in backward direction and it will continue to run in the backward
direction unless you reprogram it.
9. Modify Rung 03 of the ladder logic diagram as suggested and observe the movement
of conveyor after sensing the object at sensor 2. The conveyor should run back and forth
with the movement of the object in between sensor 1 and 2.
10. To bring the program out of Run mode, click on the down arrow button to the right of
the top left dialogue box and select program, then click on yes to return to program mode.
11. Click on the file menu and select close to close the project. Now you are safe to exit the
programming software.
12. Remove the power from MicroLogix 1500 PLC and PC45 trainer.
PART 2: To distinguish tall object from short object placed on a running conveyor. In this
part the program should perform the following operation.
1. The Green push button should be used to start the conveyor in the forward, right to left
direction.
2. While the conveyor is operating, the green lamp should be lit.
3. Use sensor 1 on the conveyor to determine if a component is tall or short. (Should be set
to detect a tall component)
4. Sensor 2 on the conveyor is used to start timing for either a tall component or a short
component. (Should be set to detect all components)
5. Cylinder 2 (the center cylinder) is operated when a tall reaches it. (Remember that micro
switch 2 is activated when cylinder 2 is operated)
Report:
Explain the Logic of the ladder diagrams programmed in both parts.
47