Energy Efficiency Solutions for Buildings : Automated Fault Diagnosis of Air Handling Units Using Generative Adversarial Networks

Automated fault diagnosis (AFD) for various energy consumption components is one of the main topics for energy efficiency solutions. However, the lack of faulty samples in the training process remains as a difficulty for data-driven AFD of heating, ventilation and air conditioning (HVAC) subsystems, such as air handling units (AHU). Existing works show that semi-supervised learning theories can effectively alleviate the issue by iteratively inserting newly tested faulty data samples into the training pool when the same fault happens again. However, a research gap exists between theoretical AFD algorithms and real-world applications. First, for real-world AFD applications, it is hard to predict the time when the same fault happens again. Second, the training set is required to be pre-defined and fixed before being packed into the building management system (BMS) for automatic HVAC fault diagnosis. The semi-supervised learning process of iteratively absorbing testing data into the training pool can be irrelevant for industrial usage of the AFD methods. Generative adversarial network (GAN) is well-known as an unsupervised learning technique to enrich the training pool with fake samples that are close to real faulty samples. In this study, a hybrid generative adversarial network (GAN) is proposed combining Wasserstein GAN with traditional classifiers to perform fault diagnosis mimicking the real-world scenarios with limited faulty training samples in the training process. Experimental results on real-world datasets demonstrate the effectiveness of the proposed approach for fault diagnosis problems of AHU subsystem.


Introduction
Large-scale heating, ventilation and air conditioning (HVAC) systems have complex structures and consume a large portion of energy over the world.Recent studies show that the energy consumption proportion occupied by HVAC systems is over 40% of the overall building energy consumption of the whole world each year and is increasing monotonically [1][2][3][4].Proper maintenance of HVAC systems saves up to 30% of the total energy consumption of buildings [5,6].Automated fault detection and diagnosis of HVAC systems is therefore always demanded to maintain the energy usage efficiency of buildings.
Air handling unit (AHU) is one of the most sophisticated components in the entire structure of HVAC system.AHU is responsible to absorb the fresh air from outdoor to indoor zone, dehumidify the indoor environment and condition the mixed air if necessary.It is the main functioning component of the entire HVAC system controlling the indoor temperature, as well as humidity, air pressure, flow rate, etc., and therefore also the first part to check when the HVAC system is not working properly.Fault detection and diagnosis (FDD) refers to an automatic maintenance system to keep the equipment in healthy condition in a long-term run without human interference, which is highly demanded for AHU systems.
Supervised machine learning techniques have demonstrated their effectiveness on addressing the FDD issue with sufficient number of normal/faulty data samples [7] In 2015, Mulumba et al. [8] compared most available data-driven methods in the literature and concluded that support vector machine (SVM) and random forest (RF) are the two most effective methods for diagnosing various AHU faults based on real-world data.Yan et al. [9] investigated decision tree based supervised learning approaches to diagnose AHU faults.Zhao et al. [10] utilized diagnostic Bayesian networks (DBNs) to diagnose various faults in AHUs.
The main shortcoming for supervised learning methods is that those methods only work with balanced numbers of normal/faulty data samples.However, in real-world FDD scenarios, faults are usually fixed immediately once they are detected or diagnosed.The available number of faulty training samples is always much smaller than the number of normal training samples and can be insufficient to support supervised learning FDD methods.In 2018, Yan et al. [11] proposed a semi-supervised FDD approach to diagnosis AHU faults with very few faulty data available.The semi-supervised FDD method inserts highly confident faulty testing samples into the training pool to enrich the faulty training sample set [12].The main limitation of Yan et al.'s work is that the classification accuracy for a certain type of fault is only improved when the fault occurs again.Moreover, the iterative process of absorbing testing data into the training pool can be irrelevant for real-world industrial FDD usage.
A recently proposed unsupervised learning technique, named generative adversarial network (GAN), provides another possible solution to the problem of imbalanced normal and faulty training data [13].With a few faulty training data samples available, GAN is capable of generating artificial faulty samples mimicking the real-world data.The similarity between the artificially generated data and the real data is judged by a discriminator.While the artificially generated faulty samples are considerably close to the real-world data, the supervised learning approach, such as the support vector machine (SVM) and extreme learning machine (ELM) [14], can be utilized with re-balanced datasets.Compared to the semi-supervised approaches, GAN provides a more direct solution to the data imbalanced problem.
In this study, we focus on fault diagnosis for various faults of AHUs with insufficient numbers of faulty training samples for supervised learning methods.The performances of the unsupervised learning technique GAN and its extension have been evaluated in AHU fault diagnosis combining with traditional machine learning techniques.The core idea of this work is to utilize Wasserstein GAN (WGAN) [15] to generate artificial faulty training samples to train the supervised learning models and perform supervised learning fault diagnosis for AHUs.Support vector machine (SVM) is a traditional machine learning technique that has been verified to be useful for fault diagnosis of various HVAC faults [8,16].Two quality control protocols are designed using SVM and an ensemble learning technique based on SVM to judge the generation quality and selectively insert newly generated faulty training data into the training pool.Experimental results show that the proposed hybrid GAN framework can effectively diagnose various faults of AHUs with only a few real-world training sample available.

Contributions
The proposed AHU fault diagnosis framework has the following contributions to the literature:

Materials and Methods
We propose an automated fault diagnosis method to classify various AHU faults with only a small number of fault training data samples available for each fault.The dataset used in this study is real world data that was collected by American Society of Heating, Refrigerating and Air-Conditioning Engineers (ASHRAE) project No. RP-1312, titled "Tools for Evaluating Fault Detection and Diagnostic Methods for Air-Handling Units", published in 2010 [17][18][19].A pre-processing phase was carried out before the training and testing phase.In the pre-processing phase, we select 11 of the most important features and six typical faults from the raw data and randomly select from 5 to 40 training samples for each fault type.A Wasserstein generative adversarial network is employed to generate 3000 high quality artificial faulty training samples for each fault type.The quality control protocol is implemented using SVM or an ensemble learning method that performs majority voting over classification results of DT, RF and SVM.The in total 6 × 3000 = 18, 000 artificially generated faulty samples are feed into different types of traditional classifiers to produce the classification accuracy using a 10-fold cross-validation.

Data Description
The real-world AHU faulty operational data was collected by Li et al., from 2007 to 2008, through a series experiments performed by ASHRAE project No. RP-1312 in Philadelphia, USA.The AHU data was collected in 1 min time intervals with 102 features.The general structure of the AHU used in ASHRAE project No. RP-1312 is shown in Figure 1 with critical features marked.There were two AHUs with the same configuration running simultaneously, which were named AHU-A and AHU-B, respectively.AHU-A always run under normal conditions while AHU-B simulated various faults one at a time.More specifically, AHU-B generated 1440 data samples for a particular fault on one day.Furthermore, a corresponding normal dataset with 1440 data samples was generated by AHU-A on the same day.From the project description, there were in total 13 different types of faults recorded, from which we select six typical faults and denote them from F1 to F6:  In each AHU fault diagnosis simulation process, 5 to 40 data samples were randomly selected from each faulty dataset.In order to ensure the diagnosis accuracy rates were representative, we repeated the whole diagnosis process 30 times and collected the averaged classification accuracy as the final experimental result.

Feature Selection for the Proposed AHU Fault Diagnosis Framework
The step of feature selection selects the most important features from the raw data, filters out redundant, noisy data and saves the computational power in generating artificial training samples.It almost becomes a compulsory step of data-driven methods identifying various faults for HVAC subsystems.In this study, a recently proposed cost-sensitive sequential forward feature selection (CS-SFS) algorithm is employed to select the top 11 most important features using SVM as a base classifier.The original data size with 102 feature size has been shrunken to almost 1/10 of the original size.Both artificial data generation speed and classification speed are increased.The CS-SFS algorithm selects features from a minimal set that contains a baseline feature [16].In AHU fault diagnosis scenarios, power consumption by the cooling coil is usually the most important feature among all features.Therefore, E ccoil is selected as the baseline feature; and the top 11 important features selected from the real-world AHU fault diagnosis dataset is listed in Table 1.

Index
Variable Description

Generative Adversarial Network and Wasserstein Generative Adversarial Network
Generative adversarial network (GAN) was proposed by Goodfellow et al. in 2014 [13], which consists of two important components, namely, the generator and the discriminator.The generator learns the probability distribution of the original data and generates artificial samples that mimic the pattern using random noises.The discriminator discriminates the artificially generated data from the true data and prompts the generator to produce better quality data in the next iteration.The general semantics flow chart of GAN is depicted in Figure 2. In 2017, Arjovsky et al. [15] refined the traditional GAN by reconsidering the probability distance using Wasserstein distance.The refined GAN is named as Wasserstein generative adversarial network or WGAN.Experimental results show that WGAN is more robust and stable than the traditional GAN to avoid problems, such as model collapse, bias sample generation, etc.Most existing works in the literature about GAN and its extensions focus on image processing, image synthesis, artificial image generation and object recognition on images [20][21][22][23].To our knowledge, our work is the first to apply GAN on AHU fault diagnosis.

Proposed Framework for AHU Fault Diagnosis Based on WGAN
With a small number k of training samples for each fault type, we design an automated fault diagnosis system for AHUs based on WGAN and SVM.The proposed framework is depicted in Figure 3.With random noise feed into the WGAN generator, WGAN is capable of generating infinitely many artificial training samples (x, y) to the classifier, where x indicates the features; and y is the label.We use the limited number of real-world faulty data as the training data to train the SVM evaluator and test the artificially generated data as a quality control protocol.If the predicted label y equals to y, then the artificial sample is considered as a high quality sample and inserted into the training pool.If y does not equal to y, the artificial sample will be disposed.The quality control protocol runs until the target number of training samples for every fault type is reached.In the last step, all samples that pass the quality control protocol are inserted into the training pool for fault diagnosis.
Since the number of real-world training samples for each fault is small, a single classifier evaluator may not judge the generated sample fairly.Therefore, the proposed framework, as what we have showed in Figure 3, can be further improved by replacing the SVM evaluator using a more sophisticated ensemble learning structure with three classifiers: SVM, DT (C4.5) and RF (Figure 4).C4.5 DT, which utilizes information gain ratio to select the tree roots, is more robust compared to traditional ID3 DTs [24].C4.5 DT and RF are also reported to be two effective methods for HVAC subsystems fault diagnosis [8,9].Each of the three classifiers is trained by the real-world data and produces a predicted label.The final prediction y is obtained by employing a majority voting scheme between the three predicted labels: y 1 , y 2 and y 3 .If any two of y 1 , y 2 and y 3 are equal, we assign the equal value to y .If y 1 , y 2 and y 3 are all different, we assign −1 to y .Lastly, we compare the values of y and y, if the predicted label y equals to y, the artificially generated sample is considered as a high quality sample and inserted into the training pool.The artificial sample is disposed, if y does not equal to y.The increment of the number of evaluators provides a more fair evaluation from multiple perspectives, which reflects a better fault diagnosis result in the results section.

Results
Experiments were performed with both frameworks proposed in Section 2.4, namely, WGAN-SVM and WGAN-ensemble.Five different traditional classifiers are employed, which include KNN, C4.5 DT, multi-layer perceptron (MLP), SVM and random forest (RF).We set up the experiment environment on a standard lab machine with Intel Quad Core i7-7700, 8GB RAM and 1T SSD hard disk.In the training phase, 3000 artificially generated faulty samples for each fault type are used to train the traditional classifiers.In the testing phase, 1440 real-world data samples for each fault type, which were collected by the ASHRAE 1312-RP project, are utilized to test the classification/diagnosis accuracy based on 10-fold cross-validation.
Using the first framework that we proposed in Section 2.4, SVM is employed to implement the quality check protocol.First, we use the traditional GAN to generate artificial training samples with real-world faulty samples at numbers: 5, 10, 15, ..., 40.The diagnosis accuracy rates are shown in Table 2. Next, we replace the traditional GAN with WGAN.The diagnosis accuracy rates with the five classifiers are shown in Table 3.A comparative study is then carried out to show the performances of various classifiers in Figure 5.It is noted that every classification accuracy rate is an average of 30 times repeated runs with randomly selected (different) initial training samples.It can be seen that WGAN-SVM generates higher quality artificial faulty training samples and achieves higher classification accuracy for AHU fault diagnosis.Tables 2 and 3, WGAN-SVM-SVM achieves the highest classification accuracy with the number of real-world faulty samples for each fault type greater than 10.With 30 real-world samples for each fault type, the proposed WGAN-SVM-SVM framework is capable of achieving an automatic fault diagnosis rate higher than 80%, which is within the acceptable range for real-world applications.Moreover, the classification accuracy rates are further improved with the second approach in Section 2. 4.
With the second framework that we proposed in Section 2.4, an ensemble learner is proposed to implement the quality checking protocol, which is supposed to constrain the artificial faulty samples one step further comparing with the first framework.With real-world faulty samples at numbers: 5, 10, 15, ..., 40, the diagnosis accuracy rates using traditional GAN and WGAN are shown in Tables 4 and 5. Again, WGAN integrated methods have much better performance compared to traditional GAN integrated methods.With the ensemble learner as the quality control protocol, the quality of artificially generated faulty training samples is improved.The WGAN-Ensem-SVM combination achieves over 90% accuracy with 40 real-world samples available for each fault type.The performance comparison between different classifiers is further demonstrated in Figure 6.
Diagnosing the same six fault types, we compare the classification accuracy rates that we collected in this study with those in [11].Since the best diagnosis accuracy rates in [11] were obtained using SVM, we compare the results of semi-supervised SVM with results of the two proposed frameworks using WGAN with SVM in this study (Table 6).Table 6 shows clearly that, except for the case of 20 faulty samples for each fault type, the proposed WGAN-ensem-SVM method always outperforms the semi-supervised SVM method.Furthermore, for the case of 20 faulty samples for each fault type, the WGAN-SVM-SVM method outperforms the other two methods.

Conclusions and Future Work
We introduced a novel hybrid fault diagnosis framework for AHUs with a limited number of real-world samples available.The original problem is hardly solvable by existing supervised learning approaches, since most of the existing methods rely on a sufficient number of training data samples for each fault type.However, in real-world cases, faulty training samples are difficult to be collected, since faults are usually fixed within a short period of time.The proposed frameworks utilize an unsupervised learning approach called generative adversarial network (WGAN) to generate artificial training samples using only a few real-world samples.The performance of WGAN is comprehensively evaluated in the AHU fault diagnosis process.It is noted that although WGAN is an unsupervised learning approach, the proposed frameworks still require supervised learning methods to accomplish the classification tasks.
Since GAN and WGAN were proposed in very recent years, i.e., in 2014 and 2017, and most of their applications focus on the field of computer vision, we propose to apply an additional quality control protocol to selectively insert artificial samples into the training pool.Two quality control protocol approaches were implemented using SVM and an ensemble learner.Five different classifiers were tested on the artificially generated training pool with 3000 samples for each fault type.In the testing phase, real-world faulty samples were used to test the diagnosis accuracy.The proposed WGAN-ensem-SVM method achieves the highest classification accuracy at 90.44% with 40 initial real-world samples for each fault type.
The future works of this study are looking for a pure unsupervised learning approach, such as clustering, without the help of the supervised classifiers, to deal with the HVAC fault detection and diagnosis problems.

Figure 1 .
Figure 1.The general structure of the Air handling unit (AHU) used in ASHRAE project No. RP-1312 with critical features marked.

Figure 2 .
Figure 2. The general semantics flow chart of generative adversarial network (GAN).

Figure 3 .
Figure 3. Proposed framework for AHU fault diagnosis based on Wasserstein GAN (WGAN) and support vector machine (SVM).

Figure 4 .
Figure 4.An extension of the proposed framework combining WGAN with an ensemble learning structure.

Figure 5 .
Figure 5. Classification/diagnosis results comparison between various classifiers using WGAN-SVM to generate artificial faulty training samples.

Figure 6 .
Figure 6.Classification/diagnosis results comparison between various classifiers using WGAN-ensemble to generate artificial faulty training samples.

Table 2 .
The fault diagnosis accuracy rates (%) with different classifiers using GAN-SVM to generate artificial training dataset.

Table 3 .
The fault diagnosis accuracy rates (%) with different classifiers using WGAN-SVM to generated artificial training dataset.

Table 4 .
The fault diagnosis accuracy rates (%) with different classifiers using GAN-ensemble to generate artificial training dataset.

Table 5 .
The fault diagnosis accuracy rates (%) with different classifiers using WGAN-ensemble to generate artificial training dataset.

Table 6 .
Comparing the fault diagnosis accuracy rates (%) obtained by the proposed WGAN frameworks with the best results in [11].