Lab Report 08
Lab Report 08
Lab Report 08
Graphs, if
necessary, were Graphs, if Major
To present results Graphs, if
drawn necessary, components
in the form of necessary, were
accurately and were drawn but of lab were
graphs drawn
neatly and were inadequately. missing
adequately
clearly labelled.
Comments:
Objectives:
To study the detail theory of PI and PD
Design the PI and PD controller using command in m.file
Design the PI and PD controller in Simulink
Tuning of PI and PD controller for desired output
Apply the PI and PD controller to a real time system
Controller
Introduction:
A controller is a mechanism that seeks to minimize the difference between the actual value of
a system (i.e. the process variable) and the desired value of the system (i.e. the setpoint).
Controllers are a fundamental part of control engineering and used in all complex control
systems. [1]
A controller is basically a unit present in a control system that generates control signals to
reduce the deviation of the actual value from the desired value to almost zero or lowest
possible value. It is responsible for the control action of the system so as to get accurate
output.
Most of the industrial process required that some variable like temperature, flow, level and
position etc. should remain at or near some reference point called set point.
The device which serve to maintain the process variable at set point is called as controller
It determines the deviation of the system and produces the control signal that reduces the
deviation to 0 or small value
The method of producing a control signal by the controller is known as control action.
Significance of Controller:
Controllers improve the steady-state accuracy by decreasing the steady state error. As
the steady-state accuracy improves, the stability also improves.
Controllers also help in reducing the unwanted offsets produced by the system.
Controllers can control the maximum overshoot of the system.
Controllers can help in reducing the noise signals produced by the system.
Controllers can help to speed up the slow response of an overdamped system.
Types of Controllers:
Continuous controllers
o Proportional controllers
o Integral controllers
o Derivative controllers
o Composite controllers
PI (Proportional Integral controllers)
PD (Proportional derivative controllers)
PID (Proportional integral derivative controllers)
Discontinuous controllers
o On-Off controllers
Two position controllers
Multi-position controllers
Controllers
Discontinuous Continuous
On-Off
Proportional Integral Derivative Composite
Controllers
Controllers
Proportional
Multi-Position
Derivative
Controller
Proportional
Integral
Derivative (PID)
Course Instructor: Engr. Wahad-Ur-Rehman P a g e 4 | 26
Control Systems Lab report
Continuous Controllers:
In continuous controllers the controlled variable (also known as the manipulated variable) can
have any value within the controller’s output range. In the continuous controller theory, there
are three basic modes on which the whole control action takes place, which are:
Proportional controllers.
Integral controllers.
Derivative controllers.
Discontinuous Controller:
Note!
Fundamental Controllers:
1. Proportional Controller:
In single Proportional mode, the controller simply multiplies the Error by the Proportional
Gain (Kp) to get the controller output.
A high proportional gain results in a large change in the output for a given change in the
error.
Generally,
2. Integral Controllers:
An integral controller (also called reset controller) can eliminate the steady-state error that
occurs with a proportional controller. Integral control action is expressed as follows: [4]
𝒕
𝒇𝑰(𝒕) = 𝑲𝒊 ∫ 𝒆(𝝂)𝒅𝝂
𝟎
Where,
fI (t) is the integral control action
Ki is the integral constant.
𝑑
It can be expressed as;
𝐴(𝑡) = 𝐾𝑑 ∗ [𝑒(𝑡)]
𝑑𝑡
Where, 𝐾𝑑 is proportional constant also known as controller gain. The derivative
controller is also known as the rate controller.
PD Controller:
As mentioned, PD-control correlates the controller output to the error and the derivative of
the error.
𝐾(𝑠) = 𝑘𝑝 + 𝑘𝑑𝑠
𝒌𝒑
𝑲(𝒔) = 𝒌𝒅 (𝒔 + )
�𝒅
�
Objectives of Controllers:
Using Newton’s Second Law we we have the governing equation of the system as,
𝑚𝑥̈ + 𝑏𝑥̇ + 𝑘𝑥 = 𝐹
𝑋(𝑠 ) 1
=
𝐹(𝑠) 𝑚𝑠 + 𝑏𝑠 + 𝑘
2
𝑿(𝒔) 𝟏
= 𝟐
𝑭 (𝒔 ) 𝒔 + 𝟏𝟎𝒔 + 𝟐𝟎
M file code:
num = [1];
dnum = [1 10 20];
system = tf(num,dnum);
linearSystemAnalyzer(system)
stepinfo(system)
Simulink Circuit:
Results:
𝑆𝑆 𝑒𝑟𝑟𝑜𝑟 = 1 − 0.05
𝑆𝑆 𝑒𝑟𝑟𝑜𝑟 = 0.95
Which means,
Proportional gain is multiplied to the output of the system to reduce the error in steady state.
M file code:
num = [1];
dnum = [1 10 20];
system = tf(num,dnum);
Kp = 50;
C = pid(Kp)
T = feedback(C*system,1)
linearSystemAnalyzer(T)
stepinfo(T)
Simulink Circuit:
Results:
= 1 − 0.78
Now,
%𝑺𝑺 𝒆𝒓𝒓𝒐𝒓 = 𝟐𝟐 %
Note!
95 % 22 %
By increasing the value of 𝐾𝑝 although SS error decreases, but its high value causes
the response of the system to fluctuate having peak overshoot.
M file code:
clear all;
clc;
num = [1];
denom = [1 10 20];
system = tf(num,denom)
kp = 1000;
kd1 = 1;
kd2 = 10;
kd3 = 50;
kd4 = 100;
C1 = pid(kp,0,kd1);
C2 = pid(kp,0,kd2);
C3 = pid(kp,0,kd3);
C4 = pid(kp,0,kd4);
T1 = feedback(system*C1,1)
T2 = feedback(system*C2,1)
T3 = feedback(system*C3,1)
T4 = feedback(system*C4,1)
linearSystemAnalyzer(T1,T2,T3,T4)
Simulink Circuit:
Results:
Advantages Disadvantage
Reduced peak overshoot Negligible effect on rise time
Reduced settling time Negligible effect on steady state error
M file code:
clear all;
clc;
num = [1];
denom = [1 10 20];
system = tf(num,denom)
kp = 1000;
ki1 = 1;
ki2 = 100;
ki3 = 500;
ki4 = 2000;
C1 = pid(kp,ki1,0);
C2 = pid(kp,ki2,0);
C3 = pid(kp,ki3,0);
C4 = pid(kp,ki4,0);
T1 = feedback(system*C1,1)
T2 = feedback(system*C2,1)
T3 = feedback(system*C3,1)
T4 = feedback(system*C4,1)
linearSystemAnalyzer(T1,T2,T3,T4)
Simulink Circuit:
Results:
Figure 8.21 Combined script file result of PI controller with each settling time
Advantage Disadvantage
Discussion:
The proportional controller (KP) will have the effect of reducing the rise time and will
reduce, but never eliminate, the steady state error. An integral controller (KI) will have the
effect of eliminating the steady state error, but it may make the transient response worse. A
derivative control (KD) will have the effect of increasing the stability of the system, reducing
the overshoot and improving the transient response.
Conclusion:
Hence, from above experimentation and observations over various outputs, it can be concluded
that;
Using any single controller reduces one error but may cause the system to
malfunction in any other aspect
Proportional controller reduces steady state error but causes peak overshoot
Integral controller eliminates steady state error but it makes the system slower with
peak overshoot
Derivative controller decreases the peak overshoot and settling time, but cannot
reduce steady state error.
PD controller is unable to reduce rise time and steady state error
PI controller causes system to have overshoots and way more unstable transient state
The only option for a nearly perfect output is to use all the controller in conjunction
i.e. PID controller
References