0% found this document useful (0 votes)
25 views

Control System CPE325 Lab Manual BCE

The document is a laboratory manual for the Control System course at COMSATS University Islamabad, detailing experiments and objectives for BS Computer Engineering students. It includes safety regulations, MATLAB and Simulink usage for modeling electrical and mechanical systems, and guidelines for lab reports. The manual emphasizes original work and adherence to anti-plagiarism policies.
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)
25 views

Control System CPE325 Lab Manual BCE

The document is a laboratory manual for the Control System course at COMSATS University Islamabad, detailing experiments and objectives for BS Computer Engineering students. It includes safety regulations, MATLAB and Simulink usage for modeling electrical and mechanical systems, and guidelines for lab reports. The manual emphasizes original work and adherence to anti-plagiarism policies.
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
You are on page 1/ 96

COMSATS University Islamabad, Abbottabad Campus

Department of Electrical & Computer Engineering

Laboratory Manual
Control System

BS Computer Engineering
Student Name: Registration No.:___________________

S. # Experiment Title Date


Typical Labs
1 Introduction to MATLAB with control system aspect
Mathematical Modeling of Electrical and Mechanical Systems Using
2
MATLAB/Simulink
3 Frequency Domain Modeling of Electrical and Mechanical Systems
4 Frequency Domain Modeling of Electromechanical System
5 State Space Modeling of Systems Using MATLAB/Simulink
6 Transient Analysis of First Order Systems
7 Transient analysis of the second order systems
8 System Reduction and Non-Linearity Analysis
9 Stability Analysis for The Systems Under Different Performance Conditions
To Observe the System Steady State Error and Its Response Against the
10
Disturbance As A Signal
11 Root Locus Analysis for Various Systems
Open Ended Labs
12 Design Controller Using Root Locus Technique
Design the PI Controller and Lag Compensator for Different Systems and DC
13
Motor
14 Design of The PD Controller & Lead Compensator for Different Systems
Design of the PID controller and Lead-Lag compensator for the systems
15
including DC motor
16 Design PID Controller Using SISO tool
Typical Labs
17 Bode Plot Analysis for Various Systems
Open Ended Labs
18 PID Controller Design via Bode Plot
19 Complex Engineering Problem

ii
Preface
We feel pleasure in presenting the laboratory manual of Control System course for under-
graduate level. The objective of this manual is to support the theory syllabus of the Control
System course through experiments. This Lab Manual is for CPE-325 Control System course
offered in program BS Computer Engineering. The labs constitute 25% of the total marks for
this course. You are not allowed to wander in the lab or consult other groups when performing
experiments. Similarly, the lab reports must contain original efforts. CUI has a zero tolerance
anti-plagiarism policy.
In this manual, experiments are included related to study the response of the system in terms of
step response, pole zero location, stability, transient and steady state error in
MATLAB/SIMULINK using transfer function or state space model. Experiments for the
controller design are also included through which they can achieve design requirements.
A full effort has been made in the designing of this manual to cover the major topic of the
course. The faculty members Dr. Bilal Khan, Dr. Uzair Khan, Engr. Narayan Longani, Engr.
Umar Farid & Engr. Naveed Shahzad, the lab staff including Engr. Muhammad Asad Javaid
Khan (lab engineer) was involved in the developments, validation of experiments and
documentation of this manual. The OBE based review was carried out by Dr. Bilal Khan, Dr.
Uzair Khan, and Engr. Narayan Longani.
We would appreciate for identification of errors for further improvement of quality of the lab
manual.

Dr. Bilal Khan, Dr. Uzair Khan & Engr. Narayan Longani
Department of Electrical & Computer Engineering
COMSATS University Islamabad, Abbottabad Campus

Fall 2021

iii
Safety Regulations for Control System Lab

Important safety precautions


1. Refer the operating manual and follow the safety requirements before starting the
testing.
2. Be calm and relaxed, while working in lab.
3. First check your measuring equipment.
4. Keep the work area neat and clean.
5. Be sure about the locations of fire extinguishers and first aid kit.
6. No loose wires or metals pieces should be lying on the table or neat the circuit.
7. Avoid using long wires, that may get in your way while adjusting or changing
leads.
8. Be aware of bracelets, rings, and metal watch bands (if you are wearing any of
them). Do not wear them near an energized circuit.
9. When working with energize circuit use only one hand while keeping rest of your
body away from conducting surfaces.
10. Always check your circuit connections before power it ON.
11. Always connect connection from load to power supply.
12. Never use any faulty or damage equipment and tools.
13. If an individual meets a live electrical conductor.
14. Do not touch the equipment, the cord, the person.
15. Disconnect the power source from the circuit breaker and pull out the plug using
insulated material

iv
Experiment 01
Introduction to MATLAB with Control System Aspect
Objective:
After completing this lab student will get familiar with basics of MATLAB, like basics
of coding, how to plot response of system and properly label it. How transfer function
is representing in MATLAB. How to deal with plot function and SIMULINK.
Introduction:
MATLAB, an abbreviation of Matrix Laboratory, is an interactive program for
numerical computation and data visualization; it is used extensively by control
engineers for analysis and design. There are many different toolboxes available which
extend the basic functions of MATLAB into different application areas; in these
tutorials, we will make extensive use of the Control Systems Toolbox. MATLAB is
supported on Unix, Macintosh, and Windows environments.
MATLAB, its Toolboxes and SIMULINK have become, over several years, the
industry standard software package for control system design. The purpose of this LAB
is to introduce the students to some of the more useful aspects of MATLAB, and to
illustrate how the software may be used to solve problem in control system design.

Plot
It is also easy to create plots in MATLAB. Suppose you wanted to plot a sine and cosine
wave as a function of time. First make a time vector (the semicolon after each statement
tells MATLAB we don't want to see all the values) and then compute the sine and
cosine value at each time.
t = 0:0.25:10;
y = sin(t);
W=cos(t)
plot(t,y,'.ko','LineWidth',2,'MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',3)
hold on
plot(t,W,'b*','LineWidth',1.5,'MarkerEdgeColor','k','MarkerFaceColor','k','MarkerSize',3);
plot(t,W)
grid on
xlabel('Time','fontweight','bold','fontsize',9)
ylabel('Amplitude','fontweight','bold','fontsize',9)
title('Sine and Cosine Waves','fontweight','bold','fontsize',10)
legend('Sine wave','Cosine Wave',1)
For using more functions type in command window
>> help plot
>> help (any function)
While using Simulink, results are observed in scope, Scope block of previous version
of MATLAB don’t give you freedom to edit the graph like today, so first you have to
import the data to workspace with help of block “to workspace” and plot the result
using figure. Figure give you ease to edit the graphs

Transfer Function
This part introduces the reader to time domain analysis using MATLAB. It uses
commands from the Control System Toolbox. A list of the commands can be found
using
>> help control
>> help step

1
Following are some examples how to represent transfer function in MATLAB.
Example 1: Consider a first-order transfer function G(s) = 1/(s+1). The impulse
response and step response function can be created by using following commands in
script file.

Method 1: use command “tf”


num = [1];
den = [1 1];
sys=tf(num,den)
impulse (sys)
figure
step(sys)
grid on;

Method 2: use command “zpk”


sys=zpk([],[-1],1)
impulse (sys)% Impulse response
xlabel('Time','fontweight','bold','fontsize',9)
ylabel('Amplitude','fontweight','bold','fontsize',9)
title('Impulse Response for system G(s)=1/(s+1)','fontweight','bold','fontsize',10)
legend('Impulse Response',1)
grid on
figure
step(sys) % step response
xlabel('Time','fontweight','bold','fontsize',9)
ylabel('Amplitude','fontweight','bold','fontsize',9)
title('Step Response for system G(s)=1/(s+1)','fontweight','bold','fontsize',10)
legend('Step Response',1)
grid on;
figure
t = 0:0.01:10;
u = sin(t);
y=lsim(sys,u,t)% Sinusoidal response
plot(t,y)
xlabel('Time','fontweight','bold','fontsize',9)
ylabel('Amplitude','fontweight','bold','fontsize',9)
title('Sine Response for system G(s)=1/(s+1)','fontweight','bold','fontsize',10)
legend('Step Response',1)
grid on;

Method 3: use “s=tf('s')”


s=tf('s')
sys=1/(s+1)
subplot(2,1,1) %% for description type help subplot
impulse(sys)
grid on
subplot(2,1,2)
step(sys)
grid on

2
SIMULINK
The Simulink give us easy Model analysis and construction. SIMULINK allows a block
diagram representation of a control system to be constructed and real-time simulation
performed.

Data import/Export in between Simulink and MATLAB


Workspace.
Normally we like to have our results in the MATLAB workspace to present them in a
more elaborative way. For this purpose, we intend to transfer the data from Simulink
environment to the MATLAB workspace. Following is the procedure:
1. Go to Simulink Library.
2. Check in to the “Sources” sub-library, and then select and drag the “Clock”
into Simulink editor.
3. Go to “Sink” sub-library, and then select “To-Workspace” block.
4. You can change the label in the “To-Workspace” block for your own
convenience in accordance with the data you are trying to send to MATLAB
workspace.
5. You can connect the “To-Workspace” block to any data line (for example: In
Figure 3, it can be connected to the data that is provided to scope).
6. For data synchronization also export the clock data from Simulink to
MATLAB workspace. Copy the “To-Workspace” block and connect it to the
“Clock” output.
7. Once it is done, now you need to run the Simulink design. Now you can
observe the results in the MATLAB workspace.
8. You can select different storage options in the “To-Workspace” block. Like in
structures or arrays.

Figure 1: Use Zero-Pole Function Block

Command to plot in MATLAB


plot(TimeOut,Output)
grid on
xlabel('Time','fontweight','bold','fontsize',9)
ylabel('Amplitude','fontweight','bold','fontsize',9)

3
title('Step Response for system G(s)=1/(s+1)','fontweight','bold','fontsize',10)
legend('Step Response',1)

For data synchronization also export Output as structure from Simulink to MATLAB
workspace.

Figure 2: Use Transfer Function Block

Command to plot in MATLAB


plot(Output.time,Output.signals.values)
xlabel('Time','fontweight','bold','fontsize',9)
ylabel('Amplitude','fontweight','bold','fontsize',9)
title('Step Response for system G(s)=1/(s+1)','fontweight','bold','fontsize',10)
legend('Step Response',1)
grid on

Task: Following are the two transfer functions. Plot the step and impulse response and label
properly in script as well as in Simulink.
1. (s+1)/(s2+2s+1) 2. 10/(s+1)(s+3)(s+5)

In your report label each graph properly as in examples. Also insert caption with each figure.
Most importantly write your observations after each sub-task.

Important Note:
1. If student will copy the lab report, all the identical copy holders will get zero marks.
2. In all subsequent lab reports same lab report style should be used.

4
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

5
Experiment 02
Mathematical Modeling of Electrical and Mechanical Systems
Using MATLAB/Simulink
Objective:
Every day we deal with different physical systems. Interesting fact is that motion or
working of these systems can be modeled mathematically and their behavior can be
observed using software’s like MATLAB.
This feature helps us in the design of a system. Once the system dynamic mathematical
model is developed, we can transform it into frequency or time domain representation
to further analyze the system performance. In this lab students should be able to
mathematically model and simulate the system using MATLAB / Simulink
environment.
Introduction:
A basic RLC circuit is shown is the Figure.1. The system has a voltage source and
voltage drops across each element in the network as shown.

Figure 1: RLC circuit

Its dynamic time domain model on terms of differential equations after following the
KVL is

di(t) 1
L + C ∫ i(t)dt + i(t)R = v(t) (1)
dt

This is the cause of conversation of energy. As the sum of all voltage drops across each
component is equal to the total applied voltage. There is one resistive and two reactive
components in the network. The circuit is a simple series circuit where it has the same
current in the network.

Simulink model for RLC circuit


A Simulink model is developed in the Figure 2. In this figure the dynamic mathematical
model (1) is developed in the Simulink environment. The system output is upto the
choice of designer for the given input.

6
Figure 2: RLC circuit modeled in the Simulink environment

In an identical manner a translational mechanical system is given in Figure 3 can be


model as (2).

Figure 3: Translational Mechanical System

The governing differential equation for the system is


d2 x dx
M 2 + fv + Kx = f(t) (2)
dt dt
This system could also be modeled in the identical manner using MATLAB/Simulink.
The choice of the output is up to the student for the given input.

Student Task: Use the MATLAB/Simulink environment to model and simulate the
3DOF system shown in Figure 4. Take the step response and discuss the results. Provide
the complete and solid analysis on the system response. Lab report should be presented
under the instructions provided in the earlier lab.

7
Figure 3. 3DOF RLC network for the task

The set of differential equations representing the 3 degree of freedom system is


d
v(t ) = 2i1 (t ) + (i1 − i3 ) + (i1 − i2 ) + 2 ( i1 − i2 ) (3)
dt
d d
0 = 2(i2 − i3 ) + (i2 − i1 ) + 2 ( i2 − i1 ) + 3 ( i2 − i3 ) + 4i2 (4)
dt dt
d
(
0 = (i1 − i3 ) + 2(i3 − i2 ) + 3 ( i3 − i2 ) +
dt
)1
1
 i3dt (5)
5

8
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

9
Experiment 03
Frequency Domain Modeling of Electrical and Mechanical
Systems
Objective:
In this lab students will learn how to generate the frequency domain mathematical
model of the system when ODE’s of a system are available. This lab emphasizes on
the use of frequency domain modeling technique to model the system in frequency
domain. System transfer function are used for system model and its response
generation.
Introduction:
In this lab Electrical and mechanical system will be modeled in the frequency domain.
First a simple rectilinear plant will be modeled. The system has three masses m1 , m2
and m3 . These masses are connected to each other and to the rigid body by the help of
springs ( k1 , k2 , k3 , k4 ) and dampers ( c1 , c2 , c3 , c4 ). The applied external force is F(t).
The output can be observed at any point in the network which is undergoing a change.

Figure 1: 3DOF rectilinear plant

The time domain equations of motion for the three DOF rectilinear plant are

m1x1 + c1x1 + (k1 +k2)x1-k2x2 = F(t) (1)


m2x2 + c2x2 + (k2 +k3)x2-k2x1-k3x3 = 0 (2)
m3x3 + c3x3 + (k3 +k4)x3-k3x2 = 0 (3)
Laplace transforms of equations 1- 3 are
x 1(s) N 1(s)
=
F(s) D(s)
x 2(s) N 2(s)
=
F(s) D(s)
x 3(s) N 3(s)
=
F(s) D(s)

Where 𝑁𝑖 (𝑠) and 𝐷(𝑠) are the numerator and denominator for the system.
Student should be able to apply the Laplace transform on the equation 1-3 and solve
the equations for the unknown variables 𝑥1 (𝑠), 𝑥2 (𝑠) and 𝑥3 (𝑠) for the given input

10
F(s). Student should use the MATLAB commands to find the system transfer function.
The command ‘tf(numerator, denominator)’ will help to find the system transfer
function.
Electrical System
A three degree of freedom system is shown in Figure 2. The system is identical to the
one provided in the earlier lab. Student has to convert the given set of equation (3-5) in
the frequency domain using Laplace transformation. Student is free to decide the
system output for the given input. Use the MATLAB command to find the system
transfer function.

Figure 2. 3DOF RLC network for the task

The set of differential equations representing the 3 degree of freedom system is


d
v(t ) = 2i1 (t ) + (i1 − i3 ) + (i1 − i2 ) + 2 ( i1 − i2 ) (3)
dt
d d
0 = 2(i2 − i3 ) + (i2 − i1 ) + 2 ( i2 − i1 ) + 3 ( i2 − i3 ) + 4i2 (4)
dt dt
d
(
0 = (i1 − i3 ) + 2(i3 − i2 ) + 3 ( i3 − i2 ) +
dt
)1
1
 i3dt (5)
5
Student Task: In this lab student needs to take the step response of the above two
systems. The choice of output is with the student. Student should be able to analyze the
system performance by the change of component values in both networks. Discussion
on the results should be comprehensive.

11
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

12
Experiment 04
Frequency Domain Modeling of Electromechanical System
Objective:
A DC motor is one the basic electro-mechanical system and is used in almost 95% of
the systems for control in one or another form. The DC motor can be used to control
the process speed or in some way position as parameter. The property that it takes
electrical input and produces a mechanical output makes it an electro-mechanical
system.
Introduction:
The DC motor have two set of equations. One represents the electrical network and the
other assumes the mechanical side of the DC motor.

DC Motor Speed Mathematical Model


The mathematical equation representing the electrical side of DC motor is
Ra I a ( s) + La sI a ( s) + Vb ( s) = Ea ( s) (1)

and the mechanical side mathematical equation for the same system is

( )
Tm ( s ) = J m s 2 + Dm s  m ( s ) (2)

The final transfer function between motor speed and applied input after substitution of different
available equations becomes (Section 2.8 in textbook)

Kt
 m ( s) Ra J m
= (3)
Ea ( s )   Kt Kb  
 s + 1 J  Dm + 
m Ra  

13
Sr. No System Variables Variable Value
01 Mechanical Inertia J m 01 Kgm2
02 Mechanical Damping Dm 5 N-m-s/rad
03 Electrical Resistance Ra 1 ohm
04 Electrical Inductance La 0.3 H
04 Motor Torque Constant K t 0.01 N.M/Amp
05 Back emf constant K b 0.01 V/rad/sec
Table 1: System variables

Student Task: Find the system transfer function using the MATLAB commands.
Student should perform the analysis by changing the values of system variables.
Student should be able to discuss the system response after changing the variable and
the results should be presented in a detailed way.

14
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

15
Experiment 05
State Space Modeling of Systems Using MATLAB/Simulink
Objective:
This lab will make students familiar with the state space modeling in MATLAB. How to make
state space model of a system and evaluate output in MATLAB. The system can be electrical,
mechanical, and electromechanical systems. The choice is for the instructor to choose among
the systems.

Software:
MATLAB

State Space Modeling:


In state space modeling, first we select a particular subset of all possible system variables and call
the variables in this subset state variables. For nth-order system, we write n simultaneous, first-order
differential equations in terms of the state variables. We call this system of simultaneous differential
equations as the state equations. If we know the initial condition of all the state variables at to as well
as the system input for t > to, we can solve the simultaneous differential equations for the state
variables for t > to. Algebraically combine the state variables with the system’s input and find all the
other system variables for t > to.
Consider a simple example of RLC circuit in Figure 4.1.

Figure 5.1 RLC circuit


Now the KVL equation of the system will
𝑑𝑖
𝐿 𝑑𝑡 + 𝑅𝑖 + 𝑣𝑐 (𝑡) = 𝑣(𝑡) (1)

And current across the capacitor will be


𝑑𝑣𝑐
𝑖=𝐶 (2)
𝑑𝑡

In this we have two states one is capacitor voltage and other is inductor current. So,
the state space model of the circuit will be
dvc 1
= i (3)
dt C
di 1
= (−Ri + vc (t) + v(t)) (4)
dt L
State vector will be

16
v
x = [ c] (5)
i
Now to write it in explicitly state space form of
ẋ = Ax + Bu
(6)
y = Cx + Du
0 1 0
A=[ ];B = [ ] ; C = [1 0]
−1/L −R/L 1/L

Task 1: Now students must implement this state space model of RLC circuit in
SIMULINK. Use applied voltage 10V, 5V and 3V. L = ¼ H, C = 4/3 F and R = 1Ω.

Mechanical System
A translational mechanical system is given in Figure 4.2

Figure 5.2 Single DoF mechanical system


Task 2: Students have to write the state space model and then simulate the system using
state space and plot the position response of the system using step input, where M =
1.2, 𝑓v = 3 and K = 5 and fill the graph in figure 3.

Figure 5.3 Rotational Mechanical System

Task 3: For the rotational mechanical system given in Figure 4.3, Find the state space
model of the system. Plot the step response θ2(t) in figure 5 where D1 = D2= J1= J2= K
= 1.

17
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

18
Experiment 06
Transient Analysis of First Order Systems
Objective:
The following lab would help the students to get familiar with first order systems and
also with specifications of the first order systems.

Software:
MATLAB

First Order System:


The transfer function of the first order system is given below. The input to first order system
is unit step defined by R(s). Response od first order system depends on single parameter
“a”, which defines the speed of output response.
a 1
G(s) = , R(s) =
s+a s

Figure 6.1 First Order System


The output of system will be product of input of the system and transfer function of the
system. Output will be having two poles one at origin and other at s = -a.
𝑎
𝐶(𝑠) = 𝑠(𝑠+𝑎) (1)

In time domain output of first order system will be


𝐶(𝑡) = 1 − 𝑒 −𝑎𝑡 (2)

19
Figure 6.2 Output Response of First Order System
Time constant of first order system is given by
1
τ=a (3)

Rise Time: Time required for system output to reach from 10% of final value (C(t) =
0.1 × Cf (t)) to 90% of final value (C(t) = 0.9 × Cf (t)).
2.2
Tr = (4)
a

Settling Time: It is defined as the time for the response to reach and stay within 2 %
of its final value. (0.98 × Cf (t)~1.02 × Cf (t))
4
Ts = a (If 2% of final value criterion is used) (5)
3
Ts = a (If 5% of final value criterion is used) (6)

Task 1: Find the pole location, rise time and settling time of the following system.
1
a) G(s) = s+1
5
b) G(s) = s+2

Write your observations of Task 1:

Pole Rise Time Rise Time Settling Time Settling Time


S. No
Location Calculated Observed Calculated Observed
a)
b)

Table 6.1 System observed response

Task 2: For the RC circuit given below, find equation for output voltage, pole
location, rise time and settling time when the applied voltage is 𝑉𝑖 (𝑡) = step voltage,
For the circuit R = 50Ω and C = 5mF.

20
Figure 6.3: RC Circuit

Output Voltage Equation: ________________________________________

Pole Location:
Rise Time (Calculated):
Rise Time (Observed):
Settling Time (Observed):
Settling Time (Calculated):

Table 6.2 System observed response

DC Motor
A motor is an electromechanical component that yields an angular displacement output,
θm , for an input voltage,ea , that is, a mechanical output generated by an electrical input.
The motor’s schematic is shown in Figure 6.4(a) and its transfer function for motor
speed response is shown in Figure 6.4(b).
The DC motor speed transfer function is
ωm (s) Kt /(Ra Jm )
= 1 K K (7)
Ea (s) s+ (Dm+ t b)
Jm Ra

Or for simplicity we can use


ωm (𝑠) K
= (s+α) (8)
Ea (s)

21
Figure 6.4 DC Motor (a) Schematic, (b) Block Diagram

Task 4: In this task students will study changes occur in angular velocity when
location of pole is varied, where location of pole is dependent on different parameters
of the system. Take K=1 and vary α from 1 to 5 and study the variation in response
then take K = 5, vary α from 1 to 5 and study the effect. Use step input and write your
observations.

22
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

23
Experiment 07
Transient Analysis for The Second Order Systems
Objective:
In this lab students will get familiar with second order system, types of responses
associated with changing of poles and location, transient response characteristics.

Software:
MATLAB

Second Order System:


Second order system are generally identified by two poles & their transfer function is
given as
b
G(s) = 2
s + as + b
In first order system we observe that transfer function of the system was having only
one pole while second order system has two poles. Similarly changing the position of
pole in first order system changes the speed of response where in second order system
changes in position of poles changes the speed of response along with shape of response.
There are four possible forms of response which can be obtained on changing poles
location.
1. Overdamped response: Two real but distinct poles, -p1 and -p2.
2. Underdamped response:Two complex poles, -p1 ± jω
3. Undamped response: Two poles in imaginary axis, ± jω
4. Critically damped response:Two real and repeated poles, -p1 and -p1.
Task 1: Identify the type of system with the help of pole’s location.
400
a) G(s) = 𝑠2 +12𝑠+400
625
b) G(s) = 𝑠2 + 625

Write your answers of Task 1:

S. No Pole Location Type of response


a)
b)

24
Figure 1: Response of Second System on Changing Poles Location

Transient Response & Steady State


When a system is introduced to any input then the system responds to in and starts
changing its output. And finally, it comes to a constant value which is known as steady
state value. And the time when system is changing its value from previous steady state
value to new steady state value (that time gap) is known as Transient time of the system.
Or the response of any system with respect to time before it reaches final value is called
as transient response. Transient Response shows that how fast a system is reaching to
its final value. In previous lab we studied two characteristics of first order system, rise
time and settling time, which were dependent on parameter ‘a’, pole location of first

25
order system, now characteristic associated with transient response of underdamped
second order systems are,

Figure 2: Time Response of Second Order Under-damped System


1. Rise Time: Time required for system output to reach from 0% of final value to
100% of final value.
1
Tr = (π − β)
ωd
2. Overshoot: The amount of waveform that overshoots form the final value of
output
CMax − CFinal
%OS = × 100%
CFinal
2
%OS = 𝑒 −(𝜁𝜋/√1−𝜁 )
× 100%
3. Peak Time: Time required for system output to reach the first peak
π
TP =
ωn √1 − 𝜁 2
4. Settling Time: It is defined as the time for the response to reach and stay within 2
% of its final value. (0.98 × Cf (t)~1.02 × Cf (t))
4
Ts = ζω (If 2% of final value criterion is used)
n

3
Ts = ζω (If 5% of final value criterion is used)
n

Task 2: A closed loop system is in Figure 3. Find and Draw output for each case of
step input and following cases.

26
Figure 2: Closed Loop system for Task 2

a) Find the value of K for which Rise time is 1 sec.


b) Find the value of K for which Settling time is 5 sec.
c) Find the value of K for which Overshoot is 15%

Write your answers of Task 2:

S. No Value of K
a)
b)
c)

General Second Order System:


General transfer function for second order system is given by
ωn 2
G(s) = 2
s + 2ζωn s + ωn 2
As studied earlier that there are four possible types of responses for a second order
system which depends on the location of poles, now we have studied that these responses
depend on two parameters, natural frequency and damping ratio, which defines the
location of poles and type of response.
Natural Frequency, 𝛚𝐧 :The frequency of oscillations without damping, like
output response of undamped system in last lab.

Damping Ratio, ζ: The frequency of oscillations without damping, like output response
of undamped system in last lab.

Exponential Decay Frequency


ζ=
Natural Frequency
from the characteristic equation of general second order system, poles can be
defined as
𝑠1,2 = −ζωn ± √𝜁 2 − 1

Task 3: for the system

27
16
G(s) =
s2 + 2ζωn + 16

Study the step response and pole zero map by varying ζ from 0 to 1.2 with an interval
of 0.1, After completing simulation write down the effect of changing of ζ on step
response and pole zero location.

28
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

29
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

30
Experiment 08
System Reduction and Non-Linearity Analysis

We have been working with individual subsystems represented by a block with its input
and output. More complicated systems, however, are represented by the interconnection
of many subsystems. Since the response of a single transfer function can be calculated,
we want to represent multiple subsystems as a single transfer function.
1. Cascade Form: When two or more subsystems are connected in series or cascade
form then equivalent transfer function is equal to product of transfer function of
individual systems. In figure 3(a), three subsystems are attached in series, so the
equivalent transfer function of the system can be found by taking product of transfer
function of individual subsystems as shown in figure 3(b). Total response of both
the cases, 4(a) and 4(b) is same.

C(s)
= G1 (s)G2 (s)G3 (s)
R(s)

Figure 3: (a) Three Subsystems in series, (b) Equivalent transfer function system.

2. Parallel Form: When two or more subsystems are connected in parallel form then
equivalent transfer function is equal to sum of transfer function of individual
systems. In figure 4(a), three subsystems are attached in parallel, so the equivalent
transfer function of the system can be found by taking sum of transfer function of
individual subsystems as shown in figure 4(b). Total response of both the cases,
5(a) and 5(b), is same.

C(s)
= ±G1 (s) ± G2 ± (s)G3 (s)
R(s)

Figure 4: (a) Three Subsystems in parallel, (b) Equivalent transfer function system

31
3. Feedback Form: The third topology is the feedback form, which will be seen
repeatedly in course of control system engineering. The feedback system forms the
basis for our study of control systems engineering. In Chapter 1, we defined open-
loop and closed-loop systems and pointed out the advantage of closed-loop, or
feedback control, systems over open-loop systems.
Let us derive the transfer function that represents the system from its input to its
output. The typical feedback system, described in detail in Chapter 1, is shown in
Figure 6(a); a simplified model is shown in Figure 6(b). As error will be

Figure 5: (a) Feedback Form, (b) Equivalent Form


E(s) = R(s) ∓ H(s)C(s)
And output is C(s) = G(s)E(s),
C(s)
E(s) =
G(s)
Following certain steps, the equivalent transfer function will be
C(s) G(s)
= Ge (s) =
E(s) 1 ± G(s)H(s)

Task 1: Write a code that finds the equivalent transfer of following system using
MATLAB commands, series, parallel and feedback.
a)

32
b)

Effects of Nonlinear Components on System Response


In this section, we qualitatively examine the effects of nonlinearities upon the time
response of physical systems. In the following examples, we insert nonlinearities, such
as saturation, dead zone, and backlash, into a system to show the effects of these
nonlinearities upon the linear responses.

Saturation:
To study the effect of saturation, consider a motor and load from the Antenna Control
Case. Study of Chapter 2 and look at the load angular velocity, ωo (s), where
ωo (s) = 0.1sθm (s)
0.2083
ωo (s) = E (s)
𝑠 + 1.71 a

from Eq. If we drive the motor with the help of amplifier, after certain range amplifier
saturates its output, and without saturation block and a step input of 10V, there will
we’ll be difference in output velocity of both systems.
Task 2: Students have to implement the transfer function of motors with step input of
10V and also with an amplifier, which has saturation of ±5V, and write their
observations when they use saturation block and also without saturation block.

33
Write your observations of Task 5:

__________________________________________________________________________________

__________________________________________________________________________________

__________________________________________________________________________________

__________________________________________________________________________________

Figure 6: Effect of Saturation


Dead Zone:
To study effect of dead zone, again consider the motor, load, and gears from Antenna
Control Case Study of Chapter 2. Dead zone is present when the motor cannot respond
to small voltages. The motor input is a sinusoidal waveform chosen to allow us to see
the effects of dead zone vividly. The response begins when the input voltage to the
motor exceeds a threshold. We notice a lower amplitude when dead zone is present.

Figure 7: Effect of Dead zone


Task 3: Students have to implement the transfer function of motors and gears was
used in saturation case with sinusoidal voltage having amplitude of 5V and frequency
of 1 rad/s. Now students are analyzing angular position so they will add integrator as
shown in figure 7, and write their observations with & without dead zone block, range
of dead zone -2 to +2.

34
Write your observations of Task 6:

__________________________________________________________________________________

__________________________________________________________________________________

__________________________________________________________________________________

__________________________________________________________________________________

Backlash:
To study effect of backlash, again consider the motor, load, and gears from Antenna
Control Case Study of Chapter 2. The motor input is a sinusoidal waveform chosen to
allow us to see the effects of backlash. which is chosen to allow us to see vividly the
effects of backlash in the gears driven by the motor. As the motor reverses direction,
the output shaft remains stationary while the motor begins to reverse. When the gears
finally connect, the output shaft itself begins to turn in the reverse direction. The
resulting response is quite different from the linear response without backlash.

Figure 8: Effect of Dead zone


Task 4: Students have to implement the transfer function of motors and gears was
used in saturation case with sinusoidal voltage having amplitude of 5V and frequency
of 1 rad/s. Now students are analyzing angular position so they will add integrator as
shown in figure 8, and write their observations with & without backlash block, with
dead-band width of 0.15.

Write your observations of Task 7:

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

35
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

36
Experiment 09
Stability Analysis for The Systems Under Different Performance
Conditions
Objective:
In this lab students will learn about stability of system; they will be able to determine
the stability of system either by examining pole’s location or output response of the
system.

Software
MATLAB

Stability:
Stability is the most important system specification. If a system is unstable, transient
response and steady-state errors are moot points. An unstable system cannot be
designed for a specific transient response or steady-state error requirement. What, then,
is stability? There are many definitions for stability, depending upon the kind of system
or the point of view. In this section, we limit ourselves to linear, time-invariant systems.
Stability of system on the basis of time response is given below

Stable: A linear, time-invariant system is stable if the natural response approaches zero
as time approaches infinity.
Marginally Stable: Linear, time-invariant system is marginally stable if the natural
response neither decays nor grows but remains constant or oscillates as time approaches
infinity.
Unstable: A linear, time-invariant system is unstable if the natural response grows
without bound as time approaches infinity.

Now definition of stability based on poles of system

Stable: Stable systems have closed-loop transfer functions with poles only in the left
half-plane.
Marginally Stable: Marginally stable systems have closed-loop transfer functions with
only imaginary axis poles of multiplicity 1 and poles in the left half-plane.
Unstable: Unstable systems have closed-loop transfer functions with at least one pole
in the right half-plane and/or poles of multiplicity greater than 1 on the imaginary axis.

Task 1: Find out that following systems are either Stable/Unstable, with help of step
response and pole’s location.
1
a) G(s) =
𝑠+1
1
b) G(s) = 𝑠−2

37
Write your answers of Task 1:

Systems↓ / Parameters→ Pole Location Stable /Unstable


a)
b)

Task 2: Find out that following systems are Stable/Unstable/Marginally stable, with
help of step response and pole location.
3
a) G(s) = 𝑠2 +2𝑠+3
6
b) G(s) = 𝑠2 −2𝑠−3

Write your answers of Task 2:

Systems↓ / Response → Pole Location Stable/Marginally Stable/Unstable


a)
b)

Task 3:Now implement the following systems in unit negative feedback form and find
out that closed loop systems are Stable/Unstable/Marginally stable, with help of step
response.
3
a) G(s) = 𝑠3 +3𝑠2 +2𝑠
6
b) G(s) = 𝑠3 +3𝑠2 +2𝑠
7
c) G(s) = 𝑠3 +3𝑠2 +2𝑠

Write your answers of Task 3:

Systems↓ / Response → Stable/Marginally Stable/Unstable


a)
b)
c)

Task 4: For the system given in figure 1, find equivalent transfer function,

38
Figure 1: Closed Loop System
K
G(s) = , H(s) = 1;
s(s + 2)2
Find the value of gain, K, on paper that will make the system stable, marginally stable
and unstable, then
a) Draw the step response of the system for gain of K-1, where K is value
calculated for marginally stable response
b) Draw the step response of the system for gain of K that yields marginally stable
response.
Write your answers and draw step responses for task 4 in a box at the end of this
lab.

Write your answers of Task 4:

Case Value of K
Stable
Marginally Stable
Unstable
Task 5: Implement the transfer function of DC motor from task 3 of lab 6 in unit
negative feedback form. Now study the effect of proportional, integral and derivative
components by adding them one by one in cascade form with forward path with transfer
function of DC motor. Also use the analog PID module of the control system trainer to
get the difference in the real time and simulation performance.
θL (s)
G(s) =
Ea (s)

R(s) C(s)
P/I/D G(s)
+
-

Figure 2:Closed Loop System

39
Write Proportional Block Effect.

___________________________________________________________________________________________

___________________________________________________________________________________________

___________________________________________________________________________________________

___________________________________________________________________________________________

Write Integral Block Effect.

___________________________________________________________________________________________

___________________________________________________________________________________________

___________________________________________________________________________________________

___________________________________________________________________________________________

Write Derivative Block Effect.

__________________________________________________________________________________________

___________________________________________________________________________________________

___________________________________________________________________________________________

___________________________________________________________________________________________

40
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

41
Experiment 10
To Observe the System Steady State Error and Its Response
Against the Disturbance as z Signal
Objective:
In this lab students will learn about second part of output response that is steady state
and its characteristic steady state error and the effect of disturbance.
Software:
MATLAB
Steady State Error:
Steady-state error is the difference between the input and the output for a prescribed
test input as t → ∞. The steady-state errors studied resulted strictly from the system
configuration. Based on a system configuration and a group of selected test signals,
namely steps, ramps, and parabolas, we can analyze or design for the system’s steady-
state error performance.
Task 1: Answer the following questions
1. What system types will yield zero steady-state error for step inputs?
2. What system types will yield zero steady-state error for ramp inputs?
3. What system types will yield infinite steady-state error for ramp inputs?
4. What system types will yield zero steady-state error for parabolic inputs?
5. What system types will yield infinite steady-state error for parabolic inputs?
6. For the negative feedback system of Figure 1.
K(s + 6)
G(s) = ; H(s) = 1
(s + 4)(s + 7)(s + 9)(s + 12)
Calculate the steady-state error in terms of K for the inputs: 5u(t), 5tu(t), and 5t2u(t).

Figure 1: Closed Loop System


7. Repeat Q.6. with
K(s + 6)
G(s) = ; H(s) = 1
s(s + 4)(s + 7)(s + 9)(s + 12)
8. Repeat Q.6. with
K(s + 6)
G(s) = ; H(s) = 1
s 2 (s + 4)(s + 7)(s + 9)(s + 12)

42
Task 2: Using Simulink, set up the negative feedback system of Q.6. Plot on
one graph the error signal of the system for an input of 5u(t) and K = 10, 50,
and 100. Repeat for inputs of 5tu(t) and 5t2u(t).
Compare steady state error calculated in Q.6. of Task 1 and steady state error
obtained from simulation. Explain the reasons for any discrepancies.

Write your answers of Task 2:

Steady state Error Steady State Error


Inputs Gain, K
Calculated Obtained
10
5u(t) 50
100
10
5tu(t) 50
100
10
5t2u(t) 50
100

Explain the reason if difference is higher: ___________________________________

______________________________________________________________________

Task 3: Using Simulink, set up the negative feedback system of Q.7. Plot on one graph
the error signal of the system for an input of 5u(t) and K = 5, 15, and 150. Repeat for
inputs of 5tu(t) and 5t2u(t).

43
Write your answers of Task 3:

Steady state Error Steady State Error


Inputs Gain, K
Calculated Obtained
5
5u(t) 15
150
5
5tu(t) 15
150
5
2
5t u(t) 15
150

Explain the reason if difference is higher: ___________________________________

________________________________________________________________________

Task 4: Students will study the unit positive feedback system, for the following system
and will write their observations about steady state error for input,
r(t) = u(t) and r(t) = −u(t)
5
a. G(s) = (s+12) ; H(s) = 1
1
b. G(s) = (s+4)(s+7) ; H(s) = 1

Figure 2: Unit Positive feed-back Closed Loop System

Disturbance:
Disturbances are unwanted signals that enter a system and affect the response of the
system. In open loop system their effect is more prominent and effect the performance
of the system, where closed loop system shows robustness towards disturbances and

44
their effect is minimized. The advantage of using feedback is that regardless of these
disturbances, the system can be designed to follow the input with small or zero error.
In case of closed loop system, steady state error is given by
e(∞) = eR (∞) + eD (∞)
Where,
s
eR (∞) = lim R(s)
s→0 1 + G1 (s)G2 (s)

and
sG2 (s)
eD (∞) = − lim D(s)
s→0 1 + G1 (s)G2 (s)

Figure 3: Open Loop System with Disturbance

Figure 4: Closed Loop System with Disturbance


Task 5: For the system shown in Figure 3
7
G1 (s) = 5, G2 (s) =
(s + 2)
Plot the system output steady-state error for reference input, r(t) = 3u(t) and d(t) = 0.
Then apply d(t) = u(t) and d(t) = -u(t).
Write down the differences you observe in output after applying disturbance signal
Does open loop system shows any robustness to disturbances.
Task 6: For the system shown in Figure 4
7
G1 (s) = 5, G2 (s) =
(s + 2)
a) Find and plot the steady-state error for reference input, r(t) = 3u(t) and d(t) = 0.

45
b) Find and plot the steady-state error for reference input, r(t) = 3u(t) and d(t) = -2u(t).
c) Find and plot the steady-state error for reference input, r(t) = 3u(t) and d(t) = -5u(t).

Write down the differences you observe in output after applying disturbance signal?
Does close loop system show any robustness to disturbances compare to open loop
system?

Write your answers of Task 6:

Case a) b) c)
eR (∞) Calculated
eD (∞) Calculated
e (∞) Calculated
eR (∞) Observed
eD (∞) Observed
e (∞) Observed

______________________________________________________________________

______________________________________________________________________

______________________________________________________________________

______________________________________________________________________

46
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

47
Experiment 11
Root Locus Analysis for Various Systems.
Objective:
The objective of this lab is to make you familiar with root locus. If a closed loop system
has any varying parameter, then the poles of closed loop system vary with respect to
parameter, and it also affects the stability of the system.
Software:
MATLAB
Root Locus:
Root locus is a graphical presentation of the closed-loop poles as a system control
parameter is varied. It is a powerful method of analysis and design for stability and
transient response. Feedback control systems are difficult to comprehend from a
qualitative point of view, and hence they rely heavily upon mathematics. Different
systems are given below you have to study the path of poles followed when gain of
open loop system is varied with the help of root locus.
Task 1: For the system shown in Figure 1

Figure 1: Closed Loop System


1. Plot the root locus on paper.
a. Plot Poles & Zeros of Open loop transfer function
b. Plot Asymptotes (If applicable)
c. Find jω-axis crossing (If applicable).
d. Find angle of arrival/departure (If applicable).
e. Find Break away/Break in Points (If applicable)
2. Plot root locus with help of rlocus(sys) command.
3. Compare both plots.
4. Finally plot root locus in following graphs for each system having poles and zeros
map.
K(s+2)
i. G1 (s) = (s+1)(s+3)
K(s2 +7s+12)
ii. G2 (s) = (s2 +3s+2)
K(s+5)
iii. G3 (s) = (s2+8s+25)(s+1)(s+3)

48
Task 2: Implement the DC motor task of lab 6 in unit negative feedback form as shown in Figure
2. Study the variation in closed loop poles when gain, K, of the forward path is varied
θL (s)
G(s) =
Ea (s)
Plot the root locus for closed loop system

R(s) C(s)
K G(s)
+
-

Figure 2: Closed Loop system for DC Motor

49
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

50
Experiment 12
Design Controller Using Root Locus Technique
Improving Transient Response
One way of improving the transient response is by replacing the existing system with a system
whose root locus intersects the desired point. Unfortunately, this replacement is expensive and
counterproductive. Transient response improved practically by introducing the compensator.
Steps for Controller Design:
1. Evaluate the performance of the uncompensated system to determine how much
improvement in transient response is required.
2. Design the (lead, lag, P, PD, PI or PID) compensator to meet the transient response
specifications. The design includes the zero location, pole location and the loop gain.
3. Simulate the system to be sure all requirements have been met.
4. Redesign if the simulation shows that requirements have not been met.
5. Evaluate the steady sate error performance for the lead-compensated system determines
whether improvement is required.
6. Design the lag compensator to yield the required steady-state error.
7. Simulate the system to be sure all requirements have been met.
8. Redesign if the simulation shows that requirements have not been met.

51
Note from the specification, we required the overshoot, %OS, damping ratio, zeta, can be find
from approximation damping ratio equation,

ζ= - log(%OS/100)/sqrt(pi^2+[log(%OS/100)^2]).

The command sgrid is used to overlay desired percent overshoot line on the close-up root locus.

Example 1: Cruise control using root locus

Y (s) 1
= Where m=1000, b =50, U(s) =10, Y(s) = velocity is the output.
U ( s ) ms + b

Design Specification:

Rise time < 5 sec


Overshoot < 10%
Steady state error < 2%

Solution: Proportional Control


Closed loop transfer function with proportional control is given by

Y ( s) Kp
=
U ( s) ms + (b + K p )

52
Matlab command called sgrid should be used to find an acceptable region of the root-locus plot.
To use the sgrid, both the damping ratio (zeta) and the natural frequency (Wn) need to be
determined first. The following two equations will be used to find the damping ratio and the natural
frequency:

where
Wn=Natural frequency
zeta=Damping ratio
Tr=Rise time
Mp=Maximum overshoot

One of our design criteria is to have a rise time of less than 5 seconds. From the first equation, we
see that the natural frequency must be greater than 0.36. Also using the second equation, we see
that the damping ratio must be greater than 0.6, since the maximum overshoot must be less than
10%.

Now, we are ready to generate a root-locus plot and use the sgrid to find an acceptable region on
the root-locus. Create a new m-file and enter the following commands.

hold off;
m = 1000;
b = 50;
u = 10;
numo=[1];
deno=[m b];

figure
hold;
axis([-0.6 0 -0.6 0.6]);
rlocus (numo,deno)
sgrid(0.6, 0.36)
[Kp, poles]=rlocfind(numo,deno)

figure
hold;
numc=[Kp];
denc=[m (b+Kp)];
t=0:0.1:20;

53
step (u*numc,denc,t)
axis ([0 20 0 10])

In the figure, the two dotted lines in an angle indicate the locations of constant damping ratio
(zeta=0.6); the damping ratio is greater than 0.6 in between these lines and less than 0.6 outside
the lines. The semi-ellipse indicates the locations of constant natural frequency (Wn=0.36); the
natural frequency is greater than 0.36 outside the semi-ellipse, and smaller than 0.36 inside.

If you look at the Matlab command window, you should see a prompt asking you to pick a point
on the root-locus plot. Since you want to pick a point in between dotted lines (zeta>0.6) and outside
the semi-ellipse (Wn>0.36), click on the real axis just outside the semi-ellipse (around -0.4).

You should see the gain value (Kp) and pole locations in the Matlab command window.

With the specified gain Kp (the one you just picked), the rise time and the overshoot criteria have
been met; however, the steady-state error of more than 10% remained.

Lag controller

To reduce the steady-state error, a lag controller will be added to the system. The transfer
function of the lag controller is:

The open-loop transfer function (not including Kp) now becomes:

Finally, the closed-loop transfer function becomes:

The pole and the zero of a lag controller need to be placed close together. Also, it states that the
steady-state error will be reducing by a factor of Zo/Po. For these reasons, let Zo equals -0.3 and
Po equals -0.03.

Create a new m-file, and enter the following commands.

hold off;
m = 1000;

54
b = 50;
u = 10;
Zo=0.3;
Po=0.03;
numo=[1 Zo];
deno=[m b+m*Po b*Po];

figure
hold;
axis ([-0.6 0 -0.4 0.4])
rlocus(numo,deno)
sgrid(0.6,0.36)
[Kp, poles]=rlocfind(numo,deno)

figure
t=0:0.1:20;
numc=[Kp Kp*Zo];
denc=[m b+m*Po+Kp b*Po+Kp*Zo];
axis ([0 20 0 12])
step (u*numc,denc,t)

In the Matlab command window, you should see the prompt asking you to select a point on the
root-locus plot. Once again, click on the real axis around -0.4.

As you can see, the steady-state error has been reduced to near zero. Slight overshoot is a result
of the zero added in the lag controller.

Now all the design criteria have been met and no further iterations will be needed.

K ( s + 6)
Example 2: The unity feedback system with G ( s) = is operating with
( s + 2)(s + 3)(s + 5)
dominant pole damping of 0.707. Design a PD controller so that the settling time is reduced by the
factor of 2. Compare the transient and steady state performance of the uncompensated and
compensated systems. Describe any problems with your design.
Solution:
clf
'Uncompensated System'
numg=[1 6];
deng=poly([-2 -3 -5]);
'G(s)'
G=tf(numg,deng);
Gzpk=zpk(G)
rlocus(G,0:1:100)
z=0.707;

55
pos=exp(-pi*z/sqrt(1-z^2))*100;
sgrid(z,0)
title(['Uncompensated Root Locus with ' , num2str(z), ' Damping Ratio Line'])
[K,p]=rlocfind(G); %Allows input by selecting point on graphic
'Closed-loop poles = '
p
i=input('Give pole number that is operating point ');
'Summary of estimated specifications'
operatingpoint=p(i)
gain=K
estimated_settling_time=4/abs(real(p(i)))
estimated_peak_time=pi/abs(imag(p(i)))
estimated_percent_overshoot=pos
estimated_damping_ratio=z
estimated_natural_frequency=sqrt(real(p(i))^2+imag(p(i))^2)
Kp=dcgain(K*G)
'T(s)'
T=feedback(K*G,1)
'Press any key to continue and obtain the step response'
pause
step(T)
title(['Step Response for Uncompensated System with ' , num2str(z),...
' Damping Ratio'])
'Press any key to go to PD compensation'
pause
'Compensated system'
done=1;
while done>0
a=input('Enter a Test PD Compensator, (s+a). a = ')
numc=[1 a];
'Gc(s)'
GGc=tf(conv(numg,numc),deng);
GGczpk=zpk(GGc)
wn=4/[(estimated_settling_time/2)*z];
rlocus(GGc)
sgrid(z,wn)
title(['PD Compensated Root Locus with ' , num2str(z),...
' Damping Ratio Line', 'PD Zero at ', num2str(a), ', and Required Wn'])
done=input('Are you done? (y=0,n=1) ');
end
[K,p]=rlocfind(GGc); %Allows input by selecting point on graphic
'Closed-loop poles = '
p
i=input('Give pole number that is operating point ');
'Summary of estimated specifications'
operatingpoint=p(i)

56
gain=K
estimated_settling_time=4/abs(real(p(i)))
estimated_peak_time=pi/abs(imag(p(i)))
estimated_percent_overshoot=pos
estimated_damping_ratio=z
estimated_natural_frequency=sqrt(real(p(i))^2+imag(p(i))^2)
Kp=dcgain(K*GGc)
'T(s)'
T=feedback(K*GGc,1)
'Press any key to continue and obtain the step response'
pause
step(T)
title(['Step Response for Compensated System with ' , num2str(z),...
' Damping Ratio'])
K ( s + 0.437)
Q1: The feedback system with G ( s ) = and H ( s ) = ( s + 1) .
( s + 3.483s 3 + 3.215s 2 + 0.4979s )
4

Design compensator which yield %OS less than 10%.

Q2: Design compensator using root locus technique similar as in example 1 but output y(t) is
speed instead of velocity.

Design Specification:

Rise time < 5 sec


Overshoot < 10%
Steady state error < 2%

57
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

58
Experiment 13
Design the PI Controller and Lag Compensator for Different Systems &
DC Motor
Objective:
The objective of this lab is to make you familiar with PI and Lag controller. Controllers are added
in closed loop systems to achieve desired design criterion. PI and Lag controllers are used for
improving steady state error of system.
Software:
MATLAB
Commands:
rlocus, rlocfind, sgrid.
Improving Steady State Error:
Steady state error can be improved with two methods. The first technique is ideal integral
compensation, which uses a pure integrator to place an open-loop, forward-path pole at the origin,
thus increasing the system type and reducing the error to zero. The second technique does not use
pure integration. This compensation technique places the pole near the origin, and although it does
not drive the steady-state error to zero, it does yield a measurable reduction in steady-state error.
Different systems are given below you have to design PI and Lag controllers with given
specifications.
Task 1: For the system shown in figure 1, design a PI controller with

Figure 1: Closed Loop System


Design criterion: Percent overshoot = 20%. Additional conditional for controller is that steady
state error must be zero. What is the total angular contribution of the PI compensator?
K
G(s) =
(s + 1)(s + 2)(s + 10)

a) Plot steady state error for uncompensated system.


b) Plot steady state error for compensated system.

59
Write your answers of Task 1:
Transfer function of PI controller = _________________________________

Angular Contribution of PI controller = _____________________________

Does steady state error reduce with PI controller?

_______________________________________________________________________________

_______________________________________________________________________________

_______________________________________________________________________________

Task 2: For the system shown in figure 1 design a lag controller with design criterion of zeta =
0.174. Additional conditional for lag controller is that steady state error must be improved 20
times. What is the total angular contribution of the lag compensator?
K
G(s) =
(s + 1)(s + 2)(s + 10)

a) Plot steady state error for uncompensated system.


b) Plot steady state error for compensated system.

Write your answers of Task 2:


Transfer function of Lag controller = _______________________________

Angular Contribution of Lag controller = ____________________________

Does steady state error reduce with Lag controller?

_____________________________________________________________________________

_____________________________________________________________________________

_____________________________________________________________________________

60
Experiment 14: Design of The PD Controller & Lead Compensator For
Different Systems.
Objective:
The objective of this lab is to make you familiar with PID and Lead-Lag controller. Controllers
are added in system to achieve desired design criterion. PID and Lead-Lag controllers are used for
improving transient’s specification as well as steady state error.
Software:
MATLAB
Commands:
rlocus, rlocfind, sgrid.
Improving Transients Specifications:
Transients’ specifications can be improved with two methods. First method is ideal derivative
compensation. With ideal derivative compensation, a pure differentiator is added to the forward
path of the feedback control system. This type of compensation requires an active network for its
realization. We call an ideal derivative compensator a proportional-plus-derivative (PD) controller.
The second technique does not use pure differentiation. Instead, it approximates differentiation
with a passive network by adding a zero and a more distant pole to the forward-path transfer
function. The zero approximates pure differentiation as described previously. The second
technique uses a passive network called a lead compensator.
Task 1: For the system shown in figure 1

Figure 1: Closed Loop System


Design a PD controller so that the system can operate with a settling time that is three times reduced
that of the uncompensated system with 16% overshoot. Draw step response of un-compensated
and compensated system.
K
G(s) =
s(s + 4)(s + 6)

61
Write your answers of Task 1:
Transfer function of PD controller = _________________________________

Does required results achieved with PD controller?

___________________________________________________________________________

___________________________________________________________________________

___________________________________________________________________________

Task 2: For the system shown in figure 1, Design three lead compensators for the system that will
reduce the settling time by a factor of 2 while maintaining 30% overshoot. Draw step response of
un-compensated and compensated system.
K
G(s) =
s(s + 4)(s + 6)

Write your answers of Task 1:


Transfer function of Lead controller = _______________________________

Does required results achieved with Lead controller?

_______________________________________________________________________________

_______________________________________________________________________________

_______________________________________________________________________________

62
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

63
Experiment 15
Design PID Controller Using Ziegler Nichols Method
Objective:
1) To demonstrate the use of PID controller using MATLAB.
2) Finding the values of PID gains using the Ziegler Nichols Method
Classical PID Control
This lab examines a particular control structure that has become almost universally used in
industrial control. It is based on a particular fixed structure controller family, the so-called PID
controller family. These controllers have proven to be robust and extremely beneficial in the
control of many important applications.
PID stands for: P (Proportional), I (Integral), and D (Derivative)
Tuning of PID Controllers
Because of their widespread use in practice, we present below several methods for tuning PID
controllers. Actually, these methods are quite old and date back to the 1950’s. Nonetheless, they
remain in widespread use today.
We will study.
1. Ziegler-Nichols Oscillation Method
2. Ziegler-Nichols Reaction Curve Method
3. Cohen-Coon Reaction Curve Method

Ziegler-Nichols (Z-N) Oscillation Method


This procedure is only valid for open loop stable plants and it is carried out through the following
steps
1. Set the true plant under proportional control, with a very small gain.
2. Increase the gain until the loop starts oscillating. Note that linear oscillation is
required and that it should be detected at the controller output.
3. Record the controller critical gain Kp = Kc and the oscillation period of the
controller output, Pc.

64
4. Adjust the controller parameters according to Table 6.1 (next slide); there is some
controversy regarding the PID parameterization for which the Z-N method was
developed, but the version described here is, to the best knowledge of the authors,
applicable to the parameterization of standard form PID.

Table 1
General System
If we consider a general plant of the form:
K 0 e − s
G0 ( s ) = ; 0  0
 0s +1
then one can obtain the PID settings via Ziegler-Nichols tuning for different values of  and 0.
The next plot shows the resultant closed loop step responses as a function of the ratio
 
x= .
0

Figure1: PI Z-N tuned (oscillation method) control loop for different values of the ratio
Numerical Example
Consider a plant with a model given by

65
Find the parameters of a PID controller using the Z-N oscillation method. Obtain a graph of the
response to a unit step input reference and to a unit step input disturbance.
Solution

Applying the procedure, we find: KC = 8 and ωc = 3.Hence, from Table 1, we have

The closed loop response to a unit step in the reference at t = 0 and a unit step disturbance at t =
10 are shown in the figure 2.

Figure 2: Response to step reference and step input disturbance


Different PID Structures?
A key issue when applying PID tuning rules (such as Ziegler-Nichols settings) is that of which
PID structure these settings are applied to.
To obtain an appreciation of these differences we evaluate the PID control loop for the same plant
in Example 1, but with the Z-N settings applied to the series structure, we have
Ks = 4.8 Is = 1.81 Ds = 0.45 s = 0.1

66
Figure 3: PID Z-N settings applied to series structure (thick line) and conventional
structure (thin line)
Observation
In the above example, it has not made much difference, to which form of PID the tuning rules are
applied. However, the reader is warned that this can make a difference in general.
Reaction Curve Based Methods
A linearized quantitative version of a simple plant can be obtained with an open loop experiment,
using the following procedure:
1. With the plant in open loop, take the plant manually to a normal operating point. Say that the
plant output settles at y(t) = y0 for a constant plant input u(t) = u0.
2. At an initial time, t0, apply a step change to the plant input, from u0 to u (this should be in the
range of 10 to 20% of full scale).
3. Record the plant output until it settles to the new operating point. Assume you obtain the curve
shown on the next slide. This curve is known as the process reaction curve. In Figure 4 , m.s.t.
stands for maximum slope tangent.
4. Compute the parameter model as follows

The suggested parameters are shown in Table 6.2.

67
Figure 4: Plant step response

Table 2: Ziegler-Nichols tuning using the reaction curve

68
69
70
71
LAB Tasks:

Q1: PID controller design using Ziegler Nichols tuning rules

1
G ( s) =
1 G(s) =
s + 3.6 s + 9
2
s( s + 1)(0.5s + 1)
Q2: PID controller design for unstable system
1
G(s) =
s −9

72
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

73
Experiment 16
Design PID Controller Using SISO tool
Objective – SISO Design toolbox
This lab will make familiar you with SISO tool, which is used for the controller design. This tool
uses root locus and design the controller according to requirements. At the end of this lab
experience, students should be able to successfully design P, I, PD, PI, and PID controllers to meet
closed‐loop performance specifications including transient performance and steady‐error.
SISO Tool:
This Graphical User Interface lets you design single-input/single-output (SISO) compensators by
graphically interacting with the root locus, Bode, and Nichols plots of the open-loop system. To
import the plant data into the SISO Tool, select the Import item from the File menu. By default,
the control system configuration is Root locus, is a powerful method of analysis and design for
stability and transient response. Feedback control systems are difficult to comprehend from a
qualitative point of view, and hence they rely heavily upon mathematics.
Note, in controller design there are multiple possible solutions, some better than others. It
is possible to have multiple designs that satisfy the given performance constraints, but practical
implementation issues and cost could be prohibitive for some designs. As a general rule, it is a
good idea to keep your controller as simple as possible while meeting the prescribed performance
criteria. In this lab we will be investigating several controller structures on individual plants and
comparing the design process and performance.

R(s) C(s)
GC(s) GP(s)
+
-

Figure 3: Closed Loop Structure for System Control

a. Getting Started:
1. Enter the transfer function for the plant, GP(s), in your workspace (i.e., from the MATLAB
command prompt).
1
GP (s) =
(s + 1)(s + 2)
2. Type ‘sisotool’ at the command prompt.
B. Loading the Transfer Function
1. Click on File →Import.

74
2. A window on the left will show you the transfer functions in your workspace, while the window
on the right will let you choose the control system configuration.
3. We will usually be assigning G(s) to block ‘G’ (the plant). Double‐click the space next to ‘G’
and type your transfer function name and hit Enter. You must hit enter or nothing will happen.
4. Once you hit enter, you should be able to click the OK button at the bottom of the window.
Then the window will close.
5. After you enter the transfer function, the root locus will be displayed. Double check to make
sure that the open‐loop poles and zeros of your plant are in the correct locations.
C. Generating the Step Response
1. Click on Analysis →Response to Step Command.
2. You will probably two curves on your step response plot. To fix this click on Analysis → Other
Loop Responses. Make sure only r to y is checked
3. You can now click on the pink boxes on the root locus (the current closed‐loop poles for the
given gain) and move them along the root locus. Essentially, you are exploring different controller
gain values by doing this. Note how the step response changes as you move the closed‐loop pole
locations.
4. The values of the closed‐loop poles will appear at the bottom of the root locus window as you
click and hold the mouse on the pink boxes representing them. This only gives you the value of
the closed loop pole you are clicking on. If you need the other closed‐loop pole locations, you will
have to click on them on each of the other branches.
D. Entering the Compensator (Controller)
1. Click Compensators →Edit →C. Click on Add Real Zero or Add Real Pole to enter controller zeros
or poles. You will be able to make changes to these values later. After you are done, click OK to exit this
window.
2. Look at the form of C(s) to be sure it is correct. Then look at the root locus window and see how it
changed once the compensator was added.
3. You can again see how the step response changes with the compensator by clicking on the closed‐loop
poles (the pink squares) and dragging them along the root locus.
4. You can also change the location of the poles/zeros of the compensator by clicking on them and dragging
them. Be careful not to inadvertently change the poles and zeros of the plant!

E. Adding Design Constraints


1. Click Edit → Root Locus → Design Constraints then either New to add new constraints or Edit to edit
existing constraints.
2. At this point you can choose from settling time, percent overshoot, damping ratio, and natural frequency
constraints.

75
F. Printing/Saving the Figures
To save a figure ‘sisotool’ created during your session, click File →Print to Figure. This opens a figure
window and puts the current figure there.
G. Odds and Ends
1. You may want to adjust the axes. To do this, click Edit →Root Locus →Properties, click on Limits,
and set the desired axis limits.
2. You may also want to turn the grid on. Click Edit →Root Locus →Grid.
3. It is convenient to use the zero/pole/gain format for the compensators. To do this, click on Edit→SISO
Tool Preferences →Options and click on zero/pole/gain.
1. Entering the Constraints
Enter the percent overshoot and settling time constraints in ‘sisotool’. Remember that these constraints are
based on a second order system step response and for higher order systems are predicated by the assumption
of second order dominance of the closed‐loop system poles. Therefore, these design constraints are
guidelines, and you may have to refine your design to stay further inside these constraints to meet the
performance specifications.
2. Proportional (P) Control
Determine the root locus for this system with proportional control. (When you enter the plant transfer
function in ‘sisotool’, this is the default root locus plot. At this point the controller is specified as C(s) =
1.
Look at the step response as the gain increases. You should notice a few things:
1. As K increases, the imaginary part of the closed‐loop poles increases, and therefore the percent
overshoot increases.
2. As K increases, the position error decreases.
3. Since the real part of the pole does not change once K is greater than about 0.008, the settling time
remains constant at about 0.8 seconds.
4. There is no value of K for which the system is unstable

Do as well as you can to meet both constraints (you will not be able to do very well) then save the step
response and control effort plots and your controller gain to turn in with the lab worksheet.
3. Integral (I) Control
1. Add a real pole at zero to implement the integral controller. You can do this from the root locus plot, or
the ‘Control and Estimation Tools Manager’ as described earlier. Note that once you place a compensator
pole (or zero) you can click and drag it to a new location. However, for an integral controller the pole is
always at zero, so leave it there for now.
2. You should note that there are two root locus branches that head towards the imaginary axis (toward
instability), which is generally not desirable.
3. Find the value of K that makes the system marginally stable (the critical gain).
4. Try to find a value for K that gives a response with settling time less than or equal to 2 seconds and has
little overshoot. Save the corresponding step response and control effort plots and the controller gain to turn
in with the lab worksheet.

76
5. Is the position error zero? Could you find a K value for which you could meet the 1 second settling time
constraint?
4. Proportional + Derivative (PD) Control
1. Edit your compensator by removing the integrator (the pole at zero) and add a real zero. Note that in this
PD design that you can select where you place this real zero along the real axis. Take a moment to explore
what happens to the root locus, the step response, and the control effort as you move the zero.
2. Now move the zero between ‐1 and ‐4. Find a configuration with a position error less than 0.5.Save the
step response and control effort figure and the controller that produced it.
3. Next move the zero between ‐7 and ‐9. What happens to the root locus? Are we likely to get a faster
response of the closed‐loop system with this design than the previous one? Specify a controller with a zero
in this range that produces a settling time of 0.1 seconds or less. (Don’t forget that K< 10.) Save the step
response and control effort figure and the controller that produced it.
5. Proportional + Integral (PI) Control
1. Edit your compensator by adding a real pole at zero (adding the integral element). Note that in this PI
design that you can select where you place this real zero along the real axis, but that the real pole must
remain at zero.
2. Place the zero between 0 and ‐5. Find a controller that produces a settling time of less than 0.8seconds,
a percent overshoot of less than 2%, and a position error of zero. Save the step response and control effort
figure and the controller that produced it. Are all your poles inside the design region?
3. Now set the real zero to the left of ‐6. This type of configuration is not likely to get a faster response than
with just a P controller. Why?
6. Proportional + Integral + Derivative (PID) Control
1. Let’s start by making a PID controller with complex conjugate zeros. Edit the previous
compensator by deleting the real zero and adding complex conjugate zeros at -7 ±j7 and look at the root
locus plot.
2. Find a gain value of K on this root locus so that the step response has less than 10% percent overshoot
and a settling time less than 0.5 seconds. Save the step response and control effort figure and the controller
that produced it. Are all your poles and zeros within the design region?
Would you call this a second order dominant system?
3. Keeping the real part of the zeros at ‐7, reduce the imaginary part of the zeros as much as possible while
keeping the same basic shape of the root locus. At some point, as you reduce the imaginary part, the root
locus will take a very different shape. Find a value of K on this root locus so that the step response has a
percent overshoot of less than 2%, settling time less than 1second, and a position error of less than 0.01.
(Remember to keep K < 10.) Save the step
response and control effort figure and the controller that produced it.
a) Now let’s make a PID controller with real zeros at ‐7 and ‐8. Determine the root locus for this
system. Find a value of K on this root locus so that percent overshoot is less than 2% and the settling
time is less than 1 second. (Remember to keep K < 10.) Save the step response and control effort
figure and the controller that produced it.

77
Below is the illustrative way to understand the GUI for SISO tool. To import the plant data into the SISO
Tool, select the Import item from the File menu.
SISOTOOL (Your_Plant) specifies the plant model that you are working on to be used in the SISO Tool.
Here Your Plant is any linear model created with TF, ZPK, or SS.
For more help write in command window
>>help sisotool
To work on it write in command window like in Figure 4

Figure 4: Command Window


On entering “sisotool” following two windows will be opened.
1. Control and estimator Tool manager Window: where we have different tabs to work (Figure 5).

78
Figure 5
2. SISO Design for SISO Design Task Window: where we have different analysis tools like bode
plot for open loop and close loop and root locus (Figure 6).

Figure 6

79
Click on File of “SISO Design for SISO Design Task Window” and click on Import like

Figure 7

Following window (Figure 8) will be opened, click on G of below figure

Figure 8

Click on Browse following window (Figure 9) will be opened and select workspace where your model
will be present, select that model and press import, you can also import your modal from making your
model in M-file. Press Close after Importing.

80
Figure 9

Following window (Figure 10) will be opened

Figure 10
Following Window will open (Figure 11).

81
Figure 11
By changing pole location or by adding poles or zeros you can get your required design.
Now go on “Control and estimator Tool manager Window” where select “Analysis Plot”Tab. Where
modal can analyze with different configurations.

Figure 2

Task 1: For the system shown in figure 13

82
Figure13: Closed Loop System

Design a PID controller so that the system can operate with a peak time that is two-thirds that of the
uncompensated system at 20% overshoot and with zero steady-state error for a step input with help of SISO
tool.
K(s + 8)
G(s) =
(s + 3)(s + 6)(s + 10)

83
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

84
Experiment 17
Bode Plot Analysis for Various Systems
Objective:
The objective of this lab is to make you familiar with frequency domain techniques like Bode plot.
Bode plot is frequency domain technique used to determine the stability of the system and response
of the system.
Software:
MATLAB
Command:
bode(sys)
Bode Plot:
Bode plots are representative of the magnitude and phase of G(j*ω) (where the frequency vector
ω contains only positive frequencies). These consist of two graphs.
The first plot is a plot of log modulus i.e., |G(jω)|, (in decibels) versus frequency. The magnitude
of |G(jω)| of any transfer function for any value of ω is plotted on a logarithmic scale in decibels
where dB = 20log10| P(j ω) | . The second plot is the phase shift (in degrees) versus frequency (ω).
Both plots usually have the frequency (ω) in logarithmic scale from 0 to ∞.
Bode plot is frequency domain technique used to determine the stability of the system. From Gain
and Phase plot we determine Gain Margin and Phase Margin. If both, Gain and Phase margins are
positive then system is stable.
Task 1: For the following systems
b) Draw Magnitude and Phase bode plot on Paper.
c) Make Magnitude and Phase bode plot with Matlab.
d) Compare both results
e) Finally draw Magnitude and Phase result in manual.

1
1. G1 (s) = s
1
2. G2 (s) = (s+10)
3. G3 (s) = s
4. G4 (s) = s + 10

85
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

86
Experiment 18
PID Controller Design via Bode Plot
Two relative stability indicators "Gain Margin" and "Phase Margin" are easily obtained from Bode
Plots. As 0 dB corresponds to a magnitude of 1 the gain margin is the number of dB that |G(jω)| is
below 0 dB at the phase frequency when the phase arc(G(jω)= 180o (Phase crossover). The gain
margin is the factor by which the gain can be increased before instability results.

The phase margin in the number of degrees arg(G(iω) is above -180o frequency associated with a
gain |G(jω)| = 1 (0 dB) (Gain crossover). The phase margin is the amount of phase by which G(jω)
exceeds -180 degrees when |K G(jω)|=1.

The following observations can be made on system stability with respect to the properties of
Bode Plot:
1. The gain margin is positive, and the system is stable if the magnitude of G(jω) at the phase
crossover is negative in dB. That is, the gain margin is measured below 0-dB axis. If the
gain margin is measured above 0-dB axis, the gain margin is negative, and the system is
unstable.
2. The phase margin is positive, and system is stable if the phase of G(jω) is greater than -
180o at the gain crossover. That is, the phase margin is measured above -180o axis. If the
phase margin is measured below the -180o axis, the phase margin is negative, and the
system is unstable.

87
Lab Task :PID control design
Consider following open loop system
G(s) =(s + 1)/s2(s + 8)
Lab Task 1: Plot bode and step response of uncompensated system and comment.
Lab Task 2: Design a PID compensator such that the compensated system has a PM of 60o and a
gain crossover frequency of 5 rad/sec and an acceleration error constant Ka = 1. The PID
compensator is of following form
Gc(s) = KP + KDs +KI/s
Gc(jω) = KP + j(KDω-KI/ω)
Gc(jω)= jGc(jω)j(cosө+ j sinө)
For the PID compensator, we can write
KP = |Gc(jω)| cosө
KDω-KI/ω= |Gc(jω)| sinө
We know that at gain crossover frequency, |Gc(jωg)||G(jωg)| = 1. This gives
|Gc(jωg)| =1/|G(jωg)|
Substituting for |Gc(jω)| from previous equation, we get
Kp =cosө /|G(jωg)|
Similarly, we have
KDωg –KI/ωg=sin ө/|G(jωg)|
Now at ωg = 1 rad/s,
G(jωg) = 0:1754 < -142.1250o
For the compensated system to have a phase margin of 60o at ωg = 1 rad/sec, we should have
-180 + Φm = ө + <G(jω) (Φm = PM)
ө = -180o+ 60o + 142.1250o = 22:1250o
Hence,
KP =cos 22.1250/0.1754 = 3:9571
Choose KI = 0, then KD can be computed to be
KD =(sin (22.1250o ))/0.1754) + 1= 3.1471

88
Hence, we have a PD compensator
Gc(s) = 3.9571 + 3.1471s
Plot the bode and step response of compensated system G(s)Gc(s) and comment.

89
Laboratory Assessment
Student Name: ___________________ Registration Number: ____________________

Learning Level
Allocated Obtained
Criteria Poor Good Very Good Excellent
Marks Marks, A
0-40% 41-60% 61 - 89% 90 - 100%

Affective 10%

Obtained
Learning Level
Marks, C
Allocated
Criteria Very
Marks Poor Good Excellent
Good
0-40% 41-60% 90 - 100%
61 - 89%

Cognitive 20%

Learning Level
Allocated Obtained
Criteria
Marks Poor Good Very Good Excellent Marks, P
0-40% 41-60% 61 - 89% 90 - 100%
Psychomotor 70%

Obtained Marks = (0.1 × A) + (0.2 × C) + (0.7 × P) = ___________,


Total Marks: __10_____

Course Instructor = ___________________________

90
Experiment 19
Complex Engineering Problem

Physical setup and system equations


Designing an automotive suspension system is an interesting and challenging control problem.
When the suspension system is designed, a 1/4 model (one of the four wheels) is used to simplify
the problem to a 1-D multiple spring-damper system. A diagram of this system is shown below.
This model is for an active suspension system where an actuator is included that is able to generate
the control force U to control the motion of the bus body.

Figure 1. Model of Bus Suspension System


System parameters:
(M1) 1/4 bus body mass 2500 kg
(M2) suspension mass 320 kg
(K1) spring constant of suspension system 80,000 N/m
(K2) spring constant of wheel and tire 500,000 N/m
(b1) damping constant of suspension system 350 N.s/m
(b2) damping constant of wheel and tire 15,020 N.s/m
(U) control force

91
Equations of motion

From the picture above and Newton's law, we can obtain the dynamic equations as the following:

Design requirements
A good bus suspension system should have satisfactory road holding ability, while still providing
comfort when riding over bumps and holes in the road. When the bus is experiencing any road
disturbance (i.e. pot holes, cracks, and uneven pavement),the bus body should not have large
oscillations, and the oscillations should dissipate quickly. Since the distance X1-W is very difficult
to measure, and the deformation of the tire (X2-W) is negligible, we will use the distance X1-X2
instead of X1-W as the output in our problem. Keep in mind that this is an approximation.
The road disturbance (W) in this problem will be simulated by a step input. This step could
represent the bus coming out of a pothole. We want to design a feedback controller so that the
output (X1-X2) has an overshoot less than 5% and a settling time shorter than 5 seconds. For
example, when the bus runs onto a 10-cm step, the bus body will oscillate within a range of +/- 5
mm and return to a smooth ride within 5 seconds.
Deliverables Timeline:

Sr. Deadlines Marks Type / Percentage


No Brief Project Summary
1 Project Proposal (10%)

2 Detailed Project Report 1. Introduction,


(15%) 2. Design Methodology,
3. Project Timeline,
4. Results and Analysis
5. Conclusion/ Discussions
3 Project Presentations (30%) Presentation of the Detailed Project
Including above outlines.

4 Hardware/Software (45%) Implementation and demonstration

92

You might also like