A Continuous-Discrete Finite Memory Observer Design for a Class of Nonlinear Systems: Application to Fault Diagnosis

+is paper aims to develop a continuous-discrete finite memory observer (CD-FMO) for a class of nonlinear dynamical systems modeled by ordinary differential equations (ODEs) with discrete measurements.+e nonlinear systems under consideration are at least locally Lipschitz, which guarantees the existence and uniqueness of solution at each time instant. +e proposed nonlinear observer uses a finite number of collected measurements to estimate the system state in the presence of measurement noise. Besides, a one-step prediction algorithm incorporated with an iterative-update scheme is performed to solve the integral problem caused by system nonlinearity, and an analysis of the numerical integration approximation error is given. +e properties of estimation performance have been further proved in deterministic case and been analyzed by Monte Carlo simulation in stochastic cases. It is worth noting that the presented method has a finite-time convergence, while most nonlinear observers are usually asymptotically convergent. Another advantage of CD-FMO is that it has no initial value problem. For the application purpose, residuals are generated to implement fault detection cooperated with Cumulative Sum (CUSUM) control charts, while a bank of CD-FMOs is adopted to realize fault isolation for different sensor and actuator faults of the considered nonlinear robotic arm. +e robustness and effectiveness of the proposed approach are illustrated via the simulation results.


Introduction
Over past decades, it was noticed that state estimation, especially observer, plays an important role in the modern control theory and practice [1][2][3]. As the real engineering systems became more and more complex, the corresponding growing demand of observer design for complex nonlinear systems have gained increasing consideration. e pioneer works can be traced to [4,5], which represents the major pseudo-linear techniques nowadays. However, in order to well ensure the existence of the coordinate transformation in these approaches, the established conditions are extremely difficult to satisfy in practice [6]. In the meantime, numerous system nonlinearities can be regarded as globally Lipschitz or at least locally [7]. Hence, there also exist several methods which focus on developing the observers directly based on the original nonlinear Lipschitz systems by solving linear matrix inequalities (LMIs) under certain assumptions or using the high gain observer [6][7][8][9]. As we knew that the dynamics of most engineering systems are naturally continuous [10], e.g., trajectories of vehicles and flow of electric current, it is more convenient and accurate to model the physical processes in continuous time with nonlinear differential equations. Meanwhile, observations are usually taken at discrete time instants when using digital sensors. For this reason, there is a significant amount of observer designs that has been investigated in the literature based on continuous-discrete modeling [3,8,11,12].
Observer-based method has also been widely used in fault detection and isolation (FDI) of many fields such as PEM fuel cell and heat-exchanger/reactor system [13][14][15]. As examined in [16,17], that model-based diagnosis method will be affected with divergence due to the accumulation of modeling uncertainties. Furthermore, state estimation based on infinite memory (i.e., all the process history) may result in the insensitivity to recent measurements which might have the clues of a fault in incipient stage [18]. us, the corresponding researches like fading filter [19] and finite memory observer are naturally explored. Finite memory observer (FMO) was first proposed by Medvedev [20] for linear system in the deterministic framework, which indicates that this observer is extremely efficient for state estimation. Afterwards, the robustness and sensitivity of this approach were addressed by Nuninger and Graton [18,21]. Kratz et al. have then synthesized this observer in fault diagnosis of linear system [22] and hybrid system [23]. All these previous researches reveal that finite memory observer provides a great potential in state estimation as well as in fault diagnosis. erefore, the main contribution of this paper is that we develop a nonlinear continuous-discrete finite memory observer (CD-FMO) for a class of nonlinear Lipschitz system. It has been proven that the designed observer has a finite-time convergence and good robustness against measurement noise. Moreover, we also perform a rapid fault detection and an accurate fault isolation to a single-link robotic arm by using the proposed nonlinear CD-FMO in the presence of measurement noise. e work of this paper is organized as follows: Section 2 introduces the statements of problem with considered continuous-discrete nonlinear system. In Section 3, we present the construction of the proposed nonlinear CD-FMO together with an iterative-update algorithm for numerically approximating integration due to the nonlinearity of system. In addition, we also give a detailed demonstration of the finite-time convergence. e criteria of how to choose the window length is also stated in this section. In Section 4, we apply our approach to a nonlinear state-space model of a single-link robotic arm. A detailed analysis is provided with respect to selection of window length, estimation performance, numerical integration error analysis, and robustness analysis, respectively. In terms of application in fault diagnosis, different sensor faults and actuator fault, which are the two typical faults in actual physical system, have been illustrated in Section 5. Conclusions and the perspectives of future works are summarized in Section 6.

Problem Statement
We consider a class of continuous-discrete nonlinear systems described by the following state-space equation: where x ∈ R n , y ∈ R p , and u ∈ R q are continuous state vector, discrete measurement vector, and continuous input vector, respectively. T s is the sampling period of measurement (i.e., ∃k ∈ N | t � k × T s ). A ∈ R n×n , B ∈ R n×q , G ∈ R n×n , and C ∈ R p×n are known matrices. e nonlinearity Φ(x) is a nonlinear function with respect to state x. Φ(x) is at least locally Lipschitz; that is, where Lipschitz constant ξ > 0. Vectors v and w represent Gaussian measurement noise and Gaussian process noise, respectively. And v and w are independent with the following properties: where δ(·) is Dirac delta function and δ i,j is Kronecker delta function. It should be noted that the continuous-discrete systems like (1a) naturally exist when continuous process are measured via digital sensors. Without loss of generality, we are going to present a nonlinear observer design where the estimation instant is synchronized with the measurements instant since it is exactly what is needed under the background of diagnosis. e proposed CD-FMO will be detailed in the next section.

Continuous-Discrete Finite Memory Observer
In this section, the construction of the proposed continuousdiscrete finite memory observer for nonlinear systems (1a) is illustrated. en the finite-time convergence has been proved theoretically. e selection of window length is stated at the end of this section. Before we start, we introduce the following remark first.

Remark 1.
e authors in [24] have proven that the observability of a nonlinear dynamic system is a necessary condition and that there exists a finite-time observer for the system.
We are able to conclude from this remark that if we can build a finite-time observer for a nonlinear system, then this nonlinear system is observable.

Formulation of CD-FMO.
Suppose that at each frozen time instant t, the discrete measurements are collected in the Here, L is called window length. By using the square matrix exponential e −At as a factor and integrating (1a), we can give the relation between the states in two different time instants t and t − τ i as follows: en, premultiplying (4) by the matrix Ce − Aτ i and taking into account the measurement equation (1a) at time instant t − τ i , we obtain 2 Mathematical Problems in Engineering Applying (5) for each measurement in the time window [t − τ L−1 , t], a finite number of augmented measurements can be expressed in terms of system state x(t) as in the following linear equation: where It is straightforward that the noise component V L has zero mean; that is, E(V L ) � 0. e variance matrix P is block symmetric matrix in the following form: where the block elements Q i with (i � 0, 1, . . . , L − 1) are calculated by Now, the state estimation x(t) at time instant t, that is, the solution of (7), can be obtained as follows in the sense of least squares: with Let Λ L � W T L P −1 W L , and it can be seen that the existence condition of x(t) in (11) is given by the existence of matrix Λ −1 L . is condition is then given by the rank of matrix W L ; that is, rank(W L ) � n � dim(x), which is guaranteed by the following hypothesis.
According to (11) and (12a), we obtain the analytical form of state estimation x(t) for considered nonlinear systems (1a). e calculation of two integral terms α t−τ i ,t and β t−τ i ,t in (12a) is then detailed as follows.

Analytical Calculation of the Term α t−τ i ,t .
It is obvious to see from (6a) that all the elements contained inside the integral are known and it is easy to have an analytical solution by some useful software with symbolic computation such as Maple and Mathematica. If the mathematical expression of input u(t) is unknown, we can still get the solution by putting the element u(t) as a factor of integral under the assumption that u(t) is sampled as zero-order hold and thus remains to be constant between two consecutive sampling instants, which is usually true since most controllers of actual systems are digital computers in practice.

Iterative Algorithm for Solving the Term β
In order to compute β t−τ i ,t , we might also note that it is impossible to have an exact analytical solution. Since we can explicitly see from (12b) that there is the term "Φ(x(θ))" in the integral, in order to analytically calculate β t−τ i ,t , we must know the exact trajectory of "x(θ)" between instant t − τ i and t, which unfortunately is what we seek to know (via the estimation x(t) in (11)). Hence, in this paper, a one-step prediction together with iterative-update algorithm is designed to obtain the approximate solution of β t−τ i ,t by Newton-Cotes formulas [25].
In each time window [t − τ L−1 , t], we define the measurement set Z L � y(t − τ i ) (i � 0, 1, . . . , L − 1) and estimation set X L � x(t − τ j ) (j � 1, . . . , L − 1). It should be noted here that there is no case j � 0 since all the elements in X L are obtained by previous window and is exactly what we aim to estimate by current window. erefore, a one-step prediction of state x at instant t, noted as x * (t), has been performed by using the tangent slope _ x(t − Δt) with a small time interval Δt � T s as follows: x * (t) is then iteratively updated by (11) and (12a), which makes the finial estimation x(t) after all iterations. e termination condition of the iteration here is given in (14), which is either a threshold c defined a priori for the error between two iterations or a threshold N max for the number of iterations m: Furthermore, the first-order Newton-Cotes formula, which yields trapezoidal rule, is employed in this paper to numerically approximate the integral term β t−τ i ,t in (12a). For the purpose of reducing the massive computing burden in each iteration, we notice from (12b) that β t−τ i ,t can be divided as follows: and we know that the previous estimation set is unchanged during each iteration of updating x * (t), which leads to g(x(t − τ j )) by (17) unchanged. As a consequence, β t−τ i ,t−τ 1 by (16a) also remains the same at each iteration. erefore, as it is shown in Figure 1, we only need to recalculate the term β t−τ 1 ,t in (15) at each iteration. In this way, the unnecessary calculation burden caused by iteration can be dramatically reduced when using Newton-Cotes formulas to calculate the numerical integration.
For the sake of overall understanding, the summarized algorithm of the proposed nonlinear observer CD-FMO is shown in Algorithm 1.

Estimation Property of the Presented CD-FMO
Theorem 1. If nonlinear system (1a) satisfies the hypothesis H1, in the case of noise-free and fault-free, the property of estimation by presented CD-FMO are unbiased as follows: Proof. In the case of noise-free and fault-free, according to (1)- (7), the proposed CD-FMO (11) can be rewritten for the deterministic case as follows: with and then, as stated in (5) and regardless of noise term v(t − τ i ), y(t − τ i ) can be given as and by replacing the term y(t − τ i ) in (19) by (21) and taking into account (20), we have In order to prove eorem 1, we know that the following equivalence can be obtained directly: and from (22), together with the properties of matrix norm [26], the norm of x(t) − x(t) can be therefore expressed as follows: According to (6b) and (12b) and hypothesis H1, (24) can be further derived as 4 Mathematical Problems in Engineering and then the Gronwall inequality [27] yields and hence, (27) e proof is completed.
Step 1: Initialization (m � 0). At each frozen time instant t, given the measurement set Z L and the previous estimation X L .
Step 2: Calculating g(x(t − τ j )) for all the elements in set X L , then using Newton-Cotes formulas to compute β t−τ i ,t−τ 1 by (16a) Step 3: Perform a one-step prediction of x at instant t, noted as x * (t), by using x(t − τ 1 ) and (13).
Step 5: Moving the time window to next time instant t � t + T s , and go back to Step 1.

Mathematical Problems in Engineering
Remark 2. We can see from eorem 1 that x(t) � x(t) is always true when t ≥ L × T s ; that is to say, we have the following conclusion: (1) e proposed CD-FMO is a dead-beat observer in the case of noise-free and fault-free; the finite-time convergence is L × T s (one window-size). (2) ere is no estimation when t < L × T s . In other words, there is no initial value problem (IVP) for the presented nonlinear observer, which gives us another advantage for application in physics or other sciences.

Analytical Choice of the Window Length L.
As it is shown in (11) and (12a), at each time instant t, the state estimation x(t) is related to the window length L. us, it is necessary to interpret how to select an appropriate window length L.
Here, we are going to explain this by defining the "minimal length L min " and "maximal length L max ", as it has been shown in [18].

Minimal Length L min .
e minimal window length L min is chosen to assure the existence of the proposed CD-FMO by (11). As we have already discussed in subsection A of Section 3, this condition is then given by the rank of matrix W L ; that is, rank(W L ) � n � dim(x), which is already guaranteed by hypothesis H1. However, L min is just used to valid the hypothesis H1; it is definitely not the optimal window length, as shown in the latter section.

Maximal Length L max .
Here it should be noticed that, theoretically speaking, there is no maximum window length L max for CD-FMO. e greater the length L, the better the estimation x(t), which is reasonable since the amount of measurement information augments as the window length increases. However, after a certain size, the contribution of additional information by increasing window length is not significant enough to decrease estimation error. erefore, in this paper, we take "the maximum eigenvalue of covariance matrix Σ x " of estimation error x � x − x as an indicator to select maximum window length L max . Given a selected threshold of estimation error tolerance Υ Tol , L max is defined as follows: which is the smallest window length when the largest eigenvalue of Σ x is smaller than error tolerance threshold Υ Tol . is part will be further analyzed in the next section with an illustrative example.

Illustrative Example: A Single-Link Robot
In this section, we consider a nonlinear single-link robotic arm, which has an elastic joint rotating in a vertical plane [28]. e nonlinear state-space model is described here as Here, components x 1 and x 3 are the displacement of link and rotor, respectively, while components x 2 and x 4 represent the velocity. e measurement noise v ∼ N(0, R) and the process noise w(t) � 0. e input control u(t) � 2 sin(2t), which is the torque provided by the motor. All the other related matrices are given as follows: e simulation scenario is performed according to the following parameters: elastic constant k � 2; viscous friction coefficient F m � 1, F l � 0.5; link mass m � 4; the rotor inertia of motor J m � 1 and the link inertia J l � 2; mass center l � 0.5; g � 9.8 is gravity constant. e sampling period 6 Mathematical Problems in Engineering T s � 0.01s. e Lipschitz constant of the considered system is ξ � 9.8. e initial conditions for the robotic arm system is 4.1. Selection of Window Length L. As shown in (28), we take "max(eig(Σ x ))" as an indicator to select L max . It can be seen from Figure 2 that the maximum eigenvalue of Σ x is asymptotically convergent as window length L increases, which indicates that the estimation performance provided by the presented CD-FMO well improves while the window length augments. After window length L 1 � 13, the decrease of the curve is much less significant, which is normal since few additional information can be provided by increasing the window length. is is also why the proposed observer is called "finite memory." Nevertheless, starting from L 2 � 20, the curve shows a slight trend of going up, which is a normal phenomenon because the approximation error of Newton-Cotes formulas (used in (12a) for integral term β t−τ i ,t ) will also get bigger as L increases. In order to get a better diagnosis performance, we choose L � 15 for all the analysis and diagnosis later in this paper, which is well between L 1 and L 2 .

Numerical Integration Approximation Error Analysis.
In order to perform state estimate via (11), we choose trapezoidal rule to approximate the integral term β t−τ i ,t in (12a), so it is necessary to give the approximation error bound. We recall the following lemma.
We can have the following expression of x(t) by rewriting (11) as follows: and together with (12b) and (17), we extract the integral term related to β t−τ i ,t and noted as and we can see from B t−τ i ,t that the calculation of approximation error by using trapezoidal rule can be divided into two steps: For Step 1, according to Lemma 1, the bound of approximation error O(Int) can be described as follows: And from expression (17), we can get the first and second derivatives of g as follows: and we omit the details of how to calculate each item in g ′′ in this paper. By calculating the norm of g ′′ together with the parameters defined at the beginning of this section, we have For Step 2, we can directly get the cumulative error bound Γ nc as i varies in the summation L−1 i�0 as follows: and meanwhile, the maximum element of standard deviation (SD) σ of measurement noise, noted as σ max , is given by It is obvious that Γ nc ≪ σ max , which means that the approximation error for numerical integration is drowned in measurement noise. As a result, we can conclude that our estimation is correct with window length L � 15.

State Estimation
Performance. It can be clearly seen from Figure 3 that four-dimensional system state x is reconstructed correctly under the presence of measurement noise and the proposed CD-FMO provides great performance of state estimation. Besides, Figure 3 also depicts how the accuracy of state estimation gets much better as window length L gets longer, which is another consistent result with respect to Figure 2

Unbiased Estimation Property Analysis in Stochastic
Case. As has been proved in eorem 1 for the deterministic case, the unbiased estimation property of presented nonlinear observer under the presence of measurement noise, is evaluated by root-mean-square error (RMSE) criteria together with Monte Carlo (MC) simulation, where RMSE is 2 and N mc represents MC simulation times. e state estimation by running multiple MC simulation is therefore defined in the average sense: Let N mc take the values 100 and 500, respectively. By taking the component x 1 as an example, it can be seen from Figure 4 that, during the MC simulations, the estimation upper and lower bounds of x are quiet small, which means that the state estimation by proposed CD-FMO varies within a small range around real state x in the presence of measurement noise. Moreover, the estimation x mean obtained by N mc � 500 is closer to true value than the one by N mc � 100, which is logical since MC simulation performed a series of repeated random sampling of Gaussian measurement noise; the larger the sampling size is, the closer the mean value of noise is to zero. e unbiased estimation property has also been examined by the RMSE with different N mc in Figure 5. We can see that the RMSEs are close to zero; meanwhile, the RMSE of N mc � 500 is smoother than the one N mc � 100. is means that the results obtained by two criteria are consistent.
To summarize what has been mentioned above, we have established by Monte Carlo simulation that state estimation given by the presented nonlinear observer CD-FMO in the stochastic case is also unbiased; that is, is property provides a good precondition for the fault diagnosis after-step.

Robustness Analysis with respect to Measurement
Noise. We are going to analyze the robustness of CD-FMO against measurement noise through three scenarios shown in Table 1. Measurement noise varies from σ to 0.5σ and 1.5σ ( ± 50%), respectively, while the parameter setting of observer does not change, which means that the proposed observer (11) has an inconsistency between y(·) in (12a) and noise parameter P for observer.
By taking x 1 as an example, it can be seen from Figure 6(a) that the state estimations x 1 can still well follow the trajectory of true state x 1 even if the measurement noise has ± 50% variations, which shows the robustness of CD-FMO vis-a-vis measurement noise. In addition, we can see from the RMSEs in Figure 6(b) that state estimation of Scenario 1 is better than Scenario 2. It is logical because of the following reason: we have chosen L � 15 for the considered robotic arm system. In fact, CD-FMO with L � 15 in Scenario 2 has already performed a little role of "filter" for this nonlinear system. As shown in Figure 2, when L � 15, max(eig(Σ x )) � 0.0157, while the minimum noise level in this case (minimum nonzero value of σ ) is 0.02; that is, σ min � 0.02. e fact of max(eig(Σ x )) ≤ σ min means that the largest dispersion of estimation is still smaller than the minimum noise level, which is the performance of a filter. Accordingly, when we use the same window length for an even lower noise level, that is, Scenario 1, the presented CD-FMO will still perform as a filter and maybe even more. at is why we get a better estimation even when CD-FMO "overestimate" the real noise level.

Application to Fault Diagnosis
In this section, we are going to apply the proposed CD-FMO to perform the fault diagnosis of the considered nonlinear single-link robotic arm system. In order to deal with all faults in the same simulation launch, we suppose that each fault only occurs during certain period [T fs , T fe ]; therefore, we use the following function to characterize the fault duration: where H(·) is Heaviside step function. In this paper, we injected two kinds of typical faults as follows: (1) Sensor bias: a sudden bias is one of the abrupt sensor faults, which is modeled as

Fault Detection.
In this paper, residuals are chosen as fault indicators, and it is defined as follows: with t � k × T s , which checks the consistency of real measurements of system and measurements estimated by the proposed CD-FMO. We use both residual r and the Cumulative Sum (CUSUM) control charts of r for the reason that CUSUM control chart is well-known as the efficiency of detecting small change in the mean of a sequence. As introduced in [29], the upper CUSUM G + (k) and lower CUSUM G − (k) of residuals sequences r(k) (with mean μ r and SD σ r ) are defined as follows: with the starting value G + (0) � G − (0) � 0. e detection criterion is as follows: and in order to quickly detect the small shift in mean, the parameters of CUSUM control chart is set as K � (1/2)σ r and H � 3σ r .
In the presence of measurement noise, CUSUM control chart can improve the performance of diagnosis. For example, in Figure 7(a), the change of residual r 1 is not very obvious during fault F3 occurs, but it can be clearly seen from the CUSUM chart of r 1 in Figure 7(b). CUSUM chart can also help  x  1,max x  1,mean MC100 x 1 true   to detect the incipient fault such as F4 more quickly, as shown in Figures 7(a) and 7(b). Fault signature of residual r and fault detection instant T d with respect to different faults are therefore given in Table 2. ese results reveal that the proposed CD-FMO has a good and effective performance in both sensor and actuator fault detection for the single-link robotic arm.

Fault Isolation.
It can be obviously seen from Table 2 that fault F2 is isolable as it has a unique fault signature [0, 1, 1]. On the other hand, the remaining three faults F1, F3, and F4 cannot be isolated because of the identical fault signature [1, 0, 1]. Hence, in this subsection, we aim to solve this problem by using generalized observer scheme (GOS) [30] with another additional observer (CD-FMO 2), while CD-FMO 1 is the same as the previous part. e structure of a bank of CD-FMO is illustrated in Figure 8(a). In this paper, CD-FMO 2 is constructed by choosing subset measurements y 1 and y 3 ; then the corresponding model parameter changes from C to C 13 , where C 13 is composed by the first and third rows of C. Here, state estimation provided by CD-FMO 2 is noted as x ′ ; therefore, the residual in this case is e results of r ′ are shown in Figures 8(b)-8(d), respectively. It shows that all the faults can be detected by residual r 2 ′ , while F1 and F3 are also detected by r 1 ′ and r 3 ′ .  By comparing the fault signature obtained by CD-FMO 1 and CD-FMO 2 in Table 3, we can obviously see that the three indistinguishable faults F1, F3, and F4, which have identical fault signature [1, 0, 1] by CD-FMO 1, become isolable with [1, 1, 0], [0, 1, 1], and [0, 1, 0] by CD-FMO 2. It means that by applying the GOS structure, the presented CD-FMO can also accomplish the objective of fault isolation effectively.

Conclusion
In this paper, a nonlinear observer has been proposed to perform state estimation and fault diagnosis for a class of continuous-discrete nonlinear dynamical systems. e performance of state estimation is great and can be significantly improved by choosing a larger window length. Also the presented approach has a finite-time convergence, which is a great advantage from the perspective of FDI. Simulations have illustrated that the proposed method provides a quite effective fault detection for sensor and actuator faults, which can also show the robustness of this nonlinear observer against the measurement noise. Meanwhile, by using the bank of observers, we are able to deal with the isolation of faults with identical fault signature. It is worth noting that the proposed observer structure can also be apply to the following cases: (1) estimation instant is not synchronized with measurement instant; that is, we are able to obtain the state estimation x(t) with t ∈ (kT s , (k + 1)T s ).
(2) e sampling period of measurement is not a constant;   Mathematical Problems in Engineering that is, T s ≠ constant. One perspective of the presented CD-FMO is to take the modeling uncertainties into consideration, which are the usual disturbances in practical engineering systems. e other perspective is to give a theoretical sensitivity analysis for different types of faults, which might give more decision-making basis for fault detection as the first step of fault diagnosis.

Data Availability
e code used to support the findings of this study is available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.