Professional Documents
Culture Documents
Process
Input Controller Process
Output
Feedback
There are three classes of controllers available – proportional, derivative and integral.
Prepared by: Abir Ahsan Akib and Md. Messal Monem Miah
Simulink- Taiyeb Hasan Sakib
Combining them, proportional-integral controller, proportional-derivative controller and
proportional-integral-derivative controller can also be made. The transfer function of the
𝑘
controllers is: 𝑘𝑝 + 𝑠𝑖 + 𝑘𝑑 𝑠 where kp=proportional gain, ki=integral gain and kd=derivative
gain.
Example 1: Consider, a second order system is characterized by the transfer function 𝐺 (𝑠) =
2
. Analyze the output if:
𝑠 2+12𝑠+20
clc;
clear all;
close all;
s=tf('s');
num=2;
den=s^2+12*s+20;
G=num/den;
kp=5;
ki=10;
kd=2;
figure;
step (G,0:0.1:5);
title('Step Response for the Open Loop System');
GP=feedback(G*kp,1);
figure;
step (GP,0:0.1:5);
title('Step Response for the Close Loop System with Proportional Controller');
GPI=feedback(G*(kp+ki/s),1);
figure;
step (GPI,0:0.1:5);
title('Step Response for the Close Loop System with Proportional-Integral Controller');
GPD=feedback(G*(kp+kd*s),1);
figure;
step (GPD,0:0.1:5);
title('Step Response for the Close Loop System with Proportional-Derivative Controller');
Prepared by: Abir Ahsan Akib and Md. Messal Monem Miah
Simulink- Taiyeb Hasan Sakib
Prepared by: Abir Ahsan Akib and Md. Messal Monem Miah
Simulink- Taiyeb Hasan Sakib
Prepared by: Abir Ahsan Akib and Md. Messal Monem Miah
Simulink- Taiyeb Hasan Sakib
Example-2: Consider the same system described in Example-1 and analyse outputs using
Simulink.
Simulink:
1. Open Simulink by typing simulink in the command window or by clicking Simulink
Library icon from Home.
3. Go to File>New>Model
A design window will open. Here you will design and simulate different models of
systems.
Prepared by: Abir Ahsan Akib and Md. Messal Monem Miah
Simulink- Taiyeb Hasan Sakib
If you click on the button marked with red arrow, it will take you to Simulink Library
Browser from where you can find necessary components to design your model/models.
Prepared by: Abir Ahsan Akib and Md. Messal Monem Miah
Simulink- Taiyeb Hasan Sakib
Closed loop with proportional-integral (PI) control-
There is an alternative approach to design closed loop with PID control. There is a
component available in Matlab Simulink Library- PID Controller. You can use this
component instead of using multiple gains, integrator and derivative component/s. It also
provides an advantage of Tuning.
Prepared by: Abir Ahsan Akib and Md. Messal Monem Miah
Simulink- Taiyeb Hasan Sakib
Root Locus:
The root locus of a feedback system is the graphical representation in the complex s-plane of
the possible locations of its closed-loop poles for varying values of a certain system
parameter.
Consider the system:
𝐾.𝐺(𝑠)
The overall transfer function of the system is: 1+𝐾.𝐺(𝑠).𝐻(𝑠)
Change in gain causes change in pole location of the system and as a result, the stability is
affected.
MATLAB Interpretation:
clc;
clear all;
close all;
s=tf('s');
num=(s-3)*(s-5);
den=(s+1)*(s+2);
G=num/den;
figure;
rlocus(G);
[k,poles] = rlocfind(G);
figure;
G1=feedback(k*G,1);
step (G1,0:0.1:10);
stepinfo(G1)
Prepared by: Abir Ahsan Akib and Md. Messal Monem Miah
Simulink- Taiyeb Hasan Sakib
Overdamped:
Prepared by: Abir Ahsan Akib and Md. Messal Monem Miah
Simulink- Taiyeb Hasan Sakib
Critically Damped:
Underdamped:
Prepared by: Abir Ahsan Akib and Md. Messal Monem Miah
Simulink- Taiyeb Hasan Sakib
Undamped:
Unstable:
Home Task:
1. Consider the following transfer function:
25
𝐺 (𝑠 ) =
𝑠2 + 11𝑠 + 25
a. Plot the step response of the system in the same plot if proportional controller of
Kp=5,10,50 and 100 are used and make a table containing the settling time,
overshoot and steady state error. Show the step response using Simulink for any
one of the Kp values.
b. Plot the step response of the system in the same plot if proportional integral
controller of Kp=5 and Ki=5,10,20 and 50 are used and make a table containing the
Prepared by: Abir Ahsan Akib and Md. Messal Monem Miah
Simulink- Taiyeb Hasan Sakib
settling time, overshoot and steady state error. Show the step response using
Simulink for any one of the Kp and Ki combinations.
c. Plot the step response of the system in the same plot if proportional derivative
controller of Kp=5 and Kd=0.5,1,2 and 3 are used and make a table containing the
settling time, overshoot and steady state error. Show the step response using
Simulink for any one of the Kp and Kd combinations.
d. Determine the Kp, Kd and Ki required to design the best control system in terms of
both steady state and transient performance and plot the step response using the
PID controller. Use Simulink to obtain the values of Kp, Kd and Ki fulfilling
following criteria-
i. Rise time- 0.4-0.5 sec
ii. Settling time is less than 0.8 sec
iii. Maximum overshoot 5%
2. Consider the following system:
(𝑠 − 3)(𝑠 − 5)
𝐺 (𝑠) = 𝐾.
(𝑠 + 1)(𝑠 + 2)
Find the range or value of gain K that makes the system:
a. Overdamped
b. Critically Damped
c. Under Damped
d. Marginally Stable
e. Unstable
Prepared by: Abir Ahsan Akib and Md. Messal Monem Miah
Simulink- Taiyeb Hasan Sakib