Position Form & Velocity Form of PID Controller
Position Form & Velocity Form of PID Controller
Digital Control
Summary # 8: Proportional, Integral and Derivative: Tuning methods
[ ]
PD control T
∆u = Kp e(k) − e(k − 1) + e(k) (10)
τI
PD control has two terms, a proportional term and a [τ ]
D
derivative term. This controller is also called rate action, + (e(k) − 2e(k − 1) + e(k − 2)) (11)
T
Digital Controls, spring 2015 Proportional, Integral and Derivative: Tuning methods
− −
It is not possible to achieve all these goals simultaneously
+
0.5 + because of the conflicts and trade offs that may exist.
• Computer simulations
0.5 + • Online tuning
Methods 1-4 are based on an approximation of the plant
model and method 5 (online tuning) is purely experimental.
0
0 1 2 3 4 5 6 7 8 Methods based on the plant model allow for initial setting
Time (seconds)
of the controller. Computer simulation (Matlab and Labview)
allow for comparison between the different alternatives.
Fig. 2. Illustration of integral wind up. Top: sign of the error alternates,
positive and negative values cancel out. Bottom: error sign is always
positive, saturation is more likely to happen
Model based design methods
Two methods are discussed here: the direct synthesis
method and the internal model control.
It is possible to obtain an explicit formula for the controller
as follows Direct synthesis method
[ ] The controller is designed based on the desired closed
T
u(k) = u(k − 1) + Kp e(k) − e(k − 1) + e(k) (12) loop transfer function. The method can be used to design
τI
[τ ] but not limited to PID controllers. The closed loop transfer
D
+Kp (e(k) − 2e(k − 1) + e(k − 2)) (13) function is given by
T
Y (s) Gc (s)G(s)
= (14)
R(s) 1 + Gc (s)G(s)
Problems with PID controllers: Derivative kick and integral
windup where
• Gc (s) is the controller transfer function
A sudden change in the error that usually results from • G(s) is the open loop transfer function.
the change in the set point will cause the derivative part to
Rearranging the terms and solving for the controller transfer
become very large. This spike is undesirable. One way to
function yields the following equation
solve this issue is by using −dy de
dt instead of dt . Integral wind
up (or reset wind up) is another problem that happens when Y (s)
1 R(s)
the integral output becomes large and the controller output Gc (s) = (15)
becomes saturated. The build up of the integral terms is G(s) 1 − Y (s)
R(s)
called integral windup. Consider the time response of figure In order to solve for the controller’s transfer function we need
2. In figure 2–top, the integral term initially increases but to know:
begins decreasing again when the error changes sign. The
• the desired closed loop transfer function
positive and negative terms cancel out and the controller
• the open loop transfer function.
moves away from the saturation point. In figure 2–bottom,
the integral term keeps increasing and this may result in in We can define a desired closed loop transfer function based
integral wind up. The PID velocity form is called anti-integral on the desired characteristics of the system. We call this
wind up because the summation is eliminated. function ( )
Y (s)
(16)
R(s) d
Performance criteria for closed loop systems Assuming we can determine an approximation G̃ of the open
The performance criteria are as follows loop transfer function, the controller equation becomes
( )
• The closed loop system is stable Y (s)
1 R(s)
• Steady state error is eliminated Gc (s) = ( d)
(17)
• Good transient response G̃(s) 1 − Y (s)
R(s)
d
2
Digital Controls, spring 2015 Proportional, Integral and Derivative: Tuning methods
Amplitude
First order system
1
In this case the desired closed loop system is a simple τc = 10
first order system
( ) 0.5
Y (s) 1
= (19)
R(s) d τc s + 1 τc = 3
where τc is the closed loop time constant. The controller
equation is reduced to the following equation 0
0 10 20 30 40 50 60 70
Time (seconds)
1 1
Gc = (20)
G̃(s) τc s Fig. 3. Closed loop response for different values of the time constant
If the process has a delay, we can use the closed loop
transfer function with delay
we get
( ) −θs
Y (s) e τ
= (21) Kp = (27)
R(s) d τc s + 1 K(τc + θ)
where θ is a time delay. The equation for the controller is τI = τ (28)
1 e−θs
Gc = (22) C. Second order approximation
G̃(s) τc s + 1 + e−θs
The transfer function is approximated by a second order
Assuming a small delay, the delay can be approximated as
transfer function as follows
e−θs = 1 − θs (23)
Ke−θs
and the controller as
G̃(s) = (29)
(τ1 s + 1)(τ2 s + 1)
1 e−θs By substituting in the controller equation we get
Gc = (24)
G̃(s) (τc + θ)s τ1 + τ2
Kp = (30)
Clearly, equations (20) and (24) depend on the approxima- K(τc + θ)
tion of the open loop system. This discussed below. τI = τ1 + τ2 (31)
τ1 τ2
τD = (32)
A. Open loop transfer function approximation τ1 + τ2
Several methods exist to approximate the open loop where
1
transfer function such as the step response and the fre- Gc = Kp (1 + + τD s) (33)
τI s
quency response. Here we consider first and second order
approximations with delay.
Example
Consider the following approximation of the open loop
B. First order approximation
transfer function
The open loop system is approximated by a first order 2e−1s
transfer function as follows G̃(s) = (34)
(10s + 1)(5s + 1)
Ke−θs Design a PID controller when τc = 1s, 3s, 10s and simulate
G̃(s) = (25)
(τ s + 1) the system behavior.
where τ is the open loop time constant. Using equation (24) • τc = 1s ⇒ Kp = 3.7500, τI = 15; τD = 3.3333
and knowing that the controller’s equation is • τc = 3s ⇒ Kp = 1.8750, τI = 15; τD = 3.3333
• τc = 10s ⇒ Kp = 0.68, τI = 15; τD = 3.3333
1
Gc = Kp (1 + ) (26) A simulation is shown in shown in figure 3
τI s
3
Digital Controls, spring 2015 Proportional, Integral and Derivative: Tuning methods
Fig. 4. Standard and IMC models Fig. 5. Illustration of the continuous cycling method
4
Digital Controls, spring 2015 Proportional, Integral and Derivative: Tuning methods
Step Response
System: T3 System: T3
2.5 Time (seconds): 2.07 Time (seconds): 5.75
Amplitude: 2.72 Amplitude: 2.71
2
Amplitude
1.5
0.5
0
0 2 4 6 8 10
Time (seconds)
Fig. 6. Sustained oscilations for teh continuous cycling method Fig. 7. Top: Astrom and Hagglund tuning method and bottom: step test
method
−0.5
Example
−1
Design a PID control for the system whose response 0 2 4 6 8 10 12
is shown in figure 6. The ultimate gain for the sustained
oscillations is Kp = 6.
It is clear from the oscillations that Pu = 3.68s. Therefore Fig. 8. Top: on–off controller output signal and bottom: sustained oscilla-
tions response
5
Digital Controls, spring 2015 Proportional, Integral and Derivative: Tuning methods
Step Response
Fig. 9. Experiment setting and step response reaction curve
4
Step test method
This is another method proposed by Ziegler and Nichols in 3
1942. This method is also called the plant reaction curve or
Ziegler and Nichols open loop method. After the system has
2
Amplitude
Example
Consider the reaction curve shown in figure 10. The goal
is derive the PID control parameters. From the graph we
have: K = 3, θ = 2, τzn = 1, from which we get
Kp = 0.2 (52)
τI = 4 (53)
τD = 1 (54)