Tobias Gybel Hovgaard
Active Sensor Configuration Validation in Refrigeration Systems
Master’s Thesis, October 2009
Summary
This master’s thesis presents an approach to validation of the sensor configuration in control systems. Major faults in the commissioning phase of refrigeration systems are caused by defects related to sensors. With a number of similar sensors that differ only by spatial location and their use in the control system, fault-finding is not trivial and it often results in expensive delays. Validation and handling of faults in the sensor configuration are therefore essential to cut costs during commissioning. With passive faultdiagnosis methods falling short on this problem, this thesis describes an active diagnosis procedure to isolate sensor faults at the commissioning stage, before normal operation has started. Using statistical methods, residuals are evaluated versus multiple hypothesis models in a minimization process to uniquely identify the sensor configuration. The method as such is generic and is shown in the sequel to work convincingly on refrigeration systems with both nonlinear behaviors and significant mutual differences. The thesis includes sections concerning the target system with respect to building a dynamical model and analysis (both general and structural) of system properties and of the types of faults to be dealt with. Furthermore a complete solution strategy is presented in which a test signal is applied to one of the system inputs and to different system models resulting in residual signals for each of the faulty cases to be diagnosed. It is discussed how the dependency on accurate system models can be minimized by appropriate filtering of the residuals and a statistical detection method is applied, identifying the model best describing the system. Furthermore it is demonstrated how only very limited information of the system need to be contained in the models for the solution to be reliable. Thorough explanation of the utilized theory is given along with references to previous works in the area.
Using both simulations and real data from commercial refrigeration systems validation of the method is offered. In the simulations it is illustrated how the proposed solution works as intended in the ideal cases with completely known system models and also how it is able to handle rather severe noise and model uncertainties when up to 25% variations are added randomly to both parameters and input of the model. Data collected in the refrigeration lab at Danfoss A/S reveals that parameter variations from one refrigeration system to another, depending on construction and dimensions, might exceed the amount of uncertainty that was successfully tested in the simulation environment. Hence, it is concluded that the solution is generic in the sense that it can be tuned to a certain class of systems for which it is very robust. With respect to measurement noise or low frequent disturbances e.g. the day/night or season changes the method is also proved to be very robust. In addition the work has resulted in a conference paper of the same title which has been submitted to the American Control Conference 2010.
Dansk Resum´ e
Dette kandidatspeciale præsenterer en tilgang til validering af sensorskonfigurationen i reguleringssystemer. Alvorlige fejl under idriftsættelse af industrielle systemer skyldes hovedsageligt forkerte sensorkonfigurationer og medfører forsinkelser samt øgede omkostninger under ibrugtagningen. Metoden der præsenteres her, er en aktiv diagnoseprocedure, der p˚ atrykker et test signal til inputtet af et system, som endnu ikke er i normal drift. De dannede residualer bliver evaluerede i forhold til forskellige fejlmodeller ved hjælp af statistiske metoder, og ved en minimeringsproces identificeres systemets sensorkonfiguration unikt. Løsningen er designet til kommercielle kølesystemer, der b˚ ade kan være særdeles ulineære og indeholde store parametervariationer, men metoden er som s˚ adan generisk. Denne rapport inkluderer afsnit vedrørende det anvendte kølesystem med hensyn til opbygning af en dynamisk model og analyser af systemets egenskaber samt af de fejl, der skal kunne h˚ andteres. Desuden bliver en komplet løsningsmodel præsenteret best˚ aende af et testsignal, der p˚ atrykkes til systemet og til forskellige systemmodeller samtidigt, s˚ a der dannes residualsignaler for hver enkelt fejlsituation, der ønskes detekteret. Det bliver diskuteret, hvordan afhængigheden af præcise systemmodeller kan minimeres ved en smart filtrering af residualsignalerne, og en statistisk detekteringsmetode anvendes til endeligt at afgøre, hvilken fejlmodel der bedst beskriver systemet. Ydermere bliver det demonstreret, hvordan systemmodellerne kun behøver at indeholde meget begrænset information om det virkelige system, for at metoden er p˚ alidelig. Udførlige beskrivelser af de anvendte teorier samt referencer til tidligere arbejder indenfor omr˚ adet er givet i rapporten. Metoden er valideret ved hjælp af b˚ ade simuleringer og virkelige data fra kommercielle kølesystemer. Gennem simuleringerne er det illustreret, hvor-
dan den foresl˚ aede løsning virker som ønsket i det ideelle tilfælde med perfekte systemmodeller, men ogs˚ a hvordan den kan h˚ andtere relativt store modelusikkerheder, n˚ ar modellens parametre og input tilføjes tilfældige variationer p˚ a op til 25%. Data der blev indsamlet i kølelaboratorierne ved Danfoss A/S afslører at parametervariationer, der skyldes forskellige konstruktioner og dimensioner fra et kølesystem til at andet, kan overstige den mængde usikkerhed, som er testet med succes i simuleringsmiljøet. Derfor bliver det konkluderet, at løsningen er generisk i den betydning, at den kan tilpasses til en klasse af systemer, for hvilken den s˚ a er meget robust. Ogs˚ a med hensyn til m˚ alestøj eller lavfrekvente forstyrrelser som fx dag/nat- eller sæsonskift er det vist, at metoden er særdeles robust. Arbejdet har desuden resulteret i en konferenceartikel med samme titel som er blevet indsendt til American Control Conference 2010.
Contents
List of Figures
x
Nomenclature
xiii
1 Introduction
1
1.1
Problem Definition . . . . . . . . . . . . . . . . . . . . . . . .
3
1.2
Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
2 Refrigeration System Modeling
9
2.1
The Vapour-compression Cycle in Refrigeration . . . . . . . .
10
2.2
Dynamical Model of a Commercial Display Case . . . . . . .
12
2.2.1
17
Modeling the Display Case in Dymola . . . . . . . . .
3 System Analysis
21
3.1
Analysis of System Structure . . . . . . . . . . . . . . . . . .
21
3.2
Structural Analysis . . . . . . . . . . . . . . . . . . . . . . . .
23
3.2.1
Constraints for Display Case Without Goods, Fan ON
24
3.2.2
Constraints for Display Case Without Goods, Fan OFF 25
3.2.3
Hybrid Structural Analysis . . . . . . . . . . . . . . .
29
3.2.4
Extended Structural Analysis . . . . . . . . . . . . . .
29
Failure Modes . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
3.3
3.3.1
Nominal Situation . . . . . . . . . . . . . . . . . . . .
33
3.3.2
One Sensor is Faulty . . . . . . . . . . . . . . . . . . .
33
3.3.3
Permutations of the Physical Connections . . . . . . .
34
3.3.4
Summary of Faulty Sensor Configurations . . . . . . .
36
4 Theory
37
4.1
Fault Detection and Isolation . . . . . . . . . . . . . . . . . .
37
4.2
Active Fault Diagnosis . . . . . . . . . . . . . . . . . . . . . .
39
4.2.1
Youla-Kucera Parameterization . . . . . . . . . . . . .
41
4.2.2
Dual Youla-Kucera for Permutations . . . . . . . . . .
44
4.2.3
Stable Systems and Open-loop . . . . . . . . . . . . .
44
4.2.4
Multi-model Identification . . . . . . . . . . . . . . . .
45
4.2.5
Reduced Model Information . . . . . . . . . . . . . . .
46
4.3
Example: Youla-Kucera Parameterization . . . . . . . . . . .
48
4.4
Statistical Change Detection
. . . . . . . . . . . . . . . . . .
57
Detecting a Sinusoid . . . . . . . . . . . . . . . . . . .
57
Example: Periodogram Detector . . . . . . . . . . . . . . . .
60
4.4.1 4.5
5 Solution Strategy
65
5.1
Solution to SCV . . . . . . . . . . . . . . . . . . . . . . . . .
65
5.2
Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
68
5.2.1
Fault Models . . . . . . . . . . . . . . . . . . . . . . .
68
5.2.2
Input-output Models . . . . . . . . . . . . . . . . . . .
69
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
70
5.3
6 Tests and Robustness Issues 6.1
6.2
71
Robustness to Uncertain Models . . . . . . . . . . . . . . . .
71
6.1.1
Model Uncertainties . . . . . . . . . . . . . . . . . . .
72
6.1.2
SVD for Minimizing Error . . . . . . . . . . . . . . . .
74
6.1.3
SVD on Refrigeration System . . . . . . . . . . . . . .
76
Example: Minimizing Model Uncertainties . . . . . . . . . . .
77
6.3
Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . .
82
6.4
Refrigeration Laboratory Tests . . . . . . . . . . . . . . . . .
86
6.5
Summary of Test Results . . . . . . . . . . . . . . . . . . . .
91
7 Conclusions 7.1
Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . .
93 94
References
95
Appendix
100
A Display Case in Dymola
101
B Incidence Matrices for Structural Analyses
107
C Active Structural Isolation Analysis - Source Code
111
D The Dual Youla-Kucera Parameter.
115
List of Figures
1.1
Schematics of a controller unit connected to sensors and inlet valve in a display case . . . . . . . . . . . . . . . . . . . . . .
4
2.1
The basic layout of a refrigeration system. . . . . . . . . . . .
10
2.2
ℎ - log(𝑝)-diagram for the vapour-compression cycle. . . . . .
11
2.3
Schematic of simplified evaporator cross-section. . . . . . . .
11
2.4
The refrigerated display case shown with indication of temperatures and heat transfers. . . . . . . . . . . . . . . . . . .
13
2.5
Temperature profile of refrigerant liquid front in evaporator .
16
2.6
Setup for simulation of display case in Dymola . . . . . . . .
18
2.7
Simulation results for refrigeration system using hysteresis controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
2.8
Simulation results for refrigeration system during warm startup 19
3.1
Bi-partite graph from structural analysis of display case without goods and with the fan turned on. . . . . . . . . . . . . .
26
Summary of the complete d/i properties of the investigated system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
Bi-partite graph from structural analysis of display case without goods and with the fan turned off. . . . . . . . . . . . . .
28
Summary of the complete d/i properties of the investigated system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
Extended Structural Analysis. . . . . . . . . . . . . . . . . . .
32
3.2 3.3 3.4 3.5
4.1
An implementation of a system with feedback controller with the Youla-Kucera parameterization . . . . . . . . . . . . . . .
42
4.2
Alternative setup for AFD. . . . . . . . . . . . . . . . . . . .
44
4.3
The multi-model AFD setup. 𝑖 is the model number with 𝑖 = 0 as the nominal model. . . . . . . . . . . . . . . . . . . .
45
Example system with Youla-Kucera parameterization implemented in Simulink. . . . . . . . . . . . . . . . . . . . . . . .
49
4.5
Simulating the setup from figure 4.4. . . . . . . . . . . . . . .
51
4.6
The setup in Simulink for using the theory from Youla-Kucera parameterization without calculating the coprime matrices. .
52
Simulating the setup from figure 4.6. Test for correct sensor configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . .
54
Simulating the setup from figure 4.6. Test for sensors 1 and 2 swapped. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
55
Magnitude plot of dual Youla-Kucera parameters . . . . . . .
56
4.10 Magnitude plot of noise-to-residual. . . . . . . . . . . . . . . .
56
4.11 Histograms of residual amplitude. . . . . . . . . . . . . . . . .
58
4.12 Setup for periodogram detector example. . . . . . . . . . . . .
61
4.13 Simulating the setup from figure 4.12. . . . . . . . . . . . . .
63
4.14 Simulating the setup from figure 4.12. The output corresponding to the frequency of the test signal is selected. . . . .
64
5.1
Block diagram sketching the entire solution as proposed here.
66
6.1
Setup for residual filtering example. . . . . . . . . . . . . . .
78
6.2
Simulating the setup from figure 6.1. . . . . . . . . . . . . . .
79
6.3
Simulating the setup from figure 6.1. . . . . . . . . . . . . . .
81
6.4
Simulation results without uncertainty. . . . . . . . . . . . . .
84
6.5
Simulation results with parameter and input uncertainty. . .
85
6.6
Refrigeration lab test with decent model fit. . . . . . . . . . .
87
6.7
Refrigeration lab test with poor model fit. . . . . . . . . . . .
88
6.8
Refrigeration lab test with no model fit. . . . . . . . . . . . .
90
6.9
Time-to-detect. . . . . . . . . . . . . . . . . . . . . . . . . . .
91
4.4
4.7 4.8 4.9
B.1 Incidence matrix from the structural analysis performed in section 3.2.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 B.2 Incidence matrix from the structural analysis performed in section 3.2.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Nomenclature
Symbols Symbols and Notations for Fault Diagnosis Δ
Fault or uncertainty description
𝜖
Residual signals
𝜂
Auxiliary test signal
{𝐴, 𝐵, 𝐶, 𝐷} Standard state-space description 𝐴𝐹 𝐷 Active Fault Diagnosis 𝐶𝑝𝑒𝑟𝑚 C-matrix with permuted sensor connections 𝐹𝐷
Fault Diagnosis
𝐹 𝐷𝐼
Fault Detection and Isolation
𝐹 𝐹 𝑇 Fast Fourier Transform 𝐹 𝑇 𝐶 Fault Tolerant Control 𝐻0
The hypothesis for a fault-free system
𝐻1
The hypothesis for a faulty system
𝑄(𝑠)
Youla-Kucera parameter
𝑆(Δ) Dual Youla-Kucera parameter 𝑊
Weight matrix
Symbols and parameters in refrigeration system models .𝑐
Subscript denotes “condenser”
.𝑒
Subscript denotes “evaporator”
.𝑖
Subscript denotes “inlet”
.𝑜
Subscript denotes “outlet”
𝛼
Valve characteristics
𝑚 ˙𝑚
Air flow from fan
𝛾
Mean void fraction
𝜌𝑙𝑖𝑞𝑢𝑖𝑑 Density of liquefied refrigerant 𝜏𝑓 𝑖𝑙𝑙
Filling time of evaporator when 𝑂𝐷 = 1
𝐶𝑝𝑥
Heat capacity of media “x”
𝐺
Denotes “Gas”
𝐿
Denotes “Liquid”
𝑚3 /𝑠
𝑘𝑔/𝑚3 𝑠 𝐽 ⋅ 𝐾 −1 𝑘𝑔 −1
𝐿𝑒𝑣𝑎𝑝 Length of the evaporator 𝐿𝑡𝑤𝑜−𝑝ℎ𝑎𝑠𝑒 Length of the evaporator two phase section 𝑀𝑥
Mass of media “x”
𝑂𝐷
Valve opening degree
𝑃𝑒
Refrigerant evaporation pressure
𝑘𝑔
bar
𝑇𝑎𝑖𝑟,𝑖𝑛 Temperature of air into evaporator
∘𝐶
𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 Temperature of air out of evaporator
∘𝐶
𝑇𝑎𝑖𝑟
Temperature of air in display case
∘𝐶
𝑇𝑎𝑚𝑏
Temperature of surroundings
∘𝐶
𝑇𝑒
Refrigerant evaporation temperature
∘𝐶
𝑇𝑔𝑜𝑜𝑑𝑠 Temperature of goods in display case
∘𝐶
𝑇𝑠𝑎𝑡
Saturation temperature of refrigerant
∘𝐶
𝑇𝑆𝐻
Superheat
𝐾
xvii 𝑇𝑤𝑎𝑙𝑙
∘𝐶
Temperature of evaporator wall
𝑉𝑒𝑣𝑎𝑝 Volume of evaporator
𝑚3
𝑉𝑔𝑎𝑠,𝑡𝑤𝑜−𝑝ℎ𝑎𝑠𝑒 Volume of gas in evaporator two phase section
𝑚3
𝑉𝑙𝑖𝑞𝑢𝑖𝑑 Volume of liquefied refrigerant
𝑚3
𝑉𝑡𝑤𝑜−𝑝ℎ𝑎𝑠𝑒 Volume of evaporator two phase section
𝑚3
𝑄˙ 𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 Heat flux from air to evaporator wall in display case
𝐽𝑠−1
𝑄˙ 𝑎𝑖𝑟𝑙𝑜𝑎𝑑 Heat load from surrounding on display case
𝐽𝑠−1
𝑄˙ 𝑑𝑒𝑓 𝑟𝑜𝑠𝑡 Heat flux from defroster to evap. wall
𝐽𝑠−1
𝑄˙ 𝑒
𝐽𝑠−1
Heat flux in the evaporator (cooling capacity)
𝑄˙ 𝑔𝑜𝑜𝑑𝑠−𝑎𝑖𝑟 Heat flux from goods to air in display case
𝐽𝑠−1
ℎ𝑙𝑔
𝐽/𝑘𝑔
Specific evaporation energy of refrigerant
𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 Mass of liquefied refrigerant in completely filled evaporator 𝑀𝑟𝑒𝑓
Mass of liquefied refrigerant in the evaporator
𝑈 𝐴𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 Overall heat transfer coefficient, air to evap. wall
𝐽𝑠−1 𝐾 −1
𝑈 𝐴𝑎𝑚𝑏−𝑎𝑖𝑟 Overall heat transfer coefficient, surroundings to air 𝐽𝑠−1 𝐾 −1 𝑈 𝐴𝑔𝑜𝑜𝑑𝑠−𝑎𝑖𝑟 Overall heat transfer coefficient, goods to air
𝐽𝑠−1 𝐾 −1
𝑈 𝐴𝑤𝑎𝑙𝑙−𝑟𝑒𝑓 Overall heat transfer coefficient, evap. wall to refrig. 𝐽𝑠−1 𝐾 −1
xviii
Chapter
1 Introduction
In modern industrial refrigeration systems a large number of sensors measuring temperatures and pressures at strategical locations in the system feed the controllers with data. In short, the purpose of the controllers, which can be operating both as central or decentralized with respect to the individual subsystems, is to keep the temperature in the load area close to a specified reference while minimizing the overall costs. In a refrigeration system the direct cost is energy consumption while wear and tear on mechanical parts is an important issue as well. If the performance of the control system is poor for some arbitrary reason other costs such as loss of damaged goods in the load zone, damaged and broken system parts and in the extreme leakage of refrigerants that are harmful to humans and the environment might come into consideration. Danfoss A/S is a producer of components, including electronic controllers, for a vast variety of refrigeration systems. These controllers are specific for the application but within the application of industrial refrigeration rather large variations are seen. Hence, the designer of the controller knows the generic system but the specific types of components within the system are unknown. This is an obvious challenge which demands for a high level of robustness in the control strategy. Another challenge is the on-location installation and configuration of the system since this job is usually done by an independent refrigeration fitter. This means that Danfoss does not have much direct contact with the end
2
Introduction
costumer of their components neither do they have much influence on the quality and reliability of the installation process. From the costumers’ point of view the lifetime costs associated with running a refrigeration system is somewhat related to the costs already mentioned in this section1 . But the total cost is greatly affected by purchase, installation and configuration in the commissioning phase and maintenance, fault finding and service in the case of breakdowns, too. The costs of installation and commissioning (even unproblematic ones) usually exceeds the cost of the Danfoss components (e.g. the controllers and sensors) and if further expenses to search and correction of faults are needed, in case the configuration was not made exactly the way it was intended to, the commissioning itself can easily be the most expensive of the two. Such a search can be very time consuming and costly not to mention the consequences in the expenses to repairs if a misconfiguration that is not detected during commissioning leads to an earlier than expected system breakdown. Hence, for Danfoss to gain competitiveness on the market, it is urgent to reduce the installation and configuration time, especially by reducing the error rate in this phase. A problem that also follows from a misconfiguration and thereby increased commissioning costs is that the costumer might question the quality of the refrigeration control systems from Danfoss. Some misconfigurations in the sensor system are difficult to distinguish from a poor control strategy when observing the performance of the system, meaning that the reputation of the producer of an, elsewise well-functioning, controller is likely to suffer from mistakes done in a phase which they for the present only controls to a very limited extend (Izadi-Zamanabadi et al., 2009; Thybo, 2007). For the reasons just described, topping the wish list at the R&D department at Danfoss is an intelligent procedure, incorporated into the controller and able to validate the setup of a newly installed refrigeration system before it goes into operation. Such a procedure should be capable of relieving the installer for some of the responsibility and moving it to the Danfoss controller which is blamed for a mistake anyway. Even though a representative from Danfoss is not present on-site, Danfoss can somewhat control the startup phase via the intelligence implemented in the controller, which they design, if this can be able to run an automated validation procedure, report faults and refuse to go into normal operation until they are corrected. The failure rate of an industrial system versus its lifetime is commonly well approximated by the shape of a bathtub. In the commissioning and decom1
Energy consumption, lost goods, maintenance of worn out parts.
1.1 Problem Definition
3
missioning phases the rate of failures is typically much higher than in the different phases of normal operation that lies in between. This is due to the system exceeding the lifetime it is designed for in the decommissioning phase, which is obviously not of much practical interest, while several factors, such as deadlines and stressful working hours, various technicians who’s works overlap and immense wirings, can affect the system in the commissioning phase. However, most research within the areas of control, fault detection and fault tolerance is concerned with the normal operation conditions the system is intended for. Since the duration of normal operation is much longer than that of commissioning for most systems and since the normal operation phases are where the system has to perform well in order to satisfy the costumers it is no wonder that a lot of effort has been put into efficient and reliable control of systems that carry out their tasks under normal operation. But, as already pointed out, a non-negligible part of the systems’ lifetime costs are related to faults during commissioning (Izadi-Zamanabadi et al., 2009) and both costumer satisfaction, the installers confidence in the components and thereby, not less important, the image of the system provider would improve drastically if such errors were reduced.
1.1
Problem Definition
In refrigeration systems (as in many other industrial systems) the frequently encountered error after installation is the wrong connection of the sensors to the controller or the connection of a sensor that is misplaced compared to where the controller “thinks” it is supposed to be. The title of this project is “Active Sensor Configuration Validation in Refrigeration Systems”. In this context configuration validation means; verifying that the entire system, consisting of the controller, the sensor system and the interconnections between them, is connected and functioning the way it was intended to when the system was designed. The overall aim is to provide the controller with means to identify the connected sensors and their conditions accurately in order to provide correct and optimal control of the system and in this project approaches and procedures for that task shall be investigated. The word active means that an input signal or a series of input signals to the systems will be designed in order to excite the system in controlled ways such that it becomes possible to decide whether the system is working with normal behavior or with a misconfigured sensor system. If the latter is the case it is desired to diagnose which faulty configuration is present such that the error can be corrected, either by a technician or automatically in the internal system. This project does not deal with the correction of an identified fault or with the debate on whether a human being should be called to
4
Introduction
Figure 1.1: Schematics of a controller unit connected to sensors and inlet valve in a display case
correct any problems or if we can trust an automatic procedure correcting the problem internally in the controller. The target application dealt with in this project is a supermarket refrigeration system consisting of several display cases in the sales area with a common suction manifold, compressor rack and condenser. Inside each display case is an inlet valve, a fan circulating the air, a heater for defrosting and an evaporator along with, typically, four temperature sensors and one pressure sensor. The system, some simplified physics and relevant mathematical models are explained in details in chapter 2. The sensors from each display case are connected to a controller unit as shown in figure 1.1. Such a unit can typically control up to four display cases at a time, and hence, the problem could be extended to cover sensors switched in between the individual display cases. However, this project solely deals with the connections to one display case at the time. Within the scope is also the possibility of switching the connections to the actuators and how this situation can be detected. Validating the sensor configuration involves verifying the order of the connection between the sensors and the controller but also identifying if a sensor is malfunctioning. A typical individual sensor error in refrigeration systems
1.1 Problem Definition
5
is that a sensor becomes loose from the place it is fitted which immediately changes gain and time constant in the sensor characteristics or even causes the sensor to measure a totally different temperature than it was intended to. These two different fault modes should be identified and separated by the validation procedure. First, the situation with pure permutations of sensors shall be investigated in this project and then the situation can be extended to cover individual sensor faults too. At Danfoss A/S a hazard analysis2 has been performed on the refrigeration systems in order to classify possible faults into levels depending on how serious they are. In the FMEA analysis each fault is classified based the severity-occurrence index which is a combination of the likelihood and the severity of the fault. All the faults dealt with in this project (permutation of sensors and a misplaced temperature sensor on the evaporator wall) are assigned a severity index above six, several even as high as nine on a scale where 10 is the maximum. The occurrence indexes are assigned to 9-10 for most of the faults in question here with a few exceptions. This leads to a severity-occurrence index ranging between 50 and 90 (100 is the highest possible) for most of these faults which places them in the high priority end of the entire analysis (Izadi-Zamanabadi and Thybo, 2007). This proves the need for a clever solution to this type of faults. The difference in severeness assigned to the different sensor permutations in the analysis described above is that some of the measurements are critical to the system’s operational safety while others only influence the performance of the system without bringing it in a situation that might cause a breakdown. An example is the so-called superheat temperature, which is calculated as the difference between the evaporation temperature and the refrigerant temperature at the evaporator outlet3 . The superheat is at the same time a measure of how far the liquid front is from the evaporator outlet. Since liquid is incompressible a breakdown of the compressor unit will occur if liquefied refrigerant is allowed to leave the evaporator and go into the compressor. Hence, it is essential for the health of the system to constantly knowing the two measurements required to calculate and control the superheat temperature whereas the measurement of the air temperature in the load zone does not cause any damages to the system if it is lost or confused with another measurement4 . Such criteria for keeping the system at a safe operating point are necessary to respect even during commissioning and 2
Failure Mode and Effect Analysis (FMEA) (Izadi-Zamanabadi, 2000). Refer to chapter 2 for a more thorough explanation of superheat and evaporator physics. 4 Even though it might very well cause damages to the goods that are supposed to be kept at a certain temperature. However, these are not present in the commissioning phase. 3
6
Introduction
diagnosis/validation and must be kept in mind when designing test signals such that the proper precautions can be taken. For a system in the standard form as shown in (1.1) the numbering of the rows in 𝐺𝑦𝑢 is what we want to identify. [
𝑒 𝑦
]
=
[
𝐺𝑒𝑑 𝐺𝑦𝑢
][
𝑑 𝑢
]
(1.1)
Given a set of sensors 𝑠𝑖 , 𝑖 ∈ ℑ = {1, ⋅ ⋅ ⋅ , 𝑚} and a set of measurements Υ𝑗 , ˜ such that 𝑗 ∈ ℑ = {1, ⋅ ⋅ ⋅ , 𝑚} we want to identify a perturbation of ℑ, i.e. ℑ (𝑠ℑ˜ , Υℑ ) conform to the dynamic behavior of the system (Izadi-Zamanabadi et al., 2009). In other words, if a set of 𝑚 sensors numbered from 1 to 𝑚 are to be connected to a set of 𝑚 connectors in ascending order the nominal situation can be written as in equation (1.2), where 𝐼 is the identity matrix in the ideal case. ¯ = 𝐼 𝑠¯ Υ
(1.2)
Switching any two sensors at the connections switches two rows in the matrix such that all the ones are no longer in the diagonal. Likewise the situation where a sensor has come loose from its fitting can be described by changing the corresponding ’1’ to a filtered version containing some gain and delay. Thus the mathematical fault model to be considered in this project can be described as in equation (1.3): 𝐺𝑦𝑢 (Δ) = (𝐼 + Δ)𝐺𝑦𝑢
(1.3)
where 𝐺𝑦𝑢 is the nominal system description from inputs to outputs and Δ can be written as Δ𝑝𝑒𝑟𝑚 + 𝛿𝑢𝑛𝑐𝑒𝑟𝑡 . Δ𝑝𝑒𝑟𝑚 is the actual fault matrix that either permutes rows in the output vector, applies a filter to an output or a combination of the two while 𝛿𝑢𝑛𝑐𝑒𝑟𝑡 describes the uncertainty in the system causing undesired fault signatures in the residuals. The connection of actuators to the system shall furthermore be investigated and the design of a sequence of input signals that makes it possible to verify the connection order and the functionality of the actuators will be discussed. It is worth mentioning that the target systems are prone to great parameter variations from one system to another depending on the manufacturer of display cases, evaporators etc., the installer and the environment the system is installed in. Hence, we know only a generic model as the one described in chapter 2 but the numeric values of the vast number of parameters are only to be guessed on. This is of course a huge challenge and in this project
1.2 Outline
7
analyses of real system data will try to reveal the robustness of the validation methods towards such unavoidable uncertainties. Established methods for fault diagnosis assume that a normal condition of a plant has been obtained and aim to diagnose deviations from the normal. The startup problem is harder as the normal condition has not been established and topology of the plant and associated sensors may differ considerably from what was expected. The problem at hand is therefore at the boundary between system identification and fault diagnosis and the present work contributes with knowledge on a new field, namely the diagnosis of system instrumentation topology during the start-up phase. The dual problem, the placement of sensors for optimal fault detectability was considered in Commault and Dion (2007).
1.2
Project Outline
The rest of this thesis is structured as follows: Chapter 2 contains a description of the necessary thermodynamics for understanding and modeling of the refrigeration system along with a mathematical model of a generic supermarket refrigeration system with one display case. The model is implemented in Dymola5 simulation software and can be used in combination with Matlab for simulating different scenarios and for testing developed methods. In chapter 3 the system is analyzed using both overall considerations and a structural analysis to reveal the kind of faults that can be detected and/or identified by passive and active methods. The results lead to a discussion from which clever startup sequences can be designed in order to divide the system into subsystems and thereby easing the fault identification process. This is followed by an analysis of properties of the different kinds of faults that will be investigated further in the sequel of the report. The amount of fault models is discussed and a reasonable limitation of the extent of this thesis is made. Chapter 4 gives the theoretical background and some references to methods and research areas that will be explored in this project. In the chapters to follow approaches to solving the given problem will be described and tested and in chapter 4 a theoretical foundation for the approaches applied is provided. In chapter 5 the proposed solution is described. All the methods are model5
(Dynasim, 2008)
8
Introduction
based to a varying degree and the complications this entails because of the target system which is prone to quite large variations in the parameters are mentioned in the chapter followed by a presentation of approaches to minimizing the effect from uncertain models in chapter 6. Also in chapter 6 validation and demonstration of the proposed method is offered using both simulations and real data from commercial refrigeration systems. The thesis is concluded in chapter 7 in which suggestions for future work are shortly mentioned too. In the sections 4.3, 4.5 and 6.2 examples on the described theory is offered using a simple linear and completely known system. This serves both to illustrate how the methods work in almost-ideal cases in which the system is so simple that the behavior is easier to see through and also to demonstrate some of the methods that have been investigated during the work with this thesis but have not been utilized in the final solution to the sensor configuration validation problem.
Chapter
2 Modeling a Commercial Refrigeration System
This chapter deals with the modeling of a commercial supermarket refrigeration system. First, the vapour-compression cycle and its fundamental physics are described followed by a presentation of the equations describing the heat transfers inside and in the vicinity of the evaporator in a supermarket refrigeration system, e.g. a display case. Next, a Dymola model, especially concerning the evaporator, is assembled and outputs corresponding to the available actual measurements in the display case are attached. The Dymola models in this chapter builds on the theory and former models that were made available during stays at Central R&D, Danfoss Refrigeration and Air-conditioning. The theoretical foundation is in particular formed by the following literature (Green et al., 2006; He et al., 1998; Larsen, 2006; Larsen et al., 2007; Rasmussen et al., 2006; Sarabia et al., 2007). The purpose of this chapter is twofold. First of all the idea in the stays at Danfoss and in documenting them here was to get a good understanding of the system which is going to be the target system of the work described throughout the rest of this thesis, and to gain a more intuitive feeling of the system dynamics, and second, to produce a generic model of the system containing the right dynamics and the available sensors and actuators such that this model can be used for simulation of different scenarios and algorithms.
10
Refrigeration System Modeling
Figure 2.1: The basic layout of a refrigeration system.
2.1
The Vapour-compression Cycle in Refrigeration
In the vapour-compression cycle a refrigerant is circulating between two heat exchangers. One in the cold storage where the refrigerant absorbs energy by evaporating, and one in a hot reservoir, typically the surroundings, where energy leaves the refrigerant during condensing. The temperature at which the refrigerant evaporates/condenses is called the saturation temperature and for the cycle of heat transfers in the refrigeration system to work 𝑇𝑠𝑎𝑡 in the evaporator must be lower than the temperature in the cold storage while it, in the condenser, must be higher than the temperature of the surroundings. To achieve this a compressor is inserted between the evaporator and the condenser since 𝑇𝑠𝑎𝑡 of any liquid or gas depends on the pressure. Hence, evaporator and condenser are referred to as the low and high pressure parts respectively. Figure 2.1 shows the layout of the refrigeration system with four states of the process marked in the figure and figure 2.2 on the facing page shows the correspondence between pressure and specific enthalpy in the refrigerant for the entire process with markings of the same four states. Both figures are from (Larsen, 2006, p.9-10). When the refrigerant enters the evaporator as a liquid it starts evaporating. Thus, the first section of the evaporator contains a mixture of liquid and gas and is called the two-phase region. In order not to damage the compressor it is very important that no liquid flows out of the evaporator outlet and for that reason an important control objective is to make sure that the twophase region ends before the evaporator outlet such that the last section of the evaporator only contains gas. This section is called the superheat region. Figure 2.3 on the next page illustrates the definitions for the evaporator.
2.1 The Vapour-compression Cycle in Refrigeration
11
Figure 2.2: ℎ - log(𝑝)-diagram for the vapour-compression cycle. The numbers correspond to the states in figure 2.1. Subindexes: 𝑖 = inlet, 𝑜 = outlet, 𝑒 = evaporator, 𝑐 = condenser. 𝐿 and 𝐺 denotes Liquid and Gas respectively.
Two-phase region
m
Superheat region
m
Figure 2.3: Schematic of simplified evaporator cross-section.
12
2.2
Refrigeration System Modeling
Dynamical Model of a Commercial Display Case
A typical use of the vapour-compression cycle described in the previous section is in supermarket display cases. In a display case the evaporator, where the refrigerant evaporates while absorbing heat, is located underneath the storage room. A fan circulates air through the evaporator where it is cooled and into the storage room creating an air-curtain at the front of the display case. Since this air-curtain is colder than the goods in the display case heat is transferred from the goods to the air. In addition heat also flows from the surroundings to the air-curtain. Refer to figure 2.4 on the facing page for a cross-section of a display case. The objective of controlling the display case is of course to maintain the temperature of the goods within certain limits but other concerns like energy consumption and wear or damage on mechanical parts might also be important. Four important inputs to the display case are considered here, namely: evaporation pressure, opening degree of inlet valve, load from the surroundings and the amount of air circulating through the evaporator. In supermarkets several display cases are usually supplied by the same compressor or compressor rack through a suction manifold. Hence, controlling the evaporation pressure for each display case is not possible and the compressor capacity is often controlled such that the most loaded display case has its inlet valve open around 90% of the time. The goal is here to have the evaporation pressure as high as possible, thus minimizing the energy consumption of the compressors, but still low enough to keep the heat transfer cycle flowing. In the sequel a constant compressor capacity is assumed and the dynamics inside the diplay case (in particular the evaporator) are considered since this is the core element in controlling the dynamics of the system. The dynamics in the display case can be described by four states: the temperature of the goods, the temperature of the evaporator wall, the air temperature and the mass of liquefied refrigerant in the evaporator (Larsen et al., 2007). By setting up the energy balances the following differential equations are found: 𝑑𝑇𝑔𝑜𝑜𝑑𝑠 𝑄˙ 𝑔𝑜𝑜𝑑𝑠−𝑎𝑖𝑟 =− 𝑑𝑡 𝑀𝑔𝑜𝑜𝑑𝑠 𝐶𝑝𝑔𝑜𝑜𝑑𝑠 𝑑𝑇𝑤𝑎𝑙𝑙 𝑄˙ 𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 − 𝑄˙ 𝑒 = 𝑑𝑡 𝑀𝑤𝑎𝑙𝑙 𝐶𝑝𝑤𝑎𝑙𝑙 𝑄˙ 𝑔𝑜𝑜𝑑𝑠−𝑎𝑖𝑟 + 𝑄˙ 𝑎𝑖𝑟𝑙𝑜𝑎𝑑 − 𝑄˙ 𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 𝑑𝑇𝑎𝑖𝑟 = 𝑑𝑡 𝑀𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟
(2.1a) (2.1b) (2.1c)
2.2 Dynamical Model of a Commercial Display Case
13
amb
air,out
air,in
Pe
ref,out
Figure 2.4: The refrigerated display case shown with indication of temperatures and heat transfers. (With inspiration from (Larsen et al., 2007))
where the heat flows are determined by: 𝑄˙ 𝑔𝑜𝑜𝑑𝑠−𝑎𝑖𝑟 = 𝑈 𝐴𝑔𝑜𝑜𝑑𝑠−𝑎𝑖𝑟 ⋅ (𝑇𝑔𝑜𝑜𝑑𝑠 − 𝑇𝑎𝑖𝑟 ) 𝑄˙ 𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 = 𝑈 𝐴𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 ⋅ (𝑇𝑎𝑖𝑟 − 𝑇𝑤𝑎𝑙𝑙 ) 𝑄˙ 𝑒 = 𝑈 𝐴𝑤𝑎𝑙𝑙−𝑟𝑒𝑓 (𝑀𝑟𝑒𝑓 ) ⋅ (𝑇𝑤𝑎𝑙𝑙 − 𝑇𝑒 ) 𝑄˙ 𝑎𝑖𝑟𝑙𝑜𝑎𝑑 = 𝑈 𝐴𝑎𝑚𝑏−𝑎𝑖𝑟 ⋅ (𝑇𝑎𝑚𝑏 − 𝑇𝑎𝑖𝑟 )
(2.2a) (2.2b) (2.2c) (2.2d)
The heat transfer coefficient between the evaporator wall and the refrigerant is a function of the mass of liquefied refrigerant in the evaporator as seen in equation (2.2c). This relation can be approximated as shown in equation (2.3) (Larsen et al., 2007): 𝑈 𝐴𝑤𝑎𝑙𝑙−𝑟𝑒𝑓 (𝑀𝑟𝑒𝑓 ) = 𝑈 𝐴𝑤𝑎𝑙𝑙−𝑟𝑒𝑓,𝑚𝑎𝑥 ⋅
𝑀𝑟𝑒𝑓 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥
(2.3)
where the subscript “max” indicates that the evaporator is completely filled. The dynamics above can be made dependent on the fan circulating the air through the evaporator by changing 𝑈 𝐴𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 (forced convection) in
14
Refrigeration System Modeling
equation (2.2b) to 𝑈 𝐴𝑎𝑖𝑟−𝑤𝑎𝑙𝑙,𝑓 𝑎𝑛𝑂𝐹 𝐹 (natural convection, which is much lower) when the fan is switched off. Since there is no, or at least a minimal, airflow from the display case to the evaporator in this case the temperature 𝑇𝑎𝑖𝑟 in equation (2.2b) is substituted by 𝑇𝑎𝑚𝑏 such that heat transfer to the evaporator wall origins from the surroundings. Likewise, the part of equation (2.1c) describing the heat transfer from air to evaporator wall vanishes: 𝑄˙ 𝑔𝑜𝑜𝑑𝑠−𝑎𝑖𝑟 + 𝑄˙ 𝑎𝑖𝑟𝑙𝑜𝑎𝑑 𝑑𝑇𝑎𝑖𝑟 = 𝑑𝑡 𝑀𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟
(2.4)
The accumulation of refrigerant in the evaporator depends on the opening degree of the inlet valve and on the amount of refrigerant evaporating. When the opening degree is more than zero and if the evaporator is not already completely filled the refrigerant flow into the evaporator can be described as (Larsen et al., 2007; Sarabia et al., 2007): √ (2.5) 𝑚 ˙ 𝑖𝑛 = 𝑂𝐷 ⋅ 𝛼 𝑃𝑟𝑒𝑓,𝑜𝑢𝑡 − 𝑃𝑟𝑒𝑓,𝑖𝑛 𝑂𝐷 ∈ [0 : 1 ]
where 𝑃𝑟𝑒𝑓,𝑜𝑢𝑡 , 𝑃𝑟𝑒𝑓,𝑖𝑛 are the refrigerant pressures at the inlet and outlet respectively and 𝛼 is describing the valve characteristics and the so-called quality of the refrigerant1 . When the evaporator is filled with liquefied refrigerant the change of liquid mass due to evaporation can be found using the specific latent heat of the refrigerant, Δℎ𝑙𝑔 and the cooling capacity from equation (2.2c) since they are related as follows: 𝑄˙ 𝑒 𝑄˙ 𝑒 = 𝑚 ˙ ⋅ Δℎ𝑙𝑔 ⇔ 𝑚 ˙ = Δℎ𝑙𝑔
(2.6)
In equation (2.6) it is assumed that the entire cooling capacity, 𝑄˙ 𝑒 , stems from evaporation in the two-phase region. Thus, the following differential equation describes the accumulation of refrigerant in the evaporator: ⎧ 𝑄˙ 𝑒 ⎨ 0 , if 𝐿𝑆𝐻 ≤ 0 ∧ 𝑚 ˙ 𝑖𝑛 − Δℎ >0 𝑑𝑀𝑟𝑒𝑓 𝑙𝑔 (2.7) = ˙ ⎩ 𝑚 𝑑𝑡 ˙ 𝑖𝑛 − 𝑄𝑒 , otherwise Δℎ𝑙𝑔
where 𝐿𝑆𝐻 will be explained in equation (2.10f).
In most commercial display cases a heating element is placed on or close by the evaporator wall. The purpose of this heater is to melt any ice that builds 1
A measure of the mixture of gas and liquid.
2.2 Dynamical Model of a Commercial Display Case
15
up on the fins of the evaporator wall since this drastically reduces the heat transfer from the air. During normal operation the defroster is only turned on for short intervals, the control of which we wont deal with here, but it is still an input to the system which influences the energy balances described so far. This can be modeled by including the heat flow from the defroster in equation (2.1b) as shown here: ⎧ ⎨
𝑑𝑇𝑤𝑎𝑙𝑙 = ⎩ 𝑑𝑡
𝑄˙ 𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 −𝑄˙ 𝑒 𝑀𝑤𝑎𝑙𝑙 𝐶𝑝𝑤𝑎𝑙𝑙 𝑄˙ 𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 −𝑄˙ 𝑒 +𝑄˙ 𝑑𝑒𝑓 𝑟𝑜𝑠𝑡 𝑀𝑤𝑎𝑙𝑙 𝐶𝑝𝑤𝑎𝑙𝑙
, if 𝑑𝑒𝑓 𝑟𝑜𝑠𝑡 = 𝑂𝐹 𝐹 , if 𝑑𝑒𝑓 𝑟𝑜𝑠𝑡 = 𝑂𝑁
(2.8)
By now, most dynamics of the display case are described. It is no secret that these dynamics are somewhat simplified compared to e.g. moving-boundary models of the phase transitions inside the evaporator (Eldredge et al., 2008; Willatzen et al., 1998) however, the dynamics here are commonly accepted at Danfoss A/S for prototyping control algorithms. Still two variables that are shown in figure 2.4 on page 13 have not been mentioned so far. That is 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 and 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 . The latter of the two can easily be found by extending equation (2.2b) as shown below: 𝑄˙ 𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 = 𝑈 𝐴𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 ⋅ (𝑇𝑎𝑖𝑟 − 𝑇𝑤𝑎𝑙𝑙 ) = 𝑚 ˙ 𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟 ⋅ (𝑇𝑎𝑖𝑟,𝑖𝑛 − 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 ) ⇕ 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 = 𝑇𝑎𝑖𝑟,𝑖𝑛 −
𝑄˙ 𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 𝑚 ˙ 𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟
(2.9)
where both 𝑈 𝐴𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 and 𝑚 ˙ 𝑎𝑖𝑟 depend on the air flow from the fan. This equation only applies when the fan is running. As a consequence of (2.4), 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 ≈ 𝑇𝑎𝑖𝑟,𝑖𝑛 when the fan is turned off. 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 , which is the refrigerant temperature at the outlet of the evaporator, is on the other hand more complicated. Figure 2.5 on the following page shows the profile of the refrigerant temperature inside the evaporator. The situation on the figure should not be considered as static since the point in the evaporator where all the liquid is evaporated which is the point where 𝑇𝑟𝑒𝑓 starts increasing from 𝑇𝑒 depends on the opening of the inlet valve and on the cooling capacity. In figure 2.5 it should be noted how the temperature of the refrigerant is constant at the evaporation temperature, 𝑇𝑒 , during evaporation and that it increases exponentially towards 𝑇𝑎𝑖𝑟 in the pure gas phase. Therefore the refrigerant temperature at the outlet depends on the amount of liquefied refrigerant in the evaporator or in other words on the length of the superheat (gas) region. The difference between 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 and 𝑇𝑒 is called the superheat temperature (𝑇𝑆𝐻 ). Calculation of the superheat temperature and thereby also 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 is shown
16
Refrigeration System Modeling
T air T ref
T SH
Te Gas
Liquid/Gas
Length of evaporator
Figure 2.5: Temperature profile of refrigerant liquid front in evaporator
below: 𝜌𝑙𝑖𝑞𝑢𝑖𝑑 = 𝑉𝑒𝑣𝑎𝑝. = 𝑉𝑙𝑖𝑞𝑢𝑖𝑑 = 𝛾= 𝐿𝑡𝑤𝑜−𝑝ℎ𝑎𝑠𝑒 =
1 𝑉 𝐵𝑢𝑏𝑃 (𝑃 𝑒) 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 𝜌𝑙𝑖𝑞 𝑀𝑟𝑒𝑓 𝜌𝑙𝑖𝑞 𝑉𝑔𝑎𝑠,𝑡𝑤𝑜−𝑝ℎ𝑎𝑠𝑒 ≈ 0.7 𝑉𝑡𝑤𝑜−𝑝ℎ𝑎𝑠𝑒 𝑉𝑙𝑖𝑞𝑢𝑖𝑑 ⋅ 𝐿𝑒𝑣𝑎𝑝. 𝑉𝑒𝑣𝑎𝑝. (1 − 𝛾)
(2.10a) (2.10b) (2.10c) (2.10d) (2.10e)
𝐿𝑆𝐻 = 𝐿𝑒𝑣𝑎𝑝. − 𝐿𝑡𝑤𝑜−𝑝ℎ𝑎𝑠𝑒
(2.10f)
𝑇𝑆𝐻 = ((𝑇𝑤𝑎𝑙𝑙 ⋅ 𝐿𝑡𝑤𝑜−𝑝ℎ𝑎𝑠𝑒 + 𝑇𝑎𝑖𝑟 ⋅ 𝐿𝑆𝐻 ) − 𝑇𝑒 ) ⋅ . . . )) ( ( Δℎ𝑙𝑔 . . . 1 − exp −𝑈 𝐴𝑆𝐻 ⋅ 𝐿𝑆𝐻 ⋅ 𝑄˙ 𝑒
(2.10g)
𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 = 𝑇𝑆𝐻 + 𝑇𝑒
(2.10h)
where 𝐿 and 𝑉 means length and volume of the evaporator, respectively, and 𝑈 𝐴𝑆𝐻 is the heat transfer coefficient between gas and the evaporator wall in the superheat region. The constant 𝛾 is called the mean void fraction and describes how much of the volume in the two-phase region that is filled with gasified refrigerant. In equation (2.10a) 𝑉 𝐵𝑢𝑏𝑃 is a nonlinear function of the evaporation pressure for finding the specific volume of the refrigerant. Equation (2.10g) introduces a fifth state and can by use of the expressions
2.2 Dynamical Model of a Commercial Display Case
17
in (2.10) be written in differential form as shown here: ) ( 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 (1 − 𝛾) 𝑑𝑇𝑆𝐻 = −𝑈 𝐴𝑆𝐻 ⋅ 𝐿 ⋅ Δℎ𝑙𝑔 − 1 𝑈 𝐴𝑤𝑎𝑙𝑙−𝑟𝑒𝑓,𝑚𝑎𝑥 ⋅ (𝑇𝑤𝑎𝑙𝑙 − 𝑑𝑡 𝑀𝑟𝑒𝑓 )) ( ( ( ) 𝑀𝑟𝑒𝑓 . . . 𝑇𝑒 ) ⋅ 𝑇𝑆𝐻 − 𝐿 (𝑇𝑤𝑎𝑙𝑙 − 𝑇𝑎𝑖𝑟 ) + 𝑇𝑎𝑖𝑟 − 𝑇𝑒 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 (1 − 𝛾) (2.11) Throughout this section 𝑇𝑒 and 𝑃𝑒 has been used several times. In a real refrigeration system a pressure transducer is often used to measure 𝑃𝑒 at the outlet of the evaporator and since a nonlinear refrigerant dependent function for calculating evaporation temperature from evaporation pressure exists, both variables are known.
2.2.1
Modeling the Display Case in Dymola
In Dymola the commercial display case is modeled using the dynamics described in section 2.2. The differential equations are typed in together with all the definitions needed and the input/output connections to and from the block are defined. The display case block is seen in figure 2.6 on the next page with the five outputs (𝑇𝑒 , 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 , 𝑇𝑎𝑖𝑟,𝑖𝑛 , 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 and 𝑇𝑤𝑎𝑙𝑙 ) and the three inputs (𝑂𝐷, 𝑑𝑒𝑓 𝑟𝑜𝑠𝑡 𝑂𝑁/𝑂𝐹 𝐹 and 𝑓 𝑎𝑛 𝑂𝑁/𝑂𝐹 𝐹 ). In the figure the in- and outlets of the display case are seen connected to suction manifold, compressor and condenser in order to complete the vapour-compression cycle. These parts are provided by Danfoss and are described in (Larsen, 2006; Larsen et al., 2007) but they will not be considered any further in this report. In the upper right corner of the model a symbol called “refrigerant” is seen. This is used together with the inclusion of a software package (RefEqns) to define the type of refrigerant used. Hereby a number of refrigerant specific functions can be used from Dymola such as: TDewP(Pe) for converting pressure to evaporation temperature, HDewP(Pe) for finding latent heat, and VBubP(Pe) that calculates the specific volume (Skovrup, 2000). The Modelica code for a display case is included in appendix A. In the sequel a couple of simulation results using the model will be briefly presented. First, a hysteresis controller is inserted such that the inlet valve is opened completely when the air temperature raises above a limit and closes completely when it falls below a limit. The results are seen in figure 2.7 on page 19. It is seen how the temperature of the goods are kept within a limited range after the initial cooling is completed. Furthermore the dynamics of all the
18
Refrigeration System Modeling
Figure 2.6: Setup for simulation of display case in Dymola
measurements mentioned in the preceding sections and the opening and closing of the inlet valve can be investigated. Next, a so-called warm startup is simulated without goods in the display case. The inlet valve is opened to fill the evaporator and then closed at 𝑡 = 500𝑠. At 𝑡 = 1400𝑠 the fan is turned off and at 𝑡 = 2500𝑠 the defrost heater is turned on. All the described dynamics are shown in figure 2.8 on the next page and they are seen to behave reasonable at a first glance.
2.2 Dynamical Model of a Commercial Display Case
19
Figure 2.7: Simulation results for refrigeration system using hysteresis controller
Figure 2.8: Simulation results for refrigeration system during warm startup
20
Refrigeration System Modeling
Chapter
3 System Analysis
In this chapter the target application for the project is analyzed in order to reveal how the various parts of the system are reachable by different diagnosis methods and to perform an overall system analysis to split the system into subparts with the purpose of increasing the identifiability of faults. The system in question is the general display case in a refrigeration system modeled in chapter 2 and both an analysis using the system knowledge combined with experiences from simulations and real test data and a more formal structural analysis will be conducted. Finally the possible types of faults in the sensor configuration are discussed.
3.1
Analysis of Overall System Structure
From the equations describing the dynamical model of the refrigeration system in section 2.2 one realizes that the system is hybrid since by switching on or off two of the inputs, namely 𝐹 𝑎𝑛 or 𝐷𝑒𝑓 𝑟𝑜𝑠𝑡, different dynamics of the system are in use. Due to the placement of sensors in the system this property is visible from the measurements since subsets of the sensors only respond to the input in certain conditions. The switching of system dynamics and the corresponding sensor responses that are observed as the most obvious are caused by the fan circulating the air from the load zone of the display case through the fins on the evaporator wall. Equation (2.4) shows how the air temperature is no longer a function
22
System Analysis
of the temperature of the evaporator wall when the fan is turned off and it is furthermore described how the dynamics of the heat transfer from the wall changes when only a slight natural convection of the air around the evaporator takes place. Of course it is an approximation to say that the temperatures of both 𝑇𝑎𝑖𝑟 and 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 are decoupled from the evaporator temperature and hence also from the opening degree (𝑂𝐷) of the inlet valve when the fan is not circulating the air but compared to how these measurements respond to changes in the 𝑂𝐷 elsewise it is learned from practical experiments that this is a rather good assumption. By using this knowledge, the following can be deduced: When performing a warm-startup of a refrigeration system opening the inlet valve will cause refrigerant to flow into the evaporator lowering the temperature of the wall drastically. This will be measured at least on 𝑇𝑤𝑎𝑙𝑙 while the heat transfer from the air circulating through the fins of the wall causes the same characteristic to propagate to the sensors 𝑇𝑎𝑖𝑟 and 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 , if the fan is running. Hence, by leaving the fan off while opening the inlet valve until a drop in at least one of the temperature readings is observed and then turning it on until further two readings have dropped significantly the subset {𝑇𝑎𝑖𝑟 , 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 } has been identified from the sensor signals. Moreover a successful completion of this procedure validates that the control output 𝑂𝐷 and the fan are both working and that they are connected as expected to the controller. If the time instant for switching on the fan is decided by the observation of two of the temperature readings dropping significantly the subset {𝑇𝑤𝑎𝑙𝑙 , 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 } is further localized. At that time instant we expect the evaporator to be almost completely filled with liquefied refrigerant, keeping the temperature profile of 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 from figure 2.5 on page 16 in mind. Thus we expect 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 to decrease slowly when the inlet valve is first opened, dropping rapidly when the liquid front gets close to the end of the evaporator. This behavior is not influenced by the fan and is guaranteed to happen sooner or later if the valve is opened and both sensors are located correctly. Therefore, this subset is extractable before starting the fan to extract the next subset {𝑇𝑎𝑖𝑟 , 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 }. At this point the order of the temperature drops in {𝑇𝑤𝑎𝑙𝑙 , 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 } already gives us an idea of how to uniquely identifying the two sensors however the exact physical location of the sensors might make this procedure uncertain and therefore it should only be used as hint in the further validation process. The temperature 𝑇𝑒 now has its own subset but it might as well had been identified as the very first. Both properties in the refrigeration system and electrical properties of the sensor make this one rather simple to extract from the entire set of sensors. Firstly, while all other temperatures must lie in the vicinity of the ambient temperature at a warm-startup, 𝑇𝑒 measures a temperature which is much lower, namely the evaporation temperature of the refrigerant1 . During the entire operation of the display case this tem1
Assuming that the parts of the refrigeration system around the display case, e.g. the
3.2 Structural Analysis
23
perature is supposed to be the very lowest. Secondly, this temperature is actually measured as a pressure which is converted to a temperature using the knowledge of the specific refrigerant. This different kind of sensor type, giving a current signal as opposed to the voltage signals of the remaining temperature sensors, is obviously easy to identify when no other sensors with the same characteristics are present in the system. The functionality of the defrost heating element and its connection to the corresponding control output on the controller can be tested by following the above sequence by a constant medium-level opening degree of the inlet valve and keeping the fan on until all temperature readings have stabilized. Then by switching on the heating element until at least two of the temperatures have started to increase significantly the test can be completed successfully. From the above it can be concluded that a preliminary test of the display case with a clever designed, but elsewise rather simple, sequence of input signals is capable of validating the functionality and connections of all three actuators and dividing the five sensor signals into smaller subsets crucially narrowing down the solution space of the sensor configuration validation process to follow.
3.2
Structural Analysis of Refrigeration System
A more formal way to analyze a system which is often used before designing algorithms for fault diagnosis is called structural analysis. A structural analysis investigates the structural model of a system, represented in a directed bi-partite graph showing the links between variables, parameters and constraints. Such a model is considered a qualitative, very low level, easy to obtain, model of the system behavior (Blanke et al., 2006; Izadi-Zamanabadi and Staroswiecki, 2000). The results of the analysis can hold lots of useful information for fault diagnosis design since it is revealed which components of the system that are monitorable and constraints usable for designing residuals based on analytic redundancy are identified. If the standard structural analysis shows that the system in question is not completely monitorable by a passive approach the analysis can be extended to investigate the input-output paths through the system that can be excited in an active fault diagnosis, where auxiliary test signals are applied to the inputs (Gelso and Blanke, 2009). compressor, are working properly.
24
System Analysis
The first step in the structural analysis is to set up the constraints describing the system as it will be shown in the following sections. As mentioned earlier the display case is a hybrid system which dynamics change depending on the state of the fan. Hence, the following analysis is split into two sets of constraints one for the case with the fan switched on and one for the other. Furthermore, since this project is primarily concerned with the warm-startup of the display case the mass of goods is set equal to zero eliminating a state and a constraint in the system description. It has to be noted that the conclusions made in the sequel concerning detectability and isolability all assume that the sensor configuration is correct. Misplacing any of the sensors will change the structural properties of the entire system including the sensors that are still connected correctly.
3.2.1
Constraints for Display Case Without Goods, Fan ON
The following constraints describe the display case when no goods are present in the load zone and the fan is turned on and is circulating the air. 𝑐𝑖 is a constraint, 𝑚𝑖 a measurement and 𝑑𝑖 is a differential constraint who’s link in the graph can only be followed in one direction, i.e. 𝑥˙ can be found from 𝑥 but 𝑥 cannot be found from 𝑥. ˙
𝑑𝑇𝑤𝑎𝑙𝑙 ⋅ 𝑀𝑤𝑎𝑙𝑙 𝐶𝑝𝑤𝑎𝑙𝑙 = 𝑈 𝐴𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 ⋅ (𝑇𝑎𝑖𝑟 − 𝑇𝑤𝑎𝑙𝑙 ) . . . 𝑑𝑡 𝑀𝑟𝑒𝑓 ⋅ (𝑇𝑤𝑎𝑙𝑙 − 𝑇𝑒 ) + 𝑄˙ 𝑑𝑒𝑓 𝑟𝑜𝑠𝑡 ⋅ 𝑑𝑒𝑓 𝑟𝑜𝑠𝑡 . . . − 𝑈 𝐴𝑤𝑎𝑙𝑙−𝑟𝑒𝑓,𝑚𝑎𝑥 ⋅ 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 𝑑𝑇𝑎𝑖𝑟 𝑐2 : ⋅ 𝑀𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟 = 𝑈 𝐴𝑎𝑚𝑏−𝑎𝑖𝑟 ⋅ (𝑇𝑎𝑚𝑏 − 𝑇𝑎𝑖𝑟 ) − 𝑈 𝐴𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 ⋅ (𝑇𝑎𝑖𝑟 − 𝑇𝑤𝑎𝑙𝑙 ) 𝑑𝑡 𝑑𝑀𝑟𝑒𝑓 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 − 𝑀𝑟𝑒𝑓 𝑀𝑟𝑒𝑓 𝑐3 : = 𝑂𝐷 ⋅ − 𝑈 𝐴𝑤𝑎𝑙𝑙−𝑟𝑒𝑓,𝑚𝑎𝑥 ⋅ ⋅ (𝑇𝑤𝑎𝑙𝑙 − 𝑇𝑒 )/Δℎ𝑙𝑔 𝑑𝑡 𝜏𝑓 𝑖𝑙𝑙 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 ) ( 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 (1 − 𝛾) 𝑑𝑇𝑆𝐻 𝑐4 : = −𝑈 𝐴𝑆𝐻 ⋅ 𝐿 ⋅ Δℎ𝑙𝑔 − 1 𝑈 𝐴𝑤𝑎𝑙𝑙−𝑟𝑒𝑓,𝑚𝑎𝑥 ⋅ (𝑇𝑤𝑎𝑙𝑙 − 𝑑𝑡 𝑀𝑟𝑒𝑓 ( ( ( ) )) 𝑀𝑟𝑒𝑓 (𝑇𝑤𝑎𝑙𝑙 − 𝑇𝑎𝑖𝑟 ) + 𝑇𝑎𝑖𝑟 − 𝑇𝑒 . . . 𝑇𝑒 ) ⋅ 𝑇𝑆𝐻 − 𝐿 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 (1 − 𝛾) 𝑐1 :
𝑐5 : 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 ⋅ 𝑚 ˙ 𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟 = 𝑇𝑎𝑖𝑟 ⋅ 𝑚 ˙ 𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟 − 𝑈 𝐴𝑎𝑖𝑟−𝑤𝑎𝑙𝑙 ⋅ (𝑇𝑎𝑖𝑟 − 𝑇𝑤𝑎𝑙𝑙 ) 𝑐6 : 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 = 𝑇𝑆𝐻 + 𝑇𝑒 .. .
3.2 Structural Analysis
25
𝑚1 : 𝑦1 = 𝑃𝑒 𝑚2 : 𝑦2 = 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 𝑚3 : 𝑦3 = 𝑇𝑎𝑖𝑟 𝑚4 : 𝑦4 = 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 𝑚5 : 𝑦5 = 𝑇𝑤𝑎𝑙𝑙 𝑐7 : 𝑇𝑒 = 𝑇 𝐷𝑒𝑤𝑃 (𝑃𝑒 ) 𝑐8 : Δℎ𝑙𝑔 = 𝐻𝐷𝑒𝑤𝑃 (𝑃𝑒 ) 𝑑𝑇𝑤𝑎𝑙𝑙 𝑑 𝑑1 : = 𝑇𝑤𝑎𝑙𝑙 𝑑𝑡 𝑑𝑡 𝑑 𝑑𝑇𝑎𝑖𝑟 = 𝑇𝑎𝑖𝑟 𝑑2 : 𝑑𝑡 𝑑𝑡 𝑑𝑀𝑟𝑒𝑓 𝑑 𝑑3 : = 𝑀𝑟𝑒𝑓 𝑑𝑡 𝑑𝑡 𝑑 𝑑𝑇𝑆𝐻 = 𝑇𝑆𝐻 𝑑4 : 𝑑𝑡 𝑑𝑡 The differential constraints and the constraints 𝑐7 and 𝑐8 seen above are not considered able to fail. A Matlab Toolbox (SATool ) exists for performing a structural analysis when the constraints are known on the form shown here, see (Blanke and Lorentzen, 2006; Lorentzen and Blanke, 2004). Using this tool on the given system produces the bi-partite graph seen in figure 3.1 on the next page. All the vertices are variables, parameters and constraints and the edges between them show how they are linked in the system. The same results are presented in the form of an incidence matrix in appendix B. The analysis produces three unmatched constraints that can be used for residuals. For a fault in a constraint to be detectable at least one element in the corresponding residual vector has to be non-zero. Furthermore a unique fingerprint in the residual vector is necessary for identification. SATool is also capable of summing up these conditions and the resulting table seen in figure 3.2 on the following page is produced. As it is seen not all constraints are detectable and out of the five measurements that are primarily the focus in this project only three are isolable.
3.2.2
Constraints for Display Case Without Goods, Fan OFF
The same analysis as in the previous section is performed, this time using the dynamics of the display case with the fan turned off. It is already described
26
System Analysis
T wall
c1
c2
OD
DT wall T air
DT air
c3
c5
c4
M ref
DM ref T sh
c6
m1
m2
y1
def rost
Te
DT sh T airOut T ref Out
m3
m4
m5
y2
c7
c8
hlg
Pe
d1
d2
T amb
d3
y4
y3
d4
y5
Constraint Status
c1
c2
c3
c4
c5
c6
m1
m2
m3
m4
m5
c7
c8
i
0
i
d
d
d
i
d
i
d
i
-
-
Constraint Status
d1
d2
d3
d4
Figure 3.1: Bi-partite graph from structural analysis of display case without goods and with the fan turned on. Red: Unknown variable, Green: Input, Dark blue: Measurement, Black: Isolable, Purple: Detectable, Light blue: Undetectable and White: Cannot fail.
-
-
-
-
Figure 3.2: Summary of the complete d/i properties of the investigated system. (-: can’t fail, 0: undetectable, i: isolable, d: detectable)
3.2 Structural Analysis
27
in chapter 2 how the dynamics of the system change when the fan is switched off so in the following we go directly to the presentation of the constraints and the results obtained when the Matlab tools are used on them.
𝑑𝑇𝑤𝑎𝑙𝑙 ⋅ 𝑀𝑤𝑎𝑙𝑙 𝐶𝑝𝑤𝑎𝑙𝑙 = 𝑈 𝐴𝑎𝑖𝑟−𝑤𝑎𝑙𝑙,𝐹 𝑎𝑛𝑂𝐹 𝐹 ⋅ (𝑇𝑎𝑚𝑏 − 𝑇𝑤𝑎𝑙𝑙 ) . . . 𝑑𝑡 𝑀𝑟𝑒𝑓 ⋅ (𝑇𝑤𝑎𝑙𝑙 − 𝑇𝑒 ) + 𝑄˙ 𝑑𝑒𝑓 𝑟𝑜𝑠𝑡 ⋅ 𝑑𝑒𝑓 𝑟𝑜𝑠𝑡 . . . − 𝑈 𝐴𝑤𝑎𝑙𝑙−𝑟𝑒𝑓,𝑚𝑎𝑥 ⋅ 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 𝑑𝑇𝑎𝑖𝑟 𝑐2 : ⋅ 𝑀𝑎𝑖𝑟 𝐶𝑝𝑎𝑖𝑟 = 𝑈 𝐴𝑎𝑚𝑏−𝑎𝑖𝑟 ⋅ (𝑇𝑎𝑚𝑏 − 𝑇𝑎𝑖𝑟 ) 𝑑𝑡 𝑑𝑀𝑟𝑒𝑓 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 − 𝑀𝑟𝑒𝑓 𝑀𝑟𝑒𝑓 𝑐3 : = 𝑂𝐷 ⋅ − 𝑈 𝐴𝑤𝑎𝑙𝑙−𝑟𝑒𝑓,𝑚𝑎𝑥 ⋅ ⋅ (𝑇𝑤𝑎𝑙𝑙 − 𝑇𝑒 )/Δℎ𝑙𝑔 𝑑𝑡 𝜏𝑓 𝑖𝑙𝑙 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 ) ( 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 (1 − 𝛾) 𝑑𝑇𝑆𝐻 𝑐4 : = −𝑈 𝐴𝑆𝐻 ⋅ 𝐿 ⋅ Δℎ𝑙𝑔 − 1 𝑈 𝐴𝑤𝑎𝑙𝑙−𝑟𝑒𝑓,𝑚𝑎𝑥 ⋅ (𝑇𝑤𝑎𝑙𝑙 − 𝑑𝑡 𝑀𝑟𝑒𝑓 ( ( ( )) ) 𝑀𝑟𝑒𝑓 . . . 𝑇𝑒 ) ⋅ 𝑇𝑆𝐻 − 𝐿 (𝑇𝑤𝑎𝑙𝑙 − 𝑇𝑎𝑚𝑏 ) + 𝑇𝑎𝑚𝑏 − 𝑇𝑒 𝑀𝑟𝑒𝑓,𝑚𝑎𝑥 (1 − 𝛾) 𝑐1 :
𝑐5 : 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 = 𝑇𝑎𝑖𝑟
𝑐6 : 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 = 𝑇𝑆𝐻 + 𝑇𝑒 𝑚1 : 𝑦1 = 𝑃𝑒 𝑚2 : 𝑦2 = 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 𝑚3 : 𝑦3 = 𝑇𝑎𝑖𝑟 𝑚4 : 𝑦4 = 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 𝑚5 : 𝑦5 = 𝑇𝑤𝑎𝑙𝑙 𝑐7 : 𝑇𝑒 = 𝑇 𝐷𝑒𝑤𝑃 (𝑃𝑒 ) 𝑐8 : Δℎ𝑙𝑔 = 𝐻𝐷𝑒𝑤𝑃 (𝑃𝑒 ) 𝑑𝑇𝑤𝑎𝑙𝑙 𝑑 𝑑1 : = 𝑇𝑤𝑎𝑙𝑙 𝑑𝑡 𝑑𝑡 𝑑 𝑑𝑇𝑎𝑖𝑟 = 𝑇𝑎𝑖𝑟 𝑑2 : 𝑑𝑡 𝑑𝑡 𝑑𝑀𝑟𝑒𝑓 𝑑 𝑑3 : = 𝑀𝑟𝑒𝑓 𝑑𝑡 𝑑𝑡 𝑑 𝑑𝑇𝑆𝐻 = 𝑇𝑆𝐻 𝑑4 : 𝑑𝑡 𝑑𝑡 Like before using the SATool toolbox produces the bi-partite graph seen in figure 3.3 on the next page and the results are presented in the form of an incidence matrix in appendix B. This analysis again produces three unmatched constraints that can be used for residuals and the detectability/isolability properties of these are given in figure 3.4 on the following page.
28
System Analysis
T wall
c1
c2
OD
DT wall T air
DT air
c3
c5
c4
M ref
DM ref T sh
c6
m1
m2
y1
def rost
DT sh
T airOut
m4
m3
m5
y2
T ref Out T e
c7
c8
y3
hlg
Pe
d1
d2
T amb
d3
y4
d4
y5
Constraint Status
c1
c2
c3
c4
c5
c6
m1
m2
m3
m4
m5
c7
c8
i
i
i
d
d
d
i
d
i
d
i
-
-
Constraint Status
d1
d2
d3
d4
Figure 3.3: Bi-partite graph from structural analysis of display case without goods and with the fan turned off. Red: Unknown variable, Green: Input, Dark blue: Measurement, Black: Isolable, Purple: Detectable, Light blue: Undetectable and White: Cannot fail.
-
-
-
-
Figure 3.4: Summary of the complete d/i properties of the investigated system. (-: can’t fail, 0: undetectable, i: isolable, d: detectable)
3.2 Structural Analysis
29
It is noted how the monitorability of the system has changed but still two of the measurement constraints are not isolable just as faults in some of the other constraints in the system cannot be isolated by the generated parity relations. From the above it is evident that it is not possible to completely diagnose the display case in the refrigeration system using the standard structural approach to generating residuals and in the following two sections extended analyses are introduced.
3.2.3
Hybrid Structural Analysis
In (Laursen and Blanke, 2008) a method for using the hybrid features of a system to improving the detectability/isolability by using a combination of the residual vectors generated for each of the individual system states is presented. The idea is quite simple and utilizes that even though the fingerprint in the residual vector from a specific fault might not be unique in any of the system’s states alone, switching the system through its various states might very well produce a combination of residual vectors which is isolable. For the display case analyzed in the previous sections the hybrid structural analysis is a matter of combining the two dependency matrices from the cases with or without the fan turned on. This is done such that instead of searching for unique vectors in the three-dimensional residual from either one of the states the six-dimensional combination is used. Even though this procedure improves the general isolability of the system it does not solve our problem completely since the two measurements that were not isolable in the standard structural analysis still yields identical fingerprints.
3.2.4
Extended Structural Analysis
Since the analyses performed so far have not succeeded in making the system completely isolable it is not possible to diagnose the system using only passive methods. Active diagnosis methods apply auxiliary test signals to the inputs in order to excite specific parts of the system in a way such that faults are detectable in the outputs from the system. The use of the hybrid system structure for diagnosing faults is actually a kind of active diagnosis since at least one input signal has to be switched to reveal the entire residual vector but in this section however, we will apply a signal to the system inputs that mainly puts the system in some excited state rather than changing its dynamics. Therefore, the propagation of signals through the entire system
30
System Analysis
from inputs to outputs is of interest and will be investigated in this section. This analysis is related to the concept of input-output controllability (Skogestad, 1994; Skogestad and Postlethwaite, 2005). In (Gelso and Blanke, 2009) the following proposition about active fault isolation is stated: Active input to output structural isolation is possible if and only if both a structural condition and a quantitative condition are true. Structural condition: the known variables in the set of residuals associated with a group of nonstructurally isolable constraints include at least one control input. Quantitative condition: the transfer from control inputs to outputs is affected differently by faults on different constraints. And the following criteria for input to output reachability is used for designing algorithms for structural analysis extended with active fault isolation: Let 𝑝(𝑖,𝑗) = {𝑐𝑓 , 𝑐𝑔 , . . . , 𝑐ℎ } be a path through the structure graph from in∏ put 𝑢𝑖 to output 𝑦𝑗 , and (𝑖,𝑗) the union of valid paths from 𝑢𝑖 to 𝑦𝑗 . Let ∏ (𝑖,𝑗) 𝐶𝑟𝑒𝑎𝑐ℎ = {𝑐∣𝑐 ∈ (𝑖,𝑗) }. A constraint 𝑐ℎ is input reachable from input 𝑢𝑖 if a path exists from 𝑢𝑖 to output 𝑦𝑘 and the path includes the constraint, (𝑖,𝑗) 𝑐ℎ ∈ 𝐶𝑟𝑒𝑎𝑐ℎ . Two constraints, 𝑐𝑔 and 𝑐ℎ are active structural isolable if: (𝑖,𝑗) (𝑘,𝑙) (𝑖,𝑗) (𝑘,𝑙) 𝑐𝑔 ∈ 𝐶𝑟𝑒𝑎𝑐ℎ , 𝑐ℎ ∈ 𝐶𝑟𝑒𝑎𝑐ℎ , and {𝑐𝑔 , 𝑐ℎ } ∈ / 𝐶𝑟𝑒𝑎𝑐ℎ ∩ 𝐶𝑟𝑒𝑎𝑐ℎ . During the work with this project the algorithms from (Gelso and Blanke, 2009) were implemented into the existing architecture of SATool in order to exploit that kind of analysis on the refrigerations system as well. Appendix C shows the implementation in the Matlab toolbox. Using this extended structural analysis produces the following results for the display case. Figure 3.5 on page 32 shows the formatted output from the implemented algorithm for both the case with and without the fan turned on. It is seen that this analysis reveals isolability for all measurements indicating that an active diagnosis is a reasonable approach to apply throughout the rest of this project. It is necessary to take some of the system characteristics into account in the above analysis. For instance the discovered input-output reachability from the inputs 𝑂𝐷 and 𝐷𝑒𝑓 𝑟𝑜𝑠𝑡 in the display case should not be exploited simultaneously since as 𝑂𝐷 causes a drop in the measured temperatures while
3.2 Structural Analysis
31
𝐷𝑒𝑓 𝑟𝑜𝑠𝑡 causes an increase the effects on the outputs might cancel out. If further enhancement of the isolability is wanted the algorithm described here could relatively easy be combined with the hybrid analysis method from section 3.2.3.
32
System Analysis
c4
c5
c6
m1
m2
m3
m4
m5
c7
c8
d1
d2
d3
d4
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
1 1 1 1 1
1 1 1 1 1
0 0 0 0 0
0 0 0 1 1
0 0 0 0 0
1 0 1 1 1
defrost y1 y2 y3 y4 y5 Active isolability
c2
c3
c4
c5
c6
m1
m2
m3
m4
m5
c7
c8
d1
1 1 1 1 1 i
1 1 1 1 1 d
0 0 0 0 0 i
1 1 1 1 1 d
1 1 1 1 1 d
1 1 1 1 1 d
1 0 0 0 0 i
0 1 0 0 0 i
0 0 1 0 0 i
0 0 0 1 0 i
0 0 0 0 1 i
1 1 1 1 1
1 1 1 1 1
0 0 0 0 0
d4
c3
1 1 1 1 1
d3
c2
0 0 0 0 0
d2
OD y1 y2 y3 y4 y5
c1
Ccannot fail
c1
Ccan fail
1 1 0 1 1
0 0 0 0 0
1 0 1 1 1
(a) Display case with fan on.
OD y1 y2 y3 y4 y5
c1
c2
c3
c4
c5
c6
m1
m2
m3
m4
m5
c7
c8
d1
d2
d3
d4
1 1 0 0 1
0 0 1 1 0
1 1 1 1 1
1 1 1 1 1
0 0 0 1 0
1 1 1 1 1
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
1 1 1 1 1
1 1 1 1 1
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
1 0 1 1 1
defrost y1 y2 y3 y4 y5 Active isolability
c2
c3
c4
c5
c6
m1
m2
m3
m4
m5
c7
c8
d1
d2
d3
d4
Ccannot fail
c1
Ccan fail
1 1 1 1 1 i
0 0 1 1 0 i
0 0 0 0 0 i
1 1 1 1 1 d
0 0 0 1 0 d
1 1 1 1 1 d
1 0 0 0 0 i
0 1 0 0 0 i
0 0 1 0 0 i
0 0 0 1 0 d
0 0 0 0 1 i
1 1 1 1 1
1 1 1 1 1
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
1 0 1 1 1
(b) Display case with fan off.
Figure 3.5: Structural analysis extended with active fault isolation.
3.3 Failure Modes
3.3
33
Possible Faults in the Sensor Configuration
In this section the types of faults in the sensor configuration of refrigeration systems that will be dealt with in the sequel of this thesis are more thoroughly explored than in section 1.1 where they were introduced.
3.3.1
Nominal Situation
The C-matrix from the state-space description of 𝐺𝑦𝑢 in equation (1.3) can be considered as the connection between the physical quantities in the system {𝑃𝑒 , 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 , 𝑇𝑎𝑖𝑟 , 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 , 𝑇𝑤𝑎𝑙𝑙 } and the measurements {𝑦1 , 𝑦2 , 𝑦3 , 𝑦4 , 𝑦5 }. If the system has a correct sensor configuration we define the C-matrix to be the identity matrix of the same size as the number of measurements as seen in equation (3.4).
𝐶𝑛𝑜𝑚𝑖𝑛𝑎𝑙 =
𝑦1 𝑦2 𝑦3 𝑦4 𝑦5
𝑃𝑒 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 ⎛ 1 ⎜ 0 ⎜ ⎜ 0 ⎜ ⎝ 0 0
𝑇𝑎𝑖𝑟 0 0 1 0 0 1 0 0 0 0
𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 𝑇𝑤𝑎𝑙𝑙 ⎞ 0 0 0 0 ⎟ ⎟ 0 0 ⎟ ⎟ 1 0 ⎠ 0 1
(3.4)
If on the other hand a faulty sensor configuration is present and e.g. permutations of sensor connections to the controller can be described by the matrix Δ the resulting C-matrix, 𝐶𝑝𝑒𝑟𝑚 , can be found as in equation (3.5). This will be described further in the following sections. (𝐼 + Δ) = 𝐶𝑝𝑒𝑟𝑚
3.3.2
(3.5)
One Sensor is Faulty
If a single sensor fails the one in the corresponding diagonal element of the matrix in (3.4) changes to some other value, possibly a zero if the sensor fails completely. This is marked by ’𝛿’ in the C-matrix below:
𝐶𝑝𝑒𝑟𝑚 =
𝑦1 𝑦2 𝑦3 𝑦4 𝑦5
𝑃𝑒 𝑇𝑟𝑒𝑓,𝑜𝑢𝑡 ⎛ 1 ⎜ 0 ⎜ ⎜ 0 ⎜ ⎝ 0 0
𝑇𝑎𝑖𝑟 0 0 𝛿 0 0 1 0 0 0 0
𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 𝑇𝑤𝑎𝑙𝑙 ⎞ 0 0 0 0 ⎟ ⎟ 0 0 ⎟ ⎟ 1 0 ⎠ 0 1
(3.6)
If e.g. a temperature sensor that is supposed to be connected tightly to the outlet pipe of the evaporator or to the evaporator wall while some isolation
34
System Analysis
material, strapped around the sensor, minimizes the effect from the surrounding temperatures on the measurements becomes loose from its fitting the same temperature profile is expected to be measured but in a filtered version with some delay and a gain less than unity applied. The measurements might also include an increased term from the surroundings. Such fault signatures are included in 𝛿 in (3.6), however this type of faults is not going to be the main focus of the work presented here.
3.3.3
Permutations of the Physical Connections
If two or more sensors are connected to other inputs on the controller than they are expected to be this leads to a C-matrix which structure is no longer a diagonal. In theory all possible permutations of the known number of sensors and connectors are possible and if all sensors were to be connected by a totally random scheme the number of different situations would amount to 𝑛!, where ’𝑛’ is the number of sensors and ’!’ is the factorial operator. With five sensors in the system this gives us 120 possible ways to connect the sensors to the controller out of which only one is the expected configuration. If it is assumed that the sensors are most likely to be connected correctly to the controller the situation above, where any number of misconfigured sensors is allowed, can be reduced drastically by assuming that a faulty configuration only concerns two sensors at a time. Hence, the remaining (three in this system) sensors are assumed to be connected as expected while two sensors might be switched among themselves. Two random sensors can be 𝑛! selected in a number of unique combinations as seen here: 2!(𝑛−2)! , where ’𝑛’ is the cardinality of sensors. Two cases exist for each of these combinations, namely the expected configuration and the switched situation. The non-switched cases from each of the combinations are identical. Thus, 10 different faulty configurations plus one expected configuration exist for a system with five sensors under the assumption that three out of five sensors are always configured correctly, but without limiting these three sensors to specific sensors in the system. The 10 described combinations of faulty sensor configurations are shown in equation (3.7) where each C-matrix is ordered as shown in equation (3.4) for the nominal system. Such faults are the main focus of the detection scheme presented in this thesis and most examples are given with two sensors switched. However the methods are not limited as such and expansion of the allowed fault types can be considered as well.
3.3 Failure Modes
35
⎛
0 1 0 0 0
⎛
0 0 0 1 0
⎛
1 0 0 0 0
⎛
1 0 0 0 0
⎛
1 0 0 0 0
⎜ ⎜ ⎜ ⎜ ⎝ ⎜ ⎜ ⎜ ⎜ ⎝ ⎜ 𝐶𝑝𝑒𝑟𝑚 = ⎜ ⎜ ⎜ ⎝ ⎜ ⎜ ⎜ ⎜ ⎝ ⎜ ⎜ ⎜ ⎜ ⎝
𝑦1 , 𝑦2 1 0 0 0 0 1 0 0 0 0 𝑦1 , 𝑦4 0 0 1 0 0 1 0 0 0 0 𝑦2 , 𝑦3 0 0 0 1 1 0 0 0 0 0 𝑦2 , 𝑦5 0 0 0 0 0 1 0 0 1 0 𝑦3 , 𝑦5 0 0 1 0 0 0 0 0 0 1
: 0 0 0 1 0 : 1 0 0 0 0 : 0 0 0 1 0 : 0 0 0 1 0 : 0 0 0 1 0
0 0 0 0 1
⎞ ⎛
0 0 1 0 0
0 0 0 0 1
⎞ ⎛
0 0 0 0 1
0 0 0 0 1
⎞ ⎛
1 0 0 0 0
0 1 0 0 0
⎞ ⎛
1 0 0 0 0
0 0 1 0 0
⎞ ⎛
1 0 0 0 0
⎟ ⎟ ⎟ ⎟ ⎠
⎟ ⎟ ⎟ ⎟ ⎠
⎟ ⎟ ⎟ ⎟ ⎠
⎟ ⎟ ⎟ ⎟ ⎠
⎟ ⎟ ⎟ ⎟ ⎠
⎜ ⎜ ⎜ ⎜ ⎝ ⎜ ⎜ ⎜ ⎜ ⎝ ⎜ ⎜ ⎜ ⎜ ⎝ ⎜ ⎜ ⎜ ⎜ ⎝ ⎜ ⎜ ⎜ ⎜ ⎝
𝑦1 , 𝑦3 0 1 1 0 0 0 0 0 0 0 𝑦1 , 𝑦5 0 0 1 0 0 1 0 0 0 0 𝑦2 , 𝑦4 0 0 0 0 0 1 1 0 0 0 𝑦3 , 𝑦4 0 0 1 0 0 0 0 1 0 0 𝑦4 , 𝑦5 0 0 1 0 0 1 0 0 0 0
: 0 0 0 1 0 : 0 0 0 1 0 : 0 1 0 0 0 : 0 0 1 0 0 : 0 0 0 0 1
0 0 0 0 1
⎞
1 0 0 0 0
⎞
0 0 0 0 1
⎞
0 0 0 0 1
⎞
0 0 0 1 0
⎞
⎟ ⎟ ⎟ ⎟ ⎠ ⎟ ⎟ ⎟ ⎟ ⎠ ⎟ ⎟ ⎟ ⎟ ⎠ ⎟ ⎟ ⎟ ⎟ ⎠ ⎟ ⎟ ⎟ ⎟ ⎠
(3.7)
36
System Analysis
3.3.4
Summary of Faulty Sensor Configurations
∙ One fault: All sensors are connected as expected but one of them is faulty / not well fitted. ∙ Several faults: An extension to the above where multiple faults are allowed in an elsewise well-configured sensor system. ∙ Permutation of two sensors: All sensors are working and the configuration is assumed “almost correct”, meaning that any two sensors can be switched in their connection to the controller. 11 cases exist as explained in section 3.3.3. ∙ Permutation of sensors: An extension to the above where any number of sensors can be permuted in any possible deviation from the expected situation. 120 cases exist as explained in section 3.3.3. ∙ Permutations and faulty sensors: Combinations of the cases mentioned so far. Sensors can be both mutually switched and/or failing individually.
Chapter
4 Theoretical Foundation
In this chapter the theory for the methods used throughout the remaining chapters will be described. A short introduction to the different areas of research with references to previous works is given and the terminology and the equations that are found essential for the solutions presented in this project are described in details.
4.1
Fault Detection and Isolation
Fault detection and isolation is a subfield of control engineering which concerns itself with monitoring a system, identifying when a fault has occurred and pinpointing the type of fault and its location.(Wikipedia, 2009). The area of fault detection and Isolation (FDI) or simply fault diagnosis (FD) has been rapidly growing in the past, usually in association with control theoretic research and applications. The idea of incorporating some kind of intelligence into the controller structure such that faults in components or subsystems can be autonomously diagnosed and an alarm can be issued or proper action can be taken in the controller, has been known since the 1970’s where Dr. Beard from MIT at first put forward an idea that analytic redundancy was used to create residuals and that system faults could be found by comparing these residuals, which signed the beginning of this new technology (Beard, 1971; Cheng, 2008). Nowadays FD techniques have been heavily researched (Gertler, 2002; Isermann, 2005) and theory and techniques to obtain fault-tolerance are well underway (Blanke et al., 2001, 2006; Cheng, 2008; Z. and J., 2008) mainly expanding due the
38
Theory
increasing industrial demands for reliable and efficient control of systems that are getting more and more complex but still at continuously reduced costs. Most of these prevailing methods assume that a normal condition of a plant has been obtained and aim to diagnose deviations from normal during operation. When the controller is capable of reconfiguring itself if faults are detected such that trustworthy operation of the system can continue, but maybe at the cost of degraded performance, the technology is called fault-tolerant control (FTC) (Blanke et al., 2001). But obviously, without a reliable FD-scheme no fault-tolerant control can exist. When designing FDI algorithms one often starts by analyzing the system using e.g. structural analysis as shown in section 3.2 where the matching process can lead to unmatched constraints that can be used for forming residuals for passive fault detection. Furthermore such an analysis helps the designer to understand how reachable the different parts, and faults in these parts, of the system are and can be extended to include input-output reachability in order to reveal how an active fault detection approach can be used to improve the amount of faults that can be detected. See (Blanke et al., 2006). Passive FDI methods are based on random disturbance inputs or reference inputs on the system. Hence, faults can only be detected if they are excited by the inputs in a way that induces non-zero elements in the vector of residuals. Furthermore the fingerprint of each fault in the residual vector has to be unique for the fault to be isolable by the system. Clearly, this imposes situations where special kinds of faults might not be possible to uniquely identify or even to detect. Say that a residual vector has been designed for a system such that the sensitivity towards different faults is as desired. In the ideal case all elements of the vector are zero in the fault-free case and non-zero elsewise. This makes it very easy to detect the appearance of faults by using a simple threshold. However, all measured signals are exposed to noise and uncertainties and in such cases a statistical approach like the CUSUM detection is often applied. From (Blanke et al., 2006) the CUSUM test for change in the mean of a Gaussian sequence can be implemented with the following recursive decision function: ( ( )) 𝜇1 − 𝜇0 𝜇0 − 𝜇1 𝑔(𝑘) = 𝑚𝑎𝑥 0, 𝑔(𝑘 − 1) + 𝑧(𝑘) − (4.1) 𝜎2 2 where 𝜇0 is the mean value under the hypothesis 𝐻0 , 𝜇1 is the mean value under the hypothesis 𝐻1 and 𝜎 2 is the variance of the Gaussian distributed
4.2 Active Fault Diagnosis
39
noise on the data sequence 𝑧(𝑘). From (4.1) and a threshold value ℎ the following is decided: if 𝑔(𝑘) ≤ ℎ accept 𝐻0
(4.2a)
if 𝑔(𝑘) > ℎ accept 𝐻1
(4.2b)
The choice of the threshold ℎ is a compromise between the mean delay for detection and the mean time between false alarms and selecting a suitable value is usually done using the average run length (ARL) function which estimates both these quantities. The ARL function in the situation where changes in the mean of a Gaussian sequence is to be detected is approximated by the expression in (4.3a) and to calculate the mean time for detection (if 𝜇1 is present) and the mean time between false alarms (when 𝜇0 is present) the equations in (4.3b) and (4.3c) respectively, are evaluated (Blanke et al., 2006, p. 245).
( [ ( )] ( )) ( 2 ) 𝜇𝑠 ℎ 𝜇𝑠 ℎ 𝜎𝑠 𝜇𝑠 𝜇𝑠 exp −2 −1+2 + 1.166 + 1.166 2 2 𝜎𝑠 𝜎𝑠 𝜎𝑠 𝜎𝑠 2𝜇2𝑠 (4.3a) ) ( 2 ˆ (𝜇1 − 𝜇0 ) (4.3b) 𝜏ˆ ¯=𝐿 2𝜎 2 ) ( (𝜇1 − 𝜇0 )2 ˆ ¯ ˆ (4.3c) 𝑇 =𝐿 − 2𝜎 2
ˆ 𝑠) = 𝐿(𝜇
The calculations here are only good approximations if the assumption of white Gaussian noise holds and if the noise specification is somewhat accurate. If e.g. the variance of the measurement noise is known and this signal is filtered in the residual generator the resulting noise on the residual can be found by solving a Lyapunov equation as shown in (Blanke et al., 2006, p.646-648).
4.2
Active Fault Diagnosis
In the active fault diagnosis (AFD) approach an auxiliary input signal to the system can be designed to excite specified possible faults with a minimal effect in the complete system (Niemann, 2006). In addition, in a hybrid system, an actively controlled sequence of turning on or off different input signals might help in dividing the sensor signals group-wise into the subsystems they belong to. Using such a strategy to narrow down the amount of possible faults in the current situation might obviously be a way to improving the isolability of faults who’s responses in the residual vector would have
40
Theory
been confused with other faults if the entire system was diagnosed in the traditional way. The general state-space description of the system given by (4.4) will be used in the rest of the section (Niemann and Stoustrup, 2002). { 𝑒 = 𝐺𝑒𝑑 (Δ)𝑑 + 𝐺𝑒𝑢 (Δ)𝑢 Σ𝑃 : (4.4) 𝑦 = 𝐺𝑦𝑑 (Δ)𝑑 + 𝐺𝑦𝑢 (Δ)𝑢 where 𝑑 ∈ ℜ𝑟 is a disturbance signal vector, 𝑢 ∈ ℜ𝑟 the control input signal vector, 𝑒 ∈ ℜ𝑞 is the external output signal vector to be controlled and 𝑦 ∈ ℜ𝑝 is the measurement vector. Let Δ describe the system changes where Δ = 0 is the nominal situation and multiplicative faults in sensors or actuators are described by (4.5). 𝑦 = (𝐼 + Δ)(𝐺𝑦𝑑 𝑑 + 𝐺𝑦𝑢 𝑢)
(4.5)
A stabilizing feedback controller as in (4.6) can furthermore be applied to the system. { (4.6) Σ𝐶 : 𝑢 = 𝐾𝑦
Two different approaches for designing auxiliary signals to be injected into the system exist. The one investigated mainly in (Campbell et al., 2002; Choe et al., 2005; Nikoukhah and Campbell, 2006; Nikoukhah et al., 2002) uses a dedicated design procedure to design the auxiliary signal with respect to fast diagnosis or multi-model selection while the other approach ((Niemann, 2005, 2006; Poulsen and Niemann, 2008a,b, 2009)) applies a simple periodic input signal as seen in equation (4.7) 𝜂 = 𝐴𝜂 sin(𝜔0 𝑡)
(4.7)
The amplitude 𝐴𝜂 and frequency 𝜔0 are design parameters and should be chosen with several criteria in mind. The most important considerations are due to the system dynamics since proper gains from input to outputs are necessary at the test frequency. Furthermore a range where noise and disturbances are as insignificant as possible is preferable. This will improve the signal-to-noise ratio as will other criteria coming from the change detection method too. This is discussed later. In the latter method the auxiliary signal is decoupled from the residual in the ideal, fault-free case while the signature of the auxiliary signal can be detected when a change occurs. This property can be combined with a detection algorithm as e.g. the CUSUM described in section 4.1. In (Poulsen and Niemann, 2008a,b) the CUSUM test is used both based on amplitude alone and on amplitude and phase shift in the fault signature.
4.2 Active Fault Diagnosis
4.2.1
41
Youla-Kucera Parameterization in AFD
A plant model and the controller for a system can be represented as the ratio of two stable transfer functions each using a coprime factorization. Such a factorization can be denoted as in equation (4.8): ˜ −1 𝑁 ˜ ; 𝑁, 𝑀, 𝑁 ˜, 𝑀 ˜ ∈ 𝑅𝐻∞ 𝐺𝑦𝑢 = 𝑁 𝑀 −1 = 𝑀 ˜ ; 𝑈, 𝑉, 𝑈 ˜ , 𝑉˜ ∈ 𝑅𝐻∞ 𝐾 = 𝑈 𝑉 −1 = 𝑉˜ −1 𝑈
(4.8a) (4.8b)
The term coprime means that the two factors have no common zeros in ∣𝑧∣ > 1 which can be ensured if the double Bezout equation in (4.9) is satisfied (Tay et al., 1998). [
𝑉˜ ˜ −𝑁
˜ −𝑈 ˜ 𝑀
][
𝑀 𝑁
𝑈 𝑉
]
=
[
𝑀 𝑁
𝑈 𝑉
][
𝑉˜ ˜ −𝑁
˜ −𝑈 ˜ 𝑀
]
=
[
𝐼 0 0 𝐼
]
(4.9)
Using the above coprime factorizations the Youla-Kucera parameterization of all controllers that stabilize a given system can be written in terms of a stable transfer function 𝑄(𝑠) (often called the Youla-Kucera parameter) as follows: 𝐾(𝑄) = (𝑈 + 𝑀 𝑄)(𝑉 + 𝑁 𝑄)−1 = 𝑈 (𝑄)𝑉 (𝑄)−1 = 𝐹𝑙 (𝐽𝐾 , 𝑄)
(4.10)
where 𝐽𝐾 comes from (4.9): 𝐽𝐾 =
[
𝑈 𝑉 −1 𝑉˜ −1 𝑉 −1 −𝑉 −1 𝑁
]
(4.11)
With 𝑄 ∈ 𝑅𝐻∞ , all 𝐾(𝑄) stabilizes 𝐺. This can be utilized in the setup shown in figure 4.1 on the following page where 𝑄(𝑠) is the transfer function from 𝜖 to 𝜂. The setup is used e.g. for high performance control since with 𝑄(𝑠) = 0 the system is controlled solely by the nominal controller which might be stabilizing and very robust towards uncertainties causing the control strategy to be somewhat conservative. Then by choosing the prober stable transfer function 𝑄(𝑠) higher performance of the system can be obtained but still with the possibility of going back to the very robust controller by cutting the 𝜂-connection (Tay et al., 1998). The transfer function from 𝜂 to 𝜖 with 𝑄 in figure 4.1 on the next page replaced by an open loop is denoted by 𝑆(𝑠) and is called the dual YoulaKucera parameter since all systems stabilized by a given controller can be
42
Theory 𝑑
𝑒
Σ
𝑦
𝑢
+
𝑉˜ −1
˜ 𝑈 𝜂 𝑄 𝜖
˜ 𝑁
-
+
˜ 𝑀
Figure 4.1: An implementation of a system with feedback controller with the Youla-Kucera parameterization
parameterized in terms of this stable transfer function as shown in equation (4.12). 𝐺𝑦𝑢 (𝑆) = (𝑁 + 𝑉 𝑆)(𝑀 + 𝑈 𝑆)−1 ;
𝑆 ∈ 𝑅𝐻∞
(4.12)
The calculation/estimation of 𝑆 can be eased by the following simple relationship to the Youla-Kucera parameter (Niemann, 2003; Tay et al., 1998): 𝑆 = 𝐹𝑢 (𝐽𝐾 , 𝐺𝑦𝑢 (𝑆)
(4.13)
Hence, as described in (Niemann, 2003, 2006), the dual Youla-Kucera parameter can be explicitly calculated if the system is known. Furthermore if the system is subject to uncertainties or faults described by 𝐺𝑦𝑢 (Δ) the relationship between different descriptions of the uncertainties and the dual Youla parameter can be calculated where 𝑆 only depends on Δ and the coprime factors of the nominal system. See appendix D. An important feature of this setup is that the dual Youla-Kucera parameter is equal to zero in the nominal case. The properties of the normal and dual Youla-Kucera parameterizations described above can be exploited in an AFD scheme where 𝑆(Δ) is often called the fault signature matrix (Poulsen and Niemann, 2008a) and can be used as a measure of parameter variations. In such a scheme two signal vectors are considered, 𝜂 and 𝜖, again referring to figure 4.1. The setup can be denoted
4.2 Active Fault Diagnosis
43
as: [
𝑒 𝜖
]
=
[
𝐺𝑒𝑑 𝐺𝑒𝜂 𝐺𝜖𝑑 𝑆
][
𝑑 𝜂
]
(4.14)
In the AFD setup 𝜂 is the auxiliary input vector that can be designed to ˜𝑦−𝑁 ˜ 𝑢 is the residual vector. excite certain parts of the system while 𝜖 = 𝑀 Since the transfer function from input to residual is equal to the dual Youla transfer function the conditions for fault detection can be based on the following hypotheses (Niemann and Poulsen, 2009; Poulsen and Niemann, 2008a): 𝐻0 : 𝑆(Δ) = 0, 𝑓 𝑜𝑟 Δ = 0
(4.15a)
𝐻1 : 𝑆(Δ) ∕= 0, 𝑓 𝑜𝑟 Δ ∕= 0
(4.15b)
When the auxiliary input is periodic as shown in (4.7) and its frequency and amplitude is chosen in order to maximize the effect in 𝜖 while minimizing the effect in 𝑒 the signature of this signal will be detectable in the residual vector in the faulty case. One approach to detection is given in e.g. (Poulsen and Niemann, 2008a, 2009) where the following signals are formed: [
𝑠 𝑐
]
[
] sin(𝜔0 𝑡) =𝜖 cos(𝜔0 𝑡) [ ] [ ] 𝐴𝜂 (cos(2𝜔0 𝑡 + 𝜙) + cos(𝜙)) 𝜉 sin(𝜔0 𝑡) = ∣𝑆∣ + (sin(2𝜔0 𝑡 + 𝜙) + sin(𝜙)) 𝜉 cos(𝜔0 𝑡) 2
(4.16)
where ∣𝑆∣ and 𝜙 are gain and phase shift of the fault signature matrix 𝑆 at the chosen frequency. 𝜉 is the all-time present measurement noise. The signals in (4.16) consist of a constant signal and a time varying signal with zero mean and are assumed white when no fault is present (and 𝑆 = 0). The effects from the white noise and from the time varying parts are unimportant if an integration approach like the CUSUM mean value detector (equation (4.1)) is used to detect whether the means of the residual signals are zero or as described by the constant part of (4.16) using the knowledge of 𝑆(Δ𝑖 , 𝜔0 ). This detection is demonstrated for sensor permutations in section 4.3. Isolation of faults can be done by comparing the direction of 𝑆 in the complex plane with precalculated directions for the different faults, 𝑆(Δ𝑖 , 𝜔0 ) (Poulsen and Niemann, 2008a,b).
44
4.2.2
Theory
The dual Youla-Kucera Parameter for Permutations of the C-matrix
With the fault description of sensor permutations as it was given in equation (3.5) we have (see appendix D): 𝐺𝑦𝑢 (Δ) = (𝐼 + Δ)𝐺𝑦𝑢 ˜ Δ(𝐼 − 𝑁 𝑈 ˜ Δ)−1 𝑁 𝑆(Δ) = 𝑀
(4.17a) (4.17b)
Hence, when we have established the models Δ𝑖 for all the types of faults that we want to be able to diagnose the dual Youla-Kucera parameter, and therefore also the residual signal when the known input is applied, can be calculated for each of the faults. This knowledge of the signature to expect in the residuals can be utilized to isolate which faulty situation that is present in the system.
4.2.3
Stable Systems and Open-loop
If both the system 𝐺𝑦𝑢 and the controller 𝐾 are stable the Youla-Kucera setup can be simplified as shown in figure 4.2. 𝑑
𝑒
Σ
𝑦
𝑢
𝐾 𝜂
𝜖 𝐻𝑢
-
+
𝐻𝑦
Figure 4.2: Alternative setup for AFD using the theory from Youla-Kucera parameterization but without calculation of the coprime matrices.
Here 𝐻𝑦 and 𝐻𝑢 should be designed to decouple the signature from 𝜂 in 𝜖 in the nominal case and if possible also the effect from the disturbance inputs. The complete solution is: ˜ 𝐻 𝑦 = 𝑄𝑀 (4.18a) ˜ 𝐻 𝑢 = 𝑄𝑁
(4.18b)
4.2 Active Fault Diagnosis
45
which is easy to calculate when 𝐺𝑦𝑢 or (𝑀, 𝑁 ) is known. Moreover, the summation point creating the signal 𝜖 can be moved to the right of 𝐻𝑦 which then can be combined with 𝐻𝑢 into one block. This block can simply be the nominal transfer function of the system, 𝐺𝑦𝑢 . Obviously a controller is not needed for the purpose of AFD when the system is stable itself and the feedback part of 𝐾 can be set equal to zero in the setup from figure 4.2. Hence, the AFD can be performed in open-loop while the conditions for decoupling of 𝑢 and 𝜂 in the residual vector are unchanged from the closed-loop setup (Niemann and Poulsen, 2009).
4.2.4
Multi-model Identification
If a number of pre-defined fault models exist the AFD setup from the previous sections can be extended by including a number of residual vectors as illustrated in figure 4.3. Each one of the different residuals are created using
𝑑
𝑒
Σ
𝑦
𝑢 +
𝑉˜0−1
˜0 𝑈 𝜂 𝜖0
˜0 𝑁
-
.. .
+
.. .
˜0 𝑀 .. .
𝜖𝑖 ˜𝑖 𝑁
-
+
˜𝑖 𝑀
Figure 4.3: The multi-model AFD setup. 𝑖 is the model number with 𝑖 = 0 as the nominal model.
the parameterizations of the system including one of the 𝑖 pre-defined fault ˜0 . . . 𝑁 ˜𝑖 and 𝑀 ˜0 . . . 𝑀 ˜ 𝑖 or by using the simplified setup from models to form 𝑁 section 4.2.3 with the models of the faulty systems as single blocks inserted
46
Theory
instead. Clearly, the condition for system model identification is given by: 𝑆𝑖 (Δ) = 0, 𝑓 𝑜𝑟 Δ = Δ𝑖
(4.19a)
𝑆𝑗 (Δ) ∕= 0, 𝑓 𝑜𝑟 Δ = Δ𝑖 ; 𝑖 ∕= 𝑗
(4.19b)
Hence, both fault detection and isolation can be performed by identifying the fault model which produces a zero mean residual, or in the non-ideal case, the smaller residual signal of the 𝑖 possibilities.
4.2.5
Reduced Model Information
A major problem with the standard AFD methods is that they require a detailed model of the nominal system. Since the residuals are calculated as the difference between the output of the real system and the estimated output, less accurate models lead to more complicated fault detection, especially the task of separating the detection of residual signals stemming from real faults from that coming from inaccurate models is challenging. The refrigeration system that is the target application for this project is prone to significant nonlinear behaviors and parameter uncertainties and only a generic model of the system is known. Hence, a non-trivial modeling task would be necessary for almost every single system for which the AFD should perform well. In spite of this the idea described in this section utilizes that both the auxiliary input signal and the change detection can be constructed to work at a single frequency only. As a consequence we only need to have detailed information about the system for this frequency. In section 4.2.3 the design of 𝐻𝑦 and 𝐻𝑢 was mentioned in connection with decoupling the signature from the auxiliary signal in the residual. However, when the input is periodic with a single frequency as specified in (4.7) the decoupling condition only needs to be satisfied at the specific frequency range around the test frequency, 𝜔0 . The condition for obtaining a perfect decoupling of 𝜂 in 𝜖 in the nominal case is then reduced to: 𝐻𝑦 (𝑗𝜔)𝐺𝑦𝑢 (𝑗𝜔) − 𝐻𝑢 (𝑗𝜔)∣𝜔=𝜔0 = 0
(4.20)
and as a consequence: 𝐺𝑦𝑢 (𝑗𝜔) − 𝐻𝑦−1 (𝑗𝜔)𝐻𝑢 (𝑗𝜔) 𝜔=𝜔 = 0. Then, 𝐻𝑦−1 𝐻𝑢 0 is an approximation of the system at the specified frequency and the transfer function from 𝜂 to 𝜖 will be 0 in the nominal case for 𝜔 = 𝜔0 but is elsewise unknown. Thus, the detection criteria from equation (4.15) are still valid but not for any other frequencies (Niemann and Poulsen, 2009). Using this approach only very simple models of the system’s gain and phase shift at the test frequency are needed to generate the residuals. This reduces the complexity of calculating the residuals and is likely to make it much
4.2 Active Fault Diagnosis
47
easier to come up with models of even complex systems, e.g. using system identification methods or spectral analyses without knowledge of the exact state-space systems. The idea of reduced model information could be taken even further in that a reduced stabilizing controller that operates only at the specific frequency range needed for fault detection can be added to the system. Hence, also the system with reduced models can be used in the closed-loop setup. But for the case with possible sensor permutations a problem in connection with adding a controller to the system arises. Since the configuration is not known it is very hard to come up with a controller which is assured to stabilize the system as desired and for the SCV problem dealt with in this thesis a stable system without a controller in the loop is to be preferred. In (Stoustrup and Niemann, 2004) a design procedure for discrete time-varying compensators, that at least stabilizes a system with any finite number of sensor faults, is presented. Using the proposed scheme of cycling through a number of predefined controllers might be a way to include stabilizing feedback in the SCV solution presented in this thesis and the topic is suggested for future works. In section 4.3 a simple example with three sensor signals is used to demonstrate the use of the Youla-Kucera parameterization and the dual YoulaKucera parameter for the specific fault models we are mainly concerned with in this project, namely sensor permutations. Use of the theory is demonstrated both with and without the calculation of the eight coprime matrices.
48
4.3
Theory
Example: Youla-Kucera Parameterization for Detecting Sensor Permutations
In this section a simple two mass spring system which is adopted from (Niemann, 2006) and extended to three measurement signals is used to illustrate the Youla-Kucera parameterization of a linear system with an observer based feedback controller. Moreover, the calculation of the dual Youla parameter from a special fault description and its use to detect and isolate mutual permutations of the three sensor signals will be investigated. The purpose of the work described here was to: get acquainted with the Youla-Kucera parameterization and its utilization in AFD, use the description of the special type of fault a permutation of sensor signals is, investigate the dual Youla parameter as a multi-model detection and in connection with the CUSUM detector, and the soundness of this method on a simple transparent system. The system used for this example is as shown in the following state-space system: ⎛
0 0 ⎜ 0 0 (𝐴∣𝐵) = ⎜ ⎝ −1 1 0.5 −2.5 ⎛ 1 0 0 0 ⎝ 0 1 0 0 𝐶= 0 0 1 0
1 0 0 1 −0.2 0.2 0.1 −0.15 ⎞
⎞ 0 0 ⎟ ⎟ 1 ⎠ 0
(4.21a)
(4.21b)
⎠
for which an observer based feedback controller has been dimensioned with feedback gain 𝐹 and observer gain 𝐿 as given in (4.22) (
−0.6886 −1.1124 −0.6288 0.0837 ⎞ ⎛ −8.3733 16.2211 0.1 ⎜ −0.3220 −5.2795 0.3 ⎟ ⎟ 𝐿=⎜ ⎝ 2.1388 −70.0381 0.2 ⎠ 53.0028 −195.6965 0.7
𝐹 =
)
(4.22a) (4.22b)
such that both (𝐴 + 𝐵 ⋅ 𝐹 ) and (𝐴 + 𝐿 ⋅ 𝐶) have eigenvalues in the left half plane only. From (Tay et al., 1998) the Youla-Kucera parameterization of the system described by (4.21) and (4.22) is given by the following standard coprime
4.3 Example: Youla-Kucera Parameterization
49
Step 2
K*u u
x' = Ax+Bu y = Cx+Du
Perm _delta 1
Gyu Nominal 1
Step 3
K*u Multiport Switch 1
Perm _delta 2
y
K*u Vt^-1 u
Ut
Perm _delta 3
x' = Ax+Bu y = Cx+Du
x' = Ax+Bu y = Cx+Du
y
Scope y
n
Sine Wave 1 n
x' = Ax+Bu y = Cx+Du S_delta Nt u
e
x' = Ax+Bu y = Cx+Du
S
Mt x' = Ax+Bu y = Cx+Du
y
Figure 4.4: Example system with Youla-Kucera parameterization implemented in Simulink. The nominal state-space system is connected to permutations matrices and a switch such that two of the sensors can be swapped. A sine wave signal, 𝜂, is injected to the system and the dual Youla-Kucera parameter for the switching of sensor 1 and 2 is calculated and implemented for comparison.
matrices: ( (
𝑀 𝑁
𝑉˜ ˜ −𝑁
𝑈 𝑉 ˜ −𝑈 ˜ 𝑀
⎞ 𝐴 + 𝐵𝐹 𝐵 −𝐿 =⎝ 𝐹 𝐼 0 ⎠ 𝐶 + 𝐷𝐹 𝐷 𝐼 ⎞ ⎛ ) 𝐴 + 𝐿𝐶 −(𝐵 + 𝐿𝐷) 𝐿 =⎝ 𝐹 𝐼 0 ⎠ −𝐷 𝐼 𝐶
)
⎛
(4.23a)
(4.23b)
The factorizations can be calculated, checked to satisfy the Bezout equations from (4.9) and set up as in the Simulink diagram seen in figure 4.4. When simulating the system in figure 4.4 the signal 𝜖 (denoted 𝑒 in the figure) is zero when the sensors are connected as expected while the signature from the test signal is seen clearly when two sensors are switched.
50
Theory
By calculating the dual Youla-Kucera transfer function for the case with sensor 1 and 2 swapped using the fault description from section 3.3 and the first row of table D.1 on page 115 this can be inserted as shown in the figure and its output can be compared with 𝜖 while running a simulation with the two sensors switched. The results are shown in figure 4.5 on the next page. From the figure the expected behaviors are verified. To demonstrate how the same theory can be used without calculation of the coprime matrices, like it was described in section 4.2.3, the setup is changed as shown in figure 4.6 on page 52 The entire observer based feedback controller can be combined into one system as given in equation (4.24) (Hendricks et al., 2008). This is used in the setup seen in figure 4.6. ( ) 𝐴 + 𝐵 ⋅ 𝐹 + 𝐿 ⋅ 𝐶 −𝐿 𝐾𝑢𝑦 = (4.24) 𝐹 0 The simulation of this system yields the same behavior as seen before. To further investigate how the dual Youla-Kucera parameter can be used in a multi-model identification of pre-defined faults it is implemented for the different possible permutations of the three sensors. When the coprime matrices are not calculated the dual Youla transfer function cannot be calculated with the formula used previously but from the figure and the description of 𝐺𝑦𝑢 (Δ) the following transfer function from 𝜂 to 𝜖 can be found1 : 𝑆(Δ) = Δ(𝐼 − 𝐺𝑦𝑢 𝐾𝑢𝑦 − 𝐺𝑦𝑢 𝐾𝑢𝑦 Δ)−1 𝐺𝑦𝑢
(4.25)
The signals generated when the same auxiliary signal as is injected into the system is fed to the dual Youla-Kucera transfer functions calculated for the fault modes are then subtracted from 𝜖. Hereby the approach described in equation (4.16) can be applied to each of the resulting signals in combination with a CUSUM detector. Hence, the signal from the fault model which is currently present in the system shall have zero mean when subtracted from 𝜖 and it does not cause any detection in the CUSUM algorithm while all other fault models will lead to non-zero mean values in the residual. This is kind of an backward way to use the CUSUM method since the correct fault model is identified by the one of the detectors not showing any effect. However this might be exploited in a minimization procedure where the correct fault model is identified by the one of the CUSUM decision functions giving the 1
When the same description of the faults are used as before.
4.3 Example: Youla-Kucera Parameterization
51
0.5
0.4
0.3
0.2
ε
0.1
0
−0.1
−0.2
−0.3
−0.4
−0.5 200
300
400
500
600
700 Samples
800
900
1000
1100
1200
(a) 𝜖 from the Youla-Kucera setup. 0.5
0.4
0.3
0.2
S
0.1
0
−0.1
−0.2
−0.3
−0.4
−0.5
0
200
400
600 Samples
800
1000
1200
(b) The dual Youla-Kucera parameter 𝑆 with sensors 1 and 2 swapped.
Figure 4.5: Simulating the setup from figure 4.4. At sample 400 sensors 1 and 2 are switched.
52
Theory
Step 3 K*u u
x' = Ax+Bu y = Cx+Du
Step 1
Perm _delta 1
Gyu Nominal
K*u
Step 2
Perm _delta 2
y
Noise
K*u K u
Multiport Switch 1
Perm _delta 3
x' = Ax+Bu y = Cx+Du e
n
Test signal
e
Scope n
x' = Ax+Bu y = Cx+Du S_delta 1 x' = Ax+Bu y = Cx+Du S_delta 2 x' = Ax+Bu y = Cx+Du S_delta 3
e
In1
S1
CUSUM simple S2
S3
e S1 S2 S3 Nom
CUSUM Multi -Model
x' = Ax+Bu y = Cx+Du S_delta _nom x' = Ax+Bu y = Cx+Du Gyu Model
Figure 4.6: The setup in Simulink for using the theory from Youla-Kucera parameterization without calculating the coprime matrices. Dual YoulaKucera transfer functions for some possible sensor permutations are calculated and implemented along with some CUSUM detectors as described in the text. Measurement noise has been added to the system output.
4.3 Example: Youla-Kucera Parameterization
53
smallest deviation from zero. In large systems where many possible sensor permutations could occur the method described here implies a rather large number of CUSUM detectors to be implemented. An example of a simulation where the three sensors are configured correctly from the beginning, sensor 1 and 2 are switched at sample 600 and are put back in place at sample 1200 is shown in the figures 4.7 on the next page and 4.8 on page 55. In figure 4.7 it is seen how the CUSUM decision function builds up from sample 600 where the sensors are switched and decreases again after sample 1200. Likewise on figure 4.8 the decision function builds up from the beginning and drastically decreases when this fault model suddenly mirrors the system correctly. It is seen how the signals in figure 4.8a go towards zero. Thus, if choosing the correct model was based on the minimum of the decision functions a correct identification would have been the result in this example. The transfer functions, 𝑆(Δ𝑖 ), from 𝜂 to 𝜖 for the three different situations with switched sensors are seen below. They are calculated from equation (4.25) as: ⎤ ⎡ −(𝑠2 + 0.05𝑠 + 2)(𝑠2 + 4.37𝑠 + 23.52)(𝑠2 + 10.07𝑠 + 211.2) 𝑆(Δ12 ) = ⎣ (𝑠2 + 0.05𝑠 + 2)(𝑠2 + 4.37𝑠 + 23.52)(𝑠2 + 10.07𝑠 + 211.2) ⎦ 0 ( 2 )−1 ⋅ (𝑠 + 0.28𝑠 + 1.81)(𝑠2 + 0.08𝑠 + 2.78)(𝑠2 + 4.35𝑠 + 26.04)(𝑠2 + 10.08𝑠 + 207.1) ⎤ ⎡ 0 𝑆(Δ23 ) = ⎣ (𝑠 − 0.20)(𝑠2 + 0.35𝑠 + 2.47)(𝑠2 + 4.37𝑠 + 23.52)(𝑠2 + 10.07𝑠 + 211.2) ⎦ −(𝑠 − 0.20)(𝑠2 + 0.35𝑠 + 2.47)(𝑠2 + 4.37𝑠 + 23.52)(𝑠2 + 10.07𝑠 + 211.2) ( )−1 ⋅ (𝑠 + 1.99)(𝑠 + 1.19)(𝑠2 + 0.27𝑠 + 2.45)(𝑠2 + 4.13𝑠 + 11.63)(𝑠2 + 7.2𝑠 + 223.5) ⎤ ⎡ (𝑠 − 1)(𝑠2 + 0.15𝑠 + 2.5)(𝑠2 + 4.37𝑠 + 23.52)(𝑠2 + 10.07𝑠 + 211.2) ⎦ 0 𝑆(Δ13 ) = ⎣ 2 2 2 −(𝑠 − 1)(𝑠 + 0.15𝑠 + 2.5)(𝑠 + 4.37𝑠 + 23.52)(𝑠 + 10.07𝑠 + 211.2) ( 2 )−1 ⋅ (𝑠 + 0.44𝑠 + 0.77)(𝑠2 + 0.17𝑠 + 2.44)(𝑠2 + 3.12𝑠 + 34.59)(𝑠2 + 11.04𝑠 + 215.4)
where the subscripts on Δ indicate the two sensors that are swapped. Note that since the test signal is one dimensional while there are three outputs of the system each of the transfer functions above have one input and three outputs. As expected the dual Youla-Kucera parameter is seen to be zero for the sensor which is fault-free and non-zero for the two that are permuted. Bode plots of the transfer functions are seen in figure 4.9 on page 56. For comparison the Bode plots of the transfer functions from measurement noise
54
Theory
0.5
0.4
0.3
0.2
(ε − S(∆))⋅ η
0.1
0
−0.1
−0.2
−0.3
−0.4
−0.5
200
400
600
800 Samples
1000
1200
1400
(a) The signal (𝜖 − 𝑆(Δ0 ))𝜂 where Δ0 is the model of the correct sensor configuration. 6000
5000
g(x)
4000
3000
2000
1000
0
0
200
400
600
800 Samples
1000
1200
1400
1600
(b) The decision function from a CUSUM detector fed with the signal in figure 4.7a.
Figure 4.7: Simulating the setup from figure 4.6. Test for correct sensor configuration. At sample 600 sensors 1 and 2 are switched and at 1200 they are put back in place again.
4.3 Example: Youla-Kucera Parameterization
55
0.5
0.4
0.3
0.2
(ε − S(∆))η
0.1
0
−0.1
−0.2
−0.3
−0.4
−0.5
0
200
400
600
800
1000
1200
1400
Samples
(a) The signal (𝜖 − 𝑆(Δ1 ))𝜂 where Δ1 is the model of sensors 1 and 2 swapped. 6000
5000
g(x)
4000
3000
2000
1000
0
0
200
400
600
800 Samples
1000
1200
1400
1600
(b) The decision function from a CUSUM detector fed with the signal in figure 4.8a.
Figure 4.8: Simulating the setup from figure 4.6. Test for sensors 1 and 2 swapped. At sample 600 sensors 1 and 2 are switched and at 1200 they are put back in place again.
56
Theory 20 S(∆12) S(∆23) 0
S(∆13)
Magnitude (dB)
−20
−40
−60
−80
−100
−120 −1 10
0
1
10
2
10
10
Frequency (Hz)
Figure 4.9: Magnitude plot of dual Youla-Kucera parameters for three different sensor switcings.
0
Magnitude (dB)
−50
−100
y −−> ε 1
1
y2 −−> ε1 y3 −−> ε1 −150
y −−> ε 1
2
y2 −−> ε2 y −−> ε 3
−200
2
y −−> ε 1
3
y2 −−> ε3 y −−> ε 3
−250 −2 10
3 −1
10
0
10 Frequency (Hz)
1
10
2
10
Figure 4.10: Magnitude plot of noise-to-residual transfer functions.
on the three outputs to the residuals are plotted in figure 4.10 for the nominal system. The noise source is seen on figure 4.6 on page 52 and the transfer functions are found as: 𝜖(𝑠) 1 = 𝑛𝑜𝑖𝑠𝑒(𝑠) 1 − 𝐾𝑢𝑦 𝐺𝑦𝑢
(4.27)
These plots can assist in choosing the best frequency for the test signal. It shall be noted that the final solution to SCV for the supermarket refrigeration system as presented in later sections of this thesis operates in open-loop. Hence the measurement noise is not fed back in the loop and the transfer functions from noise to residuals simplifies to a unity gain.
4.4 Statistical Change Detection
4.4
57
Statistical Change Detection
Up to this point the detection of the signature from the auxiliary input signal in the residual generated by use of one of the AFD setups from the previous sections is performed using a CUSUM test for change in the mean value of the signal shown in equation (4.16). However the CUSUM test is a general method in which we do not exploit the knowledge we have about the special type of signal the presence of which we want to detect. If the periodic auxiliary input signal from (4.7) is used it is known a priori that the signal to be detected in the residual is also a periodic sine wave with the frequency 𝜔0 . The detection of such a sinusoid superimposed on white Gaussian noise is a common problem in many fields and because of its wide practical utility different dedicated detectors exist in the literature (Kay, 1998).
4.4.1
Detecting a Sinusoid
When the presence of a sinusoid with known frequency is going to be detected and knowledge about the independent noise also affecting the signal furthermore exists the detection problem can be stated using the hypotheses in equation (4.28). 𝐻0 : 𝑥[𝑛] = 𝑤[𝑛]
(4.28a)
𝐻1 : 𝑥[𝑛] = 𝐴 sin(𝜔0 𝑛 + 𝜙) + 𝑤[𝑛]
(4.28b)
𝑛 = 0, 1, . . . , 𝑁 − 1 where 𝑤[𝑛] is white Gaussian noise with variance 𝜎 2 and 𝐴 and 𝜙 are amplitude and phase which might be unknown. A GLRT2 decides 𝐻1 if: 𝐿𝐺 (x) =
ˆ 𝐻1 ) ˆ 𝜙, 𝑝(x; 𝐴, >𝛾 𝑝(x; 𝐻0 )
(4.29)
ˆ 𝜙ˆ is the Maximum Likelihood Estimator (Kay, 1998, p. 200). Thus, where 𝐴, (4.29) is the same as: 1
𝐿𝐺 (x) =
(2𝜋𝜎 2 )
𝑁 2
exp
[
− 2𝜎1 2 1
𝑁 (2𝜋𝜎 2 ) 2
2
∑𝑁 −1 (
ˆ ˆ 𝑛=0 𝑥[𝑛] − 𝐴 cos(2𝜋𝜔0 𝑛 + 𝜙) [ ∑ −1 2 ] exp − 2𝜎1 2 𝑁 𝑛=0 𝑥 [𝑛]
Generalized Likelihood Ratio Test, (Kay, 1998, p. 187)
)2 ]
>𝛾 (4.30)
58
Theory
where for large 𝑁 (Kay, 1993, p.193-195): v ⎡ u )2 (𝑁 −1 (𝑁 −1 )2 ⎤ u ∑ ∑ u2 𝑥[𝑛] cos(2𝜋𝜔0 𝑛) + 𝑥[𝑛] sin(2𝜋𝜔0 𝑛) ⎦ (4.31a) 𝐴ˆ = ⎷ ⎣ 𝑁 𝑛=0
𝑛=0
∑𝑁 −1
− 𝑥[𝑛] sin(2𝜋𝜔0 𝑛) 𝜙ˆ = arctan ∑𝑁𝑛=0 −1 𝑛=0 𝑥[𝑛] cos(2𝜋𝜔0 𝑛)
(4.31b)
Using the above in rewriting equation (4.30) as shown in (Kay, 1998, p. 266) leads to the following condition for deciding 𝐻1 : 2 𝑁 −1 1 ∑ (4.32) 𝑥[𝑛] exp(−𝑗2𝜋𝜔0 𝑛) = 𝐼(𝜔0 ) > 𝛾 ′ 𝑇 (𝑥) = 𝑁 𝑛=0
The detector in (4.32) is called the periodogram3 detector and is most easily implemented by computing the Fourier transform of 𝑥[𝑛], followed by a magnitude-squared operation and a scaling by 1/𝑁 .
150
100
Number of occurrences
Number of occurrences
120
80 60 40 20 0 0
0.1
0.2 0.3 0.4 0.5 0.6 Amplitude of residual signal at ω=ω 0
0.7
100
50
0 730
740 750 760 Amplitude of residual signal at ω=ω0
770
(a) Fault-free sensor configuration. Rayleigh(b) Permuted sensor configuration. Rician PDF is overlayed. 𝜇 = 0.29, 𝜎 2 = 0.014. PDF is overlayed. 𝜇 = 751, 𝜎 2 = 29
Figure 4.11: Histograms of residual amplitude using an FFT at 𝜔 = 𝜔0 , from simulations of the refrigeration system.
The condition (4.32) is only true if the assumptions of 𝐻0 and 𝐻1 from (4.28) hold. This is verified for the general AFD setup with perfect model fit in figure 4.13 on page 63 using an example system and for the supermarket refrigeration system by considering the histograms in figure 4.11. The histograms are created by simulation of the refrigeration system over a runtime of 220 hours for both a fault-free and a faulty system. An FFT is performed on a filtered residual4 signal and evaluated at the frequency of 3
𝐼(𝜔0 ) is the periodogram evaluated at 𝜔 = 𝜔0 The setup for creating the residual signal and for filtering to minimize model uncertainties are described in the following two chapters. 4
4.4 Statistical Change Detection
59
the test signal 𝜔0 . The probability density function (PDF) in figure 4.11a is seen to be (approximately5 ) Rayleigh as it is the case with the magnitude of a component of the Fourier transform of a white noise signal while the PDF of figure 4.11b is Rician as the magnitude of the Fourier transform of a cosine wave corrupted by additive white noise (Kay, 1998, p.30-31). Often the Fourier transform is implemented as a fast Fourier transform (FFT) (Proakis and Manolakis, 2006) and the knowledge of the signal frequency can be used to consider only the channel from the FFT results that corresponds to that frequency when comparing to a threshold. When an N-point FFT is performed on a data set with sampling frequency 𝐹𝑆 the amplitude corresponding to the known frequency, 𝜔0 , is found in channel: 𝑘0 =
𝜔0 𝑁 2𝜋 𝐹𝑆
(4.33)
Hence, the detection can be made very robust towards high frequent noise and low frequent disturbances or stationary off-sets by choosing the frequency of the test signal within a range with little noise or disturbance effects. The signal-to-noise ratio in the residual can be improved in several ways and might be a trade-off between conflicting criteria. As already mentioned the frequency of the test signal should be chosen within a range where noise and disturbances are as insignificant as possible and if a Bode plot of the dual Youla-Kucera transfer function is available a frequency that maximizes the gain can furthermore be chosen. Regarding the properties of the FFT the residual can be optimized by choosing the test signal frequency, 𝑓0 , and the sampling frequency, 𝐹𝑆 , such that the ratio 𝐹𝑆 /𝑓0 is an integer and the number of points in the FFT such that (4.33) is also an integer. This minimizes the leakage of signal energy from the test signal into other FFT channels than 𝑘0 . For the purpose of selecting the best suited threshold, 𝛾, for the specific situation formulas for calculating the probability of a false alarm (𝑃𝐹 𝐴 ) and the probability of detection (𝑃𝐷 ) are given in (Kay, 1998, p. 267): 𝑃𝐹 𝐴 = 𝑃 𝑟{𝐼(𝜔0 ) > 𝛾 ′ ; 𝐻0 } ( ) 𝛾′ = exp − 2 𝜎 5
(4.34)
The small shift is due to model uncertainties causing a slight component of the sinusoidal signal to be present under 𝐻0 too.
60
Theory
and 𝑃𝐷 = 𝑃 𝑟{𝐼(𝜔0 ) > 𝛾 ′ ; 𝐻1 } ( ′) 2𝛾 = 𝑄𝜒′2 (𝜆) 2 𝜎2
(4.35)
where 𝜆=
𝑁 𝐴2 2𝜎 2
(4.36)
In equation (4.35) 𝑄𝜒′2 is the right-tail probability or the probability that 2 (𝜆) the random variable exceeds the given value in a non-central chi-squared PDF. 𝜆 is the non-centrality parameter and the chi-squared PDF can be expressed by the following infinite series (Kay, 1998, p.26): 𝑝(𝑥) =
( 𝜆𝑥 )𝑘 (4𝜈 ) 𝑘! Γ 2 +𝑘 𝑘=0
] ∞ [ 𝜈 𝑥 2 −1 exp − 21 (𝑥 + 𝜆) ∑ 𝜈
22
(4.37)
∫∞ where the Gamma function is Γ = 0 𝑡𝑢−1 exp(−𝑡)𝑑𝑡, and 𝜈 = 2 in this case. (4.37) is implemented in a Matlab script (Qchirp2.m) described in (Kay, 1998, p.52-57) for the approximation of the right tail probability in (4.35). A simple example of this type of detection of a sinusoid in the residual vector is shown in section 4.5 where calculations of the probabilities of detection and false alarms are calculated too, using the formulas above.
4.5
Example: Periodogram Detector for Sinusoidal Signal
In the following the simple two mass spring system from section 4.3 is extended to demonstrate the implementation of a periodogram detector for detecting the presence of the sinusoidal signature from the test signal in the residual vector. The setup is shown in figure 4.12 on the facing page and follows exactly the theory described in section 4.4 such that the residual signal, 𝜖, generated as in section 4.3 is fed to a block performing an N-point FFT of a sequence of data selected by a running window. Because of its good performance a cosine tapered window function is used with a length of 256 samples in this example. The setup is made such that the residual signal is sampled with a
4.5 Example: Periodogram Detector
61
Step 3 K*u Step 1
x' = Ax+Bu y = Cx+Du
Perm _delta 1
Gyu Nominal
K*u Step 2 Perm _delta 2
input _uW_Delta
y
K*u K u
Multiport Switch 1
Perm _delta 3
x' = Ax+Bu y = Cx+Du
y
Sine Wave n
Noise x' = Ax+Bu y = Cx+Du e
e
Gyu Model
To Workspace3 To Workspace1
Zero-Order Hold
Select Rows Choose FFT -channel x[n] X[nL,k]
w window
k0_out
|u|
2
1/wL
fftout
w[n] Short -Time FFT
Magnitude Squared
Gain
To Workspace2
Figure 4.12: The setup from Simulink for demonstrating the periodogram detector on the two mass spring system. The setup includes measurement noise and input uncertainty.
frequency of 16𝐻𝑧 and that the windows overlap by half their length such that a new data sequence is started every 128th sample. Next, the results from the FFT are magnitude squared and normalized by the number of data points in the sequence. In the simulation setup both measurement noise and input uncertainty to the system is included. In this case the input uncertainty has a random direction in the complex plane and a magnitude of 10 to 20% at the frequency of the test signal. The direct output of the periodogram is plotted using a surface plot to show amplitude as a function of both simulation time and frequency for each of the three residuals corresponding to the three sensor signals. The simulation is performed with a switching of sensors 1 and 2 after 64s and a change back to the nominal configuration after 200s. Results are presented
62
Theory
in figure 4.13 on the next page. From the three surfaces in figure 4.13 it is seen how the output from the periodogram detector results in a random distributed amplitude over the frequency range for the entire simulation, with a maximum amplitude of 9 ⋅ 10−3 , when looking at residual three from the sensor that is kept at its right location (figure 4.13c). For the sensors that are switched away from their nominal configuration two very distinct peaks occur in the plot at the positive and negative frequency of the test signal respectively. It is seen how this peak totally makes the noise floor disappear with its amplitude settling at a level above 1.5 (figures 4.13a and 4.13b). Figure 4.14 on page 64 shows plots of the amplitude of the specific channel corresponding to the frequency of the test signal versus the simulation time for one of the switched sensors and for the one kept in place during the entire simulation. This time the simulation is performed under influence of rather severe measurement noise compared to the amplitude of the sinusoidal test signal. As it is seen on figure 4.14c the signature of the test signal is almost hidden in the noisy signal while it is still detectable by the periodogram as it is illustrated in figures 4.14a and 4.14b. Again it is seen clearly that a threshold could easily be chosen for this case, suitable of detecting when this type of fault occurs. If we want to use the theory from section 4.4 to calculate a threshold equations (4.34) and (4.35) are applied with the parameters: 𝜎 2 = 3 ⋅ 10− 2, 𝐴 = 0.2, 𝑁 = 256. If we choose e.g. 𝑃𝐹 𝐴 = 1/1, 000, 000 the threshold is found to 𝛾 = 0.4145 by direct use of the formula. Using this threshold along with the given parameters in the Matlab script Qchirp2.m gives the probability of detection of 100%. This makes sense if the amplitudes in figure 4.14 are observed since the highest amplitude in the fault-free case is around 0.13 while the lowest in the faulty case is around 1.5.
4.5 Example: Periodogram Detector
63
(a) Periodogram output from residual 1.
(b) Periodogram output from residual 2.
(c) Periodogram output from residual 3.
Figure 4.13: Simulating the setup from figure 4.12. At time, 𝑇 = 64𝑠 sensors 1 and 2 are switched and at 𝑇 = 200𝑠 they put back in place.
64
Theory 4
3.5
Amplitude at ω = ω0
3
2.5
2
1.5
1
0.5
0 0
50
100
150 Simulation time (s)
200
250
300
250
300
(a) Periodogram output from residual 1. 0.14
0.12
Amplitude at ω = ω0
0.1
0.08
0.06
0.04
0.02
0 0
50
100
150 Simulation time (s)
200
(b) Periodogram output from residual 3. 0.6 Sensor1 Sensor2 Sensor3 0.4
Residual vector ε
0.2
0
−0.2
−0.4
−0.6
−0.8 0
50
100
150 Simulation time (s)
200
250
300
(c) Residual vector, 𝜖 with measurement noise, 𝜎 2 = 3 ⋅ 10−2 .
Figure 4.14: Simulating the setup from figure 4.12. The output corresponding to the frequency of the test signal is selected. At time, 𝑇 = 64𝑠 sensors 1 and 2 are switched and at 𝑇 = 200𝑠 they put back in place.
Chapter
5 Solution Strategy for Configuration Validation
The proposed solution to active sensor configuration validation combines the theory from the Youla-Kucera parameterization used in an active fault diagnosis setup with a multi-model identification. Reduced models are used since only information around the specific frequency of an auxiliary test signal is of interest when the periodogram detector is applied to the generated residuals in order to decide which one of the pre-defined models of sensor permutations that minimizes the signature from the test signal in the residuals.
5.1
Solution to SCV
The entire solution to the SCV problem as it is presented here is sketched in the block diagram seen in figure 5.1 on the next page. The underlying theories of individual blocks have been described in details in chapter 4 and in the following the assembly into an entire solution strategy and the utilizations of the individual parts such that the desired diagnosis system is achieved will be described. The solution is based on a sinusoidal test signal, given by (5.1), that is applied to one of the inputs of the system and to input-output models esti-
66
Solution Strategy
mated a priori. 𝜂 = 𝐴𝜂 sin(𝜔0 𝑡)
(5.1)
The opening degree of the inlet valve, which is the only continuous input signal, is where the auxiliary test signal is applied for the diagnosis, while the other inputs are kept in states such that the system can be perturbated as desired. This means that the fan is turned ON while the defroster is left OFF. The test signal is designed with the maximum amplitude the system can accept without leaving its safe operation conditions. The frequency is chosen with respect to the optimization criteria mentioned throughout the relevant parts of this report but also with the physical system in mind. For refrigeration systems the test frequency must be chosen rather low (e.g. with a period of 768s) due to the low-pass filtering nature of the system’s thermodynamic inertia. However, choosing the frequency too low leads to very long detection times since at least a couple of sinusoidal periods must be sampled for the periodogram detector to be reliable. The residual signals are created by subtracting the outputs of the models from the system outputs. Figure 5.1 serves as good reference while reading this chapter. Note that a filter function, 𝑊 , is added to the residual signals in the figure even though this should be ignored for now. The filtering of the residuals in order to improve the robustness of the diagnosis scheme is introduced in chapter 6. In figure 5.1 no controller is included since the diagnosis is performed in open-loop as described in section 4.2.3. This means that for the setup to be applicable a system that is stable on its own is required. From the Youla-Kucera parameterization we know that a system with feedback controller can be parameterized in coprime matrices and set up for active fault diagnosis as in figure 4.1 on page 42. Or if the system is stable
𝜂
𝑦
𝑆𝑦𝑠𝑡𝑒𝑚
+ 𝐺𝑦1 𝑢 (𝜔0 ) 𝐺𝑦2 𝑢 (𝜔0 ) 𝐺𝑦3 𝑢 (𝜔0 ) 𝐺𝑦4 𝑢 (𝜔0 ) 𝐺𝑦5 𝑢 (𝜔0 )
Δ2 Δ1 Δ𝑛
𝜖
− .. .
𝑊
𝐼(𝜔0 )
(𝐼 + Δ𝑖 )ˆ 𝑦 𝑖 ∈ [1, 2, . . . , 𝑛]
𝑎𝑟𝑔𝑖 𝑚𝑖𝑛
𝑉 𝑎𝑙𝑖𝑑𝑎𝑡𝑖𝑜𝑛
Figure 5.1: Block diagram sketching the entire solution as proposed here.
5.1 Solution to SCV
67
the same can be achieved in open-loop without the controller. The auxiliary input signal, 𝜂, can be designed to excite the dynamics in the system as wanted and 𝜖 is the residual signal. In this case 𝜂 is chosen to be a periodic sinusoid with a known frequency due to its well-known and distinct signature. In the fault free case 𝜖 = 0 while the signature from the input signal is visible, possibly with some change in phase and amplitude, in the residual signal corresponding to e.g. a sensor which is not placed in its nominal configuration. If the faults that we aim to detect and isolate are described as in section 3.3 and repeated in equation (5.2) for convenience, 𝐺𝑦𝑢 (Δ𝑖 ) and hence also 𝜖𝑖 can easily be calculated for a number of system configurations (Δ𝑖 ) besides the one with the nominal sensor configuration. (𝐼 + Δ) = 𝐶𝑝𝑒𝑟𝑚
(5.2a)
𝐺𝑦𝑢 (Δ) = (𝐼 + Δ)𝐺𝑦𝑢
(5.2b)
This is illustrated in figure 5.1 as a block containing all the 𝑛 known fault descriptions: Δ𝑖 ∈ {Δ1 , Δ2 , . . . , Δ𝑛 }
(5.3)
with an input 𝑖 coming from a minimization block which solves the equation: 𝑎𝑟𝑔𝑖 𝑚𝑖𝑛 {𝑇 (𝐺(𝜔0 ) − (𝐼 − Δ𝑖 )𝐺𝑦𝑢 (𝜔0 ))} = 𝑎𝑟𝑔𝑖 𝑚𝑖𝑛 {𝐼(𝜔0 )Δ𝑖 }
(5.4)
In (5.4) 𝐺 is the system output that might be misconfigured, 𝐺𝑦𝑢 (𝜔0 ) is the combination of the input-output models at the test frequency and 𝑇 (𝑥) and 𝐼(𝜔0 ) are the periodogram detector as described in equation (4.32) in section 4.4. The result from the minimization (5.4) is the solution to the SCV problem. From the setup just described the sensor configuration validation in the ideal case boils down to showing that the residual signal generated by the nominal model is zero while all the other elements in the residual vector contain the sinusoidal signature of the auxiliary input signal. However, due to noise on the measurement signals and rather large uncertainties in the modeling of the refrigeration systems the sinusoidal signature will be present to some extent in the entire residual vector under all conditions. Therefore the minimization is applied such that the model producing a residual vector which contains the auxiliary input signal signature with least amplitude is identified as the one which best describes the conditions of the system. The hypothesis is that the fault signature from the switching of sensors will be large enough to be distinct compared to the fault signature originating from
68
Solution Strategy
model uncertainties only. Before the minimization process is used to select the model with the highest belief the residual vector is transformed into a vector containing just the amplitudes at the specific frequency that is applied at the input. This is done using the periodogram detector, as already mentioned in (5.4) and repeated in equation (5.5). The periodogram is evaluated at the frequency of the auxiliary input signal, 𝜔0 . 1 𝑇 (𝑥) = 𝑁
𝑁 −1 2 ∑ 𝑥[𝑛] exp(−𝑗2𝜋𝜔0 𝑛) = 𝐼(𝜔0 )
(5.5)
𝑛=0
The peridogram detector in the current implementation is dedicated for detecting the presence of a sinusoid with known frequency but unknown amplitude and phase and is therefore chosen to produce the residual vector to be used in the minimization process. Since this method solely responds to signal content at the specific frequency 𝜔0 it is very robust towards high frequent noise and low frequent disturbances as long as the frequency of the test signal is designed to lie within another range. Furthermore as a consequence of this detection method the residual signals generated from the models need only to be accurate around the frequency 𝜔0 and the models of the system can be reduced to simply a phase shift followed by a gain corresponding to those of the transfer function of the system at the specific frequency. Hence, advanced models are not needed and well-established system identification tools might be applied to sets of test data to estimate the two parameters for each sensor output.
5.2
Models for Model-based Diagnosis
As it should be clear from the description of the proposed method in chapter 5 the solution to the SCV problem is model-based in two ways. For creating the residual signals as accurate as possible input-output models of the system are needed and for the minimization process in the fault isolation part of the diagnosis, models of the possible faults that we want to test for are necessary.
5.2.1
Fault Models
When we are considering permutations of sensors at the connections to the controller only, the fault models to be minimized over are found relatively easy. With the fault description as in section 4.2.2 the term 𝐶𝑝𝑒𝑟𝑚𝑖 as in equation (5.6) for all possible permutations Δ𝑖 is all we need to know for
5.2 Models
69
complete fault models that can be applied to the outputs from the models of the system in order to identify the one that produces the smaller amplitude in the residual. (𝐼 + Δ𝑖 ) = 𝐶𝑝𝑒𝑟𝑚𝑖
(5.6)
Using the descriptions of Δ𝑖 as e.g. described in section 3.3 the fault models are given using equation (5.6). For other types of faults, for example a sensor that has become loose from its fitting, to be taken into consideration the fault models get harder to estimate since an unknown filter function can replace any of the diagonal elements in the nominal C-matrix and if the combination of the two kinds of faults are allowed the situation gets even more complex. This is not considered further within the scope of the work presented in this report.
5.2.2
Simplified Input-output Models of the System
Models describing the behavior of the system from the input at which the test signal is applied to all the outputs to be diagnosed as accurate as possible are important for the creation of residual signals. As explained in section 4.2.5 simplified models of the system that describe the dynamics of the system at a limited range of frequencies only can be utilized due the auxiliary test signal with a single known frequency and the peridogram detector that works solely at that frequency. Then contents in the residual at all other frequencies are of no importance, thus there is no need to waste a lot of effort on constructing accurate models at all frequencies when the target system might be rather complex and nonlinear. Furthermore because of the sinusoidal signature of the auxiliary signal and thus also of the fault signature to be detected in the residuals simple informations about the gain and phase-shift from input to outputs of the system at the specific test frequency are needed. Such simplified input-output models of the system can be estimated using e.g. spectral analysis of test data from real systems that are known to be configured correctly and expected to belong to the same class of systems as the one to be diagnosed or from data obtained from simulations of the model described in chapter 2 with the parameters appropriately tuned. For other display cases, with e.g. significant differences in construction a tuning of the two parameters for each input-output model might be necessary for the SCV method to be robust. This is further discussed in chapter 6 but for now it shall be noted that the reduction of system models into gain and
70
Solution Strategy
phase shift informations at specific frequencies only makes such a tuning to other systems easier.
5.3
Results
When using the above algorithm in a simulation environment where the Dymola model from chapter 2 is used both for estimating the gain and phaseshift for the models and for producing data in the simulations, good results are produced. Obviously the detection works very well since the same model is used to generate the a priori models and to simulate the real system even though measurement noise is added, but even when input uncertainty and rather large parametric variations1 were introduced in the simulation model after gain and phase-shift for the models had been estimated the system still proved to yield rather convincing results with the minimization choosing the correct fault (or nominal) model. Test data from several real refrigeration systems were collected in the refrigeration lab at Danfoss A/S and the method tested using these data but still with the gain and phase estimates from the Dymola model. From the tests performed with the real data it has been clear that the variations in the real systems are much larger and more interconnected than simulated and therefore deviate so drastically from the model that the amplitude resulting from the detection algorithm in some cases is completely random and not connected to any of the fault models. Of course such a situation makes it impossible to perform any identification. Having said that, the impression is that the method performs very well as long as the target system belongs to the class of systems that the a priori models are tuned for. For other refrigeration systems deviating drastically in both physical dimensions and constructions such that the models used do not describe the systems well enough for the SCV method to be reliable the models must be tuned to a better fit e.g. using a sample data set from that class of systems. Test and simulations are shown in chapter 6.
1
Such as variations in display case size, air flow and evaporator size.
Chapter
6
Tests and Robustness Issues
In this chapter it will first be discussed how the strong dependency on accurate models can be loosened a bit such that the class of systems on which the SCV works robustly without tuning of the model parameters can be expanded. Next, results from both simulations and from real display cases in the refrigeration lab at Danfoss A/S are used to demonstrate the effect of the introduced filtering as well as to validate the SCV solution strategy as proposed.
6.1
Robustness to Uncertain Models
As seen, the proposed solution to the sensor configuration validation problem is a very strong method for identifying the connection (nominal or faulty) of a number of sensors to a controller, even in the presence of rather severe measurement noise and low frequent disturbances thanks to the focus on a single test frequency. But it is also noted that the method, due to the model-based nature of the residual signal generation, is somewhat vulnerable to uncertainties in the plant models used. The hypothesis for correct fault isolation as stated in chapter 5, that the fault signature from the switching of sensors will be large enough to be distinct from the fault signature originating from model uncertainties only, is an unalterable demand for the proposed solution to work as intended. However, as seen from the practical experiments, the vast variety of parameters in the refrigeration systems and the rather large set of values they can be taken from depending on the specific refrigeration system in question, are likely to cause too large unwanted
72
Tests and Robustness Issues
fault signatures originating from the system’s deviation from the models if the latter are not tuned appropriately to the specific plant. Thus, without any modifications the presented solution works perfectly as intended only on a class of systems limited to the vicinity of the nominal plant used for the input-output models of the system as it is described in the previous sections. In the literature several efforts on making model-based fault diagnosis more robust to uncertain plants are described. One interesting approach is called “eigenstructure assignment for decoupling” and is described e.g. in (Chen and Patton, 1999; Tai et al., 2002; Xu and Tseng, 2007). In this method it is analyzed how the model uncertainties propagate to the residuals and an observer gain that eliminates all elements from the model uncertainties in the residual is designed. This is achieved by an observer eigenstructure such that all the rows of the matrix 𝐶 are left eigenvectors of 𝐴 − 𝐿𝐶, where 𝐿 is the observer gain. The desired eigenstructure might however not be perfectly assignable (Chen and Patton, 1999; Tai et al., 2002). In the scope of the sensor configuration validation presented here the “eigenstructure assignment” cannot be directly utilized since the residuals do not rely on observer-based output models of the system. Furthermore accurate knowledge of the 𝐴 and 𝐶 matrices is necessary for this theory to apply. In spite of this the analysis of the model uncertainties’ effect on the residuals and the line of thinking from the before mentioned references will be followed in the sequel.
6.1.1
Model Uncertainties in the Residuals
The model of the system in question is described in state-space form of 𝐺𝑦𝑢 in (6.1). ˆ˙ = 𝐴ˆ 𝑥 𝑥 + 𝐵𝑢 𝑦ˆ = 𝐶 𝑥 ˆ
(6.1)
where the 𝐴, 𝐵 and 𝐶 matrices are the best known descriptions of the dynamics in the real system. Likewise the actual system can be described in state-space form as in (6.2). 𝑥˙ = [𝐴 + Δ𝐴] 𝑥 + [𝐵 + Δ𝐵] 𝑢 + 𝑤 𝑦 = [𝐶 + Δ𝐶 + Δ𝑝𝑒𝑟𝑚 ] 𝑥 + 𝑣
(6.2)
where {Δ𝐴, Δ𝐵, Δ𝐶} describe the unknown model uncertainties1 , 𝑤 and 𝑣 are input and measurement noises respectively while Δ𝑝𝑒𝑟𝑚 describes the 1
How the actual plant deviates from the model.
6.1 Robustness to Uncertain Models
73
possible permutations of the sensor connections. If (6.2) is divided into the known and unknown parts, we get: [ ] 𝑥 𝑥˙ = 𝐴𝑥 + 𝐵𝑢 + [Δ𝐴 Δ𝐵] +𝑤 𝑢 𝑦 = [𝐶 + Δ𝑝𝑒𝑟𝑚 ]𝑥 + Δ𝐶𝑥 + 𝑣
(6.3)
From (6.1) and (6.3) the residual signals can be deduced: 𝑟 = 𝑦 − 𝑦ˆ = [𝐶 + Δ𝑝𝑒𝑟𝑚 ]𝑥 + Δ𝐶𝑥 + 𝑣 − 𝐶 𝑥 ˆ = 𝐶𝑒 + Δ𝐶𝑥 + Δ𝑝𝑒𝑟𝑚 𝑥 + 𝑣, 𝑒 = 𝑥 − 𝑥 ˆ
(6.4)
The estimation error 𝑒 is given as: 𝑒=𝑥−𝑥 ˆ [
𝑥 𝑢
]
𝑒˙ = 𝐴𝑥 + 𝐵𝑢 + [Δ𝐴 Δ𝐵] + 𝑤 − (𝐴ˆ 𝑥 + 𝐵𝑢) [ ] 𝑥 = 𝐴𝑒 + [Δ𝐴 Δ𝐵] +𝑤 𝑢
⇓
𝑒 = (𝑠𝐼 − 𝐴)
−1
( [ ] ) 𝑥 [Δ𝐴 Δ𝐵] +𝑤 𝑢
(6.5)
which inserted in (6.4) gives: ( [ ] ) 𝑥 −1 𝑟 = 𝐶(𝑠𝐼 − 𝐴) [Δ𝐴 Δ𝐵] + 𝑤 + Δ𝐶𝑥 + Δ𝑝𝑒𝑟𝑚 𝑥 + 𝑣 𝑢 [ ] 𝑥 = 𝐶(𝑠𝐼 − 𝐴)−1 [Δ𝐴 Δ𝐵] + Δ𝐶𝑥 + Δ𝑝𝑒𝑟𝑚 𝑥 + 𝑛𝑜𝑖𝑠𝑒 (6.6) 𝑢 Isolating 𝑥 in equation (6.2), inserting it in (6.6) and assuming that Δ𝑝𝑒𝑟𝑚 = 0 yields: ( ) 𝑟 = 𝐶(𝑠𝐼 − 𝐴)−1 Δ𝐴(𝑠𝐼 − 𝐴 − Δ𝐴)−1 (𝐵 + Δ𝐵) + Δ𝐵 𝑢 . . . + Δ𝐶(𝑠𝐼 − 𝐴 − Δ𝐴)−1 (𝐵 + Δ𝐵)𝑢 + 𝑛𝑜𝑖𝑠𝑒
(6.7)
The expression in (6.7) can be used to calculate how different amounts of model uncertainty affect the residuals and therefore also to estimate how large uncertainties that can be handled by the SCV method, e.g. by comparison with the dual Youla-Kucera parameters for the faulty situations. However, sufficient knowledge of the target system for placing realistic amounts of uncertainty on realistic elements in the 𝐴-, 𝐵- and 𝐶-matrices is not
74
Tests and Robustness Issues
within the scope of this project. If we assume that the system have direct measurements we can neglect Δ𝐶 and it can be seen from (6.6) that the remaining terms from the model uncertainties are multiplied by the factor 𝐶(𝑠𝐼 − 𝐴)−1 in the residual. Note that the 𝐴 and 𝐶 matrices here are the known ones from the model and not from the actual plant. Hence, if it is possible to filter the residual with a weight function 𝑊 such that: 𝑊 𝐶(𝑠𝐼 − 𝐴)−1 = 𝑊 𝐶(𝑗𝜔𝐼 − 𝐴)−1 → 0 𝑓 𝑜𝑟 𝜔 → 𝜔0
(6.8)
without suppressing the term 𝑊 Δ𝑝𝑒𝑟𝑚 𝑥 too much, the ratio between wanted and unwanted signals in the residuals might drastically improve. In the setup in question here it is not possible to completely eliminate the term from equation (6.8) however it can be moved to a direction which contains minimum energy as will be explored in the following section.
6.1.2
Singular Value Decomposition for Minimum Energy Errors
For an 𝑚 × 𝑛 matrix 𝐺 unitary matrices 𝑈 and 𝑉 exist such that (Antsaklis and Michel, 2007, p.493) 𝐺 = 𝑈 Σ𝑉 ∗ where 𝑉 ∗ is the complex conjugate transpose of 𝑉 and: ⎤ ⎡ 0𝑟×(𝑛−𝑟) Σ𝑟 ⎦ Σ=⎣ 0(𝑚−𝑟)×𝑟 0(𝑚−𝑟)×(𝑛−𝑟)
(6.9)
(6.10)
with Σ𝑟 = 𝑑𝑖𝑎𝑔(𝜎1 , 𝜎2 , . . . , 𝜎𝑟 ) such that 𝜎1 ≥ 𝜎2 ≥ . . . ≥ 𝜎𝑟 ≥ 0 . This is called the singular value decomposition (SVD) of 𝐺 and the unique 𝜎𝑖 are called the singular values. The unitary matrices 𝑈 and 𝑉 are not unique.
It can be shown that the largest and the smallest gains for any input direction are equal to the maximum and the minimum singular values respectively (Skogestad and Postlethwaite, 2005, p.77) such that for any vector ∥𝑣∥2 ∕= 0: 𝜎(𝐺) ≤
∥𝐺𝑣∥2 ≤ 𝜎(𝐺) ∥𝑣∥2
(6.11)
6.1 Robustness to Uncertain Models
75
Hence, 𝑦 = 𝐺𝑣 is bounded as shown above while the exact value depends on the direction of 𝑣. This can be exploited to solve for 𝑥 in: 𝑎𝑟𝑔𝑥 𝑚𝑖𝑛 ∥𝐺𝑥∥2
(6.12)
Let 𝑣𝑖 be the right singular vectors of 𝐺 (the columns of 𝑉 ) and consider 𝑥 in the singular value directions 𝑣𝑖 : 𝑥 = 𝛼𝑣𝑖 , with ∣𝛼∣ = 1 such that ∥𝑥∥ = 1. Then, since 𝑣𝑖∗ 𝑣𝑗 = 0, 𝑖 ∕= 𝑗 and 𝑣𝑖∗ 𝑣𝑗 = 1, 𝑖 = 𝑗: 𝑦 = 𝐺𝑥 = 𝛼𝐺𝑣𝑖 = 𝛼𝜎𝑖 𝑢𝑖 ⇓ ∥𝑦∥2 = ∥𝐺𝑥∥2 = 𝜎𝑖
(6.13)
since the norm of the left singular vector,∥𝑢𝑖 ∥2 = 1. From (6.13) the solution to (6.12) is: 𝑎𝑟𝑔𝑥 𝑚𝑖𝑛 ∥𝐺𝑥∥2 = 𝑣𝑟
(6.14)
where 𝑣𝑟 is the right singular vector corresponding to the smallest singular value of 𝐺. In the exact same manner it can be shown that: 𝑎𝑟𝑔𝑥 𝑚𝑖𝑛 ∥𝑥𝐺∥2 = 𝑢∗𝑟
(6.15)
where 𝑢𝑟 is the left singular vector corresponding to the smallest singular value of 𝐺 (Antsaklis and Michel, 2007). At this point it is obvious that the weight 𝑊 from (6.8) can be chosen such that the gain of the factor 𝑊 𝐶(𝑗𝜔𝐼 − 𝐴)−1 , and therefore also the effect of the model uncertainties in the 𝐴 and 𝐵 matrices, is minimized. When 𝑊 = 𝑢∗𝑟 is chosen to be the complex conjugate transpose of the left singular vector corresponding to the smallest singular value of 𝐶(𝑗𝜔𝐼 − 𝐴)−1 this desired gain suppression is achieved, however the effect of the filtering depends on the ratio between the largest and the smallest singular values, called the condition number of the matrix (Skogestad and Postlethwaite, 2005, p.82). Because of the proposed method’s ability to reject disturbances at other frequencies than the specific test frequency applied to the input, 𝜔0 can simply be inserted such that the SVD is calculated for that frequency only. This leads to yet another optimization criteria for the fault diagnosis procedure since the test signal frequency, 𝜔0 , can be chosen in order to produce the smallest possible singular value of 𝐶(𝑗𝜔0 𝐼 − 𝐴)−1 as long as the other optimization criteria2 mentioned so far in this thesis are not violated. 2
Such as: maximum gain from input to outputs, diagnosis time consumption considerations and restrictions due to accurate FFT calculations.
Tests and Robustness Issues
Improved Robustness on the Refrigeration System
In order to estimate a linear state-space model of the refrigeration system as is needed for calculating the filter matrix, 𝑊 , the same auxiliary input signal as is used for the diagnosis is applied to the system model in Dymola until the outputs seem to have reached an operation point where they oscillate around steady states. At this point sample data are collected and Matlab’s system identification tools are used to estimate a state-space model with decent fit to the data. Then it is straight-forward to calculate the filter matrix and apply it to the residuals as demonstrated on the example system in section 6.2. In the simulations and refrigeration lab tests presented in the next sections the filtered residuals are shown together with the unfiltered and it is demonstrated how the filtering, although not necessary in cases
So far, the diagnosis methods described here have been working solely with the nonlinear model of the refrigeration system, especially due to the unknown operation point in the start-up phase of the system which introduces difficulties in the attempt to make a linearized model. Having demonstrated the abilities, strengths and weaknesses of the proposed solution strategy using only these nonlinear models, in the sequel it will, however, be assumed that a proper operation point can be estimated and a linear model of the refrigeration system deduced in order to exploit how much further the configuration validation procedure can be taken using the method described in the previous two sections.
6.1.3
In section 6.2 the filtering process is demonstrated on a simple system.
A filtering of the residual signals as proposed here has the disadvantage of mixing the channels of the residual into one. This means that, whereas the original solution strategy allows some degree of fault isolability in identifying the two channels of the residuals that produce an alarm (if e.g. two sensors are mutually switched), an alarm in the filtered and mixed residual is suitable for detection only. But, since the proposed method uses a minimization procedure over a multi-model setup, as described in chapter 5, where the system output is tested versus models of the known types of faults, the fault isolability is re-gained by identifying the fault model that causes the amplitude of the resulting residual to be minimal. This sort of “brute force” testing of models might include a much larger number of models than if a preliminary hint about which subset of models to use could be inferred from the channels of the residual signal that cause the alarm and the separation of the system outputs into subsets as in section 3.1 can come in handy in order reduce the number of models anyhow.
76
6.2 Example: Minimizing Model Uncertainties
77
with somewhat accurate models, improves the robustness of the diagnosis method and thereby expands the class of systems on which the SCV scheme is applicable without specific model tuning.
6.2
Example: SVD for Improving the Robustness to Uncertain Models
In this section the simple system introduced in section 4.3 and used throughout other examples is used to demonstrate how a weight can be applied to the residual signal in order to minimize the effect from uncertainties in the models that are used to create the residual signals. The weight is chosen from a singular value decomposition of the term 𝐶(𝑗𝜔𝐼 − 𝐴)−1 following the theory described in section 6.1. The setup of the test system in Simulink which was shown in figure 4.12 on page 61 is changed such that the controller is removed and the system is operating in open-loop, the input uncertainty is replaced by a random uncertainty of up to 50% on each of the elements in the 𝐴 and 𝐵 matrices and an extra periodogram detector working on a filtered residual signal is added. The setup is seen in figure 6.1 on the following page. With the applied system uncertainty the residual signals are non-zero even in fault free configuration due to the mismatch between the models and the actual system. On figure 6.2 on page 79 the unfiltered residual signal is plotted together with the output when the peridogram detector is applied to that signal. As it is clearly seen on figure 6.2a the amplitude at the frequency of the test signal is equally large both with correct and with a faulty sensor configuration which is a violation of the hypothesis that the signals in the residuals originating from faulty sensor configurations should be distinct from those caused by model uncertainties. Hence, a proper detection is made very difficult as it is seen in figure 6.2b where no distinct alarm can be issued when the fault occurs. Still some changes are seen in the amplitude of the signals caused by the switching of channels in the signal but a minimization over possible fault models resulting in a correct fault isolation would be pure coincidence in this case. Instead a weighting function is designed according to the theory in section 6.1 and is applied to the residual.
Sine Wave
u
u
Perm _delta 1
Uncertain System
Gyu Model
x' = Ax+Bu y = Cx+Du
Perm _delta 3
x' = Ax+Bu y = Cx+Du
Perm _delta 2
x' = Ax+Bu y = Cx+Du
x' = Ax+Bu y = Cx+Du
s(unc _mat_a,b*b_unc ,c,d
Perm _nom
x' = Ax+Bu y = Cx+Du
Step 2
Step 1
Multiport Switch 1
Step 3
y
e
Filter
K*u
Noise
Step 5
FFT
in _s
Abs1
|u|
Scope 5
in _s FFT
enable In
Step 4
fftout
Select Rows
To Workspace 1
fftout 1
Choose FFT -channel Scope 6
To Workspace 2
Windowed FFT 1
Windowed FFT
In
enable
Split outputs
Choose FFT -channel Scope 1
Select Columns
Select Rows
Scope 7
Scope 2
78 Tests and Robustness Issues
Figure 6.1: The setup from Simulink for demonstrating the SVD filtering of the residual on the two mass spring system. The setup includes measurement noise and uncertainty in the 𝐴 and 𝐵 matrices.
6.2 Example: Minimizing Model Uncertainties
79
0.4 Sensor 1 Sensor 2 Sensor 3
0.3
0.2
Residual vector ε
0.1
0
−0.1
−0.2
−0.3
−0.4 0
50
100
150 Simulation time (s)
200
250
300
(a) Unfiltered residual signals. 6 Sensor 1 Sensor 2 Sensor 3 5
Amplitude at ω = ω
0
4
3
2
1
0 0
50
100
150 Simulation time (s)
200
250
300
(b) Periodogram output from unfiltered residual.
Figure 6.2: Simulating the setup from figure 6.1. The output corresponding to the frequency of the test signal is selected. At time, 𝑇 = 100𝑠 sensors 1 and 2 are switched and at 𝑇 = 200𝑠 they put back in place.
80
Tests and Robustness Issues
The 𝐴 and 𝐶 matrices of the system are given by: ⎛ 0 0 1 0 ⎜ 0 0 0 1 𝐴=⎜ ⎝ −1 1 −0.2 0.2 0.5 −2.5 0.1 −0.15 ⎞ ⎛ 1 0 0 0 𝐶=⎝ 0 1 0 0 ⎠ 0 0 1 0
⎞ ⎟ ⎟ ⎠
(6.16a)
(6.16b)
and the frequency of the sinusoidal test signal applied is 𝜔0 = 𝜋/2𝑟𝑎𝑑/𝑠.
Performing the singular value decomposition in Matlab on the term 𝐶(𝑗𝜔0 𝐼− 𝐴)−1 yields e.g.: 𝐶(𝑗𝜔0 𝐼 − 𝐴)−1 = 𝑈 Σ𝑉 ∗ ⎞ ⎛ −0.41 −0.63 −0.66 0.28 − 0.09𝑗 ⎠ 𝑈 = ⎝ 0.56 − 0.29𝑗 −0.66 + 0.29𝑗 0.02 − 0.66𝑗 0.05 − 0.30𝑗 −0.06 + 0.69𝑗 ⎞ ⎛ 5.35 0 0 0 1.09 0 0 ⎠ Σ=⎝ 0 0 0 0.37 0 ⎛ −0.12 + 0.10𝑗 −0.06 − 0.75𝑗 0.02 − 0.64𝑗 0 ⎜ 0.52 − 0.65𝑗 −0.08 − 0.11𝑗 0.05 − 0.06𝑗 0.53𝑗 𝑉 =⎜ ⎝ −0.09 − 0.04𝑗 0.64 − 0.08𝑗 −0.76 0.11𝑗 0.45 + 0.29𝑗 0.08 + 0.02𝑗 0.03 − 0.07𝑗 0.84 − 0.08𝑗
⎞ ⎟ ⎟ ⎠
(6.17)
Hence the weight is chosen as: 𝑊 = 𝑢∗3 = [−0.66 0.28 + 0.09𝑗 − 0.06 − 0.69𝑗]∗
(6.18)
and the filtered residual becomes: 𝜖𝑓 𝑖𝑙𝑡𝑒𝑟𝑒𝑑 = 𝑊 [𝜖1 𝜖2 𝜖3 ]𝑇
(6.19)
where the magnitude is used in order to avoid the complex values that result when multiplying the real signal with 𝑊 . In figure 6.3 on the facing page the filtered residual signal is shown along with the output from the periodogram detector working on that signal. Due to the magnitude function in (6.19) the frequency is doubled for what reason the output from the periodogram is chosen at 𝜔 = 2𝜔0 .
6.2 Example: Minimizing Model Uncertainties
81
0.2 0.19 0.18
Filtered residual ε
filtered
0.17 0.16 0.15 0.14 0.13 0.12 0.11 0.1 0
50
100
150 Simulation time(s)
200
250
300
250
300
(a) Filtered residual signals. 0.5 0.45 0.4
Amplitude at ω = 2ω
0
0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 0
50
100
150 Simulation time (s)
200
(b) Periodogram output from filtered residual.
Figure 6.3: Simulating the setup from figure 6.1. The output corresponding to twice the frequency of the test signal is selected. At time, 𝑇 = 100𝑠 sensors 1 and 2 are switched and at 𝑇 = 200𝑠 they put back in place.
82
Tests and Robustness Issues
By looking at figure 6.3a it is readily seen that there is a distinct difference in the residual signal from the fault-free to the faulty situation. This is made even clearer when the output from the periodogram in figure 6.3b is considered. The contents from model uncertainties in the residual are not entirely eliminated. However it is evident that they are suppressed such that much larger uncertainties can be allowed for, until the fault signature from the sensor permutation is eclipsed by that from the uncertainties again. In (6.17) we saw that the largest singular value of 𝐶(𝑗𝜔0 𝐼 − 𝐴)−1 is 5.35 while the smallest is 0.37. This gives a condition number of 14.38 which is the factor by which the filtering has reduced the worst-case disturbance from model uncertainties.
6.3
Simulations
In this section the SCV method as proposed is tested using the Dymola simulation setup with the model described in chapter 2. Since it is possible to estimate gain and phase shift informations for the input-output models from the nominal model and to add measurement noise, input and parameter uncertainty in controlled amounts before using the model for testing the diagnosis method such simulations provide good insight in the class of systems for which the SCV method is expected to be robust for reliable diagnosis. On figure 6.4 on page 84 both residual signals and the resulting outputs from the periodogram detector are presented for the case where the same simulation model is used both for identifying preliminary gain and phase informations for the input-output models and for the actual simulation. Only measurement noise of a level measured from real data is added to the system outputs and the simulation is conducted such that the sensor configuration switches from a permutation of two sensors to nominal. The same simulation is performed in figure 6.5 on page 85 however the system is no longer the exact same system as the models represent since rather severe uncertainties (up to 20% randomly on the parameters and up to 50% on the input) are applied. All figures show both filtered and unfiltered residuals for comparison. For the periodogram plots a settling time after the sensor switching should be ignored since this would never happen in the real system which is always to be started with one of the situations present from the beginning. Figure 6.4a shows how the sinusoidal signature from the test signal is almost invisible in the residuals after the sensors have been put back in place while
6.3 Simulations
83
it is distinct in two of the channels until that point. Still nonlinearities that are not modeled in the input-output models cause some periodic deviations in the unfiltered residuals that are seen to vanish when the filter is applied causing the output from the periodogram of the filtered signal to be at a lower amplitude after the sensor switching. It is clear from figure 6.4b that a threshold suitable for uniquely detecting the amplitude of the residuals belonging to the two permuted sensors could easily be designed. It is also seen that the filtering suppresses the fault signature too making the unfiltered residual best for detection in the case without model uncertainty. Still, it is absolutely possible to find a suitable threshold for the filtered residual too (The ratio between the amplitude before and after the sensor permutation is close to 1000). If the same considerations are made concerning the case including model uncertainties it is seen from figure 6.5a how the signature of the test signal is present in all signals at all times, even in the filtered residual however it seems to be somewhat reduced here. From figure 6.5b this is confirmed since no threshold could have be chosen for a detection using only the unfiltered residual while the filtered signal yet again results in a periodogram output from which the permutation of sensors could easily be detected. (This time the ratio between the amplitude before and after the sensor permutation is more than 10 for the filtered signal.)
84
Tests and Robustness Issues
20
15
10
5
Residuals
0
−5
−10
−15
−20 ε
Te
−25 0
1000
2000
ε
Tref
ε
Tair
ε
Tair,out
3000
4000
ε
Twall
ε
Filtered
5000
6000
7000
Time (s)
(a) Residuals. εTe
1200
εTref εTair εTair,out
Amplitude of periodogram at ω=ω0
1000
εTwall εFiltered
800
600
400
200
0 3000
4000
5000
6000
7000
8000
9000
10000
Time (s)
(b) Periodogram output filtered residual.
Figure 6.4: Simulation results without uncertainty. Sensors 𝑇𝑒 and 𝑇𝑟𝑒𝑓 are switched and put back in place at 𝑇 = 5000𝑠.
6.3 Simulations
85
20
15
10
5
Residuals
0
−5
−10
−15
−20 ε
Te
−25 0
1000
2000
ε
Tref
ε
Tair
ε
Tair,out
3000
4000
ε
Twall
ε
Filtered
5000
6000
7000
Time (s)
(a) Residuals. 3000 εTe εTref εTair
Amplitude of periodogram at ω=ω0
2500
εTair,out εTwall εFiltered
2000
1500
1000
500
0 3000
4000
5000
6000
7000
8000
9000
10000
Time (s)
(b) Periodogram output filtered residual.
Figure 6.5: Simulation results with parameter and input uncertainty. Sensors 𝑇𝑒 and 𝑇𝑟𝑒𝑓 are switched and put back in place at 𝑇 = 5000𝑠.
86
6.4
Tests and Robustness Issues
Refrigeration Laboratory Tests
The SCV scheme has been tested in the refrigeration lab at Danfoss A/S on display cases of various makes and models. Gains and phase shifts for the input-output models were estimated from the same Dymola model as used in the simulations in section 6.3 and the state-space description for calculating the filter matrix was estimated using system identification tools on the Dymola model at an operation point close to the one observed at the real refrigeration systems. The overall impression is that the method performs very well as long as the target system belongs to the class of systems that the a priori model is tuned for. In figure 6.6 on the next page results from a display case that has dynamics fairly close to those of the model are presented. It is seen how the fault signature is significant in figure 6.6a in spite of noise and uncertainties and in fact the detection would have been possible both on the filtered residual and on the raw residual signals alone. However it is evident that the filtering improves the signal-to-noise ratio and at the output from the periodogram of the filtered residual the lowest amplitude with the fault present is seen to be around 25 times larger then the largest amplitude from the fault-free system, making detection easy. Figure 6.7 on page 88 shows a similar test on a display case which is produced by a different manufacturer. The dynamics of this system are significantly different from those of the first one, mainly due to a larger capacity of the inlet valve making this system capable of both refrigeration and freezing. The larger deviations from the models are clearly seen on the figures and a unique fault diagnosis is not possible from the unfiltered signal anymore. On figure 6.7b the output from the periodogram of the filtered signal is seen and it is observed that the amplitude in the presence of a fault is only around twice as large as the amplitude for the nominal system. Even though this difference is not as distinct as seen previously minimizing over the number of known faulty sensor configurations (including the nominal configuration) still succeeds in isolating the correct fault model. It is also seen how the filtering of the residuals does not improve the signal as much as before since the system description used for calculating the SVD’s does not fit the target system as well either.
6.4 Refrigeration Laboratory Tests
87
20
15
10
Residuals
5
0
−5
−10
−15 εTwall −20 0
500
1000
1500
εTair,out
εTair
2000
εTref
2500 Time (s)
εTe 3000
εFiltered 3500
4000
4500
5000
(a) Residuals. 350
Amplitude of periodogram at ω=ω
0
300
250
200
150
100
50
0 0
500
1000
1500
2000
2500
3000
3500
4000
4500
Time (s)
(b) Periodogram output filtered residual.
Figure 6.6: Refrigeration lab test with decent model fit. Sensors 𝑇𝑤𝑎𝑙𝑙 , 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 and 𝑇𝑎𝑖𝑟 are permuted and but back in place at 𝑇 = 2500𝑠.
88
Tests and Robustness Issues
20 ε
Filtered
ε
Twall
ε
Tair,out
ε
ε
Tair
Tref
ε
Te
15
10
Residuals
5
0
−5
−10
−15 0
500
1000
1500
2000 Time (s)
2500
3000
3500
4000
2500
3000
3500
4000
(a) Residuals. 100 90
Amplitude of periodogram at ω=ω
0
80 70 60 50 40 30 20 10 0 0
500
1000
1500
2000 Time (s)
(b) Periodogram output filtered residual.
Figure 6.7: Refrigeration lab test with poor model fit.Sensors 𝑇𝑤𝑎𝑙𝑙 , 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 and 𝑇𝑎𝑖𝑟 are permuted and but back in place at 𝑇 = 2500𝑠.
6.4 Refrigeration Laboratory Tests
89
Other refrigeration systems deviating drastically in both physical dimensions and constructions were tested in the refrigeration lab. For instance the two display cases tested so far both have their load zones horizontally with an opening on the top while their mutual differences are due to different hardware used and capacities for different uses such as refrigeration and freezing. In the display cases as the one presented in figure 6.8 on the next page the load zones are placed vertically with the opening on one side. This changes especially the airflow, since the refrigerated air is more likely to “fall out” of the display case, and therefore also the dynamics. For those systems the a priori models used so far do not describe the systems well enough for the SCV method to be reliable. Figure 6.8 is constructed by repeating the same data set (with 2615 seconds of data) twice with permuted sensors in the first and the nominal configuration in the second part. It is seen on the figure how the fault signature from the auxiliary input signal is present in all signals both when the sensors are switched and in the fault-free case. A slightly lower maximum amplitude is noted from the periodogram when no fault is present but minimizing over the known fault models will not identify the correct configuration. In the last part of figure 6.8a it is noted that some of the signals (e.g. 𝑇𝑟𝑒𝑓 and 𝑇𝑒 ) does not deviate as much from the models as the rest of the signals. Hence, a permutation of those two sensors only would have been detectable while the other situations certainly are not. However if a sample data set from that class of systems is available the model can obviously be tuned to a better fit just by adequate adjustment of the parameters and results with the same degree of reliability as seen previously are expected.
90
Tests and Robustness Issues
12
εTe
εTref
εTair
εTair,out
εTwall
εFiltered
10 8 6
Residuals
4 2 0 −2 −4 −6 −8 0
500
1000
1500
2000
2500 Time (s)
3000
3500
4000
4500
5000
(a) Residuals. 40
Amplitude of periodogram at ω=ω0
35
30
25
20
15
10
5
0 0
500
1000
1500
2000
2500 Time (s)
3000
3500
4000
4500
5000
(b) Periodogram output filtered residual.
Figure 6.8: Refrigeration lab test with no model fit.Sensors 𝑇𝑤𝑎𝑙𝑙 , 𝑇𝑎𝑖𝑟,𝑜𝑢𝑡 and 𝑇𝑎𝑖𝑟 are permuted and but back in place at 𝑇 = 2614𝑠 but no fault isolation is possible using the same models as in the tests shown in figures 6.6 and 6.7.
6.5 Summary of Test Results
6.5
91
Summary of Test Results
The simulations and laboratory tests have revealed some properties of the proposed method to SCV which are summed up in the following: ∙ Time to detect depends a lot on the dynamics of the target system. Since at least one period of the sinusoidal test signal needs to be detected at the outputs before the periodogram-based detector is able to detect the fault signature the frequency of the test signal, which is limited by the dynamic response of the system, plays a major role. In figure 6.9 the output from the minimization process is shown for all the possible permutations of any two sensors in the system including the nominal configuration for both at simulated system with very accurate model fit and the laboratory test case also seen in figure 6.7 on page 88. It is noted that the time to detect is up to 3 times the period of the test signal in the case where accurate models are used and 5 times the period of the test signal in the case with uncertainty. If a system with even more uncertainty is tested longer detection times are expected until the point where the robustness of the method is violated. 10
Fault number identified
Fault number identified
10 8 6 4 2 0 1
2 3 4 Periods of test signal sinusoid
(a) Simulation with accurate model fit.
5
8 6 4 2 0 1
2
3 4 5 6 Periods of test signal sinusoid
7
8
(b) Refrigeration lab with poor model fit.
Figure 6.9: Time-to-detect investigated on a simulation with a very good model fit and on the refrigeration lab system shown in figure 6.7. All possible permutations of any two sensors were investigated.
∙ Robustness. By now it should be clear that the proposed solution works robustly on a class of systems in the vicinity of the nominal plant the input-output models were tuned for. This can be considered as three circles around the nominal, ideal system. The inner circle containing those systems close enough to the nominal system for the detection method to be robust, the outer circle containing systems with
92
Tests and Robustness Issues larger than acceptable model uncertainties and the circle in between containing the systems that fall in the boundary area in which some faults are isolable, others just detectable while some are not detectable at all. ∙ Isolability relies on the minimization over multiple hypothesis models and elsewise on the robustness of the detection method. Hence, if the system does not have any two or more outputs that could be mistaken with respect to gain and phase-shift of a sinusoid at the test frequency and the system furthermore is within the class of systems where the input-output models fit well enough, isolability is guaranteed. ∙ Probability of detection / false alarms is somewhat connected to the isolability. It is described how the probability of detection and the probability of getting a false alarm can be calculated in connection with choosing a threshold for the periodogram detector and this is demonstrated in section 4.5. The noise level and the amplitude of the sinusoid to detect have to be known for the calculations to be performed. However since the method proposed in this thesis uses a minimization over known fault models in which the nominal configuration is included the need for a threshold level disappears and the probability of detection is mostly dependent on the robustness and isolability issues mentioned above.
Chapter
7 Conclusions
This thesis has presented an approach to sensor configuration validation applicable for systems in the commissioning phase. First, a dynamic model of the supermarket refrigeration system used as the case study for this project was presented to provide knowledge of the physical system and its challenges and to construct a simulation model which has been used throughout the thesis. Furthermore relevant analyses of the system was given, e.g. a structural analysis revealing the need for an active diagnosis setup and a walk-through of the different fault types. Primarily the permutation of sensors at the connections to the controller has been considered in this thesis. Next, the proposed solution to the SCV problem was presented and validated successfully on both simulations and field testings. The active diagnosis procedure used simplified models in the creation of residuals such that complete knowledge of the system was not necessary and a filtering of the residuals that suppresses noise originating from model uncertainties was demonstrated. The proposed method was demonstrated to be very robust towards both measurement noise, low frequent disturbances and also model uncertainties within a specified class of systems. This was achieved by focusing the detection on a single test frequency and by using a minimization of the residuals over multiple fault models causing the need for a threshold level for detection of faults on the output from the periodogram detector to disappear. Furthermore, thanks to the simplified models only sparse information about the system was needed for tuning the method to fit another class of systems.
94
Conclusions
Even though the method was developed for and tested on commercial refrigeration systems only no assumptions specific for thermodynamic systems have been made and hence, the method might as well be applied to other applications. In fact refrigeration systems that possibly vary a lot in dimensions and operating conditions and which contain dynamics of a low-pass nature that put some hard restrictions on the test signals, were not pleasant target systems for a diagnosis as proposed here and even better results might be found in other applications. For the setup to be applied in open-loop the system needs to be stable however the method could be adapted to include a stabilizing controller.
7.1
Future Work
In the introduction to this thesis it was mentioned that a faulty sensor configuration can arise from incorrect wirings to the controller but also from defect sensors, wrong physical placements of sensors in the system etc. In this paper only the incorrect connection between sensors and controller for a single display case has been considered while the other issues outlined, including the permutation of connections from several display cases, are to be included in future works. The ability to run the active diagnosis during normal operation might also very well be incorporated such that faults occurring in the sensor system during normal commission can be detected using the same procedure. It has been discussed how the addition of a stabilizing controller, for the SCV to work on unstable systems as well, leads to some difficulties due to the unknown sensor configuration. This is a topic for future research within the area of sensor configuration validation and methods like the one described in (Stoustrup and Niemann, 2004) might be utilized in this context. As mentioned the proposed SCV is not limited to refrigeration systems but the testing on other applications has not been performed within this work and are issues of future interest.
Bibliography
P. J. Antsaklis and A. N. Michel. A Linear Systems Primer. Birkh¨auser Basel, 2007. ISBN 0817644601, 9780817644604. R. V. Beard. Failure Accommodation in Linear Systems Through Selfreorganization. PhD thesis, Massachusetts Inst. Technology, Cambridge, MA., 1971. M. Blanke and T. Lorentzen. Satool - a software tool for structural analysis of complex automation systems. Proceedings of the 6th IFAC Symposium on Fault Detection, Supervision and Safety of Technical Processes, pages 673–678, 2006. URL http://server.oersted.dtu.dk/publications/ views/publication_details.php?id=2502. Presented at: 6th IFAC Symposium on Fault Detection, Supervision and Safety of Technical Processes 2006. ” M. Blanke, C.W. Frei, F. Kraus, R.J. Patton, and M. Staroswiecki. What is fault-tolerant control? Fault Detection, Supervision and Safety for Technical Processes 2000 (SAFEPROCESS 2000). Proceedings volume from the 4th IFAC Symposium, vol.1:41–52 vol.1, 2001. M. Blanke, M. Kinnaert, J. Lunze, and M. Starosweicki. Diagnosis and Fault-tolerant Control, 2nd edition. Springer, 2 edition, 2006. ISBN 3540-35652-5. S.L. Campbell, K.G. Horton, and R. Nikoukhah. Auxiliary signal design for rapid multi-model identification using optimization. Automatica, 38(8): 1313–1325, 2002. ISSN 00051098. J. Chen and R. J. Patton. Robust model-based fault diagnosis for dynamic systems. Kluwer Academic Publishers, Norwell, MA, USA, 1999. ISBN 0-7923-8411-3.
96
BIBLIOGRAPHY
L. Cheng. Latest progress of research on fault diagnosis based on information fusion. Information Technology Journal, 7(5):825–829, 2008. ISSN 18125638. D. Choe, S.L. Campbell, and R. Nikoukhah. Auxiliary signal design for robust failure detection: a case study. 2005 International Conference on Control and Automation, 2:1008–1013 Vol. 2, 2005. C. Commault and J.-M. Dion. Sensor location for diagnosis in linear systems: A structural analysis. IEEE Transactions on Automatic Control, 52(2): 155–169, 2007. ISSN 00189286. Dynasim. Dymola, dynamic modeling laboratory, 2008. URL http://www. dynasim.com. Date of publication: 2008. Date retrieved: January 6, 2009. B.D. Eldredge, B.P. Rasmussen, and A.G. Alleyne. Moving-boundary heat exchanger models with variable outlet phase. Journal of Dynamic Systems, Measurement and Control, 130(6):061003 (12 pp.), 2008. ISSN 00220434. E. R. Gelso and M. Blanke. Structural analysis extended with active fault isolation - methods and algorithms. In 7th IFAC Symposium on Fault Detection, Supervision and Safety of Technical Processes, SafeProcess 2009, 2009. Presented at: 7th IFAC Symposium on Fault Detection, Supervision and Safety of Technical Processes, SafeProcess 2009. J. Gertler. All linear methods are equal - and extendable to (some) nonlinearities. Int. Journal of Nonlinear and Robust Control, 12(8):629–648, 2002. T. Green, J. V. Jensen, R. T. Neckelmann, K. B. Pedersen, T. Kjærulff, and K. S. Straarup. Model predictive control of a refrigeration system. Technical report, Department of Control Engineering, Aalborg University, 2006. X. He, H. H. Asada, S. Liu, and H. Itoh. Multivariable control of vapor compression systems. HVAC and R Research, 4(3):205–230, 1998. ISSN 10789669. E. Hendricks, O. E. Jannerup, and P. H. Sørenson. Linear Systems Control: Deterministic and Stochastic Methods. Springer-Verlag, Heidelberg, 2008. ISBN 978-3-540-78485-2. R. Isermann. Model-based fault-detection and diagnosis - status and applications. Annual Reviews in Control, 29(1):71–85, 2005. R. Izadi-Zamanabadi. Lecture notes - practical approach to reliability, safety, and active fault-tolerance. Aalborg University, Department of Control Engineering, 2000.
BIBLIOGRAPHY
97
R. Izadi-Zamanabadi and M. Staroswiecki. A structural analysis method formulation for fault-tolerant control system design. Proceedings of the IEEE Conference on Decision and Control, 5:4901–4902, 2000. ISSN 01912216. R. Izadi-Zamanabadi and C. Thybo. Failure mode and effects critically analysis. Internal paper at Central R&D, Danfoss Refrigeration and Airconditioning (Danfoss RA), 2007. R. Izadi-Zamanabadi, L. F.L. Larsen, and C. Thybo. An industrial approach to active sensor configuration validation. DIAGNOSIS OF PROCESSES AND SYSTEMS, pages 187–194, 2009. S. M. Kay. Fundamentals of Statistical Signal Processing, Volume 1: Estimation Theory. Prentice Hall PTR, April 1993. ISBN 9780133457117. S. M. Kay. Fundamentals of Statistical Signal Processing, Volume 2: Detection Theory. Prentice Hall PTR, January 1998. ISBN 013504135X. L. F. S. Larsen. Model Based Control of Refrigeration Systems. PhD thesis, Aalborg University, 2006. L. F. S. Larsen, R. Izadi-Zamanabadi, and R. Wisniewski. Supermarket refrigeration system - benchmark for hybrid system control. Proceedings of the European Control Conference, pages 113–120, 2007. M. Laursen and M. Blanke. Fault diagnosis of a water for injection system using enhanced structural isolation. International Journal of Applied Mathematics and Computer Science, 18(4):593–603, 2008. ISSN 1641876x. T. Lorentzen and M. Blanke. Users manual for satool - a tool for structural analysis of automated systems. Technical report, Technical University of Denmark, Ørsted DTU, and Technical University of Denmark, Ørsted DTU, 2004. URL http://www.oersted.dtu.dk/publications/p.php? 690. H. Niemann. Dual youla parameterisation. IEE Proceedings: Control Theory and Applications, 150(5):493–497, 2003. ISSN 13502379. H. Niemann. Fault tolerant control based on active fault diagnosis. Proceedings of the 2005, American Control Conference, 2005., pages 2224–2229 vol. 3, 2005. ISSN 07431619. H. Niemann. A setup for active fault diagnosis. IEEE Transactions on Automatic Control, 51(9):1572–1578, 2006. ISSN 00189286. H. Niemann and N. K. Poulsen. Active fault diagnosis for systems with reduced model information. Proceedings of the 7th IFAC Symposium on
98
BIBLIOGRAPHY
Fault Detection, Supervision and Safety of Technical Processes, pages 965– 970, 2009. Presented at: 7th IFAC Symposium on Fault Detection, Supervision and Safety of Technical Processes, 2009. H. Niemann and J. Stoustrup. Reliable control using the primary and dual youla parameterizations. Proceedings of the IEEE Conference on Decision and Control, 4:4353–4358, 2002. ISSN 01912216. R. Nikoukhah and S.L. Campbell. Auxiliary signal design for active failure detection in uncertain linear systems with a priori information. Automatica, 42(2):219–228, 2006. ISSN 00051098. R. Nikoukhah, S. L. Campbell, and K. G. Horton. Auxiliary signal design for robust multimodel identification. IEEE Transactions on Automatic Control, 47(1):158, 2002. ISSN 00189286. N. K. Poulsen and H. Niemann. Active fault diagnosis based on stochastic tests. International Journal of Applied Mathematics and Computer Science, 18(4):487–496, 2008a. ISSN 1641876x. N. K. Poulsen and H. Niemann. Stochastic change detection based on an active fault diagnosis approach. Proceedings of the IEEE Conference on Decision and Control, pages 346–351, 2008b. ISSN 01912216. N. K. Poulsen and H. Niemann. Active fault diagnosis - a stochastic approach. In Presented at The 7th IFAC Symposium on Fault Detection, Supervision and Safety of Technical Processes, Barcelona, Spain, July 2009. J. G. Proakis and D. K. Manolakis. Digital Signal Processing (4th Edition). Prentice Hall, March 2006. ISBN 0131873741. H. Rasmussen, C. Thybo, and L. F. S. Larsen. Automatic tuning of the superheat controller in a refrigeration plant. Controllo2006 : 7th Portuguese Conference on Automatic Control, 2006. D. Sarabia, F. Capraro, L.F.S. Larsen, and C. de Prada. Hybrid control of a supermarket refrigeration systems. 2007 American Control Conference, pages 4178–4185, 2007. ISSN 07431619. S. Skogestad. A procedure for siso controllability analysis-with application to design of ph processes. Integration of Process Design and Control (IPDC ’94) IFAC Workshop, pages 25–30, 1994. S. Skogestad and I. Postlethwaite. Multivariable Feedback Control: Analysis and Design. John Wiley & Sons, 2005. ISBN 0470011688.
BIBLIOGRAPHY
99
M. J. Skovrup. Thermodynamic and thermophysical properties of refrigerants - software package in borland delphi, 2000. URL http://www.et. web.mek.dtu.dk/WinDali/Files/RefEqns. Department of energy Engineering, Technical University of Denmark. J. Stoustrup and H. Niemann. Fault tolerant control for unstable systems: a linear time varying approach. Proceedings of the 2004 American Control Conference, 2:1794–1798 vol.2, 2004. ISSN 07431619. Y. Tai, K. Yoshizawa, and H. Okubo. Robust fault detection of smart structure control systems with model uncertainty. SICE 2002. Proceedings of the 41st SICE Annual Conference (Cat. No.02TH8648), vol.2:1135–8 vol.2, 2002. T. Tay, I. Mareels, and J. B. Moore. High performance control. Birkhauser Boston Inc., Cambridge, MA, USA, 1998. ISBN 0-8176-4004-5. C. Thybo. Input to fp7. European Commision, CORDIS, Seventh Framework Programme, 2007. Wikipedia. Fault detection and isolation — wikipedia, the free encyclopedia, 2009. URL http://en.wikipedia.org/w/index.php?title= Fault_detection_and_isolation&oldid=282020815. [Online; accessed 25-May-2009]. M. Willatzen, N. B. O. L. Pettit, and L. Ploug-Sørensen. A general dynamic simulation model for evaporators and condensers in refrigeration. part i: moving-boundary formulation of two-phase flows with heat exchange. International Journal of Refrigeration, 21(5):398–403, 1998. ISSN 01407007. L. Xu and H.E. Tseng. Robust model-based fault detection for a roll stability control system. IEEE Transactions on Control Systems Technology, 15(3): 519–528, 2007. ISSN 10636536. Youmin Z. and Jin J. Bibliographical review on reconfigurable fault-tolerant control systems. Annual Reviews in Control, 32(2):229–252, 2008.
100
BIBLIOGRAPHY
Appendix
A Display Case in Dymola
Listing A.1: Source code for display case modeled in Dymola 1 2 3 4 5 6
7 8
9 10
11 12
13 14
15
16 17
18 19
20
model D i s p l a y c a s e e x t e n d e d b y T G H import RefEqn ; // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // Temperatures : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / M o d e l i c a . S I u n i t s . C o n v e r s i o n s . N o n S I u n i t s . Temperature degC ... T goods ( s t a r t =23) " Temperature of goods " ; M o d e l i c a . S I u n i t s . C o n v e r s i o n s . N o n S I u n i t s . Temperature degC ... T w a l l ( s t a r t =23) " Temperature of evaporator wall " ; M o d e l i c a . S I u n i t s . C o n v e r s i o n s . N o n S I u n i t s . Temperature degC ... T a i r ( s t a r t =23) " Temperature of air " ; M o d e l i c a . S I u n i t s . C o n v e r s i o n s . N o n S I u n i t s . Temperature degC Te ( ... s t a r t =−14) " Evaporation temperature " ; M o d e l i c a . S I u n i t s . C o n v e r s i o n s . N o n S I u n i t s . Temperature degC TSH ... " Superheat " ; M o d e l i c a . S I u n i t s . C o n v e r s i o n s . N o n S I u n i t s . Temperature degC TS4 ( ... s t a r t =23) " Temperature of air outlet from evaporator " ; M o d e l i c a . S I u n i t s . C o n v e r s i o n s . N o n S I u n i t s . Temperature degC TS2 ( ... s t a r t =23) " Refrigerant temperature at outlet from evaporator " ; parameter M o d e l i c a . S I u n i t s . C o n v e r s i o n s . N o n S I u n i t s . ... Temperature degC T amb=23 " Temperature of surroundings " ;
21 22
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ /
102
23 24 25
26
27 28 29 30 31
Display Case in Dymola
// Heat f l o w r a t e s : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / M o d e l i c a . S I u n i t s . HeatFlowRate Q g o o d s a i r " Heat flow goods ->... air " ; M o d e l i c a . S I u n i t s . HeatFlowRate Q a i r w a l l " Heat flow air -> wall... "; M o d e l i c a . S I u n i t s . HeatFlowRate Qe " Cooling capacity " ; M o d e l i c a . S I u n i t s . HeatFlowRate Q a i r l o a d ( s t a r t =0) " External heat load on display case " ; parameter M o d e l i c a . S I u n i t s . HeatFlowRate Q d e f r o s t =3200 " Heat flow defroster -> wall " ;
32 33 34 35 36
37 38
39 40 41
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // Masses : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / M o d e l i c a . S I u n i t s . Mass M ref ( s t a r t =0) " Mass of refrigerant in... evaporator " ; parameter M o d e l i c a . S I u n i t s . Mass M goods=6 " Mass of goods " ; parameter M o d e l i c a . S I u n i t s . Mass M wall=60 " Mass of ... evaporator wall " ; parameter M o d e l i c a . S I u n i t s . Mass M air=80 " Mass of air " ; parameter M o d e l i c a . S I u n i t s . Mass M ref max=60 " Mass of refrigerant in evaporator when totally filled " ;
42 43 44 45 46 47 48 49 50 51
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // Heat c a p a c i t i e s : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / parameter M o d e l i c a . S I u n i t s . S p e c i f i c H e a t C a p a c i t y Cp goods =1500 " Heat capacity of goods " ; parameter M o d e l i c a . S I u n i t s . S p e c i f i c H e a t C a p a c i t y Cp wall =1000 " Heat capacity of evaporator wall " ; parameter M o d e l i c a . S I u n i t s . S p e c i f i c H e a t C a p a c i t y C p a i r =4000 " Heat capacity of air " ;
52 53 54 55 56 57 58
59 60 61
62 63 64
65 66 67 68
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // Heat t r a n s f e r c o e f f i c i e n t s : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / parameter Real UAamb air ( q u a n t i t y=" OverallHeatTransferCoefficient " , u n i t="W/K" ) = 650 " Overall heat tranfer coefficient ... ambient -> air " ; parameter Real UAgoods air ( q u a n t i t y=" OverallHeatTransferCoefficient " , u n i t="W/K" ) = 400 " Overall heat tranfer coefficient goods ... -> air " ; parameter Real U A a i r w a l l ( q u a n t i t y=" OverallHeatTransferCoefficient " , u n i t="W/K" ) = 850 " Overall heat tranfer coefficient air ->... wall " ; parameter Real UAwall ref max ( q u a n t i t y=" OverallHeatTransferCoefficient " , u n i t="W/K" ) = 11500 " Overall heat tranfer coefficient wall -> refrigerant , when ... evaporator totally filled " ;
103
69 70 71 72
73 74 75 76
77
78
parameter Real U A a i r w a l l d i f f ( q u a n t i t y=" OverallHeatTransferCoefficient " , u n i t="W/K" ) = 30 " Overall heat tranfer coefficient air -> wall as free ... convection ( Fan off )" ; parameter Real UA SH( q u a n t i t y=" OverallHeatTransferCoefficient " , u n i t="W/K" ) = 2 " Overall heat tranfer coefficient wall -> refrigerant , ... superheat zone " ; Real U A w a l l r e f ( q u a n t i t y=" OverallHeatTransferCoefficient " , ... u n i t="W/K" , max=UAwall ref max ) " Overall heat tranfer coefficient wall -> refrigerant " ;
79 80 81 82 83 84 85 86 87 88 89
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // For c a l c u l a t i n g s u p e r h e a t r e g i o n : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / Real V " volume evaporator " ; Real V l i q " volume of liquefied refrigerant in evaporator " ; Real r h o l i q " density liquid evaporator " ; Real lSH " length superheat zone " ; Real L 2p " Length of 2- phase zone in evaporator " ; parameter Real gamma=0.7 " mean void " ; parameter Real L=1 " Length evaporator " ;
90 91 92 93 94
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // Other p a r a m e t e r s : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / parameter M o d e l i c a . S I u n i t s . MassFlowRate mdot=0.4 " Air flow ... from fan " ;
95 96
Real Pe ( q u a n t i t y=" Pressure " , u n i t=" bar " ) " Evaporation ... pressure " ;
97 98
parameter Real a l p h a =0.081 " valve constant and refrigerant ... quality " ;
99 100 101
Modelica . S I u n i t s . S p e c i f i c E n t h a l p y hlg " Latent heat of refrigerant in evaporator " ;
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // I n p u t / o u t p u t : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / pipe p t mdot p i ; pipe p t mdot p o ; RealOutput name T a i r i n ; BooleanInput name d e f r o s t ; BooleanInput name f a n ; RealInput name valveOD ( min=0 , max=1) ; RealOutput name Twall ; RealOutput name T a i r o u t ; RealOutput name T r e f o u t ; RealOutput name Te Pe ; RealOutput name T SH ;
104
Display Case in Dymola
117 118 119 120 121
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // E q u a t i o n s : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / equation
122 123 124 125 126 127 128 129 130 131
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // Meaurements : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / Te Pe = Te ; Twall = T wall ; = T air ; Tair in = TS4 ; Tair out Tref out = TS2 ; = TSH ; T SH
132 133 134 135 136 137 138
139 140 141 142 143 144 145 146
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // D i f f e r e n t i a l e q u a t i o n s : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / d e r ( T goods ) = −Q g o o d s a i r / ( M goods ∗ Cp goods ) ; i f f a n then d e r ( T a i r ) = ( Q g o o d s a i r + Q a i r l o a d − Q a i r w a l l ) / ( M air ∗... Cp air ) ; else d e r ( T a i r ) = ( Q g o o d s a i r + Q a i r l o a d ) / ( M air ∗ C p a i r ) ; end i f ; i f d e f r o s t then d e r ( T w a l l ) = ( Q a i r w a l l − Qe + Q d e f r o s t ) / ( M wall ∗ Cp wall ) ; else d e r ( T w a l l ) = ( Q a i r w a l l − Qe ) / ( M wall ∗ Cp wall ) ; end i f ;
147 148 149 150 151 152 153 154 155 156 157 158 159 160
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // Heat f l o w s : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / Q a i r l o a d = UAamb air ∗ ( T amb − T a i r ) ; Q g o o d s a i r = UAgoods air ∗ ( T goods − T a i r ) ; Qe = U A w a l l r e f ∗ ( T w a l l − Te ) ; i f f a n then Qair wall = UAair wall ∗( T air − T wall ) ; TS4 = T a i r − ( Q a i r w a l l / ( mdot∗ C p a i r ) ) ; else Q a i r w a l l = U A a i r w a l l d i f f ∗ ( T amb − T w a l l ) ; TS4 = T a i r ; end i f ;
161 162
// U A w a l l r e f : See under ”S u p e r h e a t and T r e f o u t ”
163 164 165 166 167 168 169
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // S u p e r h e a t and T r e f o u t : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / r h o l i q = 1/ RefEqn . VBubP( Pe ) ; V = M ref max / ( r h o l i q ) ; = M ref / ( r h o l i q ) ; V liq
105
170 171
L 2p = V l i q /((1 −gamma) ∗V) ; lSH = L − L 2p ;
172 173
TSH = ( ( T w a l l ∗ L 2p+max( T a i r , T w a l l ) ∗ lSH ) − Te ) ∗ ( 1 − exp ( ... UA SH∗ lSH / ( p o . mdot−1e −6) ∗ 0 . 0 5 ) ) ;
174 175
TS2 = TSH + Te ;
176 177
U A w a l l r e f = UAwall ref max ∗ ( L 2p /L) ;
178 179 180 181 182
183 184 185
186
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // Mass f l o w s : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / i f ( ( lSH0) then d e r ( M ref ) = 0 ; else d e r ( M ref ) = valveOD∗ a l p h a ∗ s q r t ( abs ( p o . p − p i . p ) ) − ( Qe/... hlg ) ; end i f ;
187 188
p o . mdot = −Qe/ h l g ;
189 190
p i . mdot = d e r ( M ref ) − p o . mdot ;
191 192 193 194 195 196 197 198 199
// ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / // Dew p o i n t p r e s s u r e , t e m p e r a t u r e and l a t e n t h e a t // o f r e f r i g e r a n t : // ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ / Pe = p o . p ; Te = RefEqn . TDewP( Pe ) ; h l g = RefEqn . HDewP( Pe ) ; end D i s p l a y c a s e e x t e n d e d b y T G H ;
106
Display Case in Dymola
B Incidence Matrices for Structural Analyses
The following two pages show incidence matrices corresponding to the bipartite graphs from the structural analysis in section 3.2.
Appendix
Ccannot fail
Ccan fail
# c1 c2 c3 c4 c5 c6 m1 m2 m3 m4 m5 c7 c8 d1 d2 d3 d4
def rost 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
OD 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
y1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
y2
y3 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
y4 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
y5 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
T wall 1 1 1 1 1 0 0 0 0 0 1 0 0 x 0 0 0
DT wall 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
T air 1 1 0 1 1 0 0 0 1 0 0 0 0 0 x 0 0
DT air 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
M ref 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 x 0
DM ref 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0
X
0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 x
T sh
K DT sh 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1
T airo ut 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0
T refo ut 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0
Te 1 0 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0
Pe 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0
hlg 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0
T amb 0 x 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
108 Incidence Matrices for Structural Analyses
Figure B.1: Incidence matrix from the structural analysis performed in section 3.2.1. The display case is analyzed without goods in the load zone and with the fan turned on.
Ccannot fail
Ccan fail
# c1 c2 c3 c4 c5 c6 m1 m2 m3 m4 m5 c7 c8 d1 d2 d3 d4
def rost 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
OD 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
y1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
y2
y3 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
y4 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
y5 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
T wall 1 0 1 1 0 0 0 0 0 0 1 0 0 x 0 0 0
DT wall 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
T air 0 1 0 0 1 0 0 0 1 0 0 0 0 0 x 0 0
DT air 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
M ref 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 x 0
DM ref 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0
X
0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 x
T sh
K DT sh 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1
T airo ut 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0
T refo ut 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0
Te 1 0 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0
Pe 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0
hlg 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0
T amb x 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 109
Figure B.2: Incidence matrix from the structural analysis performed in section 3.2.2. The display case is analyzed without goods in the load zone and with the fan turned off.
110
Incidence Matrices for Structural Analyses
Appendix
C
Source Code from Implementation of Active Structural Isolation Analysis into SATool
Listing C.1: Source code for implementation of extended structural analysis as described in section 3.2.4. 1
function [ ADJ, REA, c o n t s , A c t I s o ] = r e a c h a b i l i t y ( ... i n c i d e n c e m a t r i x , c a u s a l i n c i d e n c e m a t r i x , no knowns , ... no inputs , cons )
2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17
% function [ ADJ, REA, c o n t s , A c t I s o ] = % r e a c h a b i l i t y ( i n c i d e n c e m a t r i x , c a u s a l i n c i d e n c e m a t r i x , ... no knowns , n o i n p u t s , cons ) % % INPUT : % incidence matrix % causal incidence matrix % no knowns : Number o f known v a r i a b l e s % n o i n p u t s : Number o f i n p u t s % cons : The s t r u c t s f o r each c o n s t r a i n t ( u s e d h e r e t o c h e c k i f ... a % c o n s t r a i n t can f a i l ) % % OUTPUT: % ADJ: Adjacency m a t r i x % REA: Reachablity matrix % conts : c o n s t r a i n t s u s e d i n p a t h from i n p u t t o o u t p u t
112
18
Active Structural Isolation Analysis - Source Code
% ActIso : Ma tri x c o n t a i n i n g a c t i v e d e t e c t a b i l i t y / i s o l a b i l i t y ... proberties
19 20 21 22 23 24 25
% % % % %
nc : number o f c o n s t r a i n t s nv : number o f v a r i a b l e s A: c a u s a l i n c i d e n c e m a t r i x . s e e t h e s t r u c t u r e b e l o w ∣ u 1 . . . u n i ∣ y 1 . . . y nm ∣ x 1 . . . . x n x ∣ c 1 ∣ ... ...
26 27
∣ % ... % c n c ∣ ... ... ∣
28 29 30 31 32 33
% A=c a u s a l i n c i d e n c e m a t r i x ; B=i n c i d e n c e m a t r i x ; nc=s i z e (A, 1 ) ; nv=s i z e (A, 2 ) ; adjmat =[ z e r o s ( nc , nc ) ,A; B’ , z e r o s ( nv , nv ) ] ;
34 35 36 37 38 39 40 41 42 43 44 45 46 47
%( c a u s a l i t y ) I n p u t s : d i r e c t i o n I n p u t −> C o n s t r a i n t % n i : number o f i n p u t s % nm: number o f measured v a r i a b l e s % n i=n o i n p u t s ; nm=no knowns ; f o r i =1: ni , c o n s t r a i n t s=f i n d (A( : , i )==1) ; f o r j =1: s i z e ( c o n s t r a i n t s , 2 ) , v a r i a b l e s=f i n d (A( c o n s t r a i n t s ( j ) ,nm+1: nv )==1) ; adjmat ( v a r i a b l e s+nm+nc , c o n s t r a i n t s ( j ) ) =0; end end
48 49 50 51 52 53 54 55 56 57 58 59 60 61
%( c a u s a l i t y ) O u t p u t s : d i r e c t i o n C o n s t r a i n t −> Output %NOT ALWAYS VALID . Depends on t h e f l o w c a u s a l i t y . %Check t h e c a u s a l i t y f o r each example % f o r i=n i +1:nm, c o n s t r a i n t s=f i n d (A( : , i )==1) ; f o r j =1: s i z e ( c o n s t r a i n t s , 2 ) , v a r i a b l e s=f i n d (A( c o n s t r a i n t s ( j ) ,nm+1: nv )==1) ; adjmat ( c o n s t r a i n t s ( j ) , v a r i a b l e s+nm+nc ) =0; end end ADJ = adjmat ;
62 63 64 65 66
%adjmat ( 1 , 8 ) =0; %adjmat ( 2 , 9 ) =0; %adjmat ( 1 1 , 5 ) =0; %adjmat ( 1 2 , 6 ) =0;
113
67 68 69
%adjmat ( 1 3 , 7 ) =0; %adjmat ( 1 4 , 3 ) =0; %adjmat ( 3 , 1 4 ) =1;
70 71 72 73 74 75 76 77 78 79
%To r e p l a c e z e r o s w i t h I n f ( u s u a l l y e l e m e n t s i n A a r e {0 ,1 , −1}) % f o r i =1: s i z e ( adjmat , 1 ) , f o r j =1: s i z e ( adjmat , 2 ) , i f adjmat ( i , j )==0 ∣ ∣ adjmat ( i , j )==−1, adjmat ( i , j )=i n f ; end end end
80 81 82 83 84 85
86 87 88 89 90 91 92
93
94 95 96 97
98 99 100 101
%%% % Find a l l p a t h s from an i n p u t node t o an o u t p u t node % pathS : S t a r t i n g node % pathE : End node % adjmat : Adjacency m a t r i x ( nxn matrix , n=∣C∣ + ∣X∣ + ∣ Z ∣ ) , ... e l e m e n t s ’ 1 ’ or ’ I n f ’ i f t h e r e i s an e d g e or n o t % % p a t h s ={}; c o n t s ={}; f o r i=nc +1: nc+ni , f o r j=nc+1+n i : nc+nm, pathS=i ; %For example 8 i s t h e s t a r t i n g node , ... c o r r e s p o n d i n g t o an i n p u t v a r i a b l e pathE=j ; %For example 11 i s t h e end node , c o r r e s p o n d i n g ... t o an o u t p u t v a r i a b l e p a r t i a l p a t h =[ pathS ] ; c o n s t r a i n t s=z e r o s ( 1 , s i z e ( adjmat , 1 ) ) ; c o n s t r a i n t s ( pathS ) =1; [ paths , a l l c o n s t r a i n t s ] = f i n d a l l p a t h s e r g ( pathS , ... pathE , adjmat , [ pathS ] , c o n s t r a i n t s , paths , ... constraints ) ; c o n t s =[ c o n t s ; l o g i c a l ( a l l c o n s t r a i n t s ) ] ; end end REA=p a t h s ;
102 103 104 105 106
%%% % Active i s o l a b i l i t y : % P = cell2mat ( conts ) ;
107 108
GID = z e r o s ( 1 , nc ) ;
109 110 111 112 113 114 115
f o r t = 1 : nc ;%s i z e (P, 2 ) % c h e c k i f c o n s t r a i n t can f a i l i f ( c o n s { t } . c a n F a i l == 2 ) % c o n s t r a i n t can ’ t f a i l GID ( 1 , t ) = −1; else
114
116 117 118 119 120 121 122
123 124 125 126
127 128
129 130 131 132 133 134 135 136 137 138
Active Structural Isolation Analysis - Source Code % check i f d e t e c t a b l e i f ( sum (P ( : , t ) ) ˜= 0 ) % constraint is structurally detectable GID ( 1 , t )= 1 ; % check i f i s o l a b l e f o r r = 1 : nc ;%s i z e (P, 2 ) % c h e c k t h a t we a r e n o t t e s t i n g i t a g a i n s t ... itself i f ( t˜=r ) % c h e c k i f column can f a i l i f ( c o n s { r } . c a n F a i l == 1 ) % c h e c k i f columns a r e e q u a l (Lemma ... 5.2) i f P ( : , t ) == P ( : , r ) % c o n s t r a i n t i s o n l y s t r u c t u r a l l y ... detectable GID ( 1 , t ) = t ∗ 1 0 ; GID ( 1 , r ) = t ∗ 1 0 ; end end end end end
end end A c t I s o=GID ;
Appendix
D The Dual Youla-Kucera Parameter in Terms of Variations
Table D.1 shows how to calculate the dual Youla-Kucera parameter 𝑆, from the coprime factorizations of a system as described in section 4.2.1 and from various descriptions of system variations, uncertainties or faults by the block Δ. System description, 𝐺𝑦𝑢 (Δ) (𝐼 + Δ)𝐺𝑦𝑢 𝐺𝑦𝑢 (𝐼 + Δ) 𝐺𝑦𝑢 + Δ 𝐺𝑦𝑢 (𝐼 − Δ)−1 (𝐼 − Δ)−1 𝐺𝑦𝑢 𝐺𝑦𝑢 (𝐼 − Δ𝐺𝑦𝑢 )−1 (𝑁 + Δ𝑁 )(𝑀 + Δ𝑀 )−1 ˜ + Δ ˜ )−1 (𝑁 ˜ + Δ ˜) (𝑀 𝑀 𝑁
The dual Youla-Kucera parameter, 𝑆(Δ) ˜ Δ(𝐼 − 𝑁 𝑈 ˜ Δ)−1 𝑁 𝑀 ˜ Δ(𝐼 − 𝑈 𝑁 ˜ Δ)−1 𝑀 𝑁 ˜ Δ(𝐼 − 𝑈 𝑀 ˜ Δ)−1 𝑀 𝑀 ˜ Δ(𝐼 − 𝑀 𝑉˜ Δ)−1 𝑀 𝑁 ˜ Δ(𝐼 − 𝑉 𝑀 ˜ Δ)−1 𝑁 𝑀 ˜ Δ(𝐼 − 𝑁 𝑉˜ Δ)−1 𝑁 𝑁 (Δ ) ( ( Δ ))−1 𝑀 𝑀 ˜ ˜ ˜ ˜ (−𝑁 𝑀 ) Δ𝑁 𝐼 + ( 𝑉 − 𝑈 ) Δ𝑁 ) ( ( ( ))−1 𝑀 −𝑈 (Δ𝑀˜ Δ𝑁˜ ) −𝑁 𝐼 + (Δ𝑀˜ Δ𝑁˜ ) 𝑉
Table D.1: The connection between different system uncertainty descriptions in terms of Δ and the dual Youla-Kucera parameter 𝑆. Source: (Niemann, 2003; Niemann and Stoustrup, 2002)
www.elektro.dtu.dk Department of Electrical Engineering Automation and Control Technical University of Denmark Elektrovej Building 326 DK-2800 Kgs. Lyngby Denmark Tel: (+45) 45 25 38 00 Fax: (+45) 45 93 16 34 Email:
[email protected]