State and Parameter Estimation of a Nonlinear Servo System Handling Noises and Varying Payloads

Payload estimators have many parameters, which are trained using the recorded position, velocity and known payload information. To use these payload estimators in the real-time applications, accurate position and velocity information of the system are required. In this paper, first recently proposed sliding-mode observers (SMOs) are designed and compared for velocity estimation of a nonlinear servo system. Second, a parameter estimation based on sliding-mode super-twisting approach is designed to estimate unknown and varying parameter for a class of nonlinear systems. The convergence property of observers is considered using Lyapunov stability method. In the applications, the constant and varying payloads of the servo system have been estimated using the designed method and compared with Extended-Kalman Filter (EKF). In the final section, artificial noises with different SNR are applied to the measurement signal. When the less amplitude of noise signal is applied, second order SMO estimated the states and the payload better than EKF. However, EKF provides much better estimation results than second order SMO for large amplitude of noise signals. For the sake of generalization, second order SMO is a fast and robust observer for small noise cases. In addition, the filtering property of EKF has still importance for large noise cases.


Introduction
Robotic manipulators in industry, railway vehicles, medical devices and many other equipment require sensory devices [1]. However, measurement device cannot be available or expensive for an application. Therefore, soft sensors/state observers have been designed to estimate unmeasured states and unknown parameters of the linear and nonlinear systems since 60s [2]. The acquired knowledge from soft sensors is essential for monitoring, feedback control, decision making etc. Nowadays, any observer can easily be embedded into the microcontroller and estimated measurements can be conveniently used for specific applications. Besides, microcontrollers are more flexible than past with respect to speed and memory.
State observers have first been introduced for linear systems in [3], and later developed for nonlinear systems in [4,5]. The other well-known nonlinear observers are high-gain observer (HGO) [4][5][6], sliding-mode observer (SMO) [7,8], Extended-Kalman filter (EKF) [9] and other nonlinear Kalman filters [10], Takagi-Sugeno fuzzy observer [11], adaptive fuzzy/neural observers [12,13]. Recently, there have been many developments on the sliding-mode theory [14] to improve speed, accuracy and stability conditions. The sliding-mode observers based on the sliding-mode theory are known with robustness to uncertainties and distortions [15,16]. Due to finite-time convergence, SMOs have been recently applied to many real-time systems and compared mostly with other nonlinear observers [17].
The unknown payload of robot manipulators and other mechatronic systems have been estimated using several methods in the literature [18,19]. Off-line trained fuzzy/neural systems have been designed in [20,21]. However, these payload estimators have many parameters, which are trained using the recorded position, velocity and known payload information. In order to implement these approaches in a real-time application, the correct position and velocity information are needed, which cannot be available for all systems. A robust high precision controller has been developed against unknown payloads in [22]. In [23], an adaptive system based on the prediction error-minimization is proposed that estimates the correct payload online, likewise the velocity measurement is needed. An adaptive robust control method has been developed in [24] for precise motion control and payload estimation. In [25], a neural-network model is trained offline with a large dataset and a Kalman filter is used to online estimation of the payload. The estimated payload has been used in [20,21] to improve the control performance of the manipulator.
The rest of the paper is organized as follows. First, sliding mode observers and Extended-Kalman filter are summarized in Section 2 and Section 3, respectively. Section 4 introduces the parameter estimation method. Afterward, Section 5 presents the velocity estimation and parameter estimation results. Finally, Section 6 concludes the paper.

Sliding-mode Observers
Sliding mode observers create sliding motion of error between the measured system output and observer output [15]. Because of the finite-time, fast convergence, robustness with respect to uncertainties, stability and the possibility of uncertainty estimation, SMOs are widely used in the literature [16,17]. for state estimation and control of nonlinear systems. In the following subsections, classical SMO (CSMO), second-order SMO (SSMO), integral SMO (ISMO), and terminal-mode SMO (TSMO) approaches are briefly explained.
Consider an -dimensional, nonlinear and continuoustime single-input single-output (SISO) nonlinear system in companion form, where ( ) ∈ ℜ is the state vector, ( ) ∈ ℜ is the control input applied, ( ) ∈ ℜ is the output measurement and ∈ ℜ is an unknown parameter of the nonlinear system, respectively. It is assumed that the dynamics of (. ) is known and continuously differentiable with respect to the states and parameters. The aim in the estimation problem is to get an estimate of unmeasurable states ̂( ) and unknown parameter ( ) of nonlinear system (1) using available measurement.

Classical Sliding-Mode Observer
For the given nonlinear system (1), it is assumed that ( = 1, , ) is the single measurement available. The classical sliding-mode observer (CSMO) [7] is designed as follows where =̂− is the measurement error and ̂( , ) is an estimation of ( , ). The constants ℎ are chosen as for a classical Luenberger observer to ensure asymptotic error decay, and constants are the design parameters for switching of the sliding surface. The derived th error dynamics are given by following equation.
△ =̂− is assumed to be bounded as ≥ | △ |. The asymptotic convergence and stability conditions are proven using Lyapunov stability [8].

Second-Order Sliding-Mode Observer
The second-order sliding-mode observer (SSMO) with super-twisting algorithm [26] has been introduced and applied to many mechanical systems where the error dynamics are different than that of conventional sliding mode observer as where the parameters are selected as The + parameter is the double maximum possible acceleration of the system, derived as is the functional error of the observer dynamics. The bounds of the parameters are found that the second-order SMO satisfies the Lyapunov stability [26]. The sliding-mode super-twisting approach is very efficient for the estimation and control of second order nonlinear systems and applied to real-time systems [27].

Integral Sliding-Mode Observer
Integral sliding-mode observer (ISMO) [28] of the nonlinear systems has been designed as with sliding surface ( ) = ( ) + ∫ 0 ( ) . The measurement error in the equation of the sliding surface is defined as = −̂ where is the measured output, ̂ is the estimated output. The selected positive constants drive the observer in stable region.

Terminal Sliding-Mode Observer
The nonlinear system (1) is assumed in the following form, where ( ) ∈ ℜ is the state vector, ( ) ∈ ℜ is the vector of applied control input and ( ) ∈ ℜ is the output. The terminal sliding-mode observer (TSMO) [29] has been designed as a second-order nonlinear systems as follows.
and 1 < < 2 . The feedback gain = [ 1 2 ] is designed as linear observer gain using Lyapunov equation ] where > 0, > 0, < 0 and is the Lipschitz constant of the system. Following the requirements of the constants, the solution of the (10) for the observer gain satisfies the stability of the observer.

Extended-Kalman Filter
The Kalman filter has been introduced as an optimal filter for linear systems in [30] and used to estimate the unmeasurable states of the linear systems for a half century. For the state estimation of nonlinear systems, the Kalman filter estimate is based on the linearized system, and the filter is called "Extended-Kalman filter" (EKF) [9]. The EKF has been also utilized for the parameter estimation in [31]. The continuous-time EKF dynamics are summarized as follows. i.
The nonlinear system dynamics are where (. ) and (. ) are nonlinear functions, is the system state, is the input and is the unknown parameter of the system. In (12), and are normally distributed state and measurement noises, respectively. and are the corresponding covariance matrices. ii.
The linearized dynamics around the current estimate are iii.
The following matrices will be used for update: iv.
where is the Kalman gain matrix and is the error covariance matrix. The initialization of is based on the estimated initial states of the system. In (15b) and (15c), the and matrices are updated using the linearized system dynamics (13) and (14). Afterward, the states and parameters of the Kalman filter (15a) are updated using and error = − (̂, ). For the parameter estimation of system (1) using EKF, the unknown parameter is added as an additional state to original states and its estimate is updated using the derivative of (. ) w.r.t unknown parameter inside matrix to calculate the error covariance matrix and Kalman gain [10].

Parameter Estimation
In this paper, the parameter adaptation method is designed using the sliding-mode theory. For the system given in (1), the parameter estimate is designed as where = −̂ with = 1 . The nonlinear function of the system is differentiable with respect to unknown parameter such that it is assumed in the form of where (̂, ) is a nonzero function. The stability of the state observer is not affected from the parameter estimation due to bounded uncertainties which means that − < (̂,, ) < + . Afterward, the convergence of the estimated parameter can be shown using Lyapunov stability as follows. The parameter error is defined as ̃= −̂ where its derivative is found as ̃̇= 0 −̂̇= −| |sign( ) (̂, ) . The error dynamics of the supertwisting SSMO is The Lyapunov function of the parameter estimation is given as and its time derivative is derived as The estimation error of the second state goes to zero in time and its time derivative is assumed equal to zero as ̃̇2 = 0. Then the parameter error is found as ̃(̂, ) = sign( ). The time change of the Lyapunov function is finally derived as where > + . The time change of the Lyapunov function implies that the function is monotonically decreasing until | |(̃̂, ) 2 = 0, which means that both state estimation error and parameter estimation error goes to zero as → ∞. In other words, the parameter change drives also the convergence of the estimation error. Then, we can write, Further, we have bounded the parameter estimate to get rid of possible damage to state estimation using the priori known bound of the unknown parameter. These bounds are usually known for most of the real-time systems such as here the maximum and minimum payload value of the servo system is known in application part.

Numerical Applications
In this section, first recently proposed sliding-mode observers are designed and compared for velocity estimation of a nonlinear servo system. Second, a parameter estimation based on sliding-mode supertwisting approach is designed to estimate unknown and varying parameter for a class of nonlinear systems. The dynamics of the nonlinear servo system are given as where 1 is the position of the payload in and 2 is the angular velocity of the payload in / . is the payload of the system where the payload is assumed as an unknown parameter and estimated when it takes constant and time-varying values. The servo system is shown in Figure 1 and its parameters are listed in Table 1.

Figure 1. Nonlinear servo system
The servo system has basically single-link joint manipulator dynamics with a small payload. The servo system locates its payload to different positions between [− , ] according to applied input voltage signal. The importance of this system for the applied observers are as follows. It is a second-order nonlinear system and has a simple nonlinearity such that it is suitable for the comparison of the observers for state and parameter estimation and also control methods.

State Estimation Results
Except for the classical sliding-mode observer, summarized sliding-mode observers were basically proposed for a specific type of nonlinear systems. However, the applied nonlinear servo system in (16) is suitable for all introduced sliding-mode observers so that we can compare their estimation performances. The observers are in continuous-time and integrated using 4thorder Runge-Kutta method. The step-size or samplingperiod of the system is chosen sufficiently small to satisfy integration stability of the observer. The design parameters of the sliding-mode observers and Extended-Kalman Filter are given in Table 2 which are selected by trial-and-error approach from a reasonable interval.
The input-output signals of the system are presented in Figure 2 that have been obtained from the real-time feedback-linearization control of the servo system. Therefore, it has sharp input changes when the reference signal changes. For the system, the position and velocity states are measured. However, for the estimation purpose, only position state is assumed to be measured.

Figure 2. Control voltage and position of the servo system
Then, estimated velocities using SMOs and measured velocity are compared to determine RMSE values of estimation process. The velocity estimation RMSE performances are given in Table 3 and SSMO has been provided most accurate velocity estimation with least rootmean squared-error (RMSE) performance.

Constant and Varying Payload Estimation
In this study, in addition to designed SMOs and Kalman-type observer for velocity estimation of a nonlinear servo system, constant or varying parameter estimation was also performed. A constant payload is mounted to the nonlinear servo system. In numerical results, SSMO with the least root-mean squared-error performance in the most accurate velocity estimation and EKF performance were compared. Figure  4 (a) and Figure 4 (b) show the resulting constant payload estimation and estimation errors of SSMO and EKF, respectively. According to the results, the EKF estimation is much oscillatory, but SMO estimation is more smooth and more robust to the state change. In addition, designing the EKF parameters is much troublesome than SMO when the initialization of the error covariance matrix and noise covariances are not proper, it causes divergence of estimates.
In the same way, EKF and SMO methods have been used to estimate varying payload of the nonlinear servo system. The comparisons of payload estimates are demonstrated in Figure 5(a) and Figure 5(b), respectively. The same design parameters of SMO are utilized with constant payload case such that the parameter estimate is smooth and has less estimation errors than EKF. Both the constant and varying payload estimation results are listed in Table 4 with RMSE values. However, varying payload case has larger RMSE values than constant payload case which is in fact an expected result.  Table 4. RMSE values of the payload estimation

Noisy Case of Varying Payload Estimation
In this subsection, the designed parameter estimation methods are compared under an external noise. An artificial noise is applied to the measured state, which is the position of the payload in simulations. The added artificial noise is a zero-mean noise with 10 dB, 20 dB and 30 dB signal-to-noise ratios (SNR). Therefore, noise variance parameter of the EKF is selected according to the SNR and variance of the output. The estimation results with 20 dB noise is given in Figure 6(a) and Figure 6(b), respectively. The application results are obtained when same noise is applied to the estimation processes. Table 5 presents the performance results with different SNRs. The remarkable result is that when the amplitude of the noise decreases, SSMO provides the better RMSE result of estimation. In contrast, when the amplitude of the noise increases, EKF provides better performance of estimation. The noise filtering property of the EKF actually surpasses the effect of the noise on the estimation.

Conclusions
In this paper, different types of SMOs and EKF were designed for state and parameter estimation of a nonlinear servo system. In the first part, without measurement noise, the observers are compared for velocity estimation and SSMO provided most accurate estimation results. In the second part, without measurement noise, SSMO and EKF are compared for the constant and varying payload estimation. As before, SSMO provided better estimation results. In the final section, artificial noises with different SNR are applied to the measurement signal. When the less amplitude of noise signal is applied, SSMO estimates the states and payload better than EKF. However, EKF provides much better estimation results than SSMO for large amplitude of noise signals. For the sake of generalization, SSMO is a fast and robust observer for small noise cases. However, the filtering property of EKF has still importance for large noise cases.