Did you know…
… that PID can save you money by offering better process control?
… that PID can help you maintain a setpoint, even with a variable process?
… that the days of over complex and confusing PID are over?
… that Pi can tailor a PID system to your exact requirements? You may never have to touch those settings again!
In this Focus On, Pi would like to introduce you to PID if you haven’t come across it, and discuss some of the useful advanced features of modern PID systems, like on Pi’s CRONOS® and CRIUS® models for those more familiar with PID.
Introduction to PID
What is PID?
PID is a mathematical tool created by engineers and is used in controllers. It is a feature often found in industrial controllers and is available in Pi’s controllers, as an inexpensive upgrade.
What is PID for?
The best way to explain what PID does, is to take an example. Most people have been to a swimming pool at some point in their lives, so this is the example we shall use. PID is also applicable in a huge variety of other processes. If you are not sure, you can always contact us to discuss your application.
When a person enters a swimming pool, they create a chlorine demand. They do this by introducing sweat, bacteria, organic molecules and other substances into the pool water. Chlorine reacts with these substances, which results in chlorine being used up and the chlorine level dropping. The chlorine level in this example, is often called the process variable or PV in the context of PID.
In order to maintain a concentration or level of chlorine, more chlorine needs to be dosed. If you dosed the same amount of chlorine per bather, the level would not be stable as all bathers create a different chlorine demand (e.g. swimming for fitness produces more sweat than swimming recreationally). Dosing manually brings in the issue of human error, and how operators approximate or calculate the amount of chlorine to dose based on current levels. Another issue with manual dosing is that it is not a continuous process, meaning it is unlikely a stable level will ever be reached.
What does PID do?
PID takes the measured level of chlorine or the PV and compares it to the desired level or set-point. This comparison gives the error which PID interprets and then calculates an output. The output is an electrical signal which controls the dosing of the appropriate chemical. The output can control heaters, dosing pumps and many other mechanisms that can be used to change the PV.
How is it used?
PID is made up of three parts, proportional, integral and derivative. Understanding what each part does helps operators choose the level of control best suited to them.
Proportional – Is the most commonly used for portion PID and suits most applications. When using proportional control, the further away the measured value is from the setpoint, the larger the output will be from the controller. This is an appropriate level of control for most processes, and users can gain a lot of control from a purely proportional system.
In some systems where the PV is lost to the process, e.g. chlorine from a pool, heat from a boiler etc., the proportional control never quite catches up with the setpoint. Users can see that although the process approaches the setpoint it rarely, if ever, gets to it. This is known as ‘droop’. The user can compensate for droop if the removal of the PV is fairly constant, simply by raising the setpoint, e.g. evaporation of chlorine from an empty pool. If droop changes often, (e.g. bather load or chlorine demand) then to eradicate the ‘droop’ then the integral part of PID can be applied to the signal to correct it.
Integral – The output from the integral term is determined by both the magnitude and the duration of the error. A small error over a long period of time will trigger a larger response than from a purely proportional system. This helps the elimination of the ‘droop’ seen in processes with continuous loss, and also serves to help reach the setpoint quicker.
Derivative – Derivative gain is rarely used and is generally set up only by expert engineers. Derivative gain uses the rate of change in the PV to try and predict future errors. This type of control is particularly susceptible to overcompensating, especially if there is even a small amount of signal noise (usually seen as spikes in the PV). Derivative gain is generally a tweak used by engineers to improve an already tight control, and is almost never used as an essential part of control.
What are the benefits of PID?
When properly set up, PID can lead to far tighter process control, which in turn can save you time and money. As an example, pool managers want to keep chlorine levels low, to improve the bathing experience and also save on chemicals. AquaSense is a chlorine analyser system that responds quickly and appropriately to a change in bather load (also known as chlorine demand). This means pool operators can save money whilst maintaining the safety of the pool. PID can also help reduce the risk of overshooting the desired setpoint, reducing the risk of dangerous overdosing of the chemicals.
Advanced Features and Safeguards
Whilst maintaining a setpoint with a PID loop is a huge advance over using threshold relays to maintain an upper and lower limit, it is sensible to control the loop with extra safeguards, such as:
- Maximum and minimum pump outputs. This is mainly used to prevent the controller from employing too aggressive a control, which can lead to overdosing. A minimum output can also be used in a system where the measured parameter is lost over time, to prevent the controller ever turning the dosing off.
- Ramp rate is a proportional control that allows users to choose how quickly or slowly the controller doses, in order to reach the setpoint. It is especially useful on startup, and can prevent the controller dosing too quickly.
- Wind up protection is an integral control, which limits the duration aspect of the control. This puts a limit on how much previous error can accumulate. Without wind up protection, there could be a very large integral value, if the process ever reaches zero or on startup.
These are all standard features in all Pi PID controllers.
In summary, PID is a very useful tool when used correctly, and can result in significant chemical savings, not to mention reduced pump wear and tear and lower electricity costs.