Modeling of HVAC Systems for Fault Diagnosis

Analytical model based fault diagnosis method is seldom adopted for heating, ventilating and air conditioning (HVAC) systems as it is rather difficult to establish and verify an explicit model for HVAC systems. On the other hand, a flexible graphically based software called TRNSYS has been widely accepted in the design and optimization of HVAC systems recently. It makes sense to use TRNSYS to establish and verify an analytical model for fault diagnosis of HVAC systems. In this paper, a TRNSYS model of a HVAC system in multi-zone buildings is firstly established on the basis of practical data. Then, a state-space model of HVAC system is given according to the thermal-mass balance and air flow balance equations, and the consistency between the TRNSYS model and the state-space model is demonstrated. Also, some typical faults in the HVAC system are considered and the consistency between the two models under the faulty cases is verified again. Further, the effects of the faults on energy consumption is analyzed. The results show that some faults such as pipe scaling can significantly increase energy consumption while having no obvious change in room temperature. Based on the established models, some promising and challenging research directions for fault diagnosis of HVAC systems are finally discussed.


I. INTRODUCTION
According to the International Energy Agency (IEA), the energy consumption of buildings in most countries currently accounts for about 40% of their total energy consumption [1], where 40%-50% is consumed by heating, ventilating and air conditioning (HVAC) systems [2]. Therefore, it is of great significance for global energy conservation and emission reduction to cut down the energy consumption of HVAC systems. The performance degradation of components during the long-term operation of HVAC systems generally lead to the occurrence of different kinds of faults, especially some soft faults such as stuck valve, pipe scaling, sensor drift, etc. They do not affect the comfort directly in the early stage because of the closed-loop control and cannot be found for quite a long time, which thus result in a great waste of energy. It is reported by the U.S. department of energy (DOE) that, due to system performance degradation, fault as well as inadequate maintenance, the U.S. commercial buildings waste about 15%-30% of the building energy consumption The associate editor coordinating the review of this manuscript and approving it for publication was Yu Wang . with an annual economic loss of about 20-40 billion dollars. If the faults can be detected and some remedies can be applied promptly, 5%-20% of total energy consumption of commercial buildings can be saved [3]. Further, if fault diagnosis technique is popularized in HVAC system, energy consumption can be saved up to 10%-40%. Therefore, the research on fault diagnosis of HVAC systems has been received consistent attentions by both industry and academia in the past few decades [4].
Fault diagnosis methods can be roughly divided into three categories: qualitative analysis, data-driven and analytical model, which have been more or less applied to HVAC systems [4]- [6]. By describing the characteristics and rules of systems through prior knowledge or expert experience, the qualitative analysis method detects the occurrence of faults and infers the causes of faults [5]- [6]. It is the most widely used method for fault diagnosis of HVAC systems in practice. In [7], some expert knowledge of fresh air temperature and pressure control for air handling unit (AHU) under 4 kinds of working conditions was described as 20 rules for fault diagnosis. Recently, in [8], some fuzzy logic expert systems were proposed to overcome the uncertainty of building systems. However, the qualitative method needs to make different rules for different buildings, which lacks of generality. In addition, for a large-scale building, the increase of rules leads to matching conflict, combination explosion and other problems, which generally result in a very poor fault diagnosis performance [4]. By analyzing and processing off-line historical data and on-line running data, the data-driven fault diagnosis method can extract some hidden fault features to diagnosis faults. It is the most popular research method for fault diagnosis of HVAC systems. Some typical methods such as autoregressive model, principal component analysis (PCA), BP neural network, support vector machine (SVM) have been studied successively [9]- [11]. However, the data-driven method requires a large amount of historical data, especially the data about faults, to achieve fault diagnosis and identification, which results in more research on data-driven based fault diagnosis but less application in the actual building system. By using the mathematical model of the system as well as the measurable inputs and outputs, a residual signal generated by the analytical model can reflect the inconsistency between the expected behavior and the practical running behavior of systems to diagnosis faults. If the established mathematical model is accurate, the analytical model method is superior to any other qualitative and quantitative counterparts [4]. In [12], based on the thermodynamics law, a reduced-order model of AHU was established, which was further transformed into some diagnostic rules. The experimental results show that the proposed method was more effective than the classical expert system method. In [13], by the use of the subspace identification method, a linear model of variable air volume (VAV) was established, which provided a better fault diagnosis results than the data-driven method in [9]. However, the analytical model method is the least one of the three methods used in fault diagnosis research of HVAC systems, and most existing analytical model works focus on the subsystems of HVAC such as AHU and VAV. The main reason lies in that HVAC systems are generally composed of mechanical and electrical systems including cold and heat source systems, air handling systems, terminal devices as well as multi-sensor monitoring systems, which are distributed in the different areas. Therefore, it is rather difficult to analyze and establish an explicit model for HVAC systems, which becomes the main bottleneck of the research and application of analytical model based fault diagnosis method in HVAC systems.
Further, the HVAC system is a typical interconnected system as different subsystems are related to each other. In this type of interconnected system, once a fault in some subsystem occurs, it may spread throughout the whole HVAC system. It is difficult to locate and isolate these kinds of hidden and transmissible faults by using the existing qualitative analysis and date-driven fault diagnosis methods. The analytical model method has the potential to deal with the difficulty as it explores the internal mechanism of HVAC systems, and therefore deservers further investigation [14], [15]. Although some analytical models were established for different HVAC subsystems in some literatures [16], [17], they were not integrated as a whole system. In addition, these works mainly focused on the issues of control and optimization of energy consumption. Recently, in [18], a distributed fault diagnosis method was developed to detect sensor fault based on a HVAC heating system model, which, however, didn't take some key factors such as air supply into consideration. More importantly, the above established models were not verified by practical data. In fact, the lack of effective method to verify the accuracy of established model of HVAC system is also a main reason for the least application of analytical model based fault diagnosis in HVAC systems.
On the other hand, a flexible graphically based software called TRNSYS (Transient System Simulation Program), owing to its powerful simulative function, has been widely accepted in the simulation analysis of energy consumption of building and HVAC system recently [19], [20]. It is developed and improved by the solar energy laboratory of the University of Wisconsin and some other research institutes in U.S. and Europe. TRNSYS provides various excellent and factual building energy simulators [21], and thus has been widely used for simulation of HVAC systems. A large number of works have demonstrated the accuracy of TRNSYS. For example, in [22], a TRNSYS model was established for a multi-zone building HVAC system in an energy station in lowa, USA, the accuracy of the TRNSYS model was verified by practical data. In [23], a public library HVAC model was established with TRNSYS, which was also consistent with practice data. The accuracy of TRNSYS may attribute to the fact that the modules provided by TRNSYS are developed by the authoritative departments such as the Thermal Energy Systems Specialists of the United States in a long time. Besides, the software adopts Component Object Method (COM) technology so that it can reproduce the HVAC system to a large extent [24]. In view of this, many existing TRNSYS modeling work carry out follow-up work directly without verification [25], [26]. In [25], TRNSYS was used to analyze the effects of an intelligent planning strategy on energy demand and cost of residential air conditioning system. Indeed, TRNSYS has been widely used in the design and optimization of HVAC systems [25], [27]- [29]. However, it can be noted from the literature that no work on TRN-SYS model of HVAC systems for fault diagnosis has been reported. In view of the reliability and accuracy of TRNSYS in modeling and simulation of HVAC systems, it makes sense that using TRNSYS to verify the mathematical model of HVAC system under different faulty cases can break through the bottleneck of the research and application of analytical model based fault diagnosis method in HVAC systems, which motivates this work.
This paper develops a TRNSYS model and a mathematical mechanism model for a HVAC system in a building in Shanghai. Specifically, this paper provides the following contributions: 1) A TRNSYS model for a multi-zone building HVAC system is established based on practical data in Shanghai such as weather data, wall structures data and double-layer insulating glass parameters etc.; 2) With the aid of the thermal-mass balance and air flow balance equations, a state-space model of the HVAC system is provided, and the consistency between the two models is verified; 3) Some typical faults occurred in actuators, sensors and plants are established, and the consistency of TRNSYS and state-space model of HVAC systems under the faulty cases is also verified; 4) The effects of serval faults on system energy consumption are analyzed, which show that some faults such as pipe performance degradation caused by scaling can significantly increase energy consumption while having no obvious change in room temperature.
The organization of the paper is as follows: Section 2 introduces how to use TRNSYS to build a multi-zone building HVAC systems model; Section 3 deduces and establishes the state-space model of HVAC systems and verifies its accuracy; Section 4 establishes some typical fault models of HVAC systems; Section 5 analyzes the effects of typical faults on energy consumption of HVAC systems; Section 6 gives the summary and prospect.

II. THE TRNSYS MODEL OF HVAC SYSTEMS A. MODEL OF A MULTI-ZONE BUILDING
In this section, a TRNSYS model of an office building in Shanghai is developed. For convenience, a representative office area with two rooms in the north and south respectively is selected as shown in Fig.1. Details about the building are provided in Appendix A. After setting the relevant parameters in the 'Building Project' in TRNSYS, a multi-zone building model shown in Fig. 2 is automatically generated, where the module 'Weather data' reads the weather data of Shanghai area. The module ''Psychrometrics'' calculates temperature and humidity data based on the outputs of the module 'weather data'. The module 'Sky temp' calculates effective air temperature. The module 'Building' calculates the effect of various external inputs on the building, and generates the temperature into the module 'Temperature'. The other modules control the lighting and shading equipment in the room.
After setting the room load and ventilation parameters, the hourly temperature change of indoor and outdoor without HVAC systems is obtained through the module ''temperature'', as shown in Fig. 3, where the green line represents the ambient air temperature in Shanghai, and the lines with other colors represent the temperatures of four rooms. It can be seen that the indoor temperature shows a clear regularity, with large peaks on working days and small peaks on off days, and five large peaks and two small peaks in one period. The indoor temperature is significantly higher than the outdoor temperature because the personnel and office equipment emit heat while the indoor is not completely ventilated. The hourly temperature is in accordance with the practical situation, which indicates the rationality of the building model.

B. TRNSYS MODEL OF HVAC SYSTEMS
A VAV air conditioning system is chosen to control the indoor environment of the above office area. The VAV air conditioning system consists of a cold and heat source system, serval AHUs and VAV boxes. Fig. 4 shows the structure diagram of AHU and VAV box. AHU is mainly composed of return fan, air valve, cooling coil, water valve, air supply fan and various sensors. VAV is mainly composed of air valve and VAV controller. The temperature control strategy of VAV based HVAC system is to adjust the room temperature by changing the water and air volume while keeping the outlet air temperature of cooling coil unchanged [13], [30]. Our work also adopts this widely-used temperature control strategy. Specifically, a PI controller is used in AHU to control the water flow through the cooling coil to stabilize the air outlet temperature of the cooling coil at 16 • C. PI controllers are also used in VAV boxes to control the air flow of each room to stabilize the room temperature at setting points. The operating temperatures (such as cooling coil inlet water temperature, cooling coil outlet water temperature, cooling coil outlet air temperature, etc.) are set based on industry standards and given in Appendix B.
Based on the above structure and control strategy, an enclosure model of one AHU, 4 VAV and 4 rooms is established in TRNSYS, as shown in Fig. 5. In the TRNSYS-HVAC library, there is no specialized ducting system module. Generally, the connection line acts as the ducting system, as shown in the red and blue lines in Fig. 5. The involved 12 modules are also summarized in Appendix B. Fig. 6 shows the indoor temperature from the beginning of May to the end of September, that is, from the 2920th hour to 6525th hour in the whole year. Fig. 7 shows the 24-hour temperature changes of the 4 rooms starting at 2930th hour.  It can be seen that the HVAC system can stabilize the temperatures of the 4 rooms at the setting value 25 • C. VOLUME 8, 2020 In addition, the temperature slightly increased at the 2936th hour because of the start of work at 8:00am. At the 2946th hour, the temperature dropped because of closing the office at 6:00pm. Fig. 6 and Fig. 7 are in accordance with the practical situation, which demonstrate the rationality and accuracy of the established TRNSYS model.

III. A STATE-SPACE MODEL OF HVAC SYSTEMS
In this section, based on the TRNSYS model of HVAC systems established in Section 2, the physical models of different subsystems are given based on the analysis of their mechanisms, and then are integrated into a state-space form. It can be seen from Figs. 4-5 that several subsystems affect room temperature, including cooling coils with water as the cooling source, valves, fans, air diverting and mixing system, and multi-zone building. Their mathematical models are given in succession as follows.

A. MATHEMATICAL MODEL OF COOLING COIL WITH WATER AS THE COOLING SOURCE
The module of the cooling coil with water as the cooling source in TRNSYS is Type508. After setting the inlet and outlet water temperature, the module controls the air temperature after the coil by controlling the water flow through the coil. Based on the thermal-mass balance equation [31], the air temperature after cooling can be expressed as: is the air outlet temperature of the cooling coil. f w (kg/h) the water flow of cooling coil. c w (J/kg • C) the specific heat capacity of water. T wi ( • C) the water inlet temperature of cooling coil. T wo ( • C) the water outlet temperature of cooling coil. f a (kg/h) the air flow of cooling coil. c a (J/kg • C) the specific heat capacity of air. T ai ( • C) the air inlet temperature of cooling coil. T O ( • C) the air outlet temperature of cooling coil. C E (J/ • C) the heat capacity of the cooling coil.

B. MATHEMATICAL MODEL OF AIR DIVERTING AND XIMING SYSTEM
The module of the air diverting system in TRNSYS is Type646. In this module, the air diverting system consists of air pipes and air valves, which distributes the cooled air into four rooms. For the air diverting system, according to the air flow balance equation, one can obtain: where f i (kg/h) denotes the air flow of room i(i∈A, B, C, D). The reference control signals output by these PI controllers are related to the set room temperature and the actual room temperature. If the air valve is fully open, it means that the reference control signal is 1. If the air valve is closed, it means that the reference control signal is 0. The total air flow through the cooling coil (f a ) and the maximum air flow of the fan (f am ) are such that: By substituting (3) into (2), it can be deduced that the maximum air flow of each room is f am /4. The relationship between the air flow and the maximum air flow of each room is described as: where f im (kg/h) is the maximum air flow of room i. u i the control signal of air valve in room i. The module of the air mixing system in TRNSYS is Type648, which can mix the air from each room and send it to the air recirculation system. When the air pressure in the room is stable, the mixed air flow is equal to the sum of the air flow of four rooms. The temperature of the mixed air can be obtained according to thermal-mass balance equation: where T r ( • C) denotes the mixed air temperature. T i ( • C) the room temperature in room i. The air recirculation system can be built in TRNSYS with the above mentioned type646 and type648, or with the calculator provided by TRNSYS. The function of the air recirculation system is to exhaust part of the air from the air mixing system to the outside and then to blow in some fresh air. According to the air flow balance, the return air flow after exhausting can be obtained as: where f r (kg/h) is the recirculating air flow after exhaust. Under the condition of constant pressure, the air flow after mixing the return air and fresh air, equals to the air flow before entering the cooling coil, and thus equals to the total air flow f a . Then the equation of fresh air flow is: where f N (kg/h) denote the fresh air flow. According to thermal-mass balance equation, the air temperature before entering the cooling coil can be described as: where T N ( • C) is the fresh air temperature. Substituting (2) -(7) into (8) yields: From (9), it can be seen that the air temperature before entering the cooling coil is related to the opening of each valve, the temperature of each room, the outdoor temperature and the air outlet temperature of cooling coil at the last moment.

C. MATHEMATICAL MODEL OF THE MULTI-ZONE BUILDING
The enclosure of the multi-zone building is established by TRNBuild which is read by the module type 508. Besides the heat exchange between HVAC and multi-zone building, many other factors such as personnel and equipment, heat transfer between rooms, outdoor temperature and sunlight should also be considered in the physical modeling of multi-zone building. For Rooms A and B located in the north side of the building, the heat generated by the sun light intensity can be ignored. According to thermal-mass balance equation [31]- [33], the temperature of Room A can be expressed as: where K w (W/m 2• C) denote the heat transfer coefficient of the wall.
For Rooms C and D located in the south of the building, the heat generated by the sunlight intensity shall be considered, and the room temperature can be expressed as:Ṫ Different from Rooms A and B, the solar light coefficient TSI is introduced in (12)- (13) to represent the solar light effect.

D. THE STATE-SPACE MODEL OF HVAC SYSTEM
Next, we integrate the above mathematical models. Substituting (8) into (1) yields: Define the state variable X = [T A T B T C T D T O ] T . By combining (10)-(14), the following state-space model is obtained.
where the measurement equation (16) indicates that each state variable is measured by the corresponding temperature sensor, the specific formula in (15) is shown in Appendix C. Equation (15) provides a mathematical description of the TRNSYS model established above. It can be seen from the appendix that A 51 -A 55 in the state transition matrix contains the control variable u, while B 1 -B 4 in control matrix contains the state variable X , which means that (15) is a nonlinear (bilinear) system, that is, the HVAC system is typical nonlinear system. Next, the accuracy of the state-space model (15)-(16) is verified by comparing the simulation results of MATLAB and TRNSYS. Because the simulation step of TRNSYS is 0.01 hours, that is 36 seconds, the simulation step in MATLAB is also set to 36 seconds. The weather and lighting parameters in July 17th in Shanghai are chosen. The temperatures of the 4 rooms provided by MATLAB are shown in Fig. 8, where the abscissa 4755 means the 4755th hour of the whole year. It can be seen that all  Remark 1: Only a single-floor, 4-zone HVAC system is studied in our work for the convenience of description and analysis. The work can be extended to some large-scale building since the single-floor, 4-zone HVAC system includes most of typical features of large buildings. For example, the connection of rooms with other rooms and atmospheric environment, the heat dissipation of personnel and equipment, and the solar light coefficient. When extending our modelling work to a multi-zone building, it is only necessary to change some parameters of walls and window as well as other parameters mentioned above according the original formula, and combine the formulas of each room together.
Remark 2: There are some limitations of the developed simulator. For example, chiller, as an important unit of HVAC system, was not fully investigated in both TRNSYS model and state space model. There are many kinds of chillers, and different chillers have different operation principles. Instead of modeling according to the specific chiller, we directly set the chilled water temperature at the given value. The TRNSYS and mechanism modelling of typical chillers deserve further investigation.

IV. MODELING OF TYPICAL FAULTS IN HVAC SYSTEMS
According to the location, the faults in HVAC systems can be classified into four types: actuator faults, equipment faults, sensor faults and controller faults, in which stuck actuator, pipe scaling and sensor faults are common and typical faults [34], [35].

A. STUCK ACTUATOR
In HVAC systems, actuators mainly refer to various air valves, water valves, fans and pumps. Stuck actuators are usually caused by foreign matters in the pipes or control system fault. No matter where the actuator is stuck during operation, the room temperature is greatly affected. The kind of fault is generally modelled as:   room significantly change the temperature of the corresponding room, while causing little impact on the other three rooms. Furthermore, the comparison between MATLAB and TRN-SYS on the temperature of Room C is depicted in Fig. 12.
It can be observed that the state-space model provides a close result to that of the TRNSYS. The room temperature is lower than 25 • C all day because the air valve stuck at 80% opening position leads to more cold air flow. The temperature in off hour is at about 20 • C and he temperature in working hour rises to nearly 24 • C, which is due to the generated heat and the higher outdoor temperature in working hours.

B. PIPE SCALING
In HVAC systems, due to the corrosion of water pipes and impurities from the waters, pipe scaling is one of the most common faults of HVAC systems. For the pipe and pump system with the pump working at rated speed, pipe scaling will increase the pipe resistance coefficient and thus lead to a decrease of the flow. The similar phenomenon occurs in the fan and duct system.
where(1 − V ) denotes the pipeline transportation efficiency with V denoting performance degradation. O the actual flow rate of the pipeline system. O max the design flow rate of the pipeline system. Consider such a fault occurs in the water pipe, then B 5 in the state-space model (15) is replaced by (18). In the TRNSYS simulation, the value of the cooling coil is multiplied by (1 − V ). Assume that the performance of water pipe is degraded by 10% caused by scaling (namely, V = 0.1), the comparison of the two models on the temperature of Room C is depicted in Fig.13. It can be seen that the outputs of the two models is almost identical and the effect of 10% performance degradation of water pipe on the temperature of Room C can be ignored. The other three rooms have similar results, which are not shown here due to space limitation. Further assume that a more serious pipe scaling leads 75% performance degradation of water pipe (namely, V = 0.75). It can be seen from Figs. 14-15 that a serious pipe scaling   affects the temperature of all four rooms. The temperature of rooms facing south is obviously different from the one of rooms facing north after 4765th hour. Fig. 16 depicts the temperature of Room C provided by MATLAB and TRNSYS. As can be observed, the two models have a similar temperature trend with slight difference. In the daytime, the temperature gradually increases to nearly 26 • C with the increase of outdoor temperature as the cooling capacity of cooling coil fails to keep up with the demand. In the night, the temperature drops below 25 • C and then returned to 25 • C in a period of time as the heat generated by system and the VOLUME 8, 2020 light intensity are decreased. The serious pipe scaling causes a serious performance degradation of cooling coils, which makes the outdoor weather temperature have a great impact on the air supply temperature. The slight difference comes from that the TRNSYS uses the practical weather data while the MATLAB uses a similar sinusoidal signals.
It can be concluded from Figs. 13-16 that whether the performance degradation of pipe affecting room temperature depends on the fault size. Taking the water pipe scaling as an example, if the pipe scaling degree is low, the pump increases the operating power to ensure sufficient water supply. If the pipe scaling degree is high, it has a significant impact on room temperature even the pump works at maximum power. The same is true for other faults causing pipe performance degradation.

C. SENSOR FAULTS
Sensor faults mainly refers to the bias, drift, precision degradation, and complete failure, which are usually caused by the long time use, extreme environment and other reasons. The sensor bias fault leads to a fixed bias between the measured value and the actual value. This fault can be described as: where Y out is the measured value of the sensor. X in the real value. P a fixed bias when the sensor has a bias fault. If such a fault occurs in Room C, in the MATLAB simulation, X in in (19) is replaced by the right of the equation in the line where y c is in (16), and Y out in (19) is replaced by y c in (16). In the TRNSYS simulation, the temperature output of Room C is increased by P. Assuming that the measured value of the sensor is 1 • C higher than the real value (namely, P = 1). As can be seen in Fig. 17-18, the fixed bias fault of a single room temperature sensor affects the corresponding room temperature, while the effect on the other three rooms can be ignored. Further, the temperature of Room C from MATLAB and TRNSYS is compared. The initial value setting of the room in MATLAB is the same as that in TRNSYS. As can be seen in Fig. 19, the temperature of the   room is reduced by 1 • C relative to the normal situation after the occurrence of the fault.
Further, assuming that a bias fault occurs in the cooling coil temperature sensor with P = 2. The comparison between MATLAB and TRNSYS on the temperature of Room C is shown in Fig. 20. As can be observed, the fault also has no effect on room temperature although the air temperature of the cooling coil reduced by 2 • C. This is because the air valve can compensate the temperature rise by reducing opening. The other three rooms have a similar result. which are not shown here due to space limitation. It can be concluded that, no matter how small the bias fault of room temperature is, it always affects the corresponding room temperature. However, whether the temperature sensor bias fault of the cooling coil affecting the room temperature depends on the fault size. Fig. 20 depicts the room temperature under the case of a small temperature sensor bias of the cooling coil. As can be observed, the room temperature remains at 25 • C.
The sensor drift fault causes a gradually increasing bias between the measured value and the real value. The fault can be described as: where Q denote the rate of difference. This fault will not affect the room temperature at the beginning, but its effect will gradually increase over time. After a period of time, the effect is similar to the sensor bias fault, which is not shown here for analysis. The precision degradation of sensor is represented in an increase of the standard error of sensor measurement. This kind of fault can be described as: where N is a zero mean normal distribution. The fault generally leads to a dynamic change of room temperate while the average value of room temperature remains normal. The complete failure of sensor causes sensor measurement remaining at a fixed value no matter how the real value changes. The fault can be described as: where S denote the fixed value when the sensor fails completely. If this kind of fault occurs in a room with a fixed value S smaller than the setting one, the VAV system in the corresponding room will be shut down. If S is larger than the setting value, the open position of the air valve keeps stable, and the effect on the room temperature is basically the same as Figs. 10-12.

V. ANALYSIS OF THE EFFECTS OF FAULTS ON ENERGY CONSUMPTION A. ENERGY CONSUMPTION OF FANS AND PUMPS
Fan and water pump are the main energy consumption equipment of HVAC systems. In order to analyze the effects of faults on energy consumption, the power of fan is firstly given as follows [36], [37]: where P f (W) is the power of the fan. Q f (m 3 /h) the air flow provided by the fan. P a (Pa) the total pressure of the fan. η f the total pressure efficiency of the fan. η m the transmission efficiency of the fan. Without considering the static pressure of the fan, the total pressure of the fan is equal to the dynamic pressure of the fan. According to the formula of dynamic pressure, the total pressure can be described as follows [37]: where ρ a (kg/m 2 ) denotes the air density. v f (m/s) the wind speed. Substituting (23) into (24) yields: where S f (m 2 ) is the swept area of fan blades. The power of pump can be obtained as [36], [38]: where P w (W) is the power of water pump. ρ w (kg/m 3 ) the water density. g(m/s 2 ) the gravitational acceleration. Q w (m 3 /s) the water flow. H (m) the lift of water pump. η w the efficiency of water pump. η n the power conversion coefficient of water pump. The water lift of pump can be obtained as: where p 1 (Pa) denote the liquid pressure at the pump inlet. p 2 (Pa) the liquid pressure at the pump outlet. v 1 (m/s) the water flow at the pump inlet. v 2 (m/s) the water flow at the pump outlet. z 1 (m) the horizontal height of the pipe inlet. z 2 (m) the horizontal height of the pipe outlet. Substituting (27) into (26) yields: ], (28) where S w (m 2 ) is the swept area of pump motor blades.

B. THE EFFECTS OF FAULTS ON ENERGY CONSUMPTION
Generally speaking, the faults that have a significant impact on room temperature are easy to be found, while the faults that have no significant impact on room temperature are easy to be ignored. Given this, the effects of faults on energy consumption are analyzed in this section from the perspective VOLUME 8, 2020 of whether they have significant impacts on room temperature. The energy consumptions of fan and water pump are calculated according to (25) and (28) and some modules of TRNSYS.  We first consider the faults which has obvious effects on room temperature. To this end, choose the faults of air valve stuck with R = 0.8 in Section 4.1 and pipe scaling with V = 0.75 in Section 4.2. Figs. 21-22 depict the energy consumptions of fan and water pump respectively. By calculation, the air valve stuck leads to 1.21 times of fan energy consumption and 2.25 times of pump energy consumption when compared with the fault free case. The pipe scaling with V = 0.75 leads to 2.58 times of fan energy consumption and 12.43 times of pump energy consumption when compared with the fault free case. As can be observed, the pipe scaling has a huge effect on energy consumption of fan and pump, while the air valve stuck has a relatively small effect. The reason lies in that the pipe scaling with V = 0.75 affects the whole system while the air value stuck in one room only affects the air and water supply systems of the corresponding room. The reason for the increase of energy consumption of the water pump with air valve fault is that the air flow provided by the fan is increased. In order to ensure that the air temperature of the cooling coil remains unchanged, the water flow is also required to increase. The reason for the increase of fan energy consumption caused by water pipe fault is that the water pump is always in full open state and cannot reduce the air through the cooling coil to the set temperature. The air flow is increased by making the air valve at a larger open positon to compensate the decrease of cooling load.
Next, we consider the faults that has little effect on room temperature. Remember that the pipe scaling which causes limited performance degradation and some temperature sensor bias fault don't change the room temperature. Therefore, we choose the following four faulty cases: Case I. The water pipe scaling with V = 0.1; Case II. The water pipe scaling with V = 0.67; Case III. Both water pipe scaling and air pipe scaling with V = 0.1; Case IV. Cooling coil temperature sensor bias with P = 2.
A comparison of the temperature of Room C among the fault free case and the above four faulty cases is shown in Fig. 23 (For the results of Case IV, please see Fig. 20). It can be seen that the room temperatures in the four faulty cases are almost the same, where they all remain at a given 25 • C.   As can be observed, the water pipe scaling with V = 0.1 doesn't increase the fan energy consumption while the water pipe scaling with V = 0.67 leads an obvious increase of the fan energy consumption. The reason lies in that the performance of the water pipe in case II is greatly degraded and the air outlet temperature cannot reach to the set value even the water pump operates at full load, which further make the fan to increases the air flow to meet the cooling load required by the room. Fig. 24 also shows that both water pipe scaling and air pipe scaling with V = 0.1 causes the energy consumption of the fan to increase all day.
By calculation, water pipe scaling with V = 0.67 causes the energy consumption of the fan to be 1.15 times when compared with fault-free case. Both water pipe scaling and air pipe scaling with V = 0.1 causes the energy consumption of the fan to be 1.01 times when compared with fault-free case. Cooling coil temperature sensor bias with P = 2 unexpectedly leads to a decrease in energy consumption of fan, which is caused by a decrease in the cooling coil outlet temperature.
It can be seen in Fig. 25 that four kinds of faults increase the energy consumption of water pump. Water pipe scaling with V = 0.67 causes the pump energy consumption to be stable during working hours because the pump is running at full load. Cooling coil temperature sensor bias with P = 2 also increases the energy consumption of the water pump, as the fault makes the outlet air temperature of the cooling cool lower than the set temperature by increasing the water flow.
By calculation, the water pipe scaling with V = 0.1 causes the energy consumption of water pump to be 1.40 times when compared with fault-free case. The serious water pipe scaling with V = 0.67 causes the energy consumption of water pump to be 10.58 times when compared with fault-free case. Both water pipe scaling and air pipe scaling with V = 0.1 causes the energy consumption of water pump to be 1.97 times. Cooling coil temperature sensor bias with P = 2 causes the energy consumption of water pump to be 2.79 times.
It can be concluded that the faults which do not affect the room temperature generally result in a great waste of energy consumption. As they are often ignored, some more intelligent fault diagnosis and fault tolerant controls deserve further investigation.

VI. CONCLUSION
A state-space model of HVAC systems is established in this paper based on thermal-mass balance and air flow balance equations. In order to verify the accuracy of the model, a multi-zone building HVAC model is built by TRNSYS based on the practical data. Furthermore, several kinds of typical faults in HVAC systems are investigated and the consistency between TRNSYS and state-space model under the faulty cases are also verified. By analyzing and verifying the effects of several typical faults on the energy consumption of the system, it is shown that moderate pipe scaling and several kinds of sensor faults may have no obvious effect on the room temperature, but significantly increase the energy consumption.
The paper provides a foundation for the ongoing and upcoming research on fault diagnosis of HVAC systems including but not limited to the following:

1) TINY FAULT DETECTION AND LOCATION OF HVAC SYSTEMS
As shown by the simulation results, there are many tiny faults that do not change the room temperature. This kind of hidden faults are the main causes of the waste of building energy consumption, so it is of great practical demand to detect and locate such faults in time. Furthermore, fault propagation and the nonlinearity of HVAC systems add difficulties in diagnosis this kind of faults. The model-based fault diagnosis technique is the most promising approach to tackle this problem as the operation mechanism of HVAC system can be explored to get more fault features.

2) DISTRIBUTED AND SCALABLE FAULT DIAGNOSIS
Different subsystems of HVAC, such as cold and heat sources, AHU and terminals are distributed in different areas of the building, which puts forward a high demand for communication and computing resources for the conventional centralized monitoring approach, especially for commercial and public tall buildings. Therefore, there is an urgent requirement for distributed fault diagnosis techniques. Further, it is notable that only four rooms are considered in this paper. Actually, in a large-scale building, it seems impossible to use the centralized model-based fault diagnosis for monitoring the entire building system even a global model can be estabilshed. Exploiting the distributed topology of the building system, every fault diagnosis agent can be designed to monitor a single building zone and to execute the fault isolation process locally, while taking into account faults that affect part of the building system [39]. Therefore, the distributed fault diagnosis method should be scalable in the case that the building topology evolves, similar to a plug-and-play approach [40].

3) COOPERATIVE FAULT-TOLERANT CONTROL WITH ENERGY CONSUMPTION CONSTRAINT
Researchers found that even when the building operators were given clear guidance on the fault and the impact associated with it, it was difficult to get their attention to respond to that fault. There are many reasons for that, including lack of incentives to make building operations more efficient, a culture that only tries to address problems or react to ''fires'' when an occupant makes a complaint and the whole issue of split incentives (owners who are not occupants of the building) [4]. In this way, a large number of soft faults are ignored and a large amount of energy consumption is wasted. In view of the difficulty of human nature change and the demand of building energy saving, it is significant to automatically cooperate each subsystem of HVAC to restore performance and maintain the normal energy consumption level once the fault is detected, that is to say, the study of cooperative fault tolerant control of HVAC systems with energy consumption constraint makes a great deal of sense.

APPENDIX A
Details about the building are summarized in Tab 1.

APPENDIX B
The involved 12 modules are summarized in Tab 2.

APPENDIX C
The specific formula in (15) is as follows:  A 43 = [K w ·S wwD + K o ·S woD ]/C D , A 44 = [−K w (S swD + S ewD + S nwD + S wwD ) − K o (S soD + S eoD + S noD + S woD )]/C D , A 51 = f a ·c a ·η r ·u A /[(η r + η mo )(u A + u B + u C + u D )C E ], A 52 = f a ·c a ·η r ·u B /[(η r + η mo )(u A + u B + u C + u D )C E ], A 53 = f a ·c a ·η r ·u C /[(η r + η mo )(u A + u B + u C + u D )C E ], A 54 = f a ·c a ·η r ·u D /[(η r + η mo )(u A + u B + u C + u D )C E ],  ZE YAN received the B.Eng. degree in electrical engineering and automation from the Jincheng College, Nanjing University of Aeronautics and Astronautics, Nanjing, China, in 2018. He is currently pursuing the M.S. degree in control theory and control engineering with Nantong University. His research interests include model based fault diagnosis and fault tolerant control for HVAC systems.
QIANGWEI DENG received the B.Eng. degree in electrical engineering and automation from thee Jincheng College, Nanjing University of Aeronautics and Astronautics, Nanjing, China, in 2017. She is currently pursuing the M.S. degree in control theory and control engineering with Nantong University. Her research interests include fault diagnosis and fault tolerant control for distributed interconnected systems.
JIANLAN LIU received the M.S. degree in communication and information system from the College of Communication and Information Technology, Nanjing University of Posts and Telecommunications, Nanjing, China, in 2006. She is currently a Lecturer with the School of Electronic Information Engineering, Nantong Vocational University. Her research interest includes information processing for smart building.
LIANGLIANG SHANG received the Ph.D. degree in control theory and control engineering from Northeastern University, Shenyang, China, in 2016. He is currently a Lecturer with the School of Electrical Engineering, Nantong University. His research interests include complex industrial process modeling, fault detection, and diagnosis.
JINGSONG WU received the B.Eng. degree in building electricity and intelligence from Nantong University, Nanjing, China, in 2020, where he is currently pursuing the M.S. degree in control theory and control engineering. His research interests include fault detection and diagnosis.