Professional Documents
Culture Documents
Lec 10
Lec 10
Lec 10
Faulty of Engineering
Mechatronics Engineering Dept.
Lec 10
reference
error control output
signal
signal signal signal
r(t) + Controller /
e(t) u(t) y(t)
Compensator Plant / System
Actuators
_ GC(s) G(s)
H(s)
Sensors
reference
output
signal
signal
r(t) + Digital
Plant/System y(t)
A/D Controller D/A Actuators
(Computer) G(s)
_
Microprocessor /
Microcontroller
H(s)
Sensor
➢ It is desired to maintain the level of a liquid in the tank at a desired setting point of level.
Controller
Regulation Control Problem Vs. Servo Control Problem
➢ Control problems can be classified into regulation Control problems and servo Control
problems.
➢ The objective of the regulation problems is to control (or reject) disturbances , while objective
of the servo problems (tracking problems) is to keep the output close to a given reference
trajectory, e.g., minimize the difference between the output and the reference trajectory.
➢ The main difference between regulation problems and servo problems is the existence of the
reference signal 𝑟(𝑡) , when 𝑟(𝑡) ≠ 0 this is a servo problem and when 𝑟 𝑡 = 0 this is a
regulation problem.
Common Classification of Controllers
2. Modern Controllers
u (t) = -K x (t)
ANFIS.
3- Computational Intelligence Controllers
Sometimes, the control element has only two position either it is fully closed or fully open (1 or
0) (energized or de energized). This control element does not operate at any intermediate
position, i.e., partly open or partly closed position. This type of controllers is known as on-off
➢ Microcontrollers
Classical Controllers
(PI – PD - PID)
PID Controller
➢ The basic idea of a PID controller is to choose the control law by considering the error e, change of error Δe and
𝑡
integral of error 0 𝑒 . 𝑑𝑡 :
𝑡
𝑑𝑒(𝑡)
𝑢𝑃𝐼𝐷 (𝑡) = 𝐾𝑃 . 𝑒(𝑡) + 𝐾𝐷 . + 𝐾𝐼 . න 𝑒 . 𝑑𝑡
𝑑𝑡 0
➢ A PID controller is used to obtain a better performance in terms of rise time, settling time, overshoot and steady-
state error.
❑ The proportional control (𝐾𝑃 𝐸(𝑆)) improves the rise time.
❑ The derivative control (𝐾𝐷 𝑆𝐸(𝑆)) improves the overshoot.
𝐾
❑ The integral control ( 𝑆𝐼 𝐸(𝑆)) eliminates the steady-state error.
PID Controller
➢ Note that you do not need to implement all three control terms (proportional, derivative, and
integral) into a single system, if not necessary. For example, if a PI controller gives a good
enough response, then you don't need to implement derivative controller to the system. Keep
KP
+
𝑹(𝑺) 𝑬(𝑺) + 𝑼𝑷𝑰𝑫 (𝑺) 𝒀(𝑺)
KD S Plant
𝒓(𝒕) 𝒆(𝒕) 𝒚(𝒕)
− +
𝑲𝑰
𝑺
PID Controller
𝑈𝑃𝐼𝐷 (𝑆) 1
= 𝐾𝑃 ( 1 + + 𝑇𝑑 𝑆)
𝐸(𝑆) 𝑇𝑖 𝑆
𝐾𝑃
❑ 𝐾𝐼 =
𝑇𝑖
❑ 𝐾𝐷 = 𝐾𝑃 𝑇𝑑
Where:
➢ The process of adjusting (or selecting suitable values) the controller parameters (𝐾𝑃 , 𝐾𝐷 and
𝐾𝐼 ) to achieve the desired system response is known as the tuning process.
𝑟
The parameters effects on the system response characteristics
𝑲𝑷 Small
change Degrade
𝑲𝑰 Large
decrease Degrade
𝑲𝑫 Small Small
change change Improve
Example
➢ The following unity feedback control system represents the flow of liquid to a unit step input:
Using MATLAB program, show the system response 𝑦 𝑡 and then add the following controllers to improve
its response (in the case of unit step input):
• PD controller (𝐾𝑃 = 99 , 𝐾𝐷 = 1 )
• PI controller (𝐾𝑃 = 90 , 𝐾𝐼 = 4 )
• PID controller (𝐾𝑃 = 144.88 , 𝐾𝐷 = 250.38 , 𝐾𝐼 = 5.65)
Also show the system responses after adding these controllers.
KP
+
𝑹(𝑺) 𝑬(𝑺) + 𝑼𝑷𝑫 (𝑺) 𝒀(𝑺)
KD S 0.036
36.942 𝑆 2 + 12.1568 𝑆 + 0.451
−
Plant
+
𝑹(𝑺) 𝑬(𝑺) + 𝑼𝑷𝑰 (𝑺) 0.036 𝒀(𝑺)
𝑲𝑰
𝑺 36.942 𝑆 2 + 12.1568 𝑆 + 0.451
−
Plant
PD
y(t)
1 2
r(t)
3
t
Solution
y(t)
1 2
r(t)
3
1) PID controller
2) PI controller
3) PD controller