A filter design for T-S fuzzy systems based on moving horizon estimator with measurement noise

In this article, a filter based on moving horizon estimator is proposed with Takagi-Sugeno (T-S) fuzzy controllers for a kind of unknown discrete-time system. The T-S fuzzy control algorithm is employed to handle the unknown system dynamics, thus ensuring the property of input-to-state stability (ISS) of the system, which guarantees the boundedness of all states. Besides, the proposed filter and controller can significantly improve the robustness of the system with external disturbance, even if the disturbance has non-Gaussian characteristics. Finally, the effectiveness of the presented algorithm is demonstrated by simulation examples under two kind of noise situations.


INTRODUCTION
The Takagi-Sugeno (T-S) fuzzy model is a simple pattern to describe realistic systems, which has attracted vast interest of researchers in the systems and control field (Su et al., 2012;Zeng et al., 2019;Yang, Xia & Liu, 2011). Traditional fuzzy control systems are rule-based, which work well when there is no need to establish an reliable mathematical model for the system (Dong, Wang & Gao, 2009;Nguang, Shi & Ding, 2007). In contrast, T-S fuzzy patterns require mathematical expressions to represent the fuzzy results and reasoning under study. Filter designs for T-S fuzzy form are intended to estimate the system states by using the measured noise inputs so as to obtain the best estimation of unknown real signals or system states, and such designs have been considered useful in practical engineering aspects. The most common approach to resolve the problem of system state estimation, which has enjoyed wildly popularity, is the Kalman filter in the engineering field (Anderson & Moore, 2012;Mendel, 1995). However, the existing T-S fuzzy system is subject to various conditions when dealing with filtering problems, for example, the disturbance is Gaussian. It is essential to plan a filter that makes use of the data within a period of time instead of only the data at the previous moment to resolve the problem of the filtering process and improve the robustness of the T-S fuzzy system. This kind of filter can show a good effect in the T-S fuzzy method even without considering the form of external disturbance (Ban et al., 2007).
To investigate and synthesize nonlinear systems and hence depict complicated nonlinear relations, a T-S fuzzy control system is frequently utilized by establishing several simple linear relations (Tseng, Chen & Uang, 2001;Xie et al., 2019;Chadli, Abdo & Ding, 2013). It can also perform fuzzy reasoning and defuzzification on the outputs of several models. Many advances have been achieved in the study and control of T-S fuzzy systems in recent years. For example, to tackle the control problem for a type of nonlinear and unpredictable packet loss systems, a modified T-S fuzzy model was presented (Dong, Wang & Gao, 2009). In addition, the filtering problem of T-S fuzzy control scheme in discrete time system is studied, with the examples including 2 -∞ filtering (Su et al., 2012), H ∞ filtering (Qiu, Feng & Yang, 2009), and Kalman filtering (Simon, 2003;Duncan & Horn, 2002;Bryson & Ho, 2018). Kalman filtering is the most commonly used method to solve filtering and estimation problems in the T-S fuzzy systems, but it is suitable for linear systems (Huang et al., 2017). In other words, the applicability of Kalman filtering in T-S fuzzy system is limited by the need for a linear observation equation (Kim & Bang, 2018;Goodwin et al., 1991;Sorenson, 1970;Box et al., 2015). Also, the outliers of data sequence commonly affect the performance of Kalman filter (Huber, 1992).
These problems can be addressed by developing a moving horizon estimator (MHE) in the T-S fuzzy system. To our knowledge, there have been few studies on the use of MHE for solving the filtering problem for these nonlinear systems. Therefore, we expect this study will provide some important implications, both theoretical and practical, for this topic of research. As an online problem solving approach, MHE has been recognized to deal effectively with noise interference (Yin & Gao, 2019;Rao, Rawlings & Lee, 2001). Its basic idea is to use current measurements to update the optimization problem with the length of the time domain sliding window for processing data that remains unchanged (Boulkroune, Darouach & Zasadzinski, 2010;Alessandri, Baglietto & Battistelli, 2003). By applying the known state information for estimation, the rationality and accuracy of the estimation condition of the system will be considerably improved. In particular, if the MHE does not consider the time-domain constraints and the window length N = 1, it is the same as the Kalman filter (Ling & Lim, 1999). Over the past few decades, the MHE method has been widely investigated to support applications in several research areas. For example, it has been used to successfully address the estimation problem for the auto-regressive-movingaverage with outliers contaminating the output (Yin, Liu & Gao, 2018;Su et al., 2012). The author uses the combination of MPC and T-S fuzzy system to design a predictive control method to solve the vehicle trajectory tracking problem, and uses the MHE to obtain the estimation of the vehicle state (Alcala et al., 2020). An MHE-based output feedback control algorithm is proposed and enables the overall system to converge to the origin (Gharbi & Ebenbauer, 2021). The authors introduce an MHE strategy to solve the estimation problem in a linear system with unknown input (Zou et al., 2020). Since MHE uses the states in a fixed-length time window to achive the filtering effect, this improves the robustness of the T-S fuzzy system and makes estimated value closer to ideal value.
The methods currently studied for the unknown discrete-time system usually use the T-S fuzzy control algorithm to deal with the unknown system dynamics. However, Kalman filter is often used in noise processing, but it has a very big limitation: it can only accurately estimate linear process models and measurement models, and cannot achieve optimal estimation in nonlinear scenarios. The noise needs to have Gaussian characteristics. So we design a fuzzy controller filter based on the moving level estimator and guarantee the input-to-state stability (ISS) of the system, thus guaranteeing the boundedness of all states. Under the designed controller, the filter and controller can significantly improve the robustness of the external disturbance system even if the disturbance is non-Gaussian.
For a class of discrete systems with unknown disturbance, we present a filter based on MHE arithmetic and T-S fuzzy controller in this study. Firstly, for the studied system containing external interference, we established a T-S fuzzy model, systematically designed a filter based on MHE method, and obtained the relationship between estimated point and the points within the estimated window. Then, an optimal function with MHE constraints was proposed, so that the optimal solution satisfied the estimation relationship within a fixed-length time window. Finally, it was demonstrated that using MHE filters in the T-S fuzzy systems with bounded disturbance can guarantee input-to-state stability (ISS) characteristics.
The rest of the article is equipped as follows: Section 2 describes the prerequisite knowledge, including some definitions and basic properties of T-S fuzzy controllers. The main expressions and formulas as well as the method for finding the extreme value are introduced in Section 3. In Section 4, the ISS property of the T-S fuzzy system with MHE is proved. Section 5 indicates and discusses the simulation results of the pattern that we built. Finally, the conclusion is drawn in Section 6.

PRELIMINARIES
An abundance of information on T-S fuzzy method and MHE has been provided in previous studies (Dong, Wang & Gao, 2009;Tseng, Chen & Uang, 2001;Rao, Rawlings & Lee, 2001;Yin, Liu & Gao, 2018;Liu et al., 2016). Obviously, approximating the nonlinear system to the form of a T-S fuzzy control system facilitates the subsequent processing. Therefore, in this section, the information required in the next section to derive the MHE with the measurement noise assumption is deduced, including the T-S fuzzy form representing the plants of the nonlinear systems and the MHE algorithm steps.

Plant form
We think about a nonlinear device represented by way of a discrete-time T-S fuzzy model, as follows: Rule i: IF θ 1,m is M i1 and ... and θ p,m is M ip , then where in the premise rules, i = 1,2,. . . ,r, θ m = [θ 1,m ,θ 2,m ,...,θ p,m ] is the premise variables vector, M = [M i1 ,M i2 ,...,M ip ] is the fuzzy set, x m ∈ R a is the state vector, z m ∈ R b is the measured output, u m ∈ R c is the input signal, ω m ∈ R l represents the disturbance input vector, which is considered to be part of l 2 [0,∞), and r is the number of IF-THEN rules. A i ,B 1i ,B 2i ,C i ,D 2i are known matrices with the appropriate dimensions.
The fuzzy basis functions are defined as follows: where, for all m values, we have Therefore, for all m values the fuzzy basis functions satisfy the equations h i (θ m ) 0 (i = 1,2,...,r) and r i=1 h i (θ m ) = 1. Combine the fuzzy basis function with the proposed nonlinear system to get the following formula, which can be used for discrete systems under T-S fuzzy modeling: For the convenience of calculation, we refer to experience to set the controller as a function related to the state feedback (Dong, Wang & Gao, 2009), that is, u = kx. Then Eq. (3) can be replaced by The MHE process for the T-S fuzzy system is still difficult to develop using this approach, so we further define Here, we design the filters of a general structure by The above formulas provide a great basis for our subsequent derivation.

MHE for the T-S fuzzy model
Using the known information during this period of time such as z m−L ,z m−L+1 ,...,z m and u m−L ,u m−L+1 ,...,u m with the integer L ≥ 1, we get the estimate through the MHE at time m. Using Eq. (5), we get the following formula between x m+1 and z m : For brevity, the following formula is used: m . Using Eqs. (5) and (7), L + 1 equations are iterated as shown below: From Eq. (8)  Remark 2: Kalman filter algorithm is based on accurate mathematical model and is sensitive to error. So the MHE in the T-S fuzzy system is proposed, which uses a fixed number of measurements for estimation. In this article, we derive a series of iterative formulas in order to obtain the relationship between x m−L and z m−L ,z m−L+1 ,...,z m within the fixed-length estimation window set by MHE.

MAIN RESULTS
We introduce the simple expressions of explicit model by Z m,L and W m,L , and propose an optimal function for the MHE. The output estimation of the T-S fuzzy system is taken as the target task, and the optimal value is obtained by a method in which the partial derivative is zero.
Using the second part of the recursive method, we define the following vectors: and we assume that Z m,L = T L Z m,L , where where The least squares criterion becomes the natural choice for deriving MHE when x m−L is a priori prediction and m−L is the corresponding covariance matrix. We definex m−L|m as the estimation of x m−L at the time m. As a result, our goal at time m is to determine the value ofx m−L|m which minimizes the following cost function J .
From formula Eq. (8), once the value ofx m−L|m is obtained, we can get the value of x m−L+1|m ,x m−L+2|m ,...,x m|m bŷ with i = m − L,m − L + 1,m − L + 2,...,m − 1, so that the estimation of outputẑ m|m can be solved bŷ A variety of methods can be used to obtain the prior prediction x m−L of the cost function. In this article, the most common method is used, which is expressed as follows Camacho & Alba (2013): Corresponding to Eq. (13), the correlation covariance m−L satisfies the following: For Eq. (10), the smaller the cost function J is, the closer the estimated value is to the true value.

STABILITY ANALYSIS
With the bounded external signal input, if the state response is within the bounded range, the system satisfies ISS. In other words, if any external input and initial conditions are bounded, the state bounded. The system will always have the ability to return to the equilibrium point when the external input is 0.

Input-to-state stability (ISS)
Non-linear systems with external disturbances are considered as follows: Here, we provide two ISS definitions. Lemma 1 Alessandri, Baglietto & Battistelli (2008) The system in Eq. (15) is input-tostate stable (ISS) if there exist the function β ∈ KL and the function γ ∈ K ∞ such that for each external input ω(m) and each initial condition x 0 = x m−L , solutions exist and satisfy where x m,x 0 ,ω m is the solution to the system in Eq. (15) at time m. Lemma 2 Kim et al. (2006) The system in Eq. (15) is input-to-state stable (ISS) if and only there exists the continuous ISS-Lyapunov function V : R n → R ≥ 0 such that for the functions λ 1 ,λ 2 ,λ 3 ,σ ∈ K ∞ , the Lyapunov function V satisfies and

ISS of the proposed MHE
Before proving ISS of the system in Eq. (15) under the MHE, we need to calculate the estimation of x m−L considering the cost function J at time m having the smallest value, such that the cost function J satisfies By calculation, we obtain the equation forx m−L|m| as follows: Using Eq. (21), the solution can be obtained bŷ This subsection introduces the stability characteristics of the estimation error of the proposed unconstrained estimator. Using Eq. (22), the estimated error e m−L is given as follows: Then, we get the estimated error dynamics: The pair (C m ,A m ) is completely observable in L step. Theorem : Consider a pair {x m−L and Z m,L } and suppose that Assumption 1 holds. If there exists a scaler µ and symmetric matrices P 1 > 0, P 2 > 0 satisfy for some Q 1 > 0,Q 2 > 0, then the estimation error dynamics e m−L are ISS. Proof: If m−L−1 < 1, then ρ( m−L−1 ) < 1 is obtained, that means that there is always a matrix P 1 that satisfies where δ = 1 2 λ min (Q 2 )r 2 . As a result, Theorem 1 is derived. The ISS analysis result is presented in Eq. (15).

SIMULATION AND EXPERIMENTS
To validate the aforementioned statements, the control problem for some examples of the proposed MHE is considered.
Considering the T-S fuzzy system in Eq. (4), we know Assume that θ m ∈ [−M ,M ] and M > 0. The nonlinear term θ 2 m can be accurately expressed as Su et al. (2012) where h 1 (θ m ),h 2 (θ m ) ∈ [0,1] and h 1 (θ m ) + h 2 (θ m ) = 1. Through the above equations, the membership functions h 1 (θ m ) and h 2 (θ m ) are solved as The following conclusion can be obtained from the above expressions that h 1 (θ m ) = 1 and h 2 (θ m ) = 0 when θ m is −M and that h 1 (θ m ) = 0 and h 2 (θ m ) = 1 when θ m is M . Then, to approximate the nonlinear system, the T-S fuzzy model suggested below can be used: plant form: and the following are the system matrices: The proposed method uses simulation and experimental data to test performance. We present an algorithm that summarizes the steps involved in the MHE proposed in the T-S fuzzy system. For some intermediate steps, we need to repeat some calculation formulas cyclically. After research, our algorithm process is following:

Algorithm
• Give the initial values x 0 and set L = 5.
• Solve x m and z m in the form of the system.
• Obtain the prior prediction x m−L by formula Eq. (13).
• Set m = m + 1 and go back to step 5.
• Get the estimated value of all state data and end the algorithm.
In the T-S fuzzy control system, two different noise conditions are given to verify the effect of the proposed MHE. The first case is that the noise function is given as the noise gradually decreases over time, and the other case is that the noise is Gaussian noise.
Case 1 (Gaussian noise): Let the initial condition be zero, that is, x 0 = 0 (x 0 = 0), and suppose the disturbance input ω k is N (0,1). Under the above-mentioned setting conditions, in order to better illustrate the universality that MHE can achieve the goal, we randomly select Gaussian noise and obtain the estimation result using MHE of the system.
The estimation result of the T-S fuzzy system with Gaussian noise is shown in Fig. 1. Obviously, under the influence of Gaussian noise, the output of the system changes more widely, and the output after adding MHE is more gradual. It shows that when the measured noise satisfies the normal distribution, the performance of estimation is remarkable, and the estimated value curve fluctuates within a smaller range than the true value curve.
Case 2 (non-Gaussian noise): Let the initial condition x 0 = 0 (x 0 = 0), and assume the disturbance input ω m is The simulation results are shown in Figs. 2 and 3. Figure 2 is the noise, obviously, the external interference is bounded and non-Gaussian. Figure 3 shows the simulation run for the T-S fuzzy system with the MHE filter. The proposed MHE can effectively counteract the influence of the sine-form noise in the T-S fuzzy system. In this case, the noise decays with time, and the estimation performance of the MHE is most pronounced during the initial period. A clear improvement of the smoothness can be observed for the T-S fuzzy system, which is the result of the MHE filter reducing noise.
Case 3 (non-Gaussian noise): To make our proposed MHE estimation scheme more convincing in systems with unknown dynamics, we add a case when the noise is uniformly distributed.
The added noise in this case is shown in Fig. 4 and the effect of the designed MHE filter is shown in Fig. 5. It can be seen from the figure that adding the MHE filter to the T-S fuzzy control model with uniformly distributed noise can make the output smoother. To increase the convincing power, a uniformly distributed noise is added to the designed multi-threaded control system, and MHE filtering is used. It can be seen from the simulation figures that the proposed estimator can work well in systems with unknown factors.
Through the above two kinds of different noise simulations, we find that it is feasible to use MHE to solve the discrete-time filtering problem. The filter based on the MHE method we designed shows a good effect in the T-S fuzzy system with external disturbance, even if the disturbance is non-Gaussian.

CONCLUSIONS
This article presents a design to solve the filtering problem for the performance of MHE in discrete-time T-S fuzzy systems. An MHE different from the traditional Kalman filter was proposed. At first, a presentation mode of the discrete time system was employed to convert the authentic machine into T-S fuzzy system. Based on the T-S fuzzy model, the proposed MHE was used to obtain a more precise estimate for the filtering error system. Then, the analytical solution for the proposed MHE as well as the result when the cost function has the smallest value was obtained. Next, the ISS property of the proposed MHE was examined. Finally, the proposed method was demonstrated to be effective by simulation examples.

ADDITIONAL INFORMATION AND DECLARATIONS Funding
This work was supported by the Natural Science Foundation of Shaanxi under Grant 2022JQ-651. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

Grant Disclosures
The following grant information was disclosed by the authors: Natural Science Foundation of Shaanxi: 2022JQ-651.