Enhanced Discrete-Time Sliding Mode Filter for Removing Noise

This paper presents a new discrete-time sliding mode filter for effectively removing noise in control of mechatronic systems. The presented filter is an enhanced version of a sliding mode filter by employing an adaptive gain in determining a virtual desired velocity of the output. Owing to the use of backward Euler discretization, the discrete-time implementation of the filter does not produce chattering, which has been considered as a common problem of sliding mode techniques. Besides that, the state of the filter converges to the desired state in finite time. Numerical example and experimental position control of a mechatronic system are conducted for validating the effectiveness of the filter.


Introduction
In mechatronic control systems, sensor signals are usually noisy and uncertain due to measurement errors and environmental disturbances.Linear filters are often applied for attenuating noise due to simplicity.However, in linear filters, a strong noise attenuation results in a large phase lag, which may lead to system's instability.In addition, any noise component is proportionally transferred into the output, and thus high-amplitude noise cannot be effectively removed.
Nonlinear filters have been studied so as to avoid disadvantages of linear filters.Among them, sliding mode observers [1][2][3] based on the supertwisting algorithm [4,5] have attracted much attention in the last decade.One major advantage of these observers is that they realize finitetime convergence in continuous-time analysis.However, in the case of numerical implementation, the performance of convergence is related to the sampling period, typically with finite difference [6,7].Besides that, they require a dynamic model, which is not always exactly obtained.
A sliding mode filter that uses a parabolic-shaped sliding surface has been studied [8,9].This filter realizes finite-time convergence in the case of constant input.In addition, it does not require a dynamic model.However, its discrete-time implementation [10,11] is prone to overshoot and sensitive to the sampling period, as pointed out in [12].Toward the disadvantages of the filter [8,9], Jin et al. [12] proposed a parabolic sliding mode filter (PSMF-J) for effectively removing noise.It is reported [13] that PSMF-J has similar gain characteristics to that of the second-order Butterworth lowpass filter (2-LPF), but it produces smaller phase lag than 2-LPF does.In addition, compared with the filter [8,9], PSMF-J is less prone to overshoot, and it does not produce chattering, which has been considered as a common problem of sliding mode techniques.The effectiveness of PSMF-J has been experimentally validated [12][13][14].
Extension studies of PSMF-J are reported in the literature.For example, Aung et al. [15] presented three variants of PSMF-J by including the derivative term of the input to the sliding surfaces.As another example, Jin et al. [16,17] proposed filtering systems that integrate a first-order adaptive windowing filter (FOAW) and PSMF-J, and Aung et al. [15] reported a filtering strategy that combines a low-pass filter (LPF) and a variant of PSMF-J.
This paper presents a new discrete-time sliding mode filter, which is an enhanced version of PSMF-J.The presented filter employs an adaptive gain in determining a virtual desired velocity of the output.Discrete-time implementation of the filter does not produce chattering.Moreover, the state of the filter converges to the desired state in finite time.Results of numerical and experimental evaluations validate the effectiveness of the presented filter.It should be mentioned here that the paper only considers singlestage filtering approach, and thus combination strategies of multifilter, for example, FOAW-integrated [16,17] and LPF-integrated [15] methods, are not included in the paper.Besides that, the paper mainly focuses on noise attenuation in mechatronic systems, and thus potential applications of the presented filter to other areas are considered outside the scope of this study.
The rest of this paper is organized as follows: Section 2 provides some mathematical preliminaries to be used in subsequent sections; Section 3 gives an overview of parabolic sliding mode filters; Section 4 presents an enhanced version of PSMF-J, and Section 5 provides frequency domain characteristics of the new filter; Sections 6 and 7 validate the effectiveness of the presented filter numerically and experimentally, respectively; and Section 8 concludes the paper.

Mathematical Preliminaries
In this paper, the following definitions of the set-valued signum function sgn(⋅) and the generalized saturation function clip(⋅) will be used: where  ∈ R and  ∈ R satisfy  ≤ .Here, it should be noted that, when  = 0, the return value of sgn(⋅) is a set instead of a single value.Moreover, in the case of  = −1 and  = 1, clip(⋅) reduces to the conventional saturation function.
In addition, the following equivalent [12,16,18] will be applied in the next section: (3)

Overview of Parabolic Sliding Mode Filter
In a paper [12], Jin et al. presented a sliding mode filter that employs a certain kind of parabolic-shaped sliding surface (PSMF-J).The continuous-time representation of PSMF-J can be written as follows: where Here,  ∈ R and  1 ∈ R are the input and output, respectively,  2 ∈ R is the derivative of  1 , and  > 0 and  > 1 are constants.
In PSMF-J, ẋ 2 can be considered as the output  1 's acceleration, of which value is bounded by .Besides that, PSMF-J reduces to a filter reported in [8,9] with  = 1. Figure 2 illustrates the sliding surfaces and the trajectories of the state ( 1 ,  2 ) of PSMF-J in  1 - 2 space, and Figure 3 shows the relation among  1 ,  2 , and ẋ 2 .Note that PSMF-J has two sliding surfaces that are  = 0 and  2 = 0, respectively.
The paper [12] also presented a discrete-time algorithm of PSMF-J, which is derived based on the backward Euler discretization.Specifically, the following is the derivation procedure of the discrete-time algorithm.First, by using the   backward Euler discretization, the continuous-time expressions (4) can be approximated in discrete-time as follows: where Here,  is the discrete-time index and  is the sampling period.By using (6a), ( 7) can be rewritten as follows: Then, because ( 8) is a monotonously increasing function with respect to  2 (), (6b) can be rewritten as follows: Here,  * 2 () is the value of  2 () that satisfies () = 0, and it is obtained through a tedious but straightforward derivation as follows: where Figure 4 shows relation between  2 (),  * 2 (), and () = 0.Then, by applying the equivalent relation (3), unknown  2 () can be moved out from right-hand side of ( 9) as follows: ( As a whole, the complete algorithm of PSMF-J is as follows. Algorithm 1 (PSMF-J). (1) In Algorithm 1,  2 () is determined so as to follow  * 2 (), which in turn tracks the derivative of the signal component of input (), under the constraint of acceleration, and then the output  1 () is obtained by integrating  2 ().
Owing to the use of the backward Euler discretization, the numerical implementation of PSMF-J does not produce chattering, which has been considered as a common problem of sliding mode techniques.Besides that, the output of PSMF-J converges to the input in finite time.magnitude of chattering is related to the sampling period.On the other hand, BE-based method realizes finite convergence of the output to the input, and it does not produce chattering.Such a way of realizing chattering avoidance and finitetime convergence of sliding mode technique by using the backward Euler discretization is also reported in [19,20].The stability of (4) under a constant input, that is, u = 0, is theoretically validated [16].
In [15], Aung et al. presented three variants of PSMF-J by including the derivative term of the input to the sliding surfaces to aim for improving tracking response.Specifically, the algorithms of the three variants, which are denoted as PSMF-A1, PSMF-A2, and PSMF-A3, respectively, are as follows.

Enhanced Discrete-Time Parabolic Sliding Mode Filter
This section proposes a new discrete-time sliding mode filter, which is an enhanced version of PSMF-J.First, let us consider the influence of  * 2 () in Algorithm 1.It has been discussed in Section 3 that  * 2 () is the value of  2 () that satisfies () = 0, and it follows the derivative of the signal component of input ().On the other hand,  2 () is determined so as to follow  * 2 () under the constraint of acceleration.This means, state ( 1 (),  * 2 ()) can be considered as a virtual desired state of ( 1 (),  2 ()) in the context of tracking the desired state, that is, signal component of input () and its derivative.It is well recognized that, in the case where the current state is far from the desired state, the value of  2 () should be set large for realizing rapid x 2 (k − 1) x 1 (k − 1) x 2 (k − 1) x 1 (k − 1) x 2 (k − 1) x 1 (k − 1) convergence.On the other hand, in the case where the current state is around the desired state, the value of  2 () should be set small for obtaining smooth output.In the light of this consideration, a variant of PSMF-J, which is referred to as enhanced parabolic sliding mode filter (PMSF-E), can be obtained as follows.
Similar to the case of Algorithm 1, owing to the use of backward Euler method, the discrete-time implementation of Algorithm 2 does not produce chattering, and the output converges to the input in finite time, as shown in Figure 8.It should be noticed that these properties of PSMF-E are independent of sampling period.
Figure 9 shows the robustness of PSMF-E against impulse-like disturbances.Specifically, Figures 9(a) and 9(b) show the cases where the input is disturbed by a positive and a negative disturbances during convergence, respectively, while Figures 9(c) and 9(d) show the cases of steady state.It is shown that the deviation of the output from its original trajectory is small during the period of the disturbance, and the output converges fast to the desired state after the disturbance disappears.

Frequency Domain Characteristics of PSMF-E
Frequency domain behavior of PSMF-E is analyzed by using the Bode plot.The describing function method [21], which only considers the fundamental harmonic component of  responses of nonlinear systems, is applied in the frequency analysis of the nonlinear filter.In addition, the following sinusoidal signal is applied as input to PSMF-E: where  > 0. It should be noticed that the sinusoidal input () is free of noise.Moreover, in the rest part of the paper, the sampling period  = 0.001 s, which is widely accepted in realtime control in industries and academia by considering the trade-off between processing speed and hardware limitation, is used.Figures 10 and 11 show Bode plots of PSMF-E under different values of  and , respectively.It is shown that, compared with PSMF-J (i.e., PSME-E with  = 0), PSME-E produces larger gain and smaller phase lag in the lowfrequency range, which is usually considered as the region of the signal components that should be reserved as much as possible, as  increases.It is also shown that, due to the nonlinearity, the frequency response of PSMF-E depends on the input magnitude .This implies that appropriate parameter selection guidelines should be sought for PSMF-E.
In Figures 10 and 11, it is interestingly observed that the slope of the high-frequency asymptote of PSMF-E is approximately −40 dB/decade, which is the same as that of the second-order Butterworth low-pass filter (2-LPF).Moreover, at PSMF-E's cut-off frequency, which is referred to as the frequency at which the low-frequency asymptote and highfrequency asymptote of gain plot intersect each other, the gain is approximately 0.8, whereas those of 2-LPF are 0.707.It is known that Butterworth low-pass filters have the flattest gain characteristics at cut-off frequencies among all linear filters.Thus, it can be claimed that the gain characteristics of PSMF-E are advantageous over all linear filters.Furthermore, at cut-off frequency, PSMF-E's phase lag is approximately 54.5 degrees, where that of 2-LPF is 90 degrees, which may result in system's instability.Thus, it can be said that the phase characteristics of PSMF-E are better than 2-LPF.
Figure 12 compares frequency domain characteristics of PSMF-E and PSMF-J's three variants.It is shown that, at low-frequency range, the gain and phase characteristics of PSMF-E are similar to those of the three variants.In the case of high-frequency range, which is usually considered as the region of the noise components that should be attenuated as much as possible, PSMF-E produces larger phase lag than the three variants do.
It should be mentioned here that these results are obtained under clean sinusoidal input; that is, there is no noise component contained in the input.However, in practice, input signal usually contains various frequency components.Thus, for the nonlinear filters, the results of frequency domain analysis reported here do not represent their whole property.Therefore, in the following section, numerical examples will be conducted for validating the filters' effectiveness under the case where input is corrupted by noise.

Numerical Example
The performance of PSMF-E is now numerically evaluated by using the following input: where  ∼ N(0, 1) is the unit white Gaussian noise with zero mean.Parameters  = 100,  = 5,  = 1, and  = 0.5 are used.
Figure 13 shows the output of PSMF-E.The results of PSMF-J, PSMF-A1, PSMF-A2, and PSMF-A3 with  = 100 and  = 5 are also provided in the figure for comparison.The initial states of all filters are set zeros at  = 0 s.One can observe that the advantage of PSMF-E over PSMF-J, PSMF-A1, and PSMF-A3 is not significant in the case of slow motion, that is,  ≤ 2 s, as shown in Figure 13(b).However, in    the case of fast motion, that is,  > 2 s, PSMF-E produces the smallest phase lag among the five filters.As a result, the output shape of PSMF-E is closer to that of signal component of the input compared with those of the other filters, as illustrated in Figures 13(b) and 13(c).One can also notice that, in the case of noisy input, the output of PSMF-A2 is distorted.This result is consistent with the result reported in [15].Thus, it can be concluded that PSMF-E performs best among the five filters.

Experiment
This section experimentally evaluates the performance of PSMF-E in position control by comparing with the performances without filter, with PSMF-J, PSMF-A1, PSMF-A2, and PSMF-A3.Figure 14 shows the experimental setup, which consisted of a DC motor with an optical encoder, a motor controller, and a motor driver.
In the case without filter, the following proportionalderivative (PD) controller was applied: whereas the following PD controller was used for the cases with filters: Here,   () is the desired trajectory, () is the current position,   () is the desired velocity, () is the current velocity, V() is the control voltage,   > 0 is the proportional gain, and   > 0 is the derivative gain.Besides that, in the cases with filters,   () is the smoothed velocity.Figure 15 shows the block diagrams of the PD-controlled systems employed in the experiments.It should be mentioned that velocity is obtained by applying finite difference method on position signal.Moreover, the following signal is applied as the desired trajectory to the system: All experiments were implemented at sampling period  = 0.001 s.
Figure 16 shows the PD-controlled results.In addition, Figure 17 illustrates the quantized position control performances through the data of the average magnitude of position DC motor (a) PD-controlled system without filter It should be mentioned that the measure AMP provides information on the controlled position, while AMD can be considered as a measure of the intensity of high-frequency vibration of the device.It should be said that, for a better position control, both AMP and AMD should be maintained small.One can observe that, in the case without filter, the controller (15) produced undesirable high-frequency vibration in duty ratio.As a result, the device vibrates at high frequency.This is due to the fact that velocity signal obtained by finite differencing of the measured position signal was corrupted by high-frequency noise.On the other hand, in the case with PSMF-E, high-frequency vibration was removed owing to the smoothed velocity signal.Besides that, the controller (16) with PSMF-E produced smaller AMP compared with the controller (15).
The performance comparison among the cases with filters is also provided in Figure 17.It is shown that PSMF-E produced both smaller AMP and smaller AMD compared with the other filters.These results clearly indicate the advantage of PSMF-E.

Conclusion
This paper has presented a new discrete-time sliding mode filter, which is named PSMF-E, for effectively removing noise in control of mechatronic systems.The presented PSMF-E is an enhanced version of PSMF-J by employing an adaptive gain in determining a virtual desired velocity of the output.Owing to the use of backward Euler discretization, the discrete-time implementation of PSMF-E does not produce chattering.Besides that, the state of PSMF-E converges to the desired state in finite time.The effectiveness of PSMF-E has been numerically and experimentally validated.
One limitation of this paper is that the effectiveness of PSMF-E is only confirmed through numerical and experimental methods due to the strong nonlinearity.Thus, theoretical validation including stability analysis remained as an open problem.Besides that, as a nonlinear filter, the behavior of PSMF-E varies considerably with parameters.Therefore, development of appropriate parameter selection guidelines is posted as another open research issue for future investigations.
Figure 5 compares backward Euler-(BE-) based and forward Euler-(FE-) based discrete-time algorithms of PSMF-J.It is shown that FEbased method produces chattering in the output, and the Sliding surface x