2017 - 2018 - S1 Process Control Systems-Course Materials
2017 - 2018 - S1 Process Control Systems-Course Materials
Lecture 1
Introduction to Course
Gain Knowledge in the theory and practice of control
Gain systems
Learning
Design Procure components and design the physical system
Outcomes
Analysis of Design the system and analyze its performance against
Design the desired output
READINGS
•System Dynamics K Ogata
•Control Systems W Bolton
•Control Systems Engineering Nise
•Modern Control Systems R Dorf
Overview of the course
• Introduction
• Block Diagram and Signal flow graph
• Transfer functions
• Transient Analysis
• Gain and Phase Margin Analysis (if time permits)
• PID Control
• Stability Analysis
Introduction
• What is Control System?
Elevator Performance
Advantages of Control Systems
• Power Amplification – Eg., Radar Antenna
• Remote Control - Eg., Robots
• Convenience of Input Form – Eg., Thermostat
• Compensation for Disturbances – Eg., Antenna
History
Ref: Wikipedia
Liquid Level Control – 1st Century AD
Advantages
• Simple design
• Less costly
Disadvantage
• Sensitivity to disturbances
• Less accurate
Closed Loop System
Advantages
• Greater Accuracy
• Less sensitivity to disturbances
and changes to environment
• Output can be easily
controllable
Disadvantages
• More complex
• Expensive
Design Procedure
• Steps to follow when designing control system for an application
Example of Modern Control System
Step 1
Determine
the Physical
system and its
requirements
Step 1
Draw a
functional
block
diagram
Step2
Draw the
physical
system into a
schematic
diagram
Step 3
Transform
Schematic
Diagram to
Block Diagram
Step 4: Mathematical model of block diagram,
signal flow graph or state space representation
1
𝑠
Output Potentiometer
Step 5: Reduce the block diagram to single
block
Preamplifier
and Potentiometer Power Amplifier Motor, Load and Gears
𝜃𝑖 (𝑠) 100 0.2083 𝜃𝑜 (𝑠)
+ 1
𝑠 𝑠 + 100 𝑠(𝑠 + 1.71)
𝜃𝑖 (𝑠) 𝜃𝑜 (𝑠)
6.63𝐾
𝑠 3 + 101.7𝑠 2 + 171𝑠 + 6.63𝐾
Step 6
Analyze, design
and Test to see
that requirements
and Specifications
are met
Example of closed loop
control system in business
A feedback control
system model of
national income
Design Example
• Blood Glucose
Level Monitor
Design Example
Block Diagram
description of Blood
Glucose Level
Monitor
References
1. Control Systems Engineering – Norman S.Nice
2. https://www.slideshare.net/leonidesdeocampo/Lecture1ME1761In
troduction
3. http://www.ieeecss.org/siteindex/SITEindex.html
Session Tasks
1. Describe few disasters due to the failure of the control system
design in the past decades
2. Draw a block diagram for a system that you are familiar with, stating
the control objective clearly.
Contact Details
Dr. Chitra Venugopal
Associate Professor in Electrical Engineering
Utilities Engineering
Room: AB 107, Point Lisas Campus
email: [email protected]
Mathematical Analysis of the
System
Lecture 2
Mathematical Model
• A Control System is a collection of physical components connected
together to serve an objective
• The input-output relations of various physical components in a
system is governed by differential equations
• The response or output of a system can be studied by solving the
differential equations for various input conditions
Superposition Theorem for Control System
• The super position theorem implies that if a system model has
responses 𝑦1 𝑡 and 𝑦2 𝑡 for the given inputs 𝑥1 𝑡 and 𝑥2 𝑡
respectively then the system response to linear combination of these
inputs 𝑎1 𝑥1 𝑡 and 𝑎2 𝑥2 𝑡 is given by the linear combination of
individual outputs 𝑎1 𝑦1 𝑡 and 𝑎2 𝑦2 𝑡 where 𝑎1 and 𝑎2 are
constants
Superposition Theorem for Control System
contd.,
• Principle of super position can be explained diagrammatically
𝑟1 𝑡 𝑐1 𝑡
𝐺 𝑟1 𝑡
𝑎1
System 𝑎1 𝑟1 𝑡
+ 𝑎1 𝑟1 𝑡 +𝑎2 𝑟2 𝑡 𝑐3 𝑡
G
𝑟2 𝑡 𝑐2 𝑡 +
System
𝐺
System 𝑟2 𝑡 𝑎2 𝑟2 𝑡
𝑎2 𝐼𝑓 𝑐3 𝑡 = 𝑎1 𝑟1 𝑡 +𝑎2 𝑟2 𝑡
Then system G is linear
Definitions
• Linear Time Invariant System
If the coefficients of the differential equation describing the system are constants then the model is Linear Time
Invariant
• Linear Time Variant System
If the coefficients of the differential equation describing the system are functions of time then the model is Linear
Time Variant
• Transfer Function
The differential equations of linear time invariant system can be reshaped into any form for analysis. One such form
for single input single output system analysis is called Transfer Function analysis
𝑓 = 𝐴𝑝𝑝𝑙𝑖𝑒𝑑 𝑓𝑜𝑟𝑐𝑒
𝑑2 𝑥 𝑑2 𝑥
𝑓𝑚 𝛼 2 or 𝑓𝑚 = 𝑀 2
𝑑𝑡 𝑑𝑡
𝑑2 𝑥
By Newton’s second law f = 𝑓𝑚 = 𝑀 2
𝑑𝑡
Force balance equations of idealized
elements contd.,
Ideal Frictional Element Damper with one end fixed to Reference
𝑓 = 𝐴𝑝𝑝𝑙𝑖𝑒𝑑 𝑓𝑜𝑟𝑐𝑒
𝑑𝑥 𝑑𝑥
𝑓𝑏 𝛼 or 𝑓𝑏 = 𝐵
𝑑𝑡 𝑑𝑡
𝑑𝑥
By Newton’s second law f = 𝑓𝑏 = 𝐵
𝑑𝑡
Force balance equations of idealized
elements contd.,
Ideal Frictional Element Damper with displacement at both ends
𝑓 = 𝐴𝑝𝑝𝑙𝑖𝑒𝑑 𝑓𝑜𝑟𝑐𝑒
𝑓𝑚 = 𝑂𝑝𝑝𝑜𝑠𝑖𝑛𝑔 𝑓𝑜𝑟𝑐𝑒 𝑑𝑢𝑒 𝑡𝑜 𝑓𝑟𝑖𝑐𝑡𝑖𝑜𝑛
𝑑 𝑑
𝑓𝑏 𝛼 𝑥1 − 𝑥2 or 𝑓𝑏 = 𝐵 𝑥1 − 𝑥2
𝑑𝑡 𝑑𝑡
𝑑
By Newton’s second law f = 𝑓𝑏 = 𝐵 𝑥1 − 𝑥2
𝑑𝑡
Force balance equations of idealized
elements contd.,
Ideal Elastic Element Spring with one end fixed to Reference
𝑓 = 𝐴𝑝𝑝𝑙𝑖𝑒𝑑 𝑓𝑜𝑟𝑐𝑒
𝑓𝑘
= 𝑂𝑝𝑝𝑜𝑠𝑖𝑛𝑔 𝑓𝑜𝑟𝑐𝑒 𝑑𝑢𝑒 𝑡𝑜 𝑠𝑝𝑟𝑖𝑛𝑔
𝑓𝑘 𝛼 𝑥 or 𝑓𝑘 = 𝐾𝑥
𝑓 = 𝐴𝑝𝑝𝑙𝑖𝑒𝑑 𝑓𝑜𝑟𝑐𝑒
𝑓𝑘 = 𝑂𝑝𝑝𝑜𝑠𝑖𝑛𝑔 𝑓𝑜𝑟𝑐𝑒 𝑑𝑢𝑒 𝑡𝑜 𝑆𝑝𝑟𝑖𝑛𝑔
𝑓𝑘 𝛼 𝑥1 − 𝑥2 or 𝑓𝑘 = 𝐾 𝑥1 − 𝑥2
Case Study 1
𝑋1 (𝑠) 𝑋2 (𝑠)
Determine the transfer function and
𝐹(𝑠) 𝐹(𝑠)
Case Study 2
Mechanical Rotational System
T= 𝐴𝑝𝑝𝑙𝑖𝑒𝑑 𝑇𝑜𝑟𝑞𝑢𝑒
𝑇𝑚 = 𝑂𝑝𝑝𝑜𝑠𝑖𝑛𝑔 𝑇𝑜𝑟𝑞𝑢𝑒 𝑑𝑢𝑒 𝑡𝑜 𝑀𝑜𝑚𝑒𝑛𝑡 𝑜𝑓 𝐼𝑛𝑒𝑟𝑡𝑖𝑎 𝑜𝑓 𝑡ℎ𝑒 𝑏𝑜𝑑𝑦
𝑑2 𝜃 𝑑2 𝜃
𝑇𝑗 𝛼 2 or 𝑇𝑗 = 𝐽 2
𝑑𝑡 𝑑𝑡
𝑑2 𝜃
By Newton’s second law T = 𝑇𝑗 = 𝐽 2
𝑑𝑡
Torque balance equations of idealized
elements contd.,
Ideal Frictional Element Damper with one end fixed to Reference
𝑇 = 𝐴𝑝𝑝𝑙𝑖𝑒𝑑 𝑓𝑜𝑟𝑐𝑒
𝑑𝜃 𝑑𝜃
𝑇𝑏 𝛼 or 𝑇𝑏 = 𝐵
𝑑𝑡 𝑑𝑡
𝑑𝜃
By Newton’s second law T = 𝑇𝑏 = 𝐵
𝑑𝑡
Torque balance equations of idealized
elements contd.,
Ideal Frictional Element Damper with displacement at both ends
T= 𝐴𝑝𝑝𝑙𝑖𝑒𝑑 𝑓𝑜𝑟𝑐𝑒
𝑇𝑗 = 𝑂𝑝𝑝𝑜𝑠𝑖𝑛𝑔 𝑓𝑜𝑟𝑐𝑒 𝑑𝑢𝑒 𝑡𝑜 𝑓𝑟𝑖𝑐𝑡𝑖𝑜𝑛
𝑑 𝑑
𝑇𝑏 𝛼 𝜃1 − 𝜃2 or 𝑇𝑏 = 𝐵 𝜃1 − 𝜃2
𝑑𝑡 𝑑𝑡
𝑑
By Newton’s second law T = 𝑇𝑏 = 𝐵 𝜃1 − 𝜃2
𝑑𝑡
Force balance equations of idealized
elements contd.,
Ideal Elastic Element Spring with one end fixed to Reference
𝑓 = 𝐴𝑝𝑝𝑙𝑖𝑒𝑑 𝑇𝑜𝑟𝑞𝑢𝑒
𝑇𝑘 𝛼 θ or 𝑇𝑘 = 𝐾𝜃
T= 𝐴𝑝𝑝𝑙𝑖𝑒𝑑 𝑇𝑜𝑟𝑞𝑢𝑒
𝑇𝑘 = 𝑂𝑝𝑝𝑜𝑠𝑖𝑛𝑔 𝑇𝑜𝑟𝑞𝑢𝑒 𝑑𝑢𝑒 𝑡𝑜 𝑆𝑝𝑟𝑖𝑛𝑔
𝑇𝑘 𝛼 𝜃1 − 𝜃2 or 𝑇𝑘 = 𝐾 𝜃1 − 𝜃2
Case Study 4
𝜃(𝑠)
Write the differential equation governing the mechanical system and determine the transfer function
𝑇(𝑠)
Case Study 5
Electrical Systems
• Current – Voltage Relation of R,L and C
Obtain the transfer function of the electrical system
Case Study 6
Transfer function of Armature Controlled Separately Excited DC motor
Case Study 7
Equivalent Circuit of Electrical System of the Motor
Case Study 8
Write the differential equation governing the mechanical system. Draw the force-voltage
and force – current electrical analogous circuit and verify them by writing mesh and node
equations
Case Study 8
Liquid Level - Single Tank System
𝑑𝐻 2 𝐻 2 𝐻 𝐻 2𝐻
we have = = = = 𝑅𝑡
𝑑𝑄 𝐾 𝑄 𝑄
Resistance and Capacitance of Liquid-Level
Systems contd.,
The capacitance C of the tank is defined as the change in quantity of
stored liquid necessary to cause a unit change in the potential (head).
The potential is the quantity that indicates the energy level of the
system
𝑐ℎ𝑎𝑛𝑔𝑒 𝑖𝑛 𝑙𝑖𝑞𝑢𝑖𝑑 𝑠𝑡𝑜𝑟𝑒𝑑,𝑚3
𝐶=
𝑐ℎ𝑎𝑛𝑔𝑒 𝑖𝑛 ℎ𝑒𝑎𝑑,𝑚
• Derive a mathematical
model for the system
Mathematical modelling of Thermal System
• Heat can flow from one substance to another in three different ways:
• Conduction
• Convection
• Radiation
Mathematical modelling of Thermal System
• Resistance and Capacitance of the thermal system
Mathematical modelling of Thermal System
contd.,
Mathematical modelling of Thermal System
contd.,
Where,
Case Study 9
Derive a mathematical model for the system shown
Solution
Eliminating q1
Eliminating q1 and q0
Session Task 2
Step 2 Eliminate the feedback path and combine the blocks in cascade
Step 3 Combine the parallel blocks
Step 2 combine the blocks in cascade and eliminate the parallel blocks
Step 3 Move summing point before the block
disp('system1'); system2
G1=tf([num_cof1],[den_cof1]) G2 =
num_cof2=[0 4]; 4
-----
den_cof2=[1 6]; s+6
Continuous-time transfer function.
disp('system2'); series system
G2=tf([num_cof2],[den_cof2]) GC =
[num_cofc, 32
-----------------------
den_cofc]=series(num_cof1,den_cof1,num_cof2 s^3 + 8 s^2 + 21 s + 54
GC=tf([num_cofc],[den_cofc]) GP =
[num_cofp,den_cofp]=parallel(num_cof1,den_c 4 s^2 + 16 s + 84
-----------------------
of1,num_cof2,den_cof2); s^3 + 8 s^2 + 21 s + 54
[num_coff,den_coff]=parallel(num_cof1,den_c GF =
of1,num_cof2,den_cof2); 4 s^2 + 16 s + 84
-----------------------
disp('feedback system'); s^3 + 8 s^2 + 21 s + 54
1. Step Signal
A step signal is a signal whose value changes from
zero to A at t=0 and remains constant at A for t>0.
1. Ramp Signal
A ramp signal is a signal whose value increases linearly
with time from an initial value of zero at t=0.
+∞
𝛿 𝑡 𝑑𝑡 = 𝐴
−∞
𝑟 𝑡 = 0 ;𝑡 ≠ 0
When A = 1, then it is called unit impulse signal
Standard Test Signals
Name of the Time domain equation Laplace Transform
signal of the signal r(t) of the signal, R(s)
Step A 𝐴
𝑠
Unit Step 1 1
𝑠
Ramp At 𝐴
𝑠2
Unit Ramp t 1
𝑠2
Parabolic 𝐴𝑡 2 𝐴
2 𝑠3
Unit Parabolic 𝑡2 1
2 𝑠3
Impulse 𝛿(𝑡) 1
Order of a System
• The order of the system is given by the order of the differential
equation governing the system
Where,
Zeros and Poles of the system
Zeros and Poles of the first order system
• A pole of the input function generates the form of forced response
• A pole of the transfer function generates the form of natural response
• A pole on the real axis generates an exponential response of the form
𝑒 −𝑎𝑡 where -a is the pole location on the real axis. The farther to the
left a pole is on the negative real axis, the faster the exponential
transient response will decay to zero
• The zeros and poles generate the amplitudes for both the forced and
natural responses
First order system
• The closed loop first order system with unity feedback is shown
𝐶(𝑠) 1 1
Transfer function = 𝑎𝑛𝑑 𝐶 𝑠 = 𝑅 𝑠
𝑅 𝑠 1+𝑇𝑠 1+𝑇𝑠
First order system
If the input R(s) is unit step then the response of the system in s- domain is
1 1 1 1/𝑇
𝐶 𝑠 = = = 1
𝑠 1+𝑇𝑠 𝑠(1+𝑇𝑠) 𝑠(𝑠+ )
𝑇
the response of the system in time domain for unit step input is
1
−𝑇𝑡
𝐶 𝑡 =1−𝑒
Second order system
• The closed loop Second system with unity feedback is shown
𝐶(𝑠) 2
𝜔𝑛
Transfer function = where, 𝜔𝑛 is the natural frequency of oscillation
𝑅 𝑠 𝑠 +2𝜔𝑛 𝑠+𝜔𝑛
2 2
Where,
Analysis of Second order system
Analysis of Second Order System
Analysis of Second Order System
Analysis of Second order system
Analysis of Second order system
Analysis of Second Order System
Characteristics of control system
• The characteristic of control system for unit step input can be defined interms of
Delay time, 𝑡𝑑
It is the time taken for the response to reach 50% of the final value for the very first
time
Rise time, 𝑡𝑟
It is the time taken for response to raise from 0% to 100% (underdamped) or 10%
to 90% (over damped) or 5% to 95% (critically damped)for the very first time
Peak time, 𝑡𝑝
It is time taken for the response to reach the peak value for the very first time
Maximum overshoot, 𝑀𝑝
It the ratio of maximum peak value to the peak value
Settling time, 𝑡𝑠
Time taken by the response to reach and stay in the final value within a specified
error. The usual tolerable error is 2% to 5%
Characteristic of second order system
Characteristic of second order system
Expression for time domain specifications
The unit step response of second order underdamped system is given by
and
Damping Ratio Vs Percent Overshoot
Damping Ratio Vs Rise time
Case Study 1
The servomechanism is subjected to a step input and the response is
given as
𝑐 𝑡 = 1 + 0.2𝑒 −60𝑡 − 1.2𝑒 −10𝑡
Obtain an expression for closed loop transfer function.
Determine the undamped natural frequency of oscillation and damping
ratio
Case Study 2
A positional control system with velocity feedback is shown in the fig.
What is the response of the system for unit step input. Find the natural
frequency of oscillation and damping ratio
Case Study 3
Finding 𝑇𝑝 , %𝑂𝑆 𝑎𝑛𝑑 𝑇𝑠 𝑓𝑟𝑜𝑚 𝑃𝑜𝑙𝑒 𝑙𝑜𝑐𝑎𝑡𝑖𝑜𝑛
Damping ratio
7
= 𝑐𝑜𝑠𝜃 = cos 𝑡𝑎𝑛−1 = 0.394
3
𝜔𝑛 = 72 + 32 = 7.616
𝜋 𝜋
𝑃𝑒𝑎𝑘 𝑡𝑖𝑚𝑒, 𝑇𝑝 = = = 0.449𝑠𝑒𝑐
𝜔𝑑 7
−(
𝜋 )
1−2
%𝑂𝑆 = 𝑒 𝑋100 = 26%
4 4 4
𝑆𝑒𝑡𝑡𝑙𝑖𝑛𝑔 𝑇𝑖𝑚𝑒, 𝑇𝑠 = = = = 1.333𝑠𝑒𝑐
𝜔𝑛 𝜎𝑑 3
Case Study 4
• Given the system shown below, find J and D to yield 20% overshoot
and a settling time of 2 seconds for a step input of torque T(t)
Ans:
D=1.04N-m-s/rad
J=0.26 𝑘𝑔 − 𝑚2
Case Study 5
• An Unmanned Free-Swimming Submersible (UFSS) vehicle is shown in
the fig.1. The depth of the vehicle is controlled as follows. During
forward motion an elevator surface on the vehicle is deflected by a
selected amount. This deflection causes the vehicle to rotate about
the pitch axis. The pitch of the vehicle creates a vertical force that
causes the vehicle to submerge or rise. The pitch control system for
the vehicle is used here.
The block diagram for the pitch control system is shown in fig. 2.
In this case study we investigate the time response of the vehicle
dynamics that relate the pitch angle output to the elevator deflection
input.
The transfer function relating pitch angle, 𝜃 𝑠 , to elevator surface
angle, 𝛿𝑒 (𝑠), for the Unmanned Free-Swimming Submersible vehicle is
a. Using only the second-order poles shown in the transfer function,
predict percent overshoot, rise time and settling time
b. Using Laplace transforms, find the analytical expression for the
response of the pitch angle to a step input in elevator surface
deflection
c. Evaluate the effect of the additional pole and zero on the validity of
the second order approximation
d. Plot the response of the vehicle dynamics and verify your
conclusions found in (c ).
Session Task 4
• This problem uses the same principle that were applied to case study
5.
Ships at sea undergo motion about their roll axis as shown in fig. 1. Fins
called stabilizers are used to reduce the rolling motion. The stabilizers
can be positioned by a closed loop roll control system that consists of
components, such as fin actuators and sensors, as well as ship’s roll
dynamics.
Assume the roll dynamics,
which relates the roll-angle
output 𝜃 𝑠 , to a disturbance
–torque input 𝑇𝐷 𝑠 , is
𝜃(𝑠) 2.25
= 2
𝑇𝐷 (𝑠) 𝑠 + 0.5𝑠 + 2.25
Do the following
a. Find the natural frequency, damping ratio, peak time, settling time, rise time
and percentage overshoot
b. Find the analytical expression for the output response to a unit step input in
voltages
Steady State Error and
Stability Analysis
Steady State Error
• The steady state error is the value of error signal e(t) when t→ ∞
• The steady state error measures the accuracy of the signal
• The steady state performance of a stable system is generally judged
by its steady error to step, ramp and parabolic inputs
• In a closed loop system the error signal can be evaluated as
Steady State Error
Type number of a system
Static Error Constants
• The value of steady state error depends on the type number and input signal
• Type 0 system will have constant steady state error when the input is step or
positional signal
• Type 1 system will have constant steady state error when the input is ramp or
velocity signal
• Type 2 system will have constant steady state error when the input is parabolic or
acceleration signal
Ans:
The system is stable
All the 4 roots are lying on the left half of the s-plane
Case 2
• Using Routh criterion, determine the stability of the system
represented by the characteristic equation,
𝑠 6 + 2𝑠 5 + 8𝑠 4 + 12𝑠 3 + 20𝑠 2 + 16𝑠 + 16 = 0
Comment on the location of the roots of the characteristic equation
Ans:
The system is marginally stable
All the 4 roots are lying on the imaginary axis and 2 roots are lying on
left half of the s-plane
Case 3
• Using Routh criterion, determine the stability of the system
represented by the characteristic equation,
𝑠 5 + 𝑠 4 + 2𝑠 3 + 2𝑠 2 + 3𝑠 + 5 = 0
Comment on the location of the roots of the characteristic equation
Ans:
The system is unstable
All the 2 roots are lying on the right half of the s-plane and 3 roots are
lying on left half of the s-plane
Case 4
• Using Routh criterion, determine the stability of the system
represented by the characteristic equation,
9𝑠 5 − 20𝑠 4 + 10𝑠 3 − 𝑠 2 − 9𝑠 − 10 = 0
Comment on the location of the roots of the characteristic equation
Ans:
The system is unstable
All the 3 roots are lying on the right half of the s-plane and 2 roots are
lying on left half of the s-plane
Case Study 5
• The open loop transfer function of a unity feedback control system is given
by
𝐾
G s =
(𝑠 + 2)(𝑠 + 4)(𝑠 2 + 6𝑠 + 25)
By applying the routh criterion, discuss the stability of the closed loop system
as a function of K. Determine the value of K which will cause sustained
oscillations in the closed loop system. What are the corresponding oscillating
frequencies?
Ans:
The range of K value for stable system is 0<K<666.25
The frequency of oscillation is 4.06 rad/sec
Self Study
1. Determine the range of K for stability of unity feedback system
whose open loop transfer function is ,
𝐾
G s =
𝑠(𝑠+1)(𝑠+2)
2. Using Routh criterion, determine the stability of the system
represented by the characteristic equation,
𝑠 7 + 5𝑠 6 + 9𝑠 5 + 9𝑠 4 + 4𝑠 3 + 20𝑠 2 + 36𝑠 + 36 = 0
Determine the location of the roots in the s-plane
Introduction to PID control
Few commercial PID controllers
Control: The necessity and examples
Common experience
Cycle pedaling
Driving a two/four wheeler
Home
Room temperature and air conditioner
Pressure in a pressure cooker
Industry
Temperature of a furnace
Speed of a motor
Mass flow rate (gas/liquid)
A gadget
Read/write head of CD player or a hard disk
Temperature Control - Illustration
Water temperature will not increase as soon as the heater power is on nor it will
fall as soon as the heater power is off. Reason: Thermal inertia.
Simple On-Off control
Switch on power to the heater and monitor the temperature
Switch off the power once the temperature of the body exceeds the
set temp. Switch on when the temperature goes below set temp.
Repeat this process
Temperature
Set temp
Power
time!
Water temperature will not follow the heater, but
it will swing about the set value (goes above and below)
Useful, when precise control is not needed.
Commonly used in:
Iron press (box), refrigerator, air conditioner, kitchen oven, water heater...
Proportional Control
Sense/Measure the temperature of the body continuously
(Temperature sensors: Thermocouple, Diode thermometer,…)
Find, ∆T(t) the difference between the set and the actual temperature
Temperatures are measured in terms of voltages: ∆T (t) ∝ eR (t)
eR(t) is the error voltage and eR(t) will be zero, when ∆T(t) is zero.
Proportional control:
A voltage, VP(t) proportional to eR(t) is sent to the heater
VP (t) = K P eR (t)
eR (t ) = ∆T (= Tset − Tmeasured )
Kp is the proportional constant (gain)
Proportional Control
Set temperature
VP (t) = KPeR (t)
body temperature
eR (t) ∝ ∆T (t)
Input power
time!
time!
Send an additional voltage, VI (t) to meet the difference
How to determine VI (t) needed to compensate the difference?
Integrate the error voltage eR(t) from the start:
t
VI (t) = K I ∫ eR (τ )dτ
t0
t
Vout (t) = VP (t) + VI (t) = K P eR (t ) + K I ∫ eR (τ )dτ
t0
2. The Heater
VHTR (t) T(t)
(VHTR (t) = input voltage)
VR(s) = 1/s
s+5 1 1 s+1
T (s) = H(s)VR(s) = = -
s 2+ 2s+ 5 s s (s+1) 2+ 4)
Temp KP = KI = 1; KD = 2
Set temp
KP = KI = 1; KD = 0.5
KP = KI = 1; KD = 0
Input, unit step
Time
A quick analogy
P
The PID controller output is:
t eR(t) VPID (t)
deR +
K P eR (t) + K I ∫ eR (τ )dτ + K D I +
+
t0
dt
Rewrite the equation as D
d 2eR deR
KD + K + KI eR = f (t)
dt2 P dt Damped SHM: spring-mass
system on rough surface
Let eR = x; KD = m; KP = b and KI = k k
m
d 2x dx
m 2 + b + k x = g(t) Fr
dt dt
Current in an LCR circuit
Let eR = I; KD = L; KP = R and KI = 1/C
d2I dI ~ R C
L 2 +b + (1/C)I = h(t) L
dt dt
Sketch the root locus of the system and find the value of K so that the
damping ratio of the closed loop system is 0.5
K = 48
The value of K for damping ratio of 0.5 is 8.
Case Study 3
• A model is introduced to control the packet-drop probability in TCP/IP
router by using random early detection (RED) algorithm. Using the
figure below as a model, a specific router queue’s open-loop transfer
function is
𝐾(𝑠 + 9)
𝐺 𝑠 =
𝑆(𝑠 2 + 4𝑠 + 11)
Plot the root locus of the system and find the value of K.
The value of K is 8.8
Matlab Commands h=tf([2 5 1],[1 2 3]);
rlocus(h)
• Root Locus
Syntax
rlocus(sys)
rlocus(sys1,sys2,...)
[r,k] = rlocus(sys)
r = rlocus(sys,k)
• Plot the root locus of the
system
2𝑠 2 +5𝑠+1
H 𝑠 =
(𝑠2 +2𝑠+3)
Matlab Commands
• Time Response
Consider the closed loop response transfer function of the following
second order system
16
𝑀 𝑠 = 2
(𝑠 + 4𝑠 + 16)
Write a MATLAB program to find the rise time, peak time, maximum
peak overshoot and settling time from the unit step response of the
system
clc rise_time =
t=0:0.005:5; %set time vector
num_cof=[0 0 16]; %store the numerator coefficients as an array 0.6100
den_cof=[1 4 16]; %store the denominator coefficients as an array
[c,x,t]=step(num_cof,den_cof,t);
n=1; %initialize count as 1 peak_time =
while c(n)<1.001; %count the time index as long as c(t)<1
n=n+1; 0.9050
end;
rise_time=(n-1)*0.005 %rise time = (count-1)*time interval
[cmax,tp]=max(c); %determine maximum value of c(t)and max_overshoot =
corresponding time
peak_time=(tp-1)*0.005 %peak time = (tp-1)*time interval 0.1630
max_overshoot=cmax-1 %compute peak overshoot
n=1001; %initialize count as (5/0.005)+1=1001
while c(n)>0.95&c(n)<1.05; settling_time_5per_err =
n=n-1; % count time index between c(t)>0.95 & c(t)<1.05
end; 1.3200
settling_time_5per_err=(n-1)*0.005
n=1001; %initialize count as (5/0.005)+1=1001
while c(n)>0.98&c(n)<1.02; settling_time_2per_err =
n=n-1; % count time index between c(t)>0.95 & c(t)<1.05
end; 2.0150
settling_time_2per_err=(n-1)*0.005
>> sys=tf([0 0 16],[1 4 16]) rise_time =
sys = 0.6100
16
-------------- peak_time =
s^2 + 4 s + 16
0.9050
Continuous-time transfer function.