1. Introduction
Accounting for more than 30% of energy consumption, the building sector is one of the most energy-intensive sectors and the origin of considerable CO
2 emissions that cause heavy environmental impact (ozone layer depletion, global warming, heat waves and fires, etc). This consumption is constantly increasing given the growing human requirements for well-being and comfort [
1]. Therefore, energy optimization in the building sector has become necessary for lower energy consumption and greenhouse gas emissions.
Several important aspects that support building energy optimization solutions have been studied:
- -
Improving the building envelope, which involves improving the fixed and mobile building components to reduce energy losses [
2]; it is one of the most popular methods used to reduce the energy needed to heat and cool buildings;
- -
Integrating and using renewable energy technologies, such as solar thermal and photovoltaic panels, geothermal heat, wind energy, etc., that have contributed to reducing fossil energy consumption fuels and thereby reducing global carbon emissions [
3];
- -
Improving equipment management by setting up systems and solutions for managing needs based on the flexibility of demand, smart buildings [
4], intelligent sensors [
5], and optimized control algorithms [
6,
7].
In the past few decades, several methods have been designed for thermal building control and regulation to improve energy consumption. One of the most used regulators is the PID controller, with more than 90% use in the industrial sector. Its popularity is due to its flexibility, simplicity in programming command algorithms, and robustness. Indeed, it enables acting on the performance of the system to improve its dynamic characteristics (damping, response time, overruns). Tuning PID parameters consists of finding the best coefficients
kp,
ki, and
kd in order to obtain an adequate response from the process, to be robust, fast [
8,
9], and precise while limiting the overruns.
But it has shown its limits, especially in the control and regulation of nonlinear or multivariable systems subject to change. It has also shown its limits in calculating optimal and adaptive control, which takes into account constraints and system evolution. This is true when the system is very complex, as a building system is. Therefore, to remedy these kinds of difficulties and for better optimization and to reduce the energy used, we need other control strategies that are dynamic and effective.
One efficient control approach consists of taking into account the variable aspects of the building system and covering the prediction of internal and external variables. Also, the optimal use of sensors increases the effectiveness of this control strategy.
Many studies have opted for optimal solutions based on artificial intelligence techniques facilitated by the development of computer technology, such as genetic algorithms [
10], Fuzzy Logic [
11,
12], Neural Networks [
13,
14], decoupling control, and others. They are used in several areas such as controlling electrical DC motors [
15,
16], automatic and robot manipulation systems [
17], controlling temperature performance [
18], and controlling systems in agriculture [
19].
The Neural Network is a mathematical processor that receives several inputs and delivers one or more outputs. Its processing consists of assigning to its output the result of a function according to the weighted sum of the input data according to an activation function. There are three main types of Neuronal Networks, which are listed as follows:
- -
Multilayer Perceptron [
20,
21]. This type is the most used. It comprises several layers of neurons that are fully connected to each other. The neurons of the same layer are not connected to each other but they are connected to all the neurons of the next layer.
- -
Radial Basis Function-Type Networks [
22]. They are three-layer networks originating from an interpolation technique. This technique proves to be both fast and efficient.
- -
Recurrent Neuronal Network [
23,
24]. It is a Neural Network whose connection graph contains at least one cycle. They are suitable for variable-size input data.
The use of Artificial Neural Networks, in the context of the thermal regulation of buildings, is motivated by the possibility of a continuously adaptive model design allowing integration of the variability aspect of the system. It also offers the possibility to learn and adapt the command according to the desired criteria with efficient and fast processing and execution.
So, our contributions focus on the development of a Neural Network PID controller combined with the prediction output approach to thermal building control in order to increase occupant comfort and reduce energy consumption.
This work is divided into six sections. The first one is devoted to describing the control objectives and motivations. In
Section 2, the modeling system design is detailed. The Neural Network identification process with prediction output (in the one hand) and the Neural Network PID process (in the other hand) are combined for optimal control in
Section 3. The simulations and results are synthesized in
Section 4, and the conclusions are given in the last section.
2. Objectives and Motivations
Given its nonlinearity, due to its physical dynamic aspect and its exposure to permanent disturbance, the building temperature system is a complex system that cannot be satisfactorily dealt with using the usual theory.
Figure 1 below shows the effect of disturbances and changes due to internal or external impacts on the internal building temperature. This effect has a significant impact when the system has a long response time. The idea is that instead of waiting for the effects of these changes over time, we adjust the control system, which will improve comfort by rejecting these disturbances in advance and will enhance the efficiency and energy profitability of the system.
To implement this solution, two steps are necessary: modeling and system identification for predicting output, and designing and adjusting the PID controller’s parameters.
3. Modelling System and Prediction Output Design
3.1. Approach Description
Different mathematical models, both extremely simple and complicated, are employed in simulations of the building’s energy performance to characterize the heat transfer and capacity in transient and permanent situations. For the implementation, validation, and simulation of the regulation and robustness system, which are important steps in the study, we designed a state model from building components (walls, ceiling, and floor) that were previously validated [
25] and whose methods of identification are described in several scientific journals [
26].
The different components of the building model are designed and modeled according to their physical aspects and behavior concerning thermal conduction and convection that depends on the dimensions and characteristics of the insulation materials. For our study, we considered a building with an area of 25 m2 with a temperature control system and indoor and outdoor temperature measurements every 5 min.
The building’s physical and thermal specifications are shown in
Table 1.
We adopted the model based on the first-order differential heat transfer equations of building components, and we used the zero-order method to transform the continuous model into a discrete model assuming a suitable sampling period to design a state space thermal building model as follows:
with
where
x(k): state vector;
y(k): output vector;
u(k): control vector;
w(k): disturbances vector;
A, B, Bw and C: the state matrices calculated from the coefficients resulting from heat and transfer thermal differential equations of building components;
T(K): temperatures;
Q(W): heat flow;
Qs(W): solar heat.
Index
w: wall, f: floor, c: ceiling, a: air.
i: internal, o: out, s: south, n: north, e: east, we: west.
The role of the established state model is to validate the identification results below by the Neural Network approach, shown in
Figure 2. It is also used to simulate the effect of the degradation of the building’s fundamental thermal characteristics.
3.2. System Identification by Neural Network Approach
The identification system based on the Neural Network is very practical. With intelligent and continuous learning methods, this approach can learn sophisticated nonlinear relationships between several parameters, allowing real identification of the systems. Several parametric system identification algorithms have been designed using Neural Networks to overcome standard identification limitations [
14,
27], such as the nonlinearity of building systems.
In order to optimize thermal regulation and control energy, we designed a model for predicting thermal output. The goal is to follow the parameters, from raw data, of the nonlinear building thermal system by integrating its real characteristics, particularly the delay related to the slow aspect of the thermal building response time [
28], the change in heat capacity, and the heat transfer of isolates.
The system is considered as a black box with several inputs
yj: control values u, temperature values y, and external measured effects d, as shown in
Figure 3.
Since deep learning was created, the activation function is always the core of a neural network’s structure that impact significantly the model’s performance, the common activation functions include: logistic-sigmoid functions, hyperbolic tangent functions, radial basis functions, etc. The activation function introduces a degree of nonlinearity that is valuable for most, but there is no fixer strategy defined for choosing activation functions to increase neuronal network outputs performances. Moreover, many studies have made improvements to study the effect of the activation function on improving the accuracy rate [
29].
The relationship between input identification systems
yj and estimated values
y* is a nonlinear function of its total input according to the most widely used function bias
, as follows:
with
The model’s performance is impacted also by the number of neurons within the hidden layer. Too few neurons will weaken ability of networks to learn from the data measurements. Too many neurons will cause an overfitted of calculation without providing over-precision. Because the ideal number of hidden neurons cannot be determined with absolute certainty. Some studies use number of hidden neurons based on the number of inputs and the number of outputs. Other studies consider a high number of hidden neurons as a complexity and reduce it during model training without compromising the prediction accuracy. The considered model is composed of a hidden layer.
The objective of identification is to find, for each input vector, a set of weights that ensures an output
y* identical or sufficiently similar to the target vector
y. Based on the following formula, the adjustment of the weight system
w (identification values) is carried out continuously:
where
E is the total error describing the Neural Network’s performance with a specific set of weights. It presents the difference between the actual and estimated output vectors for each computation step. The description of error
E is as follows:
Determining the derivative of
E with respect to each network weight is essential in order to minimize
E.
From Equation (5), we obtain
We derive Equation (2) and obtain
We also derive Equation (3) and obtain
Then, from Equation (6), the weight updates become
In order to minimize the discrepancy between the output model and the actual output, we have seen how to calculate the value of the network weights and how to change it until the target is achieved. The identification system will be qualified based on the error function defined by Equation (5). The Neural Network outputs are only elements of bias recalculated in real time to consider the external and internal system parameters changes. An important element for reducing computation time ƞ is the coefficient between 0 and 1. But determining the best value for it requires iterative calculation.
After the system modeling phase, we will approach the design of the control.
4. Thermal Management Controller Design
4.1. Classical Discrete PID Controller
A PID controller (proportional–integral–derivative) is an automatic control closed-loop system widely used in industrial control systems due to its simplicity and versatility.
A PID controller continuously calculates an error value e(k) as the difference between a desired set point and the measured process variable and applies, in a given sampling time, a correction on the error e(k), and its integral and its variations. The proportional, integral, and derivative terms are added together to calculate the output of the PID controller.
The PID controller is represented in Equation (11):
where
kp represents the proportional gain,
ki represents the integral gain, and
kd represents the derivative gain [
30]. The most common conventional structure to implement the discrete PID controllers is depicted in
Figure 4.
By choosing these parameters, the controller can perform the desired control by acting on settling time, steady-state error, and system stability. However, the classic PID regulation remains limited, in particular, to adapt to the variations specific to the regulated systems, hence the interest in setting up a regulator which has the advantages of the classic PID regulator but with variable and adaptable tuning parameters according to the regulated system.
4.2. PID Neural Network Control Management
In this section, we design the PID controller with the Memory Neuron Network model. By combining the algorithms of the classical PID controller with the Neural Network learning function, the PID Memory Neural Network algorithm creates a specific type of PID controller with a learning function. It has a continuous adaptation of parameters and reduces the capacity and calculating time using a supplementary memory neuron [
31] to provide layers for input control and feedback values. The Neural Network algorithm consists of finding the optimal PID parameters, minimizing in each calculation step the following criterion. Thus, the optimal value is not obtained until the algorithm completes the learning.
As we know, the continuous PID controller is expressed using the Laplace transformer:
With the approximation:
s = 1 −
z−1 we obtain
By applying the inverse
z−1, the PID controller is represented in Equation (15), where Δ
u(
k) is the increment of the output of the controller at
kth time.
The PID Neural Network applies a topology with closed-loop layers, as shown in
Figure 5.
The relationship between the neuron and inputs is illustrated in
Figure 6 below.
with
xi(k): ith neuron input at time k, given by (17);
C(k): output neuron output at time k, given by:
Neural Network PID tuning parameters
kp,
ki, and
kd are adjustable in each calculation step [
32,
33]. They are represented in the neuronal model with the weight of the connection
w1,
w2, and
w3, respectively. The system inputs represent combinations of the error
e(
k):
The weights
wi(
k) were adjusted using the derivation function of the
J criterion in Equation (12).
where
µ is a learning rate of
wi.
The derivation of Equations (12)–(16) makes it possible to obtain the adaptation weight.
And by the same method, we obtain for
(
k):
Admittedly, with excellent characteristics, such as a simple structure, self-learning capability, good robustness, and better performance, control by the PID Neural Network is an intelligent control that has proven this performance to be superior to the classical PID regulation. However, it can be significantly improved by integrating a supplementary readjustment of these tuning parameters according to the future states of the system controlled.
4.3. PID Neural Network Control Management with Predictive System Model Design
A smart control strategy management system is crucial for smart building systems; it can produce the control logic adaptively depending on the building’s present and changing environmental conditions.
The algorithm below summarizes the stages of intelligent control of the interior temperature. It highlights, on one hand, the identification of the system considered as a black box, whose identification parameters are adjusted and identified in sampling periods lower than the response time of the system, and on the other hand, the neural PID controller algorithm, which is also adjusted according to the output prediction.
Figure 7 shows the connection configuration in a closed loop of the PID Neural Network. The algorithm of the Neural Network PID controller with the predictive model is shown in
Figure 8.
We obtain satisfactory results if the output prediction is closer to reality and if the data domain of future external disturbances is larger. For this, several studies have been conducted to examine and predict the external climate using machine learning methods [
34]. Machine learning methods are widely used to predict future intensity–duration–frequency curves that are important in terms of weather forecasting, or to estimate climate trends and components on a daily or seasonal scale. Several databases with labeled weather fronts and several methods are proposed to provide accurate models that can be used for climatological analysis necessary for disturbances prediction, and for also allowed the updating of maps to any time, which is important for regions with large seasonal variations.
5. Experimental and Simulation Results
Concerning the disturbances, these are real measurements of external temperature that were recorded from 13 March to 15 March during a real experiment. It is found that the radiation effect is minimal compared to the effect of the external temperature, for this, only the effects due to the external temperature are considered.
For the set point, we consider a set point of 25 °C from 4 a.m. to 6 a.m. and from 6 p.m. to midnight, and a value of 18 °C from 6 a.m. to 6 p.m.
The above algorithm with the chosen criteria has been implemented to emphasize the main characteristics of the system, particularly its nonlinearity and delay. The model was validated (see
Figure 9) using the best fit and the prediction of external effects when possible, and a correlation analysis to compare the estimated model with measured data of the building’s internal temperature.
It is noted that each time the effect of the variation in the disturbances is important, the value of temperature modeled by the Neuronal Network approach is shifted compared to the temperature resulting from the model of the state, but immediately recalculated to get closer to the true value.
For the PID neuronal controller’s design, several simulations are made to prove the effectiveness of the approach compared with the classical PID controller in terms of regulation, robustness, and energy efficiency.
Several methods exist for the choice of the ordinary parameters of the PID controller. The choice of parameters was validated using the best adjustment by the Ziegler–Nichols method, which gives the classic PID adjustment as kp = 150, kd = 10, and ki = 1.
Figure 10 shows the efficiency of the neural PID parameter readjustment approach by integrating the prediction of its future effect to increase the building’s thermal comfort and energy efficiency. It also shows the effectiveness of the approach adopted in terms of energy optimization and regulation with respect to internal system parameters’ variation and perturbation compared to an ordinary PID controller.
The same figure shows the effect of external disturbances on the classic PID controller system. Indeed, as it is a thermal system with a very long response time, the effect due to the external climate conditions variations does not manifest directly and instantly on the internal temperature, which explains the action of the classic PID controller after a time delay. However, with neural PID Neuronal Network controllers, the effect of these disturbances is taken into account when designing the controller and it is increasingly limited if the external effects are predicted sufficiently and accurately.
Figure 11 is an illustration of the robustness of the PID Neural Network. An evolution of the physical and thermal building characteristics is simulated between steps 100 and 150 using the characteristics listed in
Table 1. It can be seen that the classic PID regulation is directly impacted by this evolution, whereas the PID Neural Network is robust and allows adaptation of the controller to the new building characteristics.
In order to improve our approach, the energy optimization performance of thermal control based on the PID controller adjusted with the Neural Network model was compared with classical PID and Neural Network PID.
Figure 10b shows the efficiency of the neural PID approach in energy optimization. Overall, the gain observed is from 8% to 11% between the classical PID and the Neural Network PID controller designs.
Control results for all three approaches converted to energy (represented by control power air), whether heating or cooling power (positive or negative), showed significant energy gains. The results are listed in
Table 2, which contains the calculations of
Root Mean Square Error and the energy consumption for each type of control to make the comparisons.
6. Conclusions
In this article, in a universal context of environmental protection and energy saving characterized by an important development of solutions based on artificial intelligence and data management, an adaptive Neural Network PID controller was proposed to control nonlinear and complex thermal building systems.
Efficient results were obtained and improved by PID tuning parameters adjusted with self, online, and real-time correcting according to the past, actual, and especially future system states depending on internal and external parameters.
The results show that the proposed approach is efficient for regulation and set point tracking, and also shows its efficiency in assuring a robustness control. In terms of optimization, the approach allows a significant reduction in the control energy from 8% to 11% between the classical PID and the Neural Network PID controller designs.
In this study, we designed a PID controller with a Neural Network approach to have better energy performance and better thermal comfort. An extension of this approach is envisaged for the upstream part of self-production and energy storage and for energy use in other controlled systems in buildings. So, we can boost the energy optimization and intelligent control of future buildings by storing energy during times of excess and optimizing energy use during times of deficiency.