Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Proportional-Integral-Derivative Controller

Similar presentations


Presentation on theme: "The Proportional-Integral-Derivative Controller"β€” Presentation transcript:

1 The Proportional-Integral-Derivative Controller

2 Objectives Learners will be able to
Describe the different components of the PID controller (Mathematical activities) Explain the function of each component (research activity) Explain the function of the PID (Group discussion) Give examples of application systems of PID (targeted questioning)

3 PID diagram Goal is to have VSET = VOUT
Note that VERROR = VSET – VSENSOR Output Process uses VERROR from the PID controller to adjust Vout such that it is ~VSET The PID controller looks at the SetPoint (SP) and compares it with the actual value of the Process Variable (PV) i.e. what we want (desired output) and what we have got (actual output).

4 Application

5 How the PID Black Box Operates
The PV is subtracted from the SP to create the Error. The error is simply multiplied by either the P, the I, the D or the combination of two or all three as outlined below depending on which ones are turned on. Then the resulting π‘’π‘Ÿπ‘Ÿπ‘œπ‘Ÿ Γ—π‘π‘œπ‘›π‘‘π‘Ÿπ‘œπ‘™ π‘Žπ‘π‘‘π‘–π‘œπ‘›π‘  are added together and sent to the controller output. P – Sometimes used PI - Most often used PID – Sometimes used PD – rare as hen’s teeth but can be useful for controlling servomotors.

6 Derivatives It means the rate of change It’s mathematical formula is:
Change in y/change in x = slope

7 Derivatives… Consider the function f(x) = x2
We know f(x) = x2, and can therefore calculate f(x+Ξ”x): Start with:Β f(x+Ξ”x) = (x+Ξ”x)2 Expanding the RHS: (x + Ξ”x)2 = x2 + 2x Ξ”x + (Ξ”x)2 Therefore f(x+Ξ”x) = x2 + 2x Ξ”x + (Ξ”x)2

8 Derivatives… Δ𝑦/Ξ”π‘₯ = (f(x+Ξ”x) βˆ’ f(x)) / Ξ”x
= (x2 + 2x Ξ”x + (Ξ”x)2 βˆ’ x2) / Ξ”x Simplify (x2 and βˆ’x2 cancel): 2x Ξ”x + (Ξ”x)2 / Ξ”x Simplify more (divide through by Ξ”x):Β  = 2x + Ξ”x And then as Ξ”x tends towards 0, we get := 2x Result: the derivative of x2 is 2x, written mathematically as: 𝑑 π‘₯ 2 𝑑π‘₯ =2π‘₯

9 Math activity: 20 mins Work out the derivative of: 𝑓 π‘₯ =4π‘₯(π‘₯βˆ’1)

10 Integral The integral of a signal is the sum of all the instantaneous values that the signal has been, from whenever you started counting until you stop counting.

11 Integrals… The green line is your temperature.
The red circles are where your control system has sampled the temperature The blue area is the integral of the temperature signal. It is the sum of the 5 temperature values over the time period that you are interested in. In numerical terms it is the sum of the areas of each of the blue rectangles: (13 x 1)+(14x1)+(13x1)+(12x1)+(11x1) = 63 Β°C s The curious units (degrees Celsius x seconds) are because we have to multiply a temperature by time – but the units aren’t important. So the integral turns out to be the area under the curve. Note that in real world systems, we actually get an approximation to the area under the curve, which from the diagram’s perspective gets better, the higher the sample rate.

12 Integrals… The derivative of x2+4 is 2x, and the derivative of x2+99 is also 2x, and so on, because the derivative of a constant is zero. So when we reverse the operation (to find the integral) we only know 2x, but there could have been a constant of any value. So we wrap up the idea by just writing + C at the end.

13 Proportional In P-mode, the controller simply multiplies the Error by the Proportional Gain (Kp) to get the controller output. Kp is the setting that the user tunes to get the desired performance from a β€œP only” controller.

14 PID controller Three-term control:
Proportional term (P) depends proportionally on the present error Integral term (I) depending on the accumulation of past errors Derivative term (D) is a prediction ofΒ futureΒ errors, based on current rate of change

15 PID Controller Given the error e(t), the control command, Q(t), used to adjust the process is a weighted sum of P, I, and D: where KP, KI, KD are positive constants referred to as proportional gain, integral gain and derivative gain respectively

16 Variations: Proportional control
In proportional control, the command Q(t) used to adjust the process is: where Qd(t) is a desired control command, or bias/reset and KP is a positive constant

17 Variations: Integral control (PI)
In integral (PI) control, the command Q(t) used to adjust the process is: where KP and KI are positive constants

18 Variations: Differential control (PD)
In differential (PD) control, the command Q(t) used to adjust the process is: where KP and KD are positive constants

19 P + I It will not work as expected except when the user knows exactly how much Integral action to apply

20 Now your turn: 20 mins Explain the following concept The two step mode
Proportional control mode Integral control mode The derivative control mode

21 Answers The two-step mode: The controller is just a switch which is activated by the error signal and supplies just an on-off correcting signal. Example of such mode is the bimetallic thermostat. The proportional mode (P): This produces a control action that is proportional to the error. The correcting signal thus becomes bigger the bigger the error. Therefore, the error is reduced the amount of correction is reduced and the correcting process slows down. A summing operational amplifier with an inverter can be used as a proportional controller. The derivative mode: This produces a control action that is proportional to the rate at which the error is changing. When there is a sudden change in the error signal the controller gives a large correcting signal. When there is a gradual change only a small correcting signal is produced. An operational amplifier connected as a differentiator circuit followed by another operational amplifier connected as an inverter make an electronic derivative controller circuit.

22 Answers The integral mode (I): This produces a control action that is proportional to the integral of the error with time. Therefore, a constant error signal will produce an increasing correcting signal. The correction continues to increase as long as the error persists. Combination of modes: Proportional plus derivative modes (PD), proportional plus integral modes (PI), proportional plus integral plus derivative modes (PID). The term three-term controller is used for PID control. The controller may achieve these modes by means of pneumatic circuits, analog electronics involving operational amplifiers or by the programming of a microprocessor or computer.

23 Adjusting the Integral Action
The way to adjust how much Integral Action you have is by adjusting a term called β€œminutes per repeat”. It is a measure of how long it will take for the Integral Action to match the Proportional Action. In other words, if the output of the proportional box on the diagram above is 20%, the repeat time is the time it will take for the output of the Integral box to get to 20% too. And the important point to note is that the β€œbigger” integral action, the quicker it will get this 20% value. That is, it will take fewer minutes to get there, so the β€œminutes per repeat” value will be smaller. In other words the smaller the β€œminutes per repeat” is the bigger the integral action. To make things a bit more intuitive, a lot of controllers use an alternative unit of β€œrepeats per minute” which is obviously the inverse of β€œminutes per repeat”. The nice thing about β€œrepeats per minute” is that the bigger it is - the bigger the resulting Integral action is.

24 Predicting the future with the derivatives
Engineers are always looking to tweak performance by adding the Derivative Action. The Derivative action can allow the engineer to have bigger P and I gains and still keep the loop stable, producing a faster response and better loop performance. Derivative action improves the controller action because it predicts what is yet to happen by projecting the current rate of change into the future. This means that it is not using the current measured value, but a future measured value. The units used for derivative action describe how far into the future you want to look. i.e. If derivative action is 20 seconds, the derivative term will project the current rate of change 20 seconds into the future. The big problem with D control is that if you have noise on your signal (which looks like a bunch of spikes with steep sides) this confuses the hell out of the algorithm. It looks at the slope of the noise-spike and thinks: As it thinks that the process is changing quickly, it will accelerate the D Action And the control output jumps all over the place, messing up the control. The solution is to try and filter the noise out, but the rule of thumb is unless PI control is really slow, D should not be activated.

25 Conclusion/summary Group discussion


Download ppt "The Proportional-Integral-Derivative Controller"

Similar presentations


Ads by Google