Int. J. Computer Applications in Technology, Vol. x, No. x, 200x
1
A PID parameter tuning method for air conditioning system based on annealing genetic algorithm Jianbin Nie and Yuting Zhou School of Technology, Beijing Forest University, Beijing 100083, China E-mail:
[email protected] E-mail:
[email protected]
Chen Chen Department of Electrical Engineering, University of Texas at Dallas, Richardson, TX 75080, USA E-mail:
[email protected]
Ning Han* School of Technology, Beijing Forest University, Beijing 100083, China E-mail:
[email protected] *Corresponding author
Deying Li Beijing University of Civil Engineering and Architecture, Beijing 100044, China
[email protected] Abstract: In view of the characteristics of central air conditioning control system (with great inertia and multiple disturbances) and the prematurity of conventional genetic algorithm, this paper integrated simulated annealing algorithm into conventional genetic algorithm to realise the proportional, integral, differential (PID) parameter tuning. Local optimal solution was effectively rejected by stretching fitness function and introducing access criterion with controlled probability. MATLAB simulation results showed that the system response lagged only 1000 s, and the efficiency was improved by 80% by using this method. In addition, the fitness value was smaller than that of conventional genetic algorithm. Keywords: simulated annealing genetic algorithm; PID controller; air conditioning system; MATLAB simulation. Reference to this paper should be made as follows: Nie, J., Zhou, Y., Chen, C., Han, N. and Li, D. (xxxx) ‘A PID parameter tuning method for air conditioning system based on annealing genetic algorithm’, Int. J. Computer Applications in Technology, Vol. x, No. x, pp.xxx–xxx. Biographical notes: Jianbin Nie (1992-), is a undergraduate in Department of Electric Engineering and Automation, School of Technology at Beijing Forest University. His research interests include fuzzy algorithms and simulated annealing genetic algorithm. Yuting Zhou (1990-) is a undergraduate in Department of Electric Engineering and Automation, School of Technology at Beijing Forest University. Her research interests include fuzzy algorithms and simulated annealing genetic algorithm. Chen Chen (1987-) is currently working toward the PhD in Department of Electrical Engineering, University of Texas at Dallas, Richardson, TX. His research interests include compressed sensing, signal and image processing, pattern recognition, and computer vision.
Copyright © 200x Inderscience Enterprises Ltd.
2
J. Nie et al. Ning Han’s (1956-) research focus on the technology of intelligent buildings. Deying Li (1955-), is a Professor in Beijing University of Civil Engineering and Architecture, Director in Beijing Key Lab of Heating, Gas Supply, Ventilating and Air Conditioning Engineering.
1
Introduction
Central air conditioning control system is a complex system. Its energy consumption accounts for more than 50% of that of the whole building. PID control algorithm is simple and easy to implement, thus is commonly used in control systems. An air conditioner is a multi-input and multi-output system with multiple disturbances and uncertain object models. Therefore, PID parameters should be adjusted as controlled objects vary. In conventional air conditioning control, PID parameter adjustment usually adopts frequency methods or empirical methods, which are time-consuming and inefficient. Modern control methods, including fuzzy control, neural algorithm, optimal control method, and stable boundary method, have been used in the parameter optimisation of PID controller. However, these methods have some limitations. In this paper, we proposed to integrate simulated annealing method into genetic algorithm for PID parameter tuning of air conditioning system. The proposed approach can overcome the shortcomings of prematurity (solution converges to local optimum rather than global optimum) (Wang and Cao, 2002) and strong parameter dependence of conventional genetic algorithm when population size is large.
2
Modelling of air-conditioning control system
In conventional central air conditioning control system, field controller usually adopts simple PID closed-loop control. The opening of cool water valve is adjusted according to the difference between set value and feedback value. Indoor and outdoor mixed air is processed through controlling air processing unit. The room temperature is then adjusted by changing the temperature of air fed into a room (Wang, 2012). The air conditioning model mainly consists of PID controller, water valve, and air processing unit. However, there are many factors that can affect the room temperature, such as room structure, material, outdoor temperature, number of opened windows, etc. In this paper, room model is not considered, and air temperature of the air conditioning system is taken as the research object. The system model is built in SIMULINK, and simulation is carried out with some parameters of the air conditioning system in a building, including the temperatures of mixed air and cooling water. The model is shown in Figure 1.
Figure 1
3
The model of air conditioning system
Simulated annealing genetic algorithm
Genetic algorithm (GA) (Li, 2002), is a random search method based on the biological laws of evolution (survival of the fittest). It deals with structural object directly without requiring differentiability and continuation of the function. With inherent parallelism and good global optimisation capability, it can automatically guide the optimised search space and adaptively adjust the search direction using probabilistic model. Simulated Annealing (SA) algorithm was firstly used in the field of combinatorial optimisation by Kirkpatrick (Wang, 2004). It is a stochastic optimisation algorithm based on Monte-Carlo iterative solution strategy. Its theoretical basis is the similarity between the physical annealing processes of solid material and general combinatorial optimisation problems. SA algorithm starts from a high original temperature, and with the decline of temperature parameters, it randomly searches the global optimal solution of the objective function using probabilistic jumping characteristics, i.e., it can jump out of the local optimal solution and converge to a global optimal solution. Figure 2 shows the procedures of integrating SA algorithm into GA algorithm. The steps are stated as follows. •
Coding. Real-number coding is employed here due to its wide range and high precision.
•
Generation of initial population. Generate initial code randomly.
•
Fitness evaluation. Take the Integrated Time and Absolute Error (ITAE) which can reflect system control quality as the objective function, i.e.
A PID parameter tuning method for air conditioning system based on annealing genetic algorithm ∞
∫τ
t e(t ) dt
•
•
Determination of the initial temperature. Set the optimal and worst state of the original population as cb and cw, and set the accept probability of the worst state relative to the optimal state as pr. The initial temperature can be determined according to t0 = –(cw – cb)/ln pr (Xie et al., 2009). Fitness stretching. Stretch the fitness as follows (Li et al., 2010): fi′ =
e fi / T
∑
P i =1
e fi / T
(2)
where fi is the fitness of the ith stretched individual, f i ′ is the fitness of the ith individual, P indicates the population size and T the temperature. •
Cooling function. Apply exponential function T = T0 × 0.9G–1 to describe the cooling process, where T0 is the initial temperature, and G is the generation.
•
Selection, crossover and mutation operations. Rank each individual in the population according to their target values in the descending order, and then select the best individual for crossover and duplication (Wang and Tang, 2002). Crossover was carried out with a probability of Pc. The specific form for generating offsprings x1′ and x2′ from the parents x1 and x2 is x1′ = ax1 + (1 − a ) x2 x2′ = ax2 + (1 − a) x1
(3)
where a is a random number in the range of (0, 1). Mutation was carried out with a probability of Pm in the following form, x′ = x + η
(4)
where x is the parent of x′, and η is a random number which satisfies a normal distribution. •
The accept function of SA (Yuan, 2004). Determine the fitness of the offspring after crossover and mutation operations, and accept or discard according to the following formula, 1 ∆ ≤ T P ( si − si −1 ) = 0 ∆ > T
and P(si – si–1) is the acceptance probability of the new state.
(1)
where e(t) is the difference between the controlled value and the target value.
(5)
where ∆ is the difference between the fitness values in new and old states, si is new states, si–1 is old states
3
•
Cooling function. An exponential function with the base of 0.9 is used as the cooling function.
4
Simulation experiment
The model uses the data of the air conditioning system from a building which include temperatures of the supply air and the return air, temperature of the cooling water, and humidity of the return air. In the simulations, the algorithm is executed in MATLAB and calls the air conditioning model in Simulink using sim function. The offsprings (Kp, Ki, Kd) of each generation are calculated using the model. The obtained results are returned to MATLAB. Figure 3(a) shows the response curve of the air conditioning system in one day. The horizontal axis represents time and the unit is 10 s. It can be seen that the original system has large time delay and overshoot with their corresponding maximum values reached 5000 s and 10%, respectively. Figure 3(b) shows the simulated response curves with the original PID parameter of the building. It can be found that the simulated curve basically coincides with the real response indicating the model is correct. Figure 3(c) displays the response curves of the conventional GA. It can be noted that the delay time of the system is 2000 s and there is no significant overshoot. The obtained PID is Kp = 2.927, Ki = 0.46, and Kd = 0.9756. Figure 3(d) displays the response curves of the proposed simulated annealing genetic algorithm. It can be noted that the delay time of the system is less than 1000 s and there is no significant overshoot. The obtained PID is Kp = 4.2219, Ki = 0.4, and Kd = 2.88. Comparing the response curves obtained by using genetic algorithm and simulated annealing genetic algorithm with the original response curve, we can see that the rise time, adjustment time, and overshoot are all significantly improved. The rise time and adjustment time of the simulated annealing genetic algorithm are more desirable than those of the conventional genetic algorithm. The optimising processes of the conventional GA and the simulated annealing genetic algorithm are shown in Figure 4 and Figure 5. It can be seen that the latter algorithm has obvious lower fitness than the former. During the optimisation processes, simulated annealing genetic algorithm has faster optimisation speed at the beginning. The fitness of the simulated annealing genetic algorithm declines more frequently than the conventional GA, which effectively avoids the local optimal solution. In the later stage of the optimisation process, the optimisation speed decreases for a smooth convergence.
4
J. Nie et al.
Figure 2
Flow diagram of simulated annealing genetic algorithm
Figure 3
The simulated response curve of the air conditioning system model (see online version for colours)
5
Conclusions
In this paper, we propose to integrate the simulated annealing algorithm into the conventional genetic algorithm. The experiment results demonstrate that our proposed algorithm effectively reduces the fitness resulting a more
desirable response curve. By stretching the fitness, the prematurity of the conventional genetic algorithm is avoided. In later stage, they were almost the same, and the advantage of excellent individual’s offspring was not obvious, which entrapped the algorithm into local optimal solution. When temperature is rather high, the probabilities
A PID parameter tuning method for air conditioning system based on annealing genetic algorithm of generating offspring for individuals with corresponding fitness were close. When temperature decreased, the difference between individuals was enlarged, and the probability of generating offspring for excellent individual
5
was higher. Meanwhile, inferior offspring was accepted with a certain probability. Hence, the solution has larger search space, and it is more likely to find the global optimal solution.
Figure 4
The optimisation process of the conventional genetic algorithm (see online version for colours)
Figure 5
The optimisation process of the simulated annealing genetic algorithm (see online version for colours)
Acknowledgements
References
The study described in this paper was supported by Beijing Key Lab of Heating, Gas Supply, Ventilating and Air Conditioning Engineering “Study on energy-saving control of central air conditioning unit” (NR2012K02 Program) and the national student innovation training plans to fund projects (201210022066 Program).
Li, L-y., Guo, G-f. and Xu, J-b. (2010) ‘Optimizing and adjusting the parameter of PID based on simulated annealing genetic algorithms’, Journal of Guangdong University of Technology, Vol. 27, No. 2, pp.80–83. Li, M-q. (2002) The Basic Theory and Application of Genetic Algorithm, Beijing Science Press, Beijing.
6
J. Nie et al.
Wang, L. (2004) Intelligent Optimization Algorithm and Its Application, Beijing Tsinghua University Press, Beijing. Wang, L. and Tang, F. (2002) ‘Study on PID tuning based on genetic annealing strategy’, Control and Instruments in Chemical Industry, Vol. 29, No. 3, pp.21–24. Wang, X-p. and Cao, L-m. (2002) A Genetic Algorithm Theory, is Applied to the Software Implementation, Xi’an Jiaotong University of California Press, Xi’an. Wang, Z. (2012) Study on Energy-Saving of Air-Conditioning Unit with Variable Universe Fuzzy Control, Unpublished Master’s Thesis, Beijing Forestry University, Beijing, China.
Xie, X-r., Wu, Y-s., Lin, J-t., Zhang, Y-s. and Jiang, Q-r. (2009) ‘Optimal design of SVC subsynchronous damping controller using genetic and simulated annealing algorithm’, Automation of Electric Power Systems, Vol. 33, No. 19, pp.11–14. Yuan, J-m. (2004) ‘Study of numeric PID parameter tuning based on the annealing algorithm’, Journal of Beijing Technology and Business University (Natural Science Edition), Vol. 22, No. 4, pp.40–42.