Automatic Control of Mechanical
Systems
Dr. Omar Mehrez
(PhD) Assistant Professor,
Mechanical Power Engineering Department,
Faculty of Engineering, Tanta University
1
- About the Course -
❑ Introduction to Control Engineering
❑ System Modeling
❑ Time Domain Analysis
❑ Closed-Loop Control Systems
❑ Classical Design in the S-Plane
References:
Burns, R. S. “Advanced Control Engineering”, UK: Butterworth-Heinemann, 2001 (Main).
Ogata, K. “Modern Control Engineering”, US: PEARSON, 2010.
2
Closed-Loop Control Systems
❑ Closed-Loop Transfer Function
❑ Block Diagram Reduction
❑ Controllers for Closed-Loop Systems
❑ Case Study Examples
3
Introduction
The Generalized Control Problem (1/2)
The control action 𝑢(𝑡) should achieve:
• Controlled output 𝑐(𝑡) equals the reference input 𝑟 𝑡 , irrespective of any
disturbance input
• Transient period kept as small as possible
• Steady-state errors are minimized (or ideally eliminated)
Error Control Controlled
Signal E(s) Signal U(s) input
Reference + Controlled
Input R(s) Controller Actuator Plant Output C(s)
-
Sensor 4
Introduction
The Generalized Control Problem (2/2)
Closed-loop controllers are classified according to how the control unit react to an
error signal and supply an output for correcting elements.
Classification according to the mode “technique”:
▪ Proportional Controller (P-controller)
▪ Proportional-plus-Integral Controller (PI-controller)
▪ Proportional-plus-Derivative Controller (PD-controller)
▪ Proportional-plus-Integral-plus-Derivative Controller (PID-controller)
Classification according to the type “hardware”:
Error Control
▪ Mechanical Signal U(s)
Signal E(s)
▪ Hydraulic / Pneumatic Controller
▪ Electronic (e.g., Operational Amplifier)
▪ Computer control (e.g., Microcontroller) 5
Controllers for Closed-Loop Systems
▪ Introduction
▪ Types of Closed-loop Controllers
I. P-controller
II. PI-controller
III. PD-controller
IV. PID-controller
▪ Practical Examples
6
Proportional Controller (P-contr.)
Definition
With the proportional mode, the size of the controller output u(t) is proportional to
the size of the error e(t):
the bigger the error, the bigger the output from the controller.
𝑢 𝑡 = 𝐾1 𝑒(𝑡) 𝐾1 is the proportional gain u(t)
Saturation
limit
Taking Laplace transform:
𝑈 𝑠 = 𝐾1 𝐸(𝑠)
e(t)
P-controller transfer fn. G(s):
Proportional
E(s) U(s)
𝑈 𝑠 band
𝐺 𝑠 = = 𝐾1 𝐾1
𝐸(𝑠)
7
Proportional Controller (P-contr.)
Effect (1/2)
- Consider a 1st order system (with unity steady-state gain and time const 𝑇)
- The system is controlled by P-controller of proportional gain 𝐾1
- Consider the sensor has a unity transfer fn. (𝐻 𝑠 = 1)
- The reference input is a unit step (𝑟 𝑡 = 1, 𝑅 𝑠 = 1Τ𝑠)
𝐺 𝑠
The closed-loop transfer fn.:
𝐶 𝑠 𝐺 𝑠
= E(s) U(s)
𝑅(𝑠) 1 + 𝐺 𝑠 𝐻(𝑠) + 1
R(s) 𝐾1 C(s)
= 1 Τ𝑠 - 𝑇𝑆 + 1
𝐾1
𝐾1
= 𝑇𝑠 + 1 =
𝐾1 𝑇𝑠 + 1 + 𝐾1
1 + 𝑇𝑠 + 1 𝐻 𝑠 =1
𝐶 𝑠 𝐾1 Unity feedback gain system
=
𝑅(𝑠) 𝑇𝑠 + (1 + 𝐾1 ) 8
Proportional Controller (P-contr.)
Effect (2/2) No change in 𝐾1 Closed-loop
system order 𝐾𝑐 =
𝐾1 1 + 𝐾1 steady-state gain
𝐶 𝑠 𝐾1 1 + 𝐾1 𝐾𝑐
= = =
𝑅(𝑠) 𝑇𝑠 + (1 + 𝐾1 ) 𝑇
𝑠 + 1 𝑇𝑐 𝑠 + 1 𝑇𝑐 =
𝑇 Closed-loop
1 + 𝐾1 1 + 𝐾1 time constant
The system time response at the steady state 𝑐 𝑡 → ∞ (using Laplace final theorem):
𝐾𝑐 𝐾𝑐 1 𝐾1
𝑐 𝑡 → ∞ = lim 𝑐 𝑡 = lim 𝑠𝐶 𝑠 = lim 𝑠 𝑅(𝑠) = lim 𝑠 = 𝐾𝑐 =
𝑡→∞ 𝑠→0 𝑠→0 𝑇𝑐 𝑠 + 1 𝑠→0 𝑇𝑐 𝑠 + 1 𝑠 1 + 𝐾1
The steady-state error 𝑒𝑠𝑠 : c(t) 𝑐(𝑡) with different 𝐾1
𝐾1 1
𝑒𝑠𝑠 =𝑟 𝑡 −𝑐 𝑡 →∞ =1− = r(t)=1
1 + 𝐾1 1 + 𝐾1
Effect of increasing the P-controller gain 𝐾1 : 𝐾1 increase
𝑒𝑠𝑠
▪ decreases the steady state error 𝑒𝑠𝑠
t
▪ decreases the closed-loop time const. 𝑇𝑐 → speeds up the system response
▪ extreme increase of 𝐾1 leads to system instability 9
Outlines
▪ Introduction
▪ Types of Closed-loop Controllers
I. P-controller
II. PI-controller
III. PD-controller
IV. PID-controller
▪ Practical Examples
▪ Case Study Examples
10
Proportional-plus-Integral Controller (PI-contr.)
Definition
The proportional-plus-integral mode of control is one where the control output u(t) is
composing of two parts:
▪ the proportional one (u(t) proportional to the error signal e(t)),
𝑡
▪ the integral one (u(t) is proportional to the error integral 0 𝑒 𝑡 𝑑𝑡)
𝑡
e(t)
𝑢 𝑡 = 𝐾1 𝑒 𝑡 + න 𝐾2 𝑒 𝑡 𝑑𝑡 𝐾2 is the integral gain
0
t
Taking Laplace transform:
u(t)
𝐸 𝑠 (integral
𝑈 𝑠 = 𝐾1 𝐸 𝑠 + 𝐾2
𝑠 part)
t
1 𝐾
𝑈 𝑠 = 𝐾1 1 + 𝐸 𝑠 𝑇𝑖 = 𝐾1 integral time
𝑇𝑖 𝑠 2 u(t)
(prop.
part)
t
PI-controller transfer fn. G(s): u(t)
(total)
𝑈 𝑠 1 E(s)
1 U(s)
𝐺 𝑠 = = 𝐾1 1 + 𝐾1 1+
𝑇𝑖 𝑠
𝐸(𝑠) 𝑇𝑖 𝑠 t
Proportional-plus-Integral Controller (PI-contr.)
Effect (1/2)
Consider the previous 1st order system with PI-controller
The closed-loop transfer fn.: E(s) U(s)
R(s) + 𝑇𝑖 𝑠 + 1 1
= 1 Τ𝑠 𝐾1 C(s)
𝐶 𝑠 𝐺 𝑠 - 𝑇𝑖 𝑠 𝑇𝑠 + 1
=
𝑅(𝑠) 1 + 𝐺 𝑠 𝐻(𝑠)
𝑇𝑖 𝑠 + 1 1
𝑐(𝑠) 𝐾1 𝑇𝑖 𝑠 𝑇𝑠 + 1 𝐾1 𝑇𝑖 𝑠 + 1
= =
𝑅(𝑠) 1 + 𝐾 𝑇𝑖 𝑠 + 1 1 𝑇𝑖 𝑠 𝑇𝑠 + 1 + 𝐾1 𝑇𝑖 𝑠 + 1
1 𝑇𝑖 𝑠 𝑇𝑠 + 1
𝐾1 𝑇𝑖 𝑠 + 1
= Increased system order
𝑇𝑖 𝑇𝑠 2 + 𝑇𝑖 𝐾1 + 1 𝑠 + 𝐾1 (2nd order instead of 1st)
12
Proportional-plus-Integral Controller (PI-contr.)
Effect (2/2)
The system time response at the steady state 𝑐 𝑡 → ∞ :
𝐾1 𝑇𝑖 𝑠 + 1
𝑐 𝑡 → ∞ = lim 𝑠𝐶 𝑠 = lim 𝑠 𝑅(𝑠)
𝑠→0 𝑠→0 𝑇𝑖 𝑇𝑠 2 + 𝑇𝑖 𝐾1 + 1 𝑠 + 𝐾1
𝐾1 𝑇𝑖 𝑠 + 1 1
= lim 𝑠 =1
𝑠→0 𝑇𝑖 𝑇𝑠 2 + 𝑇𝑖 𝐾1 + 1 𝑠 + 𝐾1 𝑠
The steady-state error 𝑒𝑠𝑠 :
𝑒𝑠𝑠 = 𝑟 𝑡 − 𝑐 𝑡 → ∞ = 1 − 1 = 0
c(t)
Effect of increasing the integral gain 𝐾2 :
𝐾2 increase
▪ eliminates the steady state error 𝑒𝑠𝑠 =0 r(t)=1
𝑒𝑠𝑠 = 0
▪ increases the system order
▪ increases the oscillations in the system response
t
13
Outlines
▪ Introduction
▪ Types of Closed-loop Controllers
I. P-controller
II. PI-controller
III. PD-controller
IV. PID-controller
▪ Practical Examples
▪ Case Study Examples
14
Proportional-plus-Derivative Contr. (PD-contr.)
Definition
The proportional-plus-derivative mode of control is one where the control output u(t) is
composing of two parts:
▪ the proportional one (u(t) proportional to the error signal e(t)),
▪ the derivative one(u(t) is proportional to the rate of change of the error 𝑑𝑒Τ𝑑𝑡)
𝑑𝑒 𝑡 e(t)
𝑢 𝑡 = 𝐾1 𝑒 𝑡 + 𝐾3 𝐾3 is the derivative gain
𝑑𝑡
t
Taking Laplace transform: u(t)
(derivative
𝑈 𝑠 = 𝐾1 𝐸 𝑠 + 𝐾3 𝑠𝐸 𝑠 part)
t
𝐾3
𝑈 𝑠 = 𝐾1 1 + 𝑇𝑑 𝑠 𝐸 𝑠 𝑇𝑑 = derivative time
𝐾1 u(t)
(prop.
part)
t
PI-controller transfer fn. G(s):
u(t)
𝑈 𝑠 E(s) U(s) (total)
𝐺 𝑠 = = 𝐾1 1 + 𝑇𝑑 𝑠 𝐾1 1 + 𝑇𝑑 𝑠
𝐸(𝑠) t
Proportional-plus-Derivative Contr. (PD-contr.)
Effect (1/2)
- Consider an inertia load system (i.e., a system with zero damping ζ = 0)
- The system is controlled firstly by a P-controller of proportional gain 𝐾1
- Then, the system is controlled by a PD-controller
With P-controller E(s) U(s)
+ 1
R(s) 𝐾1 C(s)
The closed-loop transfer fn.: = 1Τ 𝑠 - 𝐽𝑠 2
𝐾1
𝐶 𝑠 𝐽𝑠 2 𝐾1
= =
𝑅(𝑠) 1 + 𝐾1 𝐽𝑠 2 + 𝐾1 c(t)
𝐽𝑠 2 System damping ζ = 0
Compared to standard form of
r(t)=1
transfer fn. 2nd order system.:
𝐾𝜔𝑛2 Oscillatory response
𝐺(𝑠) = 2 t
𝑠 + 2𝜔𝑛 ζ𝑠 + 𝜔𝑛2 16
Proportional-plus-Derivative Contr. (PD-contr.)
Effect (2/2) E(s) U(s)
+ 1
R(s) 𝐾1 1 + 𝑇𝑑 𝑠 C(s)
= 1Τ𝑠 - 𝐽𝑠 2
With PD-controller
The closed-loop transfer fn.:
𝐾1 1 + 𝑇𝑑 𝑠 Comparing to:
𝐶 𝑠 𝐽𝑠 2 𝐾1 1 + 𝑇𝑑 𝑠 𝐾𝜔𝑛2
= = 2 𝐺(𝑠) = 2
𝑅(𝑠) 𝐾1 1 + 𝑇𝑑 𝑠 𝐽𝑠 + 𝐾1 𝑇𝑑 𝑠 + 𝐾1 𝑠 + 2𝜔 ζ𝑠 + 𝜔 2
1+ 𝑛 𝑛
𝐽𝑠 2
System damping ζ ≠ 0
𝑃-controller
Effect of increasing the derivative gain 𝐾3 : c(t)
𝑃𝐷-controller
▪ decreases the system overshoot (has a damping
effect)
r(t)=1
▪ Speeds up the system response (predicts the error
behavior)
t
▪ Sensitive to noisy signals 17
Outlines
▪ Introduction
▪ Types of Closed-loop Controllers
I. P-controller
II. PI-controller
III. PD-controller
IV. PID-controller
▪ Practical Examples
▪ Case Study Examples
18
Proportional-plus-Integral-plus-Derivative Contr. (PID-contr.)
Definition (2/2)
The proportional-plus-integral-plus-derivative mode of control is one where the control
output u(t) is composing of three parts:
▪ the proportional one
▪ the integral one
▪ the derivative one
𝑡 𝑑𝑒 𝑡
𝑢 𝑡 = 𝐾1 𝑒 𝑡 + න 𝐾2 𝑒 𝑡 𝑑𝑡 + 𝐾3
0 𝑑𝑡
Taking Laplace transform:
𝐸 𝑠 1
𝑈 𝑠 = 𝐾1 𝐸 𝑠 + 𝐾2 + 𝐾3 𝑠𝐸 𝑠 = 𝐾1 1 + + 𝑇𝑑 𝑠 𝐸 𝑠
𝑠 𝑇𝑖 𝑠
PID-controller transfer fn. G(s):
E(s)
𝑈 𝑠 1 1 U(s)
𝐺 𝑠 = = 𝐾1 1 + + 𝑇𝑑 𝑠 𝐾1 1+ + 𝑇𝑑 𝑠
𝐸(𝑠) 𝑇𝑖 𝑠 𝑇𝑖 𝑠
19
Proportional-plus-Integral-plus-Derivative Contr. (PID-contr.)
Effect of PID Gains on the Step Response (1/2)
overshoot
Steady-state error
Settling time
20
Proportional-plus-Integral-plus-Derivative Contr. (PID-contr.)
Effect of PID Gains on the Step Response (2/2)
Percentage Steady-State
PID Gains Settling Time
Overshoot Error
decrease
Increasing 𝐊 𝟏
increases (minimal decreases
(Proportional gain)
impact)
Increasing 𝐊 𝟐 zero steady-state
increases increases
(Integral gain) error
Increasing 𝐊 𝟑
decreases decreases no impact
(Derivative gain)
21
Proportional-plus-Integral-plus-Derivative Contr. (PID-contr.)
Effect of PID Gains on the Step Response (2/2)
22
Outlines
▪ Introduction
▪ Types of Closed-loop Controllers
I. P-controller
II. PI-controller
III. PD-controller
IV. PID-controller
▪ Practical Examples
▪ Case Study Examples
23
Practical Examples
Hydraulic Servomotor
Ref.: Modern Control Engineering, Ogata, 5th edition, page 130 “Hydraulic Integral Controller”
The mass flow rate q across the valve equals the mass
flow rate entering the power cylinder.
𝑑𝑦 𝑡
𝑚ሶ = 𝑐1 𝑥 𝑡 = 𝐴𝜌
𝑑𝑡
𝑐1 𝑋 𝑠 = 𝐴𝜌𝑠𝑌 𝑠
𝑌 𝑠 𝑐1 𝑐
= =
𝑋 𝑠 𝐴𝜌𝑠 𝑠
Hydraulic servomotor works in this
X(s) 𝑐 Y(s)
𝑠
case like an integral controller
24
Practical Examples
Hydraulic Servomotor
Hydraulic servomotor could work as a proportional controller if a floating link is added
𝑏 𝑐
𝑌 𝑠 𝑏𝑠
= 𝑎+𝑎 𝑐
𝐸 𝑠 1+
𝑎+𝑏𝑠
under the normal operating conditions:
𝑎 𝑐 𝑌 𝑠 𝑏
≫1 = = 𝐾1 𝐾1 : Proportional gain
𝑎+𝑏𝑠 𝐸 𝑠 𝑎
25
Outlines
▪ Introduction
▪ Types of Closed-loop Controllers
I. P-controller
II. PI-controller
III. PD-controller
IV. PID-controller
▪ Practical Examples
▪ Case Study Examples
28
Case Study Examples
Liquid-Level Control System Example Page 85
Required:
Given:
29
Case Study Examples
Liquid-Level Control System
Step-1: draw the block diagram and obtain the transfer fn. for each component
Error Control Input flow
signal e(t) signal u(t) rate v1(t)
Desired head + Actual head
Control
PI-Controller tank ha(t)
hd(t) valve
-
Pressure transducer
𝑑ℎ𝑎
Tank 𝑣1 𝑡 − 𝑣2 𝑡 = 𝐴 ℎa 𝑡 = 𝑅𝑓 𝑣2 𝑡
𝑑𝑡
𝑑ℎ𝑎 𝐻a 𝑅f
ℎa 𝑡 + 𝐴𝑅f = 𝑅f 𝑣1 𝑡 𝑠 =
𝑑𝑡 𝑉1 1 + 𝐴𝑅f 𝑆
30
Case Study Examples
Liquid-Level Control System
Step-1: draw the block diagram and obtain the transfer fn. for each component
Pressure Transducer
𝐻m
ℎm 𝑡 = 𝐻1 ℎa 𝑡 𝑠 = 𝐻1
𝐻a
PI-Controller
𝑡 𝑈 𝑠 1
𝑢 𝑡 = 𝐾1 𝑒 𝑡 + න 𝐾2 𝑒 𝑡 𝑑𝑡 = 𝐾1 1 +
0 𝐸(𝑠) 𝑇𝑖 𝑠
Control Valve
𝑉1 𝑠
𝑣1 𝑡 = 𝐾v 𝑢(𝑡) = 𝐾v
𝑈(𝑠)
31
Case Study Examples
Liquid-Level Control System
Step-2: obtain the closed-loop transfer fn. of the system and putting it in the standard form
Case Study Examples
Liquid-Level Control System
Step-3: comparing the resultant characteristic eqn. with the standard one of the 2nd order system
𝑠 2 2ζ
+ 𝑠+1=0
𝜔𝑛2 𝜔𝑛
1 2ζ
= =
𝜔𝑛2 𝜔𝑛
Summary
▪ Recognize the different types of closed-loop controllers
▪ Recognize the effect of different closed-loop gains on the system response
▪ Make sense of experimental implementation for each type
34
Requirements of the project:
1- A power point presentation includes (not more than 10slides):
▪ significance of the project
▪ block diagram for the whole system
▪ hardware components used
▪ electrical wiring diagram
▪ flow chart of the developed code
▪ MATLAB simulation (if exist)
2- Operation of the project upon the due date (Oral/Practical Exam)
3- Upon the due date: hand over a soft copy of the project material includes:
▪ the ppt file
▪ the developed code
▪ demo video of the project 35
THANK YOU
36