Open access peer-reviewed chapter

Sensitivity-Based Adaptive SRUKF for State, Parameter, and Covariance Estimation on Mechatronic Systems

Written By

Mauro Hernán Riva, Mark Wielitzka and Tobias Ortmaier

Submitted: 10 May 2017 Reviewed: 14 November 2017 Published: 20 December 2017

DOI: 10.5772/intechopen.72470

From the Edited Volume

Kalman Filters - Theory for Advanced Applications

Edited by Ginalber Luiz de Oliveira Serra

Chapter metrics overview

1,535 Chapter Downloads

View Full Metrics

Abstract

Since the initial developments in the state-space theory in the 1950s and 1960s, the state estimation has become an extensively researched and applied discipline. All systems that can be modelled mathematically are candidates for state estimators. The state estimators reconstruct the states that represent internal conditions and status of a system at a specific instant of time using a mathematical model and the information received from the system sensors. Moreover, the estimator can be extended for system parameter estimation. The resulting Kalman filter (KF) derivatives for state and parameter estimation also require knowledge about the noise statistics of measurements and the uncertainties of the system model. These are often unknown, and an inaccurate parameterization may lead to decreased filter performance or even divergence. Additionally, insufficient system excitation can cause parameter estimation drifts. In this chapter, a sensitivity-based adaptive square-root unscented KF (SRUKF) is presented. This filter combines a SRUKF and the recursive prediction-error method to estimate system states, parameters and covariances online. Moreover, local sensitivity analysis is performed to prevent parameter estimation drifts, while the system is not sufficiently excited. The filter is evaluated on two testbeds based on an axis serial mechanism and compared with the joint state and parameter UKF.

Keywords

  • Unscented Kalman
  • filter
  • recursive prediction-error method
  • state estimation
  • parameter estimation
  • covariance estimation
  • sensitivity analysis

1. Introduction

State estimation is applicable to almost all areas of engineering and science. It is interesting to engineers for different reasons such as the control of a system using a state-feedback controller or monitoring the system states that are not measureable with sensors, or the sensors are too expensive or too difficult to install. The system states can be defined as variables, which provide a representation of internal conditions and status of a system at a specific instant of time. Applications that include a mathematical model of any system are candidates for state estimation. The estimations can be useful, for example, car assistance systems [1], predictive maintenance [2], structure health estimation [3], and many other applications (see [4] and references therein).

Different algorithms were proposed for online state estimation. A historical survey of the filtering algorithms can be found in [5]. The Kalman filter (KF) was presented in [6] and nowadays is the most widely applied algorithm for state estimation on linear systems. The KF is a linear optimal estimator [7]. This means that the KF is the best filter that uses a linear combination of the system measurements and states in order to estimate the last ones. The main operation of the KF is the propagation of the mean and covariance of the (Gaussian) random variables (RVs) through time. The KF assumes that the model and the noise statistics affecting the system are known. Otherwise, the estimates can degrade.

Different derivatives of the KF have been developed for nonlinear systems during the last decades. The extended Kalman filter (EKF) presented in [8] is the most commonly used estimator for nonlinear system. This filter linearizes the system and measurement equations at the current estimate. This may lead to poor performances for highly nonlinear or highly noisy systems [9]. To address the linearization errors of the EKF, the unscented Kalman filter (UKF) was presented in [10]. This filter uses the unscented transformation (UT) to pick a minimal set of points around the mean of the GRV. These points capture the true mean and covariance of the GRV, and they are then propagated through the true nonlinear function capturing the a posteriori mean and covariance more accurately.

The mathematical models usually describe the behaviour of the systems, and generally the structure and the parameters need to be determined. Once the structure is defined, system inputs and measurements can be used to identify the model parameters. This can be performed offline [11, 12]. However, the parameters usually may vary during operations. In order to monitor these variations online, the nonlinear extensions of the KF can be extended for parameter estimation [9].

The KF derivatives can only achieve good performances under a priori assumptions, for example, accurate system models, noise statistics knowledge, and proper initial conditions [7, 9, 13]. If one of these assumptions is not guaranteed, the KF derivative can potentially become unstable and the estimations can be diverged [14, 15, 16]. Moreover, tuning the performance of these filters implies primarily adjusting the process and measurement noise covariances to match the (unknown) real-system noise statistics. In the last decades, numerous methods were presented to estimate these unknown covariances. The autocovariance least-square method was presented in [17, 18], and it was extended (and simplified) in [19], and diagonal process and noise covariances were considered in [20]. This method estimates the noise covariances using least squares and it can only be used with KF. The method was extended for nonlinear or time-varying systems using an EKF in [21]. Online covariance estimation for EKF and square-root cubature Kalman filter (SRCuKF) was presented in [22]. These methods implement a combination of a KF derivative and a recursive prediction-error method (RPEM) to estimate covariances online. In [23], an adaptive UKF was presented to estimate only covariances online.

In this chapter, a sensitivity-based adaptive square-root unscented Kalman filter (SB-aSRUKF) is presented. This filter estimates system states, parameters and covariances online. Using local state sensitivity models (SMs), this filter prevents parameter and covariance estimation drifts, while the system is not sufficiently excited. Sensitivity analysis (SA) for the UKF is also presented. The performance of this filter is validated in simulations on two testbeds and compared with the joint UKF for parameter and state estimation.

Section 2 covers some algorithms for recursive estimation of states, parameters, and covariances. The SB-aSRUKF is the main topic of this chapter. This filter uses a KF derivative for state estimation. In Section 2.1, the KF for state estimation in linear dynamic systems is presented. The UKF, a nonlinear extension of the KF, is described in Section 2.2 and also extended for estimating system parameters. Section 2.3 covers parameter estimation using the RPEM. The UKF and the RPEM are combined in Section 2.4 to obtain the aSRUKF. In order to identify unknown parameters, the system inputs should be persistently exciting. Sensitivity models (SMs) are presented in this section and are used to evaluate the system excitation and prevent parameter estimation drifts while the system is not sufficiently excited.

Section 3 covers the testbed used for the filter evaluations. A planar one-link robot system is described in Section 3.1, and a pendulum robot (pedubot) is mathematically modelled in Section 3.2. The first testbed is used for the SM analysis, and the chaotic system is used to compare the filter performance with the joint SRUKF. The evaluation results of the SB-aSRUKF are presented in Section 4. The SMs are analysed with different system inputs on the first testbed in Section 4.1, and the filter performance for state and parameter estimation is compared with the joint SRUKF in Section 4.2. Section 5 completes the chapter with conclusions.

Advertisement

2. Recursive estimation

This section discusses some recursive approaches to estimate states, parameters and covariances of a general system. The KF as the optimal linear estimator for linear dynamic systems is presented. Nonlinear extensions of the KF are discussed, as well as an extension for parameter estimation. A recursive Gauss-Newton method for parameter estimation is also presented in this section. Finally, the last subsection discusses the SB-aSRUKF, which is the main topic of this chapter, and the SMs that are used for excitation monitoring.

2.1. Kalman filter (KF)

The KF is the most widely applied algorithm for state estimation on linear dynamic systems that are corrupted by stochastic noises (e.g. Gaussian noise). It uses a parametric mathematical model of the system and a series of (noisy) measurements from, for example, sensors to estimate the system states online [4]. In general, the state distribution of a system can be approximated by random variables (RVs). The main operation of the KF is the propagation of the mean and covariance of these (Gaussian) RVs through time. The KF is an optimal linear filter for these types of systems [7, 9]. It is a recursive algorithm, which enables new measurements to be processed as they arrive to correct and update the state and measurement estimates.

In general, a linear discrete-time system corrupted by additive noises can be written as follows:

x k = A x k 1 + B u k 1 + w k , y k = C x k + D u k + v k , E1

where x k R n x is the system state vector at discrete time k , and u k R n u and y k R n y correspond to the system input and measurement vectors, respectively. The matrices A R n x × n x , B R n x × n u , C R n y × n x and D R n y × n u are often called system, input, output and feedforward matrices, respectively, and describe the system behaviour. The random variable vectors w k and v k represent the process and measurement noises. These are considered white Gaussian, zero mean, and uncorrelated and have covariance matrices Q k and R k , respectively, as

w k N 0 Q k , v k N 0 R k . E2

The KF iterative nature can be separated in two main steps: the process update and the correction step. In the process update, based on the knowledge of the system dynamics, the state estimate ( x ̂ k 1 + )1 from the previous time step ( k 1 ) is used to calculate a new estimate at the current time ( k ). This step does not include any information of the system measurements and the resulting state estimate is called a priori estimate ( x ̂ k ). In the correction step, the a priori estimate is combined with the current system measurement ( y k ) to improve the state estimate. This estimate is called the a posteriori state estimate ( x ̂ k + ). The vectors x ̂ k and x ̂ k + estimate both the same quantity, but the difference between them is that the last one takes the measurement ( y k ) into account. A Kalman gain matrix ( K k ) is calculated at every discrete step and weights the influence of the model and the measurements on the current state estimate. This gain is calculated using the system matrices and the process ( Q k ) and measurement ( R k ) covariances. More information about the KF equations and generalizations can be found in [4, 7, 9].

The KF is a linear optimal estimator, but it assumes that the system model and noise statistics are known. Otherwise, the filter estimates can degrade. Tuning the performance of the filter implies primarily adjusting the process and measurement covariance matrices to match the (unknown) real-system noise statistics. In practical implementations of the KF, the filter tuning is performed online, and empirical values are normally used. Extensive research has been done in this field to estimate the noise covariances from data (see [17, 18, 19, 20] and references therein).

As mentioned before, the KF is the optimal linear estimator, which estimates states of a linear dynamic system using the inputs, measurements and a parametric mathematical model of the system. Even though many systems are close enough to linear and linear estimators give acceptable results, all systems are ultimately nonlinear. Extensions of the KF have been presented in the last decades to deal with nonlinear systems. Some examples are the EKF and the sigma-point Kalman filters (SPKFs).

2.2. Nonlinear filtering

The EKF and the UKF (a SPKF type) are derivatives of the KF for nonlinear systems. The EKF was originally proposed in [8] and is the most commonly applied state estimator for nonlinear systems. However, if the system nonlinearities are severe or the noises affecting the system are high, the EKF can be difficult to tune, often gives wrong estimates and can lead to filter divergence easily. This is because the EKF uses linearized system and measurement models at the current estimate and propagates the mean and covariance of the GRVs through these linearizations. The UKF was presented in [10] and addresses the deficiencies of the EKF linearization providing a direct and explicit mechanism for approximating and transforming the mean and covariance of the GRVs.

In general, a discrete-time state-space model of a nonlinear system can be described by

x k = f x k 1 θ k 1 u k 1 + w k 1 , y k = h x k θ k u k + v k , E3

where θ k R n p is the (unknown) parameter vector and f and h are arbitrary vector-valued functions usually called system and measurement functions. As a KF derivative, the UKF aim is to minimize the covariance of the state estimation error to find an optimal estimation of the state true dynamic probability density function (pdf). The main component of this filter is the UT. This transformation uses a set of appropriately selected weighted points to parameterize the mean and covariance of the pdf. Two steps characterize also the UKF. In the process update, the sigma points are calculated and then propagated through the nonlinear system functions to recover the mean and covariance of the new a priori estimates. The estimated measurement ( y ̂ k ) is calculated in the correction step and together with the actual measurement are used to correct the a priori estimate. This results in the a posteriori state estimate. While the UKF matches the true mean of x k correctly up to the third order, the EKF only matches up to the first order. Both filters approximate the true covariance of x k up to the third order. However, the UKF correctly approximates the signed of the terms to the fourth power and higher meaning that the resulting error should be smaller [7, 9].

The nonlinear extensions of the KF can also estimate the unknown parameters of a system. The UKF was extended for joint state and parameter estimation in [24]. In this case, the system state vector x k was extended by including the unknown parameters θ k to obtain a joint state and parameter vector as

x ~ k = x k θ k , E4

remaining θ k = θ k 1 during the process update.

Square-root (SR) filtering increases mathematically the precision of the KF when hardware precision is not available. In [25], an SR version of the UKF was presented, which uses linear algebra techniques such as the QR decomposition and the Cholesky factor [26] to calculate the SR of the estimation error covariance. The SR form improves the numerical stability of the filter and guarantees positive semi-definiteness of this covariance. Additionally, the computational complexity for state and parameter estimation is reduced [25].

2.3. Recursive prediction-error method

In this section, the recursive prediction-error method (RPEM) is briefly discussed. This method is extensively analysed in [11, 12] and uses a parameterized predictor that estimates the system outputs at the current time step. The resulting predicted system output is then compared to the actual system measurement, and the predictor parameters are corrected such as that the prediction error is minimized.

The quadratic criterion function defined as

V k θ k = 1 2 e k T θ k Λ 1 e k θ k , E5

is minimized using the stochastic Gauss-Newton method in order to obtain the predictor parameters. The prediction error e k θ k at the discrete time k is described as

e k θ k = y k y ̂ k θ k , E6

where y k corresponds to the actual system measurement, y ̂ k θ k refers to the parameterized predictor output using parameter set θ k and Λ is a user-defined weight factor.

The recursive solution that minimizes the quadratic criterion function in Eq. (5) is given by the following scheme:

Δ k = Δ k 1 + 1 λ e k e k T Δ k 1 , S k = λ Δ k + d y ̂ k d θ ̂ k 1 Θ k 1 d y ̂ k T d θ ̂ k 1 , L k = Θ k 1 d y ̂ k T d θ ̂ k 1 S k 1 , Θ k = I n θ L k d y ̂ k d θ ̂ k 1 Θ k 1 I n θ L k d y ̂ k T d θ ̂ k 1 / λ + L k Δ k L k T , θ ̂ k = θ ̂ k 1 + L k e k . E7

The user-defined parameter 0 < λ 1 is often called the forgetting factor. The matrix Δ k is calculated using the prediction error. This matrix is used to calculate S k , where the derivative of the output w.r.t. to the unknown parameter vector ( d y ̂ k d θ ̂ k 1 ) appears. The gain vector L k is multiplied by the innovation error to update then the parameter estimation. It should be noted that besides the matrix y ̂ k = d y ̂ k d θ ̂ k 1 , all parameters, vectors, and matrices are defined after an initialization. The matrix y ̂ k can be calculated modifying a KF derivative.

The selection of the forgetting factor essentially defines the measurements that are relevant for the current estimation of the parameter predictor. The most common choice is to take a constant forgetting factor for systems that change gradually. Other criterions for selection of this factor and the convergence of the RPEM are discussed extensively in [11, 12].

2.4. Sensitivity-based adaptive square-root Kalman filter

This is the main section of this chapter. The earlier sections were written to provide the needed methods for this section, and the later sections are written to analyse and test the performance of the filter described in this section.

The aSRUKF is discussed in this section. This filter combines the SRUKF and the RPEM. While the KF derivative estimates the system states and measurements, the RPEM calculates the unknown parameters and covariances.

In this filter, the innovation error in Eq. (6) is calculated and minimized using the recursive scheme presented in Eq. (7) in order to estimate the unknown system parameters and covariances. Besides the matrix y ̂ k , all parameters, vectors, and matrices of the recursive scheme are defined. The derivative of the estimated measurement ( y ̂ k ) w.r.t. the vector ( θ ̂ k 1 ) containing the unknown values of parameters and covariances needs to be calculated. This matrix is also called the output sensitivity and describes the influence of a variation of a parameter on the system output. The output sensitivity can be obtained using a KF derivative.

The equations of a SRUKF are then extended in order to calculate the output sensitivity. To simplify the reading flow, the following definitions are presented:

w i m = w i c = 1 2 n x + λ f , i = 1 , , m = 2 n x , λ f = α 2 n x + κ , w 0 m = λ f 2 n x + λ f , w 0 c = w 0 m + 1 α 2 + β , η = n x + λ f , m 1 = 1 1 , n x , m 2 = 1 1 , l , l = 2 n x + 1 , w c = w 0 c w m c , w m = w 0 m w m m , W kr c = w c m 1 T , E8

where w i m , c are a set of scalar weights, α determines the spread of sigma points around the estimated state x ̂ k , β incorporates information about the noise distribution (e.g. β = 2 assumes that the system is affected by Gaussian noise), and κ is a scaling factor, which can be used to reduce the higher-order errors of the mean and covariance approximations [9]. The Kronecker product [27] is described by .

The process update step of the aSRUKF is presented in Table 1 . After the filter initialization, the sigma points ( X k 1 ) that describe the pdf of the state estimate are calculated using the UT. At the same time, the sigma-point derivatives ( Φ k 1 ) are also obtained. The sigma points and its derivatives are propagated through the system function and the system derivative function, respectively, to obtain the a priori state estimate ( x ̂ k ) and the a priori state estimate sensitivity ( X ̂ k ). Considering additive process noises, the SR factor of the estimation error covariance ( S xx , k ) is calculated using the QR decomposition ( qr ) and the rank-one update to Cholesky factorization ( cholupdate 2) in which the signum function ( sign ) is used to determine the sign of the first calculated weight factor. If the weight factor results negative, a Cholesky downdate takes place; otherwise, a Cholesky update occurs. The next step calculates the derivative of the SR factor of the estimation error covariance ( S xx , k ). In this step, the function treshapeM is used. This function converts a vector of dimension n x n x + 1 / 2 n θ × 1 into a n x × n x n θ matrix with n θ lower triangular blocks of size ( n x × n x ) . Additionally, the operator s is utilized to stack the matrix columns to form a column vector. Further information about this step can be found in [28].

aSRUKF Initialization x ̂ 0 = x init R n x , θ ̂ 0 = θ init R n θ , S yy . k = d S yy , k d θ k , Θ k = Θ init R n θ × n θ P xx , k = d P xx , k d θ k , P yy , k = d P yy , k d θ k , S xx . k = d S xx , k d θ k , Δ k = 0 R n y × n y ,
P xx , 0 = S xx , 0 S xx , 0 T = P xx , init R n x × n x ,
P xx , 0 = S xx , 0 = 0 R n x × n x n θ , P yy , 0 = S yy , 0 = 0 R n y × n y n θ
SRUKF Sigma points X k 1 = X k 1 , 1 X k 1 , l = x ̂ k 1 x ̂ k 1 m 1 + η S xx , k 1 x ̂ k 1 m 1 η S xx , k 1
Sigma-points propagation X k = f X k 1 θ ̂ k 1 u k 1
SM Sigma-point derivatives Φ k 1 , j = Φ k 1 , 1 , j Φ k 1 , l , j = d X k , 1 d θ ̂ k , j d X k , m d θ ̂ k , j = X ̂ k 1 , j X ̂ k 1 , j m 1 + η S xx , k 1 , j X ̂ k 1 , j m 1 η S xx , k 1 , j
with
X ̂ k 1 = d x ̂ k 1 d θ ̂ k 1
Sensitivity propagation Φ k , j , i = f x k X k 1 , θ ̂ k 1 Φ k 1 , j , i + f θ k , j X k 1 , θ ̂ k 1
SRUKF A priori state estimate x ̂ k = X k w m T
SR estimation error covariance S xx , k = qr w 1 c X 1 : 2 n x , k x ̂ k S Q , k ,
S xx , k = cholupdate S xx , k w 0 c X 0 , k x ̂ k sign w 0 c
SM A priori
state sensitivity
X ̂ k = Φ k I n θ w m T
Derivative of estimation error covariance S xx , k = treshapeM I n θ A ls , S xx , k P xx , k s ,
with
A ls , S xx , k = S xx , k I n x + I n x S xx , k N n x ) E n x and
P xx , k = Φ k X ̂ k m 2 I n θ W kr c T X k x ̂ k m 2 T + W kr c X k x ̂ k m 2 T l I n θ Φ k X ̂ k m 2 T + d Q k d θ k θ ̂ k 1
in which T l = I 0 T 1 T n θ , and T = 0 1 l × l 0 n θ l × l I l .
Further details of the construction of the matrix N n x and the elimination matrix E n x can be found in [28]

Table 1.

aSRUKF: filter initialization, sigma-points calculation and filter process update step. The Kronecker product is described by ⨂ and defines the element-wise multiplication. The s operator stacks the matrix columns to form a column vector.

The correction step is shown in Table 2 . A new set of sigma points ( X k ) and its derivatives ( Φ k ) can be generated using steps (a) and (b) from Table 2 . If the nonlinearity is not severe, these steps can be skipped. This saves computational effort but sacrifices filter performance. The (new) sigma points and its derivatives are then propagated through the measurement function and its derivative, respectively. The resulting points are used to calculate the estimated measurements ( Y k ) as well as the output sensitivities ( y ̂ k ). These are used within the RPEM to estimate the system parameters and covariances.

SRUKF Sigma points X k = X k , 1 X k , l = x ̂ k x ̂ k m 1 + η S xx , k x ̂ k m 1 η S xx , k 1 (a)
Output sigma points Y k = h X k θ ̂ k 1 u k
Estimated measurement y ̂ k = Y k w m T
SM Sigma-points derivative Φ k , j = Φ k , 1 , j Φ k , l , j = = X ̂ k , j X ̂ k , j m 1 + η S xx , k , j X ̂ k , j m 1 η S xx , k , j (b)
Output
sigma-points derivative
Ψ k , j , i = h x k X k , θ ̂ k 1 Φ k , j , i + h θ k , j X k , θ ̂ k 1
Output sensitivity y ̂ k = Ψ k I n θ w m T with
Ψ k = Ψ k , 1 Ψ k , n θ
(c)
SRUKF SR innovation error covariance S yy , k = qr w 1 c Y 1 : 2 n x , k y ̂ k S R , k ,
S yy , k = cholupdate S yy , k w 0 c Y 0 , k y ̂ k sign w 0 c
Cross-covariance matrix P xy , k = W kr c Y k y ̂ k m 2 X k x ̂ k m 2 T
SM Derivative of innovation error covariance S yy , k = treshapeM I n θ A ls , S yy , k P yy , k s , with
A ls , S yy , k = S yy , k I n y + I n y S yy , k N n y ) E n y and
P yy , k = Ψ k y ̂ k m 2 I n θ W kr c T Y k y ̂ k m 2 T + W kr c Y k y ̂ k m 2 T l I n θ Ψ k y ̂ k m 2 T
Derivative of Cross-covariance matrix P xy , k = Φ k X ̂ k m 2 I n θ W kr c T Y k y ̂ k m 2 T + W kr c X k x ̂ k m 2 T l I n θ Ψ k y ̂ k m 2 T
SRUKF Kalman gain K k = P xy , k / S yy T / S yy , k
A posteriori state estimate x ̂ k + = x ̂ k + K k y k y ̂ k
SR estimation error covariance for z = 1   to n y do
S xx , k = cholupdate S xx , k U k : z ,
with U k = K k S yy , k
SM Kalman gain derivative K k = P xy , k / I n θ P yy , k P xy , k / P yy , k P yy , k / I n θ P yy , k
A posteriori state sensitivity X ̂ k + = X ̂ k K k y ̂ k + K k I n θ y k y ̂ k (d)
Derivative of estimation error covariance update S xx , k = treshapeM I n θ A ls , S xx , k P xx , k s , with
P xx , k = P xx , k P xy , k T n y I n θ K k T P xy , k I n θ K k T
RPEM Parameter and covariance estimation Δ k = Δ k 1 + 1 λ e k e T Δ k 1 ,
S k = λ Δ k + y ̂ k Θ k 1 y ̂ k T ,
L k = Θ k 1 y ̂ k T S k 1 ,
Θ k = I n θ L k y ̂ k Θ k 1 I n θ L k y ̂ k T / λ + L k Δ k L k T ,
θ ̂ k = θ ̂ k 1 + L k e k .
(e)

Table 2.

aSRUKF: filter correction step and the RPEM for parameter and covariance estimation.

The SR factor of the innovation error covariance ( S yy , k ), the cross-covariance ( P xy , k ) together with its derivatives matrices ( S yy , k , P xy , k ) are calculated in order to obtain the Kalman gain matrix ( K k ) and its sensitivity ( K k ). The aSRUKF treats also the measurement noises as additive. The a posteriori state estimation ( x ̂ k + ), the a posteriori state sensitivity ( X ̂ k + ) together with the SR factor of the estimation error covariance ( S xx , k ) and its sensitivity ( S xx , k ) close the loop of the aSRUKF.

Local sensitivity analysis can be utilized to determine if a system input or a system modification can excite the system parameters in order to identify them. The a posteriori state sensitivity from Table 2 (d) can be used to determine the influence of parameters to the system states. This sensitivity results from the correction step of the aSRUKF. As long as the sensitivity X ̂ k + remains below a user-defined threshold, the parameter update from Table 2 (e) can be skipped to prevent parameter estimation drifts. A time window N w can be used to calculate max X ̂ k N w + 2 X ̂ k + 2 to normalize the sensitivity values. A threshold vector t v is then defined with values between 0 and 1. The update procedure can be described as

for   p = 1 to   n θ   do sa = 0 for   n = 1 to   n x   do sa = sa + d x k , n d θ k , p if sa > t v p then update _ values = True E9

The variable sa represents the sensitivity sum w.r.t. a system parameter θ k , p over all system states ( x k , 1 , , x k , n x ) . The threshold vector t v should be selected with caution. Too high values prevent parameter estimation drifts but can increase the convergence time of the filter. Moreover, the parameter excitation can be significantly reduced and the resulting estimation can be biased. The performance of the SB-aSRUKF is evaluated in Section 4.

The local state sensitivity can be also calculated as follows (cf. [29]):

d x k d θ k , j = f x k x ̂ k 1 , θ ̂ k 1 d x k 1 d θ k , j + f θ k , j x ̂ k 1 , θ ̂ k 1 E10

This sensitivity computation is compared in Section 4 with a posterior state sensitivity obtained using the SB-aSRUKF.

The RPEM can be combined with different KF derivatives to estimate system parameters and covariances. An EKF and a SRCuKF were used to calculate the output sensitivity in [22], which is then used to estimate the unknown values. More information about the aSRUKF can be found in [28, 30].

Advertisement

3. Testbeds

In this section, two testbeds are presented and modelled. These modelled systems are used in Section 4 to test the performance of the SB-aSRUKF. The planar one-link robot system is presented and extended with a second arm to form a pendulum robot (pendubot). The pendubot is a chaotic and inherently unstable system.

3.1. Planar one-link robot system

This section describes the planar one-link robot system shown in Figure 1 . It consists of a long rectangular aluminium link driven by a DC motor via a shaft and a one-state toothed gear.

Figure 1.

Planar one-link robot system: structure and functionality.

The angular position is measured with an incremental rotary encoder and the motor torque is determined by measuring the motor current. To simplify the motor model, it is assumed that the motor current is directly proportional to the armature current and that the motor torque is proportional to this current by a constant factor. Additionally, the link acceleration is measured using a micro-electro-mechanical sensor (MEMS) accelerometer attached to the link. The motor position is controlled by a classical cascade structure with P- and P-feedback controllers for position and speed.

The corresponding continuous state-space representation of the planar one-link robot system, where the link angular position and acceleration are measured, can be written as follows:

x ̇ = Ax + b x u , y = c x u .

The system states are the link angular position ( x 1 = q 1 ) and the link speed ( x 2 = q ̇ 1 ) . The input u corresponds to the motor torque ( u = τ m ). The measurements are the link angular position ( y 1 = q 1 ) and acceleration ( y 2 = q ¨ 1 ). The matrix A and the vector-valued functions b and c are then described as

A = 0 1 0 μ v J tot , b x u = 0 μ d J tot arctan k x 2 m a l 2 2 J tot sin x 1 + τ m J tot , c x u = x 1 μ v J tot x 2 μ d J tot arctan k x 2 m a l 2 g 2 J tot sin x 1 + τ m J tot ,

where J tot represents the total inertia including motor, shaft and link inertias. The link friction is modelled as a dry Coulomb ( μ d and k ) and viscous friction ( μ v ) . The parameters m a , l 2 , and g are the link mass, length, and the gravity of Earth coefficient, respectively.

3.2. Pendubot

This section describes the pendulum robot (pendubot) that is presented in Figure 2 . The pendubot is built adding an under-actuated link to the planar one-link robot system described in Section 3.1. The actuated joint ( q 1 ) is located at the shoulder of the first link (arm) and the elbow joint ( q 2 ) allows the second link (forearm) to swing free. This joint contains only a second incremental rotatory encoder that measures the angle between the two links.

Figure 2.

Pendubot: structure and functionality.

The system states result as x 1 = q 1 , x 2 = q ̇ 1 , x 3 = q 2 , and x 4 = q ̇ 2 , where q i and q ̇ i are the corresponding position and speed of the i –joint, respectively. The state-space representation of the pendubot can be written as

x ̇ = Ax + b x u , y = x 1 x 3 x ̇ 2 T ,

in which

A = 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 , b x u = 0 x ̇ 2 0 x ̇ 4 T ,

where

x ̇ 2 x ̇ 4 = q ¨ = q ¨ 1 q ¨ 2 = D q 1 τ m μ v 1 q 1 ̇ d q ̇ 1 μ v 2 q ̇ 2 D q 1 C q q ̇ q ̇ D q 1 g q .

The viscous and Coulomb frictions are described with the parameters μ v 1 and μ v 2 and the function d q ̇ 1 = μ d arctan k q ̇ 1 . The matrices D q and C q q ̇ and the vector g q are the inertial and the Coriolis matrices and the gravity vector, respectively. They are defined as follows

D q = ϑ 1 + ϑ 2 + 2 ϑ 3 cos q 2 ϑ 2 + ϑ 3 cos q 2 ϑ 2 + ϑ 3 cos q 2 ϑ 2 , C q q ̇ = ϑ 3 sin q 2 q ̇ 2 q ̇ 1 q ̇ 2 q ̇ 1 0 , g q = ϑ 4 g cos q 1 + ϑ 5 g cos q 1 + q 2 ϑ 5 g cos q 1 + q 2 ,

where the ϑ i parameters are defined as

ϑ 1 = m 1 l 1 2 + m 2 + m 3 + m 4 l 2 2 + J 1 , ϑ 2 = m 2 l 3 2 + m 4 l 4 2 + J 2 , ϑ 3 = m 2 l 3 + m 4 l 4 l 2 ,
ϑ 4 = m 1 l 1 + m 2 + m 3 + m 4 l 2 , ϑ 5 = m 2 l 3 + m 4 l 4 .

The parameters J 1 and J 2 correspond to the moments of inertia of link 1 and link 2 about their centroids. J 1 includes motor, gear and shaft inertias. The m i and l i parameters are defined in Figure 2 .

Advertisement

4. Experiments

In this section, the SB-aSRUKF is tested on the planar one-link robot system and on the pendubot. Both testbed models were discretized using first-order explicit Euler with a sample time of 0.2 ms . System states, parameters and covariances were estimated online. The SB-aSRUKF is also compared with the joint state and parameter SRUKF in this section. Sensitivity analysis is also discussed.

4.1. State sensitivity analysis and parameter and covariance estimation

Sensitivity analysis (SA) was performed on simulation using the planar one-link robot system. The system parameters were identified offline on the real testbed using Prediction-Error Method. The parameters defined as

θ ̂ true = J ̂ tot   μ ̂ v   μ ̂ d   m ̂ a l ̂ 2   k ̂ T = 5.59 10 2 kg m 2 0.05 N m s rad 0.27 N m 0.11 kg m 10 s rad T ,

were used for the simulation. Noise distributions with the following covariance matrices

Q = diag 10 11 5 10 5 , R = diag 5 10 7 5 ,

3were added to the simulation to incorporate model and measurement uncertainties. An s-curve profile was considered as a desired link angular position.

The following system states, parameters and covariances were estimated:

x 1 = q 1 link position , x 2 = q ̇ 1 link speed , θ a = q 11 process covariance value related to the link ang . pos . , θ 1 = μ v viscous friction coefficient , θ 2 = μ d Coulomb friction coefficient , θ 3 = J tot 1 inverse inertia .

The remaining tuning factors for SB-aSRUKF were set as

Q = q 22 = 5 10 5 , R = diag 5 10 7 2 10 1 ,
α = 0.08 β = 2 κ = 3 n x λ = 0.999 ,
P xx , init = I 2 , Θ init = diag 5 10 13 10 1 10 6 10 4 10 8 .

The values of Θ init tune the parameter and covariance estimation, and the index order is the same as the above-defined θ i values. This means that the first value tunes the estimation of θ a (process covariance value), the second value tunes θ 1 (viscous friction coefficient) and so on.

The filter initial system states were set to zero and the initial system parameters were set as the true values multiply by a random factor between 0 < θ factor , i   10 as

x init = 0 , θ init = 2 10 8 ra d 2 1.5 1 / J ̂ tot 3 μ ̂ v   8 μ ̂ d   0.25 m ̂ a l ̂ 2 T .

In order to test the sensitivity-based section of the filter, the link angular position was held at q 1 = π / 2 after ca. 11 s for about 4.5 s . At the same time, the system parameters μ ̂ v , μ ̂ d , and m ̂ a were quadrupled.

Figure 3 compares the a posteriori state sensitivity calculated using the SB-aSRUKF and the state sensitivity using Eq. (10). The first diagram shows the estimated and true link angular position of the planar one-link robot system. The following diagrams present the normalized SA related to the link angular speed ( q ̇ ̂ 1 ) and corresponding to the inverse inertia, viscous and Coulomb friction coefficients, and the link mass and length parameter. While the state sensitivity calculated using Eq. (10) was affected directly by input noises, the a posteriori state sensitivity provided an almost noise-free estimation. While the SA J tot 1 maxima were related with the acceleration (speed-up and brake phases), the SA μ v maxima coincided with the link maximal speed. The SA m a l 2 was only zero while the arm was crossing the 0 rad position and the SA μ d was the sensitivity value more affected by the system noise. This is caused because the maximal change rate of arctan occurs when the argument is near zero. When the link speed is zero, the added noise varies near this value and its effect is amplified by arctan .

Figure 3.

Sensitivity analysis (SA): comparison between the a posteriori state sensitivity obtained using the SB-aSRUKF and the resulting using Eq. (10). The desired link position was set as an s-curve between π / 2 and π / 2 . The link position was held at π / 2 after ca. 11 s for about 4.5 s . The parameter sensitivities are related to the link angular speed ( x ̂ 2 = q ̇ ̂ 1 ) .

Figure 4 shows the state, parameter and covariance estimation of the planar one-link robot system. The aSRUKF was used in two configurations: SB-aSRUKF utilized SA to monitor the system excitation while aSRUKF did not. After the initialization, the two estimators needed almost the same time to converge to the offline identified values. The parameters estimated using the SB-aSRUKF did not diverge while the link position was held. Because two of the estimated parameters using the aSRUKF diverged, this filter needed more time to converge after the stop phase. The two filters were able to estimate the link mass and length parameter during the stop phase. While the viscous and the Coulomb friction coefficients and the inverse inertia estimated with the SB-aSRUKF remained constant during the stop phase, the aSRUKF was able to estimate the Coulomb friction with bias (before μ v diverged). Because of the added noise, the parameter was excited and could be identified. This can be seen in the fourth diagram of Figure 3 . These SA values remained under the threshold used on the SB-aSRUKF and were filtered. The parameter estimation stayed then constant. It should be noted that the diagram corresponding to the viscous friction coefficient is zoomed to present the parameter change, and the oscillations of the aSRUKF are cut. These reached up more than 50 times the parameter true value.

Figure 4.

Planar one-link robot system: parameter and covariance estimation. The SB-aSRUKF uses SA to monitor the system excitation. The initial parameter θ init was randomly selected. The link position was held after ca. 11 s for about 4.5 s , and simultaneously the system parameters μ ̂ v , μ ̂ d , and m ̂ a were quadrupled.

The SB-aSRUKF was able to estimate the parameters and covariance of the proposed testbed. The online estimations converged to the offline identified values without bias. The sensitivity-based approach used as a system excitation monitor prevented parameter estimation drifts and did not modify the convergence time of the filter.

4.2. Comparison between SB-aSRUKF and joint state and parameter SRUKF

The SB-aSRUKF and the joint SRUKF were compared on the pendubot for state and parameter estimation. The SB-aSRUKF identified also covariances.

The system parameters were identified offline and used for the simulation as

θ ̂ true = ϑ ̂ 1   ϑ ̂ 2   ϑ ̂ 3   ϑ ̂ 4   ϑ ̂ 5 T = 0.339 kg m 2 0.0667 kg m 2 0.0812 kg m 2 0.717 kg m 0.146 kg m T ,
μ ̂ v 1   μ ̂ d   μ ̂ v 2   k ̂ = 0.09 N m s rad 0.226 N m 0.003 N m s rad 10 s rad .

An s-curve profile was selected as the desired position of the first link. The following states and parameters were estimated online:

x 1 = q 1 link 1 position , x 2 = q ̇ 1 link 1 speed , x 3 = q 2 link 2 position , x 4 = q ̇ 2 link 2 speed , θ a = q 11 process covariance related to the link 1 ang . pos . , θ b = q 33 process covariance related to the link 2 ang . pos . , ϑ 1 , , ϑ 5 pedubot minimal set of parameters .

The values θ a and θ b , which correspond to the process covariance values, were only estimated using the SB-aSRUKF. The viscous and Coulomb friction coefficients were identified offline and remained constant for both filters.

To simulate model and measurement uncertainties, noise distributions with the following covariance matrices were added to the system for the simulation:

Q = diag 2 10 10 1.5 10 7 2 10 10 1.5 10 7 , R = diag 5 10 7 5 10 7 1 .

The tuning parameters for the joint SRUKF were chosen as

Q 0 1 = diag ( ( 2 10 10 1.5 10 7 2 10 10 1.5 10 7
10 7 10 7 10 7 5 10 10 10 10 ) ) ,
R 0 1 = diag 5 10 7 5 10 7 10 ,
α = 0.85 , β = 2 , κ = 3 n x n p ,
P 0 1 = diag 1 1 1 1 10 3 10 5 10 5 5 1 ,

and the parameters for the SB-aSRUKF were set as

Q 0 2 = diag 1.5 10 7 1.5 10 7 , P xx , 0 2 = I 4 ,
R 0 2 = diag 5 10 7 5 10 7 10 ,
α = 0.85 , β = 2 , κ = 3 n x , λ = 0.999 ,
Θ init = diag 10 25 10 25 10 7 10 7 10 7 5 10 10 10 10 .

The filter initial system states were set to zero and the initial system parameters were set as the true values multiply by a random factor between 0 < θ factor , i   5 as

x init = 0 , θ init 1 = 1.5 ϑ ̂ 1   1.3 ϑ ̂ 2   1.5 ϑ ̂ 3   2 ϑ ̂ 4   2 ϑ ̂ 5 T , θ init 2 = 2 10 10 ra d 2 2 10 10 rad 2 θ init 1 T T .

The first four values of P 0 1 tune the initial state estimation, while the last ones the parameter estimation. The first two values of Θ init tune the estimation of the covariance values θ a and θ b while the last values follow the index order of ϑ i defined in Section 3. It should be noted that the settings related to the state and parameters estimation were equally tuned for both filters.

The state estimation of the pendubot is presented in Figure 5 . The SB-aSRUKF was slightly faster to reach the true system states (cf. diagrams 1 and 4) and after ca. 5 s both filters followed the dynamic of the true system states without any significant bias.

Figure 5.

Pendubot: state estimation using the SB-aSRUKF and joint SRUKF. Both filters followed the dynamic of the true system states without any significant bias.

Figure 6 shows the parameter estimation of the pendubot for both filters. Using the same tuning parameter set, while the SB-aSRUKF estimated the ϑ 1 to ϑ 5 parameters without bias, the joint SRUKF estimated ϑ 1 to ϑ 3 with slight bias, and it was not able to estimate ϑ 4 and ϑ 5 . These two parameters did not converge to the true system values. It should be noted that the diagram scales corresponding to parameters ϑ 4 and ϑ 5 are different between the filters. The parameter initialization and the tuning settings for the two filters were the same. The SB-aSRUKF outperforms the joint SRUKF for the parameter estimation of the pendubot.

Figure 6.

Pendubot: parameter and covariance estimation using the SB-aSRUKF and joint SRUKF. The SB-aSRUKF was configured to estimate the system parameters ϑ 1 to ϑ 5 and the process covariances corresponding to the link positions. The joint SRUKF estimates only the system parameters. It should be noted that the diagram scales for parameters ϑ 4 and ϑ 5 are different between the filters.

Advertisement

5. Conclusions

In this chapter, some approaches for state, parameter and covariance estimation were discussed. Moreover, a sensitivity-based adaptive square-root unscented Kalman filter (SB-aSRUKF) was discussed and its performance was analysed. This filter estimates system states, parameters and covariances online. Additionally, sensitivity models were presented and used as system excitation monitor to prevent parameter and covariance estimation drifts while the system excitation was not sufficient.

Two testbeds based on an axis serial mechanism were modelled and used for testing the performance of the filter. Two experiments were performed in simulation on these two testbeds: a state sensitivity analysis and a comparison between the joint state and parameter square-root unscented Kalman filter (SRUKF) and the SB-aSRUKF. Simulation results show that the SB-aSRUKF outperforms the joint SRUKF with the same tuning configuration. While the joint SRUKF did not estimate two of the five parameters correctly, the SB-aSRUKF identified all the parameters. Moreover, the estimation of covariances reduces the parameter estimation bias. Configuring the right excitation thresholds for the system excitation monitor in Eq. (9) prevented parameter estimation drifts, while the input was not persistently exciting and did not only increased but also in some cases reduced the convergence time of the filter.

References

  1. 1. Wielitzka M, Dagen M, Ortmaier T. State estimation of vehicle‘s lateral dynamics using unscented Kalman filter. 53rd IEEE Conference on Decision and Control (CDC); Los Angeles, USA. 2014:5015-5020. DOI: 10.1109/CDC.2014.7040172
  2. 2. Ding SX. Model-based Fault Diagnosis Techniques: Design Schemes, Algorithms, and Tools. 1st ed. Berlin, Germany: Springer; 2008. p. 493
  3. 3. Simon D, Simon DL. Kalman filtering with inequality constraints for turbofan engine health estimation. IEE Proceedings - Control Theory and Applications. 2006;153(3):371-378. DOI: 10.1049/ip-cta:20050074
  4. 4. Grewal MS, Andrews AP. Kalman Filtering: Theory and Practice with MATLAB. 4th ed. Hoboken, New Jersey, USA: Wiley-IEEE Press; 2014. p. 640
  5. 5. Sorenson HW. Least-squares estimation: from Gauss to Kalman. IEEE Spectrum. 1970;7(7):63-68. DOI: 10.1109/MSPEC.1970.5213471
  6. 6. Kalman RE. A new approach to linear filtering and prediction problems. Journal of Basic Engineering. 1960;82(1):35-45. DOI: 10.1115/1.3662552
  7. 7. Anderson BDO, Moore JB. Optimal Filtering. 1st ed. Mineola, NY, USA: Dover Publications; 2006. p. 368
  8. 8. Schmidt SF. Applications of state space methods to navigation problems. C. T. Leondes (Ed.) Advanced in Control Systems. 1966;3:293-340
  9. 9. Simon D. Optimal State Estimation: Kalman, H Infinity, and Nonlinear Approaches. 1st ed. Hoboken, New Jersey, USA: Wiley-Interscience; 2006. p. 526
  10. 10. Julier SJ, Uhlmann JK. New extension of the Kalman filter to nonlinear systems. In: Signal Processing, Sensor Fusion, and Target Recognition VI. Orlando, FL, USA: International Society for Optics and Photonics; 1997. pp. 182-194. DOI: 10.1117/12.280797
  11. 11. Ljung L, Soderstrom T. Theory and Practice of Recursive Identification. 1st ed. Cambridge, Massachusetts, USA: The MIT Press; 1983. p. 551
  12. 12. Ljung L. System Identification: Theory for the User. 2nd ed. Prentice Hall: Upper Saddle River, NJ, USA; 1999. p. 672
  13. 13. Saab SS, Nasr GE. Sensitivity of discrete-time Kalman filter to statistical modeling errors. Optimal Control Applications and Methods. 1999;20(5):249-259. DOI: 10.1002/(SICI)1099-1514(199909/10)20:5<249::AID-OCA659>3.0.CO;2-2
  14. 14. Fitzgerald R. Divergence of the Kalman filter. IEEE Transactions on Automatic Control. 1971;16(6):736-747. DOI: 10.1109/TAC.1971.1099836
  15. 15. Price C. An analysis of the divergence problem in the Kalman filter. IEEE Transactions on Automatic Control. 1968;13(6):699-702. DOI: 10.1109/TAC.1968.1099031
  16. 16. Ljung L. Asymptotic behavior of the extended Kalman filter as a parameter estimator for linear systems. IEEE Transactions on Automatic Control. 1979;24(1):36-50. DOI: 10.1109/TAC.1979.1101943
  17. 17. Odelson B. Estimating Disturbance Covariances From Data For Improved Control Performance [dissertation]. Madison, WI, USA: University of Wisconsin-Madison; 2003. p. 309
  18. 18. Odelson BJ, Rajamani MR, Rawlings JB. A new autocovariance least-squares method for estimating noise covariances. Automatica. 2006;42(6):303-308. DOI: 10.1016/j.automatica.2005.09.006
  19. 19. Rajamani MR, Rawlings JB. Estimation of the disturbance structure from data using semidefinite programming and optimal weighting. Automatica. 2009;45(1):142-148. DOI: 10.1016/j.automatica.2008.05.032
  20. 20. Riva MH, Díaz Díaz J, Dagen M, Ortmaier T. Estimation of covariances for Kalman filter tuning using autocovariance method with Landweber iteration. In: IASTED International Symposium on Intelligent Systems and Control; Marina del Rey, CA, USA. 2013. DOI: 10.2316/P.2013.807-009
  21. 21. Rajamani MR. Data-based Techniques to Improve State Estimation in Model Predictive Control [dissertation]. Madison, WI, USA: University of Wisconsin-Madison; 2007. p. 262
  22. 22. Riva MH, Beckmann D, Dagen M, Ortmaier T. Online parameter and process covariance estimation using adaptive EKF and SRCuKF approaches. In: 2015 IEEE Conference on Control Applications (CCA); Sydney, Australia. 2015. p. 1203-1210. DOI: 10.1109/CCA.2015.7320776
  23. 23. Han J, Song Q, He Y. Adaptive unscented Kalman filter and its applications in nonlinear control. In: Moreno VM, Pigazo A, editors. Kalman Filter Recent Advances and Applications. Croatia: InTech; 2009. pp. 1-24. DOI: 10.5772/6799
  24. 24. Wan EA, Van der Merwe R. The unscented Kalman filter for nonlinear estimation. In: IEEE 2000 Adaptive Systems for Signal Processing, Communications, and Control Symposium; Lake Louise, Canada. 2000. p. 153-158. DOI: 10.1109/ASSPCC.2000.882463
  25. 25. Van der Merwe R, Wan EA. The square-root unscented Kalman filter for state and parameter-estimation. In: IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP 01); Salt Lake City, USA. 2001. p. 3461-3464. DOI: 10.1109/ICASSP.2001.940586
  26. 26. Press WH, Flannery BP, Teukolsky SA, Vetterling WT. Numerical Recipes in C: The Art of Scientific Computing. 2nd ed. Cambridge, New York, USA: Cambridge University Press; 1992. p. 994
  27. 27. Henderson HV, Searle SR. The vec-permutation matrix, the vec operator and Kronecker products: A review. Linear and Multilinear Algebra. 1981;9(4):271-288. DOI: 10.1080/03081088108817379
  28. 28. Riva MH, Dagen M, Ortmaier T. Adaptive Unscented Kalman Filter for online state, parameter, and process covariance estimation. In: 2016 American Control Conference (ACC); Boston, MA, USA. 2016. p. 4513-4519. DOI: 10.1109/ACC.2016.7526063
  29. 29. Eykhoff P. System Identification Parameter and State Estimation. 1st ed. Hoboken, New Jersey, USA: Wiley-Interscience; 1974. p. 555
  30. 30. Riva MH, Dagen M, Ortmaier T. Comparison of covariance estimation using autocovariance LS method and adaptive SRUKF. In: 2017 American Control Conference (ACC); Seattle, WA, USA. 2017. p. 5780-5786. DOI: 10.23919/ACC.2017.7963856

Notes

  • The hat ̂ over a vector represents the estimate of the vector, for example, x ̂ describes the estimate of the state vector x .
  • Matlab does not allow the use of cholupdate in real-time applications; using coder . extrinsic ′ cholupdate ′ , it is possible to use the function in Simulink but the application does not run in real time. The cholupdate line can be replaced with chol S xx , k − T S xx , k − + w 0 c X 0 , k ∗ − x ̂ k − .
  • The function diag v transforms the v ∈ R n vector into a n × n square matrix with the elements of v on the diagonal of the matrix.

Written By

Mauro Hernán Riva, Mark Wielitzka and Tobias Ortmaier

Submitted: 10 May 2017 Reviewed: 14 November 2017 Published: 20 December 2017