Fault Diagnosis of DCV and Heating Systems Based on Causal Relation in Fuzzy Bayesian Belief Networks Using Relation Direction Probabilities

: The state ‐ of ‐ the ‐ art provides data ‐ driven and knowledge ‐ driven diagnostic methods. Each category has its strengths and shortcomings. The knowledge ‐ driven methods rely mainly on expert knowledge and resemble the diagnostic thinking of domain experts with a high capacity in the reasoning of uncertainties, diagnostics of different fault severities, and understandability. How ‐ ever, these methods involve higher and more time ‐ consuming effort; they require a deep under ‐ standing of the causal relationships between faults and symptoms; and there is still a lack of auto ‐ matic approaches to improving the efficiency. The data ‐ driven methods rely on similarities and pat ‐ terns, and they are very sensitive to changes of patterns and have more accuracy than the knowledge ‐ driven methods, but they require massive data for training, cannot inform about the reason behind the result, and represent black boxes with low understandability. The research prob ‐ lem is thus the combination of knowledge ‐ driven and data ‐ driven diagnosis in DCV and heating systems, to benefit from both categories. The diagnostic method presented in this paper involves less effort for experts without requiring deep understanding of the causal relationships between faults and symptoms compared to existing knowledge ‐ driven methods, while offering high under ‐ standability and high accuracy. The fault diagnosis uses a data ‐ driven classifier in combination with knowledge ‐ driven inference with both fuzzy logic and a Bayesian Belief Network (BBN). In offline mode, for each fault class, a Relation ‐ Direction Probability (RDP) table is computed and stored in a fault library. In online mode, we determine the similarities between the actual RDP and the offline precomputed RDPs. The combination of BBN and fuzzy logic in our introduced method analyzes the dependencies of the signals using Mutual Information (MI) theory. The results show the perfor ‐ mance of the combined classifier is comparable to the data ‐ driven method while maintaining the strengths of the knowledge ‐ driven methods.


Introduction
Recent advances in Information and Communications Technology (ICT), especially in embedded systems, enable the development of embedded control systems that profoundly couple our physical world to the computation world. Demand Controlled Ventilation (DCV) and heating systems, as a type of Heating, Ventilation, and Air Conditioning (HVAC) system, include many variables, signals, look-up tables, and components, with continuous and discrete dynamics. The complexity of a DCV and heating system increases when it becomes more extensive with more components and equipment that cooperate simultaneously. The complexity of HVAC systems makes them error-prone and susceptible to faults that may lead to a waste of energy, for example, continuous heating in the case of a stuck-at damper, poor thermal comfort, and unacceptable indoor air quality. Therefore, the occurrence of faults is unavoidable, and faults, for example, stuck-at or constant faults, inevitably occur. Despite the inherent complexity of DCV and heating systems, their applications require them to be fault and failure-tolerant. A fault-and failuretolerant design of DCV and heating systems requires developments in failure detection and fault diagnosis techniques, which is a challenge. Detection and diagnostic techniques' testing and evaluation activities are thus of critical importance for the early detection of faults in the models in the design phase before they propagate to the actual system. The failure detection and fault diagnosis in early stages of occurrence avoid threatening situations, the degradation of system performance, energy loss, or discomfort conditions [1]. For instance, the faults can be the reason for energy waste in HVAC systems up to 20% of total energy consumed, excess pollutant emissions, and decremented comfort for occupants [2,3]. Basarkar et al. describe how faults based on type and severity can be the reason for up to 22% of the total energy consumption of HVAC systems [4]. In HVAC systems, probable faults in building systems are various. For example, ASHRAE Project 1043-RP shows that a typical water-cooled centrifugal chiller can face more than twenty types of common faults [5]. ASHRAE Project 1312-RP indicated 68 types of common faults for a typical air handling unit [6]. Therefore, it is costly to capture sufficient training data for every fault, and most of the research projects consider only a part of these faults in most data-driven-based chiller FDD methods.
Many fault diagnosis methods have been reviewed and classified widely in many studies, for example, Steinder et al. [7] have focused explicitly on fault localization techniques in complex communication systems to find the exact source of a failure from a set of failure indications. They have classified the fault localization techniques into three categories of Artificial Intelligence (AI) techniques, that is, rule-based, model-based, and case-based systems, model traversing techniques, and fault propagation models, that is, code-based techniques, dependency graphs, Bayesian Networks (BNs), causality graphs, and phrase structured grammars.
Techniques for Fault Detection and Diagnosis (FDD) in the building energy system field can be categorized into knowledge-driven and data-driven methods [8]. Knowledgedriven methods resemble the diagnostic thinking of domain experts with a high capacity in reasoning of uncertainties; they can work with different fault severities. In contrast, methods in the data-driven category mainly rely on similarities and patterns [8]. Each category has its strengths and shortcomings. Zhao et al. studied 135 AI-based FDD papers from 1998 to 2018 and concluded that new AI-based methods are in demand that can combine the advantages of knowledge-driven and data-driven methods in the future [8]. The knowledge-driven methods rely mainly on expert knowledge and resemble the diagnostic thinking of domain experts with a high capacity in reasoning of uncertainties, they diagnose different fault severities, and are more understandable. On the other hand, these methods involve higher and more time-consuming effort, they require a deep understanding of the causal relationships between faults and symptoms, and there is still a lack of automatic approaches to improve the efficiency. The data-driven methods rely on similarities and patterns and they are very sensitive to changes of patterns and have more accuracy than the other knowledge-driven based methods, but they require massive data for training, cannot inform about the reason behind the result, and they represent black boxes with low understandability.
The research problem is thus the combination of knowledge-driven and data-driven diagnosis in DCV and heating systems to benefit from both categories. The diagnostic method presented in this paper involves less effort for experts and quicker approaches without requiring a deep understanding of the causal relationships between faults and symptoms compared to existing knowledge-driven methods while offering higher understandability than other data-driven approaches and higher accuracy than other knowledge-driven approaches resolved by data-driven-based category. The fault diagnosis uses a data-driven classifier in combination with knowledge-driven inference with both fuzzy logic and a Bayesian Belief Network (BBN). The combination of BBN and fuzzy logic in our introduced method analyzes the dependencies of the signals using Mutual Information (MI) theory.
In the offline mode, a library of trends and statuses based on training fault cases is established. The conditional probabilities are calculated based on fuzzy weights of signal values and statuses that are used to obtain mutual information. The positive MI values show the dependencies of the subdomains in a pair of measurement signals or statuses for each fault case (pairwise dependency) and negative MI values show that there is no dependency. Then, the conditional probabilities of the subdomains in a pair with positive MI values are calculated and the conditional probability with the higher value indicates the direction of the dependency in each pair of nodes. Then, these dependencies are stored in the offline library as the RDPs. In the online diagnosis mode, our strategy compares the trends and statuses of the real scenario, which can be a fault scenario, with the trends and statuses that are stored in the offline library to find the most similar trends and statuses of signals of the fault case to the trends and statuses of signals for example scenarios in the library. For this comparison, the RDP of the real or faulty scenario is compared to the RDPs in the offline library and the percentages of similarities are calculated. Then, the evaluation step determines and sorts the likely faults based on the comparison results from the highest degree of similarity to the lowest as the diagnostic classifier result. These percentages of similarities are beliefs sorted from the highest value to the lowest value where larger values imply a higher probability of the corresponding fault. The overall benefits are more understandability, less effort for experts, and higher diagnostic accuracy. Our strategy only needs expert knowledge to define fuzzy sets and the whole process can intelligently classify the faults compared to the other knowledge-based strategies. The evaluation results show that our strategy can accurately map a fault case to the predefined fault in the library.
The method is tested on a demand-controlled ventilation and heating system. Stuckat or constant faults at temperature sensors, CO2 sensors, heater actuators, and damper actuators were investigated. The evaluation results show that 97.22% of faults were truly diagnosed with better precision, F-score and accuracy compared to a deep neural network. The diagnosis method sorts the results based on the probability values, for example, the top ranks are the most likely diagnosis result. However, the method indicates that the average values of the performance metrics increase when considering more cumulative ranks, for example, top five ranks, instead of only the first rank.

Literature Review
Luo et al. have proposed a similar method for Sensory Fault Detection and Diagnosis (SFDD) [9]. In this paper, they have used a k-means data clustering algorithm and classified each new dataset into different clusters in which the dataset in the same cluster has high similarity. The featuring Centroid Score (CS) is used to detect this similarity, and the k-means algorithm detects the closest centroid by calculating the Euclidean distance between each dataset and its corresponding cluster CS. Through this clustering-based method, the fault-free sensor readings were close to the cluster's centroids while those faulty ones would be far away. The proposed SFDD strategy consisted of database building for sensor fault detection, database building for sensor fault diagnosis, and online SFDD for measurement data. However, our approach uses MI and RDP tables to detect the closest fault to the new datasets. Besides, our approach is implemented not only for the sensor faults but also for actuators.
The BBN is one of the important approaches in fault diagnosis methods based on probabilistic theory for modeling uncertain knowledge and reasoning based on conditions of uncertainty, probabilities, and graph theory [10]. BBNs were introduced by J. Pearl in the 1980s [11]. BBNs can be combined with other approaches such as machine learning techniques, signed directed graphs, probabilistic ensemble learning, fuzzy theory, fault trees, and genetic algorithms. Qiu et al. explain that BBNs have effectively modeled probabilistic relationships in diagnostic situations by providing a framework for identifying critical probabilistic mappings [12]. Their Probabilistic method can link symptoms to failures by calculation of prior probabilities of faults. They defined the symptoms based on pure expert knowledge, for example, repair data log and consulting with experts in printers [12]. However, they have not implemented any data-driven method and used a single BBN for the FDD process, but our approach creates unique BBN for each RDP dataset. Their method also needs historical data and a system log for constructing the BBN.
Embedded control systems interact with the environment, and the sensory data and signals are measured continuously. Therefore, defining an appropriate conditional likelihood density function in BBNs for continuous attributes is critical. Tang et al. [10] have presented a Fuzzy Bayesian Network (FBN) for machinery fault diagnosis demanding intensive experience and expert knowledge described by the natural language, such as large, high, or fast. They used fuzzy logic to define the fuzzy events, mapped the system to those uncertain ones, and then produced the BBN. However, they have used a single BBN for the fault detection process, but our approach creates unique BBNs for each output RDP dataset. Their approach is also limited to expert knowledge.
In machine learning techniques from the data-driven-based methods, Hu et al. [13] have proposed an intelligent fault diagnosis network for refrigerant charge faults of a variable-refrigerant-flow air-conditioning system. This network is developed under the BBN theory. However, this method as a data-driven-based fault diagnosis is very costly to obtain sufficient training data for every fault [8].
In signed directed graphs, Peng et al. [14] have proposed a Multi-logic Probabilistic Signed Directed Graph (MPSDG) fault diagnosis approach in chemical processes based on the Bayesian inference. They show that the signed-directed graphs cannot be applied for complicated logic relations, but the authors have shown that the BNs can solve this complexity. They have two offline modeling and online diagnosis phases. In the offline mode, they have analyzed the historical data and deviation values and evaluated the priori probabilities of reason nodes and directed edges. However, constructing the SDG or MPSDG in systems with no historical data is not possible.
On the other hand, the Fuzzy Bayesian Belief Network (FBBN) combines the BBNs with the fuzzy theory. Chiu et al. proposed a fuzzy Bayesian classifier with case-based reasoning to improve diagnosis problems [15]. In this study, they have used fuzzy theory to define conditional density functions in BBNs to cope with the problem caused by continuous attributes. The accuracy and efficiency of this approach for decision-making applications have been proved by many studies [16]. The FBBN is often used as an effective method of uncertain knowledge representation and reasoning. Fuzzy sets are mathematical sets, the elements of which have degrees of membership derived from the concept of fuzzy logic, which was introduced by Lotfi A. Zadeh and Dieter Klaua in 1965 [17,18]. Several examples show the effectiveness of FBBNs in solving uncertain problems, applying Fuzzy sets, and calculating the probabilities of BBNs [19]. Yao et al. [19] have modeled a Fuzzy Dynamic Bayesian Network (FDBN) for fault diagnosis and reliability prediction in complex systems using various test information. The quantitative analysis of an FDBN can proceed along with forwarding (or predictive) analysis and backward (or diagnostic) analysis. They have presented a model in a fault diagnosis model with uncertain and dynamic information. Their work introduces a dynamic process to the BN to model a dynamic system. It includes modeling the BN, the fuzzy theory applied to BN, and Static BN (SBN) that can be converted to Dynamic Bayesian Network (DBN) models by introducing time dependency. They have used fuzzy theory to evaluate the system's reliability with different language variables very high, high, medium-high, medium, intermediate low, low, and very low. However, they generated the BN based on the fault statistics and the fuzzy failure probabilities of root nodes, but in our approach, the starting point is the observations of the system attributes.
Intan et al. [20] have applied an FBBN for analyzing medial tracks. This paper has extended the MI concept using fuzzy theory to construct an FBBN based on learning BN structures using an information-theoretic approach introduced by Cheng et al. [21]. They used fuzzy labels to determine the relation between two fuzzy nodes. For example, they have found the relationship of the different disease labels with other factors in a record of data for different patients, for example, age, degree, and other types of diseases. However, they have used this method for analyzing a medical dataset for different patients and diseases; therefore, the application is different. Further, their approach only measured the causal relations in FBBN using the relation direction probabilities between different pairs of parents and children. However, in our approach, we used the causal relationships in FBBNs based on relation direction probabilities for fault diagnosis, and our approach includes two modes, an offline training mode, and an online diagnosis phase, to classify the fault cases.
A suitable Failure Detection and Fault Diagnosis (FDFD) system ensures the HVAC systems' proper operation as these systems are subject to various errors, which can lead to malfunctions. HVAC systems fail typically when the actuators "stick" and no longer change their set point, despite the commands. This actuator failure can arise in several parts. For instance, a valve may stick at fully-open, fully-closed, or any intermediate setpoints. If an actuator sticks in an open or closed position for a specific period, some concerns are expected, for example, the energy waste or uncomfortable environment [22]. The pure knowledge-based diagnosis models are also developed, for example, a real-time black-box tool for a VAV AHU was developed by Shiazoki and Miyasaka using a signed directed graph. The signed directed graph model is a minimized rules-based model to lower the effort that can detect the symptoms of the faults to find the root cause [23]. However, the performance of the method depended on the thresholds set. The wrong thresholds setting can cause incorrect diagnosis. Threshold settings are also laborious and time-consuming. Shi et al. introduced a model using probabilistic representations for dependencies of faults and symptoms in a VAV AHU. The fault diagnostic model is developed based on a DBN to diagnose persistent and transient faults while maintaining the FDD system's good performance [24]. However, calculation of the conditional probability values between the faults and symptoms is yet manual and depends on expert knowledge. In addition, for large systems, the amount of data might be unbearable. Therefore, many complicated faults may not be evaluated unless advanced modeling or sensing methods are used.
Zhao et al. [25] have proposed a three-layer Diagnostic BN (DBN) for chiller faults diagnosis based on the BBNs using a graphical and qualitative illustration of the intrinsic causal relationships among three layers of causal factors, faults, and fault symptoms, and this DBN can be constructed based on the probability analysis and graph theory. The prior probabilities of root nodes and prior probabilities of faults are the normalized frequencies of faults, and conditional probabilities show the relations of the nodes in three layers. With observed pieces of evidence, posterior probabilities for fault diagnosis can be calculated. This framework uses all beneficial information of the chiller concerned and chiller experts' knowledge, the quantitative and qualitative knowledge from diverse sources is merged and has a strong ability to deal with incomplete or even conflicting information. However, there are major differences to our proposed method. They calculated the conditional probabilities using statistical or machine learning algorithms, while we have calculated them based on fuzzy weights. Further, our approach is constructed based on mutual information theory and the dependencies of the system attributes (i.e., signals) for each fault case using BBN theory, which only needs expert knowledge to define fuzzy sets. Zhao et al.'s mentioned approach is also highly dependent on expert knowledge, especially in calculating prior probabilities. In addition, they have defined rules to conclude the posterior probabilities, but we used the sorting technique showing that the top ranks show reasonable results with high accuracy.
Xiao et al. [26] presented a Diagnostic Bayesian Network (DBN) for Fault Detection and Diagnosis (FDD) of Variable Air Volume (VAV) terminals. In this method, the parameters of the DBN describe the probabilistic dependencies between faults and evidence. The inputs of the DBN are the evidence that can be obtained from the measurements in Building Management Systems (BMSs) and manual tests. The outputs are the probabilities of faults concerned. The structure of the DBN is a graphical illustration of experts' diagnostic thinking, which can illustrate the relationships among faults and symptoms qualitatively. They have defined a table including the fault nodes, states of the system, rules for defining the states, and prior probabilities for each state. In this method, after determining the nodes, the state of each node should be defined. A fault node may have several states that help in estimating the conditional probabilities of the fault evidence given the fault. The rules in the defined table can determine the corresponding states. There are also specific tables and rules to define evidence nodes. The whole structure of this DBN depends on expert knowledge and the rules to define the system states. In another paper from these authors, Zhao et al. [27] have also developed a second study on diagnostic Bayesian networks (DBNs) for diagnosing faults in air handling units (AHUs) in buildings. This paper developed four DBNs to diagnose heating/cooling coils faults, sensors, and faults in a secondary chilled water/heating water supply. However, establishing the FDD strategy and BBN nodes is highly dependent on expert rules.
Cai et al. [28] have used two BNs for multiple-simultaneous faults with a multisource information fusion-based fault diagnosis methodology. These BNs are established based on sensor data and observed information. The Bayesian network structure is established according to the cause-and-effect sequence of faults and symptoms. One BN is made based on sensor data, and the other is based on sensor data and observed information; however, the relationship between faults and symptoms is based on expert reasoning and purely knowledge-based.
The features are essential for fault diagnosis. Wang et al. [29] introduced a feature selection (FS) method that is proposed in their study for chiller Fault Diagnosis (FD) and merged the Bayesian network with distance rejection (DR-BN) to remove extra features. First, the candidate existing features that can be retained are nominated through the following criteria: high existent frequency of sensors installed on the field chillers, high sensitivity to faults, and small calculation. Supplemental features are added to achieve a better performance. However, in our introduced method, we have used a different technique for feature development: RDP generations in the fault library of offline mode and online diagnostic mode as features for each fault case. Table 1 indicates an overview of the related works. In summary, the novelties and main contributions of this paper are based on the following points:  Integration of data-driven classifier, fuzzy logic, and Bayesian belief network for the combination of data-driven and knowledge-driven diagnosis: The composed diagnostic classifier in this paper includes the knowledge-driven diagnosis theories, that is, fuzzy and Bayesian theories, and data-driven diagnosis strategy based on the intelligent diagnostic classification algorithm. In offline mode, for each fault class, a Relation-Direction Probability (RDP) table is computed and stored in a fault library.
In online mode, we determine the similarities between the actual RDP and the offline precomputed RDPs. The combination of BBN and fuzzy logic in our introduced method analyzes the dependencies of the signals using Mutual Information (MI) theory. The method creates a unique RDP table for each class of faults and datasets. This method can also be extended to additional faults by adding RDPs of new fault classes to the offline library. This method provides more understandability, less effort for experts, and higher diagnostic accuracy. Our strategy is less dependent on the expert knowledge and only requires the expert to define fuzzy sets and the whole process can intelligently and automatically classify the faults compared to the other knowledge-based strategies. The evaluation results show that our strategy can accurately map a fault case to the predefined fault in the library.

Reveal of hidden and intrinsic dependencies of trends or statuses in signals over time in case of faults:
In our diagnostic method, a novel strategy is introduced based on the dependency of trends (for sensors) or statuses (for actuators) in different subdomains over time. Therefore, our automatic diagnostic method can find the intrinsic and hidden dependencies of measurement signals and statuses that change concurrently over time in case of a specific fault based on mutual information and fuzzy theory. For example, if a damper stick at open status, the room temperature decreases and makes the heater stick at ON status indirectly because the heater wants to compensate for the heating load due to the damper, which is a hidden dependency between damper and heater status signal.  Extendibility of the strategy in this paper to complex systems: Finding fault-symptoms dependencies and fault diagnosis in other knowledge-based strategies in the literature are purely based on the expert knowledge, which can be very hard or impossible if the target system is complex with many measurement signals and statuses to the limit that even the experts cannot find the exact and hidden dependencies. However, our approach can automatically find these dependencies and faults in complex systems.  Mapping and evaluation of the novel diagnostic method for DCV and heating systems: The presented diagnostic fault model covers sensor and actuator faults to map and evaluate the integrated diagnostic method to DCV and heating systems, as an example use case.  Experimental evaluation of the introduced diagnostic method based on FBBNs compared to deep neural network method using simulation framework: Manufacturers typically are reluctant to provide the full-set fault data. Therefore, the diagnostic method in this paper is implemented in a simulation framework that can inject any desired faults into the system [30]. The evaluation results show a convincing performance of the introduced composed method (knowledge-driven and data-driven) in fault diagnosis in this paper compared to a deep neural network (data-driven method) [31]. A review paper on the state-of-the-art [8] shows the lack of accuracy of the knowledge-driven methods.  Accurate fault diagnosis independent of prior knowledge and historical data: The other strategies use the BBN theory, but they use historical data, repair logs, or experimental data to calculate the prior conditional probabilities. In the strategy introduced in this paper, the signals only need to be defined as continuous or discrete variables and use the fuzzy theory to categorize the signal values to create the Bayesian network. The rest of the paper is organized as follows. Section two presents the system model, while Section three describes the diagnostic algorithm based on a fuzzy Bayesian belief network. The implementation of the method based on the use case of DCV and heating systems is shown in Section four. Section five presents the evaluation results and discussion, and the conclusion is described in the last section of this paper.

System Model
This section explains the system model of a DCV and heating system that tests the diagnostic methodology. An understanding of the overall behavior of the system is required before applying any diagnosis technique through system model analysis. Analysis of the system model leads to knowledge about the system's functionality. The function of a system is what the system is intended to do [32], whereas the model specifies what a system does [33]. The methodology in this paper is introduced based on the DCV and heating system model as an example scenario of the modern HVAC systems with their numerous components. In this model, embedded processing units orchestrate the nodes of Wireless Sensors and Actuators Networks (WSANs) with the physical environment to adaptively control the air quality and temperature of an office building. The system model of the HVAC systems includes a typical building with several rooms on different floors, for example, an example office building with six rooms and a corridor equipped with a DCV and heating system. Each room is generally occupied by several components, for example, sensors or actuators. The thermal dynamics of the system model must be established. For example, the lumped-capacitance method has been used in this paper to model the thermal dynamics of the use-case office building (thermal network model) where the heat transfer is illustrated by thermal resistance and heat storage (thermal capacitance). In this model, each zone and each wall are represented by a thermal node. The nodes are connected via thermal capacitors to the ground reference and thermal resistors to the adjacent nodes. In the designed model of this study, for every zone, there is a central node that is later connected to central nodes of other zones via thermal paths across the walls and windows. A schematic of this node and its connections can be seen in the   The DCV is a control strategy based on ventilation to modify the amount of fresh air to improve the indoor air quality while increasing the potential energy saving by automatic adjustment of the volume of air exchange using damper actuators based on sensor values received from air quality sensors, for example, CO2 concentration sensors, temperature sensors, occupancy sensors, heater status, and control theory. Figure 3 shows the role of the DCV and heating system in optimizing the system considering different parameters. The model considers the heating and ventilation (not the cooling) because the model studies the winter season when the range of outdoor temperature is below the range of acceptable indoor temperature. Figure 4 shows an office building sketch for the system model. The model is developed based on thermal dependencies among different zones and the environment during a typical winter day in February. Behravan et al. described the model dynamics in [34]. The differential balance equations for each node have been solved with an explicit numerical method. This paper shows the cluster-tree-mesh topology based on the building architecture that supports wireless and battery-powered nodes (devices) with minimum routing ef-forts in Figure 5 [35]. The sensor nodes in each zone send the measured values, for example, temperature, occupancy, or CO2 concentration, to the cluster head of the router zone. The router receives the values and forwards them to the controller via the coordinator. After calculations, the controller processes the received values, determines the commands, and exerts them on the actuators, for example, heater and damper actuator, which is finally applied to the plant. Faults are inevitable events that affect the components, the system's functionality, and performance. Faults may lead to a system-level or component-level failure or malfunction if they are not detected and mitigated. Failures can involve performance degradation, safety risks, and excess cost, and energy waste. From the time perspective, faults may occur during the whole operation of the system as a permanent fault or may be limited to a specific period as an intermittent fault. Faults with time dependency can be categorized into abrupt faults (stepwise/short), incipient faults, constant faults, noisy faults, and intermittent faults [36]. Constant faults arise when a sensor reports a constant value over time instead of the real and normal sensor values or when an actuator is stuck at a constant position. Faults can affect components such as sensors, actuators, and computational nodes, and communication networks. Faults in actuators may lead to loss of controllability. In sensors, they can affect reliable measurement information, and in the computational nodes, faults will change the behavior of the entire plant.
In this paper, the following component faults are used for the diagnostic algorithm introduced. The faults are modeled based on the measured values from the sensors such as temperature sensors, CO2 concentration sensors, and command or status values in actuators, for example, heater actuators (thermostats) and damper actuators. These faults are constant-valued or stuck-at faults, as listed below. it gets the binary value 1, which means excess low-temperature fresh air comes inside. Therefore, the inside temperature will decrease, and the heater must constantly work to compensate for the heat loss. If the damper is stuck at its closed position, then it gets the value 0, which means that the inside air temperature will increase, and the indoor CO2 concentration will pass the maximum permitted limit;  Heater Actuator (Thermostat) Fault: This type of fault represents a stuck-at fault where the heater sticks at a specific position. For example, if the heater is stuck at its ON position, it gets the value 1, which means inside air temperature increases. If the heater is stuck at its OFF position, it gets the binary value 0, which means the inside, air temperature tends to decrease.
The equation that describes the generated data from a sensor and actuator node can be modeled as a function concerning time f (t) [37], as can be seen: where f(t) represents the value sensed by the node at the time , is the non-faulty sensor value at the time t, knowing that in the real world, there is no ideal signal. Therefore, the noise will be added to Equation (1). As a result, this equation can be written as the following: Some factors are added to normalize Equation (2); for instance, , , are factors that can be used to determine the fault type, where A is the multiplicative constant and called gain, whereas B is the additive constant and called offset, and n is the external noise. According to the above, the general form of this equation can be seen here: Four different types of faults are modeled as examples, gain fault, offset fault, noise fault, and stuck-at fault. Stuck-at-fault can be defined as faulty data that has a constant value. The variance of the measured values from the fault occurrence is zero in the stuckat fault, and the sensed data shows a constant value A further detailed expression of the established DCV and heating system model, faults models, and fault hypotheses are described by Behravan et al. in [30,34,38,39].

Diagnostic Classifier Based on FBBN
This section cuts through the generic steps of the combined diagnostic classifier to diagnose any stuck-at or constant faults based on the causal relation in a fuzzy Bayesian belief network using the relation direction probabilities. The result of FBBNs that are causal relationships is then visualized using the graphs and table of listing based on RDPs. The graphs are constructed from nodes (indices) and edges (arcs). Figure 6 shows the direction of the arcs with the direction of the dependency between each pair of nodes based on the conditional probability values extracted from the Conditional Probability Table  (CPT). Fuzzy association rules are calculated from the network and weights of the relationship between two nodes are assumed as confidence factor of these rules. This section shows the steps of the generic automatic diagnostic algorithm as a classifier that is introduced in this paper. Different steps are data preparation, system attributes and subdomains definitions, fuzzy theory and generating weighted fuzzy data over relational data table, probability of subdomains using fuzzy theory, intersection probability MI theory, finding direction and probability of transitions using conditional probabilities, and fault diagnosis. Figure 7 shows the scheme of a diagnostic classifier based on causal relations in FBBNs using RDPs.

Data Preparation
In the first step, a Relational Data Table (RDT) of all random variables of the system is created as a basis of the recorded data that must be used for the fault diagnosis. The data samples include information about all variables or attributes as tuples [20]. A fault injection framework is a helpful tool for studying the behavior in the presence of faults and evaluating diagnostic techniques. Diagnostic techniques can serve for triggered appropriate recovery actions to achieve an acceptable level of service despite occurring faults. Considering the vast range of diagnostic methods, establishing an accurate diagnostic model that maps system failures to the correct faults is a time-consuming task that may involve extensive try-and-error efforts [34]. In this paper, fault injection is used as a technique to determine the coverage of the fault diagnosis by producing faults in the system in order to trace the behavior of the system in existence or absence of different kinds of faults and evaluate their effect by monitoring several parameters, for example, energy consumption and occupancy comfort. Table 2 shows the samples with their attributes' values over time.

System Attributes and Subdomain Definitions
A domain is a set of ranged values for a variable, where this vast range can be divided into small ranges as a set of subdomains. Figure 8 shows a sample domain with its subdomains with the values along the Y-axis over time along the X-axis.
Attribute-ith = {Subdomain1, Subdomain2, …, Subdomainp}, where subdomains can be a subset of continuous or discrete values. In this step, the attributes will be classified into several subdomains. This classification can be done using the fuzzy theory [15]. The values with continuous changes will be classified using the fuzzy functions, while those with discrete changes will be classified based on their discrete values. Once all the attributes were classified into subdomains, the Subdomain Label Table (SLT) is generated that includes all attributes and their subdomains. Table 3 indicates the SLT. All the subdomains of each attribute will then be saved in the Subdomain Label Vector (SLV). SLV is a vector of all the subdomains extracted from the SLT table.

Generating Weighted Fuzzy Data Based on Fuzzy Theory
Once the subdomains are defined, the probability of each subdomain as weight (W) is calculated based on the Membership Degree (MD) using the Membership Function (MF). The MF obtains the value and produces MD values with a range of [0, 1]. There are various types of fuzzy membership functions: triangular, trapezoidal, Gaussian, and bellshaped membership functions. The Trapezoidal has been used in this paper as follows.

MI and Probability of Subdomains
MI is a concept rooted in information and probability theory. MI of two random variables is a statistical measurement of the mutual dependence of two random variables [20]. MI measures information about one random variable by observing the other random variables [40]. There are many definitions of random variables. For example, G. Zeng [41] has classified MI definitions into two categories: (1) definitions with random variables and (2) ensembles. The fuzzy theory can be used as an appropriate likelihood density function [42]. Intan et al. [20] defined the MI between two fuzzy sets of A and B as follows where R is the number of records and are membership degrees of dkj and dki for fuzzy sets A and B, respectively [20]. The probability of the subdomains, that is, P(A), P(B), therefore can be measured by the total weights and using the Equation (8), where n is the number of samples (No. of Records). Table 5 shows the Subdomain Probability Vector (SPV).

Joint (Intersection) Probability
A joint probability is a statistical measurement for two events occurring at the same time instance. If event A changes the probability of event B, then they are dependent; otherwise, they are independent. The probability value for the independent events is equal to zero. Therefore, the dependent events are determined. In this paper, to calculate the dependent subdomains, the algorithm compares the fuzzy weights of each time sample in pairs of different subdomains and different attributes to find the minimum weight value of that pair. Finally, the algorithm calculates the intersection (joint) probability of that pair (of subdomains), respectively. The algorithm generates a triangular top matrix of intersection (joint) probabilities of subdomains called Intersection Triangular Top Matrix (ITTM). Therefore, if P (A,B) is the probability of two subsets A and B, the Intersection probability is calculated using the following equation [20]: Here, A(WSubdomaini) and B(WSubdomainj) are the fuzzy weights of subdomains A and B. Note that P(A,B) is equal to P(B,A); therefore, this is not essential to measure both the top and down triangular. In this paper, we only consider the values of the top triangular matrix. Table 6 describes the Intersection Triangular Top Matrix (ITTM).  P(A,B) for all subdomain pairs, Equation (6) will get the value for the MI. The positive MI value shows a dependency between two subdomains of a pair, and the negative MI value indicates independent subdomains of a pair. The diagnosis algorithm in this paper assumes the binary value of 1 for the positive MI values and the binary value of 0 for the negative MI values. The binary results will then be placed in a top triangular matrix named Subdomains Relation Table (SRT) as shown in the Table 7.

Conditional Probability
In this step, the conditional probabilities are measured. The conditional probabilities of fuzzy event A given B are denoted by P(A|B) [20].
This P(A|B) corresponds to P(subdomaini | subdomainj) in the method described in this paper.
  The conditional probabilities of fuzzy event B given A are also denoted by P(B|A) [20].
The above equation corresponds to P(subdomainj | subdomaini) in the method described in this paper.
The results from the above equations will be stored in a matrix called the Conditional Probabilities Table (CPT) shown in Table 8 with the following rules:  P(A|B)>P(B|A) indicates the direction of dependency between A and B is from B to A. Then, P(B|A) will be eliminated, and P(A|B) will be stored in Table 8.  P(B|A)>P(A|B) indicates the direction of dependency between A and B is from A to B. Then, P(A|B) will be eliminated, and P(B|A) will be stored in Table 8.
In Table 8, the highlighted elements of the matrix with the yellow color show the conditional probability of each pair of subdomains, for example, P(Subdomain9|Subdo-main2) and P(Subdomain2|Subdomain9). Then, the conditional probability with the higher value will be kept and saved in the CPT table as the green elements of the matrix, and the conditional probability with the lower value will be deleted from the CPT table.

Relation-Direction Probabilities
Relation Direction Probabilities (RDPs) in Table 9 indicate all the relations and their features, that is, the direction between dependent subdomains and the conditional probability of the transmission. The RDP table includes the parents' and children's columns generated based on the subdomains and the conditional probabilities of these pairs listed in the CPT table. All existing elements in the CPT table are ordered in this table in which the conditional probability of P (Subdomainj | Subdomaini) presents that there is a relation between Subdomainj and Subdomaini and the direction is from Subdomaini (Parent Node) to Subdomainj (Child Node) with the probability of P(Subdomainj | Subdomaini).

Causal Relation in FBBN Using the Relation Direction Probabilities
As mentioned, the FBBN shows the causal relationships between each pair of subdomains that are extracted from the RDP table. The conditional probabilities indicate the direction of the dependency in each pair of nodes. Figure 9 is an example that shows Subdomainj (Child Node) is related to Subdomaini (Parent Node).

Fault Diagnosis Classification Based on Causal Relations in FBBNs
The research in this paper shows that the FBBN causal relation based on the RDPs can determine all the cause-effect relationships among every subdomain in case of faults. Therefore, the authors used this capacity to diagnose stuck-at fault types for several components with various stuck-at values at different time instances. This research considers the constant faults because the constant values will be in a subdomain from a whole range of values for a parameter. Therefore, the diagnosis method can correlate the faulty value with the fault. In this section, an overview of the overall methodology is described.
This diagnosis method has two modes: the online mode and the offline mode. The offline mode includes the generation phase of the reference libraries, including various faulty conditions (fault objects) for diagnosing different real fault cases with random/real faulty values. Figure 10 indicates an overview of the fault diagnosis method introduced in this paper based on the causal relations in FBBNs using the relation direction probabilities.

Offline Training Mode
The offline training mode includes a library of different fault modes. In this library, a fault object for each type of fault is created that is named: Fault_Objecti, i = {1, n}. The n value depends on the total number of subdomains (p) and the time vector (t). Table 10 shows an overview of the offline library of the fault cases. The fault object is defined as a class in MATLAB as function (1)  The online mode represents the real case scenario simulated in this research using the fault injection framework. Time, type, and value in this fault injection are the properties of the real scenario with random values within a range. The RDP table in the online mode contains all the relations of subdomains of the real case (RealCase). For the diagnosis of the real case, the RealCase Diagnosis Class is defined in Function 2 with three properties, including Type, Time, and Value of random case. This class also includes two more properties: Percentage_List and Evaluation_List. The result from the function above for fault casei will be stored in the elementi of a list called Percentage_List. This list includes n number of percentages of similarity for a Real-Case compared to the n fault objects in the offline library. Table 11 shows the Percent-age_List for a RealCase object. After that, the x number of top-ranked similar fault cases based on the highest percentages in the Percentage_List will be distinguished by the diagnosis algorithm as the most relevant results, stored in the Evaluation_List. The evaluation list in Table 12 consists of x elements, and every element j (1 < j < x) has three properties: type, time, and percentage. The type and the time are allocated from the fault casei in the offline library. The percentage is the percentage of similarity that is actually the belief and the larger the fault belief means the higher the possibility of the corresponding fault. The diagnosis algorithm sorts the evaluation list by the rank order of values in the percentage column. "ranking" in statistics is the data transformation that the number or order of values are justified by their rank when they are sorted. Therefore, the elements with the higher percentages of similarity will be placed at the top ranks, and the lower percentages of similarity will be placed at the lower ranks. The type and time of element j of this list are the type and time of the fault casei object in the offline library. Finally, the comparison results of the type and the time values of the Evaluation_List with the type and the time of the RealCase object which can determine the belief of the fault diagnosis method in this paper based on the causal relation in fuzzy Bayesian belief network using the relation direction probabilities.

Implementation of the Diagnostic Classifier Based on the Example System Model
As mentioned in Section 3.10.2, the RDP tables are the primary data required for the online diagnosis phase. This section describes an example scenario for the introduced diagnostic method in Section 3 for a DCV and heating system use-case in MATLAB/Simulink. Here, an example fault type is selected in the DCV and heating system model's fault injection framework to show the diagnosis methodology's detailed description. The selected fault type is the CO2 sensor fault with a stuck-at value of 700 ppm with the fault injection time of 18.000 s. The simulation is run for 86,400 s or one typical winter day.

Data Preparation in System Model
The Data Preparation step includes extracting the data from signal values of Simulink-Model and initializing the RDT table. An output from the system model in MATLAB/Simulink prepares RDT required for the introduced diagnosis methodology in this paper. An example RDT based on the DCV and heating system model is shown in Table 13. The attributes can be domains with continuous or discrete values. In this table, the samples for 86,400 s or one-day simulation time can be recorded. Therefore, RDT = {S1, S2, S3, …, S86400}.

Attributes and Subdomains Preparation in System Model
Attributes and subdomains preparation step includes defining the labels of attributes and subdomains of the system for analysis and defining fuzzy sets over these attributes.

Attributes in System Model
For defining attributes, they are first divided into two types-continuous and discrete. The continuous attributes have continuous changes in their values, such as room temperature, daily temperature, room CO2 concentration, and occupancy parameters. The discrete attributes are heater status and damper status. There is also a simulation clock as a discrete attribute required for the evaluation step.

Subdomains in System Model
Once the continuous and discrete attributes and subdomains were defined in the previous section, the SLT table is created, shown in Table 14. The subdomains are also named nodes. For example, subdomains for the continuous daily temperature attribute are three subdomains of low daily temperature, middle daily temperature, and high daily temperature. These subdomains are used to create the fuzzy sets for the fuzzy function. Eighteen subdomains based on seven attributes can facilitate the conditional probability measurement of the BBN. The subdomain index is considered as a reference to the subdomain title. Table 14 shows three example subdomains for the attribute of room temperature. Figure  11 illustrates the subdomains and fuzzy sets for room temperature signal.

Fuzzy Rules in System Model
In this section, fuzzy rules or membership functions are defined to generate the probability weights based on the MD values from the fuzzy function. The conditional probability of each subdomain will be measured by the MD of each sample of the subdomain through the following steps.

Fuzzy Membership Functions
In this section, the fuzzy membership functions that get the MD value for each x input value are explained.

Room Temperature Fuzzy Membership Function
The total range of the room temperature has been considered between . This range can be divided into three subdomains of low room temperature with a [0-17.5] range, middle room temperature with a [17.5-22.5] range, and high room temperature with a [22.5-40] range. Twenty degrees centigrade is the nominal temperature value of the system. Equations (17)-(19) show the fuzzy membership functions respective to each subdomain. Figure 12 shows the overall room temperature fuzzy membership function with the related fuzzy function of each subdomain in three various colors of blue for low temperature values, green for middle-temperature values, and red for high-temperature values.

x x H ig h D a ily T e m p e r a tu r e F u z z y M e m b e r s h ip F u n c tio n x x
1 800

Occupancy Fuzzy Membership Function
The number of occupants in this system model differs in a range of [0-6] people based on an example scenario. An occupancy with less than three people in a day is considered low occupancy, with three and four people as middle occupancy, and with five and six people as high occupancy. These variations are illustrated in the fuzzy membership degree functions in equations below and Figure 15.

Weighted Fuzzy Relational Data Table Based on RDT
This step generates the WFRDT based on RDT for the use case CO2 sensor fault shown in Table 15. For this, a matrix of 86,401 rows and 18 columns is created. An example fault type that is the CO2 sensor fault with a stuck-at value of 700 ppm with an example fault injection time of 18.000 s is considered. Every column of the table is a subdomain and contains fuzzy weights for continuous attributes and normal weights of occurrence for discrete attributes. The fuzzy weights based on the output from MD functions for each sample are measured for each subdomain. Each sample is a measured data sample in every second of simulation time. In the last row of this table, the total weights over one column are calculated.

Probability of Subdomains in System Model
As mentioned in Section 4.4, the probability of the subdomains can be measured by the total weights for each subdomain divided by the number of samples using the Equation (12). Therefore, the Subdomain Probability Vector (SPV) is calculated, and the result is shown in the Table 16.

4.5.(Intersection) Probability of Subdomain Pairs in System Model
In this step, a triangular top matrix is generated to store the intersection probabilities of subdomain pairs. The intersection probability of P(A,B) is equal to P(B,A). Therefore, it makes sense to calculate the probabilities upper than the main diagonal of the matrix. Therefore, Table 17 shows the following matrix with 18 rows and 18 columns using Equation (13).

Subdomains' Relation Using MI
In this step, a top triangular matrix is generated based on the MI calculations using Equation (6) to find the dependency between the subdomains of a pair named Subdomains Relation Table (SRT) for the use case of CO2 sensor fault in Table 18. For the pairs that have a positive amount of correlation measurement, the matrix element gets the value 1, and for the negative result of the MI equation, it gets the binary value of 0. As mentioned in Section 3.6, the positive values indicate the dependency between the subdomains of a pair (pairwise dependency) [40].

Conditional Probabilities
The direction of transition arcs and conditional probability between pairs after finding the correlation between subdomains of each pair is known. In This step, every conditional probability of each pair of A and B as P(A |B) and P(B|A) based on Equations (14) and (15) are calculated. For this, a Top-Down triangular matrix including all the conditional probabilities of all corresponding subdomains for each pair is generated, which is named CPT and is shown in Table 19. Then, the conditional probabilities for each pair of subdomains from both sides from A to B and from B to A are compared, and the direction with the corresponding probability with a higher probability value is kept and the direction with the corresponding probability with a lower probability value is eliminated. For example, the conditional probability value of 0.8315 that is the conditional probability of subdomain3 given subdomain5 (P(subdomain3 |subdomain5) = 0.8315), was higher than the conditional probability of subdomain5, given that subdomain3 is already eliminated, and its value is replaced with 0.

Relation Direction Probability (RDP) in Example System Model
In this step, the RDP table is based on the filtered results in the CPT matrix. The RDP table shows the direction of the dependency between subdomains of each pair from the parent node to the child node and respective conditional probability values as a result for the example CO2 Sensor Fault is shown in Table 20.

FBBN Causal Relation Using the Relation Direction Probabilities
As mentioned in Section 3.9, the FBBN shows the causal relationships between each pair of subdomains extracted from the RDP table. Figure 16 is an example that shows that the subdomain of High_Daily_Temperature (Child Node) is related to the subdomain of Normal_Occupancy (Parent Node) with the conditional probability value of 0.8295.

Fault Diagnosis in System Model
This section shows the implementation result of the diagnosis method introduced in this paper for both fault diagnosis and the evaluation of the introduced method for the DCV and heating system model. As described generally in Section 3.10, the fault diagnosis phase is constructed from two offline and online modules. A sample RealCase fault object with a known RDP table, fault type, and fault type is considered in the evaluation phase. However, in the real and normal operation, only the RDP table is available and is generated, and the fault type and the fault time are the diagnosis result. Here in Figure 17, the overview of the evaluation of fault diagnosis method based on the causal relation in FBBN using the relation direction probabilities using a sample RealCase fault object using the fault injection with known RDP table, fault type, and fault type is shown compared to the Figure 10.

Offline Mode of the Fault Diagnosis in System Model
In the offline mode of fault diagnosis, a library of fault cases is created. The offline library includes ten types of faults stored in a vector called Fault_Injection_Type_Vector, and 17 time instances for the fault injection stored in a vector called Fault_Injec-tion_Time_Vector. Therefore, the offline library has 170 injected fault objects for all combinations of mentioned fault types and injection times that is shown in Table 21. For each injected fault_casei, the Type, Time, Data, and RDP values will then be stored in the i-th element of the Offline Library, where 1 < i < 170. The implemented offline library of the example system model is depicted below.  In the online mode of the diagnosis method, a random RealCase fault object with its specifications, that is, Type, Time, Value, is injected into the system, and the Percent-age_List and Evaluation_List are stored as an example scenario of the reality to test and monitor the response of the diagnosis method introduced in this paper. For this, a fault type from the Fault_Injection_Type_Vector with a random time of fault occurrence and its value is selected.  Table 22. In this RealCase object example, a stuck_at_off fault mode in the heater actuator at the fault injection time of 70,393 s is simulated. As mentioned in Section 3.10.2, the Percentage_List shows the percentage of similarity. Further, the generation of the Evaluation_List is the final step of fault diagnosis in this paper. The diagnosis method introduced in this paper can diagnose the fault with its type, value, and time of fault occurrence. For this, the Evaluation_List is created based on comparing the percentages of similarity in the Percentage_List of the RealCase Example with every fault case available in the offline library. The Percentage_List table is eliminated in this paper as it includes all the percentage of similarity values with every 170 fault objects available in the fault library. The diagnosis algorithm sorts the evaluation list by the values in the percentage column. Therefore, the elements with the higher percentages of similarity will be placed at the top ranks, and the lower percentages of similarity will be placed at the lower ranks. Finally, the comparison results of the type and the time values of the Evaluation_List with the type and the time of the RealCase object, which was initiated from the fault injection, can determine the belief of the fault diagnosis method in this paper based on the causal relation in FBBN using the relation direction probabilities. In the Evaluation_List table for the example test scenario that is shown in Table 23, the top 20 highest ranks of diagnosed fault cases have been considered for the fault diagnosis, and the first row of the table below is the diagnosis result with the highest rank, which has the same type and time of the injected fault as the RealCase example, which shows the highest belief or highest probability of the correct diagnosis result. It is also clear that the diagnosed time of fault occurrence is very close to the real value with an excellent estimation. A more exact result is possible with an enormous offline library with more example fault scenarios for more fault injection instances.

Evaluation and Results
This section discusses the evaluation and results of the diagnostic classifier introduced in this paper. This method is a classification which is a combination of data-drivenbased and knowledge driven-based methods. Performance metrics evaluate the effectiveness of a method and compare various classification models [42]. Statistical classification distinguishes various classes of a set of elements in a classification problem, for example, True Positive (TP), False Positive (FP), True Negative (TN), and False Negative (FN). In these terms, the word "positive" is the output of the diagnosis algorithm that is predicted and diagnosed. TP shows the number of positive elements classified accurately. TP indicates that the injected faults are also correctly predicted. FP is a false alarm and describes the number of actual negative elements that are classified as positive. FP shows the incorrect diagnosis of the system as a healthy mode when it is faulty. TN indicates the number of negative examples classified accurately (correct rejection). TN describes the truly healthy mode that is not also diagnosed. FN is defined as the missed class of faults or the number of positive elements classified as negatives. FN shows the faults in the system known from the fault injection, but the diagnostic classifier did not successfully diagnose them. Figure 18 shows an overview of the performance metrics. As mentioned earlier, this paper also studies the fault diagnosis as a classification problem, as it is introduced as a combined method. Therefore, the evaluation metrics for the classifiers are applied here, for example, precision, recall, F1, and accuracy, and a binary (or double-class-) confusion matrix is established as shown in Figure 19. Precision or Positive Predictive Value (PPV) indicates how many of the total diagnostic results are correct. The precision [44] is calculated as the fraction of the truly predicted elements to the total detected elements. The precision is measured by the equation below.

TP Precision TP FP
Recall or sensitivity or True Positive Rate (TPR) describes the fraction of correctly detected items among all the items that must be detected [44] and is the ability to find all relevant elements. The recall is measured by the equation below.
F-Measure or F-score combines precision and recall and is defined as the harmonic mean of precision and recall considering F1 as an F-Measure with evenly weighted recall and precision. The f-measure shows the accuracy of a system under test [44]. F1 is measured by the equation below: Accuracy is the proportion of correct predictions [45], as described below: During the evaluation phase, the total number of 110 fault cases has been considered calculated based on 22 fault injection values and five injection times. A specific fault was injected for every evaluation round, and in only one round was a healthy mode evaluated. These fault cases have been injected in five different instances of time {17,000, 34,000, 51,000, 68,000, 85,000}, And four fault types of {"CO2Sensor", "DamperActuator", "Tem-peratureSensor", "HeaterActuator"}with 22 fault values for these four fault types shown in the function below. The range of values for each signal is divided into three subdomains. Therefore, the value vectors are defined to ensure that sufficient fault samples from each subdomain are considered. The numbers of truly diagnosed faults considering the type and the time of faults in different cumulative ranks are depicted in Table 24. This table shows the number of correct diagnoses (TPs) categorized in different cumulative ranks for different fault types. The accuracy of the diagnostic classifier is shown in Table 25. This table and Figure  20 show that the cumulative accuracy increases from 90.76% to 97.28% when considering the top five ranks instead of only the first rank.  The recall is measured for the diagnostic classifier in this paper and the results are shown in Table 26 and Figure 21. The average recall of the diagnostic classifier shows the recall increases from 90.55% to 97.22% when considering the top five ranks instead of only the first rank.   In this paper, the TN is always one because each diagnosis procedure considers only a fault case and healthy mode, and the system can detect the healthy mode when there is no fault in the system. Further, FP is always zero as no healthy mode was predicted when a fault was injected into the system in the evaluation phase. Therefore, precision or PPV is always calculated with a value of one (100%). F1 is also measured for the diagnostic classifier in this paper, and the results are shown in Table 27 and Figure 22. The average F1 or F-score of the diagnostic classifier shows the F1 increases from 94.76% to 98.56% when considering the top five ranks instead of only the first rank.  The overview of the performance metrics shows the average indicators increase when considering the top five ranks instead of only the first rank. For example, the diagnosis result when considering the top five ranks is usually better than when considering only the top two. The summary of the captured data is shown in Table 28. This section also compares the evaluation results captured for the classifier based on the causal relation FBBNs using RDPs to implicit classification based on deep learning in another study of the authors [31]. Table 29 shows that the performance of classification is as good as implicit classification based on deep learning, knowing that classifiers are designed, implemented step-by-step, and they are one of the white-box approaches; however, the implicit approaches are mainly categorized as black-box approaches and need more computation capacities. The performance metrics of the AI-based method are also calculated for the stuck-at faults to make the parameters comparable with the classifier.
The precision and F-score values show the superiority of the presented diagnostic classifier over the implicit classifier with a value of 100% for the precision of the combined classifier and 96.70% for the overall precision of the implicit classifier and 98.60% for the precision of the implicit classifier for stuck-at or constant faults (more relevant prediction of combined classifier than the implicit classifier). The F-score of the combined classifier is 98.56% compared to 97.46% for the overall F-score of the implicit classifier and 98.55% for the F-score of the implicit classifier for stuck-at or constant faults. The accuracy of the combined classifier is measured at 97.28% compared to the overall accuracy of the implicit classifier (97.40%), which shows a reasonable accuracy. The recall values for the implicit classifier (98.20%) and 98.40%) are comparable to the recall value of the combined classifier (97.22%), describing that the implicit classifier diagnosed more items from the relevant items than the combined classifier.

Conclusions
The state-of-the-art provides data-driven and knowledge-driven diagnostic methods. Each category has its strengths and shortcomings. The knowledge-driven methods rely mainly on expert knowledge and resemble the diagnostic thinking of domain experts with a high capacity for the reasoning of uncertainties; they diagnose different fault severities and are more understandable. On the other hand, these methods involve higher and more time-consuming effort, they require a deep understanding of the causal relationships between faults and symptoms, and there is still a lack of automatic approaches to improve the efficiency. The data-driven methods rely on similarities and patterns and they are very sensitive to changes of patterns and have more accuracy than the other knowledge-driven based methods, but they require massive data for training, cannot inform about the reason behind the result, and they represent black boxes with low understandability. The research problem is thus the combination of knowledge-driven and data-driven diagnosis in DCV and heating systems in order to benefit from both categories. The diagnostic method presented in this paper involves less effort for experts and quicker approaches without requiring deep understanding of the causal relationships between faults and symptoms compared to existing knowledge-driven methods, while offering higher understandability than other data-driven approaches and higher accuracy than other knowledge-driven approaches resolved by a data-driven-based category. The fault diagnosis uses a data-driven classifier in combination with knowledge-driven inference with both fuzzy logic and a BBN.
In offline mode, for each fault class, an RDP table is computed and stored in a fault library. In online mode, we determine the similarities between the actual RDP and the offline precomputed RDPs. The combination of BBN and fuzzy logic in our introduced method analyzes the dependencies of the signals using MI theory. The method creates a unique RDP table for each class of faults and datasets. This method can also be extended to additional faults by adding RDPs of new fault classes to the offline library.
Several performance metrics are considered, such as accuracy, precision, recall, and F Score. The evaluation results show that this method can, overall, diagnose 97.22% of faults truly (TPs over the whole five cumulative ranks). This combined diagnostic classifier sorts the diagnosis results based on the probability values, for example, the top-most ranks are the most likely diagnosis result. The method indicates the average values of the performance metrics with a cumulative basis from only considering the diagnosis results from the first top rank increase to when the fault diagnosis classifier considers more top ranks, for example, when the accuracy increases from 90.76% for the first rank to 97.28% for five cumulative ranks, the recall increases from 90.55% to 97.22%, and the F-score increases from 94.76% to 98.57%.
Future work will extend the classifier to cover more types of faults, for example, offset, drift, or gain faults, or the evaluation of the classifier with the activation of multiple faults.