1 Introduction

For a long time, there were correlations between the existing processes in building automation and industrial processes. If we compare the existing automation in some industries (process automation) and applied to environmental conditioning, lighting and automation in electric area, important processes within buildings, we find that the requirements for greater control distribution and increase in the complexity of the algorithms are common (Fig. 1). Analyzing the processes of building automation, we studied the air conditioning and control algorithms applied to this process, to reduce energy consumption and, at the same time, to maintain comfort conditions (Albieri et al. 2009; Ashrae 2003; Costa 1997). To obtain effective control of the air conditioning, we studied the application of PID controllers, control using fuzzy theory and control system using neuro-fuzzy (ANFIS algorithm).

Fig. 1
figure 1

Structure of building automation

2 Application of fuzzy theory

There are applications of fuzzy theory in various areas of automation, such as motor control, temperature control of reactors, temperature control in air conditioning system, control of industrial furnaces etc. The development of the control of several processes, using the fuzzy theory, is a powerful tool, where there is difficulty in developing a consistent mathematical model of the process to be automated, and/or the application of a mathematical model is not feasible, either for the complexity or the difficulty of solving this model into a viable processing time, other techniques may be used to solve the automation of this process: one of these techniques is based on the fuzzy theory.

Most applications of fuzzy control follow the algorithms proposed by Madani and King (Costa 1997; Terano et al. 1991; Xu and Zhou 2012). Figure 2 shows a diagram of a fuzzy controller proposed by Madani. Basically, we can say that the parts of a fuzzy control are: a fuzzification interface, a knowledge base, the inference engine, and defuzzification interface (Cordón O et al. 2001).

Fig. 2
figure 2

Structure of fuzzy control (Costa 1997)

3 Adaptive-network-based fuzzy inference system: ANFIS

The neuro-fuzzy ANFIS was created by Jang (Costa 1997). This architecture can be used in the implementation of systems for forecast and approximation of functions. This architecture is equivalent to a fuzzy inference system of Tsukamoto, although it can be implemented also with a fuzzy inference system of Takagi-Sugeno. ANFIS network consists of a fuzzy inference system based on an adaptive network directly. A direct adaptive network consists of two types of nodes (Bayraktar et al. 2012; Costa 1997; Jang 1992).

  1. (i)

    Adaptive node It is represented by a square. Node function depends on the outputs of previous layer nodes and a set of parameters \(( {\alpha _1 ,\alpha _2\cdots \alpha _q })\) that must be trained by a training algorithm.

  2. (ii)

    Fixed node It is represented by a circle. This differs from the adaptive node in its function because the node has no parameters to be trained.

From a set of training data, one must train the network to find a set of adaptive parameters for the nodes that minimize a function of interest. These training algorithms are known as learning rules. Figure 3 shows the Takagi/Sugeno reasoning and its equivalent ANFIS (Costa 1997; Jang 1992).

Fig. 3
figure 3

a Takagi-Sugeno reasoning. b Equivalent ANFIS (Jang 1992)

4 Classification and regression tree (CART)

A decision tree divides the input space of a dataset into mutually exclusive regions, each designated by a legend, a value or action to characterize their data points. The mechanism of the decision tree is transparent and one can follow the tree structure easily to explain how the decision is made.

Therefore, the method of decision tree has been used extensively in machine learning\(, \)expert systems and multivariate analysis. Maybe it is the most highly developed technique for samples of data divided into a collection of decision rules. The decision tree is a tree structure consisting of internal and external nodes connected by branches (Fig. 4). An internal node is a processing unit that makes a decision based on the evaluation of a decision function to determine which child node should be visited later. Instead, an external node, also known as a leaf or terminal node has no child nodes and is associated with a caption or a value that characterizes the data and leads to his visitation (Costa 1997; Haykin 2009; Jang 1992; López et al. 2008).

Fig. 4
figure 4

a Binary decision tree and b partitioning of the input space (Jang 1992)

In general, a decision tree is employed as follows. First it is shown as a set of data (usually a vector composed of various attributes or elements) to the starting node (or root node) of the decision tree. Depending on the outcome of the decision function used by the internal node, the tree will branch to one of its children. This is repeated until the terminal node is reached and the caption or value assigned to sort the data contained in the tree (Jang 1992).

In the case of a binary decision tree, each internal node has exactly two children, and then the decision can always be interpreted as true or false. Of all the trees decisions, decisions of binary trees are the most frequently used because of its simplicity and extensive knowledge of their characteristics.

Decision trees used for classification problems are often called classification tree and each terminal node contains a label, which indicates an expected class of factor characteristic data. In the same vein, decision trees used for regression problems are often called trees regression and legends of the terminal node can be constants or equations specifying the value of the result (output) provided for an array of data entered (Jang 1992; Terano et al. 1991).

5 Air conditioning system control

The construction of the fuzzy simulator consists of two parts: the first is the study and implementation of the control algorithm using fuzzy logic and the second part is to construct a program that provides the input variables for the fuzzy controller, and also receives the output variables of the controller.

Our task was to run the simulation of this “process” and the generation of control for air conditioning. The performance of the control points in the air conditioning system is summarized in the diagram shown in Fig. 5. In Fig. 5, we have a circuit diagram of air conditioning to maintain comfort conditions of an environment. The circuit is composed of a fan-coil, cooling coil, valve, and temperature control and flow control air. The fan-coil provides a flow of air passing through the coil. The air flow entering the environment and with a pre-defined temperature controller ambient temperature. The ambient temperature controller controls the valve that regulates the passage of the cold water cooling coil.

Fig. 5
figure 5

Diagram of air conditioning

5.1 Implementation of fuzzy control

The input variables of the simulator were chosen after analyzing the model used to estimate the energy consumption of the air conditioning system. These variables were divided into two groups: the first group, where the variables are set as parameters for adjustment or calibration of the system being simulated and the second in which the variables are related to the operation of the building, without changing the physical configuration of the air conditioning facilities (Peixoto et al. 1990a, b; Sauer and Howell 1989).

5.2 Variable related to consumption

To analyze the behavior of the energy systems of air conditioning systems through control, which monitor and control their equipment, it was chosen as the variable energy consumption in the air conditioning system.

Analyzing the curves of energy consumption of automated buildings, we come to some conclusions about the values of consumption and their variations during the day. These variations will be considered in the preparation of the variable relevance curve related to consumption.

Operating points values energy consumption per area will be treated as error margins on an operating point defined by user simulator. Thus, the simulator will enter an operating point (“set-point”) and the simulator will work to maintain consumption close to the “set-point” defined by the user. Figure 6 shows the curves of relevance with respect to error-energy consumption.

We have the following membership functions adopted for the input variable error consumption. Membership functions were adopted in triangular and trapezoidal shapes. Intervals variable error consumption were defined by the criteria of tariffs electric energy and measures for energy conservation.

Fig. 6
figure 6

Membership function of error-energy consumption

Partition zero when the error between the “set-point” set to the value read consumption and consumption in the air conditioning system is between 30 % below the “set-point” or 10 % above the value “set-point ”. This zero-error Consumption is the perfect fit for the conditions imposed by the user. This point should be sought by the user with the value of “set-point” as low as possible.

Partition NS (30 % below the set-point) when the error is between zero (0 %) and 50 %, we have the NS partition. The rules that control the simulator will take some steps to reduce control over the equipment of air conditioning and let it increase the comfort level in the building.

Partition NL (50 % below the set-point): this partition error consumption is a fault between 30 and 50 % below the “set-point” of consumption and consumption read in the process. In these situations, the comfort conditions are maintained or if there is need, will increase the comfort level. We may also release central cooling units to work in thermodynamics/accumulation (storage of “Tanks Ice”).

Partition PS (10 % above the value of set-point): this partition error consumption is related to an error between 0 and 20 % above the “set-point” of consumption and consumption read in the process. This value of 10 % in consumption is defined as the air conditioning system has a large weight in the energy consumption of the building and most commercial buildings work with the model horosazonal tariffs for energy consumption. This model, used in large buildings, allows the user a 10 % variation in energy consumption of the building, above the contracted concessionaires.

Partition PL (20 % above the value of set-point): this partition error consumption is related to an error between 10 and 20 % above the “set-point” of consumption and consumption read in the process. From this range, the control will adjust the output variable to control in an extremely critical process, since in this case the user of the building should be paying an increase in energy consumption, as shall have exceeded the contracted amount with the concessionaire.

Studies done to present the partitions of the variable error in energy consumption of a “set-point”, defined by the user, take into account the high energy consumption of air conditioning, to get to the error rates adopted, since the range of tolerance of 10 % in consumption is recorded by the dealers on the total consumption of the building, but for our study, we adopted this track, since we are assuming that the building automation systems will control other processes, whose installment consumption is lower. The partitions have been described using sets: NL, negative large; NS, negative-small, Ze, zero; PS, positive-small; PL, positive-large.

5.3 Variables related to the air conditioning system

In the air conditioning process, there are two sets of parameters: performance and operational parameters of the model presented. The performance parameters are used in the model calculations for the variables, and their values in a given range; these parameters depend heavily on the physical configuration of the air conditioning system. Already operating parameters are variables that can be modified in air conditioning systems, without the need of physical changes in the system. Basically, the operating parameters are used in the simulations of the proposed energy conservation and among these parameters there are the variables in this study (Peixoto et al. 1990a, b; Sauer and Howell 1989).

5.4 Error-temperature chillers: Error TAG

The variable Error TAG was used because it represents the variation between the temperature set in cold water “Chiller” (“set-point”) and the temperature measured at the output of “Chiller” to the secondary “Fan-Coils”. The temperature Chillers, being sent by the central unit of refrigeration (“Chiller”) to the secondary equipment “Fan-Coils”, brings the information needed for the cooling air required by the environment.

The flow of chilled water passing through the coils, of the “Fan-Coils”, is in most projects in the range of 5 to 8 \(^{\circ }\)C. This low temperature regulates the air blown by the fans of the “Fan-Coils” skirt environment at a temperature between 12 to 18 \(^{\circ }\)C. We can say that the control flow in cold water or temperature control of this water is directly related to the energy consumption in the air conditioning system, because the variation of temperatures in “comfort zones” will determine the reduction or increase in the flow of chilled water which passes through the “Fan-Coils”. Figure 7 shows the membership function of input variable Error TAG.

Fig. 7
figure 7

Membership function of Error TAG

5.5 Error-water temperature condensation: Error TAC

This variable measures the error between the “set-point” water condensation fixed in cooling towers and water temperature condensation in the output of the towers. The choice of this variable was due to its close relationship with the chilled water temperature coefficient and efficiency central units refrigeration, because the water that passes through the capacitor carries the heat removed from the atmosphere through the chilled water.

The exchange of heat (thermal load) between the air at room temperature and the cooled one inside the building is sent to the chilled water. This exchange of heat between air cooled and chilled water, ends up being sent to the outside air through the cooling tower (Peixoto et al. (1990a, b)). Figure 8 shows the membership function adopted for the input variable Error TAC.

Fig. 8
figure 8

Membership function of—Error TAC

5.6 Error in heat load

This variable was chosen, because it brings the total gain of heat absorbed by the building, as well as the heat produced inside the building.

There are a lot of variables that affect the behavior of a building. This makes it difficult for an accurate equation to determine the energy consumption and the thermal comfort, but for control systems, the determination of thermal load is very important, because it is a summary of all the variables involved in the thermodynamic behavior the building (Ashrae 2003; Bayraktar et al. 2012; Sauer and Howell 1989). Figure 9 shows the adopted membership function for the input variable error in heat load.

Fig. 9
figure 9

Membership function of—error heat load

After the definition of the input variables and their membership function, we can incorporate them into the development environment for fuzzy applications, as noted earlier. Membership function described above can be changed in fuzzy environment application development. We can also test other control conditions.

5.7 Output variables fuzzy simulator

For the control of the energy consumption in the air conditioning system, the output variable of the fuzzy simulator was chosen as the operating point of the controllers, which control the temperature in the building. We adopt the point of operation of the controllers to be equal in the different areas of the building. Regarding the differences in conditions of comfort of each “Comfort Zone” of the building, they will be treated by the local controllers of each environment.

From the analysis of the air conditioning “process” and interference of automation systems to control and monitor the same, the variable TSC were chosen as the primary outcome variable of the fuzzy simulator. The TSC is a standard “set-point” variable temperature for controllers responsible for maintaining comfort conditions in the environment. We will work with partitions of variable TSC divided into temperature ranges, representing the parameters that will be sent to the controllers of “Fan-Coils”.

The controllers receive these parameters and their scope will adjust the flow of chilled water to meet the stipulated temperatures for the environment comfort, through the building automation system that will be implementing the algorithm of fuzzy control.

The ranges and temperature ranges of the “set-point” controllers were defined from studies for evaluation of a thermal environment developed by ASHRAE (American Society of Heating Refrigerating and Air-Conditioning Engineers) and Fanger (Ashrae 2003; Sauer and Howell 1989; Wang and Jing 2006). The method of Fanger establishes a scale of thermal sensation involving various levels. These levels represent a measure of the variation of the comfort conditions in the environment and measure the distance between the comfort conditions in the environment with an index called thermal activity index.

The values adopted for the ranges of temperature are variable TSC, project data of the installations of air conditioning systems and analysis of the equation of Fanger, described above. These data are used in the algorithms of building automation systems and can be changed according to the needs of end users (Ashrae 2003; Itauplan 1981; Kapadia et al. 2009; Sauer and Howell 1989; Wang and Jing 2006). Figure 10 shows the membership function of the variable TSC.

Fig. 10
figure 10

Membership function of TSC

6 Control rules

The controller control rules are defined with the convenient choice of input and output variables for the simulation of the control of air conditioning needed. Usually the set of rules is based on experience with deployments of systems building automation and knowledge of the people who operate the equipment of air conditioning systems. In this work, the rules have been generated through the decision tree—CART. The purpose of using the decision tree was making automation of generating rules through information obtained in the building. The automation of the rule base allowed the adding of new information to the knowledge of the installation of air conditioning system. Figure 11 shows a diagram with the method used in this work.

Fig. 11
figure 11

Diagram of the study of air conditioning system

We have the following description of an example database built from variables of the air conditioning system (Table 1).

Table 1 Example: table of rules of simulations

The choice of the input variables and output of fuzzy controller, the data were applied to the CART algorithm and we take the decision tree rules for neuro-fuzzy system. This set of rules in conventional fuzzy systems is based on experience with deployments of building automation systems and knowledge of the people who operate the equipment of air conditioning systems.

Example rule

\(\underline{{\varvec{If }}}\) Error-Energy Consumption=NL \(\underline{{\varvec{and}}}\) Error-AG=ZE Error-TAC \(\underline{{\varvec{and}}}\) ...

... Error-Heat load=AL \(\underline{{\varvec{Then}}}\) TSC=NT or FS

Justification This rule states that the low consumption will release the cooling units to increase its cooling capacity, testing the water temperature condensation is not high, as this may compromise the air conditioning system. Moreover, the high error in thermal load indicates that the areas to be conditioned are getting a heat gain and the same can be removed while maintaining the comfort conditions, as the energy consumption is very low.

7 Results of simulations

This simulation shows the first control model adopted by fuzzy simulator and shows the comparison between the control type Toggle and control with PID. In Fig. 12, a graph plotting the behavior of energy consumption for PID control, fuzzy control, and simulation CART-ANFIS is shown. We analyzed the data from these simulations with the data from the operation of the building standard. This building has the control air conditioning PID.

Fig. 12
figure 12

Consumer behavior control with PID, fuzzy, and ANFIS

In the analysis simulations compared results using the CART-ANFIS system with the results obtained with PID control and fuzzy control. This comparison is illustrated in Fig. 12, where we can see a reduction in the consumption of 10.94 %. The simulation system with the CART-ANFIS resulted in a reduction of energy consumption, and its variability in relation to the average energy consumption was lower (Standard deviation = 1,514.17).

Comparing fuzzy control with PID Control there is a reduction in energy consumption of 13.80 %. Regarding the variability of fuzzy control in relation to PID control, we note that there was a smaller dispersion (variability) around the mean of Energy Consumption for fuzzy control (Standard deviation = 1,041.02).

Other simulations by changing the input variables, membership functions, and number of rules, the results are presented in the following simulations were made:

7.1 Simulation 02

We changed the input of the simulator variable, starting to analyze the flow of Units Chillers (Fan-coil). We consider the flow Chillers plumb in the “Fan-coils” in place of water temperature. This change was implemented to test the effects of reducing or increasing the flow Chillers supplied to “Fan-coils ”. In practice, we can say that this change is implemented with the variable frequency pump Chillers and pumps water condensation. Analyzing air conditioning system, we can say that if the control device pumps allow a control of the flow of Chillers and this control is reference to the need for refrigeration required by “Fan-coils”, you can make an adjustment thin chilled water supply and consequently a reduction in energy consumption. The following shows the results obtained from the use of this variable, Fig. 13.

Fig. 13
figure 13

Consumer behavior using variable flow chilled water

Results of simulations 02:

Simulation 01:

  • Average = 15.679,50 KWh

  • Standard deviation = 1.041,02 KWh

  • Consumption reduction = 13,80 %

Simulation 02:

  • Average = 13.640,91 KWh

  • Standard Deviation = 1.102,66 KWh

  • Consumption Reduction = 25,01 %

7.2 Simulation 03

In this simulation, we change the shapes of the membership functions of the input variables. Temperatures in the variable chillers and water condensation adjust these variables to Gaussian functions. This change was performed after assessment and evaluation of the curves of the temperatures mentioned. Measurements were made on the premises of air conditioning system and saw that the curves could be adjusted to the Gaussian functions. The graph of simulation using the Gaussian forms for the input variables is shown in Fig. 14.

Fig. 14
figure 14

Consumer behavior using other membership functions

Results of simulations 03

Simulation 01:

  • Average = 15.679,50 KWh

  • Standard deviation = 1.041,02 KWh

  • Consumption reduction = 13,80 %

Simulation 03:

  • Average = 15.185,00 KWh

  • Standard deviation = 1.064,62 KWh

  • Consumption reduction = 16,52 %

7.3 Simulation 04

In this simulation, we made changes in the number of rules for the simulations. Basically, testing the ability of the system to adjust the energy consumption with changes in the amount of “knowledge” (rules) introduced in the controller. We use the first test (simulation 4.1.) A set of rules greater than thirty (30 rules). In simulation 01, 18 rules were used to execute the first simulation (simulation 01). In the second trial (simulation 4.2.), the number of rules was reduced to eight (8) rules, and tries to maintain stable control (Figs. 15, 16).

Fig. 15
figure 15

Consumer behavior using 30 rules

Fig. 16
figure 16

Consumer behavior using 08 rules

Results of simulations 4.1

Simulation 01:

  • Average = 15.679,50 KWh

  • Standard deviation = 1.041,02 KWh

  • Consumption reduction = 13,80 %

Simulation 4.1:

  • Average = 14.677,27 KWh

  • Standard deviation = 937,54 KWh

  • Consumption reduction = 19,31 %

Results of simulations 4.2

Simulation 01:

  • Average = 15.679,50 KWh

  • Standard deviation = 1.041,02 KWh

  • Consumption reduction = 13,80 %

Simulation 4.2:

  • Average = 16.991,82 KWh

  • Standard deviation = 1.634,12 KWh

  • Consumption reduction = 6,58 %

8 Conclusions

We can conclude from this study that the use of the CART-ANFIS system proved to be efficient in controlling power consumption in a standard building. For the air conditioning system, we can say that the response of the control simulation system by ANFIS-CART allowed converging to a balance between power consumption and maintenance of comfort conditions of the standard building used in this work. An important point was to get a good result in the reduction of energy consumption using the rule base generated from the data of the building itself. The application of decision tree—CART algorithm was successful because the results that were achieved without the use of expert knowledge of the building were satisfactory. This is also an important feature to shorten the development time for the air conditioning system control and to be more independent of expert knowledge for the application of the fuzzification rules.