Topic 2 Notes - Pid Controller Tuning
Topic 2 Notes - Pid Controller Tuning
This is a simple animation of a process trying to reach the desired setpoint, the blue line is the process for
example a tank level.
Hyperlink Image
When the setpoint is changed the valve opens, the level then increases; how fast the system responds
depends on the Proportional Gain (𝑲𝒑 ).
When there is only proportional control, there may be an offset, when 𝑲𝒑 is changed there is an offset
as well.
When the Integral (𝑲𝒊 ) is increased it brings the process to the setpoint but there are oscillations.
Derivative action (𝑲𝒅 ) can be used to move the system or to make the system much stable and less
oscillatory
Tuning is done to optimize the system, so that the PID controller performs correctly whether be it for
setpoint tracking or disturbance rejection systems.
Page | 1
PID CONTROLLER TUNING
LOAD AND NOISE DISTURBANCES
➢ A system with a lot of setpoint changes i.e in cascade control, the secondary controller changes according
to an input coming in from the primary controller where the setpoint is oscillating or changing all the
time, then that controller is tuned for setpoint tracking.
Setpoint
▪ Setpoint filter prevents excessive junks in the final control element when there is a sudden increase or
sudden decrease on the setpoint.
▪ The filter smooth out the setpoint so that the controller gives abrupt output when the process is
controlled.
▪ If the setpoint is changing the SP filter can be enabled on the controller or can be left out depending on
nature of the setpoint change, whether the abrupt change is causing problems with final control element.
▪ When the FCE is a valve and there is abrupt setpoint changes the valve will swing from a fully closed
position to a fully open position and vice versa; and that can be applied when the valve instead of opening
abruptly viciously from 0 to 100 percent it does it in a smooth way.
Load
▪ The second goal is to remove the disturbance or noise effects causing the process to give poor results.
▪ The setpoint remains constant, the controller limits the load disturbances on the process.
▪ Load dynamics relates to sinusoidal, step, ramp or a combination of these affecting the process output.
Noise
▪ The noise can stem internally where it comes from the sensor, or it can be external where it comes from
the process.
▪ Noise is a high frequency signal that imparts itself on the process output.
➢ The controller is subjected to loop dynamics, process dynamics and noise (external or internal)
➢ The controller is tuned to reject or limit the load acting on the process.
Page | 2
PID CONTROLLER TUNING
¼ WAVE DECAY RATIO
▪ The process is brought close to the setpoint with it being a setpoint change or abrupt change due to a
load disturbance.
▪ The process control is tuned to obtain ¼ Wave Decay Ratio; this is a criterion to improve the
performance.
▪ The controller is tuned to obtain a characteristic shown above, a and b can be 1 and 4 when looking at
the amplitude stemming from the setpoint.
▪ If this was a tank and went over 100 % (b) and above the setpoint the next overshoot can be 25% (a)
giving a ¼ Wave which is a suitable response for the controller when it is subjected to a load disturbance
or a setpoint change.
Hyperlink Image
Forms of PID
1. Parallel Form
Page | 3
PID CONTROLLER TUNING
2. Interacting Form
When the proportional gain setting is changed on the pneumatic controllers, interacting form has an
effect on the integral and derivative terms.
❖ PID controller accounts for present, past and future control action.
❖ Proportional band is used
❖ There are Anti-windup techniques to prevent integral action from moving valves too high causing
problems in the controller where there is a change in setpoint
❖ Derivative filtering and derivative kick, derivative action relies on the rate of change of error when the
setpoint changes, the error jumps, the derivative action gives large output and that is known as
Derivative Kick.
❖ Bump-less transfer and setpoint weighting/filtering- Bump less transfer is an automation technique to
prevent sudden changes in the control output when moving a manual mode to an automatic mode, the
controller responds too gradually to mode change for example when there is an output of 25% on
manual mode then all of a sudden the controller is tuned to automatic mode, then it has a setpoint of
75%, the output will have to increase very abruptly. Bump-less is for smooth transfer from manual to
automatic mode.
❖ Direct acting and reverse acting controller action
❖ Continuous (position) versus Discrete (velocity) form.
❖ Cascade control split range control and ratio control strategies – PID is flexible to implement on these
strategies, it has many applications that can be used on it.
❖ Dominant dead time – if the controllability ratio is greater than 1 it is regarded as a deadtime dominant
system, smith predictor can be used since PID controller cannot be used as the system is not easy to
control.
❖ PID algorithm is tuned when a process loop is started up or tuned when the system is calibrated when
the outcome of the loop is not the desired outcomes.
❖ Before tuning the system must be properly checked out, in terms of hardware like sensors and final
control elements and the process as well.
PID TUNING
▪ The controller is tuned by means of trial and error; the best-case performance in the middle is the desired
outcome, when there is a sudden load change the process is tracking the setpoint.
▪ The 1st system shown on the first graph where there is a high oscillation the value of 𝑲𝒄 and integral time
have to be adjusted.
▪ This shows that proportional gain is too large, and it needs to be reduced.
▪ It cannot be reduced much because it will cause an offset and sluggish system shown by the last graph
which has a very low proportional gain and high value for the integral time; this will lead to sluggish
system.
Page | 4
PID CONTROLLER TUNING
EFFECTS OF PID PARAMETERS ON LOOP SPEED AND STABILITY
Page | 5
PID CONTROLLER TUNING
Open Loop Reaction Curve
▪ The controller is in manual mode and the valve is driven high or low at some point the process responds.
▪ On the curve draw or plot a target at the steepest point of the curve.
▪ Determine the 1st time constant where there is 𝒕𝟎.𝟔𝟑𝟐 .
▪ Determine deadtime (LR).
▪ Determine the tuning parameters (K is the gain of the process which is a function of the output over the
input.
Page | 6
PID CONTROLLER TUNING
Process Gain is the change in output over the change in input.
Deadtime is where the tangent intersects the lower part at which the process was at rest before it was
excited by the input signal
Using the PID formula from ZN Open Loop tuning Rules the values of the tuning parameters are
Page | 7
PID CONTROLLER TUNING
These parameters are used on a controller then it is put in automatic mode to obtain desired response.
Ziegler Nichols Close Loop Tuning
▪ This method does not rely on a process model, it relies purely on exciting the system so that it starts to
oscillate, the information can be extracted from the oscillation.
▪ It is in closed loop, and it has an advantage.
1. Integral time (𝑻𝒊 ) is set as infinity and the derivative time (𝑻𝒅 ) as 0 and that negates the tuning
parameters out of the PID algorithm.
2. Value of 𝑲𝒄 is increased until the system starts to oscillate.
3. Critical gain and the critical period are recorded.
4. Fit the parameters to a tuning table to determine PID settings.
Page | 8
PID CONTROLLER TUNING
Page | 9
PID CONTROLLER TUNING
Relay Tuning
▪ This uses a simple relay which eliminates the user from playing around with the value of gain
▪ This has two modes, Normal Operating Mode where the switch is up, the PID controls the plant via
normal feedback method.
▪ The second mode is when the switch is down, there is no PID controller operating but it is driven by the
relay, the relay output is determined by the user like how much the valve can be driven which is lumped
into the process.
▪ The relay will switch on and off then it will drive the process to oscillate once the process starts to
oscillate the ultimate period can be determined; the value of the amplitude is extracted and also the
valve signature which is 2d.
Hyperlink Image
The Ultimate Gain for the system can be worked out as follows:
▪ This gives the ultimate period and the ultimate gain; then the closed loop system formulas are applied.
▪ This system is applied in standalone controllers, PID controllers which operate individually.
▪ This controller is put on automatic mode in software, the ultimate gain, ultimate period are obtained by
looking at the cross over points as the loop starts to oscillate.
▪ Then the cross over points for the controller output are worked out, the period and the ultimate gain are
determined.
▪ The PID tuning formula is calculated in software to determine the values 𝑲𝒄 , 𝑻𝒊 , and 𝑻𝒅 .
▪ These parameters are plugged into the PID controller to control the process effectively.
Page | 10
PID CONTROLLER TUNING
Hyperlink Image
Page | 11
PID CONTROLLER TUNING
Page | 12
PID CONTROLLER TUNING
EVALUATING CONTROLLER PERFORMANCE
▪ Once the system has been tuned the performance of the system has to be evaluated.
▪ There are key parameters which give an indication of how well the system is performing or working.
▪ The graph shows a closed loop system responding to a step change or load change.
▪ There is a rise time, peak time where there is a first overshoot and there is a settling time, which is 5%
which means 5% of the process output which is 5% around the setpoint where it starts to settle.
▪ Good control is a function of what is required out of the control.
▪ Integral error criterion can be used to quantify the performance by working out the integral error.
Page | 13
PID CONTROLLER TUNING