# Rigid Body Inertia Estimation Using Extended Kalman and Savitzky-Golay Filters

Authors: Donghoon Kim; Sungwook Yang; Sangchul Lee
Journal: Mathematical Problems in Engineering
 (2016)

---

## Abstract

Inertia properties of rigid body such as ground, aerial, and space vehicles may be changed by several occasions, and this variation of the properties influences the control accuracy of the rigid body. For this reason, accurate inertia properties need to be obtained for precise control. An estimation process is required for both noisy gyro measurements and the time derivative of the gyro measurements. In this paper, an estimation method is proposed for having reliable estimates of inertia properties. First, the Euler equations of motion are reformulated to obtain a regressor matrix. Next, the extended Kalman filter is adopted to reduce the noise effects in gyro angular velocity measurements. Last, the inertia properties are estimated using linear least squares. To achieve reliable and accurate angular accelerations, a Savitzky-Golay filter based on an even number sampled data is utilized. Numerical examples are presented to demonstrate the performance of the proposed algorithm for the case of a space vehicle. The numerical simulation results show that the proposed algorithm provides accurate inertia property estimates in the presence of noisy measurements.


---

## Body

## 1. Introduction

In rotational dynamics of rigid body, appropriate command torque for attitude control is necessary to achieve target orientations. Accordingly, a full component of inertia matrix which consists of moment of inertia (MOI) and product of inertia (POI) elements needs to be considered. There exist various methods to obtain inertia properties of objects: torsion pendulum method, usage of equipment, computer aided design software, and so forth. These methods, however, provide the inertia property information before the operation. For the operating object, inertia properties can be changed by several reasons: fuel consumption, fuel sloshing, connection with other parts, collision with unexpected object, and so forth. This unknown variation of inertia properties affects the performance of attitude control [1, 2]. Particularly, the inertia properties are extremely important parameters for unmanned vehicles, which operate automatically in an unexpected environment. In short, accurate inertia properties are requisite for performing efficient attitude control.Palimaka and Burlton presented the mass property estimation method using the weighted least squares [3]. Bergmann et al. developed the real time estimation method for asymmetrical satellites [4]. Kutlu et al. presented the estimation algorithm of inertia properties including center of mass using the extended Kalman filter (EKF) [5]. Zhao et al. suggested the estimation method using the discrete Kalman filter for the mated flight control of space vehicles [6]. Conti and Souza presented the estimation result of the inertia properties for the satellite attitude control simulator using the recursive least squares (RLS) [7]. Although these researches include inertia properties and center of masses, POI elements, relatively smaller values than MOI elements, need to be considered to avoid the degradation of control accuracy. Yang et al. introduced a regressor matrix including POI elements and suggested the full inertia estimation algorithm based on the RLS [8]. In the estimation process, the angular accelerations must be used and need to be calculated in general [9]. The angular accelerations are usually obtained by the difference method: forward, backward, and central difference. However, these methods are not valid any further when the noise levels in measurements and the sampling time are not small enough [10]. Kim et al. introduced a Savitzky-Golay filter (SGF) to obtain reliable angular accelerations and firstly applied to estimate MOI for spacecraft [10, 11]. The SGF is a simple smoothing and differentiation filter which can be applied to a set of consecutive, uniformly spaced, odd number sampled data [11]. For the application of MOI properties estimation, Kim et al. suggested the estimation algorithm based on the linear least squares (LLS) [12].In this paper, a combined method is suggested for acquiring full inertia properties. The estimation process consists of the following three steps: noise reduction, calculation of angular acceleration, and inertia estimation. First, the noise in the measurements is filtered using the EKF which has proven to provide the best performance with respect to the noise reduction [1, 13]. Next, the accurate angular acceleration is obtained using the SGF for an even number of sampled data. Last, the full inertia properties are estimated using the LLS based on the suggested regressor matrix in [8]. The performance of the combined method is demonstrated using the design parameters for the one of the Korea Science Technology Satellite, STSAT-3, which has already been developed.


## 2. Combined Method for Inertia Estimation

### 2.1. Inertia Estimation Using Linear Least Squares

The rotational dynamics of a rigid body is described as [14](1)ω˙=I-1τ-ω×Iω,where ω∈R3 is the angular velocity vector of the rigid body, τ∈R3 is the command torque vector, and I∈R3×3 is the inertia matrix of the rigid body. The associated measurement equation is expressed as(2)y=ω+υ,where y∈R3 is the measurement vector and υ∈R3 is the measurement error vector with zero mean and covariance R∈R3×3.Under the assumption that the inertia vectorJ∈R6 is the constant during the integration interval, (1) is expressed as(3)Y=HJ,where(4) Y = τ ∫ τ  d t , H = Ω ˙ + ω × Ω Ω +  ∫ ω × Ω d t , J = I x x I y y I z z I x y I x z I y z T .The matricesΩ and Ω˙ in the matrix H are defined as follows:(5)Ω=ωx00ωyωz00ωy0ωx0ωz00ωz0ωxωy,Ω˙=ω˙x00ω˙yω˙z00ω˙y0ω˙x0ω˙z00ω˙z0ω˙xω˙y.Using the LLS, the estimated inertia vectorJ^ is obtained as(6)J^=HTH-1HTY.As shown in (6), the matrix H is composed with the angular velocities and accelerations ω˙=ω˙xω˙yω˙zT. Therefore, the accurate angular velocities and accelerations lead to the precise estimated inertia vector J^, and they are obtained using the EKF and the SGF, respectively.


### 2.2. Noise Reduction Using Extended Kalman Filter

The angular velocities obtained from the rate gyro sensors include noises caused by various sources, such as the other parts’ vibration and the characteristic of hardware [13]. The EKF is well known as one of the best estimators for the state based on reducing the noise level of measurements [13]. The continuous-discrete EKF is selected to handle the nonlinearity inherent in (1).Equation (1) is transformed into the 1st-order differential equation as(7)ddtx^t=fx^t,τt,t+wt,where x^(t)∈R3 is the state vector and wt∈R3 is the state noise vector with zero mean and covariance Qt∈R3×3. The filtering process using the EKF is listed in Table 1 [15].Table 1
Noise reduction process using the EKF.
Model d X d t d d t x t = f x t , τ t , t + w t, wt~N0,Qt y~k=hxk+υk,  υk~N0,RXX Initialization x ^ t 0 = x ^ 0 P0=Ex~t0x~Tt0Ex~t0x~Tt0XX  Kalman Gain K k = P k - H k T H k P k - H k T + R - 1 Hk≡∂h∂xx^k-∂h∂xx^k-XX  Update State x ^ k + = x ^ k - + K k y ~ k - h x ^ k - Pk+=I3×3-KkHkPk-Pk-XX  Propagation d X d t d d t x ^ t = f x ^ t , τ t , t P˙t=FtPt+PtFTt+Qt Ft≡∂f∂xx^t,τt∂f∂xx^t,τtXXIn Table1, subscript k indicates the discrete time step, superscript (−) indicates the predicted state, superscript (+) indicates the estimated states, F and H are the Jacobian matrices, K is the Kalman gain, P is the covariance matrix, and Q and R are the state noise and the measurement noise covariance matrices, respectively.


### 2.3. Calculation of Angular Acceleration Using Savitzky-Golay Filter

Savitzky and Golay introduced the simplified digital filter, known as the SGF, for the purpose of calculating the smoothing and differentiation data by the LLS. The odd number of data points, which are also consecutive and uniformly spaced, is necessary for the SGF to operate appropriately. In [16], the application of the SGF using an even number of data points was discussed to overcome the limitation of the SGF, which is only applicable to computation using an odd number of data points.Let the index of sampled data range from-n+1 to n. These data are positioned symmetrically about the midpoint of sampled data. Therefore, the basis matrix B is represented by(8)Bi=-n+12i-n+32i⋯n-12iT,0≤i≤p,where n is the index of sampled data, i is the ith basis column vector, and p is the polynomial order for the filtered data. The convolution coefficients for jth-order differentiation are obtained by(9)Cj=j!·BBTB-1j+1,where C is the convolution coefficient vector, j is the order of differentiation, ! is the factorial, and Aj indicates the jth column vector of the matrix A. For example, the 1st-order differentiation data point using a quartic polynomial and the 6 sampled data is given by(10)y˙m=135-5ym-2-3ym-1-ym+ym+1+3ym+2+5ym+3.Table2 represents the 1st differentiation convolution coefficients of quartic polynomial with respect to the sampled data size.Table 2
Convolution coefficients for quartic polynomial.
Number of sampled data 4 6 8 ⋯ 2n - n + 1     2 n - 1 ⋮    ⋰ ⋮ −3   −7 ⋯ −7 −2  −5 −5 ⋯ −5 −1 −3 −3 −3 ⋯ −3 0 −1 −1 −1 ⋯ −1 1 1 1 1 ⋯ 1 2 3 3 3 ⋯ 3 3  5 5 ⋯ 5 4   7 ⋯ 7 ⋮    ⋱ ⋮ n     2 n - 1  Normalization 10 35 84 ⋯ ∑ 1 2 n - 1 k 2


## 2.1. Inertia Estimation Using Linear Least Squares

The rotational dynamics of a rigid body is described as [14](1)ω˙=I-1τ-ω×Iω,where ω∈R3 is the angular velocity vector of the rigid body, τ∈R3 is the command torque vector, and I∈R3×3 is the inertia matrix of the rigid body. The associated measurement equation is expressed as(2)y=ω+υ,where y∈R3 is the measurement vector and υ∈R3 is the measurement error vector with zero mean and covariance R∈R3×3.Under the assumption that the inertia vectorJ∈R6 is the constant during the integration interval, (1) is expressed as(3)Y=HJ,where(4) Y = τ ∫ τ  d t , H = Ω ˙ + ω × Ω Ω +  ∫ ω × Ω d t , J = I x x I y y I z z I x y I x z I y z T .The matricesΩ and Ω˙ in the matrix H are defined as follows:(5)Ω=ωx00ωyωz00ωy0ωx0ωz00ωz0ωxωy,Ω˙=ω˙x00ω˙yω˙z00ω˙y0ω˙x0ω˙z00ω˙z0ω˙xω˙y.Using the LLS, the estimated inertia vectorJ^ is obtained as(6)J^=HTH-1HTY.As shown in (6), the matrix H is composed with the angular velocities and accelerations ω˙=ω˙xω˙yω˙zT. Therefore, the accurate angular velocities and accelerations lead to the precise estimated inertia vector J^, and they are obtained using the EKF and the SGF, respectively.


## 2.2. Noise Reduction Using Extended Kalman Filter

The angular velocities obtained from the rate gyro sensors include noises caused by various sources, such as the other parts’ vibration and the characteristic of hardware [13]. The EKF is well known as one of the best estimators for the state based on reducing the noise level of measurements [13]. The continuous-discrete EKF is selected to handle the nonlinearity inherent in (1).Equation (1) is transformed into the 1st-order differential equation as(7)ddtx^t=fx^t,τt,t+wt,where x^(t)∈R3 is the state vector and wt∈R3 is the state noise vector with zero mean and covariance Qt∈R3×3. The filtering process using the EKF is listed in Table 1 [15].Table 1
Noise reduction process using the EKF.
Model d X d t d d t x t = f x t , τ t , t + w t, wt~N0,Qt y~k=hxk+υk,  υk~N0,RXX Initialization x ^ t 0 = x ^ 0 P0=Ex~t0x~Tt0Ex~t0x~Tt0XX  Kalman Gain K k = P k - H k T H k P k - H k T + R - 1 Hk≡∂h∂xx^k-∂h∂xx^k-XX  Update State x ^ k + = x ^ k - + K k y ~ k - h x ^ k - Pk+=I3×3-KkHkPk-Pk-XX  Propagation d X d t d d t x ^ t = f x ^ t , τ t , t P˙t=FtPt+PtFTt+Qt Ft≡∂f∂xx^t,τt∂f∂xx^t,τtXXIn Table1, subscript k indicates the discrete time step, superscript (−) indicates the predicted state, superscript (+) indicates the estimated states, F and H are the Jacobian matrices, K is the Kalman gain, P is the covariance matrix, and Q and R are the state noise and the measurement noise covariance matrices, respectively.


## 2.3. Calculation of Angular Acceleration Using Savitzky-Golay Filter

Savitzky and Golay introduced the simplified digital filter, known as the SGF, for the purpose of calculating the smoothing and differentiation data by the LLS. The odd number of data points, which are also consecutive and uniformly spaced, is necessary for the SGF to operate appropriately. In [16], the application of the SGF using an even number of data points was discussed to overcome the limitation of the SGF, which is only applicable to computation using an odd number of data points.Let the index of sampled data range from-n+1 to n. These data are positioned symmetrically about the midpoint of sampled data. Therefore, the basis matrix B is represented by(8)Bi=-n+12i-n+32i⋯n-12iT,0≤i≤p,where n is the index of sampled data, i is the ith basis column vector, and p is the polynomial order for the filtered data. The convolution coefficients for jth-order differentiation are obtained by(9)Cj=j!·BBTB-1j+1,where C is the convolution coefficient vector, j is the order of differentiation, ! is the factorial, and Aj indicates the jth column vector of the matrix A. For example, the 1st-order differentiation data point using a quartic polynomial and the 6 sampled data is given by(10)y˙m=135-5ym-2-3ym-1-ym+ym+1+3ym+2+5ym+3.Table2 represents the 1st differentiation convolution coefficients of quartic polynomial with respect to the sampled data size.Table 2
Convolution coefficients for quartic polynomial.
Number of sampled data 4 6 8 ⋯ 2n - n + 1     2 n - 1 ⋮    ⋰ ⋮ −3   −7 ⋯ −7 −2  −5 −5 ⋯ −5 −1 −3 −3 −3 ⋯ −3 0 −1 −1 −1 ⋯ −1 1 1 1 1 ⋯ 1 2 3 3 3 ⋯ 3 3  5 5 ⋯ 5 4   7 ⋯ 7 ⋮    ⋱ ⋮ n     2 n - 1  Normalization 10 35 84 ⋯ ∑ 1 2 n - 1 k 2


## 3. Numerical Result

The simulation parameters are listed in Table3, and STSAT-3 is considered as the simulation model. As shown in Table 4, the inertia estimation process consists of the following three steps. First, noises of measured angular velocities are filtered using the EKF. Next, the angular accelerations are calculated based on the filtered angular velocities using the SGF. Last, the inertia vector is estimated using the LLS and the regressor matrix. Note that the estimation result is obtained every 40 sec. The sampled data size is obtained by the automatic selection method [17]. As shown in Figure 1, 6 sampled data have been provided for the best performance.Table 3
Simulation parameters.
Final time (sec) 600 Covariance matrix 1000 0 0 0 1000 0 0 0 1000  Gyroscope noise level (deg/s) 0.0104  Command torque (Nm) [ 1  1  - 2 ] T × 10 - 3  Initial state (deg/s) [ 0  0  0 ] T  True inertia (kg⋅m2) 14.2 0.0867 0.1357 0.0867 17.3 0.6016 0.1357 0.6016 20.3  Nominal inertia (kg⋅m2) 15.62 0.0954 0.1493 0.0954 19.03 0.6618 0.1493 0.6618 22.33  Sampled data size 6  Polynomial order QuarticTable 4
Inertia estimation process.
Model d X d t d d t ω t = f ω t , τ t , t + w t = I n - 1 τ - ω × I n ω + w t,  wt~N0,Q,  where In∈R3×3: nominal inertia y~k=hωk+υk=ωk+υk,  υk~N0,R Initialization x ^ t 0 = ω ^ 0  P0=Ex~t0x~Tt0x~t0x~Tt0XX  Kalman Gain K k = P k - H k T H k P k - H k T + R - 1 = P k - P k - + R - 1  Hk≡∂h∂xx^k-=I3×3  Update State ω ^ k + = ω ^ k - + K k y ~ k - ω ^ k -  Pk+=I3×3-KkHkPk-=I3×3-KkPk-Pk-XX  Propagation d X d t d d t ω ^ t k = f ω ^ t k , τ t k , t = I n - 1 τ t k - ω ^ k + × I n ω ^ k +, where  ω^tk=ω^k+ P˙tk=FtkPtk+PtkFTtk+Q Ft≡∂f∂xω^tk,τtk∂f∂xω^tk,τtkXX  Calculate angular acceleration d d t ω ^ k + = 1 35 - 5 ω ^ k - 2 + - 3 ω ^ k - 1 + - ω ^ k + + ω ^ k + 1 + + 3 ω ^ k + 2 + + 5 ω ^ k + 3 +  ConstructH matrix and Y vector for the LLS H = Ω ˙ k + + ω ^ k + × Ω k + Ω k + +  ∫ ω ^ k + × Ω k + d t Ω ˙ k + + ω ^ k + × Ω k + Ω k + + ∫ ω ^ k + × Ω k + d t X,  where Ωk+=ω^x+00ω^y+ω^z+00ω^y+0ω^x+0ω^z+00ω^z+0ω^x+ω^y+k,  Ω˙k+=ω^˙x+00ω^˙y+ω^˙z+00ω^˙y+0ω^˙x+0ω^˙z+00ω^˙z+0ω^˙x+ω^˙y+k,  Y=τ∫τdt  Estimate inertia (every 40 sec) J ^ = H T H - 1 H T Y H T H - 1 X X, where  J=[IxxIyyIzzIxyIxzIyz]TFigure 1
Selection of the optimal sampled data size.The filtered angular velocities and 3σ boundaries are shown in Figures 2 and 3, respectively. Figure 4 shows the comparison results of angular acceleration’s error calculated by the backward difference and the SGF. Table 5 shows the numerical result with respect to the decreased value of the calculated angular acceleration’s error. The calculated angular accelerations by the backward difference are expressed as follows:(11)ω˙k=ωk-ωk-1dt.Table 5
Calculated angular acceleration error results.
Properties RMS Errordeg/s2 Difference% Backward difference SGF ω ˙ x 0.0081 0.0058 28.28 ω ˙ y 0.0081 0.0058 28.58 ω ˙ z 0.0081 0.0057 29.13Figure 2
Noise reduction results using the EKF.Figure 3
Angular velocity errors and3σ boundaries.Figure 4
Mean square error comparisons of the calculated angular acceleration.As shown in Figure4 and Table 5, the SGF provides about 28% more accurate angular acceleration than the results using the backward difference. The estimation results are shown in Figure 5 and Table 6, respectively. As shown in Table 6, the error of the estimated inertia vector is within 1.0%. The estimated inertia vector converges on the true inertia vector at about 440 sec.Table 6
Estimation results.
Inertia Truekg⋅m2 Estimatedkg⋅m2 Error% I x x 14.2000 14.1823 0.12 I y y 17.3000 17.2876 0.07 I z z 20.3000 20.2859 0.07 I x y 0.0867 0.0864 0.39 I x z 0.1357 0.1350 0.48 I y z 0.6016 0.6009 0.12Figure 5
Estimation results with respect to number of estimation processes.


## 4. Conclusion

In this paper, a combined methodology is proposed to estimate full inertia properties which are moment and product of inertia elements. The key idea of this research is to utilize the following three methods: the extended Kalman filter (EKF), the Savitzky-Golay filter (SGF), and the regressor matrix. First, the noise in measured angular velocities is reduced using the EKF. Next, the reliable angular acceleration is calculated using the SGF based on an even number of sampled data. Last, the suggested regressor matrix provides the good estimation result of full inertia properties using the linear least squares. The numerical simulation is performed for evaluating the estimation accuracy of the proposed approach. The result shows that the proposed method is able to achieve the improvement of estimation accuracy with respect to full inertia properties and track the true value of full inertia properties well.



---

*Source: 2962671-2016-06-01.xml*