Performance Improvement of Water Temperature Control using Anti-windup Proportional Integral Derivative

In this research, the controller was implemented in water temperature control system. This system has delay and saturation effect that yielded windup effect. It caused instability problem in system which was showed by occurring overshoot and steady state error. Therefore, the implementation of designed controller with anti-windup was needed. This paper described the comparison between 2 methods of controller design, conventional Proportional Integral Derivative (PID) method and PID with Anti-Windup method. The conventional PID method resulted the system that was hardly to achieve the steady state condition. This was caused by the windup effect which made the system saturated so that the integrator part in the PID would get bigger accumulatively. The solution to fix this instability problem was by using the PID with anti-windup. The experimental result showed that the output response from the control system with the anti-windup PID was able to omit overshoot around 18.75 % and steady state around 5%.


Introduction
Design of Proportional Integral Derivative (PID) control in various fields such as in industrial areas, experimental laboratories and household applications has been encountered [1][2][3][4][5][6][7].In particular, researches about water temperature control system with PID have been reported [8], [9]. Figure 1 shows the built water's temperature control system module and Personal Computer (PC) as a data logger.Data logger had an ability to collect data that needed for further benefit such as controlling and management processing [10].This research is very interesting because the control system has a slowly response and has time delay in its open loop system.If we deal with a slowly system, it is possible that the output of the actuator will be saturated.Saturation will make the performance of control system is worse.For example, the problem appeared when the control system used PI or PID controller.The integrator value of PI or PID controller will accumulate.In fact, the actuator has been saturated and the total of sum in integrator part will not affect the actuator output.This effect is called as effect of windup.
The problem arises when the output is over the set point value.The integrator which keep counting continuously makes the system's output is hard to reach back to the set point.To handle this problem, we should make limitation at integrator value so that, the integrator value will stop counting.The method for limiting this integrator value is called anti-windup system [9], [11].If it is embedded to PID controller then the system is totally called the PID with anti-windup.Figure 2 shows the anti-windup PID block diagram which was realized for simulation and experimental results.This research aims to realize the anti-windup method for water temperature control which has delay and slow response.Even though several studies on anti-windup PID have been reported; for examples see [9], [12], to our knowledge, there has been no implementation on the water heater control using anti-windup PID.In [9], delay phenomenon was not considered to the implemented system; water level system; so that the windup effect was less than of this research.In [12], authors used Proportional Integral (PI) Anti-windup for faster system to ours, i.e.Brushless Direct Circuit (DC) Motor.The faster response the less windup effect occurred because the system was able to reach set point easily.This research also shows the advantages of using anti windup in reducing overshoot, ripple phenomenon and steady state error.

Reseach Methods
This research was realized into two steps.The first was designed with a conventional PID and the second one was designed with ant-windup PID.From both steps, we compared and analyzed which one that has better response.Saturation's effect caused a windup problem in system with conventional PID whereas in the system with anti-windup PID, the problem can be reduced effectively LONTAR KOMPUTER VOL. 9, NO.Many applications of PID controller used in any industry fields.Several industries such as process control system or manufacture that use robotic system involve the PID controller.The PID controller is often implemented in digital computer practically.The present of digital computer makes the PID controller become easier to be modified and improved different from if it is implemented in pure analog computation using analog electronic hardware.There are some modifications in PID controllers, for example flexible PID [2], [6], decentralized PID [3], and PID with gain scheduling [9].
The PID algorithm consists of 3 components.There are proportional, integral, and differential gains.All of components will be proceed parallelly and simultaneously.Equation 1shows the transfer function of generalized PID.
(1) Each of components of PID controller has a specific usage.The proportional gain is used to improve the time response but sometimes, bigger proportional gain makes the system relatively more unstable that is indicated with the bigger overshoot and more ripples.Integral gain is used to reduce or eliminate the error steady state.Integral gain should be set correctly, otherwise, the response of system will be slowly to reach the setpoint.Too big integral gain also makes the system response has more oscillations.It can be seen in Figure 3.
The final part, differential gain can smooth the system response, so that the response tends to have a small ripple and no oscillation, because this part reduces the differential error.Differential gain can also stabilize when the system is unstable.
These following figures below are the simulation results from any PID constants setting.

Saturation's Effect and Anti-Windup
In water temperature control system, saturation effect can appear in its actuator that exceed Pulse Width Modulation (PWM) signal.In microcontroller, generated PWM signal has saturation value in 0 and 255. Figure 6 and 7 show the system simulation when saturation effect is not given.Although theoretically PID controller is applied for the linear system, in applied design it is needed to add a non-linearity effect.One of the non-linearity effect is saturation effect that may possibly occur in actuator or plant of the system.It can be seen in Figure 7. that the system response still can reach the setpoint.The problem has not appeared yet, when the closed loop system does not include the saturation effect.But, on the other side, if the saturation effect is added to the simulation, see Figure 8, then the response was shown in Figure 9 below.The steady state error appears, if the saturation effect is added.Different from the first simulation, steady state error can be zero when the saturation effect is not given.
The counting process at integral part in PID does not change the output of actuator because of the saturation effect.Phenomena that make the integral part is getting bigger is defined as windup effect.To handle this problem, the system must add an anti-windup system.One of anti-windup system method is back calculation integral model method shown in Figure 2. Basically, anti-windup system will hold the integral value is not getting bigger when the output of actuator is saturated.Integral value can be decreased when the actuator output over the saturation limit.So, the anti-windup system will work only if saturation state is happened.Saturation limit in this system has range from 0 -255 adjust to PWM signal.How big the decreasing value to hold the integral value depends on how big the gain factor of anti-windup that added to anti-windup system.The actuator of this control system was heater element controlled by optocoupler and Triac circuit.The optocoupler and Triac circuit will act as switch that make the AC voltage given to the heater is on and off.PWM signal counted from PID controller will be the input to the optocoupler and Triac circuit.Figure 11 shows the optocoupler and Triac circuit as a driver for heater element.The DS18B20 temperature sensor was used as feedback signal.This sensor will sense the temperature of water in tank and send the result to Arduino via I2C serial protocol.Figure 12 shows the temperature sensor DS18B20.Finally, Arduino Uno platform was used as a digital controller.In this platform, anti-windup PID system was implemented digitally by program code. Figure 13 shows the source code of antiwindup PID.The code was divided into two parts.The first part was conventional PID that will compute the error of temperature.Another part was anti-windup system which was always checking when the saturation happened.

Figure 13. PID anti-windup code program
If the code is analyzed, the anti-windup system will work when the output of PID is bigger than 255 or smaller than 0. Ka is the gain factor that make how big the decreasing of integral value can happen.If Ka is set to zero, then the anti-windup system part in program code will not work and the anti-windup PID will be same as the conventional PID (without anti-windup).

System Modeling
System modeling was done by measuring how long the time delay and see whether the open loop system has likely stable or not.If the system was likely stable, then the system can be approximated by first order system complemented with delay.Otherwise, if the system was likely unstable then it can be approximated by adding an integrator to first order system with delay.
After some observation to system, it can be found that the system has time delay about L (time delay) = 50 seconds.Looking in real condition if water in room condition temperature 25 0 C, it will increase to 75 0 C when the water was heated by heater in PWM equals to 255.Time response to raise the water temperature from 25 0 C to 75 0 C degree was about 500 seconds.From here, gain K can be found by equation 2. (2) From equation 2 the open loop system can be found like equation 3 with the constant 'a =1' was chosen arbitrarily (3)

System Simulation
The control system of water temperature was done in 3 steps.First step was to check whether the open loop system is suitable with the real condition or not.The next step is closed loop system simulation using PID conventional with the value of parameter of PID are show at Table 1.

Table 1. Parameter value of the conventional PID controller
The simulation result for the closed loop control system with the conventional PID can be seen from its output in Figure 15.It was shown that the output has a steady state error about -20 0 C. The setpoint was set to 60 0 C and the output is 80 0 C. The final step is the simulation of closed loop control system with PID anti-windup controller.In this simulation the gain of anti-windup Ka is added to the controller.All parameter used in the controller are shown in Table 2.

Table 2. Parameter value of Anti-Windup PID controller
The simulation result can be seen in Figure 16.It can be found that the last simulation is better than the first simulation.The first simulation referred to system with conventional PID showed steady state error 33.33% whereas there was no steady state error occurred in output for the simulation of PID with anti-windup in the last simulation.

Result and Discussion
The implementation of water temperature control system was done by taking 1 liter of water in tank.The set point was set to 40 0 C and the initial condition of water temperature was same as the room temperature 26 0 C.
The experiment for implementation was done in 2 parts.The first experiment was for the closed loop system with conventional PID and the second experiment was for the closed loop system with PID anti-windup.The response of closed system was observed by PLX -DAQ software.This software was made by parallax.It was usually used to log data output of water temperature that automatically connected and sent to MS Excel.It was also automatically plotted the response into a graph.Figure 13 shows the PLX -DAQ software.

Experiment of Closed Loop Control System with conventional PID
The parameter that was used in experiment of closed loop system without anti-windup can be seen in Table 3. Table 3. Conventional PID parameter values In Figure 18, it can be shown that overshoot was very big, around 18.75%.The response was also hard to closed to the set point and had steady state error 5%.Therefore, it can be concluded that this response was not good.

Experiment of Closed Loop Control System with Anti-windup PID
The parameter that was used in experiment of closed loop system with anti-windup can be seen in Table 4. From the result of implementation of anti-windup PID, the response of the system was better than the system using conventional PID.The response system with anti-windup had steady state error closed to zero and it also had no overshoot.

Conclusion
The implementation of anti-windup PID was worked very well in water temperature closed loop control system.It was better than conventional PID did.The experiment showed that the overshoot and steady state error of the closed loop system with conventional PID was bigger than that of closed loop system with anti-windup PID.
For the next research, it is needed to design the water temperature control system by finding the accurate model.So, the parameter of PID controller can be synthesized analytically.One of method using model based is smith predictor controller.It is also usually used for designing system with delay effect such as water temperature control system.

Appreciation and Future Plan
This research was supported by internal research grant of Telkom University.It is cooperated with assistant's Control System Laboratory.In the future, this research will be conducted for simple application learning and to demonstrate the closed loop control system especially in water temperature control.Hopefully, the students will become more understand about the concept and basic knowledge of control system by trying to implement varied controllers to this experimental device.

Figure 1 .
Figure 1.Water's temperature control system

Figure 2 .
Figure 2. Block diagram of closed loop control system with anti-windup PID

Figure 3 .Figure 4 .Figure 5 .
Figure 3. Simulation results that show the effect of gain constant in closed loop system

Figure 6 .Figure 7 .
Figure 6.Block diagram of PID control for system without saturation

Figure 8 .Figure 9 .
Figure 8. Block diagram of PID control for system with saturation

Figure 10 .
Figure 10.Block diagram of water temperature control system hardware

Figure 12 .
Figure 12.Temperature Sensor DS18B20 The testing was done by giving step input with amplitude 255 to the transfer function at equation 3.

Figure 14 .
Figure 14.Block diagram and its open loop response

Figure 15 .
Figure 15.Block diagram and response of closed loop control system with conventional PID, without anti-windup

Figure 16 .
Figure 16.Block diagram and result of closed loop system with anti-windup PID controller

Figure 18 .
Figure 18.Response of closed loop system with conventional PID controller

Figure 19 .
Figure 19.Response of closed loop system with anti-windup PID controller