Abstract

In order to provide the comfortable areas for human, the comfortable rooms are the basic needs area, controlled temperature, and relative humidity (RH). The aim of this study is to control and maintain the temperature and RH of the comfortable room using a proportional integral derivative (PID) controller tuned by metaheuristic optimization. In tuning gains of the PID controller, the modern metaheuristic optimizations, ant colony optimization (ACO), and symbiotic organism search (SOS) are applied and the performance of the proposed control system is compared to that of the traditional methods. In the experimental testing, the controlled room size is tested in the area of width 7.80 m, length 8.00 m, and height 3.80 m. The simulation results show that the performance of the proposed control system-tuned gains of PID controllers by using SOS algorithm has the least steady-state error with 15% rise time and also the overshoot can reach the setpoint. In the case of disturbance occurring in the system, the proposed control system is able to approach the setpoint. Therefore, the PID controller tuned by SOS algorithm can regulate the temperature and humidity of the comfortable room, proficiently.

1. Introduction

One of the most important in human life for working, resting, and others is in a comfortable environment for performing activities. Its effectiveness concentrates on work efficiency, quality of life, labour productivity, and also human health. By human nature, an average human being spends 90 percent of his life in a room to perform various activities [1]. As mentioned previously, a room that makes human comfortable is a crucial part considered while performing indoor activities. In schools, a comfortable environmental condition can increase learning by students [2]. In hospitals, a comfortable room can reduce seclusion, restraint use, and assaultive behaviors of clients [3]. To construct a comfortable room, both environmental conditions and human factors affect the thermal comfort. For environmental conditions, temperature and RH play an important role. There are many research studies about thermal comfort rooms with an air-conditioned system such as drying room [4] and garment workshop room in schools [2] and hospitals [3]. According to the American Society of Heating, Refrigerating and Air-Conditioning Engineers (ASHRAE) standard, thermal comfort is the condition of the mind expressing satisfaction with the thermal environment. Thailand is a country situated in tropical zones. The comfortable temperature range of ASHRAE standard is between 22°C and 27°C. Also, the thermal comfort for the humid tropical range is between 24°C and 27°C limit with an RH of 50% to 60% [5].

In order to control the temperature and RH within the comfort range, PID controllers are widely applied. The proper design of the PID controller plays an important role in balancing the temperature and RH. Xiaochen and Chunxuan [6] studied how to control the temperature and RH of an air-conditioned room using a PID controller design method based on internal model control (IMC-PID) for controlling the multivariable system. Febiyani et al. [2] studied the influence of temperature and RH on meat-dry room, which caused overuse of energy, by using a digital separation method. The analysis showed that there was a clear pairing in drying room control. The deviation of RH control would increase 1–1.5%, and the accuracy of temperature control will increase up to ±0.1°C. Gouda [7] studied the strategic development of controlling fuzzy ventilation to ventilate hot air and reduce humidity in a laboratory. The combination of improving the condition and the steady state in creating comfort conditions was studied to set the range of setpoint. In general, the capacity of ventilation control system based on sprinkle process decreases the energy usage and improves environmental condition. Hung et al. [8] studied an interesting controlling method by advance setting of the intelligent predetermined control method (IPCM) in order to improve the use of energy and water. An increase in temperature with a stable RH under the condition of no load is considered to test the possibility of IPMC. The results showed that IPCM could save energy and water and also had complexity in controlling temperature and humidity accurately. Outanoute et al. [9] introduced a method focused on using artificial intelligence in constructing a model of temperature and RH within a glass house. Recurrent artificial neural network, time relay, and MATLAB/Simulink were also used. The experiment showed that this method could predict the temperature and RH within a glass house with high accuracy. Behrooz et al. [10] suggested a new model using fuzzy cognitive map (FCM) to control the parameter of air conditioning (A/C) of direct expansion (DX). The design of FCM suitable for air-conditioning systems might increase the efficiency of energy use and save more energy for building automation.

Over the last decades, metaheuristic algorithms are becoming an increasingly popular part of the optimization method implanted to simplify the difficulties. It is inspired by natural behaviors and biological events. Most of the ACO and SOS methods are widely applied in the simulation systems. However, these are not applied to the real systems. Evidently, ACO and SOS are very challenging algorithms to be considered. The ACO is a metaheuristic algorithm proposed to solve hand combinatorial optimization problems. It is inspired from the behavior of real ants with the pheromone trail laid by them. The ACO can be applied to different fields of work, especially for tuning PID. Chiha et al. [11] proposes a new tuning PID controller method using multiobjective ACO compared to Ziegler–Nichols (Z-N), genetic algorithm (GA), and ACO. Qiu et al. [12] applied ACO tuning to the PID algorithm for precision control of functional electrical simulation. On the other hand, the SOS was first introduced in 2014 as a new metaheuristic optimization algorithm by Cheng and Prayogo [13]. It describes the symbiotic interaction strategies among organisms in order to survive in an ecosystem. Many research studies apply SOS to tune the PID controllers for wastewater treatment process [14], integrated power system, multiarea power system, and load frequency control [15]. Furthermore, there are some studies combining SOS and ACO with many techniques for tuning PID. Huang [16] combines two metaheuristic algorithms, genetic algorithm (GA) and ACO, for finding the optimal kinematic controller of four-wheeled omnidirectional mobile robots. Their simulation results present better performance in achieving both trajectory tracking and stabilization. Çelik and Öztürk [17] propose a hybrid SOS and simulated annealing (hSOS-SA) technique applied to tune PID controllers for automatic voltage regulators (AVRs). The results were more accurate and more stable than using the original SOS. Truong et al. [18] improved SOS algorithms by integrating Quasi-Opposition-Based Learning (QOBL) and Chaotic Local Search (CLS) for global optimization problems. The proposed algorithm provides a more accurate solution than the original SOS. There are many studies which applied the metaheuristic optimization for tuning the PID controller and also improved these algorithms to obtain better solutions for various problems. However, only a few research studies established in real-world systems. Blondin et al. introduce a novel combination of ACO and Nelder–Mead method (ACO-NM) to find an optimum tuning for PID controllers. They present for solving the real automatic voltage regulator (AVR) problems. The ACO-NM obtains better or equivalent solutions [19]. Mandava and Vundavilli propose the newly Modified Chaotic Invasive Weed Optimization (MCIWO) algorithms for tuning to obtain gains of , , and for the biped robot [20]. The MCIWO is seen to converge quickly when compared with the PSO-based controller. Therefore, it is unsure how metaheuristic optimization performs in tuning the optimal PID controller applied for the real-world systems.

As mentioned earlier, this study aims to apply metaheuristic algorithms ACO and SOS in tuning the PID controller for controlling temperature and RH by constructing the real comfortable room system. In Section 2, the information about comfortable room and four optimization control techniques of Z-N, pole placement, ACO, and SOS are briefly described. Meanwhile, the comfortable room plant and the optimal parameters of ACO and SOS are illustrated in Section 3. The results of this study are therefore investigated and discussed to show how ACO and SOS perform in Section 4. Finally, the overview of this study is summarized in Section 5.

2. Theories

2.1. Principle of Comfortable Room

In order to make people feel comfortable, a comfortable room is designed and controlled following the ASHRAE 55 standard which sets the prediction index for predicting comfort condition of a person to the surrounding environment. This is called the predicted mean vote (PMV). The comfort temperature is defined between 23 and 27°C, and RH is in the range of 30–70%. The principle of refrigeration is the process of extracting heat from a room that requires a temperature drop by using the heat transfer process through the refrigerant. Then, the refrigerant transfers heat to the outside air by using the vapor process, condensation, expansion, and evaporation. However, the A/C system is able to control the temperature in the control area according to the desired conditions. The A/C system can control not only the temperature but also the RH, quality, circulation air, and noise levels in air-conditioned or working areas [5].

2.2. Relative Humidity and Moisture Content

Relative humidity is the ratio of water vapor pressure to the saturation water vapor pressure at the same temperature and pressure. RH can be expressed as follows:where is a partial pressure of the actual water vapor present in the air and is a saturation of pure water vapor at the same temperature.

The moisture content or humidity ratio is the mass ratio of water vapor in humid air to the mass of dry air. It can be formulated aswhere and are the masses of water vapor and dry air, respectively [6].

Figure 1 shows the states of temperature, RH, and moisture content in the air-conditioning system. The condition of the air at various positions goes to the position state 1. The air has a high, dry bulb temperature (Tdb), and a certain amount of RH is passed through the evaporator coil. The temperature decreases by 100%. RH and some water droplets come out of the cooling system set becoming air at position 2. The air will pass through the heater wire causing the temperature to rise while the specific humidity is stable becoming climate at position 3. Then, the air will pass through the humidifier to become the air with desired RH and desired temperature in a comfortable room at position 4.

2.3. Optimal Control Techniques
2.3.1. Ziegler–Nichols Method

The process of selecting the control parameters is known as controller tuning. In 1942, Z-N suggested rules for tuning PID controllers [21]. The values of PID parameters are set based on the experimental step responses, or the value of that results in marginal stability when only proportional control action is used. Z-N rules are useful when mathematical models of plants are not known. Such rules suggest a set of values that will provide a stable operation of the system. However, the result of the system may exhibit a large maximum overshooting in the step response, which is unacceptable. In such cases, the series of fine tunings for an acceptable result are obtained. In fact, the Z-N tuning rules provide an educated guess for the parameter values and provide a starting point for fine tuning, rather than giving the final settings for and in a single shot. Figure 2 shows the Z-N diagram open loop and close loop. The switch is selected for the manual positioning in the process of open-loop test. Consequently, the switch will be selected for auto positioning in the process of closed-loop test [21].

From Figure 2, a step-by-step signal block is used to examine the system response using an open-loop test, choosing the switch for manual positioning, and closed-loop test, also by selecting the switch for auto positioning. In this research, an open-loop test is examined to find the plant model and the parameters of PID controller are shown in (3) and Table 1, respectively. The transfer function of open-loop test can be approximated by using the first-order system with a delay time aswhere T, L, and K are the time constant, delay time, and process gain, respectively, is a process response, is a unit-step input signal, and is a process transfer function [21].

Figure 3 indicates the open-loop test when the signals enter into the loop by the unit-step response. Table 1 shows the Z-N rule based on step response of the plant’s open-loop method, and also, the gain values of the controller, , , and , a proportional gain, a integral time, and a derivative time, respectively, are demonstrated [21].

2.3.2. Pole Placement Method

The pole placement method is a controller designed by specifying the controller gains of , (integral gain), and (derivative gain) showing effectiveness of the poles of the closed system in meeting the desired pole location by comparing the coefficients with the second-order system relative to the natural frequency and damp damping ratio value aswhere is a natural frequency and ξ is a damping ratio [21].

2.3.3. Ant Colony Optimization

ACO is, a population-based metaheuristic algorithm, inspired by the real behavior of ants hunting for food. ACO is used to find the optimal solutions to solve the nonlinear problems. The ants move on the graph based on stochastic process and bias of a pheromone. Generally, ants will travel from their nest to the food source and return to the nest after getting the food. While travelling, ants will release a chemical called pheromone for other ants to follow, either by smelling or tracing the tract of pheromone. After a while, pheromone will evaporate due to its chemical property. Due to this property, the route which is too long will cause total evaporation of pheromone. However, for a short route, there is more chance to produce pheromone while going out and returning before evaporation of pheromone. When lots of ants travel together or travel many times, the density of pheromone will decrease because the evaporation is higher, and if there are few ants, there will be less pheromone since there is more evaporation. Few ants will also cause dilution of pheromone, hence not attracting other ants [22]. Thus, ACO is used in real-world problems for finding the best path on a weighted graph.

Theoretically, the ants choose the nodes or the cities to travel and release a pheromone by a probabilistic state transition rule [23]:

The ants select the node by multiplying the relative influence of pheromone factor, , with an exponential power of a constant α, and heuristic factor, , with an heuristic information power of a constant .

The probability distribution for choosing the next node can be written aswhere h is the selected node belonging to S, S is a set of nodes, and α ≥ 0 and β ≥ 0 are the constants that determine the relative influence of the pheromone values and the heuristic values on the decision of the ant with probability , .

In ACO, the heuristic factor is computed aswhere is an objective function of X at j.

In the computation of the global updating rule, the different pheromone factors can be defined aswhere Q is a constant related to the quality of pheromone trails laid by ants and Lk is the cost of the tour performed by the kth ant.

In the following local updating rule, the pheromone factor of the next step can be calculated aswhere , m is the number of ants, is a coefficient, of persistence of the trail during a cycle, and is the evaporation of trail between generations and . Figure 4 indicates the diagram of ACO.

2.3.4. Symbiotic Organisms Search

SOS is a step of searching living organisms. It is of up-to-date development having a high tendency for metaheuristic optimization. Furthermore, SOS is a natural philosophy inspired by the behavior of reaction between organisms living in the nature. In general, the process of organisms developing a symbiotic relationship is considered a kind of strategy in adapting with the change in the environment [24]. The SOS algorithm has two control parameters: ecosize and maximum function evaluation (MaxFE). The ecosize represents the number of organisms in the ecosystem. MaxFE represents the maximum number of iterations.

The cycle of the three types of research will imitate the biological relationship called mutualism, commensalism, and parasitism. When processing the three steps, SOS is able to transfer the population, called ecological solution, which is possible in the area with a tendency of researching in the best path of the area. Figure 5 shows the diagram of SOS:

To solve the problem of new value, is calculated according to the commensal between organisms. In computing the new organism Xinew, will be updated only when moved properly to a new place:

Organism is sampled from the ecology and functions as the starting point of parasite vector trying to replace in the ecological system. The two types of organisms will be evaluated to check the capacity. If the parasite vector has a higher value, it will kill . If the strength of is better than that of , it will have immunity against the parasite and parasite vector will not be able to survive in the ecological system [25].

2.4. PID Controller

PID controller is a feedback control system used widely in the industrial processes and buildings. The error signal is obtained by the difference of variability in the process and the setpoint value required. The controller tries to reduce the error as much as possible by adjusting the input signal of the process. The variant of PID adjusts according to the nature of the system. Block diagram of PID controller is shown in Figure 6 [26].

PID parameter calculation depends on three variables: proportion (P), integration (I), and derivative (D). Proportion is set by using the result of the error. An integral is set based on the principle of error sum occurred while derivative is set from the basis of the changing rate of the error. The weight gained from the combination of these three variants will be used for adjusting the process.

Adjusting the parameter constant in PID controllers can help to develop the model for controlling suitable process needed. The response of the controller will be in the form of controller vibration up to the error, overshoots, and oscillation. The PID method may not be guaranteed to be the most suitable controller or able to make the process always stable.

For real use application, only one or two models are applied depending on the process. PID is also known as proportional integral (PI), proportional derivative (PD), proportional (P), or integral (I) controller. PID controller Mv(t) is based on the combination of three variables as follows:where , and are the results of proportional, integral, and derivative output signals of PID controller system, respectively, U(t) is the desired process value or setpoint (SP), C(t) is the measured process value (PV), and e(t) is an error, calculated as C(t)-U(t).

3. Methodology

3.1. Mathematical Model for Tuning the Gain of PID Controller

In this paper, the mathematical modelling has been proposed for tuning the PID controller and novel parameter optimization is constructed as follows:where MSE = , is a temperature or RH setpoint, and R(s) is a temperature or RH output.

The interval of three constraints , , and is collected covering from the maximum and minimum values in each case of tuning , , and with Z-N and pole placement as shown in Table 2.

3.2. Experimental Comfortable Room Setup

The experimental comfortable room is set within the area of width 7.80 m, length 8.00 m, and height 3.80 m with two sets of 25,000 BTU air conditioners. Figure 7 shows the structure of a comfortable room. The real comfortable room system is constructed as shown in Figure 8.

Based on Figures 7 and 8, tools in comfortable room used in this study consist of dSPACE, heat tank, heater, and evaporator. The dSPACE is a tool for receiving and sending signals both from analog to digital, and vice versa. Heat tank refers to the heater, which boils water to increase RH required by the system. The heater is a machine used to increase the temperature as required by the system. Evaporator is an air-conditioning set which increases or reduces the temperature as required by the system. In order to compute the ACO and SOS algorithms, the MATLAB/Simulink is applied for designing, controlling, and processing the procedure.

Figure 9 shows the steps of conducting the research to control temperature and RH using the PID controller. To calculate the most suitable parameter, the following four methods of state water level are determined as follows:Step 1: collect data and review related researchStep 2: construct mathematical models of the original and up-to-date modelStep 3: design the original PID controller (using MATLAB/Simulink) consisted of controlling by pole placement and Z-N methodsStep 4: design an up-to-date PID controller (using MATLAB/Simulink) for controlling by pole placement and Z-N methods

3.3. Parameter Setting

The schematic of a comfortable room when PID controllers are added and the control interface for controlling temperature and RH after gaining the PID controller are shown in Figures 10(a) and 10(b).

For solving most of optimization problems, the number of ants (NA) and ecosize are usually chosen between 10 and 50. MSE is used to determine the optimal case based on the least MSE. The parameters α, β, and ρ of the ACO are set at 0.5, 0.5, and 0.05, respectively. The parameter settings of the ACO are determined by step testing in the range, namely, , , and [27]. Five different cases of NA and ecosize are examined which varies from 5, 10, 20, 30, and 50. For ACO, the optimal NA is 20 and 5 for temperature and RH, respectively. For SOS, the most suitable ecosize is 30 for both temperature and RH. The number of iterations is determined under the condition of converging to the least MSE. The stopping criteria are set to 100 iterations for both ACO and SOS. All parameter settings for the real comfortable room are shown in Table 3.

The data of Z-N are calculated from Table 1, and the data of pole placement are computed from (3). The collected data of the ACO and SOS are simulated using MATLAB/Simulink. The setpoint of the RH is set at 60% in case of temperature control chosen from the smallest mean square error. For controlling the RH, the setpoint is set at 25°C of temperature.

4. Results and Discussion

Block diagram of PID controller with Z-N and pole placement methods is shown in Figure 11. Block diagram of PID controller with ACO and SOS designed for tuning PID is shown in Figure 12. From Figures 11(a) and 11(b), the PID controller in a comfortable room is tuned by traditional Z-N and pole placement methods. Although both Z-N and pole placement methods are widely used in tuning PID, they are approximation methods and there is no rule to verify the correctness of the gain value of the parameters. Consequently, ACO and SOS are applied to find the optimal value of parameters gain as in Figures 12(a) and 12(b). Table 2 indicates the parameter gain values of PID controllers using Z-N, pole placement, ACO, and SOS The comparisons of response of the simulation of closed loop control of the temperature and RH are shown in Figures 13(a) and 13(b), respectively.

According to Table 2, the gain values of , , and with the least MSE are collected. The 95% confidence interval is examined to declare the best results for the real comfortable room system. The simulation results of the RH control using the 4-methodology comparison including Z-N, pole placement, ACO, and SOS found that there are two best rise time responses from the ACO and the SOS method. It can be seen the overshoot of both ACO and SOS satisfies within the range of 95% confidence interval in case of temperature controlling whereas the rise time of ACO is shorter than SOS. Consequently, the overshoot of SOS is within the range of 95% confidence interval while ACO cannot be used for RH control.

Therefore, the optimal case of gaining values of , , and by ACO and SOS is the best to control the temperature and RH, respectively, compared to others. After the optimal gained values of , , and are found, the simulation results are used in designing and controlling the comfortable room as shown in Figure 14. For the real comfortable room system, the gained values of , , and from the best experimental case for temperature and RH control are applied to examine their performance. Temperature and RH vary along upward and downward steps. The temperature is within the interval of 20–25°C, 25–30°C, and 30–35°C for upward variation. For downward variation, the temperature decreases at three intervals of 35–30°C, 30–25°C, and 25–20°C. In the same way, RH is monitored upward for 50–60% and 60–70% and downward for 70–60% and 60–50%.

As shown in Figure 14, the process response of temperature is considered by 60% of RH. It can be seen that the optimal parameters gain PID of ACO algorithm is capable of controlling the temperature oscillated near the setpoint.

The optimum experimental results of SOS algorithm for controlling RH are applied to control temperature as shown in Figure 15. The results of the upward sequent control of the RH ranging 50–60% and 60–70% and the downward sequent control of the RH ranging 70–60% and 60–50% reveal the controllable RH, followed by the RHSP signal. Figure 16 shows the process response results load interruption. As a result, SOS algorithm can be also used to control RH in a comfortable room, proficiently. It shows the responses of the control system in the comfortable room. The system can manipulate temperature and RH in the case of the load change condition. This leads to an oscillation of the temperature and the RH. However, the SOS control system is in charge of regulating the temperature and the RH back to the set point, efficiently.

5. Conclusion

In this study, the metaheuristic optimization algorithm is applied to find the optimal gain values of the PID controller in controlling temperature and RH for the real comfortable room system. Two metaheuristic algorithms of SOS and ACO are chosen to investigate by comparing with the Z-N and pole placement. The simulation results show that the optimal gain values of the PID controller derived from the ACO algorithm influence the fast achievement to a setpoint of the temperature. The SOS algorithm achieves the best performance with RH control. In order to apply the best simulation result with the real comfortable room system, the results are still able to control both temperature and RH, even though there is load changing in the comfortable room. For future work, the multiobjective functions of ACO and SOS algorithms are modified for controlling temperature and RH to accuracy for the real comfortable room system.

Data Availability

No data were used to support this study.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

The authors would like to acknowledge the Department of Electrical Engineering for the facility support. The authors would also like to show their gratitude to the Assoc. Prof. Dr. Satean Tunyasrirut and Dr. Natita Wangsoh for their kind advices until this research was completed. This work was financially supported by the Faculty of Engineering, Pathumwan Institute of Technology, Bangkok, Thailand.