International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 11, November 2013)
Development of Self-Tuning Intelligent PID Controller Based
on BPNN for Indoor Air Quality Control
Yang SONG1, Shenyi WU2, Yuying YAN3
HVACR & Heat Transfer Research Group, Faculty of Engineering, University of Nottingham, Nottingham NG7 2RD, UK
Abstract—For those who spend most of their time working Being able to influence most of these factors, proper
indoors, the indoor air quality (IAQ) could affect their control strategies are needed to operate the building HVAC
working efficiency and health. This paper presents an systems in order for optimizing occupant comfort and
intelligent proportional-integral-derivative (PID) controller energy saving in built environment.
for IAQ control. Different from the traditional PID controller,
In order to achieve an optimal system performance in
this novel controller combined with Back-Propagation Neural
Networks (BPNN) technology will regulate the PID terms of response speed, systemic stability, disturbance
parameters kp, ki, kd automatically. In the present study, the resistance and small overshoot, a neural network
algorithm of the BPNN-based PID controller is first discussed proportional-integral-derivative (PID) controller with back-
in details, and the control performance is then tested by propagation based weight updating algorithm is proposed
simulation using MATLAB. The difficulty in IAQ control is in this paper.
the existence of control disturbance, time delay and
measurement errors. The results show that the combined II. LITERATURE REVIEW
control algorithm has better performance on the systemic
stability, disturbance resistance, fast response rate and small A. Current control methods
overshoot compared with traditional PID controller. Different approaches for controlling indoor building
environments have been developed for improving IAQ in
Keywords—Back-propagation, neural network, PID
buildings. They can be classified into two categories: (1)
control, IAQ control, stability analysis.
conventional methods; and (2) computational intelligence
technologies.
I. INTRODUCTION
Although intelligent control technologies are developing
A growing number of heating, ventilating and air very fast in the recent decades, conventional control
conditioning (HVAC) systems are being installed in methods including dead zone control, PID control [10,11],
buildings as a way of providing thermal comfort (TC) and optimal control [12–14], predictive control [15] and
improving indoor air quality (IAQ) for occupants [1]. Over adaptive control [16], etc. are still widely used for indoor
the past decades, exposure to indoor air pollutants is air quality control, especially PID controller because of its
believed to have increased due to a variety of factors, practicality.
including the reduction of ventilation rates (for energy Application of intelligent methods to the building
saving), the construction of more tightly sealed buildings, control systems was started in the 1930s and artificial
and the use of synthetic building materials and furnishings intelligence (AI) techniques were applied to the control of
as well as chemically formulated personal care products, both conventional and bioclimatic buildings. Intelligent
pesticides and household cleaners. As investigating all controllers were optimized by the use of evolutionary
types of indoor air pollutants for general air quality algorithms and developed for the control of subsystems of
monitoring and control is a complicated matter [2–4], it an intelligent building [17]. The synergy of the neural
was suggested that the measurement and analysis of indoor networks technology, with fuzzy logic, and evolutionary
carbon dioxide (CO2) concentration could be useful for algorithms resulted in the so-called computational
understanding IAQ and ventilation effectiveness [5–7]. intelligence (CI), which has now been used in buildings.
Although healthy people can tolerate a CO2 level up to There are many computational intelligence control systems
10,000 ppm without serious health effects, an acceptable like Synergistic neuro-fuzzy techniques [18], Fuzzy
indoor CO2 level should be kept below 1000 ppm or 650 systems [19], Neural network controllers [20], PI-like fuzzy
ppm above the ambient level in order to prevent any controllers [21], etc. have been developed for IAQ control
accumulation of associated human body odour [8–9]. in buildings.
283
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 11, November 2013)
B. Problems of current control methods 3) Closed-loop, real-time and on-line learning ability.
The introduced control methods are developed and The IAQ performance evaluation system could be included
employed in building HVAC systems to improve IAQ and to make a control process have the self-learning and
some of them have excellent performance. However, the modifying ability.
current control technologies still have problems need to be In order to achieve these goals, a new PID controller
solved and their shortages can be summarized as follows: based on Back-Propagation Neural Networks (BPNN)
1) Requiring bespoke design. Conventional control learning algorithm will be discussed in next section.
methods like PID control need to be designed based on the
building model, and even for an adaptive controller, such III. DEVELOPMENT OF BPNN-BASED PID CONTROLLER
knowledge is still required at certain extent. Therefore, it is A. Control structure
quite likely that the mismatch of model could occur and
poor control performance can be expected as a
consequence.
2) Difficulty to put into applications. The weak points of
fuzzy controllers are due to the difficulty of defining
accurate membership functions and lack of the systematic
procedure for the transformation of the expert knowledge
into the rule base. Moreover, tuning parameters is a time
consuming task. Neural network can automatic the process
of tuning parameters, significantly reduce development
time and results in a better performance. However, in
neural nets, both knowledge extraction and knowledge
representation are difficult. Other advanced control
Figure 1: BPNN based PID control scheme
technologies also require expert knowledge library or need
operators with specific skills, which prevents them from Figure 1 presents the structure of the proposed intelligent
wide applications. PID controller based on BPNN learning algorithm. It
3) Lagging behind the development of HVAC contains two parts: 1) a classic PID controller and 2) BPNN.
technologies. Current control algorithms do not provide The PID controller is used to control the control object
specific control for these HVAC systems and do not have (indoor air quality in building environment). The control
excellent control performance. performance depends on the setting of PID control
C. Future perspectives parameters kp, ki and kd which can be auto tuned by the
BPNN. The BPNN uses an on-line training algorithm based
These shortages make it difficult to provide a quick on a gradient descent approach to update network weights
solution to the demand for accurate control in building and ensures that the designed neural network is able to
HVAC systems and to meet the demand for some new calculate the desired PID control parameters for the PID
HVAC systems as well as to perform multi-task control controller. Therefore, in this control approach, by
with the aim to minimize energy consumption in buildings combining the classic PID control and the intelligent
and maximize the improvement to the IEQ. In order to BPNN the targeted system output can be tracked with a
address the issues, the development of control technologies guaranteed stability.
in the following areas is desirable:
B. PID control algorithm
1) New control approaches may merge both the
conventional and advanced control methods. There are two The incremental digital PID control algorithm can be
possible ways: a method by which individual merits are expressed as follows:
combined, and another by which analogies between these u k u k 1 k p e y k e y k 1 k i e y k
are overlapped. (1)
2) The control process that does not require intervention k d e y k 2e y k 1 e y k 2
of the users with specific skills or knowledge.
284
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 11, November 2013)
Where u is the output of the PID controller, kp is the e y ck e y k e y k 1 (3)
proportional term, ki is the integral term, kd is the derivative
term and ey is the system error that can be expressed as Output of each neuron in the input layer is expressed as:
follows:
Oj1 x j j 1,2,3,4 (4)
e y k y k r k (2)
In the designed algorithm, superscript (1), (2) and (3)
Where y is the system actual output and r is the system stands for input layer, hidden layer and output layer.
targeted output. 2 Hidden layer: Input of each neuron in the neural
C. BPNN algorithm network hidden layer is expressed as follows:
i 1,2, , N
4
ini2 k wij2 O j1 (5)
j 1
Where wij(2) is the weight connecting the input layer
neurons to the hidden layer neurons and N is the number of
neurons in the hidden layer.
Output of each neuron in the neural network hidden
layer is expressed as follows:
Oi2 k f ini2 k (6)
Where f(x) is the activation function in the hidden layer
that presents the relation between the input and output of
each neuron. Symmetrical Sigmoid function is used as the
activation function and can be expressed as follows:
e x ex
f x tanh x (7)
Figure 2: BPNN algorithm scheme e x ex
If the neural network has sufficient amount of neurons, it 3 Output layer: Input of each neuron in the output layer
is able to approximate any continuous function with only is given as:
one hidden layer [22–24]. Therefore, a neural network with
l 1,2,3
N
inl3 k wli3 Oi2 k
only one hidden layer is designed. As shown in Figure 2,
(8)
the proposed design is a four-input-three-output BPNN i 1
with three layers: input layer, one single hidden layer and
output layer. In this section, the forward feed algorithm and Where wli (3) is the weight connecting the hidden layer
the back-propagation weights adjustment rule is discussed neurons to the output layer neurons.
in detail. Output of each neuron in the output layer is given by:
1 Input layer: The designed neural network has four
inputs as shown in both Figure1 and Figure 2 and they are:
Ol3 k g inl3 k (9)
x1 r O13 k k p
(10)
x u
2 O23 k ki
(11)
x3 e y
O3 k k d
3
x4 e y c (12)
Where g(x) is the activation function that presents the
Where r, u and ey is defined in equation (1) and (2); and
relation between the input and output of each neuron in the
eyc is the changing rate of system error ey that can be
output layer. Outputs of the output layer are the PID
expressed as follows:
parameters kp, ki and kd.
285
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 11, November 2013)
Since these values cannot be negative, the non-negative E y k E y k yk uk Ol3 k inl3 k (17)
Sigmoid function is used as the activation function in wli k
3
yk uk Ol3 k inl3 k wli3 k
output layer and it is given as:
inl3 k
ex Oi2 k (18)
g x 1 tanhx x
1 (13) wli3 k
2 e ex
Based on equation (1), (10), (11) and (12), the following
The proposed neural network can regulate the PID
equations are calculated:
control parameters automatically and it can reduce
sufficient time cost for engineers in control system design u k
e y k e y k 1 (19)
O13 k
process. However, modelling errors often exist in model
based process control and dramatically increase the
difficulty to accurately control the process. Therefore, an u k
on-line training algorithm is applied to adjust network e y k (20)
weights for reducing the system error ey in the design of the O23
u k
BPNN controller.
4 Weights update: In this algorithm, the system output e y k 2e y k 1 e y k 2 (21)
error function is defined as: O33
Then, the learning algorithm of the weight update in
E y k r k yk 2 1 e y2
1 (14)
2 2 output layer can be expressed as follows:
The training process of the neural network model must wli3 k 1 wli3 k wli3 k (22)
be carried out before it can be put into use. This training
process is repeated until the mean square error of the wli3 k wli3 k 1 l3 Oi2 k (23)
training data reaches the desired minimum. In the present
y k u k
work, the training process is based on back propagation.
The basic idea of back propagation is to adjust the neuron
l3 e y k
u k Ol3 k
g ' inl3 k (24)
weights using gradient descent algorithm on the error
function in an iteration process. Generally, the adjustment Where the first derivative of g(x) is given by:
of each weight from hidden-layer to output-layer can be
g ' x g x 1 g x (25)
expressed as follows:
E y k
And the learning algorithm of the weight update in
wli k
3 (15) hidden layer can be expressed as follows:
wli3
wij2 k 1 wij2 k wij2 k (26)
However, in order to avoid the ‘local minima’ which is
the best known problem associated with back-propagation wij2 k wij2 k 1 i2Oj1 k (27)
algorithm; a momentum term is added to the weight change
in the proposed algorithm. This means that the weight
i2 f ' ini2 k l3 wli3 k
3
change this iteration depends not just on the current error, (28)
but also on previous changes. So the adjustment of each l 1
weight from hidden-layer to output-layer is modified as Where the first derivative of f(x) is given by:
follows:
E y k f ' x
1 f x
2
(29)
wli k
3
wli k 1
3 (16) 2
wli3
D. Summarise of BPNN based PID control
Where is learning rate, is momentum factor. In the control process, the weights in the neural network
are trained by the back-propagation weights adjustment
rule in order to obtain the best PID parameters kp, ki and kd
for the PID controller.
286
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 11, November 2013)
Therefore, an acceptable indoor air quality can be Since there some disturbance factors in the actual control
provided by the control of designed system. The algorithm process, to further verify the robustness of the BPNN based
of the BPNN based PID can be summarised as follows: PID control system, two disturbance loads at time t=0.8
1) Initialize the each weight in the neural network and t=1.6 are added when the system is in the steady state.
wij(2)(k) and wli(3)(k), as well as learning rate and It can be seen in Figure 3 that when there are disturbances
the control system can be fast stable and good stability can
momentum factor while k=1.
be provided.
2) Collect data r(k) and y(k) and calculate the system
error ey using equation (2).
3) Calculate the input and output of each neuron and
get the PID parameters kp, ki and kd.
4) Calculate the output of PID controller using
equation (1).
5) On-line training. Adjust the weight of each neuron
in the neural network with the back-propagation
learning algorithm in order to realize self-adaptive
regulation of the PID parameters kp, ki and kd.
6) Set k=k+1 and go back to rule 1).
IV. SIMULATION RESULTS AND DISCUSSION
The BPNN based PID control system is tested using
MATLAB application tools. The difficulty in IAQ control
for building environment is the existence of control
disturbance and time delay. Simulations are conducted and Figure 3: System output response to step input
results are analysed to discuss the performance including
response speed, overshot, stability and adaptability of the
proposed control strategy in IAQ control.
A time-varying system is used to represented IAQ
control process for simulations to assess the effectiveness
of the proposed neural PID control with on-line learning
approach. As the process parameter becomes time variant,
it causes difficulties to the system reference tracking
control. The mathematical model of the control object is
given as:
a k y k 1
y k u k 1 0.2u (k 2)
1 y 2 k 1
Where a(k) is a parameter varying over time and it is
given as:
a(k)=1.4(1-0.9e-0.3k) Figure 4: PID output response to step input
Set the initial learning rate 0.28 and momentum In Figure 4, PID controller output response to the step
input signal and disturbances are presented and it performs
factor 0.04 .The weights in the neural network are
the developed approach with small oscillations and short
initialized in the range [-0.5, 0.5] randomly. settling time.
Firstly, the step signal (r (k)=1) is introduced at time t=0. The auto-tuning process of the PID parameters kp, ki and
The simulation result of the proposed control system output kd can be observed in Figure 5. It shows that the proper PID
is presented in Figure3. As shown in the Figure, the system parameters can be obtained using the online training
has very fast response speed and very small overshot. algorithm based neural network control scheme.
287
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 11, November 2013)
When the disturbances are suddenly added the neural In Figure 6, system output response to the sine input is
network can quickly response to such situation and presented. The result shows that the sine signal has been
calculate the best kp, ki and kd for the PID controller so that well tracked and the newly developed controller can cope
the system can be kept stable. with time variable parameter and time-varying system
reference. There is no big overshot at the beginning that
might be caused by the randomly set neural network
weights. With the disturbances suddenly added, no
oscillations were occurred and it can be observed more
clearly in Figure 7 where describes the system error.
Figure 5: Auto-tuning of PID parameters (step input)
Figure 7: System error (sine input)
Figure 6 System output response to sine input
Then, to further verify the performance of the BPNN
based intelligent PID control system a unit sine set-point
(r(k)= sin(2 t)) is introduced at time t=0 and two
disturbances at time t=0.8 and t=1.6. The initial weights in
Figure 8: PID output response to sine input
the developed neural network are selected randomly. These
unsuitable weights may cause poor control performance; In Figure 8, the result of PID controller output response
however, by adjusting them using the back-propagation to the sine input is presented ant it shows the PID control
learning algorithm the desired weights in the neural has fast response speed and stable steady state. This means
network can be fast obtained and are put to use for that the PID parameters have been regulated accurately and
achieving the targeted system output. the auto-tuning of kp, ki and kd is shown in Figure9.
288
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 11, November 2013)
Figure 9 shows that the developed neural network REFERENCES
control method has very good adaptability to parameter and [1] Yu, B.F., Hu, Z.B. and Liu, M. 2009. Review of research on air
system reference time variations. The desired output can be conditioning systems and indoor air quality control for human
provided quickly in different situations. health, Int J Refrig, (32), 3–20.
[2] Yang, S., Wu, S., Yan, Y.Y., 2013. Control strategies for indoor
environment quality and energy efficiency—a review, International
Journal of Low-Carbon Technologies, doi:10.1093/ijlct/ctt051.
[3] Hui, P.S., Wong, L.T. and Mui, K.W. 2006. Feasibility study of an
express assessment protocol for the indoor air quality of air-
conditioned offices, Indoor and Built Environment, 15(4), 373–378.
[4] Mui, K.W., Wong, L.T., Hui, P.S. and Law, K.Y. 2008. Epistemic
evaluation of policy influence on workplace indoor air quality of
Hong Kong in 1996–2005, Building Services Engineering Research
and Technology, 29(2), 157–164.
[5] Persily, A.K. 1997. Evaluating building IAQ and ventilation with
indoor carbon dioxide, ASHRAE Transactions, 103(2), 193–203.
[6] ASTM, 2003. Standard guide for using indoor carbon dioxide
concentrations to evaluate indoor air quality and ventilation, D6245-
98, (reapproved 2002).
[7] Committee of European Normalization, Ventilation for buildings:
design criteria for the indoor environment. Brussels, Luxembourg:
Commission of the European Communities, Directorate General for
Figure 9: Auto-tuning of PID parameters (sine input) Science, Research and Development Joint Research Centre-
Environment Institute, CR1752, 1998.
As it has been shown with simulations that the back- [8] ASHRAE, ANSI/ASHRAE Standard 62-2007, Design for acceptable
propagation neural network technique is capable of indoor air quality, American Society of Heating, Refrigerating and
providing suitable parameters for PID controller and the Air-Conditioning Engineers, Inc., Atlanta, 2007.
targeted system output can be achieved. Analysis shows [9] Mui, K.W. and Wong, L.T. 2007. Evaluation of neutral criterion of
that the response speed, stability, small system error and indoor air quality for air-conditioned offices in subtropical climates,
Building Services Engineering Research and Technology, 28(1), 23–
adaptability of the BPNN based PID control system have 33.
been guaranteed. [10] Levermore, G.J. 1992. Building Energy Management Systems: An
Application to Heating and Control. E & FN SPON.
V. CONCLUSION AND FUTURE WORK [11] Dounis, A.I., Bruant, M., Santamouris, M.J., et al. 1996. Comparison
of conventional and fuzzy control of indoor air quality in buildings, J
In this paper, an intelligent PID control system based on Intell Fuzzy Syst, (4), 131–40.
back-propagation neural network is introduced to address [12] Wang, S. and Jin, X. 2000. Model-based optimal control of VAV
the drawback of PID control, i.e., it has to be designed air-conditioning system using genetic algorithms, Build Environ,
based on the building model which is prone to the (35),471–487.
mismatch of model and poor control performance as a [13] Zaheer-uddin, M. and Zheng, G.R. 2000. Optimal control of time
consequence and time consuming on parameters tuning. scheduled heating, ventilating and air conditioning processes in
buildings, Energ Convers Manag, (41), 49–60.
The proposed controller also avoids the need of knowledge
[14] Kummert M., Andre, P. and Nicolas, J. 2001. Optimal heating
extraction and knowledge representation in neural networks control in a passive solar commercial building, Solar Energ, (69),
by a novel on-line training based neural network controller 103–116.
with respect to the variations observed from the system [15] Milanic S.R.K. 1996. Neural network models for predictive control
reference input and the actual output. Simulation trials have of a thermal plant. In: Proceedings of the International Conference
been conducted to show that the new developed control on EANN.
system presents excellent robustness to disturbance loads [16] Lam, H.N. 1993 Stochastic modeling and genetic algorithm based
optimal control of air conditioning systems, Build Simulat, 435–441.
and process modeling errors and very good adaptability to
[17] Sanchez, L., Doctor, F. and Hagras, H. 2004. An evolutionary
cope with time variant process parameters, which was algorithm for the off-line data driven generation of fuzzy controllers
demonstrated from using the IAQ control model with time- for intelligent buildings, In: Systems, Man and Cybernetics, IEEE
dependent parameter. In the future work, optimization International Conference, 42–47.
approaches such as genetic algorithm will be used to [18] Kanarachos, A. and Geramanis, K. 1998. Multivariable control of
optimize the neural network architecture to improve the single zone hydronic heating systems with neural networks, Energy
Conversion Management, (13),1317-1336.
control performance.
289
International Journal of Emerging Technology and Advanced Engineering
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 3, Issue 11, November 2013)
[19] Altrock, C., Arend, H.O., Krause, B., Steffens, C. and Behrens- [22] Hornik, K., Stinchcombe, M. and White, H. 1989. Multilayer
Rommler, E. 1994. Adaptive fuzzy control applied to home heating feedforward networks areuniversal approximators, Neural Networks
system, Fuzzy Sets and Systems, (61), 29-35. 2(5), 359–366.
[20] Liang, J. and Du, R. 2005. Thermal comfort control based on neural [23] Cybenko, G. 1989. Approximation by superpositions of a sigmoidal
network for HVAC application. IEEE conference, 819-824. function, Math.Control Signals Syst. (MCSS), (2), 303–314.
[21] Zhao, Z.Y., Tomizuka, M. and Isaka, S. 1993. Fuzzy gain scheduling [24] Ken-Ichi, F. 1989. On the approximate realization of continuous
of PID controllers, IEEE Transactions on Systems Man and mappings by neuralnetworks, Neural Networks 2(3), 183–192.
Cybernetics, (123), 1392-1398.
290