Sensor Fault Detection and Isolation in Autonomous Nonlinear Systems
  Using Neural Network-Based Observers
This paper presents a novel observer-based approach to detect and isolate
faulty sensors in nonlinear systems. The proposed sensor fault detection and
isolation (s-FDI) method applies to a general class of nonlinear systems. Our
focus is on s-FDI for two types of faults: complete failure and sensor
degradation. The key aspect of this approach lies in the utilization of a
neural network-based Kazantzis-Kravaris/Luenberger (KKL) observer. The neural
network is trained to learn the dynamics of the observer, enabling accurate
output predictions of the system. Sensor faults are detected by comparing the
actual output measurements with the predicted values. If the difference
surpasses a theoretical threshold, a sensor fault is detected. To identify and
isolate which sensor is faulty, we compare the numerical difference of each
sensor meassurement with an empirically derived threshold. We derive both
theoretical and empirical thresholds for detection and isolation, respectively.
Notably, the proposed approach is robust to measurement noise and system
uncertainties. Its effectiveness is demonstrated through numerical simulations
of sensor faults in a network of Kuramoto oscillators.
John Cao, Muhammad Umar B. Niazi, Matthieu Barreau, Karl Henrik Johansson
Sensor Fault Detection and Isolation in Autonomous Nonlinear Systems Using Neural Network-Based Observers

###### Abstract

This paper presents a new observer-based approach to detect and isolate faulty sensors in industrial systems. Two types of sensor faults are considered: complete failure and sensor deterioration. The proposed method is applicable to general autonomous nonlinear systems without making any assumptions about its triangular and/or normal form, which is usually considered in the observer design literature. The key aspect of our approach is a learning-based design of the Luenberger observer, which involves using a neural network to approximate the injective map that transforms the nonlinear system into a stable linear system with output injection. This learning-based Luenberger observer accurately estimates the system's state, allowing for the detection of sensor faults through residual generation. The residual is computed as the norm of the difference between the system's measured output and the observer's predicted output vectors. Fault isolation is achieved by comparing each sensor's measurement with its corresponding predicted value. We demonstrate the effectiveness of our approach in capturing and isolating sensor faults while remaining robust in the presence of measurement noise and system uncertainty. We validate our method through numerical simulations of sensor faults in a network of Kuramoto oscillators.

## I Introduction

Fault detection and isolation (FDI) are essential for the safe and efficient operation of many industrial processes. A fault is an undesirable disruption or disturbance to the system, which could lead to catastrophic consequences if not addressed properly. Some examples of fault types include mechanical breakdown or failure of sensors. By using effective FDI methods, operators can identify faults early (detection), localize the fault source (isolation), and take corrective action before they cause costly damage or downtime.

FDI methods generally fall into two main categories: hardware and analytical redundancy [1]. Hardware redundancy methods rely on the use of multiple sensors to obtain and compare information about processes. This approach has the drawback of adding monetary cost for the purchase and maintenance of extra hardware. Methods using analytical redundancy overcome this by using the principle of residual generation. This generated residual is the difference between a predicted system output and its real measurement. Under fault-free operating conditions, the residual is approximately zero, while its value grows distinctly over a pre-defined threshold when faults occur.

Historically, methods for FDI based on analytical redundancy have been model-based, requiring an explicit mathematical model of the system being considered [2]. This approach was originally pioneered for linear systems during the 1970s in [3], where it was shown that it is always possible to design a filter capable of detecting and localizing faults in observable system dynamics. It was further refined and improved upon in [4], which together with [3] resulted in the famous _Beard-Jones Fault Detection filter_. Further extensions and application examples are addressed in [5, 6, 7, 8, 9].

The framework of observer-based fault detection schemes, developed in parallel with the above mentioned works, were first introduced for linear systems in [10]. Since then, it has become widely regarded as one of the most successful approaches for FDI and has resulted in several research directions. For example, the application of sliding-mode observers for FDI has been demonstrated in [11, 12, 13], where the problem is addressed by explicitly reconstructing the fault via manipulation of the output injection error. Nonlinear unknown input observers (NUIO) have also been widely used for FDI [2]. In [14], a bank of NUIOs with adjustable observer dynamics are used to detect and isolate thruster faults of an autonomous spacecraft. In recent years, an interval-based unknown input observer has gained a lot attention [15]. These observers are shown to be advantageous by relaxing the information requirements about the inputs and the non-linearity of the system. Substantial results on interval observers for FDI have been reported in [15, 16, 17, 18].

Another principal approach to analytical redundancy-based FDI are data-driven methods, which rose in popularity in the past decade driven by significant advancements in deep learning algorithms. These methods do not require an explicit system model, instead they rely on sensor data to approximate the underlying dynamics of the source that generates them in order to form a residual [19]. In [20], FDI with long short-term memory neural networks (LSTM) was demonstrated by generating residuals from comparing network predictions based on past time-series data with actual measurement. Other examples of neural network-based approaches are
proposed for industrial manufacturing processes [19], power plants [21] and unmanned aerial vehicles [22].

Despite the diversity of existing FDI schemes, most approaches still share certain limitations. The application domains of observer-based techniques are bound by their assumptions about specific system structures, which makes them impractical when such assumptions do not hold. Data-driven methods are relaxed in their assumptions, but this usually comes with the drawback of requiring substantial sensor data, which may be difficult or expensive to obtain.

In this paper, we address these issues by considering FDI using a learning-based approach to nonlinear Luenberger observers, also known as Kazantzis-Kravaris/Luenberger (KKL) observers [23, 24]. KKL observers rely on transforming the original system into a new system of higher dimension, where the transformation is governed by a certain partial differential equation. The observer is then described by the transformed system which is required to be stable up to output injection. An estimate of the system state is obtained by applying the inverse of the transformation to the new system, which takes it back to the original state space. KKL observers are not bound by considerations of specific system forms, instead they rely on certain observability conditions which have been shown to be very mild, making them applicable to a wide range of systems.

The main contribution of this paper includes a full description of a novel fault detection and isolation method that combines model and learning-based techniques using KKL observers. We present a neural network-based approach for approximating the observer transformations, leveraging the fact that any amount of training data can be generated from knowing the system model. We demonstrate the FDI capabilities of our method using numerical simulations, showing that it is able to effectively detect and isolate sensor faults under a variety of circumstances, while remaining robust and functional under the influence of system and measurement noise.

The outline of this paper is as follows: We begin by formulating the sensor FDI problem in Section II. In Section III, we describe the design of KKL observers and provide a detailed step-by-step description of our FDI method. Numerical results are provided in Section IV where we test our method by simulating a variety of fault cases. Lastly, Section V concludes the paper.

## II Problem Formulation

We consider an autonomous nonlinear system

\[\dot{x}(t) =f(x(t))+w(t) \tag{1a}\] \[y(t) =h(x(t))+v(t) \tag{1b}\]

where \(x(t)\in\mathcal{X}\subset\mathbb{R}^{n_{x}}\) is the state, \(y(t)\in\mathbb{R}^{n_{y}}\) is the output, and \(w(t),v(t)\) are bounded process and measurement noises, respectively. The output of the system (1) might be affected by sensor faults, which are modeled by modifying (1b) as

\[y(t)=\phi(t)\left[h(x(t))+v(t)+\zeta(t)\right]. \tag{2}\]

In (2), the measurements are corrupted by two types of faults:

\[\phi(t)=\begin{bmatrix}\phi_{1}(t)&\dots&\phi_{n_{y}}(t)\end{bmatrix}^{ \mathsf{T}}\in[0,1]^{n_{y}}\]

that models complete sensor failure and

\[\zeta(t)=\begin{bmatrix}\zeta_{1}(t)&\dots&\zeta_{n_{y}}(t)\end{bmatrix}^{ \mathsf{T}}\in\mathbb{R}^{n_{y}}\]

that models any type of sensor deterioration affecting the correctness of the output. If \(\phi(t)=1_{n_{y}}\) and \(\zeta(t)=0_{n_{y}}\), then the system is fault-free. Other cases represent multiple type of faults; for example, biasing or precision degradation of sensor \(i\) when \(\zeta_{i}(t)\neq 0\) or failure of sensor \(i\) when \(\phi_{i}(t)=0\).

Our objective is to detect and isolate sensor faults in (1) by designing a nonlinear observer of the form

\[\dot{\hat{z}}(t) =\psi(\hat{z}(t),y(t)) \tag{3a}\] \[\hat{x}(t) =\mathcal{T}^{*}(\hat{z}(t))\] (3b) \[\hat{y}(t) =h(\hat{x}(t)) \tag{3c}\]

which takes measurements \(y(t)\) as input and gives the state estimate \(\hat{x}(t)\) as output. The state \(\hat{z}(t)\in\mathbb{R}^{n_{z}}\) of the observer follows a nonlinear transformation \(\hat{z}=\mathcal{T}(\hat{x})\), where \(\mathcal{T}:\mathcal{X}\rightarrow\mathbb{R}^{n_{z}}\), and \(\mathcal{T}^{*}:\mathbb{R}^{n_{z}}\rightarrow\mathcal{X}\) is the left inverse of \(\mathcal{T}\). More details on these transformations are given in the next section.

The FDI problem can be split into two components:

1. Design (3) so that \(\lim_{t\rightarrow\infty}\|x(t)-\hat{x}(t)\|=0\) when there are no faults.
2. Detect and isolate faults by filtering the output signals of (2) using (3). Then, take the difference between the measured and estimated outputs to form residuals \[r_{i}(t)=|y_{i}(t)-\hat{y}_{i}(t)|,\quad i=1,\dots,n_{y}.\] FDI is then performed by discovering and analyzing anomalies occurring in the residuals.

## III FDI using learning-based KKL-Observer

In this section, we describe the proposed FDI approach using neural network-based observers. First, we briefly recall the theory of KKL observer design. Then, we present a machine learning-based observer design procedure. Finally, we propose our FDI methodology.

### _KKL-Observers_

Consider a nonlinear system

\[\dot{x}(t) =f(x(t)) \tag{4a}\] \[y(t) =h(x(t)) \tag{4b}\]

where \(x(t)\in\mathcal{X}\subset\mathbb{R}^{n_{x}}\) is the system state, \(y(t)\in\mathbb{R}^{n_{y}}\) the measured output, and \(f\) and \(h\) are smooth maps. The KKL observer is designed according to the following steps:

1. Transform (4) to new coordinates by an injective transformation \(\mathcal{T}:\mathcal{X}\rightarrow\mathbb{R}^{n_{z}}\) with \(z=\mathcal{T}(x)\) and \(n_{z}=n_{y}(2n_{x}+1)\) satisfying \[\dot{z}(t)=Az(t)+Bh(x(t));\;\;z(0)=\mathcal{T}(x_{0}),\] (5)
where \(A\in\mathbb{R}^{n_{z}\times n_{z}}\) is a Hurwitz matrix and \(B\in\mathbb{R}^{n_{z}\times n_{y}}\) is such that the pair \((A,B)\) is controllable. From (5), we see that \(\mathcal{T}\) must be governed by the partial differential equation (PDE) \[\frac{\partial\mathcal{T}(x)}{\partial x}f(x)=A\mathcal{T}(x)+Bh(x).\] (6)
2. Find the left inverse \(\mathcal{T}^{*}:\mathbb{R}^{n_{z}}\rightarrow\mathcal{X}\) of \(\mathcal{T}\), i.e, \(\mathcal{T}^{*}(\mathcal{T}(x))=x\), which exists due to the injectivity of \(\mathcal{T}\). Then, the KKL observer is given by \[\dot{z}(t) =Az(t)+By(t);\;\;\;z(0)=z_{0}\] (7a) \[\dot{x}(t) =\mathcal{T}^{*}(z(t))\] (7b) where \(\dot{x}(t)\) is the state estimate obtained from the observer.

The existence of (7) is guaranteed if (4) is _forward complete within \(\mathcal{X}\)_ and _backward \(\mathcal{O}\)-distinguishable_. We omit the details in this paper and refer to [24] for further details.

### _Machine Learning Approach for KKL Observer Design_

The design principle described in Section III-A relies on an injective transformation \(\mathcal{T}\) satisfying (6) and its inverse \(\mathcal{T}^{*}\). However, finding exact \(\mathcal{T}\) and \(\mathcal{T}^{*}\) are generally difficult. Even if \(\mathcal{T}\) is known, finding \(\mathcal{T}^{*}\) is very challenging [25]. We overcome these challenges by approximating the transformations using a _supervised physics-informed learning_ approach [26]. More specifically, we generate synthetic training data by simulating (4) and (5) to accurately capture the maps between their state spaces. We then perform nonlinear regression under the constraint of (6) to learn the approximate transformations. Relying on the theoretical results of [26], the convergence of the observer is guaranteed if the approximation error is sufficiently small. Assuming a well-trained model, the learning-based observer is capable of generalizing to previously unseen initial conditions and trajectories [26].

#### Iii-B1 Generation of Training Data

An arbitrary amount of training data may be generated by knowing the structure of (4) and (5). We begin by choosing \(p\) pairs of initial conditions \((x_{0}^{i},z_{0}^{i}),i=1,\ldots,p\) from the defined sets \(\mathcal{X}^{\text{train}}\subset\mathcal{X}\) and \(\mathcal{Z}^{\text{train}}\subset\mathbb{R}^{n_{z}}\). It is imperative that the points \(x_{0}^{i}\) are well distributed within \(\mathcal{X}^{\text{train}}\) in order to fully capture the transformations. This can be accomplished by using statistical methods such as Latin hypercube sampling suggested in [27]. Since we do not know \(\mathcal{T}\) in advance, it is impossible to sample from \(\mathcal{Z}^{\text{train}}\) so that \(z_{0}^{i}=\mathcal{T}(x_{0}^{i})\). Instead, we utilize a truncation method proposed in [26, 28].

The procedure of generating training data is as follows:

1. Choose \(p\) number of pairs of initial conditions \((x_{0}^{1},z_{0}^{1}),\ldots,(x_{0}^{p},z_{0}^{p})\).
2. Simulate (4) and (5) for a finite time \(t_{s}>0\) to obtain trajectories \[(x(t_{k};x_{0}^{1}),z(t_{k};z_{0}^{1})),\ldots,(x(t_{k};x_{0}^{p}),z(t_{k};z_{ 0}^{p}))\] with \(k=0,1,2,..,s\) and \(s\) being the number of samples.
3. Divide1 the dataset into _physics data points_\(\mathsf{P}_{p}\) and _regression data points_\(\mathsf{P}_{r}\). One way to accomplish this is to choose \(\mathsf{P}_{r}\) as all samples with an even index, and \(\mathsf{P}_{p}\) as all with an odd index. Footnote 1: This is motivated by the use of physics-informed neural networks [29].

#### Iii-B2 Learning the Transformations

We learn the transformation and its inverse by considering two neural networks \(\hat{\mathcal{T}}_{\theta}\) and \(\hat{\mathcal{T}}_{\eta}^{*}\), where \(\theta\) and \(\eta\) are the trainable parameters of the network. Both neural networks are trained jointly in an encoder-decoder architecture by minimizing a loss function consisting of a _regression loss_ and a _physics loss_. We define the regression loss as the mean squared error

\[\mathcal{L}_{\text{reg}}(\theta,\eta)\doteq\frac{1}{p}\sum_{i=1}^ {p}\frac{1}{|\mathsf{P}_{r}|}\sum_{k\in\mathsf{P}_{r}}\left\|z^{i}(t_{k})-\hat{ \mathcal{T}}_{\theta}(x^{i}(t_{k}))\right\|^{2}\\ +\chi\big{\|}x^{i}(t_{k})-\hat{\mathcal{T}}_{\eta}^{*}(\hat{ \mathcal{T}}_{\theta}(x^{i}(t_{k})))\big{\|}^{2} \tag{8}\]

where \(\chi\) is a discount factor balancing the two loss terms. The function (8) uses the available information about \(x^{i}(t_{k})\) and \(z^{i}(t_{k})\) to minimize the deviations in both the latent space and the final output. Furthermore, we leverage knowledge of the fact that a good approximation \(\hat{\mathcal{T}}_{\theta}\) should satisfy the PDE (6) by defining a physics loss as the PDE residual

\[\mathcal{L}_{\text{phy}}(\theta)\doteq\frac{1}{p}\sum_{i=1}^{p} \frac{1}{|\mathsf{P}_{p}|}\sum_{k\in\mathsf{P}_{p}}\big{\|}\frac{\partial \hat{\mathcal{T}}_{\theta}}{\partial x}(x^{i}(t_{k}))f(x^{i}(t_{k}))\\ -A\hat{\mathcal{T}}_{\theta}(x^{i}(t_{k}))-Bh(x^{i}(t_{k}))\big{\|} ^{2}. \tag{9}\]

This has the effect of reducing the risk of overfitting while also improving the generalization capabilities of the neural networks. Combining (8) and (9), we define the loss function to be

\[\mathcal{L}(\theta,\eta)\doteq\mathcal{L}_{\text{reg}}(\theta,\eta)+\lambda \mathcal{L}_{\text{phy}}(\theta) \tag{10}\]

where \(\lambda>0\) is a hyperparameter acting as a balancing factor for the two loss terms.

### _Performing Fault Detection and Isolation_

Our method detects and isolates faults by discovering rapid changes in the residual signals \(r_{i}(t)\) caused by fault induced observer transients. This is accomplished by defining a threshold \(r_{\Delta}\). Due to the inevitability of approximation errors in \(\hat{\mathcal{T}}_{\theta}\) and \(\hat{\mathcal{T}}_{\eta}^{*}\), and the presence of noise in (1), the residuals \(r_{i}\) will never converge to zero. Therefore, to avoid false positive alarms, it is important to distinguish between the non-zero residuals due to noise and approximation error and the increase in residual magnitude due to sensor faults. However, the introduction of a fault in a sensor will not only induce a transient in the corresponding output estimate, but in all other estimated outputs as well. Therefore, fault in one sensor could induce large residuals for the output estimates of other sensors, which may cause problem in fault isolation. Moreover, because of these inter-dependencies, the transients after the occurrence of fault may persist above the threshold, leading to an inability to even detect other subsequent faults.
Therefore, instead of using residuals \(r_{i}(t)\), we propose to use the finite difference approximation of its derivative to perform FDI, i.e.,

\[\tilde{r}_{i}(t_{k})=\left|\frac{r_{i}(t_{k})-r_{i}(t_{k-1})}{h}\right|,\quad i=1,\ldots,n_{y} \tag{11}\]

where \(\tilde{r}_{i}(t_{k})\) is the numerical approximation of \(\frac{dr_{i}(t_{k})}{dt}\) with \(h\) being the step size between samples. This remedies the unwanted influence of other transients and allows for efficient and reliable FDI, which is illustrated in the simulations.

The method for computing the threshold \(r_{\Delta}\) is described below:

1. Draw \(N\) initial conditions to form a set \(\mathcal{X}^{r_{\Delta}}\in\mathcal{X}\), with \(\mathcal{X}^{r_{\Delta}}\) satisfying \(\mathcal{X}^{r_{\Delta}}\cap\mathcal{X}^{\text{train}}=\emptyset\) to simulate realistic operating conditions with previously unseen data.
2. From each initial condition, generate measured and estimated output trajectories \((y^{1}(t),\ldots,y^{N}(t))\) and \((\hat{y}^{1}(t),\ldots,\hat{y}^{N}(t))\), by simulating (1) and (7), replacing \(\mathcal{T}^{*}\) with \(\tilde{\mathcal{T}}^{*}_{\eta}\).
3. For each measured and estimated output pair, compute (11).
4. The threshold \(r_{\Delta}\) is then taken as the maximum of all finite difference approximations.

To eliminate the influence of initial transients, which may cause \(r_{\Delta}\) to become unnecessarily large, we truncate the measured and estimated output trajectories at some time \(t_{\text{run}}>0\). A simple way to empirically choose \(t_{\text{run}}\) is to simulate the observer dynamics and select a time at which the transients have vanished. A fault is considered to be detected whenever any \(\tilde{r}_{i}(t_{k})>r_{\Delta}\).

## IV Simulation Results

Our approach is demonstrated in this section using numerical simulations. We show that FDI of a highly nonlinear system can be achieved using neural network-based KKL-observers, even in the presence of additive process and measurement noises. Both types of faults, sensor deterioration represented by the fault signal \(\zeta_{i}(t)\neq 0\) and sensor failure represented by \(\phi_{i}(t)=0\) in (2), are demonstrated.

### _Kuramoto Model_

We consider the Kuramoto model for demonstrating our FDI method. The Kuramoto model describes the phenomena of synchronization in a multitude of systems, including electric power networks, multi-agent coordination, and distributed software networks [30]. The dynamics of a network with \(n\) nodes are given as

\[\dot{\theta_{i}}(t)=\omega_{i}+\sum_{j=1}^{n}a_{ij}\sin(\theta_{i}(t)-\theta_ {j}(t)) \tag{12}\]

where \(\theta_{i}(t)\in\mathbb{S}^{1}\) is the phase angle of node \(i=1,..,n\), \(\omega_{i}\in\mathbb{R}\) is the natural frequency of node \(i\), and \(a_{ij}\geq 0\) denotes the coupling between node \(i\) and \(j\). In the literature, the state trajectories of (12) are often represented graphically as \(\sin(\theta_{i})\) in order to better illustrate their synchronization. We follow the same convention in our simulations.

### _Experimental Setup_

For (12), we consider a network of 10 nodes with randomly generated natural frequencies \(\omega_{i}\) and couplings \(a_{ij}\). The measurements are chosen as \(y=\begin{bmatrix}\theta_{1}&\theta_{2}&\theta_{3}&\theta_{4}&\theta_{5}\end{bmatrix}^ {\mathsf{T}}\). A set of 50 initial conditions are generated using Latin hypercube sampling, with \(\chi^{\text{train}}\in[-2,2]^{10}\). We choose Runge-Kutta-4 as our numerical ODE solver to simulate (12) and (5) over a time interval of \([0,30]\), partitioned into 4000 sample points for each trajectory. The neural networks \(\tilde{\mathcal{T}}_{\theta}\) and \(\tilde{\mathcal{T}}^{*}_{\eta}\) are chosen to be fully connected feed-forward networks, each consisting of 3 hidden layers of 250 neurons with ReLU activation function. Model training is facilitated by data standardization and learning rate scheduling. Following [31], the matrices of (5) are chosen as

\[A=\Lambda\otimes I_{n_{y}},\qquad B=\Gamma\otimes I_{n_{y}}\]

where \(\Lambda\in\mathbb{R}^{(2n_{x}+1)\times(2n_{x}+1)}\) is a diagonal matrix with diagonal elements linearly distributed in \([-15,-21]\), \(\Gamma\in\mathbb{R}^{2n_{x}+1}\) is a column vector of ones, and \(I_{n_{y}}\) is the identity matrix of size \(n_{y}\times n_{y}\). Here, \(n_{x}\) and \(n_{y}\) are 10 and 5, respectively, and \(n_{z}=n_{y}(2n_{x}+1)=105\).

The estimation capabilities of the observer under fault-free conditions are demonstrated in Fig. 1, which shows the estimated and true trajectories of two (randomly chosen) unmeasured states \(\theta_{7}\) and \(\theta_{8}\) over a time interval of \([0,20]\), with noise terms \(w(t),v(t)\sim\mathcal{N}(0,0.02)\). The figure demonstrates that the estimation error is stable under noise and neural network approximation error.

### _Numerical Results_

We now apply the learned neural network-based KKL observer to perform FDI. The fault threshold \(r_{\Delta}=7.1\) is computed according to the method described in Section III-C. We choose \(N=100\) initial conditions to create \(\mathcal{X}^{r_{\Delta}}\in[-2,2]^{10}\), again using Latin hypercube sampling. Fig. 1(a)-1(e) demonstrate the detection and isolation capabilities of our method under a variety of faults. In the figure, the first, second, and third rows correspond to the finite difference approximation (11), measured and estimated state trajectories, and the residuals \(r_{i}=|y_{i}-\hat{y}_{i}|\), respectively.

In Fig. 1(a), sensor \(2\) is disturbed by a constant fault term \(\zeta_{2}(t)=1\) introduced at \(t=5\) and ending at \(t=15\). The observer is able to follow the measured state trajectories

Fig. 1: Estimated and true trajectories of states \(\theta_{7}\) and \(\theta_{8}\) under the influence of process and sensor noise.
despite the presence of process and measurement noise, thus generating a small residual when no faults are present. The introduction of a fault induces a transient in the observer, causing a large residual to be generated for the disturbed state. Due to the stability of the observer, it will attempt to track the faulty trajectories after the occurrence of fault, leading to a decrease in the residual magnitudes. A new transient is induced upon the end of the fault term, creating the sharp "spikes" shown in the figure. The differences between using (11) and the generated residuals can be seen by comparing the top and bottom figures. It is clear that by approximating \(\frac{dr_{i}(t_{b})}{dt}\), the anomaly caused by \(\zeta(t)\) can be isolated from other simultaneously occurring transients.

Fig. 1(b) illustrates the situation when more than one fault is present. Sensors \(1\) and \(5\) are disturbed by \(\zeta_{1}(t)=\zeta_{5}(t)=1\), during \(t=5\) to \(t=10\), and \(t=7\) to \(t=15\) respectively. Each fault is distinctly detectable at the moment of occurrence. Again, using the finite difference approximations allows for isolation of the affected states by dampening the undesired transients.

In Fig. 1(c), we show that our method is also capable of detecting complete sensor shutdowns, which we demonstrate by modeling the fault in sensor \(4\) with \(\phi_{4}(t)=0\).

Fig. 1(d) and 1(e) illustrates the case when the fault signal on sensor \(3\) is a sin-wave

\[\zeta_{3}(t)=A\sin(\omega t) \tag{13}\]

where \(A\) is the amplitude and \(\omega\) the angular frequency. In Fig. 1(d), we simulate a fault in sensor \(y_{3}\) with \(A=5\) and \(\omega=2\pi\) rad\(/s\). In Fig. 1(e), the amplitude remains unchanged, but the angular frequency is increased to \(\omega=20\pi\) rad\(/s\). Unsurprisingly, an increase in frequency results in more prominent responses.

Note that the large spikes in the residuals and finite differences seen at the beginning of each figure is also a result of the observer transients, due to the full system state being unknown upon initialization. This should therefore be treated as an expected behavior and ignored in practice.

## V Conclusion and Future Work

We have presented a novel method for sensor fault detection and isolation using neural network-based observers. Our approach is effective in both fault detection and isolation, and it has the potential to be applied to a wide range of systems because it is not restricted to nonlinear systems with specific form or structure. Instead, it relies only on a certain observability condition of the system. We described a method to systematically design an observer, using neural networks to learn an injective transformation and its inverse. A state

Fig. 2: (a) Sensor deterioration in \(y_{2}\) with constant fault term. (b) Sensor deterioration in \(y_{1}\) and \(y_{5}\) at different time points with constant fault terms. (c) Shutdown of sensor \(y_{4}\). (d), (e) Sensor deterioration in \(y_{3}\) with a sinusoidal fault term.
estimate is obtained by transforming the original nonlinear system into a new one that is a stable linear system with output injection, and then applying the inverse transform back to its original state space. Sensor faults are detected by generating a residual, defined as the absolute difference between measured and estimated state values. We propose to monitor the time derivative of the residual signal by using the finite difference approximation. An empirical threshold is computed which if crossed, signifies the occurrence of a fault. We tested our method on a network of Kuramoto oscillators by simulating a variety of fault cases, including precision degradation due to sensor deterioration (injection of constant and sinusoidal fault signals) and sensor shutdown due to complete failure. The simulations demonstrated the effectiveness of our method in both fault detection and isolation.

The theory of KKL observers extends to non-autonomous systems, and adapting our method to those systems remains an open research topic. It is also of interest to study the performance of the method in the real world, especially in systems where conventional solutions are known to fail. Developing analytic methods to compute the threshold for residuals will also be considered in the future.
