Enabling Optimal Energy Management with Minimal IoT Requirements: A Legacy A/C Case Study

: The existing literature on energy saving focuses on large-scale buildings, wherein the energy-saving potential is substantially larger than smaller-scale buildings. However, the research intensity is signiﬁcantly less for small-scale deployments and their capacities to regulate energy use individually, directly and without depreciating users’ comfort and needs. The current research effort focused on energy saving and user satisfaction, concerning a low-cost—yet technically sophisticated— methodology for controlling conventional residential HVAC units through cheap yet reliable actuation and sensing and auxiliary IoT equipment. The basic ingredients of the proposed experimental methodology involve a conventional A/C unit, an Arduino microcontroller, typical wireless IoT sensors and actuators, a conﬁgured graphical environment and a sophisticated, model-free, optimization-and-control algorithm (PCAO) that portrays the ground basis for achieving improved performance results in comparison with conventional methods. The main goal of this study was to produce a system that would adequately and expeditiously achieve energy savings by utilizing minimal hardware/equipment (affordability). The system was designed to be easily expandable in terms of new units or thermal equipment (expandability) and also to be autonomous, requiring zero user interventions at the experimental site (automation). The real-life measurements were collected over two different seasonal periods of the year (winter, summer) and concerned a conventional apartment in the city of Xanthi, Northern Greece, where summers and winters exhibit quite diverse climate characteristics. The ﬁnal results revealed the increased efﬁciency of PCAO’s optimization in comparison with a conventional rule-based control strategy (RBC), as concerns energy savings and user satisfaction.


Introduction
Energy saving in buildings represents a substantial scientific area for curbing energy consumption and decreasing energy wastage. Recent scientific studies have exposed numerous methodologies of and applications for mitigating the environmental impact of buildings' operation through intelligent energy management [1,2].
During the last few decades, HVAC devices and equipment have been extensively utilized to improve indoor comfort in residential or commercial buildings [3,4]. In fact, this has undoubtedly improved the living quality of occupants; but, it has also dramatically increased the amount of energy consumed in such buildings. According to the literature, there is a large amount of energy consumed in buildings by the extensive use of HVAC equipment, contributing significantly to the overall energy demand for climating purposes, which accounts for 32% of overall energy demand [5]. To this end, there is an urgent need for curbing energy wastage in buildings by utilizing different methods and practices in existing legacy infrastructure. Recent IoT-based innovations, exploiting cheap microelectronic devices, have been proven reliable in enabling smartness and optimal load management, paving the way toward a gradual domestic digital transition that could significantly contribute to a carbon-free economy [6].
Considering indoor climating (i.e., heating, cooling and ventilation) as the most energy-intensive type of energy end-use in buildings, several methodologies and research attempts have focused on decreasing the related energy account by revamping the residual operational capacity of the appliance itself, increasing compression efficiency factors, higher thermal capacity coolants, etc. However, recent advances in computer science and AI have highlighted energy-saving potential through the efficient exploitation and control of HVAC capabilities: out-balancing with any available promising grid elements (such as renewable energy sources (RES)), batteries, ventilation and temperature control. Gathering indoor and outdoor sensorial data, those control approaches may be elaborated even more by utilizing efficient artificial intelligence approaches [7][8][9].
However, real-life applications are usually limited to industrial-scale climating devices and large-scale deployments, where control policies, operational automation and digital connectivity are implemented by manufacturers.
When supported by the appropriate sensors, actuators and other IoT instruments, a building's micro-grid forms a digital ecosystem at the network edge, enabling seamless integration with third-party smart services. The main goal of the current study is to utilize cheap IoT infrastructure, combined with an intelligent, model-free, adaptive, energy-management and -control tool, to achieve reduced energy use and sufficient thermal comfort at the same time. The idea is to enable the implementation of a smart controloptimization approach, integrating, as its main ingredient, a novel, self-adaptive, reconfigurable, plug-n-play A.I. algorithm, denoted as PCAO [10], in conventional domestic environments where the budget for networking, IoT-sensing and computing capacities are usually quite limited [11].
State-of-the-art novel techniques that are widely accepted for delivering the intelligent management and control of energy savings in HVAC and other building appliances include fuzzy logic, adaptive fuzzy logic and rule-based approaches. Yet, while their adaptation performances exhibit significant energy-saving results, their operation in real life still exhibits numerous drawbacks, leaving a huge potential for curbing energy consumption "out of the box". Conventional state-of-the-art methodologies have proved incapable of effectively coping with dynamic alterations in such non-linear, time-changing systems [8]. For instance, rule-based strategies (RBC) are dependent on simplified generic rules that do not correspond efficiently to every (or even similar) type(s) of buildings. Their lack of efficiency becomes more obvious when different occupancy behaviors occur, resulting, sometimes, in the opposite result, where energy savings are concerned [9]. Additionally, RBC approaches, in general, demand time-consuming and manual activities in order to be established correctly, as well as adequate knowledge of their potential tasks [12].
Moreover, more elaborate methodologies, such as model-predictive control and data-intensive neural networks, are considered as highly demanding of computational and memory resources; a fact that renders their applicability in lightweight domestic cases poor [3,8,9]. For example, model-predictive control (MPC) methodologies are usually based on simplified white-box modelling schemes that are suitable mostly for non-stochastic, timeinvariant systems and, thus, their mathematical models can adequately describe the thermal behavior of the building plant [12]. To this end, conventional domestic application cases do not usually preserve the capacity for adopting elaborate methodologies, while lighter adaptive control approaches are usually difficult to design, in terms of mitigating the emerging thermal behaviors of the underlying building plant [9].
Contrarily, the examined PCAO methodology employs a built-in, lightweight perception mechanism that is able to adjust its adaptive control policy on-the-fly and, thus, effectively mitigate potential unnecessary excessive energy demands or thermal discomfort peaks. The PCAO methodology has already been evaluated several times in the past, in large-scale tertiary building cases exhibiting significant energy-saving results [3]. In this scientific effort, a PCAO algorithm was evaluated for the first time in a mini-scale apartment, adopting conventional cheap IoT equipment with low computational capacity, thereby exhibiting its overall efficiency in real-life, everyday domestic applications. Taking advantage of the utilized cost-efficient IoT sensors and interconnected actuation equipment, the testbed implementation methodology concerned a single-room student apartment, thermally managed by a single-inverter HVAC unit.
Our PCAO was eventually able to reconfigure itself and adapt to the new perceived situation accordingly, offering optimized energy use by producing efficient control decisions with respect to thermal conditions and forecasted data about weather and other exogenous disturbances, such as occupancy schedules [3,8].
Moreover, it should be mentioned that the examined methodology exhibits seamless scalability and implementation flexibility, enabling the integration of additional HVAC devices-or other equipment-with just a few modifications and auxiliary equipment additions. The current study is structured as follows:

•
In Section 1, related work and its novelty are stated, while the overall test case's experimental approach is described with respect to the real-life testbed apartment along with the system architecture and the HVAC features (A/C unit).

•
In Section 2, the two control strategies-the benchmark rule-based control (RBC) strategy and also the PCAO control strategy-are thoroughly described, along with their attributes.

•
In Section 3, the PCAO control application objectives are evaluated in detailed: the system architecture, the PCAO control design and the PCAO algorithmic steps are presented, along with the experimental control setup.

•
In Section 4, the overall cost function is defined as a summary of energy-cost and comfort-cost aspects. Energy cost-and comfort cost-evaluation approaches are being thoroughly described. • Section 5 includes the experimental PCAO and RBC results that are compared in detail in their overall performance levels of energy saving and comfort. Outdoor conditions that concern the summer and winter periods are illustrated. Next, experiments that concern summer cooling and winter heating are presented and evaluated thoroughly by extracting meaningful conclusions about the behavior of the PCAO control-in comparison with the benchmark RBC approach. • In Section 6, the final conclusions, as well as the future potential of the current research effort, are thoroughly assessed.

Related Work and Novelty of the Paper
It should be noted that the conventional strategies for micro-grid load optimization and control, at the building level, can be divided to three major categories: rule-based control strategies (RBC), model-based predictive control strategies (MBPC), and modelfree adaptive control strategies (MFAC), each having their individual advantages and disadvantages: Rule-Based Control Strategies: RBC are practically driven by experience and observations, where a set of simplified logical commands (if/then) are defined in order to form a multi-level policy that minimizes unnecessary excessive energy consumption. For instance, such a rule-based conventional strategy may turn on/off the heater when the IoT sensorial measurements (e.g., temperature) reach a critical point. Unfortunately, such approaches tend to fail in many real-life scenarios where case-specific characteristics in different individual buildings impose highly diversified behavioral features: HVAC infrastructure thermal capacity, building structure, dynamic occupancy schedules, building micro-climate and location, user needs, infrastructural aging effects. Thus, rule-based approaches usually present poor performance, due to the fact that their control policies are typically static and inflexible to emergent dynamics [9].
It should be also noted that such systems usually demand periodic manual recalibrations of their implemented control scheme in order to adequately guarantee some level of energy efficiency. This strategy considers a manual and tedious procedure that requires the involvement of a human expert with additional costs but cannot always guarantee close-to-optimal behavior, since it's impossible even for experienced individuals to develop a highly elaborate set of rules able to mitigate the complex nonlinear dynamics of the system [13].
Model-Based Predictive Control Strategies: MBPC model-driven (or model-dependent) control strategies are mostly focusing on constructing an elaborate performance model in order to efficiently assess and choose the appropriate decisions that are estimated to present the greatest energy-efficiency potential [14][15][16][17][18][19][20].
Due to the unavailability of such models, the potential model-construction procedure portrays a cumbersome activity that significantly limits the applicability of such methodologies. Sophisticated white-box simulation approaches can provide templates from pre-established use-cases, where manual analytic modeling or grey-box methodologies are considered. Complications and obscurity in such approaches are ordinary and thus-in order to be suppressed-model oversimplifications are widely adopted [21]. To this end, using Model-driven approaches for determining a building's micro-grid behavior is not a trivial task to be addressed, usually imposing a lot of abstractions and generalizations that propagate major inefficiencies to the optimization and control schemes that may even lead to even poorer performance than had previously existed.
Model-Free Adaptive Control Strategies: Model-free adaptive control (MFAC), is an adaptive control methodology that does not demand process models. Model-free control is mainly considered as alternative approach to adequately controlling complicated cyberphysical systems-such as buildings-by utilizing a simplified representation of the system (ultra-local model) and following, a mathematical estimation for constructing a simple, but effective, controller [22]. Especially in cases that face real-life engineering problems in a dynamic environment, without a robust and accurate model with which to begin, the most appropriate and efficient approach is probably to utilize a model-free approach.
The PCAO Approach: The PCAO approach represents a next-generation model-free adaptive control-optimization technique that is able to overcome multiple barriers and obstacles facing state-of-the-art optimization approaches. Contrary to the aforementioned widely utilized practices, the examined centralized approach-namely parameterized cognitive adaptive optimization (PCAO) [3], which has been proved capable of efficiently coping with the absence of a model, as well as with limited computational resources in a domestic application case. PCAO was able to construct an internal lightweight performance model to assess the effects of randomly perturbed control policies under uncertain dynamics. PCAO is self-contained with respect to performance dynamics, requiring just a single measurement point of the overall energy and comfort efficiency to readjust periodically, while the overall objective function is analytically unknown.
It should be also underlined that the efforts of this study are aimed at extended verification tests on a real-life, small-scale apartment-in contrast with previous studies, which have extensively focused on large-scale/high-thermal-inertia structures (in real life and simulations) [3,[7][8][9].
The introduced real-life IoT measurements and conclusions of this paper highlight the high efficiency of PCAO, where the same optimization problem is being determined in a parallel manner by a conventional Rule-based Strategy for the same apartment room. To this end, the PCAO approach was thoroughly contradicted by the utilized RBC strategy, in diverse climate environments (summer, winter) over the year.

The Test-Case Building
The apartment in which the experiments took place represents a typical Greek student chamber of multi-purpose use-as a bedroom and an office-with an area of 15 m 2 . The apartment leads to the rest of the residence via a typical wooden-dashboard door that remained closed during the experiments in order to eliminate possible energy wastages, to stabilize measurements and also to decrease the complexity level of the whole procedure. It should be noted that at the east side there is a double aluminum reinforced door that leads to the balcony of the apartment. The insulation of external walls that surrounding the whole room apartment consists of dow insulation material 50-mm thick. The following images illustrate the floor plan of the room as well as a 3D representation that illustrates the interior furniture layout and also the location of the HVAC-an air-conditioning (A/C) unit that was the only equipment responsible for regulating the indoor room climate. Figures 1 and 2 illustrate the top-down perspective and the 3D perspective of the apartment, respectively:  The room apartment that the experiments took place is positioned in northern Greece in the city of Xanthi. Winters and summers are of diverse nature and thus our optimization control tool proved its efficiency both in cold and hot climate conditions.

HVAC System Features
For manipulating the interior climate conditions of the apartment, an already-installed HVAC wall unit was utilized. The air conditioner-A/C-HVAC (split-type) that integrated a cooling power of 9000 Btu, a heating power of 12,000 Btu and maximum power consumption of 853 kW. It should be underlined that the A/C unit integrates inverter technology, which provides additional energy efficiency in energy consumption and also minimizes the possible large fluctuations in internal temperature for maximizing user comfort. The evaluated approach delivered a next-generation energy-efficiency and user-comfort scheme, introducing artificial intelligence and minimal low-cost IoT sensorial equipment to the already-installed conventional A/C. The following Table 1 describes explicitly the technical characteristics of the unit. Measurements: In this particular scientific experiment we have measured four (4) main parameters using low-cost IoT sensors: (1) the interior temperature of the apartment; (2) the interior humidity of the apartment; (3) external temperature; (4) external humidity.

Control Strategies
The measurements that conducted in this particular experiment concerned two separate and diverse seasonal intervals: the first concerns the summer season of 2017 and the second concerns the winter of 2017. Those two intervals have been selected in order to examine the performance of the PCAO and RBC in diverse climate conditions (temperature, humidity). It should also be mentioned that those intervals were chosen in order to examine a proper number of days wherein A/C was necessary to achieve adequate indoor comfort. Last-but not least-the selected periods were chosen in order to generate effects that exhibit the overall system's potential in terms of energy savings and indoor comfort.
Most specifically the two intervals concern August (15-30 August 2017) and January (25 December-10 February 2017). The final experimental selection was made, after many attempts, so as to achieve the appropriate parameters, since we needed our experiments to be as representative as possible. The most significant parameters of those metrics concern: experimental duration (time intervals of the experiment and overall duration), the day hours that concern the experiment, the RBC initial temperature setting point for the air conditioner and Eigenvalues (e 1 , e 2 ).

Rule-Based Control Strategy
The selection of the appropriate experiment scenario was made after many attempts to find the appropriate parameters. We wanted the experiments to be as representative as possible. The most basic of these parameters are: • Time intervals of the experiment and its duration: the experiments' time intervals were chosen to last 6 h per day. This choice was made both for practical reasons and also after an empirical study of the hours that concerned the A/C unit under normal conditions. • Hours of the experiment: the experiments were carried out in the morning hours of each day for the summer period and in the afternoon hours of the winter season, because these hours required intensive utilization of A/C and users were indoors. • Rule-based controller (RBC): this parameter concerns the initial temperature setting for the air conditioner for each day. The RBC value was 26 • C for the summer period and 22 • C for the winter period • Eigenvalues (e 1 , e 2 ): experiments were performed with different eigenvalues for both periods. The relationship between them was chosen as expressed in Equation (1), as follows: Some values (e.g., e 1 = 10 −6 ) produced major alterations in the controller outputs, while others (e.g., e 1 = 10 −4 ) changed them slightly. Thus, these parameters were defined for generating the most viable best results. The results of the RBC algorithm measurements with the eigenvalues that produced the optimal control were e 1 = 5 × 10 −5 , e 2 = 4 * e 1 = 2 × 10 −4 , respectively.
In addition to the measurements with the algorithm in use, there were also measurements conducted for which the A/C needed to operate at a constant temperature. The purpose of these measurements was to obtain a reference base in order to compare the outcomes of the proposed PCAO algorithm with the outcomes of a conventional RBC operation. The temperatures at which the A/C operated during these measurements were 25 • C and 22 • C for the summer and winter months, respectively. These temperatures were chosen since they produce the highest user satisfaction, as generated by the Fanger equation; here, in the Fanger equation as it concerns clothing insulation (clo), clo was 0.4 and 0.75 for the two experimental periods, respectively.

PCAO Control Strategy
There are 11 variables that were imported to the controller. Those variables concern: • The conditions table: four values that describe the conditions inside and outside the room (indoor temperature, indoor humidity, outdoor temperature and outdoor humidity) • Predictions Table: contains the forecast of external conditions, such as temperature or humidity for the next n hours (six values). The value of n was three throughout the whole experimental procedure.

•
The operating temperature of the AC unit Thus, the controller-status vector results in Equation (2) as follows: where L represents the number of linear controllers that are being alternated/surrogated between each other. For all the conducted experiments the number L was equal to 1. The PCAO optimization control algorithm that has been utilized is responsible for monitoring the profits of each controller, which are used to determine the actions of each room element at each step. The two aforementioned control strategies are thoroughly compared in Section 5.3 PCAO and RBC Comparison, between days that preserve quite similar external/internal conditions in order to fairly exhibit their performance differences

System Architecture
The architecture of the system, able to deliver significant interior comfort by utilizing the optimal amount of energy, is based on the communication between the interconnected components of a conventional PC, an IoT micro-controller and the pre-installed A/C unit.

•
The PC: the personal computer of the user acts as the heart of the system, where the PCAO control-optimization algorithm is installed and run. Gathering all the available IoT sensorial information, the PC processes them, producing the finalized control commands through the PCAO tool. Next the control commands are transmitted to the A/C unit through the microcontroller. It should also be noted that, the PC acts as a communication channel between the user and the overall system, thereby offering a user-interface environment that transforms the potential user into a highlevel operator able to manually intervene, adding their individual high-level demands and parameters.

•
The IoT Arduino microcontroller: The microcontroller performed as an intermediator between the IoT sensors, gathering information on the existing conditions of the interior and the exterior, and also transmitting them to PC (PCAO algorithm). Moreover, the microcontroller also used its IoT actuators as an intermediator between the PC (PCAO) and the A/C unit, transferring the PCAO-generated control commands in order of their execution • The A/C unit: The unit applied the control commands that had been received by the microcontroller, modifying its operation and, thus, altering the interior climate conditions accordingly.
In order to fully explain the experimental procedure a simple diagram of the whole experimental architecture is presented in 1-5 steps.
The 1-5 steps that the aforementioned diagram ( Figure 3) represents are described as follows: 1.
The IoT sensors measuring the conditions and transmit the values to the microcontroller 2.
The microcontroller is transferring measurements to the PC where the necessary control commands are being generated through the PCAO algorithmic calculations 3.
The control commands are directed back to microcontroller 4.
Microcontroller IoT actuators deliver them to the A/C unit 5.
The A/C applies the control commands by modifying the interior climate through its operation Figure 3. System architecture implementation framework.

PCAO Control-System Design
The following Figure 4 represents the setup of the optimization technique as well as the optimization algorithm. The system simulation model is connected to a parametrized controller and the proposed optimization algorithm (PCAO). At each step, it evaluates these parameters utilizing the condition results of the apartment. For each PCAO effect in the controller, the presented closed-loop system is simulated and, thus, the software provides appropriate results in selecting the next controller. More specifically, the process is depicted within the steps of the following section.

PCAO Algorithmic Steps
Before analyzing the measurement equipment for energy cost as well as for comfort cost, its useful to exhibit the basic information for the novel PCAO algorithm. It should be noted that the methodology has already been extensively evaluated and tested in diverse real-life implementations, as well as in simulated environments. The algorithm has exhibited its advantages in numerous applications without the need for cumbersome pre-application procedures and calibration [23].
The mathematical implementation of PCAO is briefly presented in Table 2 below: Table 2. Implementation of PCAO algorithm.
Step PCAO Step Description 1 Initially, define the central control matrix P(0) in order to be semi-definitely positive about the e 1 and e 2 eigenvalues (where e 2 > e 1 > 0), and initialize a scalar time-decaying continuous function a(t) that will be utilized as the continually decaying exploration radius for the central candidates that would be produced in Step 4.

2
Determine the refreshed T h time interval and deploy the ongoing control matrix for the entire update time duration. At the end of the time duration, compute the overall performance index, E g,PCAO ; this factor represents the approximation error of the optimal cost-to-go function and derives from the Jacobi-Bellman equation [24]. 3 Next, a central, parametrically linear estimator needs to be trained by utilizing the E g,PCAO values, as previously computed, and the respective central control matrices as the central regressor vector.

4
Produce a randomly version of the deployed central control matrix that is perturbed by a(t), utilizing it as the perturbation center and using the price of the time-decaying function, as determined in Step 1, as the exploration radius.

5
Evaluate the performance the produced central competitors accordingly with Step 4, utilizing the respective central, parametrically linear estimator (Step 3) and nominate the one exhibiting the greatest overall performance P b (i). 6 Establish the elected matrix as the current one and return to Step 2, repeating until achieving the desired performance.
For supplementary information concerning the mathematical procedures and formulations, the interested reader may address [24]. Figure 5 portrays an algorithmic procedure that is conducted iteratively until the system performance converges to an optimized point.

Experimental Control Setup
Having illustrated the system architecture, PCAO control design and PCAO steps, we need to mention that the experimental setup considers the following metrics:

The Overall Cost-Function Methodology
As has already been mentioned, the utilized controller in this experimental effort had, as primary targets, (a) the optimization of energy consumption, and also (b) of user satisfaction, by minimizing the control function of the system. Also, in order to avoid the complexities during evaluation, usually introduced when considering Fanger and PPD (predicted percentage of dissatisfied) metrics, the optimization criterion considered a simpler formulation that blends non-renewable energy and user discomfort as factors, as the following Equation (3) describes [25]: where Energy Cost is defined as the consumption of energy using the A/C unit, and Comfort Cost as the satisfaction degree of the occupant for each interval of the experiment (the method for calculating Comfort Cost is defined explicitly in the following Section). The factor t is a positive decimal number (0 < t < 1) and it is used in order to potentially manipulate the weight of each factor (Energy Cost and Comfort Cost) in the Total Score; t represents a mathematical way to manipulate the importance of each factor relative to each other. It should be underlined that the Energy Cost and Comfort Cost factors that comprise the Total Cost are acting competitively with one and other. Achieving and maintaining an adequate comfort level for occupants requires additional energy consumption, while a strict adherence control strategy in the energy economy often fails to satisfy tenants. In this case, energy use may be considered wastage, since it does not meet the satisfaction criteria that concern the consumed energy. Considering an equitably dependent optimization standard between Energy Cost and Comfort Cost, t was set to 0.5. It needs to be underlined that the sophisticated research concerning the selection outcomes of this diverse factor, t, have already been noted in the literature [26].

Measuring Energy Cost
In order to accurately measure the energy consumption (Energy Cost) the EGM-PWML energy meter was utilized. Among its alternatives, EGM-PWML has the ability to measure energy, voltage, intensity, resistance and power factor, but what really assisted the execution of this particular experiment was its ability for directly connect to the PC via a USB port and the fact that it also integrates 128 KB of built-in internal flash memory for storing measurements when disconnected from the PC. Those capabilities limiting cumbersome manual control procedures, without the demand for physical presence.
Additionally, EGM-PWML is accompanied by software that is able to display its measurements on the computer's screen and also provides the ability to create graphical representations for a descriptive display of measurements and their variations for the monitoring device (A/C). Finally, it has the ability to export measurements to a Microsoft Excel file for storing and processing.
It should be underlined that, for the efficient operation of the whole experiment, the demand for real-time control optimization required the processing of measurements during its execution and not at the end of its time interval-as the software provided by the manufacturer otherwise allowed. To this end, a suitable function was developed in Simulink MATLAB environment for adequate real-time processing and the use of such measurements by our PCAO optimization algorithm.

Measuring Comfort Cost
According to the American Scientific Society for Heating, Cooling and Air Conditioning (ASHRAE, American Society of Heating, Refrigerating and Air Conditioning), thermal comfort is defined as the psychosomatic state in which a person desires no thermal change in the indoor environment and is satisfied with the prevailing thermal conditions [27].
Thermal comfort relates human sensation and perception to a number of environmental and physical parameters. Extensive studies have led to a number of thermal comfort equations. These equations are mainly based on statistical studies or based on lookup tables created from statistical data.
The most widely used model is the one developed in 1970 by O.P. Fanger, which integrates heat-balance equations and empirical studies of skin temperature to determine comfort [28]. The three indicators derived from Fanger's comfort equation concern: (1) predicted mean vote (PMV); (2) predicted percentage dissatisfied (PPD); and (3) lowest possible percentage dissatisfied (LPPD). The first parameter estimates the average thermal comfort selection and ranges from cold (−3) to very hot (3), with desired limits in [−0.5 + 0.5] field. The second parameter predicts/estimates the number of dissatisfied users under given conditions. It is expressed as a percentage (%) and cannot be reset to zero, as shown in Figure 6.
The environmental parameters that concern the thermal environment and affect the heat dissipation from the human body-and thus the thermal comfort concern: temperature (air, radiant, surface), humidity, wind velocity and multiple parameters such as wearables, clothes and human movement or activity, metabolic rate etc., as is shown in the figure below. These parameters play a significant role in the thermal comfort level of a particular space [25,28]. The thermal balance between the human body and the environment is calculated from According to Fanger, calculations of the predicted mean vote (PMV) are described by the following Equation (5): Since some of the above variables are difficult to measure, the previous equation can be expressed as in Equation (6): With the clothing-area factor being described by Equation (7) or Equation (8) below: Or: The convective heat transfer coefficient is described by Equation (9): The thermal resistance of clothing is described by Equation (10): The clothing surface temperature is described by Equation (11): where M represents the rate of metabolic heat production in W/m 2 , W represents rate of mechanical work accomplished in W/m 2 , f cl represents clothing area factor (dimensionless), t cl represents the clothing surface temperature in • C, t r represents the Mean radiant temperature in K, h c represents the convective heat transfer coefficient in W/m 2 K, ta represent the ambient temperature in • C, pa represents the water vapor pressure in ambient air in kPa, R cl represents the thermal resistance of clothing in m 2 K/W, V represents wind velocity in m/s, I cl represents thermal resistance, clothing (clo unit), L represents the thermal load on the human body in W/m 2 . H represents energy losses in the form of heat from the surface of the body through treatment, convection and radiation in W/m 2 , E C the amount of heat dissipated due to evaporation in a state of thermal equilibrium in W/m 2 , C res represents the amount of heat that is transferred by treatment during respiration in W/m 2 , E res represents the amount of heat dissipated due to evaporation during respiration in W/m 2 and e portrays Euler's number (2.718). Having calculated the above PPD is given by the following Equation (12): For the needs of this study, the dissatisfaction index (PPD) was utilized, representing a factor that needs to be reduced in order to meet adequate comfort criteria.

Summer Period Outdoor conditions
The two control strategies were evaluated in the same apartment and in the same seasons (summer and winter) but on different days. Note that we needed first to have evaluated RBC, and then, secondly, the PCAO approach. This needed to take place continuously since our PCAO algorithm integrates self-learning capabilities and its performance, therefore, was increasing from day to day. Thus, in order to compare them fairly, we chose days that possessed similar climatic characteristics. During the summer season and especially during August 2017, the observed temperatures varied between 23-34 • C, while the relative humidity ranged between 31-41%. Figures 7 and 8 depict the overall evolution of the external conditions, which concern outdoor temperature and humidity for the summer days on which experimentatio took place.

Winter Period Outdoor Conditions
During the experimental winter period the observed temperatures varied between −1 • C-14 • C and humidity measurements ranged between 39-50%. Figures 9 and 10 depict the procession of the external conditions over the winter period, which concern the winter outdoor temperature and humidity, respectively.

Summer Cooling
During the summer experimental period, the conducted measurements were obtained utilizing both the RBC approach and the PCAO algorithm for controlling the air conditioner. The main goal during this batch of experiments was to define a temperature-setpoint policy for energetically and thermally optimized cooling purposes. The time interval for controlling the A/C was 16 days, overall. The primary aim was to adapt the PCAO algorithm towards optimal operation-its learning/adaptation process-and thus, to align the PCAO with the apartment's parameters and the overall real-life user activity. Our concern was to support the PCAO's learning process with an adequate amount of time i.e., 14 days out of the 16 experimental days during summer, in order to efficiently deliver the expected optimization results.
The experiments were performed with an initial RBC temperature cooling setpoint point of 25 • C. As already mentioned, the RBC measurements were conducted while the A/C was operating at a constant temperature. The selected temperature was 25 • C-a temperature point that Fangers' equation suggests as the ideal set point for achieving maximum occupant satisfaction.
The summarized results of these experiments are shown in Table 3, illustrating the Initial Indoor temperature of the apartment at the start of the experiment, the Mean Outdoor temperature, expressed as the average of the temperatures observed during the daily available six-hour window, the total energy consumption, in Wh, as Energy Cost, the PPD index, defined as the costs concerning user satisfaction (Comfort Cost) and the Total Cost, which concerns energy and comfort costs and is given by Equation (3), using t = 0.5.

A/C temperature control points (summer):
The variations in A/C operating temperature over the days when the PCAO algorithm was utilized are illustrated in Figure 11. Figure 12 portrays the average outdoor temperature and the set points/costs (energy cost, PPD/comfort cost and total cost) on the days of the experimental procedure.
It is noticeable that, on the second day (which was warmer than the first) the PCAO approach lowered the room temperature to almost 20 • C in an attempt to mitigate the increased PPD index values. Although, the third day was even warmer than the previous two; the control setpoints were lowered to almost 25 • C setpoint from the previous internal temperature, since the PCAO perception mechanism was able to balance out the previous day's energy peak while achieving low thermal dissatisfaction levels (PPD). It is also obvious that a similar phenomenon took place between the sixth and seventh days.  Between 8th and 12th days, when the external conditions were similar to each other, small alterations emerged in the set points, achieving similar total performance. This improvement became more evident on the 12th day, when the daily mean ambient temperature was slightly higher from the previous ones, the total cost index decreased by 85 units compared with the 10th day. Note that from Table 3, on day 11, where the RBC was considered, the respective total cost from the 8th-12th PCAO experimental days is slightly better, presenting balanced energy-comfort index values, a fact related to the parameter t in the cost function being set to 0.5.
On the 13th and 14th days the outdoor temperatures and the initial indoor temperature rose approximately 2 • C. Finally, the last four consecutive days of the experiments presented similar ambient temperature levels; the PCAO was able to present a more efficient performance (reducing the total cost) in comparison to RBC, even though the built-in perception mechanism had been trained with sparse similar daily data. This means that the PCAO algorithm managed to balance energy consumption and user satisfaction, while showing acceptable Total Cost values as compared with day 11, on which the RBC strategy was considered for similar conditions' instantiation (see Table 3).

Winter Heating
The same types of measurements were also conducted during the winter. The main goal during this batch of experiments was to define a temperature-setpoint policy for energetically and thermally optimized heating. The PCAO algorithm had defined the room conditions in real time for more than 20 days, utilizing IoT sensorial data. During this time, the system was able to estimate the parameters of the control problem and offer an adequate optimization effect. The initial heating setting point was 22 • C.
Similarly, to the summer experiments, the RBC strategy was considered for more than eight daily experiments wherein the A/C unit was constantly operating at the set point of 22 • C, ensuring adequate comfort (optimal cost satisfaction, as denoted by the Fanger equation).
The summarized results of the performed experiments during the winter period are presented in Table 4, using the same layout as developed in the previous section concerning summer.

A/C temperature-control points (winter):
The output's evolution of the A/C operating temperatures for the days when the control algorithm was utilized are presented in Figure 13, along with the average outside temperature. The costs for those days are presented in Figure 14.
It is noticeable that although the experiments commenced on a relatively warm day (with an average outdoor temperature close to 8.7 • C), a gradual decrease of temperature took place from days 8-12, during which temperatures were below 0 • C. By observing the costs in Figure 14 and then dividing the first eight days into two groups according to the external conditions, we obtain: group A, consisting of days 1, 2, 4, 5, 7, and group B, of days 8, 10, 11, 12. We indicate that, although the total cost in the first days of each group increased following the decreasing temperature, in the last days of each group the total cost shows a decrease, defying the low outdoor temperature.
During the second day it is also noticeable that the PCAO controller, knowing that it would be colder, raised the indoor temperature during the last hours of the available time-control windows, aiming at maintaining an acceptable PPD during these late-day hours where the hourly ambient temperature dropped significantly.  This happened again on the fourth day. Although the Total Cost increased during the second and third days, the satisfaction index was maintained at high levels. Thus, the increase in Total Cost was caused mainly by the increase in energy consumption (Energy Cost)-a fact that was anticipated due the dropping ambient temperature.
A similar behavior pattern was observed during days 8-11, on which the daily mean ambient temperature dropped close to 0 • C. The PCAO control scheme attempted to maintain indoor thermal conditions by increasing the setpoints to 24 • C, during the late control hours, to acceptable dissatisfaction levels at the expense of increased energy consumption. For the next two days (12th and 13th), the PCAO controller made decisions and presented performance profiles similar to days 6 and 7, on which similar outdoor conditions occurred, while the initial indoor temperature was significantly reduced, as expected (much colder overnight conditions).
After the 13th day, a gradual increase of the average outdoor temperature was observed. For the next 10 days, the average outdoor temperature stabilized at about 6 • C.
Especially on 26th and 27th days, an overall total cost improvement was observed, since the ambient temperature followed an increasing trend, resulting in much warmer days that allowed the PCAO controller to keep the A/C heating setpoints to low levels and save energy without jeopardizing comfort.

PCAO and RBC Comparison
Despite the obvious improvement that seemed to have been achieved in the cost function, the achievements can be also denoted through comparison between the PCAO control algorithm's performance and the RBC conventional control-approach's performance.
We compared the individual PCAO operating days' performances with those of the RBC, which served as a benchmark. In order to efficiently compare the two aforementioned control approaches, these two strategies were thoroughly compared between days that preserved quite similar external conditions in order to fairly exhibit their performance differences in terms of initial outdoor temperature and average outdoor temperature. Tables 5-14 show the aforementioned data and the comparisons thereof. It should be noted that Total Cost is acquired as a result of the sum of Energy Cost and Comfort Cost (satisfaction cost) considering a balanced t factor value of 0.5.

Summer Cooling
Comparing the fifth (RBC) with the third day (PCAO)-two days that had quite similar environmental conditions-we identified a significant improvement in Total Cost (about 36%). It should be noted that this improvement occurred after only three days of operation with the PCAO controller. Of course, despite the fact that the fifth day (RBC) was cooler than the third (PCAO) and that higher energy consumption and higher PPD were expected, the PCAO strategy outperformed the RBC strategy even during more difficult instantiation conditions. In order to extract explicit comparative results, we would need to investigate additional factors and building dynamics that were not relevant to the context of this specific study. Table 5 illustrates the comparison between the PCAO's on the third and the RBC on the fifth summer days, as follows: By comparing the 11th day, using the RBC, with the 9th and 10th, using the PCAO, it seems that the potential improvement is much lower than previously-with power consumption (Power Cons) being significantly in favor of the PCAO. Here, the PCAO seemed to apply a strategy that targeted reducing energy consumption in a well-balanced manner, as compared with PPD. The increase in Total Cost, here, clearly was a consequence of the increased dissatisfaction index. Table 6 illustrates the comparison between the PCAO on the 9th and the RBC on the 11th summer days. This was also confirmed by comparing of the 10th day (PCAO) with the conditions of the 11th (RBC), observing that they were similar. Energy consumption was further reduced, but so was comfort/user satisfaction. Thus, the improvement in the PCAO's Total Cost over these days was not significantly better than from the conventional RBC. Table 7 illustrates the comparison between the PCAO on the 10th and the RBC on the 11th summer says.
Examining the 12th day, we identify that the overall Total Cost improvement was significant: at this point, comfort/user satisfaction exhibited a major improvement, while energy consumption increased insignificantly. This combination produced an overall improvement in Total Cost of 13%, which was the largest of these three days (9th, 10th and 12th). Table 8 illustrates the comparison between the PCAO on the 12th and RBC on the 11th summer days, as follows: As concerns the last three experimental days, the PCAO's performance still remained significantly better when compared with the 5th day under RBC control. Thus, it seems the PCAO algorithm produces progressively better results while trying to find the optimal ratio between energy savings and comfort/user satisfaction.
Comparing the results from the 5th day and the 15th (i.e., a day towards the end of the summer experiments), we see that the controller managed to reduce the total cost index by almost 40%. Although the conditions were more favorable on the days of the PCAO's use, such a big improvement and difference in the energy and comfort levels cannot be justified by this difference alone. Table 9 illustrates the comparison between the PCAO on the 15th and the RBC on the 5th summer days.
The aggregated results of the above comparisons are illustrated in Table 10, where their average values are extracted.
From Table 10 it can be concluded that, for the days that had similar mean outdoor temperatures, an improvement of 37% in consumed energy and an insignificant drop in satisfaction (−1%) were observed. By summarizing the results from the aforementioned comparative analysis for the summer period, the overall PCAO improvement in comparison with the conventional RBC control methodology is determined at 19%.

Winter Season Heating
Similar to summer season, the comparison resulted to significant improvements as well. More specifically, when comparing the 16th RBC Day with the 19th PCAO day, a very small improvement in Total Cost measures of about 2% can be observed. Table 11 illustrates the comparison between the PCAO 19th day and RBC 16th winter day as follows: However, when comparing the 20th and 21st days (PCAO) versus the 25th and 22nd days (RBC), respectively, a Total Cost improvement of 3% and 10% were observed, respectively. Noticeably, on the 20th (PCAO) winter day the initial room temperature was 3 • C lower in comparison with the 25th (RBC) day and the external conditions were colder, justifying the decreased (negative) satisfaction index. Nevertheless, the PCAO controller improved energy consumption by 12%, achieving an overall improvement of 3% in Total Cost.
The same applies to the 21st day, on which, although the indoor temperature was 1 • C, the two cost parameters were improved, resulting in an overall improvement of 10%. Table 12 illustrates the comparison between the 21st (PCAO) and 22nd (RBC) winter days.
Accordingly, the comparison of 24th (PCAO) winter day and 25th (RBC) winter day exposes that the PCAO controller behaved robustly, despite the unfavorable conditions for its operation. Although the comparison table reveals a deterioration in satisfaction measures, a close observation between the individual measurements of the two exposes that the negative difference was generated during the first hours of operation, where the difference of 1 • C in the initial indoor temperature needed to be compensated for. Table 13 illustrates the comparison between the 24th (PCAO) and 25th (RBC) winter days.
Finally, comparing the results of 27th (PCAO) with those of the 3rd (RBC) winter days, we observed a major improvement in Total Cost of about 30%, while both cost parameters were improved significantly. Although there was a difference of about 1 • C in the mean external temperature, favoring the optimization algorithm, this difference alone hardly explains the large improvement in overall performance. Table 14 illustrates the comparison between the 27th (PCAO) and 3rd (RBC) winter days. Table 15 show the overall aggregated comparison results in winter, during the days with colder indoor temperatures (0.4 • C, on average) and during warmer days, presenting higher outdoor temperatures (0.126 • C, on average). The PCAO controller generated a 9.8% improvement in terms of energy consumption, 10.6% in terms of satisfaction and an overall improvement of 10.52%, in terms of Total Cost. Another important group of winter days, in terms of the PCAO controller performance, were days 8, 10 and 12, on which the lowest temperatures were recorded. On eighth winter day, the PCAO algorithm demonstrated a rapid improvement in Total Cost of 8%, with an enormous increase in satisfaction, of about 30%. Table 16 illustrates the comparison between the 8th (PCAO) and 9th (RBC) winter days.  Table 17 summarizes the results of the above three comparisons. It is observed that for the days presenting 1 • C average lower initial indoor temperature and a nearly consistent average outdoor temperature, the PCAO algorithm generated an overall optimization of 10.1% in terms of Total Cost, improving energy consumption by 8.33% and increasing the satisfaction index by 13.66%. It is also evident that, gradually, the PCAO controller improved its performance in every index (energy consumption, satisfaction index and Total Cost). Moreover, in a larger-scale experiment, the PCAO approach would probably generate even greater results in terms of energy-consumption cost, satisfaction index and, consequently, Total Cost.

Conclusions
The current research has illustrated an easy and affordable way to implement a novel PCAO control-optimization strategy in a small-scale apartment by fine-tuning the operation of a single A/C unit. As has been illustrated, the creation of such a system integrated a simplified installation of IoT sensors and low-cost equipment using conventional computing resources-an Arduino, a computer and inexpensive IoT sensors. It should be also noted that these computing resources could be further simplified by utilizing a single microprocessor board, equipment that is widely commercially.
Thus, this approach may be of concern a vast number of potential residents that represent similar conditions (e.g., spaces of similar type and the same basic characteristics, such as the presence of an A/C unit) and can be easily adopted in conventional residencies for delivering improved energy efficiency, as well as improved indoor comfort. That, in comparison with cumbersome conventional manual approaches or even the automated common conventional approaches (e.g., the commonly used benchmark of rule-based control approaches (RBC)). Considering the potential applicability of such a simplified concept, a vast amount of energy may be optimally saved, resulting in major economic, social and environmental benefits in residential buildings.
As the results have indicated, the examined simplistic IoT-based system proved quite capable of meeting demanding criteria for significant energy savings without any kind of subsequent degradation in user comfort or satisfaction, contrary to the majority of state-of-the-art techniques. It seems apparent that the optimization effect of the PCAO was sufficiently balanced between energy savings and indoor comfort, generating an improved energy efficiency result that significantly surpassed the performance of state-of-the-art RBC optimization. In other words, the system proved adequate to provide intelligent automated control to at least one air-conditioning unit, resulting in a significantly optimized energyefficiency outcome, as well. It should be noted that the current research concerned an independent small apartment, wherein the identification of major energy-saving results is cumbersome in comparison with large-scale systems (e.g., large commercial buildings)where, of course, the energy-saving potential is larger.
Another important aspect arising from the experimental analysis was that the behavior of PCAO algorithm in increasing efficiency over a relatively short period of time, while also generating a significant optimization improvement over the long term when compared with a conventional RBC approach. It was noticeable that, after some time period, the algorithm had aligned with the various dynamics of the apartment (occupancy, weather behavior, climate), producing significant improvements in the overall performance measured as "Total Cost", in comparison with the RBC methodology.
All the aforementioned evaluated observations revealed that the current PCAO methodology, in small residential buildings, may represent an initial step for future research pursuits, e.g., the introduction of other sophisticated parameters that affect optimization challenges, such as the presence or absence of users in the space, decision making about external planning (user activities, etc.), the addition of other apartments (or even in an entire residential building) may offer fruitful research opportunities.
Moreover, another potential research pathway may arise from benchmarking other control strategies (e.g., fuzzy logic) or even combing the methods for further optimization and configuration of such systems. Additionally, another interesting research avenue may concern the connection of the current system to a smart grid or its supply of renewable energy sources, for utilizing electricity when it is most available.
We could also focus even more on models that utilize optimization over longer durations. The operation of the system on a 24-h basis would provide the opportunity to test different strategies during the day and night. To verify and improve upon the robustness of the system, we envisage performing future experiments in which the IoT sensors, actuators or air-conditioning units may malfunction. The aim will be the rapid perception and treatment of such problems by the automatic calibration of equipment and informative messages sent to the user and to other sites.
Finally, research would be useful in developing a better method for comparing the results between different experimental conditions. This method could be used, both, as a better way of evaluating obtained improvements and also as a complementary way of evaluating control.

Conflicts of Interest:
The authors declare no conflict of interest.