PID Control System

PID control is the most common control algorithm in industrial control applications. This article is merely written to share some of the techniques that I developed in Labview Programming to achieve literally zero overshoot. In my case, I wanted to control hydraulics supply and return pressure via control valves. Such control valves take 4-20mA signal to control flow in the system. Apart from National Instruments hardware, I had Pressure Transducer from Durck and Proportional Control Valves from Wandfluh and Masoneilan to achieve fuel control.

Non-Linear Control System and Calibration

It is worth mentioning that not all control valves operate in a linear manner. This means control output from PID might result in excessive opening/closing of valve orifice resulting unexpected fuel pressure. In order to mitigate consequences of non-linear valve profile, we could perform PID Auto-tuning and ten-point calibration of control valves.

10-point calibration

Calibration would involve applying known pressure in the hydraulic system and recording the values of pressure on the output of control valves. We then record pressure raw value as well as calibrated scaled PSI value in calibration table. Finally, apply this calibration on the demand set-point and pressure transducer feedback. By applying calibration based on control valve profile, PID generate only the control output required to minimise the mismatch error between demand set-point and pressure transducer feedback.

Applying calibration

One of the most effective way of applying calibration in labview is by inserting instantaneous raw pressure transducer value into calibration table and interpolate the table to find corresponding calibrated engineering value. I have shared following block diagram to achieve the calibrated value using calibration table.

apply cal

PID loop in Labview VI

PID control requires demand set point value which in our case is desired supply or return pressure. PID control valve also need pressure transducer feedback. It is also worth mentioning that you could eliminate great amount of oscillation in PID system by rounding your feedback value to two or 1 decimal place. As electrical noise on amplified pressure transducer reading is inevitable, rounding noise would prevent PID from reacting to noise in the signal. I also opt to eliminate main 50-60HZ noise by creating a simple filter in Labview VI.

Here is a block diagram showing a PID control that would achieve you PID control without overshoot.


As you would see, I chose to pack all PID parameters in a cluster so engineers could adjust PID gains from PID control screen on HMI. I used PID Autotune VI and it worked better in my case compared with standard PID vi. You would see I rounded feedback value to two decimal to prevent PID from reacting to noise. In addition, I also used PID Feedback Filter functions from PID pallette. It is a good vi freely available to clean your feedback signal. Another important technique is to add set-point limiter which ramps set-point at controlled rate. As you would image, machine operator would just enter required supply and return pressure. Without internal set point ramp control, we will be producing an instant jump on the demand value. Consequently, PID would produce maximum/minimum outputs and make system react very fast. A hydraulic system with fuel flow through proportional relief valves is likely to go unstable with such a rapid increase or decrease in demand value.

Proportional, Integral and Derivate PID values

In my case above, I found initial PID values without effort. I ran under PID autotune which would give you starting PID values. You could then tune further if required by slightly adjusting P, I and D values. Generally, PID tuning is done by:

  • Starting with I and D value of 0 and slowing increasing P value from 0.
  • Proportional P value determines how fast supply pressure would reach demand value but as you start to slowly increase P value, you might get to a P value where it would start to oscillate. It is at that point where you have exceeded required system P value. Reduce P to get to a value where oscillation is minimum and you have achieved required control  speed.
  • Once you have tuned P value, Integral I value eliminates the oscillation to reach stable supply pressure. Gradually increase I value until stable control is achieved without or with minimum oscillation.
  • Derivative D value is rarely used. It is widely used to reduce overshoot. It is also said to ‘predict’ system behaviour. It is like standing underneath shower and feeling water temperature to adjust temperature knob when we begin to feel water getting bit too cold or bit too hot.

PID control requires careful system set up and ensuring every bit works to achieve overshoot-free control on supply and return pressures in a fuel system machine. Disaster could happen if PID overshoots which is very common if feedback sensor is not calibrated ,wired wrongly (in opposite direction especially in tensile/compressive load applications) or PID values are not tuned for the system. It is also worth to cap PID output values until controllable system is achieved.

I hope some tips given in this article will help you with your next PID control system. Please drop a line if I could assist..