Office Building’s Occupancy Prediction Using Extreme Learning Machine Model with Different Optimization Algorithms

– Increasing energy efficiency requirements lead to lower energy consumption in buildings, but at the same time occupants' influence on the energy balance of the building during the use phase becomes more crucial. The randomness of the building’s occupancy often leads to the mismatch of the predicted and measured energy demand, also called Energy Performance Gap. Therefore, prediction of occupancy is important both in the design and use phases of the building. The goal of the study is to apply Extreme Learning Machine (ELM) models with different optimisation algorithms – Genetic (GA-ELM) and Simulated Annealing (SA–ELM) for occupancy prediction in an office building based on measured CO 2 concentrations. Both models show similar and high accuracy of prediction: R 2 – 0.73–0.74 and RMSE – 1.8–1.9 for the whole measured period. Influence of population size, number of neurons, and number of iterations on results accuracy was also analysed and recommendations are given. It was concluded that both methods are suitable for occupancy prediction, but because of different simulation times, SA-ELM is recommended for the Building Management Systems (BMS), where higher speed is required.


INTRODUCTION
Increasing energy efficiency requirements lead to the lower energy consumption in buildings, but at the same time it was noticed, that buildings in reality do not perform as well as it was predicted. The mismatch of the expected and measured energy demand is called Energy Performance Gap (EPG) [1], [2]. RIBA CIBSE platform Carbon Buzz and other sources report, that many buildings in the European Union consume 1.5 to 3.0 times more energy than predicted during the design stage [3], [4]. Geraldi and Ghisi [5] identified EPG as one of the four key building energy performance-related research topics. The causes of the EPG can be found in different life cycle stages of the building -design, construction and operation stages and many scientists emphasized the importance occupants' behaviour -both passive and active [4], [6]- [9]. According to Peper & Feist [10], occupants behaviour influence on actual energy consumption is ±50 %, therefore it should not be underestimated. Definition, estimation and intervention of occupancy behaviour become essential research challenges during building energy policy making, implementation and evaluation processes [11].
Actual occupant's presence (passive behaviour) is rarely taken into account in buildings operation, thus causing unnecessary energy consumption. Analysing office buildings it is noticed that rooms are not always fully occupied during daytimes and some rooms are routinely unoccupied [12]. Some monitoring studies showed that average occupancy in offices is just around 60 % [13], [14] and for multi-person offices it is higher and can reach ____________________________________________________________________________ 2021 / 25 527 90 % [14]. Meanwhile Bielskus et al. [15] compared measured occupancy with the ones that are used in prediction and found that actual occupancy in an open-office is much lower compared to the DesignBuilder's default values and to the ones provided by EN 16798-1 [16]. These differences are accordingly 3.5 and 2.7 times [15]. It can be summarized that realistic assumptions concerning the occupancy of the building may significantly decrease the EPG as well as contribute to increase of post-occupancy energy efficiency of the building through predictive-control.
Comprehensive and reliable occupancy prediction models are still under development. Occupancy is a periodic time series, and different time-independent and non-linear occupancy prediction models are proposed [17]. These models can be categorized as deterministic, stochastic and machine learning. Authors in previously published paper [15] discussed different prediction models; also they are compared in a review paper [18].
As it was already concluded by the authors, that Extreme Learning Machine (ELM) method is promising and reliable in occupancy prediction [15]. The goal of the study is to apply two ELM models with different optimisation algorithms -Genetic (GA-ELM) and Simulated Annealing (SA-ELM) for occupancy prediction in an open-office building based on measured CO2 concentrations.

METHODS AND METHODOLOGY
The study uses data from open-office measurements in Vilnius. As it was already found by the authors in previously published study [15], best correlations in predicting occupancy behaviour are gained based on measured CO2 concentrations. Therefore, presented models are using as input data just PIR (occupancy sensors) and CO2 data.
For the prediction of occupancy, two ELM (Extreme Learning Machine) models with different optimisation algorithms -Genetic (GA) and Simulated Annealing (SA) are created and simulated in MATLAB. For both models (GA-ELM and SA-ELM), to define the influence of population size, number of neurons and number of maximum iterations on simulation accuracy, 900 simulations were performed. For each value of the parameter (number of neurons, etc.), simulations were repeated 5 times to assess average reliability.
The reliability of results and methods is compared in terms of R 2 , RMSE and calculation speed. General methodological scheme is presented in Fig. 1.

Extreme learning machine method
ELM is a learning algorithm linked with Artificial Neural Networks (ANNs) and it was first  [19]. The algorithm is simple, runs extremely fast and has a good generalization performance. It attempts to reach both the smallest training error and the smallest norm of weights. Because of the mentioned advantages, ELM has gained increasing attention and wide application in various fields [20]- [25], such as medicine, marine environment, mechanics of materials, etc. Different improvements of the algorithm have been proposed, thus enabling its applications also for big data analysis [26]. Hence, the potential of the ELM until now is not sufficiently exploited in the field of the building's occupancy prediction, where not just prediction accuracy is important, but also speed of the prediction as it is related to the control of the building services systems.
The most popular architecture of the ANNs is Single-layer Feedforward Networks (SLFNNs), which is also used in further presented ELM models. Network is constructed for N arbitrary distinct samples (xi, ti), with the L hidden nodes and sigmoidal activation function g(x) (Fig. 2). It has 3 layers of neurons (information-processing units): input layer, hidden layer and output layer. Using ELM, parameters between the input and hidden layer are generated randomly (random feature mapping stage) and output weights are calculated analytically (linear parameters solving stage). For better solution search and faster learning, least squares (LS) method [21] is applied and outputs are simulated according to Eq. (1). The concepts of the ELM procedure with the related equations is presented in Fig. 3 together with the equations used in the solution.
For a set number of L hidden nodes, for randomly generated input and bias weights and activation function gi(x), L samples are approximated according to Eq. (3) (Fig. 3). For a given N, these equations can be written as Hβ = T and expressed as Eq. (4), where H is a hidden layer output matrix. Activation and transfer functions are infinitely differentiated and the number of samples is significantly larger than the number of hidden neurons L < N. As traditional ELM methods fail to train big data efficiently, to solve this problem different optimization algorithms are employed. Two algorithms of different nature are applied in the study and presented below. Fig. 3 Steps of the ELM learning procedure.

Genetic algorithm
Genetic algorithms are randomized global search algorithms that imitate the natural selection and natural genetics. GA operates on a population of potential solutions and searches a result equal to or close to the answer of a given problem. New generation of solutions is generated from solutions in previous generation by performing crossover (recombination), mutation and repeating the process. This process leads to the evolution of populations of solutions that are better than those that they were created from.
Process of optimisation using Genetic algorithm is presented in Fig. 4. and each of the steps is described below. Fitness function calculation. The suitability of each chromosome in the population Y(t) is determined at this step. Population is assumed as function f(y) (Fig. 4, Eq. (6)) which depends on population size (y ∈ M). To optimise ANN fitness, function fit(y) is expressed as Eq. (7).
Selection. At this step, using the selection operator, L pares of parents from Y(t) are selected. When L ≥ M, calculation continues. Otherwise, if L < M iterations are terminated (calculation stops).
Crossover. It is one of the three basic operators of the algorithm. Crossover (also called recombination) is the process when genetic information of two randomly selected chromosome parents is combined to create an offspring (child). The crossover is performed with a high probability Pc, which is calculated according to Eq. (8). If this probability of one of parent chromosome is less than Pc, then one or more points are developed to perform the crossover and get new child chromosomes and form L intermediate individuals.
The result of crossover is a new population Y(t +1).
Mutation. This step is required to maintain diversity within the population and prevent premature convergence. To avoid primitive random search, mutation probability must be set to low.
Terminate. When the evolutionary algebra N is reached, the evolution is stopped and the chromosome with the highest suitability in N generations is selected as an optimal solution.
GA-ELM algorithm was proposed and presented in details in [27].

Simulated Annealing algorithm
Simulated Annealing (SA) is a low complexity, powerful stochastic algorithm, which is used to solve various optimisation problems [28]. It is based on the search of the global minimum of the specific objective function attempting to avoid local minimums by performing the random search (movements in the searched neighbourhood). In other words, the algorithm is based on random traveling upwards instead of choosing a straight path. If a randomly selected move improves the solution, it is accepted. Otherwise, SA makes the move anyway with probability less than 1. The probability decreases exponentially and it depends on the motion.
The overall flow chart of the SA, which has two iterative loops, is presented in the Fig. 5. Before starting the SA -initial temperature (t0), which is the main control parameter and is reduced during the optimisation process, must be set [29]. Annealing starts when an initial solution (x0) is generated. It is considered as the best present solution. The next step is creation of the neighbourhood structure. At this stage two positions i and j are selected and reverse, insert, and swap operators are used to produce neighbouring solutions. The list of input data is created and used to calculate the probability p of a candidate's decision. If the decision function f(x) is worse than the candidate decision function f(y) (f(y)> f(x)), then the probability of acceptance can be calculated according to Eq. (9). In each iteration, the maximum data are used from the list. Each time a bad candidate solution is met, a random number is generated. If r < p, then the bad candidate solution will be accepted [30]. Therefore, for each pair of di and pi, ri is selected randomly and then ri < pi. For the new data, ti is calculated according to the Eq. (10). When the condition is met, the inner loop is stopped. The average of all data tav is used to update the data list, i.e. tmax is removed from the list and the average of the data is loaded because tav < tmax, and every time ti < tmax. This way, the data shrinks when a search is performed. The outer loop is stopped when the lowest limit of the temperature is reached or predefined number of iterations is reached.
Simulating annealing flow chart shown in Fig. 5. In this research, one open-office space with 32 work stations was analysed. Maximum occupancy during the measured period did not exceed 16. Observed occupancy and CO2 concentrations data were used to train neural networks and to forecast occupancy. Validation is performed based on real measured data.
Already in the initial stage, SA and GA determine the structure of the neural network by selecting or evolving data, respectively. SA or GA is applied in the training stage. Algorithms require to enter measured values of CO2 and occupancy. Occupancy is measured with PIR sensors mounted under the tables. They are called input parameters x. After SA and GA optimisations from input data x resulting values are called y.

RESULTS
Simulation with MATLAB ELM models enabled to predict occupancy profiles based on CO2 concentration data from 8 weeks measurement period. Measurements were recorded every 5 minutes and resulted in 16 279 points of unfiltered data. In the model 70 % of these data were used for training, 10 % -for testing and 20 % for validation of the results.
Assumptions for the initial simulations with SA-ELM and GA-ELM models:  From the Fig. 8 it is seen that SA-ELM gives slightly better accuracy. It is also important to note, that accuracy of the results strongly depends on the measurement period -the longer the period, the better predictability and this proves that short term measurements results in low reliability, as data set is not sufficient. Reliability or prediction strongly increases starting already from the 4 th week. Authors in previous research gained same results concerning the measurement period [13]. Additional simulations are required to make the comparison of models more accurate. For this purpose, 900 simulations were performed varying the number of neurons, population size and maximum number of iterations. RMSE is expressed as average of 5 simulations for each value. For both optimisation models 200 simulations (40 values × 5 simulations for each) were performed seeking to assess the influence of number of neurons on the accuracy of results (Fig. 9). It is obvious that higher number of neurons increases the accuracy of prediction and significant influence is noticed up to 25 neurons. Higher number of neurons seems to be In ELM methodology optimisation is applied in training stage and results are influenced by population size (data set used for training). To estimate that influence, for each optimisation model 125 additional simulations changing the population size were performed. The results are presented in Fig. 10. It can be seen (Fig. 10), that for the GA-ELM 20 is reasonable number of population size, as higher population makes almost no influence on accuracy and increases the speed (decreases the duration) of simulation. Meanwhile for SA-ELM model population size makes no influence on accuracy of results as well as on calculation duration which takes up to few seconds, therefore is not shown on the graph. RMSE values from all the 125 simulations variate as follows: for SA-ELM from 1.788 to 1.950 and for GA-ELM -from 1.776 to 3.622. Figure 11 presents comparison of the accuracy of two models depending on maximum number of iterations and shows how it influences calculation duration. 125 simulations were performed for each of the alternative optimisation model. 535 It is seen (Fig. 11) that for GA-ELM higher number of iterations results in increase of the calculation time, which may take more than 1 min. For SA-ELM simulation time fluctuates from 1 to 5 s. From the results it is obvious that for both models 10 iterations can be assumed as reasonable number. RMSE values from all the 125 simulations variate as follows: for SA-ELM from 1.777 to 3.602 and for GA-ELM -from 1.766 to 3.602.
All the simulations show that both optimisation algorithms show very similar accuracies and main difference is simulation speed, which is the main advantage of the SA-ELM method.

CONCLUSION
In the study, using MATLAB software two Extreme Learning Machine (ELM) models with different optimisation algorithms -Genetic (GA-ELM) and Simulated Annealing (SA-ELM) were created for occupancy prediction in an office building based on measured CO2 concentrations. Both models showed similar and high accuracies of prediction for the whole measured period: R 2 -0.73-0.74 and RMSE -1.8-1.9 (at PopSize -100, MaxIter -100 and neurons number 20). Simulation duration for SA-ELM is up to 5 s, and GA-ELM up to 1 min.
Additionally 900 simulations were performed to check sensitivity of the accuracy of results on: number of neurons, population size and number of iterations. For both models, all of the analysed parameters may have impact on prediction accuracy. Meanwhile calculation speed is influenced significantly just in GA-ELM model. It was concluded that sufficient prediction accuracy is reached for both models when: number of neurons is no less than 25, population size no less than 20 and number of iterations no less than 10 resulting simulation duration up to 5 s.
It can be concluded that both ELM optimisation algorithms are suitable for occupancy prediction, but because of different simulation time, SA-ELM is recommended for the BMS systems, where higher speed is required. Occupancy prediction model integration into BMS system would enable control of HVAC and other building service systems according to realistic demand thus increasing energy efficiency of the building and would help to decrease the EPG.