# A Dynamic-Weighted Attenuation Memory Extended Kalman Filter Algorithm and Its Application in the Underwater Positioning

Authors: Bo Guo; Jianye Ma; Cui Wang
Journal: Mathematical Problems in Engineering
 (2021)

---

## Abstract

Extended Kalman filter (EKF) plays an important role in the acoustic signal processing of underwater positioning. However, accumulative errors and model inaccuracies lead to divergence. Then, attenuation memory EKF is created in response to this issue which needs to manually select all or part of the parameters. Thus, a dynamic-weighted attenuation memory EKF is proposed. Firstly, several underwater positioning simulations under different conditions are carried out. Results show, with the change of parameter conditions in positioning, the ideal attenuation coefficient changes between 0.5 and 1, but it is difficult to express it in function formula or statistical form. Secondly, a dynamic selection method of attenuation factor is designed. In the later contrast simulation, the proposed method has improved the positioning performance compared with the existing attenuation memory filter algorithm. Finally, the results of physical model verification experiment show that the dynamic-weighted attenuation memory EKF algorithm not only suppresses divergence better but also avoids the subjectivity of attenuation coefficient selection to a certain extent.


---

## Body

## 1. Introduction

Unmanned or autonomous underwater vehicles are increasingly applied to underwater science data acquisition, such as underwater monitoring, exploration, disaster prevention, and rescue. Underwater acoustic methods play a significant role in the course of the positioning of underwater vehicles [1, 2]. In many underwater acoustic positioning methods, there are inevitably various random errors [3], such as system disturbance, observation error [4], and non-line-of-sight error [5]. Although random errors conform to certain statistical laws in multiple positioning results, it is impossible to predict the size and direction of a single error. In order to reduce errors, digital filtering is an essential part for positioning algorithm. The commonly used filtering algorithms mainly include the least square method [6], Kalman filter [7, 8], GDOP weighting [9, 10], error classification [11], coordinate transformation [12], neural network [13, 14], and other intelligent algorithms such as a genetic algorithm [15, 16]. Among them, the Kalman filter makes noise suppression more effective, and positioning accuracy further improved because it does not impose too strict limits on error forms and its unique data fusion function.However, the classical Kalman filter algorithm has an obvious defect. According to the principle of the Kalman filter algorithm, in the process of the prediction, the final predicted value at any time is jointly determined by the predicted state at the previous time and the present observed value [17, 18]. It will cause cumulative errors, which will be more remarkable when the prediction model is inaccurate or changes. As a result, the positioning error increases rapidly with the increase of prediction time.Therefore, it is necessary to artificially introduce the attenuation coefficient, reduce the restraining effect of old data, the previous predicted state, and increase the influence weight of new data, the present observed value in the forecasting. There are two common methods to settle the value of the attenuation coefficient. The first method is to gain an empirical value according to the actual condition [19, 20], and the other method is to use adaptive formulas to make the attenuation coefficient change in every step of prediction, which mainly consists of two different forms to determine the adaptive attenuation coefficient: one is the functional type [21], and the other is the probability type [22]. By setting a certain adaptive level, the attenuation coefficient is selected under a certain degree of confidence.It is inevitable to select some coefficients artificially, which is subjective to some extent, whether it is to select a constant attenuation coefficient by experience or to select an attenuation coefficient by the function of self-adaptation. However, the method of self-adaptive selection of attenuation coefficient based on probability can only guarantee results at a certain confidence level. It has not discussed the specific selection method of attenuation coefficient. Besides, selecting the confidence level is still subjective. Moreover, if any attenuation coefficient cannot meet the selected confidence level, the positioning algorithm will fail and the stability will decrease.In this paper, it is considered that the absolute value error between the final predicted value and the observed value should be taken as a direct evaluation index in the selection of attenuation coefficients, especially when the prediction model is inaccurate or changes, which indicates that certain control invasions are applied so that more state parameters are variables. The smaller the error, the more reasonable the coefficient selection. Based on this, a dynamic-weighted attenuation memory filtering algorithm is designed, which traverses all possible values of attenuation coefficient in a certain range and selects the optimal attenuation coefficient by comparing the absolute value of the error illustrated before. This type of selection of the attenuation coefficient can be used more effectively when the prediction model is inaccurate or in flux.


## 2. Algorithm Description

### 2.1. Underwater Acoustic Positioning Algorithm

The lecture [23] provides the elementary principles of several underwater acoustic algorithms. Firstly, the basic principle of the Time of Arrival (TOA) underwater acoustic positioning algorithm is as follows. According to Figure 1, the time between anchor nodes Ai and the positioning target P should be synchronized. The positioning target, as a signal source, sends a synchronous signal to each anchor node A1, A2, and A3. The anchor nodes record the length of time the signal arrives and calculate the distance between the positioning target and itself, respectively, by(1)ri=c×Δtii=1,2,3,where c denotes the signal propagation speed,Δt represents the duration of signal’s arrival, and ri denotes the distance.Figure 1
Schematic diagram of the underwater acoustic positioning algorithm.As shown in Figure1, the coordinates of A1, A2, and A3 are (x1, y1), (x2, y2), and (x3, y3), respectively. The coordinate of P is set to (x, y). According to the geometric relationship, the position coordinate of m can be calculated by(2)r12=x−x12+y−y12,r22=x−x22+y−y22,r32=x−x32+y−y32.Secondly, the basic principle of the Time Difference of Arrival (TDOA) underwater acoustic positioning algorithm is as follows. It needs to ensure that the time synchronization of each anchor node is only compared to the TOA. The target sends a signal to the measurement node. After selecting a reference anchor point, the time difference between the signal arriving at the other two anchor nodes and the reference anchor node is, respectively, recorded. According to the signal propagation speed, the distance difference can be obtained. Then, calculate the position of the target by using a geometric relationship expressed in(3)x−x12+y−y12−x−x22+y−y22=r1−r2,x−x32+y−y32−x−x22+y−y22=r3−r2.We used the TOA-TDOA fusion positioning algorithm refined by EKF to carry out the following various experiments.


### 2.2. Extend Kalman Filter Algorithm

Based on the state transition relationship, the Kalman filter [7] combines various environmental observations to correct the predicted value so that it is closer to the real value. According to the state of the previous state and the state transition matrix, it predicts the state at the present state preliminarily. The preliminary prediction does not depend on any external observations, but only on the previous state and state transition matrix. As a result, it does not solve the noise of the prediction model and the state transition. Using various environmental observations can weaken the influence of noise to a certain extent. The role and weight of the observation value in the prediction process need to be determined by an important coefficient: the Kalman coefficient. The equations involved are as follows.(i)
Preliminary prediction of state:(4)X∧t¯=FtX∧t−1+Btut,whereFt denotes the state transition matrix, Bt represents the control matrix, and ut stands for the control variable.(ii)
Noise prediction of state:(5)P∧t¯=FtPt−1FtT+Q,whereP^t¯ denotes the preliminary prediction of state transition noise at the time t, Pt−1 represents the prediction of state transition noise at the time t-1, and Q stands for the noise of the model itself.(iii)
Dimension transformation of observation:(6)Zt=HXt+R,whereZt denotes the observation matrix at time t, H stands for the dimension transformation matrix, and R represents the covariance matrix of observation noise.(iv)
Filter correction of state:(7)X∧t=X∧t¯+KtZt−HX∧t¯,whereKt denotes the Kalman coefficient. The calculation formula is as follows:(8)Kt=Pt¯HTHPt−HT+R−1.(v)
Filtering correction of noise:(9)Pt=I−KtHPt¯.In the application of the Kalman filter algorithm, there may be nonlinear systems whose state transition equation or observation equation is not linear. For a nonlinear system, it is impossible to express the observation matrix and the state transition matrix directly in the matrix form. The EKF algorithm can solve its application in nonlinear systems [23]. The essence of the EKF is to expand the nonlinear expression by the Taylor formula, discard the quadratic term and other higher-order terms, and keep only the primary term. Clearly, EKF is an estimated treatment in the nonlinear treatment, which cannot be completely equal to nonlinear problems. When the observation system or state transition system cannot be represented by a matrix, it needs to be replaced by the Jacobian determinant. The process of calculating the Jacobian determinant is the process of expanding nonlinear function by Taylor formula and abandoning quadratic term and higher-order term.


### 2.3. Attenuation Memory Extended Kalman Filter Algorithm

As stated in the introduction, it can be easily seen from formula (10) that, with the increase of the prediction step, the old data will restrain the prediction results more than the new data. Because of that, the update function of the new data to the predicted value is weakened to some extent:(10)X^t=X^0¯+K0Z0−HX^0¯+K1Z1−HX^1¯+,...,+KtZt−HX^t¯,where X^i is the state prediction matrix at the time i, Ki denotes the Kalman coefficient at the time i, and Zi stands for the observation matrix at the time i.In this case, if a certain control invasion is applied so that more state parameters are variables, the correction effect of new data in the prediction is even more important. Therefore, it is necessary to artificially introduce the attenuation coefficientα, to reduce the restraining effect of old data and increase the influence weight of new data in the forecasting. The specific implementation method is improved based on(11)P^t¯=FPt−1FTα+Q.As stated in the introduction, the empirical value and the adaptive value are two kinds of the attenuation coefficient. There are two different forms to determine the adaptive attenuation coefficient: one is the functional type [21], such as the exponential function shown in formula (12), and the other is the probability type [22] shown in formula (13). By setting a certain adaptive level, the attenuation coefficient is selected under a certain degree of confidence:(12)α=1−bk1−b0<b<1,where α represents the attenuation coefficient, b is an empirical coefficient, and k denotes the prediction step number.(13)Pχm2k>χα2=∫kmx2dχ2=α,where α stands for the adaptive level, χm2k denotes the variable with m chi-square variables, m represents the observation dimension, and km denotes the probability density of χm2.It is inevitable to select some coefficients artificially, which is subjective to some extent, whether it is to select a constant attenuation coefficient by experience or to select an attenuation coefficient by the function of self-adaptation. And, the method of self-adaptive selection of attenuation coefficient based on probability can only guarantee results at a certain confidence level. However, it has not discussed the specific selection method of attenuation coefficient. Besides, selecting the confidence level is still subjective. Moreover, if any attenuation coefficient cannot meet the selected confidence level, the positioning algorithm will fail and the stability will decrease.Since then, through simulation results which will be elaborated in Section3, the ideal attenuation coefficient will change under different experimental conditions, but it is difficult to get an exact functional expression or statistical form. This paper designs an attenuation memory filtering algorithm that traverses all possible values of the attenuation coefficient in a certain range and selects the best value among them. The basic idea is to traverse all possible values of attenuation coefficient in the interval 0.5–1 with certain step size, and the optimal attenuation factor is selected by comparing the residual values of each prediction step. This type of selection of the attenuation coefficient can be used more effectively when the prediction model is inaccurate or in flux, which will be verified in subsequent experiments. The pseudocode of the proposed algorithm is as follows, whose format is consistent with that specified in [24].Pseudocode for optimal attenuation coefficient selection:(1)
Function Select the optimal attenuation coefficient (F, Q, R, H, Zt, X^t¯)(2)
forα−1 ⟵ 1 to 2(3)
doP^t¯=FPt−1FT×α−1+Q(4)
Kt=Pt−HTHPt¯HT+R−1(5)
X^t=X^t¯+KtZt−HX^t¯(6)
error=H−Zt−X^t2(7)
While error < known error//The initial value of the known error is infinity(8)
known error←error(9)
x←predicted value(10)
End While(11)
End(12)
Return x(13)
End Fac


## 2.1. Underwater Acoustic Positioning Algorithm

The lecture [23] provides the elementary principles of several underwater acoustic algorithms. Firstly, the basic principle of the Time of Arrival (TOA) underwater acoustic positioning algorithm is as follows. According to Figure 1, the time between anchor nodes Ai and the positioning target P should be synchronized. The positioning target, as a signal source, sends a synchronous signal to each anchor node A1, A2, and A3. The anchor nodes record the length of time the signal arrives and calculate the distance between the positioning target and itself, respectively, by(1)ri=c×Δtii=1,2,3,where c denotes the signal propagation speed,Δt represents the duration of signal’s arrival, and ri denotes the distance.Figure 1
Schematic diagram of the underwater acoustic positioning algorithm.As shown in Figure1, the coordinates of A1, A2, and A3 are (x1, y1), (x2, y2), and (x3, y3), respectively. The coordinate of P is set to (x, y). According to the geometric relationship, the position coordinate of m can be calculated by(2)r12=x−x12+y−y12,r22=x−x22+y−y22,r32=x−x32+y−y32.Secondly, the basic principle of the Time Difference of Arrival (TDOA) underwater acoustic positioning algorithm is as follows. It needs to ensure that the time synchronization of each anchor node is only compared to the TOA. The target sends a signal to the measurement node. After selecting a reference anchor point, the time difference between the signal arriving at the other two anchor nodes and the reference anchor node is, respectively, recorded. According to the signal propagation speed, the distance difference can be obtained. Then, calculate the position of the target by using a geometric relationship expressed in(3)x−x12+y−y12−x−x22+y−y22=r1−r2,x−x32+y−y32−x−x22+y−y22=r3−r2.We used the TOA-TDOA fusion positioning algorithm refined by EKF to carry out the following various experiments.


## 2.2. Extend Kalman Filter Algorithm

Based on the state transition relationship, the Kalman filter [7] combines various environmental observations to correct the predicted value so that it is closer to the real value. According to the state of the previous state and the state transition matrix, it predicts the state at the present state preliminarily. The preliminary prediction does not depend on any external observations, but only on the previous state and state transition matrix. As a result, it does not solve the noise of the prediction model and the state transition. Using various environmental observations can weaken the influence of noise to a certain extent. The role and weight of the observation value in the prediction process need to be determined by an important coefficient: the Kalman coefficient. The equations involved are as follows.(i)
Preliminary prediction of state:(4)X∧t¯=FtX∧t−1+Btut,whereFt denotes the state transition matrix, Bt represents the control matrix, and ut stands for the control variable.(ii)
Noise prediction of state:(5)P∧t¯=FtPt−1FtT+Q,whereP^t¯ denotes the preliminary prediction of state transition noise at the time t, Pt−1 represents the prediction of state transition noise at the time t-1, and Q stands for the noise of the model itself.(iii)
Dimension transformation of observation:(6)Zt=HXt+R,whereZt denotes the observation matrix at time t, H stands for the dimension transformation matrix, and R represents the covariance matrix of observation noise.(iv)
Filter correction of state:(7)X∧t=X∧t¯+KtZt−HX∧t¯,whereKt denotes the Kalman coefficient. The calculation formula is as follows:(8)Kt=Pt¯HTHPt−HT+R−1.(v)
Filtering correction of noise:(9)Pt=I−KtHPt¯.In the application of the Kalman filter algorithm, there may be nonlinear systems whose state transition equation or observation equation is not linear. For a nonlinear system, it is impossible to express the observation matrix and the state transition matrix directly in the matrix form. The EKF algorithm can solve its application in nonlinear systems [23]. The essence of the EKF is to expand the nonlinear expression by the Taylor formula, discard the quadratic term and other higher-order terms, and keep only the primary term. Clearly, EKF is an estimated treatment in the nonlinear treatment, which cannot be completely equal to nonlinear problems. When the observation system or state transition system cannot be represented by a matrix, it needs to be replaced by the Jacobian determinant. The process of calculating the Jacobian determinant is the process of expanding nonlinear function by Taylor formula and abandoning quadratic term and higher-order term.


## 2.3. Attenuation Memory Extended Kalman Filter Algorithm

As stated in the introduction, it can be easily seen from formula (10) that, with the increase of the prediction step, the old data will restrain the prediction results more than the new data. Because of that, the update function of the new data to the predicted value is weakened to some extent:(10)X^t=X^0¯+K0Z0−HX^0¯+K1Z1−HX^1¯+,...,+KtZt−HX^t¯,where X^i is the state prediction matrix at the time i, Ki denotes the Kalman coefficient at the time i, and Zi stands for the observation matrix at the time i.In this case, if a certain control invasion is applied so that more state parameters are variables, the correction effect of new data in the prediction is even more important. Therefore, it is necessary to artificially introduce the attenuation coefficientα, to reduce the restraining effect of old data and increase the influence weight of new data in the forecasting. The specific implementation method is improved based on(11)P^t¯=FPt−1FTα+Q.As stated in the introduction, the empirical value and the adaptive value are two kinds of the attenuation coefficient. There are two different forms to determine the adaptive attenuation coefficient: one is the functional type [21], such as the exponential function shown in formula (12), and the other is the probability type [22] shown in formula (13). By setting a certain adaptive level, the attenuation coefficient is selected under a certain degree of confidence:(12)α=1−bk1−b0<b<1,where α represents the attenuation coefficient, b is an empirical coefficient, and k denotes the prediction step number.(13)Pχm2k>χα2=∫kmx2dχ2=α,where α stands for the adaptive level, χm2k denotes the variable with m chi-square variables, m represents the observation dimension, and km denotes the probability density of χm2.It is inevitable to select some coefficients artificially, which is subjective to some extent, whether it is to select a constant attenuation coefficient by experience or to select an attenuation coefficient by the function of self-adaptation. And, the method of self-adaptive selection of attenuation coefficient based on probability can only guarantee results at a certain confidence level. However, it has not discussed the specific selection method of attenuation coefficient. Besides, selecting the confidence level is still subjective. Moreover, if any attenuation coefficient cannot meet the selected confidence level, the positioning algorithm will fail and the stability will decrease.Since then, through simulation results which will be elaborated in Section3, the ideal attenuation coefficient will change under different experimental conditions, but it is difficult to get an exact functional expression or statistical form. This paper designs an attenuation memory filtering algorithm that traverses all possible values of the attenuation coefficient in a certain range and selects the best value among them. The basic idea is to traverse all possible values of attenuation coefficient in the interval 0.5–1 with certain step size, and the optimal attenuation factor is selected by comparing the residual values of each prediction step. This type of selection of the attenuation coefficient can be used more effectively when the prediction model is inaccurate or in flux, which will be verified in subsequent experiments. The pseudocode of the proposed algorithm is as follows, whose format is consistent with that specified in [24].Pseudocode for optimal attenuation coefficient selection:(1)
Function Select the optimal attenuation coefficient (F, Q, R, H, Zt, X^t¯)(2)
forα−1 ⟵ 1 to 2(3)
doP^t¯=FPt−1FT×α−1+Q(4)
Kt=Pt−HTHPt¯HT+R−1(5)
X^t=X^t¯+KtZt−HX^t¯(6)
error=H−Zt−X^t2(7)
While error < known error//The initial value of the known error is infinity(8)
known error←error(9)
x←predicted value(10)
End While(11)
End(12)
Return x(13)
End Fac


## 3. Simulational Results and Analysis

As shown in Figure2, the simulation was carried out by the computer (CPU: i7-7500U 2.9 GHz, Memory:8 G), and three observation nodes A1, A2, and A3 were arranged on the X-axis along a straight line with an interval of 50 m. The initial position of the positioning target P was set at (20 m, 20 m). All kinds of errors involved in the system were random values that subjected to normal distribution, and the standard deviation of observation errors was 0.2 m. The standard deviation of the noise of the prediction model itself was 0.1 m.Figure 2
Schematic diagram of the simulation.To improve the maneuverability of the positioning target, the acceleration inX and Y directions was added, which makes the speed and position change. In addition to the basic simulation model size, the parameters that can be set artificially include acceleration, prediction time, and system noise. In the practical application of the algorithm, the basic variables involved are nothing more than these four kinds.The forecast time varied from 30 s to 230 s and the acceleration varied from 1 m/s2 to 21 m/s2. The reciprocals of the attenuation coefficient varied from 0.4 to 1. The random noise involved in the system obeyed Gaussian distribution. The standard deviation of predicted noise ranged from 0.01 m to 0.11 m, and the standard deviation of observed noise ranged from 0.02 m to 0.2 m. The ideal attenuation coefficients under different parameters were calculated through simulations. Results were shown in Table 1.Table 1
Experiment data sheet of partial optimal attenuation coefficient.
Prediction errorObservation errorForecast durationAccelerationIdeal attenuation coefficient−10.010.023011.010.010.0830151.570.010.0830171.810.030.187051.160.030.187071.050.030.023011.410.030.023032.090.050.23091.450.050.230111.660.050.27031.040.050.27051.090.070.12170131.020.070.12170151.010.090.1815031.060.090.1815051.03From the simulation results, it is found that the ideal attenuation coefficient will change under different parameter conditions and different predictions. And, it is stable between 0.5 and 1, although a few results reach 2.1 or even higher, and the higher value will cause the oscillation of data filtering, which will be proved in the later simulation.To explore the relationship between the ideal attenuation coefficient and the variables involved, canonical correlation analysis, function fitting, and single sample nonparametric experiments were carried out in this paper. The results of various inspection and analysis are as follows.Canonical correlation analysis is carried out on the above experiment data, and the results are as follows.In Table2, the value of two-tailed significant differences between the ideal attenuation coefficient and the forecast duration and the acceleration were both less than 0.001, which indicated that the difference was significant. On the contrary, the other two values of two-tailed significant differences were 0.974 and 0.895, respectively, which were both larger than 0.005 and indicates that its change has nothing to do with these two variables.Table 2
Two-tailed significant difference table of canonical correlation analysis of attenuation coefficients.
Standard deviation of prediction error (m)Standard deviation of observation error (m)Forecast duration (min)Acceleration (m/s2)Ideal attenuation coefficient−1Standard deviation of prediction error (m)—<0.0010.3950.9320.974Standard deviation of observation error (m)<0.001—0.4590.9410.895Forecast duration (min)0.3950.459—0.971<0.001Acceleration (m/s2)0.9320.9410.971—<0.001Ideal attenuation coefficient−10.9740.89500—Similar results could be drawn out from Table3 which contained the Pearson correlation coefficients, the correlation coefficients between the ideal attenuation coefficient and the forecast duration, and the acceleration −0.524 and 0.1, which were higher than the other two—0.001 and 0.002, though they were both lower 0.7— the limitation that proves that there is a strong correlation between two variables.Table 3
Pearson correlation coefficient table of canonical correlation analysis of attenuation coefficients.
Standard deviation of prediction error (m)Standard deviation of observation error (m)Forecast duration (min)Acceleration (m/s2)Ideal attenuation coefficient−1Standard deviation of prediction error (m)1−0.06−0.011−0.001<0.001Standard deviation of observation error (m)−0.061−0.01−0.0010.002Forecast duration (min)−0.011−0.0110−0.524Acceleration (m/s2)−0.001−0.01010.1Ideal attenuation coefficient−100.002−0.5240.11To explore whether the ideal attenuation coefficient can be expressed by the above two variables and whether there is an exact functional relationship, the experimental data were fitted by various functions, and the significance was shown in Table4:Table 4
R2 table of single independent variable curve fitting.
Forecast durationAccelerationLinear0.2750.010.4430.004Logarithmic0.610.0010.4970.013Inverse0.6250.0130.4690.003Secondary0.2980.0080.2980.008Three times0.631<0.001In Table4, the goodness of fitting, R2, was small, indicated the maximum of them was 0.008 which were much less than 1, and the fitting effect cannot meet the requirements. It showed that it is difficult to express the ideal attenuation coefficient with an exact functional expression. And, its significant two-tailed asymptotic characterization values are all less than 0.05, which shows that it is also difficult to express it in statistical form.Besides, Figure3 denotes the distribution of the ideal attenuation coefficient when the forecast duration and acceleration were taken by independent variables, which showed less irregularity and dispersion. It accorded with the results of the multivariate function fitting, and the goodness of fitting is 0.2846 which is much less than 1. Figure 4 denotes the result of multivariate function fitting, it was difficult to find a binary function image that contains most of the scattered points, and it was difficult to express the ideal attenuation coefficient in a binary function expression.Figure 3
Distribution of the ideal attenuation coefficient.Figure 4
Multivariate function fitting result.Since then, this paper preliminarily concludes that the ideal attenuation coefficient will change under different experimental conditions, but it is difficult to get an exact functional expression or statistical form. Given the above analysis, this paper designs an attenuation memory filtering algorithm that traverses all possible values of the attenuation coefficient in a certain range and selects the best value among them. The basic idea is to traverse all possible values of attenuation coefficient in the interval 0.5–1 with certain step size, and the optimal attenuation factor is selected by comparing the residual values of each prediction step.


## 4. Comparison and Discussion

To verify the filtering performance of the dynamic weighted attenuation memory filtering algorithm. Under the same parameter conditions, we conducted the comparison simulations between it and the filtering algorithm with a fixed value selection attenuation memory coefficient. The specific stimulation parameters are set as follows.The noise involved in the experiment obeys Gaussian distribution, the standard deviation of observation noise is 0.1 m, and the model noise is 0.2 m. To ensure high maneuverability, the initial acceleration is set to 200 m/s2, and the TOA and TDOA fusion positioning algorithm based on EKF is still taken as an example, and 100 s is calculated continuously. The residual error and the maximum divergence value of the positioning process are recorded, respectively.From the positioning result diagram in Figure5, the actual state curve in Figure 5(b) was consistent with the predicted state curve, but there were significant differences between the true state curve and the predicted state curve in Figure 5(a). The root means square error (RMSE) of the classical EKF is 1767664.099 m which is higher than the dynamic weighted attenuation memory EKF’s, 184234.382 m. It showed that the dynamic weighted attenuation memory filtering algorithm involved in this paper was superior to the classical EKF in positioning accuracy.Figure 5
Comparison of positioning simulation results: (a) classical EKF and (b) dynamic-weighted attenuation memory EKF.
(a)(b)From Table5, the maximum divergence value using the proposed method, which was 2198.10 m, was smaller than other types. This result preliminarily confirms that the algorithm designed in this article can better suppress divergence to a certain extent than classic attenuation memory algorithms.Table 5
Maximum divergence value of different attenuation coefficient selection methods.
Selection method of the attenuation coefficientMaximum divergence value (m)Selection method of the attenuation coefficientMaximum divergence value (m)This article method2198.10Fixed value 0.712136.00Fixed value 1.0043541.00Fixed value 0.67562.80Fixed value 0.9165780.00Fixed value 0.54054.00Fixed value 0.8149320.00Fixed value 0.43759.60Although according to Table5, the maximum divergence value decreased with the decrease of fixed attenuation coefficient and artificial trial calculation and experiments are subjective. And, attenuation coefficient which is too small will lead to the oscillation and divergence of filtering when the prediction time is long. For example, the prediction time in the experimental parameters is increased from the 30 s to 200 s, and the attenuation coefficient is set to 0.33. As shown in Figure 6, the filtering algorithm had a divergence phenomenon, which indicated that the residual showed an upward trend in the forecasting process and the rising speed was accelerating.Figure 6
Positioning result.In the practical application of the filtering algorithm, taking underwater positioning as an example, various related parameters are unknown and changing, such as prediction time, motion state, and environmental variables. The adaptability of the filtering algorithm, which selects attenuation coefficients according to empirical values, will be greatly reduced in this unknown and changing environment.Although the selection method of adaptive function weighting changes the attenuation coefficient according to a certain rule in every step of the prediction process, the experimental data indicate that it is difficult to express the attenuation coefficient in the functional form or statistical form. Besides, this kind of method still needs to set some parameters and adaptive form artificially.The proposed method not only reduces the subjectivity of parameter selection but also limits its maximum value according to the actual condition and needs. It can restrain the oscillation and divergence of data filtering to a certain extent.


## 5. Physical Model Verification

To verify the reliability of the simulation results, the physical model is established, and the verification experiment is carried out.


### 5.1. Experimental System

As shown in Figure7, the experiment device is mainly composed of an unmanned ship, a target node (drag body) towed by the unmanned ship, a simulated dam, and measurement nodes (hydrophones) arranged along the simulated dam. The relative position of the measurement node relative to the simulated dam was known. Through the acoustic signal interaction between the target node and the measurement node, the relative position coordinates of the target node during the detection process were determined.Figure 7
Experiment device: (a) front view and (b) side view.
(a)(b)The unmanned ship carrier used the Stm32 microcontroller to control the movement of the hull. The target node was mounted on the hull and is towed by the hull. The ultrasonic sensor on it transmitted acoustic signals to interact with the acoustic waves to obtain the original data required for positioning. The attenuation memory EKF positioning algorithm processed the original data to obtain the final position data. The classic attenuation memory filtering positioning algorithm and the dynamic-weighted attenuation designed in this paper were used, respectively.


### 5.2. Experimental Verification

Since the real positioning data of the target was not able to be obtained during the entire verification experiment, this paper adopted the residual by comparing the predicted state and the default state to compare the positioning performance of various algorithms. If the motion state reflected by the positioning data is in better agreement with the default motion state, the algorithm application performance is better.The experiment was carried out in the transparent water tank (length: 150 cm, width: 100 cm, and depth: 50 cm), as shown in Figure8. Establish three coordinate axes along the bottom edge of the simulated dam and the two boundary lines of the water tank. The measurement nodes were arranged in a straight line along the bottom edge of the simulated dam. The target node starts from the origin o, and the unmanned ship was controlled to drag the target node. The unmanned ship was controlled artificially so that the target node towed by it is at a constant depth, and the initial velocity was 0.25 m/s. To simulate the change of exercise state, the acceleration was 0 m/s2 initially, which was increased to 1 m/s2, starting from the 50 s, and the movement direction is the direction of the bisector of the x-axis and y-axis angle. Compare it with the movement state reflected by the positioning data processed by different attenuation memory filtering positioning algorithms to analyze the actual performance of different algorithms. Three different weighting methods were involved: the classical EKF, selecting the attenuation factor with the fixed value,0.813, which is the optimal attenuation factor [25], and the dynamic weighted EKF.Figure 8
Schematic diagram of the experiment area.


### 5.3. Experimental Results

The experimental results are recorded every second. Partial positioning residuals of the experiment were listed in Table6. To be more specific, the sum of the RMSE processed by the dynamic-weighted attenuation memory EKF designed in this paper was 1.217 cm, which was lower than classical EKF’s, 38.574 cm, and fixed value-weighted attenuation memory EKF’s, 2.051 cm. To more intuitively see the difference between the positioning performance of the two algorithms, the positioning data results were shown in Figure 9.Table 6
Partial positioning residuals of the experiment.
Classical EKF (cm)Fixed value-weighted EKF (cm)Dynamic-weighted EKF (cm)0.003750.007370.016690.007490.007810.010380.007680.012440.017040.007630.008090.017930.004810.00960.020780.013710.01120.013510.010610.00870.023330.012160.003080.02480.009990.005970.005060.005090.003680.004960.009970.009750.835020.010240.198440.6360.008840.240690.266290.009570.207410.571150.00460.205370.918970.009190.235180.439990.007120.271870.69050.011010.220110.742790.010170.005130.363830.003150.009520.422250.009210.008960.386020.010960.004080.453030.009940.004850.553210.010280.007690.143010.011040.008570.512760.002570.002210.495550.00820.003450.348450.007910.006510.178730.005490.012130.320540.003110.005230.32268Figure 9
Positioning result map.As shown in Figure9, there was a significant increase from the 50 s which was the moment when acceleration was increased to 1 m/s2 in the data scatters of the classical EKF and the fixed value-weighted EKF, but not found in the dynamic weighted EKFs. In the underwater positioning verification experiment, the data could be processed better with it.


## 5.1. Experimental System

As shown in Figure7, the experiment device is mainly composed of an unmanned ship, a target node (drag body) towed by the unmanned ship, a simulated dam, and measurement nodes (hydrophones) arranged along the simulated dam. The relative position of the measurement node relative to the simulated dam was known. Through the acoustic signal interaction between the target node and the measurement node, the relative position coordinates of the target node during the detection process were determined.Figure 7
Experiment device: (a) front view and (b) side view.
(a)(b)The unmanned ship carrier used the Stm32 microcontroller to control the movement of the hull. The target node was mounted on the hull and is towed by the hull. The ultrasonic sensor on it transmitted acoustic signals to interact with the acoustic waves to obtain the original data required for positioning. The attenuation memory EKF positioning algorithm processed the original data to obtain the final position data. The classic attenuation memory filtering positioning algorithm and the dynamic-weighted attenuation designed in this paper were used, respectively.


## 5.2. Experimental Verification

Since the real positioning data of the target was not able to be obtained during the entire verification experiment, this paper adopted the residual by comparing the predicted state and the default state to compare the positioning performance of various algorithms. If the motion state reflected by the positioning data is in better agreement with the default motion state, the algorithm application performance is better.The experiment was carried out in the transparent water tank (length: 150 cm, width: 100 cm, and depth: 50 cm), as shown in Figure8. Establish three coordinate axes along the bottom edge of the simulated dam and the two boundary lines of the water tank. The measurement nodes were arranged in a straight line along the bottom edge of the simulated dam. The target node starts from the origin o, and the unmanned ship was controlled to drag the target node. The unmanned ship was controlled artificially so that the target node towed by it is at a constant depth, and the initial velocity was 0.25 m/s. To simulate the change of exercise state, the acceleration was 0 m/s2 initially, which was increased to 1 m/s2, starting from the 50 s, and the movement direction is the direction of the bisector of the x-axis and y-axis angle. Compare it with the movement state reflected by the positioning data processed by different attenuation memory filtering positioning algorithms to analyze the actual performance of different algorithms. Three different weighting methods were involved: the classical EKF, selecting the attenuation factor with the fixed value,0.813, which is the optimal attenuation factor [25], and the dynamic weighted EKF.Figure 8
Schematic diagram of the experiment area.


## 5.3. Experimental Results

The experimental results are recorded every second. Partial positioning residuals of the experiment were listed in Table6. To be more specific, the sum of the RMSE processed by the dynamic-weighted attenuation memory EKF designed in this paper was 1.217 cm, which was lower than classical EKF’s, 38.574 cm, and fixed value-weighted attenuation memory EKF’s, 2.051 cm. To more intuitively see the difference between the positioning performance of the two algorithms, the positioning data results were shown in Figure 9.Table 6
Partial positioning residuals of the experiment.
Classical EKF (cm)Fixed value-weighted EKF (cm)Dynamic-weighted EKF (cm)0.003750.007370.016690.007490.007810.010380.007680.012440.017040.007630.008090.017930.004810.00960.020780.013710.01120.013510.010610.00870.023330.012160.003080.02480.009990.005970.005060.005090.003680.004960.009970.009750.835020.010240.198440.6360.008840.240690.266290.009570.207410.571150.00460.205370.918970.009190.235180.439990.007120.271870.69050.011010.220110.742790.010170.005130.363830.003150.009520.422250.009210.008960.386020.010960.004080.453030.009940.004850.553210.010280.007690.143010.011040.008570.512760.002570.002210.495550.00820.003450.348450.007910.006510.178730.005490.012130.320540.003110.005230.32268Figure 9
Positioning result map.As shown in Figure9, there was a significant increase from the 50 s which was the moment when acceleration was increased to 1 m/s2 in the data scatters of the classical EKF and the fixed value-weighted EKF, but not found in the dynamic weighted EKFs. In the underwater positioning verification experiment, the data could be processed better with it.


## 6. Conclusion

During the application of the EKF, the attenuation memory factor’s selection method plays an important role in effectively suppressing errors caused by the changing and inaccurate models and the accumulative errors. This paper selects four variables, prediction error, observation error, forecast duration, and acceleration, and conducts a large number of simulations to explore the change law of the ideal attenuation coefficient. The experiment results showed that the reciprocal value of the ideal attenuation coefficient will change between 0.5 and 1 under different parameter conditions, but it is difficult to get an exact functional expression or statistical form. Accordingly, a dynamic-weighted attenuation memory EKF algorithm is designed and compared with the classic algorithm.The attenuation coefficient selection method proposed uses positioning residual between the predicted value and the observed value as a direct comparison index, which can avoid the subjectivity of classic algorithms in the selection of attenuation factors to a certain extent. This type of selection of the attenuation coefficient can be used more effectively when the prediction model is inaccurate or in flux. And, in the underwater acoustic positioning simulation, the attenuation factor selection method proposed showed better accuracy and smaller divergence than the classic selection method. The results of the simulation were further confirmed in the subsequent physical model verification experiment. The dynamic-weighted attenuation memory EKF algorithm not only improves the performance of accuracy and suppression of divergence but also avoids the subjectivity of attenuation coefficient selection to a certain extent.



---

*Source: 3625362-2021-02-26.xml*