Applied Science, Faculty of
Engineering, School of (Okanagan)
DSpace
UBCO
Lin, Jing
Master of Applied Science - MASc
University of British Columbia
The rising energy demand of buildings contributes to global resource consumption and greenhouse gas emissions. Understanding the energy consumption habits of a building is the first and most crucial step in order to achieve energy efficiency. Forecasting and anomaly prediction of power demand play an essential role in the electric industry, as it provides the basis for making decisions in power system planning and operation. However, there are several challenges in predictive analytics to improve energy efficiency. For instance, the information in the forecast needs to be interpreted by a person with domain expertise. Moreover, automated interpretation of upcoming abnormal behaviors needs ground-truth labeling, but labels are not always available from power meter data. To address those problems, a novel predictive power demand analytics methodology (PPDAM) is proposed in this thesis, based on long short-term memory neural networks and symbolic aggregate approximation. The main target of PPDAM is to identify upcoming normal and anomalous demand patterns, through mining historical power demand and temperature data, and day-ahead power demand forecast. The PPDAM consists of two modules: power demand forecasting and anomaly prediction. The power demand forecasting module is utilized to predict day-ahead power profiles (time sequences), as a baseline for pattern generation and anomaly prediction. In the module of anomaly prediction, the historical and predicted time-series profiles are first transformed into patterns and later retrieved from a system of labeled repositories. The patterns are classified as normal or anomalous based on their frequency of appearance in the pattern repositories. The power demand data cover the total electrical power consumption in seven buildings at the University of British Columbia. The experimental results indicate that a power forecast could be mapped as different foreseeable demand patterns, each with a specific probability of occurrence. Classification results indicate that our method is robust and fairly accurate in predicting anomalies despite the diversities of building types and behaviors. The outcomes of this work could provide building operators with a solution to derive latent information in power consumption data. The derived information could be used to improve the working conditions of the building's power system.
PREDICTIVE ANALYTICS FOR BUILDING POWER DEMAND: DAY-AHEADFORECASTING AND ANOMALY PREDICTIONbyJing LinB. Eng., Jiangnan University, 2018A THESIS SUBMITTED IN PARTIAL FULFILLMENT OFTHE REQUIREMENTS FOR THE DEGREE OFMASTER OF APPLIED SCIENCEinTHE COLLEGE OF GRADUATE STUDIES(Electrical Engineering)The University of British Columbia(Okanagan)February 2021c© Jing Lin, 2021The following individuals certify that they have read, and recommend to the College of GraduateStudies for acceptance, the thesis entitled:Predictive Analytics for Building Power Demand: Day-Ahead Forecasting and Anomaly Predic-tionsubmitted by Jing Lin in partial fulfillment of the requirements forthe degree of Master of Applied Science.Examining Committee:Zheng Liu, School of EngineeringsupervisorKasun Hewage, School of EngineeringSupervisory Committee MemberChen Feng, School of EngineeringSupervisory Committee MemberJian Liu, School of EngineeringUniversity ExamineriiAbstractThe rising energy demand of buildings contributes to global resource consumption and greenhousegas emissions. Understanding the energy consumption habits of a building is the first and mostcrucial step in order to achieve energy efficiency. Forecasting and anomaly prediction of powerdemand play an essential role in the electric industry, as it provides the basis for making deci-sions in power system planning and operation. However, there are several challenges in predictiveanalytics to improve energy efficiency. For instance, the information in the forecast needs to beinterpreted by a person with domain expertise. Moreover, automated interpretation of upcomingabnormal behaviors needs ground-truth labeling, but labels are not always available from powermeter data.To address those problems, a novel Predictive Power Demand Analytics methodology (PPDAM)is proposed in this thesis, based on long short-term memory neural networks and symbolic aggre-gate approximation. The main target of PPDAM is to identify upcoming normal and anomalousdemand patterns, through mining historical power demand and temperature data, and day-aheadpower demand forecast. The PPDAM consists of two modules: power demand forecasting andanomaly prediction. The power demand forecasting module is utilized to predict day-ahead powerprofiles (time sequences), as a baseline for pattern generation and anomaly prediction. In the mod-ule of anomaly prediction, the historical and predicted time-series profiles are first transformedinto patterns and later retrieved from a system of labeled repositories. The patterns are classifiedas normal or anomalous based on their frequency of appearance in the pattern repositories.The power demand data cover the total electrical power consumption in seven buildings at theUniversity of British Columbia (UBC). The experimental results indicate that a power forecastcould be mapped as different foreseeable demand patterns, each with a specific probability of oc-currence. Classification results indicate that our method is robust and fairly accurate in predictinganomalies despite the diversities of building types and behaviors. The outcomes of this work couldiiiprovide building operators with a solution to derive latent information in power consumption data.The derived information could be used to improve the working conditions of the building’s powersystem.ivLay SummaryThe energy demand of buildings continues to rise, having a significant impact on global resourceconsumption and greenhouse gas emissions. Energy efficiency is one of the lowest-cost methods toreduce greenhouse gas emissions and the cleanest way to meet the increasing demand for energy.In order to improve energy efficiency in buildings, upcoming normal and anomalous power demandpatterns need to be identifies, through mining historical power demand and temperature data, andday-ahead power demand forecast.The main contribution of this study lies in a new data-driven predictive analytics methodologyfor the total power consumption in the non-residential building sector. The novelty of this workincludes the implementation of a new solution, based on Long Short-Term Memory (LSTM) DeepNeural Network (DNN) and the Symbolic Aggregate Approximation (SAX) data mining method,which offers major advantages over traditional approaches. Aligned with the current researchchallenges in the field, the proposed methodology takes advantage of real-time data to predict anactivity indicator, providing accurate insight regarding the power demand of the building. This isthe first time that LSTM neural networks and SAX are integrated for accurate insights regardingthe power needs of the building, intending to support more efficient energy management.vTable of ContentsAbstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iiiLay Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vTable of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viList of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiiList of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixGlossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiAcknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiiiChapter 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 Background. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Research Motivations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Research Objectives and Proposed Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.4 Contributions and Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Chapter 2: Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1 Power Demand Forecasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1.1 Engineering Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1.2 Statistical Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.1.3 Machine Learning Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.2 Anomaly Prediction of Time Series Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.1 Statistical Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2.2 Machine Learning Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Chapter 3: Predictive Power Demand Analytics Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . 153.1 The Overall Application Workflow of PPDAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.2 Power Demand Forecasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.2.1 Long Short-Term Memory Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16vi3.2.2 Model Inputs and Architectures Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.2.3 Metrics for LSTM Models Training and Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.2.4 SAX Distance Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243.3 Anomaly Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.3.1 Symbolic Aggregate Approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.3.2 Creation and Labeling of SAX Pattern Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.3.3 Pattern Retrieval and Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Chapter 4: Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.1 Data Collection from Buildings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.2 Experiments on Power Demand Forecasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344.2.1 Implementation of LSTM models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354.2.2 Results of Power Demand Forecasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354.3 Experiments on Anomaly Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394.3.1 Labeled Pattern Repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404.3.2 Results of Anomaly Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Chapter 5: Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455.1 Summary of Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455.2 Limitations and Future Research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49viiList of TablesTable 3.1 Figures of merit for LSTM models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Table 3.2 A distance lookup table when alphabet size is 4 . . . . . . . . . . . . . . . . . . . . . . . . . . 25Table 3.3 Confusion matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Table 4.1 Information of buildings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Table 4.2 Configurations and prediction performance of LSTM models implemented onthe dataset of the university service building . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Table 4.3 Prediction performance of the best models implemented on seven buildings . 39Table 4.4 The number of patterns in each parent repository . . . . . . . . . . . . . . . . . . . . . . . . . 40Table 4.5 Child repository of ‘aaaaaa’ in holiday parent repository . . . . . . . . . . . . . . . . . . 42Table 4.6 Child repository of ‘aaaaaa’ in weekend parent repository . . . . . . . . . . . . . . . . . 42Table 4.7 Child repository of ‘aaaaaa’ in weekday parent repository . . . . . . . . . . . . . . . . . 42Table 4.8 Thresholds of three parent repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Table 4.9 Number and percentage of anomalous days for seven buildings . . . . . . . . . . . . 43Table 4.10 Confusion matrix of seven buildings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Table 4.11 Motif and discord classification results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44viiiList of FiguresFigure 3.1 Workflow of the application of PPDAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Figure 3.2 Design of the power demand forecasting module based on LSTM modeling 17Figure 3.3 Chain structure of LSTM neural networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Figure 3.4 Cell structure of LSTM networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Figure 3.5 Activation function of sigmoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Figure 3.6 Activation function of tanh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Figure 3.7 Time spans of inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Figure 3.8 Model architectures: (a) standard architecture, (b) single-encoder decoder ar-chitecture, (c) multi-encoder decoder architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Figure 3.9 Process of SAX pattern transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Figure 3.10 A transformed daily profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Figure 3.11 Creation and labeling of parent pattern repositories . . . . . . . . . . . . . . . . . . . . . 28Figure 3.12 Hierarchical structure of patterns repositories . . . . . . . . . . . . . . . . . . . . . . . . . . 28Figure 3.13 An example of weekday repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Figure 3.14 Design of the anomaly classification test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Figure 4.1 Bar plots of models’ MSE, MAE and SAX distance . . . . . . . . . . . . . . . . . . . . . 37Figure 4.2 Predictions for first 336 hours in the test set of Config 17 . . . . . . . . . . . . . . . . . 38Figure 4.3 Predictions for first 336 hours in the test set of Config 23 . . . . . . . . . . . . . . . . . 38ixFigure 4.4 Frequency distribution of (a) holiday parent repository, (b) weekend parentrepository, (c) weekday parent repository of the university service building . . . . . . . . . . . . . 41xGlossaryPPDAM Predictive Power Demand Analytics methodologyUBC University of British ColumbiaLSTM Long Short-Term MemoryDNN Deep Neural NetworkSAX Symbolic Aggregate ApproximationUBC University of British ColumbiaEOS Earth and Ocean ScienceML Machine LearningARX Auto-Regressive models with eXogeneous inputsDL Deep LearningMEM Main Electric MeterRWS Rooftop Weather StationMSE Mean Squared ErrorUSB University Services BuildingAERL Aquatic Ecosystems Research LaboratoryCKC C. K. Choi BuildingESB Earth Sciences BuildingFNH Food, Nutrition and Health BuildingxiFSC Forest Sciences CenterPSB Pharmaceutical Sciences BuildingSTD Standard DeviationxiiAcknowledgmentsI deeply acknowledge my supervisor Prof. Zheng Liu, Prof. Walter Me´rida and Dr. Julia´n A.Ferna´ndez whose advice, encouragement, and support made this work possible. Not only did theygrant me a great freedom in my study, but they also delivered me lots of academic knowledge. Itis my honor to study and work under their guidance.Thanks for the financial support from Natural Resources Canada (NRCAN) [grant numberEVID-1026]. Thanks also to committee members Prof. Kasun Hewage and Prof. Chen Feng fortheir crucial role in completing my thesis.I would also like to thank my dear colleagues Dr. Omar E. Herrera, Ms. Rakiba Rayhana,Mr. Amirhossein Zaji, Mr. Ran Zhang for sharing their academic experiences and constructiveviewpoints generously with me during our discussions. Also, I need to thank Mr. Patrick Clark,who helped polish my writing.Finally, sincere thanks to my family and friends for their understanding, encouragement andsupport in all these years.xiiiChapter 1: Introduction1.1 BackgroundDuring the past two decades (2008 to 2018), the world energy consumption increased by 83.7%(13181 to 24738 TWh); the world carbon dioxide (CO2) emissions increased by 49.7% (22394 to33513 Mt) [1]. Current predictions show that this growing trend will continue. The buildings andbuildings construction sectors combined are responsible for over one-third of global final energyconsumption and nearly 40% of total direct and indirect CO2 emissions.The rapidly growing world energy use has already raised concerns over supply difficulties,exhaustion of energy resources and heavy environmental impacts (ozone layer depletion, globalwarming, climate change, etc.) [2]. The emission of greenhouse gases including CO2 in higherlayers of the atmosphere is known as the main cause of global warming phenomena [3]. Energy-related CO2 emissions from buildings have risen in recent years. Several factors have contributedto this rise, including growing energy demand for heating and cooling with rising air-conditionerownership and extreme weather events. Enormous emissions reduction potential remains untappeddue to the continued use of fossil fuel-based assets, a lack of effective energy-efficiency policiesand insufficient investment in sustainable buildings.Among the aforementioned reduction potential, energy efficiency is one of the lowest-costmethods to reduce greenhouse gas emissions and the cleanest way to meet the increasing demandfor energy [4]. Improved energy efficiency helps households, businesses, and institutions savemoney, be more competitive, and contribute to an improved quality of life. For this reason, im-proving energy efficiency in buildings is today a prime objective for energy policy at regional,national, and international levels, to reduce the amount of gas emission and fossil fuel consump-tion [2]. One most effective approach to reducing CO2 emission and energy consumption withregards to new buildings is to consider energy efficiency at a very early design stage. On the other1hand, efficient energy management and smart refurbishments can enhance the energy performanceof the existing stock. All these solutions entail accurate predictive analytics for understanding theenergy consumption habits of a building and optimal decision making, which is the first and mostcrucial step in order to achieve energy efficiency.1.2 Research MotivationsPredictive analytics is an area of statistics that deals with extracting information from data andusing it to predict trends and patterns [5]. Predictive analytics for building’s power demand canimprove the supervision of building operation, establish a baseline for energy consumption, trackannual progress of intensity improvements, help increase energy efficiency, and maximize energysavings [6]. Among various data-driven predictive analytics methods for improving building en-ergy efficiency, predicting and monitoring the power consumption with the aim of identifying ab-normal behaviors is promising and cost-effective [7]. Forecasting consumption patterns is also oneof the most important stages for implementing energy management systems in buildings. Methodsof power demand forecasting and anomaly prediction with time-series data are reviewed and pre-sented in detail in Chapter 2. There are several research gaps in the usage of day-ahead forecastingfor anomaly detection.The power consumption in buildings is influenced by many factors, such as ambient weatherconditions (especially the temperature), building structure and characteristics, the operation of sub-level components like lighting and HVAC (Heating, Ventilating, and Air-Conditioning) systems,occupancy, and their behaviors [8]. This complex situation makes it very difficult to accuratelyimplement the prediction of building power consumption. First, the information contained in timeseries predictions usually needs to be interpreted by a human with domain expertise. Daily loadtime series can be quantified with a set of meaningful statistics. For example, the daily averageload, the minimum and maximum load, the median load and so on, all could be useful statisticsin later modeling and analysis. Besides these common descriptive statistics, other meaningfulstatistics, such as near-base load, near-peak load, high-load duration, rise time and fall time, could2be defined to describe the load profiles, [9]. These statistics are related to load time series shapeand time and are useful for building energy management. However, the information contained inload profiles needs to be further processed and interpreted by expertise to apply. Additionally, asreviewed in Section 2.1 regarding power demand forecasting, it is unclear how the performance ofmodels is influenced by input variables and model architectures.Anomaly prediction is the process of identifying a prediction that deviates greatly from otherobservations in a data set. In the field of building energy consumption, the anomaly is equal toabnormal energy consumption, which is generally caused by equipment faults or improper op-eration. However, automated interpretation of upcoming abnormal behaviors needs ground-truthlabeling, but labels are not always available from power meter data [10]. For practical applications,anomaly detection without anomaly labels is closer to the actual requirements of building opera-tion managers, because it is expensive and time-consuming to generate labeled data for abnormalpower consumption in buildings. Therefore, a promising way to solve this dilemma is to find analgorithmic way of labeling anomalies. If unsupervised methods were to be used to create thoselabels (as reviewed in Section 2.2), those labels would have to be interpreted to describe anomaliesin consumption behaviors.These remaining problems are motivations of seek effective methods, capable of labeling andpredicting power demand, and extracting anomalous information from those predictions. To thisend, a novel Predictive Power Demand Analytics methodology (PPDAM) is presented in this thesisto address the aforementioned research gaps.1.3 Research Objectives and Proposed MethodologyThe main target of PPDAM is to identify upcoming normal and anomalous demand patterns,through mining historical power demand and temperature data, and day-ahead power demand fore-cast. Therefore, a new solution advancing the area of predictive analytics of time series data can beprovided. The power demand data are the total electrical power consumption in the building, i.e.,the summation of the HVAC system, plug loads (computers, kettles, microwaves, etc.), lighting,3etc. It is measured by the main electric meter installed on the main electrical feeder into the build-ing. The temperature data are generated by the Earth and Ocean Science (EOS) Rooftop WeatherStation at the University of British Columbia (UBC). The combination of a supervised method,i.e., LSTM networks (part of the family of deep learning models) and an unsupervised clusteringmethod, i.e., SAX, are explored. The PPDAM consists of two modules: power demand forecastingand anomaly prediction.The power demand forecasting module is utilized to predict day-ahead power profiles (time se-quences), as a baseline for pattern generation and anomaly prediction. Power demand forecastingfacilitates the estimation of the required electricity, in advance, to control the demand effectively(peak shaving and load shifting) [11]. Predicted power demand sequences could be used for imple-menting model-predictive control strategies for HVAC equipment [12]. Automation systems canbenefit from this information in order to make decisions autonomously by following energy-savingoptimization strategies.In the module of anomaly prediction, the historical and predicted time-series profiles are firsttransformed into patterns and later retrieved from a system of labeled repositories. The patterns areclassified as normal or anomalous based on their frequency of appearance in the pattern reposito-ries. The aim of these data is to provide greater insight into how a building consumes energy and,therefore, what improvements are likely to be most effective in reducing consumption. Becausehistorical consumption data containing abnormal building behavior is often ignored, informationgained from the anomaly prediction module can be used to notify building managers of issues withminimal delay, helping to reduce energy costs.1.4 Contributions and Thesis OutlineThe main contribution of this study lies in a new data-driven predictive analytics methodologyfor the total power consumption in the building sector. The novelty of this work includes theimplementation of a new solution, based on LSTM deep neural networks and the SAX data min-ing method, which offers major advantages over traditional approaches. Aligned with the current4research challenges in the field, the proposed methodology takes advantage of real-time data topredict an activity indicator, providing accurate insight regarding the power demand of the build-ing.On one hand, the day-ahead power demand forecasting module, comprehending various inputcombinations and LSTM model architectures, increases the adaptability to day-types and improvesthe resulting accuracy by including associated last-week data. On the other hand, the anomaly pre-diction module, based on the unsupervised SAX method, automates pattern-labeling and pattern-retrieving of time series power consumption and eliminates the difficulty in obtaining ground truthlabels of anomalous consumption in the field of pattern detection. This is the first time that LSTMneural networks and SAX are integrated for accurate insights regarding the power needs of thebuilding, intending to support more efficient energy management. Building operators could takeactions on completing building maintenance tasks according to the insights obtained.This thesis is organized into five chapters. Chapter 1 gives the background information andmotivation of this research. This chapter also briefly introduces the novelty of the proposed pre-dictive power demand analytics methodology and the contributions of this research. Chapter 2gives a comprehensive literature review of existing methods, from the aspects of power demandforecasting and anomaly detection of time series data. Engineering, statistical and machine learn-ing methods in the field of power demand forecasting are reviewed. Statistical and machine learn-ing methods in the field of anomaly prediction of time series data are reviewed. In Chapter 3,the PPDAM is proposed and described in detail. The three-step application workflow of PPDAMis introduced first to show the feasibility and potential of real-world implementation. Further-more, the modeling of power demand forecasting and anomaly prediction modules are elaborated,including theories of long short-term memory networks and symbolic aggregate approximation,models training and testing, creation and labeling of pattern repositories, and the design of classifi-cation tests. Chapter 4 presents the experimental results of the modeling of the aforementioned twomodules. Section 4.1 covers the information of seven buildings and datasets involved in the experi-ments. The optimal model configuration (inputs and model architecture) is revealed in Section 4.2;5labeled pattern repositories are portrayed in Section 4.3. Section 4.2 also shows the anomaly clas-sification results of the seven buildings. Summary of the research, conclusions, limitations andfuture research are drawn in Chapter 5.6Chapter 2: Related WorkThis thesis focuses on understanding how to utilize historical and predicted data to obtain thepattern profile of power consumption in a building, and to predict normal and anomalous patternsfor the next 24 hours. Therefore, power demand forecasting and anomaly detection techniques arereviewed in this chapter.2.1 Power Demand ForecastingIn the methodology presented in this thesis, power demand forecasting is the foundation of pat-tern mining. The power consumption in buildings is influenced by many factors, such as ambientweather conditions (especially the temperature), building structure and characteristics, the oper-ation of sub-level components like lighting and HVAC systems, occupancy, and their behaviors[8]. This complex situation makes it very difficult to accurately implement the prediction of build-ing power consumption. Recently developed forecasting methods include engineering methods,Statistical methods, machine learning (ML) methods. Zhao et al. [8] and Hernandez [13] pro-vided a comprehensive review of research work related to the modeling and prediction of buildingenergy consumption. Different methods are compared on the accuracy to forecast the buildingload given available information on weather conditions, building structure, operation of sub-levelcomponents, occupancy, and building use.2.1.1 Engineering MethodsThe engineering methods use very elaborate physical functions or thermal dynamics to preciselycalculate the power consumption for all components of the building with building’s and envi-ronmental information, such as external climate conditions, building construction, operation andHVAC equipment, as the inputs. They have been adequately developed over the past fifty years.Touretzky and Patil [14] developed Auto-Regressive models with eXogeneous inputs (ARX)7to forecast power demand in conjunction with existing physics-based modeling approaches. Al-Homoud [15] reviewed two simplified engineering methods for estimating small and large build-ings’ energy consumption, respectively. Yao and Steemers [16] developed a simple engineeringmethod of predicting a daily energy consumption profile for one season, for the design of a re-newable energy system for residential buildings. They used the average consumption from largeamounts of statistical data for the modeling of each electric appliance in the building.Although these elaborate simulation tools are effective and accurate, in practice, there are somedifficulties. Since these tools are based on physical principles, to achieve an accurate simulation,they require details of building and environmental parameters as the input data. On one hand,these parameters are unavailable to many organizations. For example, the information on eachclassroom in a building on campus is always difficult to obtain. This lack of precise inputs willlead to a low accurate simulation. On the other hand, operating these tools normally requires te-dious expert work. The calculation of energy use for space heating and cooling for a building andits components may require the knowledge of a standard developed by the ISO (International Or-ganization for Standardization). Those expertise making engineering methods difficult to performand cost-inefficient. For these reasons, engineering methods are not considered in this study.2.1.2 Statistical MethodsStatistical regression models correlate the power consumption with the influencing variables. Theseempirical models are developed from historical performance data, which means that before train-ing the models, it needs to collect enough historical data. In terms of the research problems itsolves, statistical regression models can be divided into two categories.The first is to predict the power usage over simplified variables such as one or several weatherparameters. Ansari et al. [17] calculated the cooling load of a building by adding up the coolingload of each component of the building envelope. Each sub-level cooling load is a simple regres-sion function of the temperature difference between inside and outside. Dhar et al. [18] modeledheating and cooling load in commercial buildings with outdoor dry-bulb temperature as the only8weather variable. The second one is to estimate important parameters of power usage, such as totalheat loss coefficient, total heat capacity and gain factor, which is useful in analyzing the thermal be-havior of a building or sub-level systems. Jime´nez and Heras [19] used the Auto-Regressive modelwith eXtra inputs (ARX) to estimate the U and g values of building components. Auto-RegressiveIntegrated Moving Average (ARIMA) models and ARIMA with eXternal inputs (ARIMAX) mod-els [20] have also been applied to some applications, predicting and controlling the peak electricitydemand for commercial buildings and predicting the power demand of the buildings.2.1.3 Machine Learning MethodsSometimes machine learning is intertwined with statistical modeling, but they are different eventhough there is an overlapping. Machine Learning is the field of study interested in the developmentof black-box algorithms to transform data into intelligent action without relying on rule-based pro-gramming. In the scenario where the need for accuracy in results is higher than the interpretabilityof the model, machine learning models will suffice.In order to compare the performance of ML and statistical models in terms of accuracy andcomputational requirements, Makridakis et al. [21] evaluated models across multiple forecastinghorizons using a large subset of 1045 monthly time series used in the M3 Competition. Aftercomparing the performance of ten ML methods with that of eight traditional statistical ones, theyfound that the former are dominated across both accuracy measures used and for all forecastinghorizons examined. Moreover, it was observed that their computational requirements are consid-erably greater than those of statistical methods.ML approaches can be divided into supervised, unsupervised, reinforcement learning, etc.Time series forecasting falls in the field of regression problem in supervised ML learning. Manyregression ML algorithms have been explored in the literature, which can be categorized as shal-low ML and deep learning models. Shallow ML models include K-Nearest Neighbor regression(KNN), CART regression trees (CART), Support Vector Regression (SVR), Gaussian Processes(GP), etc. Zhou in [22] compared four ML-based algorithms for cooling load forecasting of a9large-scale shopping mall, including Chaos-SVR and wavelet-SVR hybrid forecasting algorithms,back propagation neural network and SVR forecasting algorithms.According to Cai et al. in [23], deep learning (DL) techniques for the day-ahead building loadforecast show higher performance compared to traditional ML algorithms. It can be concludeddeep neural networks (DNNs) are much more widely used by the scientific community and theindustry due to their high efficiency, the relatively small amount of time needed to set up thesystem, and their performance. A comprehensive overview of deep learning methodologies can befound in [24]. Specifically, LSTM networks are especially suited for time series forecasts due totheir capability for learning long-term dependencies and avoiding vanishing gradients [25]. Theperformance of LSTM based models to address a challenging load forecasting problem is evaluatedin [26] and [27]. By exploiting the long term dependencies in the time series, LSTM is capableof forecasting complex univariate electric load time series with strong non-stationarity and non-seasonality. LSTM networks are selected due to their suitability to process time-series data as wellas because of its robustness in forecasting day-ahead power demand profiles.2.2 Anomaly Prediction of Time Series DataAnomaly prediction in this thesis is the process of identifying a prediction that deviates greatlyfrom other observations in a data set. In the field of building energy consumption, the anomaly isequal to abnormal energy consumption, which is generally caused by equipment faults or improperoperation. In recent years, data-driven approaches are widely adopted to achieve reliable and robustanomaly detection for building energy consumption. Wang et al. [28] summarize anomalies intotwo levels according to the scope of the research object: whole building level, and system andcomponent level. The whole building anomaly detection only focuses on the overall consumptionof the building, while system and component anomaly detection can identify and locate exactlywhich component or subsystem leads to anomalous issues. This thesis focuses on whole buildinganomaly detection.Despite the simplicity of the aforementioned anomaly classification, a more common concern10during anomaly detection is that whether there are explicit labels for anomalies. Therefore, existinganomaly detection methods relevant to buildings can be divided into two categories [10]: anomalydetection with anomaly labels and anomaly detection without anomaly labels. Essentially, theaim of anomaly detection with anomaly labels is to obtain accurate classification models, becausethe prediction needs to be classified as normal or anomalous. However, for practical applications,anomaly detection without anomaly labels is closer to the actual requirements of building operationmanagers, because it is expensive and time-consuming to generate labeled data for abnormal powerconsumption in buildings. Methods of anomaly detection without anomaly labels can be dividedinto statistical methods and machine learning methods.2.2.1 Statistical MethodsWhen a power system is in operation, each node generates a large volume of operational data inreal-time, including power consumption, voltage, current, active power and reactive power of thenode. These data are random due to random disturbances from nonelectrical (e.g., the external en-vironment (region, climate and human Factors)) and electrical factors (e.g., technical failure of theinternal equipment of the power grid and connections of the distributed power sources), therebyforming random power variables (parameters). These parameters, which change with time, re-flect the operating state of the power grid. Zhang [29] presented a theoretical high-dimensionalrandom matrix model approach based on big data. Simulation of massive volumes of data basedon a big data processing platform is the key to the efficiency of the proposed method. However,power system data are still considered confidential information that belongs to the operating com-panies. Ordinary researchers are unable to obtain the corresponding operational data for powergrids, which is a bottleneck in big data research. Thus, considering the limited data size and num-ber of parameters (only power consumption and temperature), this method is not feasible to beimplemented in the data collected from one building.Chou and Telaga [30] applied a two sigma rule to detect anomalies, and this rule simply classi-fies any points outside of two standard deviations from the mean as anomalous data. Generalized11extreme studentized deviate (GESD) algorithm has been implemented in anomaly detection inbuilding energy consumption and proved to be computationally efficient in handling masses ofbuilding energy data [31]. These statistical methods have some inherent disadvantages, becausethe anomaly is generally defined as a point outside of several standard deviations from the mean.This kind of definition is straightforward and intuitive, but it may lead to the rough classification ofhigh energy consumption, and the complexity of electricity consumption patterns may be ignored.Fonseca [32] presented a SAX-based statistical method to automatically cluster typical days ofenergy consumption in one or several buildings. The method is based on an optimized version ofthe Symbolic Aggregate approXimation (SAX) method, which is adopted to tackle the challengeof high dimensionality in time series data. SAX is a data mining technique for clustering timeseries with applications in building fault detection and building performance assessment. TheSAX process converts time-series data into a set of strings that can then be grouped together for thepurposes of clustering, motif and discord analysis, and finding anomalous behavior. The numberof clusters and accuracy of SAX highly depends on two highly sensitive input variables, i.e., theword size and the alphabet size. One novelty of this work is the automation of parameter selectionof load profiles for different building use types. They proposed the use of the genetic algorithmNSGA-II to optimize the number of words and alphabet size of SAX subjected to three fitnessobjectives, i.e., maximize data accuracy and compression and minimize complexity. Potentialfuture uses of the approach include advanced studies in fault detection and calibration of urbanbuilding performance models. Miller et al. in [33] developed a SAX-based framework for motifand discord extraction, and clustering to detect the underlying structure of building performancedata. SAX allows discretization of time series data which facilitates the use of various motif anddiscord detection algorithms. The process breaks time series data into subsequences which areconverted into an alphabetic symbol. These symbols are combined to form strings to represent theoriginal time series enabling various mining and visualization techniques. Infrequent daily patternsare filtered and tagged for analysis of potential energy savings opportunities. They applied theapproach on 474 days of example data from an international school campus in a tropical climate12and 407 days of data from an office building from a temperate European climate. Discords arefiltered resulting in 17 and 22 patterns found. Selected discords are investigated and many correlatewith specific failures and energy savings detected by the on-site operations staff.2.2.2 Machine Learning MethodsMachine learning techniques for anomaly detection without labels can be classified into unsuper-vised learning-based methods and regression-based methods [34]. Commonly used unsupervisedlearning algorithms include principal component analysis (PCA), nearest-neighbor based tech-niques, clustering, and association rule [35]. Miller et al. in [36] reviewed research on unsuper-vised machine learning techniques as applied to non-residential building performance control andanalysis. Goldstein et al. evaluated 19 different unsupervised anomaly detection algorithms on10 datasets from different application domains and revealed the strengths and weaknesses of thedifferent approaches [37].PCA is one of the most popular algorithms in the field of building system fault detection. Ittransforms a group of correlated variables into a new group of variables that are uncorrelated ororthogonal to each other. The k-nearest-neighbor global unsupervised anomaly detection algorithmfocuses on global anomalies and is not able to detect local anomalies. First, for every record inthe dataset, the k-nearest-neighbors have to be found. Then, an anomaly score is computed usingthese neighbors, whereas two possibilities have been proposed [38]. The clustering algorithmdivides measurements concerned into several clusters according to the geometric distances betweenthem. Data in a cluster have similar statistical characteristics. Data in different clusters havequite different statistical characteristics. In general, the statistical characteristics of faulty data aredifferent from those of normal data. They should belong to different clusters [39]. The Associationrule algorithm is powerful in discovering relations between various measurements. The discoveredrelations could reveal the system operation patterns, but it needs domain experts to further analyzethe patterns for fault detection [40].Regression-based methods include deep learning models, support vector regression (SVR),13etc. Deep learning techniques can be applied to build a regression model of which the output isa continuous variable such as energy consumption, temperature and so on. Mavromatidis et al.trained an artificial neural network to predict the energy benchmarking values for abnormal detec-tion of supermarket energy consumption [21]. SVR finds a hyperplane that maximizes the marginand minimizes the errors which are outside of the margins. Zhao et al. proposed an SVR-basedmethod to detect system-level incipient faults in HVAC systems. The support vector regressionalgorithm is used to develop the reference performance index models [41].For machine learning methods, the anomaly is generally defined as a point outside the bound-aries based on the predicted value, and in this context, the position of the boundaries is not fixed.However, the above methods can only judge whether the object is an outlier, while the severity ofthe outlier is not evaluated. Moreover, machine learning methods rely on the training data heavily.They could obtain a very high fault detection and diagnosis accuracy and could work in the casesthat some sensors are missing. They are feasible to be trained and applied automatically, but themodels should be trained using a large amount of normal data for fault detection and faulty datafor fault diagnosis. They cannot extrapolate beyond the range of the training data.It can be concluded that the SAX-based statistical method is shown to be a simple but robust op-tion for automated power profile labeling and anomaly detection. Labeling patterns can be helpfulfor load condition monitoring [42]. In this thesis, SAX approach is applied to identify day-aheadanomalous or normal power patterns, due to its calculation simplicity compared to machine learn-ing methods, lower dependence on big data, and the capability to reduce the high-dimensionality.The categories of tasks undertaken by SAX include clustering, novelty detection, motif and discorddetection, rule extraction, and visual analytics.14Chapter 3: Predictive Power Demand Analytics MethodologyThe proposed Predictive Power Demand Analytics Methodology (PPDAM) is thoroughly ex-plained in this chapter. Section 3.1 introduces the overall architecture of the system, includingthe workflow of data collection, power demand forecasting, and anomaly prediction modules. Sec-tion 3.2 introduces the design of the power demand forecasting module, including theories ofLSTM and SAX, options of LSTM model architectures and inputs, and how to evaluate forecast-ing performance. Section 3.3 introduces how to create and label pattern repositories, and classifypatterns as normal and anomalous.3.1 The Overall Application Workflow of PPDAMThe application of PPDAM is illustrated in Figure 3.1. The overall system includes three steps:data collection, power demand forecasting, and anomaly prediction. The power demand data coverFigure 3.1: Workflow of the application of PPDAMthe total electrical power consumption in the building, measured by the main electric meter (MEM)installed on the main electrical feeder into the building. The temperature data are generated by theEOS Rooftop Weather Station (RWS) at UBC. The optimal combination of power and temperaturedata (introduced in Section 3.2.2 and Section 4.2.2) is extracted from the database and sent to15the data preprocessing unit, where raw inputs get cleaned and normalized. Processed data flowinto the optimal LSTM model, which predicts the day-ahead time-series power demand. Thepredicted power demand sequence, in the form of continuous data, is converted into a discretepower demand pattern by a SAX pattern transformer. The power demand pattern is retrievedfrom labeled pattern repositories in which patterns are classified respectively as frequent patterns(motifs) and infrequent patterns (discord, anomalies). Thus, the motif or discord label is assignedto the predicted pattern.3.2 Power Demand ForecastingFigure 3.2 shows the design of the power demand forecasting module based on LSTM modeling.Historical power and temperature data are gathered and fed into the data preprocessing unit, whereraw data are cleaned and standardized. Processed data are utilized to train and test LSTM models,and to generate time-series predictions of electricity power for the next 24 hours. Metrics results,e.g., Mean Squared Error (MSE), are evaluated during model testing. Power demand predictionsand historical power demand are both converted to discrete patterns by SAX pattern transformersand the average distance between predicted and historical patterns is calculated. In order to selectthe optimal LSTM model architectures and inputs, the metrics results and SAX pattern distanceneed to consider and balance.3.2.1 Long Short-Term Memory Neural NetworksLSTM neural networks are a type of recurrent neural networks (RNNs). RNNs take the form ofa chain of looping modules of the neural network, which means connections between nodes forma directed graph along a temporal sequence. Thus, RNNs can save the representation of previousinput(s) in memory while generating current output(s). LSTM neural networks also contain thischain structure, as shown in Figure 3.3. The input of LSTM neural network X is in three dimen-sions - (m, Tx, nx), where m is the number of data samples and Tx is the number of timesteps ofeach sample. In Figure 3.3, X 〈t〉 represents the input X at the timestep t and nx is the number of16Figure 3.2: Design of the power demand forecasting module based on LSTM modelinginput variables. For example, if one thousand samples of the last 24-hour power and temperaturedata are taken as input, the input shape to the LSTM model would be (1000, 24, 2). The outputfor each timestep is represented by a〈t〉. Hidden state c〈t〉 is a representation of previous inputs,enabling the participation of inputs from previous timesteps in the estimation of current output.The inner cell structure is illustrated in figure 3.4. For one-time forward propagation, parame-ters are the same for each time step of input. There are three gates in LSTM cell: input gate, forget17Figure 3.3: Chain structure of LSTM neural networksFigure 3.4: Cell structure of LSTM networksgate and output gate. Default activation function of these gates is sigmoid function (Eq. (3.1)).Sigmoid(x) = σ(x) =11+ e−x=ex1+ ex(3.1)As shown in Figure 3.5, sigmoid function has domain of all real numbers with return value mono-tonically increasing from 0 to 1.Inputs of these three gates are X 〈t〉 and a〈t−1〉. what happened to inputs inside gates shows inEq. (3.2), (3.3) and (3.4). Outputs of these gates are naturally between zero and one: one represents“completely keep this” while zero represents “completely get rid of this”. Therefore, three gateoutputs are taken as control signal later.i〈t〉 = σ(Wia×a〈t−1〉+Wix×X 〈t〉+bi) (3.2)18í í í í     [6LJPRLG [ Figure 3.5: Activation function of sigmoidf 〈t〉 = σ(Wf a×a〈t−1〉+Wf x×X 〈t〉+b f ) (3.3)o〈t〉 = σ(Woa×a〈t−1〉+Wox×X 〈t〉+bo) (3.4)Output of candidate box between input gate and forget gate is c˜〈t〉 which is candidate value ofhidden state c〈t〉.í í í í     [ííWDQK [ Figure 3.6: Activation function of tanhtanh(x) =ex− e−xex+ e−x(3.5)c˜〈t〉 = tanh(Wca×a〈t−1〉+Wcx×X 〈t〉+bc) (3.6)After get three control signals and candidate hidden state, hidden state c〈t〉 and output for this19timestep a〈t〉 can be calculated as Eq. (3.7) and Eq. (3.8).c〈t〉 = i〈t〉 ∗ c˜〈t〉+ f 〈t〉 ∗ c〈t−1〉 (3.7)a〈t〉 = o〈t〉 ∗ tanh(c〈t〉) (3.8)The symbol “∗” in Figure 3.4, Eq. (3.7) and (3.8) represents the element-wise multiplication. Dis-tinguished from the common matrix product, the element-wise multiplication takes two matricesof the same dimensions and produces another matrix of the same dimension as the operands, whereeach element i, j is the product of elements i, j of the original two matrices.3.2.2 Model Inputs and Architectures DesignFour combinations of power and temperature, and three model architectures were designed tovalidate the performance of the LSTM models on predicting power demand. Figure 3.7 shows aFigure 3.7: Time spans of inputsvariety of potential time spans for inputs. The sampling time is equal to one hour. In this figure,each circle represents the beginning of a day (12 am), and the dotted lines represent time spans.The last week’s 24-hour realization indicates the same time span as the forecast time span but onthe previous week. For example, as shown in Figure 3.7, if the present day is Sunday and the20current time is 11:55 pm, the forecast time span is 24 hours (the next day, Monday starting at 12am), and the last week’s 24h realization starts on the previous Monday at 12 am.Four input combinations are considered for the LSTM modeling:• Input 1: last n-hour power data samples, where n ∈ {24,48,72}.• Input 2: last n-hour power data samples combined with last n-hour temperature samples,where n ∈ {24,48,72}.• Input 3: last week’s 24h power data samples and last n-hour power data samples, wheren ∈ {24,48,72}.• Input 4: last week’s 24h power data samples combined with last week’s 24h temperaturesamples, and last n-hour power data samples combined with last n-hour temperature samples,where n ∈ {24,48,72}.Additionally, three LSTM model architectures are considered: standard architecture (Fig-ure 3.8.a), single-encoder decoder architecture (Figure 3.8.b), and multi-encoder decoder archi-tecture (Figure 3.8.c). Marino et al. in [43] compared the performance of standard architectureand single-encoder decoder architecture for load forecasting. Both were trained and tested for one-hour and one-minute timestep resolution data. The dataset [44] they used consists of four yearsof one-minute resolution electric power consumption data collected from a residential customer[45]. Marino et al. concluded that the standard LSTM architecture failed at one-minute resolutiondata while performing well on the one-hour resolution data. In addition, it was concluded that thesingle-encoder decoder architecture performed well in both datasets. However, to compare the ef-fectiveness of these algorithms, the authors demonstrated that both algorithms needed to be testedon real-world datasets, which is the reason why include these two architectures as part of the ex-periment. Furthermore, multi-encoder decoder architecture is added to compare the performanceof LSTM models given multiple inner representations of the input.As mentioned in Section 3.2.2, the inputs for the three architectures are 3D arrays in the shapeof (m, Tx, nx). The shape of an array is the number of elements in each dimension. In the standard21Figure 3.8: Model architectures: (a) standard architecture, (b) single-encoder decoder archi-tecture, (c) multi-encoder decoder architecturemodel architecture, the input is compressed by the LSTM layers into a 2D array in the shape of(m, n1), where n1 is the number of neurons in the last LSTM layer. In the three architectures, thedense layer reshapes the dimension of the data flowing out from the last LSTM layer, to guaranteethat the output shape is as expected. The output of the standard model has the shape of (m, ndense),where ndense is the number of neurons in the dense layer and it is set equal to Ty. Ty represents thelength of forecast time span, and it is 24h in the implementation.In the single-encoder decoder architecture, the input is converted by the LSTM layers into a2D inner representation of which the shape is (m, n2), where n2 is the number of neurons of the lastLSTM layer. As opposed to standard architecture, this inner representation is decoded into a 3Dtensor of which the shape is (m, Ty, n3). Next, the 3D tensor passes through a dense layer, for thesame reason as for the standard model. However, the output of the single-encoder decoder model22is a 3D tensor in the shape of (m, Ty, 1). The last digit represents the number of output variables,which in this research is equal to one because only power demand is being predicted.In the multi-encoder decoder architecture, each element (the shape is (m, 24, nx)) in an inputset of size nencoder is assigned an individual LSTM encoder. As show in Figure 3.8.c, each LSTMencoder converts the corresponding element into a 2D representation in the shape of (m, n4). Then,all encoded 2D inner representations are concatenated, prior to being decoded. Subsequent pro-cessing stages are similar to the single-encoder decoder architecture, as well as the output’s shape.To select the best LSTM architecture, all models are compared under the same set of inputs andvalue of n. Furthermore, to select the best configuration and set of inputs, the following analysiswas performed, under the same LSTM architectures:• By varying the values of n for each input, one can conclude if increasing n can improveforecasting accuracy.• By comparing separately Input 1 and Input 2, and Input 3 and Input 4 for the same value ofn, one can conclude if adding temperature data improve predicting performance.• By comparing separately Input 1 and Input 3, and Input 2 and Input 4, one can conclude howthe last week’s realization improves the predictability.3.2.3 Metrics for LSTM Models Training and TestingThere are several metrics in place to update the weight values of LSTM networks, such as theMean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE),Mean Absolute Percentage Error (MAPE), etc. By minimizing the error up to a certain acceptablethreshold, the most optimal model is achieved. Zhu et al. in [7] utilized MAE and MAPE asmetrics to evaluate prediction models. Raza et al. in [46] present a methodology on how to useMSE to train supervised learning models. Wang et al. in [47] reviewed the statistical deterministicperformance of MAE, MAPE, and RMSE for forecasting of wind speed.Table 3.1 shows the formulas of the two figures of merit utilized in the methodology to estimate23Table 3.1: Figures of merit for LSTM modelsName Formula PurposeMSE 1/ny×∑nyi=1(yi− yˆi)2 Loss functionMAE 1/ny×∑nyi=1 |yi− yˆi| Metricthe prediction accuracy of the forecasting model. In formulas, ny is the length of one predictedpower demand sequence, which is equal to 24 in this research. MSE is used as the loss function,and MAE is used as a metric when training and testing the models. The loss function is used asthe objective function to be minimized by the optimizer in Keras [48]. In Keras a metric is usedto judge models’ performance, which is independent of the optimization process. Keras is brieflyintroduced in Section 4.2.1.3.2.4 SAX Distance ValidationIn addition to MSE and MAE, the average error (Eq. (3.11)) between historical patterns (HPs) inthe test set and their forecasts (PPs) is considered when selecting the best model architecture andinputs. First, to define the error between one true pattern and the prediction of it, the concept ofdistance between SAX representations is utilized [49]. The distance between two SAX represen-tations, Hˆ and Pˆ, requires first obtaining the distances between each pair of symbols. To calculatethe distance between the r-th symbol and s-th symbol (r,s ∈ {1,2,3,4}) in the chosen alphabet,Eq. (3.9) is used.dist(symbolr,symbols) =0, i f | r− s |≤ 1βmax(r,s)−1−βmin(r,s), otherwise(3.9)Table 3.2 shows a lookup table of the distance between symbols in the alphabet [‘a’, ‘b’, ‘c’,‘d’]. The distance between two SAX representations is given by Eq. (3.10) where hˆi and pˆi are thei-th symbols (i ∈ {1,2, ...,w}) of Hˆ and Pˆ.24Table 3.2: A distance lookup table when alphabet size is 4a b c da 0 0 0.67 1.34b 0 0 0 0.67c 0.67 0 0 0d 1.34 0.67 0 0MINDIST (Hˆ, Pˆ) =√nw√w∑i=1(dist(hˆi, pˆi))2 (3.10)DIST (HPs,PPs) =1mm∑j=1(MINDIST (Hˆ j, Pˆj)) (3.11)As shown in Eq. (3.11), the average distance between Historical Patterns (HPs) and PredictedPatterns (PPs) is the sum of the distances between each predicted and true pattern divided by thenumber of predicted patterns (as well as the number of historical patterns) m. The selected optimalmodel minimizes DIST (HPs,PPs) so that the accuracy of power demand pattern forecasting isguaranteed.3.3 Anomaly PredictionAs described in Section 3.1, a SAX pattern can be classified as a motif or discord by retrievingthis pattern from the labeled parent repositories. The labeled parent repositories are the core of theanomaly prediction process. The creation and labeling of parent pattern repositories are describedin Section 3.3.2. A classification test designed to evaluate the anomaly prediction performance ofthe PPDAM system is introduced in Section 3.3.3.3.3.1 Symbolic Aggregate ApproximationAs with most problems in computer science, the suitable choice of representation affects the easeand efficiency of time series data mining. SAX transformation could generate concise and explicitindicators of the power systems’ working conditions because symbolic representations allow thelabeling of patterns [33]. This section briefly introduces the basics of SAX theory.25Figure 3.9: Process of SAX pattern transformationSAX transforms a time series of an arbitrary length n to a string of an arbitrary number ofcharacters w. This transformation allows dimension reduction, given that n > w. The string takescharacters from an alphabet of length a, where a > 2. Lin et al. in [49] provide a detailed illus-tration of the SAX method. A brief description of the SAX method is presented in the paragraphsbelow.It first requires the transformation of the standardized data into a Piecewise Aggregate Approx-imation (PAA) representation, as shown in Figure 3.9. The main target of PAA is to reduce the timeseries from n dimensions (n equals 24 for daily power profiles) to w dimensions. Thus, the dataare divided into w equal sized segments and the mean value of the data falling within a segment isassigned to that segment. The solid black line in Figure 3.10 shows an example of the load shapeafter sampled down to w segments, where w is equal to 6 and the time span for each time windowis 4 hours. Each grey line represents the mean value of the data falling within this segment.The next stage of the SAX method is to categorize the PAA vector to obtain a discrete represen-tation. Breakpoints are presented as a sorted list of numbers β1, ... , βa−1 such that the area undera N(0,1) Gaussian curve from βi to βi+1 is equal to 1/a (β0 and βa are defined as −∞ and +∞,respectively). As shown in Figure 3.10, the dashed blue, orange and black line represent β1, β2 andβ3, respectively. The distribution space of the y-axis in the figure is divided into four equiprobable26Figure 3.10: A transformed daily profilesegments (a equal to 4). Each value of the PAA vector is mapped to a symbol corresponding to theregion in which it resides.3.3.2 Creation and Labeling of SAX Pattern RepositoriesLet’s assume that a power demand pattern could be interpreted as a statement of the workingcondition of a building’s power system in a day. Thus, a collection of historical patterns couldrepresent working records of the power system for a building, in the same analogy. By creatingpattern repositories, the performance of a building’s power system could be tracked, predicted, anddiagnosed. The process of diagnosing the power system performance using PPDAM is not coveredin this paper and will be explored in future research.There are two types of pattern repositories: parent and child pattern repositories. The structureof the repositories is illustrated in Figure 3.12. These three repositories that contain all of the truehistorical patterns are defined as parent repositories. Each parent repository has a certain numberof child repositories. Each child repository contains all predicted patterns from one true patternin a corresponding parent repository. Therefore, the number of child repositories in a specificparent repository is equal to the number of parent patterns in this parent repository. For instance,27Figure 3.11: Creation and labeling of parent pattern repositoriesFigure 3.12: Hierarchical structure of patterns repositoriesthe weekday parent repository has k child repositories since there are k patterns in this weekdayparent repository. Patterns in the child repositories, also called child patterns, are the result of theprediction using the LSTM model and the SAX representation.The process of creating and labeling of parent pattern repositories is shown in Figure 3.11. A28certain period of historical power demand records of the selected building in the database are datasource of the pattern repositories. Each daily power demand profile in the datasets is convertedto a SAX pattern (hereafter referred to as parent pattern). All parent patterns are categorized intothree groups according to three types of days (weekday, weekend, and holidays). By separatingpatterns according to their day type, the energy use of the building can be better differentiated andidentified. As shown in Figure 3.13, each pattern in the parent repository (the table on the left)has a value (defined as parent frequency) corresponding to the frequency of occurrence of thatpattern in the historical records. In each parent repository, the parent patterns are sorted based ontheir parent frequency. After creating parent pattern repositories, predicted patterns of all historicalpatterns are generated, in order to constitute child repositories. Predicted patterns generated aregrouped and sorted if they are associated with the same parent pattern and the same day type.Figure 3.13 provides an example: a weekday parent repository, the child repository of thepattern ‘aaaaaa’ in this weekday parent repository. All patterns in the table on the left are historicalFigure 3.13: An example of weekday repositoriestrue patterns, and all patterns in the child repository of ‘aaaaaa,’ the table on the right, are predictedpatterns. Each pattern in the parent repository has a value associated (defined as parent frequency),29corresponding to the frequency of occurrence in the historical records. In the child repository, eachchild pattern has a value associated (defined as child frequency), corresponding to the numberof times the parent pattern was predicted (using the LSTM model) into that child pattern. Let’sassume the parent pattern ‘aaaaaa’ appears 80 times in history, and it belongs to the weekdayparent repository. In the child repository corresponding to ‘aaaaaa,’ the correctly predicted patternappears 69 times, which means that 69 out of 80 times, the pattern ‘aaaaaa’ is correctly predicted.Thus, the accuracy of the LSTM model and the SAX model, in terms of each parent pattern,can be illustrated by all child repositories. This thesis focuses on anomaly detection with parentrepositories and the solid functionalities of child repositories will be explored in the future study.Motifs and discords are two key concepts to consider when applying anomaly detection tobuilding power demand. A motif is a typical pattern that occurs regularly within a data set [50]. Adiscord is an unusual pattern within a data set that can be identified as infrequent behavior [51]. Athreshold needs to be set in order to distinguish motifs and discords. Miller et al. in [33] defined adiscord as a day-pattern with a parent frequency of less than 2% of the total count of days available.A parent pattern is labeled as a motif if its parent frequency is greater than the threshold, or it islabeled as a discord if its parent frequency is less than the threshold. For example, as shown inFigure 3.13, all parent patterns are labeled as motifs or discords.3.3.3 Pattern Retrieval and PredictionFigure 3.14 illustrates the classification test designed to test the efficacy of the anomaly predictionmodule. Classification is a process of categorizing a given set of data into classes. Thus, there aretwo classes in the classification test: motif and discord. Historical power and temperature data areextracted from the database to form the test set to predict the patterns of 500 days. For each dayin the test set, a predicted profile is estimated. For both historical and predicted profiles, a SAXtransformation is performed, considering the appropriate SAX parameters (a and w) for a desiredgranularity.As mentioned in Section 3.3.2, motif and discord labels are assigned to patterns in each parent30Figure 3.14: Design of the anomaly classification testrepository. A SAX pattern can be classified as a motif or a discord when retrieved from the la-beled parent repositories. Therefore, the actual class (Y ) for the classification test can be obtainedby retrieving historical patterns in the test set from the labeled repositories (e.g. Figure 3.13). Inparallel, the predicted class (Yˆ ) of patterns in the test set can be obtained by retrieving predictedpatterns from the labeled repositories. In this paper, the actual class (labels associated with histor-ical patterns) is considered the ground truth.The summary of the prediction results on a classification problem is recorded in a confusionmatrix, as shown in Table 3.3. The number of correct and incorrect predictions are summarized bythe count values and broken down by class. The confusion matrix gives an insight not only intothe classification errors but also into the types of errors.Explanations of terms shown in Table 3.3 are as follows. Positive (P) means that the predictedpattern is a discord. Negative (N) means that the predicted pattern is a motif. A true positive31Table 3.3: Confusion matrixPredicted classDiscord MotifActual classDiscord TP FNMotif FP TN(TP) means that the true pattern is a discord, and it has been predicted as a discord. A falsenegative (FN) means that the true pattern is a discord, but it has been predicted as a motif. Atrue negative (TN) means that the true pattern is a motif, and it has been predicted as a motif.A false positive (FP) means that the true pattern is a motif, but it has been predicted as a discord.Accuracy, Precision, Recall and F1 Score are used to evaluate the performance of motif and discorddetection: Accuracy = TP+TNTP+FN+FP+TN , F1score =2×Recall×PrecisionRecall+Precision , where Precision =TPTP+FP ,Recall = TPTP+FN . Accuracy is the ratio of correctly predicted observations to the total number ofobservations. Precision is the ratio of correctly predicted positive observations to the total numberof predicted positive observations. Recall is the ratio of correctly predicted positive observationsto all observations with actual positive labels. F1 Score is the weighted average of Precision andRecall. Thus, it takes both FP and FN into account to strike a balance between precision andRecall [52].32Chapter 4: Experimental ResultsTwo sets of experiments are designed to implement and test the modules of power demand forecast-ing and anomaly prediction. Section 4.1 shows the information of seven buildings and all datasetsinvolved in the experiments. The results of the two experiments are presented in Section 4.2 andSection 4.3, respectively.4.1 Data Collection from BuildingsSeven buildings on the UBC campus are involved in the experiments. Table 4.1 shows the fullnames, acronyms, mean, standard deviation (STDs) and areas of seven buildings. Power data ofyear 2015 to 2019 are utilized to calculate the means and standard deviations of each building.The models are built using the total electrical power consumption data measured by the mainelectric meter in each building. The power demand data (in the unit of kilowatt) are the summationof HVAC systems, plug loads (computers, kettles, microwaves, etc.), lighting, etc. The temperaturedata (in the unit of Celsius) are generated from the Rooftop Weather Station at UBC. Power andtemperature data are collected from a SkySpark platform [53]. SkySpark is a platform utilized byWater and Energy Services at UBC to expose meter, BACNet signals, and weather data to promoteresearch on building performance, all as part of the Campus as a Living Lab Initiative.Datasets used in the experiments are introduced in this paragraph. For the experiments ofTable 4.1: Information of buildingsBuilding Acronym Area (m2) Mean (kW) STDUniversity Services Building USB 11598 138.52 59.28Aquatic Ecosystems Research Laboratory AERL 5368 54.15 14.54C. K. Choi Building CKC 2912 12.97 4.92Earth Sciences Building ESB 17755 526.57 95.14Food, Nutrition and Health Building FNH 5962 152.92 37.25Forest Sciences Center FSC 22459 549.91 111.96Pharmaceutical Sciences Building PSB 36138 1387.53 159.3733power demand forecasting, the dataset of the university service building is different from the onesused for the other six buildings. The time span of power data (in kW) for the university servicebuilding ranges from 12 am, October 11, 2014, to 11 pm, September 1, 2019. The raw datasetincludes 42888 samples (1787 days) at a sampling time of one hour. The time span of power data(kW) for the other six buildings ranges from 12 am, January 1, 2015, to 11 pm, December 31,2019. Thus, 43824 samples (1826 days) are collected in the raw dataset for these six building andthe sampling time of the data is one hour. All datasets for power demand forecasting are split into80% for training, and 20% for testing. In terms of anomaly prediction module, the power dataranging from 12 am, January 1, 2015, to 11 pm, December 31, 2019 are used to create patternrepositories for seven buildings. Thus, a total of 1826 days (87 holidays, 502 weekends, and1237 weekdays) are taken into account to create the three parent repositories. The dataset usedfor motif and discord classification test is different from the one for power demand forecastingtest. This is because all day-types and enough number of anomalous patterns need to cover inthe classification test. However, patterns in the power demand forecasting test set do not provideenough true anomalous patterns. That is why a dataset for predicting the patterns of 500 days isselected as the classification test set (as described in Figure 3.14).4.2 Experiments on Power Demand ForecastingIn order to select the optimal LSTM model for power demand forecasting in the application of PP-DAM, 34 LSTM models with various combinations of inputs and architectures were built based onthe power data from the university service building. The deep learning library used are introducedin Section 4.2.1. The performance of these models is evaluated by using the MSE, MAE, andaverage SAX distance. The analysis of evaluation results and the optimal combination of inputsand model architecture are presented in Section 4.2.2.344.2.1 Implementation of LSTM modelsThe LSTM models are implemented in Python, using the deep learning library, Keras. Kerasis a high-level neural networks API, written in Python and capable of running as a frontend toTensorFlow, CNTK, or Theano [48]. The backend for the modeling is Tensorflow. One epoch isone cycle through which an entire dataset is passed once forward and backward through the neuralnetwork [54]. The weights are updated in the neural network a number of times proportional to thenumber of epochs, and through this process the model transforms from underfitting, to optimal,to overfitting. To ensure the model is optimal, Callback, ModelCheckpoint and EarlyStopping inKeras are configured to save the model with a minimum test loss in the training process, no matterhow many epochs are set to train the model. Therefore, the 34 models analyzed in this thesisare neither underfitting nor overfitting. A detailed description of the implementation in Keras isbeyond the scope of this thesis.4.2.2 Results of Power Demand ForecastingTable 4.2 shows MSE, MAE and SAX distance, resulting from the test of 34 LSTM configu-rations. In Table 4.2, there are 12 models using the standard architecture, 12 models using thesingle-encoder decoder architecture, and 10 models using the multi-encoder decoder architecture.Figure 4.1 plots bar charts of MSE, MAE and SAX distance, which clearly shows the trends ofthree metrics.The input index represents the input configuration introduced in Section 3.2.2. The value ofn refers to the last n-hour data samples. The SAX parameters a and w have been explained inSection 3.3.1. The value of a depends on how many value-categories one prefers to divide thepower demand range into. The value of w depends on how many time windows within a day onewants to monitor. To meet the demands, a and w are assumed to be 4 and 6, respectively.From Table 4.2, it is possible to conclude that the SAX distance follows a trend similar to theMSE and MAE. One can also conclude that the configurations of inputs and architecture that bestminimize the losses and reduces the SAX distance are Configs 23 and 24. Config 23 is selected35Table 4.2: Configurations and prediction performance of LSTM models implemented on thedataset of the university service buildingConfigurationindexLSTMArchitectureInputIndex n MSE MAEDistancea= 4w= 61Standard124 0.4613 0.4969 0.72052 48 0.4394 0.4878 0.45693 72 0.4075 0.4564 0.41634224 0.4457 0.4877 0.67875 48 0.4007 0.4548 0.37446 72 0.3936 0.4544 0.33687324 0.3221 0.4144 0.23248 48 0.3453 0.4206 0.28539 72 0.3490 0.4296 0.283110424 0.3139 0.4157 0.235511 48 0.3064 0.4051 0.197012 72 0.3205 0.4170 0.250513Single-encoderdecoder124 0.4406 0.4790 0.768114 48 0.3870 0.4444 0.318515 72 0.3888 0.4435 0.411816224 0.4262 0.4608 0.607417 48 0.3839 0.4539 0.364818 72 0.3793 0.4514 0.333119324 0.3221 0.4144 0.285920 48 0.3242 0.3914 0.271821 72 0.3301 0.4078 0.288422424 0.3006 0.3940 0.274223 48 0.2762 0.3692 0.166324 72 0.2813 0.3828 0.158825Multi-encoderdecoder148 0.4295 0.4737 0.406826 72 0.4102 0.4476 0.498827248 0.3996 0.4590 0.393128 72 0.3761 0.4377 0.417129324 0.3233 0.3996 0.301330 48 0.3479 0.4171 0.264331 72 0.3278 0.4010 0.290032424 0.3018 0.3936 0.308233 48 0.2851 0.3835 0.279834 72 0.2822 0.3950 0.184036                                 06(                                 0$(                                 0RGHOV6$;GLVWDQFHFigure 4.1: Bar plots of models’ MSE, MAE and SAX distancebecause it shows the lowest MSE and MAE, and the second-lowest SAX distance, behind Config24. Additionally, compared to Config 24, Config 23 is selected because it has a lower complexity,given that it requires the data from the 48 hours before the predicting time, compared to 72 hoursfor Config 24, and the training time of Config 23 is 21.25% faster than Config 24.By analyzing the results in Table 4.2, it is possible to understand how the performance ofpower demand forecasting is influenced by input variables and model architectures. Comparing allthree LSTM architectures, one can conclude that single-encoder decoder models always producebetter results (lowest MSE, MAE, distance) under the same set of inputs and value n. Comparingthe standard and multi-encoder decoder architectures, the multi-encoder decoder models obtainsmaller MSE and MAE, while the standard architecture performs better at minimizing the patterndistance.Considering the value of n (comparing models with the same LSTM architecture), as the lengthof the last n-hour data increases (Models 1 to 6, 13 to 18, and 25 to 28), the loss (MSE) graduallydecreases for models with Inputs 1 and 2 but not for Inputs 3 and 4. Therefore, it is possible toconclude that increasing the length of the historical data can improve the accuracy of the modelswhen the previous week data is not included. For models with the same LSTM architecture andthe same value of n, comparing Input 1 and Input 2, and comparing Input 3 and Input 4, onecan conclude that adding temperature data improves the predicting performance. Additionally,comparing Input 1 and Input 3, and comparing Input 2 and Input 4, it can be determined how the37last week’s realization improves predictability.       7LPH KRXU 3RZHU N: $FWXDOYDOXHVKSUHGLFWLRQVFigure 4.2: Predictions for first 336 hours in the test set of Config 17       7LPH KRXU 3RZHU N: $FWXDOYDOXHVKSUHGLFWLRQVFigure 4.3: Predictions for first 336 hours in the test set of Config 23The power demand predictions from Config 17 and Config 23, for the first 336 hours in thetest set, are plotted in Figure 4.2 and Figure 4.3, respectively. Blue lines represent true power data,and orange lines indicate predicted power data. Comparing Figure 4.2 and Figure 4.3, one canconclude that Config 17 cannot predict the weekends’ power demand, especially power demandon Saturday, as accurately as Config 23. This is because Config 23 uses the Input 3, which includes38Table 4.3: Prediction performance of the best models implemented on seven buildingsConfigurationIndexModelArchitecture Building MSE MAEDistancea = 4w = 623Single-encoderdecoderUSB 0.2762 0.3692 0.1663AERL 0.1126 0.2345 0.0220CKC 0.1282 0.2446 0.0059ESB 0.1576 0.2972 0.0251FNH 0.0934 0.2145 0.0127FSC 0.1634 0.2645 0.0199PSB 0.1962 0.3288 0.0011the last week’s 24h realization. With this information, Config 23 is able to infer if the next day is aweekday or a weekend. Since the loss of models with Inputs 3 and 4 is always lower than 0.35, itcan be concluded that these models perform better than models with Inputs 1 and 2 because of thelast week’s 24h realization data.After select the optimal configuration of the LSTM models, i.e. Config 23, models in theoptimal configuration were built for the other six building on UBC campus. The dataset for eachbuilding is split into 80% for training, and 20% for testing. As recommended by Water and EnergyServices department at UBC, it might not be able to identify the changes too well on the universityservice building. Buildings which might work particularly well and have decent changes to pointat could include PSB, FSC, and ESB. Buildings that have been pretty steady are AERL, CKC andFNH. The results (MSE, MAE, and SAX distance) of the seven building are shown in Table 4.3.The results shows that evaluation errors of the university service building is the highest.4.3 Experiments on Anomaly PredictionTo implement the test for pattern retrieval and prediction (described in Section 3.3.3), the SAXrepresentations of all the parent (historical) patterns corresponding to the data from seven buildingswere estimated. Moreover, the SAX representations were classified and labeled as “motifs” and“discords.” The creation and labeling of parent repositories is described in Section 4.3.1. Theperformance of pattern retrieval and prediction is evaluated in Section 4.3.2.394.3.1 Labeled Pattern RepositoriesAs mentioned in Section 3.3.2, two levels of repositories are created: three parent pattern reposi-tories (weekday, weekend, holiday), and the child repository for each parent pattern (all possiblepredicted patterns, for each parent pattern in each parent repository). The dataset ranging from12 am, January 1, 2015, to 11 pm, December 31, 2019 was used to create pattern repositories forseven buildings. Thus, a total of 1826 days (87 holidays, 502 weekends, and 1237 weekdays) aretaken into account to create the three parent repositories.Table 4.4: The number of patterns in each parent repositoryBuilding Weekday Weekend HolidayUSB 114 92 46AERL 76 55 35CKC 72 59 34ESB 220 156 39FNH 90 80 35FSC 96 93 30PSB 113 90 42By converting historical power consumption to SAX patterns, one can get the number of pat-terns in each parent repositories created for seven buildings, which is shown in Table 4.4. Higherthe number of patterns is, more diverse the building behaviors are. For instance, Figure 4.4 showsthe frequency distribution for the holiday repository (Figure 4.4.a), the weekend repository (Fig-ure 4.4.b), and the weekday repository (Figure 4.4.c) of the university service building. 252 pat-terns were identified in total. The repositories contain 46, 92, and 114 patterns, respectively. Thefrequency distribution of a pattern differs among the three parent pattern repositories. It is impor-tant to observe that the frequency distribution of a pattern can be different among the three parentpatterns repositories. For example, for pattern ‘aaaaaa,’ the frequency is 14.94% (13 out of 87)in holidays; 11.75% (59 out of 502) in weekends; and 0.57% (7 out of 1237) in weekdays. Thisshows that the energy consumption of a building is different depending on the type of day.In terms of the university service building, the composition of the child repository of a pattern,e.g., ‘aaaaaa,’ is also different in each of the three parent repositories, as shown in Tables 4.5,40  D DEEEEEDDDDDDEEEEEEDFGGFEDEFFFEDDDDEDDEEDEEDEEDDEDFFFFFEFFFFFDEFFFFDEEEFFDDDDDEDDEDDDDDFEDEFFFFFEDEEDDDDEGGFEDEEEFEDEFFEFDEFDDFDEEDDFDEFDDDDDEEEEDFGEFEDFGGFFDEFEFFDEGFEEDDEDEEDFFFFEDFFFEFDEFDEFEEFFFGEEFEEFDEEEEFDDEDEDDEFEFEDFGFFFDFGFFEDEGGFGDDDEEEDDEDFFDEGFFFFFFFFFDEFEEF    E DDDDDDDEEEEEDDDDDEDDEEEEDEEDEEDEFFFFDDEDEFEEFFFFDDEDEEDDEDDEDEEEEFDEEDEFDDDDDFDEEEFEGGGGGGDDDDEEDDDDEDDEFEFFEEFEFFDEFFFEEFFFFFDEFEFEEEEEEEDDEEEFDEFDEFDEFDFFEEFDEFDDEDEDDDEDDDDEFEEFEEEEFFDEDDEEDDEDDFDEEDDFDDEEEDDEEDDEEEEDEFDDDDEFDDFFFFEEEEEFDEEDEDEEFFFEEEEEFEEEEDEEDDFDEFDEFEEEEEFEFEFFFEEEEEFFEFDDFEEFEEFFFGDDFEFGDEEDFFDEEDDDDEEEFFDFFFFEDEDEEEEFFFGFFEEEEEDDDEFFDFFFGFDEGGGGDDDEEFDEFDFEDDEDFFFFFFEFEFFEFFDDEEFFDDDEEDEEEDDDDEEEDEDDFDDFDDFEEEDDFEFFEEFDFFDEFDFGEFGEEFDDEDFGDEFEDEEEEDDEDEFDEEDDFFFGDFGGGFFFFFFFEEFEEFDEDDEDFFFEFFDEEFFFDDFFEFDDFDEG         F DFGGFFDFGGFEDFGGEEEFGGFFDFGGGFDFGFFFDFGFEFDEGGEEDFGFEEDEGGFEDEFEDEDEGFEFDEGFEEGGGGGGDFGGGGDGGGGFDEGEEFEFGGGFDEGGFFEGGGGFEGGGFFDFGGEFDFGEEFDEFEDDDEGFDDDEGFFFEFGGGGDFGFFEDFGGFGDEGEDEEFGFEFDFGEFFDDDDDDDEGGEFEFGGFGDEFEEEDDFFDDDEGEEEDEGEDFDEGGEDDFGEDEDEFFDDDEFFEEDDFEDDDFGEEEDGGGFFDEGEFFEFGFFFDFGFFGDFGFEDEFGGFEFFFFFFDEGFEDDEGEDDEGGGGGDEFEEFDGGGGGDFGEDFEFGFEEDEFEDFEFGGEEDEGFDEDGGGFEDEFFDFFFFFEEFFFFFEDEGGGFDFGGEDEFGGEFGGGGGFGGGGFFDDGFDDDGGGGEFGGGGGDFGEFGDEGFFEDEFFDEDEFFFFDDEEEFDDFFEDEFGFGGDFGFGGDEEEEEDFGGGEDEGGDFDEGFFGDFGEDDDFGFDDDDDFEEEEEEEFEGGGFGDEGDDEDEGEGFDDGFEDDDDDEFDFGDDFDDGGFEEEEEEEDFFFEFDEGGFGDDFEDEEGGFGFDEFDDEDDDDDEDEEDEEDFGEFEEFGEEFFGGGGFDEGGDEEEDDDDDFGEGGDEGFEGEFFFFGDFFFEEFEEEEFEGGGFEDEGFDFDDFEDFFFFGFEDGGFFFGGGGFEDEGGFDGGGGFGEEGGFEDGGFFEEFGFGFFFFFFGDFGGFDDFGFDEDEGGGGEFGFEDDFGFEGDEGEEDDEEDDFDEFFEDDDDGGGFigure 4.4: Frequency distribution of (a) holiday parent repository, (b) weekend parent repos-itory, (c) weekday parent repository of the university service building414.7, and 4.6. Child repositories reflect the forecast accuracy of selected Config 23 regarding eachcorresponding parent pattern. The forecast accuracy is 76.9% for holidays; 75% for weekdays; and91.5% for weekends, regarding the parent pattern “aaaaaa” of the university service building.Table 4.5: Child repository of ‘aaaaaa’ in holiday parent repositoryPredicted pattern Child frequencyaaaaaa 10abcbba 1aacbaa 1aababa 1Table 4.6: Child repository of ‘aaaaaa’ in weekend parent repositoryPredicted pattern Child frequencyaaaaaa 54aaaaba 3aababa 2Table 4.7: Child repository of ‘aaaaaa’ in weekday parent repositoryPredicted pattern Child frequencyaaaaaa 6aabbaa 1bbaaaa 1As mentioned in Section 3.3.3, Miller et al. in [33] suggest that a day-pattern with a frequencyof less than 2% of the total count of days available can be considered as a discord. Table 4.8 showsthe number of daily profiles in each parent repository and the threshold determined for each ofthe parent repositories. For instance, a SAX pattern of the university service building appeared 15times on weekdays is labeled as discord, because its frequency, 15, is less than weekdays threshold,25. This distinction results in discord tags for 31 days in holiday repository, 125 days in weekendrepository, 304 days in weekday repository, which is 31.6%, 28.5% and 26.6% of the total countof days in the three repositories of the university service building, respectively. The number andpercentage of anomalous days of all seven buildings are shown in Table 4.9. The percentages ofanomalous weekdays and weekends in ESB are more than a half ( 55.35% and 53.98%), which arethe highest among the seven buildings. It implies the highest diversity of building behaviors.42Table 4.8: Thresholds of three parent repositoriesRepository Total days ThresholdHolidays 87 2Weekends 502 10Weekdays 1237 25Table 4.9: Number and percentage of anomalous days for seven buildingsBuildingAnomalousweekdayAnomalousweekendAnomalousholiday#Days Percentage #Days Percentage #Days PercentageUSB 304 24.58% 125 24.90% 31 35.63%AERL 293 23.69% 99 19.72% 30 34.48%CKC 275 22.23% 128 25.50% 30 34.48%ESB 660 53.35% 271 53.98% 37 42.53%FNH 438 35.41% 137 27.29% 37 42.53%FSC 450 34.86% 175 36.38% 26 29.89%PSB 410 33.14% 179 35.65% 36 41.38%4.3.2 Results of Anomaly PredictionA motif and discord classification test is designed in order to validate the anomaly prediction per-formance of the selected model configuration (Config 23). The dataset used for motif and discordclassification test is different from the one for power demand forecasting. This is because all day-types and enough number of anomalous patterns need to cover in the classification test. However,patterns in the power demand forecasting test set do not provide enough true anomalous patterns.That is why a dataset for predicting the patterns of 500 days was selected as the classification testset (as described in Figure 3.14).Power demand data of these 500 days are extracted to generate true patterns that are taken asground-truth labels. In this test set, true patterns of half of these 500 days are motifs, and the otherhalf are discords. The model in Config 23 for each building generates the predicted pattern of eachtrue pattern, and these 500 predicted patterns are classified as motifs and discords.Results of the seven tests are summarized in Table 4.10. For instance, in terms of the universityservice building, there are 208 TP, 42 FN, 18 FP, and 232 TN in the results. As introduced inSection 3.3.3, accuracy, precision, recall and F1 score are used to evaluate the performance of43Table 4.10: Confusion matrix of seven buildingsPredicted classDiscord MotifActualclassUSBDiscord 208 42Motif 18 232AERLDiscord 223 27Motif 19 231CKCDiscord 229 21Motif 13 237ESBDiscord 215 35Motif 23 227FNHDiscord 222 28Motif 12 238FSCDiscord 234 26Motif 14 226PSBDiscord 237 23Motif 16 224Table 4.11: Motif and discord classification resultsBuilding Accuracy Precision Recall F1 scoreUSB 0.8800 0.9200 0.8320 0.8738AERL 0.9080 0.9215 0.8920 0.9065CKC 0.9320 0.9463 0.9160 0.9309ESB 0.8840 0.9034 0.8600 0.8812FNH 0.9200 0.9487 0.8880 0.9173FSC 0.9200 0.9435 0.9000 0.9212PSB 0.9160 0.9368 0.9115 0.9240motif and discord detection. Accuracy, Precision, Recall and F1 score of models implemented onseven buildings are shown in Table 4.11. The results show that the anomaly prediction moduleswork well on seven buildings, no matter pattern composition and diversity of building repositories.44Chapter 5: Conclusions5.1 Summary of ContributionsThe rapidly growing world energy use has already raised concerns over supply difficulties, exhaus-tion of energy resources and heavy environmental impacts (ozone layer depletion, global warming,climate change, etc.). Those serious issues stress the need for seeking effective energy-efficiencymethods. Improving energy efficiency in buildings is today a prime objective for energy policy atregional, national, and international levels, to reduce the amount of gas emission as well as fossilfuel consumption. Among various data-driven predictive analytics methods for improving buildingenergy efficiency, predicting and monitoring the power consumption with the aim of identifyingabnormal behaviors is promising and cost-effective. However, the information contained in timeseries predictions usually needs to be interpreted by a human with domain expertise. For instance,meaningful statistics, such as near-base load, near-peak load, high-load duration, rise time and falltime, could be defined to describe the load profiles. These statistics are useful for building energymanagement but need to be further processed and interpreted by expertise to apply. Moreover,an algorithmic way of labeling anomalies needs to be explored because for practical applications,anomaly detection without anomaly labels is closer to the actual requirements of building operationmanagers since it is expensive and time-consuming to generate labeled data for abnormal powerconsumption in buildings.Therefore, this research intends to fill up the gap by proposing a novel predictive power demandanalytic methodology that is capable to identify upcoming normal and anomalous demand patterns,through mining historical power demand and temperature data, and day-ahead power demand fore-cast. The power demand data explored in the study are the total electrical power consumption inthe building. That is the summation of heating, ventilating and air-conditioning system load, plugload, lighting, etc. It is measured by the main electric meter installed on the main electrical feeder45into the building on the campus of the University of British Columbia. The temperature data aregenerated by the Earth and Ocean Science Rooftop Weather Station at the University of BritishColumbia.This data-driven methodology comprises two modules, i.e., the power demand forecastingmodule and the anomaly prediction module. The integration of two modules can derive latentinformation from historical and predicted power data, and provide an intuitive and effective wayto identify typical (motif) and atypical (discord) behaviors by using Long Short-Term Memoryneural networks and Symbolic Aggregate Approximation. This is the first time that LSTM neuralnetworks and SAX are integrated for accurate insights regarding the power needs of the building,intending to support more efficient energy management.The power demand forecasting module can predict time-series power demand for the next24 hours, which is a baseline for pattern generation and anomaly prediction. In order to figure outhow the performance of models is influenced by input variables and model architectures, this studyexplores how the forecasting performance is influenced by power and temperature inputs, and threeLSTM model architectures. Two of the architectures (the standard and the single-encoder decoderarchitectures) have been utilized in the literature, while the multi-encoder decoder architectureis suggested for the first time. Based on the experimental results presented in the thesis, it canbe concluded that single-encoder decoder models present a better performance than standard andmulti-encoder decoder architectures. The optimal forecasting module is characterized by powerand temperature inputs, including the last week’s 24h realization and last 48h data.In the module of anomaly prediction, the historical and predicted time-series profiles are firsttransformed into patterns and later are retrieved from a system of labeled repositories. The patternsare classified as normal or anomalous based on their frequency of appearance in the pattern repos-itories. The limitation that the information contained in time series predictions usually needs to beinterpreted by a human with domain expertise is addressed since the anomaly prediction modulecan automatically identify the pattern from the time-series forecasts. Moreover, automated inter-pretation of upcoming abnormal behaviors in the anomaly prediction module avoids ground-truth46labeling, which provides an unsupervised method when labels are not available from power meterdata. The performance of the anomaly prediction module is evaluated by classification tests im-plemented on seven buildings on the campus of the University of British Columbia. The methodobtains a minimum accuracy of 88%, a maximum accuracy of 93.20%, a minimum F1 score of87.38%, and a maximum F1 score of 93.09%.5.2 Limitations and Future ResearchThis thesis shows that data-driven predictive approaches provide a promising way for power de-mand monitoring, which is cost-effective, accurate, robust, and scalable. However, there are alsosome limitations to the research. The challenges and the potential future studies for the research inthis thesis are discussed as follows.Since the approaches used in this study highly rely on the data, high-quality data are requiredto well implement these methods. Hence, future studies could focus on the design of more efficientand economic data collection strategies. Besides, the data used in the modeling was collected fromthe University of British Columbia, which may not be available in some situations and applications.Transfer learning may thus need to be further researched so that the models developed for buildingson the UBC campus could be reused as the starting point for a model on other tasks. Moreover,the condition of the building may also change due to renovations and the data collected from thebuilding can get affected. Therefore, the sensitivity of the prediction models needs to be exploredwith transfer learning when the regular patterns of source data change.The concept of child pattern repositories is introduced in the thesis, but the concrete function-alities of it are not included. The pattern distribution in the child pattern repositories indicatesthe historical forecast performance of the LSTM models upon each corresponding parent pattern.Thus, In building research, further work could also include monitoring strategies for building op-erators to obtain insights on potential faults, by analyzing the pattern distribution in child patternrepositories. Labeling SAX patterns as normal or anomalous behaviors by comparing pattern fre-quency with a threshold may limit the classification accuracy. In order to improve the accuracy of47anomaly classification, more classifying algorithms applied upon patterns need to explore. Giventhat SAX words are associated with predicted patterns, the anomaly detection strategy could beaugmented by utilizing methods related to natural language processing. In order to involve theforecast results in a real-world control system, another topic to explore could be how a predictedpower demand pattern could be used as a set-point to control a building management system.To conclude, this research provides accurate insights regarding the power needs of the building,intending to support more efficient energy management. Building operators could take actions oncompleting building maintenance tasks according to the insights obtained. In order to improve theaccuracy and feasibility of the approach, future studies could focus on the design of more efficientand economic data collection strategies, transfer learning of trained models, analyzing the patterndistribution in child pattern repositories and more efficient classifying algorithms.48Bibliography[1] International Energy Agency, “Electricity.”https://www.iea.org/fuels-and-technologies/electricity, 2020. accessed January, 2020. →page 1[2] L. Pe´rez-Lombard, J. Ortiz, and C. Pout, “A review on buildings energy consumptioninformation,” Energy and Buildings, vol. 40, no. 3, pp. 394–398, 2008. → page 1[3] S. Seyedzadeh, F. P. Rahimian, I. Glesk, and M. Roper, “Machine learning for estimation ofbuilding energy consumption and performance: a review,” Visualization in Engineering,vol. 6, no. 1, p. 1, 2018. → page 1[4] The Government of British Columbia, “Energy efficiency.” https://www2.gov.bc.ca/gov/content/industry/electricity-alternative-energy/energy-efficiency-conservation, 2020.accessed January, 2020. → page 1[5] S. Finlay, Predictive Analytics, Data Mining and Big Data: Myths, Misconceptions andMethods. Business in the Digital Economy, Basingstoke: Palgrave Macmillan, 1st ed., 2014.→ page 2[6] A. Crespo Ma´rquez, A. Crespo Del Castillo, and J. F. Go´mez Ferna´ndez, “Integratingartificial intelligent techniques and continuous time simulation modelling. Practicalpredictive analytics for energy efficiency and failure detection,” Computers in Industry,vol. 115, p. 103164, 2020. → page 2[7] J. Zhu, Y. Shen, Z. Song, D. Zhou, Z. Zhang, and A. Kusiak, “Data-driven building loadprofiling and energy management,” Sustainable Cities and Society, vol. 49, p. 101587, 2019.→ pages 2, 23[8] H. Zhao and F. Magoule`s, “A review on the prediction of building energy consumption,”Renewable and Sustainable Energy Reviews, vol. 16, no. 6, pp. 3586–3592, 2012. → pages2, 7[9] J. L. Mathieu, P. N. Price, S. Kiliccote, and M. A. Piette, “Quantifying changes in buildingelectricity use, with application to demand response,” IEEE Transactions on Smart Grid,vol. 2, no. 3, pp. 507–518, 2011. → page 3[10] C. Xu and H. Chen, “A hybrid data mining approach for anomaly detection and evaluationin residential buildings energy data,” Energy and Buildings, vol. 215, p. 109864, 2020. →pages 3, 11[11] M. Kim, W. Choi, Y. Jeon, and L. Liu, “A hybrid neural network model for power demandforecasting,” Energies, vol. 12, no. 5, p. 931, 2019. → page 449[12] E. Sala-Cardoso, M. Delgado-Prieto, K. Kampouropoulos, and L. Romeral, “Activity-awareHVAC power demand forecasting,” Energy and Buildings, vol. 170, pp. 15–24, 2018. →page 4[13] L. Hernandez, C. Baladron, J. M. Aguiar, B. Carro, A. J. Sanchez-Esguevillas, J. Lloret, andJ. Massana, “A survey on electric power demand forecasting: Future trends in smart grids,microgrids and smart buildings,” IEEE Communications Surveys and Tutorials, vol. 16,no. 3, pp. 1460–1495, 2014. → page 7[14] C. R. Touretzky and R. Patil, “Building-level power demand forecasting framework usingbuilding specific inputs: Development and applications,” Applied Energy, vol. 147,pp. 466–477, 2015. → page 7[15] M. S. Al-Homoud, “Computer-aided building energy analysis techniques,” Building andEnvironment, vol. 36, no. 4, pp. 421–433, 2001. → page 8[16] R. Yao and K. Steemers, “A method of formulating energy load profile for domesticbuildings in the UK,” Energy and Buildings, vol. 37, no. 6, pp. 663–671, 2005. → page 8[17] F. Ansari, A. Mokhtar, K. Abbas, and N. Adam, “A Simple Approach for Building CoolingLoad Estimation,” American Journal of Environmental Sciences, vol. 1, no. 3, pp. 209–212,2005. → page 8[18] A. Dhar, T. A. Reddy, and D. E. Claridge, “Modeling hourly energy use in commercialbuildings with fourier series functional forms,” Journal of Solar Energy Engineering,Transactions of the ASME, vol. 120, no. 3, pp. 217–223, 1998. → page 8[19] M. J. Jime´nez and M. R. Heras, “Application of multi-output ARX models for estimation ofthe U and g values of building components in outdoor testing,” Solar Energy, vol. 79, no. 3,pp. 302–310, 2005. → page 9[20] A. J. Hoffman, “Peak demand control in commercial buildings with target peak adjustmentbased on load forecasting,” in Proceedings of the 1998 IEEE International Conference onControl Applications, vol. 2, (Trieste, Italy), pp. 1292–1296, 1998. → page 9[21] S. Makridakis, E. Spiliotis, and V. Assimakopoulos, “Statistical and Machine Learningforecasting methods: Concerns and ways forward,” PLoS ONE, vol. 13, no. 3, pp. 1–26,2018. → pages 9, 14[22] X. Zhou, Z. Fan, L. Liang, J. Yan, and D. Pan, “Comparison of four algorithms based onmachine learning for cooling load forecasting of large-scale shopping mall,” EnergyProcedia, vol. 142, pp. 1799–1804, 2017. → page 9[23] M. Cai, M. Pipattanasomporn, and S. Rahman, “Day-ahead building-level load forecastsusing deep learning vs. traditional time-series techniques,” Applied Energy, vol. 236,pp. 1078–1088, 2019. → page 10[24] Y. Lecun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, vol. 521, pp. 436–444, 2015.→ page 1050[25] A. Graves, A. R. Mohamed, and G. Hinton, “Speech recognition with deep recurrent neuralnetworks,” in Proceedings of 2013 IEEE International Conference on Acoustics, Speech andSignal Processing, (Vancouver, BC, Canada), pp. 6645–6649, 2013. → page 10[26] J. Zheng, C. Xu, Z. Zhang, and X. Li, “Electric load forecasting in smart grids usingLong-Short-Term-Memory based Recurrent Neural Network,” in Proceedings of 2017 51stAnnual Conference on Information Sciences and Systems (CISS), (Baltimore, MD, USA),pp. 1–6, IEEE, 2017. → page 10[27] W. Kong, Z. Y. Dong, Y. Jia, D. J. Hill, Y. Xu, and Y. Zhang, “Short-Term Residential LoadForecasting Based on LSTM Recurrent Neural Network,” IEEE Transactions on SmartGrid, vol. 10, no. 1, pp. 841–851, 2019. → page 10[28] H. Wang, P. Xu, X. Lu, and D. Yuan, “Methodology of comprehensive building energyperformance diagnosis for large commercial buildings at multiple levels,” Applied Energy,vol. 169, pp. 14–27, 2016. → page 10[29] Q. Zhang, S. Wan, B. Wang, D. W. Gao, and H. Ma, “Anomaly detection based on randommatrix theory for industrial power systems,” Journal of Systems Architecture, vol. 95,pp. 67–74, 2019. → page 11[30] J. S. Chou and A. S. Telaga, “Real-time detection of anomalous power consumption,”Renewable and Sustainable Energy Reviews, vol. 33, pp. 400–411, 2014. → page 11[31] J. E. Seem, “Using intelligent data analysis to detect abnormal energy consumption inbuildings,” Energy and Buildings, vol. 39, no. 1, pp. 52–58, 2007. → page 12[32] J. A. Fonseca, C. Miller, and A. Schlueter, “Unsupervised load shape clustering for urbanbuilding performance assessment,” Energy Procedia, vol. 122, pp. 229–234, 2017. → page12[33] C. Miller, Z. Nagy, and A. Schlueter, “Automated daily pattern filtering of measuredbuilding performance data,” Automation in Construction, vol. 49, pp. 1–17, 2015. → pages12, 25, 30, 42[34] Y. Zhao, T. Li, X. Zhang, and C. Zhang, “Artificial intelligence-based fault detection anddiagnosis methods for building energy systems: Advantages, challenges and the future,”Renewable and Sustainable Energy Reviews, vol. 109, pp. 85–101, 2019. → page 13[35] Z. Yu, F. Haghighat, B. C. Fung, and L. Zhou, “A novel methodology for knowledgediscovery through mining associations between building operational data,” Energy andBuildings, vol. 47, pp. 430–440, 2012. → page 13[36] C. Miller, Z. Nagy, and A. Schlueter, “A review of unsupervised statistical learning andvisual analytics techniques applied to performance analysis of non-residential buildings,”Renewable and Sustainable Energy Reviews, vol. 81, pp. 1365–1377, 2018. → page 13[37] M. Goldstein and S. Uchida, “A comparative evaluation of unsupervised anomaly detectionalgorithms for multivariate data,” PLoS ONE, vol. 11, no. 4, pp. 1–31, 2016. → page 1351[38] M. Goldstein, S. Asanger, M. Reif, and A. Hutchison, “Enhancing security eventmanagement systems with unsupervised anomaly detection,” in Proceedings of the 2ndInternational Conference on Pattern Recognition Applications and Methods, (Barcelona,Spain), pp. 530–538, 2013. → page 13[39] A. Capozzoli, F. Lauro, and I. Khan, “Fault detection analysis using data mining techniquesfor a cluster of smart office buildings,” Expert Systems with Applications, vol. 42, no. 9,pp. 4324–4338, 2015. → page 13[40] N. Cotrufo and R. Zmeureanu, “PCA-based method of soft fault detection and identificationfor the ongoing commissioning of chillers,” Energy and Buildings, vol. 130, pp. 443–452,2016. → page 13[41] Y. Zhao, S. Wang, and F. Xiao, “A system-level incipient fault-detection method for HVACsystems,” HVAC and R Research, vol. 19, no. 5, pp. 593–601, 2013. → page 14[42] J. A. Diaz-Acevedo, L. F. Grisales-Noren˜a, and A. Escobar, “A method for estimatingelectricity consumption patterns of buildings to implement energy management systems,”Journal of Building Engineering, vol. 25, p. 100774, 2019. → page 14[43] D. L. Marino, K. Amarasinghe, and M. Manic, “Building Energy Load Forecasting usingDeep Neural Networks,” in Proceedings of 42nd Annual Conference of the IEEE IndustrialElectronics Society, (Florence, Italy), pp. 7046–7051, 2016. → page 21[44] UCI Machine Learning Repository, “Individual household electric power consumption.”http://archive.ics.uci.edu/ml/index.php, 2020. accessed January, 2020. → page 21[45] E. Mocanu, P. H. Nguyen, M. Gibescu, and W. L. Kling, “Deep learning for estimatingbuilding energy consumption,” Sustainable Energy, Grids and Networks, vol. 6, pp. 91–99,June 2016. → page 21[46] M. Q. Raza and A. Khosravi, “A review on artificial intelligence based load demandforecasting techniques for smart grid and buildings,” Renewable and Sustainable EnergyReviews, vol. 50, pp. 1352–1372, 2015. → page 23[47] K. Wang, X. Qi, and H. Liu, “A comparison of day-ahead photovoltaic power forecastingmodels based on deep learning neural network,” Applied Energy, vol. 251, no. 1, p. 113315,2019. → page 23[48] Keras, “Keras: The python deep learning library.” https://keras.io/, 2020. accessed January,2020. → pages 24, 35[49] J. Lin, E. Keogh, L. Wei, and S. Lonardi, “Experiencing SAX: a novel symbolicrepresentation of time series,” Data Mining and Knowledge Discovery, vol. 15, no. 2,pp. 107–144, 2007. → pages 24, 26[50] P. Patel, E. Keogh, J. Lin, and S. Lonardi, “Mining motifs in massive time series databases,”in Proceedings of 2002 IEEE International Conference on Data Mining, (Maebashi City,Japan), pp. 370–377, 2002. → page 3052[51] E. Keogh, J. Lin, and A. Fu, “HOT SAX: Efficiently finding the most unusual time seriessubsequence,” in Proceedings of the Fifth IEEE International Conference on Data Mining,(Houston, TX, USA), pp. 226–233, 2005. → page 30[52] R. Joshi, “Accuracy, precision, recall f1 score: Interpretation of performance measures.”https://blog.exsilio.com/all/accuracy-precision-recall-f1-score-interpretation-of-performance-measures/, 2016.accessed January, 2020. → page 32[53] Energy and Water Services UBC, “Building energy and water data.”https://energy.ubc.ca/energy-and-water-data/skyspark/, 2020. accessed January, 2020. →page 33[54] B. Hitaj, G. Ateniese, and F. Perez-Cruz, “Deep Models under the GAN: Informationleakage from collaborative deep learning,” in Proceedings of the 2017 ACM SIGSACConference on Computer and Communications Security, CCS ’17, (New York, NY, USA),pp. 603–618, Association for Computing Machinery, 2017. → page 3553
Thesis/Dissertation
eng
Electrical Engineering
Vancouver : University of British Columbia Library
Attribution-NonCommercial-NoDerivatives 4.0 International
Graduate
Predictive analytics for building power demand : day-ahead forecasting and anomaly prediction
Text