Modelling and Control of Dynamic Systems PID Controllers Sven Laur - - PowerPoint PPT Presentation
Modelling and Control of Dynamic Systems PID Controllers Sven Laur - - PowerPoint PPT Presentation
Modelling and Control of Dynamic Systems PID Controllers Sven Laur University of Tartu Basic structure of a PID controller P System r [ k ] u [ k ] y [ k ] e [ k ] I + + g [ z ] D -1 PID controllers are unity feedback controllers
Basic structure of a PID controller
y[k] u[k] r[k] System ˆ g[z]
+
- 1
e[k]
+
P I D
PID controllers are unity feedback controllers with three components: ⊲ a proportional term P with an output up[k] = Kp · e[k]; ⊲ an integral term I with an output ui[k] = Ki ·
k
- i=1
ek; ⊲ a derivative term D with an output ud[k] = Kd · (e[k] − e[k − 1]).
1
PID controller is a linear controller
Note that all parts of the PID controllers are linear systems ⊲ The transfer function of the proportional part is g1[z] = Kp. ⊲ The transfer function of the integral part is g2[z] =
Ki z−1
⊲ The transfer function of the differential part is g3[z] = Kd(1−z)
z
As a result, we can represent PID controller in an RST form
y[k] u[k] System r[k] ˆ g[z]
1 R(z)
+
- 1
S(z) T(z)
2
Gentle Introduction
The basic assumption
In the following, we assume that the dependency between the control signal and the output signal is monotone throughout the entire operating regime. ⊲ Let Xop ⊆ Rn be the set of plausible states for the system. ⊲ Let Uop ⊆ R be the set of plausible inputs for the system. ⊲ Let yi[k + 1] denote the output corresponding to x[k] and ui[k] A system has a monotone response if for any x[k] ∈ Xop, u1, u2 ∈ Uop u1[k] ≤ u2[k] = ⇒ y1[k + 1] ≤ y2[k + 1] . If the output is differentiable then the condition can be rewritten as ∂y(k + 1, x, u) ∂u ≥ 0 for x ∈ Xop, u ∈ Uop .
3
Proportional controllers
If the system has monotone response then the error signal e[k] = r[k]−y[k] indicates in which direction the input signal should be changed. ⊲ If e[k] > 0 then we should increase the control signal. ⊲ If e[k] < 0 then we should decrease the control signal. Example
The original zero-input response Kp is too small to stabilize Kp is too big Kp creates a constant bias ˆ g[z] =
1 z−1.1
4
Drawbacks of proportional controllers
Proportional controller has too few degrees of freedom in the design. ⊲ Too large gain Kp creates oscillations ⊲ Too small gain Kp slows down the response and introduces bias.
! "! #!! #"! !$! !$" #$! #$" %$!
Kp = 1 Kp = 1.8
We need an additional term that would eliminate constant bias.
5
Integral correction term
For obvious reasons, the output of an integral term I = e[1] + · · · + e[k] is initially small and then continuously increases if the bias is not eliminated. Secondly, note that the integral term I cannot go to zero unless the error signal changes a sign—overshoot becomes unavoidable.
! "! #!! #"! !$! !$" #$! #$" %$!
Kp = 1 Kp = 1.8 Ki = 0.3 Ki = 0.3
As a result, the time needed to stabilise the output increases.
6
Anatomy of a PI response
! "! #! $! %! !"&! !'&! !&! !&(
!"#$#"%&#'()*('+*&'%,-"()*.#/$#','%0
! "! #! $! %! !'&( !'&! !!&( !&! !&(
1#'%"#)*0&-'()
Ki = 0.3 Kp = 1.0
7
Differential correction term
An integral correction term creates the necessary change in the control signal to removes the bias but it cannot detect changes in the error term.
! " #! #" $! !%! !%$ !%& !%' !%( #%!
!! " #! #" $! !%! !%$ !%& !%' !%( #%!
!P = 0.6 I = 14.9 P = 0.6 I = 14.9
As a result, an introduction to differential term can significantly improve the behaviour of the controller and reduce the stabilisation time.
8
The effect of differential correction
Sudden changes activate the differential correction term. If a PI controller already overshoots then setting Kd > 0 only increases the overshoot.
! "! #!! #"! !$! !$" #$! #$" %$! ! "! #!! #"! !$! !$" #$! #$" %$! ! "! #!! #"! !$! !$" #$! #$" %$! ! "! #!! #"! !$! !$" #$! #$" %$!
Kp = 1.0, Ki = 0.3, Kd = 0.4 Kp = 0.3, Ki = 0.3, Kd = 0.4 Kp = 1.8, Ki = 0.3, Kd = 0.05 Kp = 0.9, Ki = 0.3, Kd = 0.2
A positive differential correction works if a slow rising speed winds up the integral part and thus it must be discharged through oscillations.
9
Anatomy of an optimal PID response
! "! #! $! %! &!! &"! !'! !'( &'! &'(
The differential term must dominate Uncharging of the integral term
The relation between coefficients Kp and Ki determines the controllers behaviour when the output is near the reference signal. ⊲ They must be chosen so that the integral part is quickly discharged. The size of coefficients Kp and Kd determine the initial rise speed. ⊲ They must be chosen so that the integral term does not grow too big.
10
Methods for Parameter Tuning
Ziegler-Nichols closed-loop method
- 1. Set gains Ki = 0 and Kd = 0.
- 2. Gradually increase Kp until the system starts to continuously oscillate.
- 3. Let K∗
p be the corresponding gain and T ∗ the corresponding period.
- 4. Start fine-tuning with the initial parameters from the following table
Controller Type Kp Ki Kd P controller
K∗
p
2
– – PI controller
K∗
p
2.2 T ∗ 1.2
– PID controller
K∗
p
1.7 T ∗ 2 T ∗ 8
11
Other tuning methods
There are many other tuning methods for PID parameters. ⊲ Cohen-Coon method for processes with high inertia ⊲ Chien-Hrones-Reswick open-loop method. ⊲ Ziegler-Nichols open-loop method. A PID controller can be used as a starting point in further research.
- 1. Stabilise the system with an initial PID controller.
- 2. Find a linear model that provides the fit to the experimental data.
- 3. Compute the corresponding transfer function.
- 4. Design the corresponding linear controller.
- 5. If one is not satisfied then she can build a non-linear model and controller.
12