# An Improved Multisensor Self-Adaptive Weighted Fusion Algorithm Based on Discrete Kalman Filtering

Authors: Shifen Shao; Kaisheng Zhang
Journal: Complexity
 (2020)

---

## Abstract

When the multisensor self-adaptive weighted fusion algorithm fuses the data sources that were severely interfered by noise, its fusion precision, data smoothness, and algorithm stability will be reduced. To overcome this drawback, the idea was proposed with respect to an improved algorithm which optimized acquisition of fusion data sources with discrete Kalman filtering technique, thus reducing the negative impact on the fusion performance from noise. To verify the effectiveness of the improved algorithm, this paper simulated the fusion process of soil moisture data with fusion samples. The result proved that, under the same circumstance, the improved algorithm has a stronger restrain ability to noise and a better performance in fusion precision, data smoothness, and algorithm stability compared with the general algorithm.


---

## Body

## 1. Introduction

Multisensor adaptive weight fusion algorithm (or simply as adaptive weight fusion algorithm) is widely used in various measurement occasions as a commonly used data fusion algorithm. Taking obtaining data of various soil moisture from the intelligent water-saving irrigation system as an example [1], the adaptive algorithm [2–12] fused the measuring data (such as humidity and temperature) of several same kinds of sensors [13, 14] to reduce data ambiguity of the individual sensor and improve the confidence level of data. However, the measurement data of the sensor were polluted due to harsh working conditions in the field which caused the affected fusion precision and data smoothness of the conventional adaptive weight fusion algorithm to a certain extent. Aiming at this problem, the paper improves the adaptive weight data fusion algorithm based on discrete Kalman filtering. It was developed by the American Kalman in 1960. It was originally used only for the linear system; after many years, people designed new Kalman filtering theory for the nonlinear system. As the development of the artificial neural network, intelligent algorithm, and information technology, people began to combine to use them. It is a recursive linear minimum variance estimation method, and it can process the measured values which are only related to some states, so as to obtain the state estimation with the least estimation error [15–17]. As shown in Figure 1, the improved algorithm [17] runs on the host computer system and fuses the raw measurement data (including noise) [18–25] which are sent to the host computer through the ZigBee wireless sensor [26–33] network (ZigBee WSN). The fused data are used as the decision of the irrigation control. Based on this, the irrigation actuator is then driven to perform irrigation operations. The computer simulation result shows that the improved adaptive weight fusion algorithm not only inherits the advantages of all preimproved algorithms but also has stronger noise suppression ability, higher data smoothness, and higher fusion precision than the preimproved algorithm.Figure 1
Schematic diagram of the intelligent irrigation system.


## 2. Discrete Kalman Filtering Algorithm

### 2.1. Principle of Discrete Kalman Filtering

The soil moisture data [34–38] are converted into digital quantity represented by binary code after D/A conversion and packaged in a ZigBee data frame, and then the data frame is transmitted to the host computer through the ZigBee WSN. Due to the limitation of switching frequency and data transmission mode for the D/A converter, it is destined that sampling will only be performed in a series of discrete moments. Therefore, the process of collecting soil moisture data can be abstracted into a discrete process as described in the following:(1)xk=Φxk−1+wk−1zk=Hxk+vk,where the first equation is the state equation of the data acquisition system, xk is the system state at time k, and Φ is the system state transition matrix, and Φ is a constant when in the single model. The second equation is the measurement equation, zk is the measured value at time k, and H is the measurement matrix of the measurement system, and H is a constant when in the single model. wk is the process noise, and vk is the measurement noise. In engineering, zero-mean Gaussian white noise is usually applied to simulate vk and wk, and the covariance of these two parameters is Q and R, and they are uncorrelated. That is, for all of the following k, j are(2)Ewk=0,Evk=0,covwk,wj=EwkwjT=Qδkj,covvk,vj=EvkvjT=Rδkj,covwk,vj=EwkvjT=0,δkj=1,k=j0,k≠j.In the initial state of the measurement system, the statistical characteristics are set as follows:Ex0=μ0,varx0=Ex0−μ0,x0−μ0T=p0,andcovx0,wk=covx0,vk=0. Based on the previous system state, we can get(3)xk/k−1=Φxk−1/k−1.xkk−1 is the estimated value of the current system state, and xk−1k−1 is the optimal estimation result of the previous state.After obtaining the estimated valuexkk−1 of the current state in the system, combined with the measured value zk of the current time, the optimal estimated value xkk of the current time state of the system is obtained as(4)xk/k=xk/k−1+KkZk−Hxk/k−1,where Kk is the Kalman gain matrix, which keeps the estimated error variance matrix Pk extremely small. To find Kk, the following formulas are defined:(5)x˜k/k−1=Δxk/k−1−xk,(6)x˜k/k=Δxk/k−xk.Equation (5) is the system estimation error before the kth measurement data, namely, zk, are obtained, and equation (6) is the system estimation error after zk is obtained. Substituting (1) and (5) into (6), the following is obtained:(7)x˜k=xk/k−xk=xk/k−1+KkHxk+vk−Hxk/k−1−xk=I−KkHx˜k/k−1+Kkvk.Then, the variance matrix of the estimated error can be expressed as(8)Pk=Ex˜kx˜kT=EI−KkHx˜k/k−1x˜k/k−1TI−KkHT+vkKkT+Kkvkx˜k/k−1TI−KkHT+vkKkT.Definition:(9)Pk/k−1=ΔEx˜k/k−1x˜k/k−1T.The aforementioned definition is the estimated covariance matrix corresponding toxkk−1. Also, because of(10)EvkvT=R,(11)Exk/k−1vkT=Evkx˜k/k−1T=0.Substituting (9)–(11) into (8), the following is obtained:(12)Pk=I−KkHPk/k−1I−KkHT+KkPkKkT.Since the purpose ofKk is to minimize the estimated error variance matrix Pk, therefore, Pk can be transformed by formula (12) to(13)Pk=Pk/k−1−Pk/k−1HTHPk/k−1HT+Rk−1HPk/k−1+Kk−Pk/k−1HTHPk/k−1HT+Rk−1HT+1Pk/k−1+RkKk−Pk/k−1HTHPk/k−1HT+Rk−1.It can be known from (13) that if Pk is kept to the minimum, corresponding Kk should be as follows:(14)Kk=Pk/k−1HTHPk/k−1HT+R−1.At this time, the error correlation matrixPkk used to measure the accuracy of the estimated value can be written as(15)Pk/k=Pk/k−1−Pk/k−1HTHPk/k−1HT+R−1HPk/k−1=I−KkHPk/k−1.Equation (15) is the iterative formula of the error equation. Therefore, from the Kalman filter recursive formula, not only the filter estimation formula can be obtained but also the error analysis can be operated. This is where its advantage lies. If the iterative formula is required to be iterated constantly, the recursive formula of the error correlation matrix Pk−1k−1 to Pkk−1 corresponding to xk−1k−1 should be obtained. Subtracting xk from both sides of equation (3), the following is obtained:(16)xk/k−1−xk=Φxk−1−xk.Substituting (1) and (5) into (16),(17)x˜k/k−1=Φx˜k−1−wk−1,(18)Pkk−1=ΦPk−1/k−1ΦT+Q.In summary, the model of the discrete Kalman filter shown in Figure2 can be derived.Figure 2
Discrete Kalman filter model.Based on Figure2 and according to formulas (3), (4), (14), (15), and (18), the discrete Kalman filter algorithm subroutine module can be programmed on the computer. The program flowchart is shown in Figure 3.Figure 3
Discrete Kalman filter algorithm subroutine flowchart.


## 2.1. Principle of Discrete Kalman Filtering

The soil moisture data [34–38] are converted into digital quantity represented by binary code after D/A conversion and packaged in a ZigBee data frame, and then the data frame is transmitted to the host computer through the ZigBee WSN. Due to the limitation of switching frequency and data transmission mode for the D/A converter, it is destined that sampling will only be performed in a series of discrete moments. Therefore, the process of collecting soil moisture data can be abstracted into a discrete process as described in the following:(1)xk=Φxk−1+wk−1zk=Hxk+vk,where the first equation is the state equation of the data acquisition system, xk is the system state at time k, and Φ is the system state transition matrix, and Φ is a constant when in the single model. The second equation is the measurement equation, zk is the measured value at time k, and H is the measurement matrix of the measurement system, and H is a constant when in the single model. wk is the process noise, and vk is the measurement noise. In engineering, zero-mean Gaussian white noise is usually applied to simulate vk and wk, and the covariance of these two parameters is Q and R, and they are uncorrelated. That is, for all of the following k, j are(2)Ewk=0,Evk=0,covwk,wj=EwkwjT=Qδkj,covvk,vj=EvkvjT=Rδkj,covwk,vj=EwkvjT=0,δkj=1,k=j0,k≠j.In the initial state of the measurement system, the statistical characteristics are set as follows:Ex0=μ0,varx0=Ex0−μ0,x0−μ0T=p0,andcovx0,wk=covx0,vk=0. Based on the previous system state, we can get(3)xk/k−1=Φxk−1/k−1.xkk−1 is the estimated value of the current system state, and xk−1k−1 is the optimal estimation result of the previous state.After obtaining the estimated valuexkk−1 of the current state in the system, combined with the measured value zk of the current time, the optimal estimated value xkk of the current time state of the system is obtained as(4)xk/k=xk/k−1+KkZk−Hxk/k−1,where Kk is the Kalman gain matrix, which keeps the estimated error variance matrix Pk extremely small. To find Kk, the following formulas are defined:(5)x˜k/k−1=Δxk/k−1−xk,(6)x˜k/k=Δxk/k−xk.Equation (5) is the system estimation error before the kth measurement data, namely, zk, are obtained, and equation (6) is the system estimation error after zk is obtained. Substituting (1) and (5) into (6), the following is obtained:(7)x˜k=xk/k−xk=xk/k−1+KkHxk+vk−Hxk/k−1−xk=I−KkHx˜k/k−1+Kkvk.Then, the variance matrix of the estimated error can be expressed as(8)Pk=Ex˜kx˜kT=EI−KkHx˜k/k−1x˜k/k−1TI−KkHT+vkKkT+Kkvkx˜k/k−1TI−KkHT+vkKkT.Definition:(9)Pk/k−1=ΔEx˜k/k−1x˜k/k−1T.The aforementioned definition is the estimated covariance matrix corresponding toxkk−1. Also, because of(10)EvkvT=R,(11)Exk/k−1vkT=Evkx˜k/k−1T=0.Substituting (9)–(11) into (8), the following is obtained:(12)Pk=I−KkHPk/k−1I−KkHT+KkPkKkT.Since the purpose ofKk is to minimize the estimated error variance matrix Pk, therefore, Pk can be transformed by formula (12) to(13)Pk=Pk/k−1−Pk/k−1HTHPk/k−1HT+Rk−1HPk/k−1+Kk−Pk/k−1HTHPk/k−1HT+Rk−1HT+1Pk/k−1+RkKk−Pk/k−1HTHPk/k−1HT+Rk−1.It can be known from (13) that if Pk is kept to the minimum, corresponding Kk should be as follows:(14)Kk=Pk/k−1HTHPk/k−1HT+R−1.At this time, the error correlation matrixPkk used to measure the accuracy of the estimated value can be written as(15)Pk/k=Pk/k−1−Pk/k−1HTHPk/k−1HT+R−1HPk/k−1=I−KkHPk/k−1.Equation (15) is the iterative formula of the error equation. Therefore, from the Kalman filter recursive formula, not only the filter estimation formula can be obtained but also the error analysis can be operated. This is where its advantage lies. If the iterative formula is required to be iterated constantly, the recursive formula of the error correlation matrix Pk−1k−1 to Pkk−1 corresponding to xk−1k−1 should be obtained. Subtracting xk from both sides of equation (3), the following is obtained:(16)xk/k−1−xk=Φxk−1−xk.Substituting (1) and (5) into (16),(17)x˜k/k−1=Φx˜k−1−wk−1,(18)Pkk−1=ΦPk−1/k−1ΦT+Q.In summary, the model of the discrete Kalman filter shown in Figure2 can be derived.Figure 2
Discrete Kalman filter model.Based on Figure2 and according to formulas (3), (4), (14), (15), and (18), the discrete Kalman filter algorithm subroutine module can be programmed on the computer. The program flowchart is shown in Figure 3.Figure 3
Discrete Kalman filter algorithm subroutine flowchart.


## 3. Adaptive Weight Fusion Algorithms

### 3.1. Principle of the Adaptive Weight Fusion Algorithm

Suppose that the same unknown quantityY is observed by N sensors, and the observation value of each sensor is Yj (j = 1, 2, …, N). Then, the observed value of the jth sensor is(19)Y^=∑j=1NWjYj,where Wj is the weight and satisfies(20)∑j=1NWj=1.The corresponding estimated variance is(21)σ2=∑j=1NWj2σj2,where σj2 represents the measurement variance of each sensor. In order to find wj at the time when the variance in equation (21) reaches a minimum value, the following auxiliary functions are constructed as(22)fw1,w2,…,wN,λ=∑j=1Nwj2σj2+λ∑j=1Nwj−1.ForW1, W2, …, WN in equation (22), the partial derivatives are, respectively, obtained, and equation (20) is used as the constraint:(23)∂f∂w1=2w1σ12+λ=0,⋯∂f∂wN=2wNσN2+λ=0,∑j=1Nwj−1=0.After organizing, the following is obtained:(24)w1+w2+⋯+wN=1,wj=uσj2,j=1,2,3,…;μ=λ2.Then, the conditional extreme valueσmin2 for σ2 is(25)σmin2=μ=1∑i=1N1/σi2.Substituting (25) into (24), the simultaneous equations are(26)wj=1σj2∑i=1N1/σi2,j=1,2,3,…,N.The above estimation process for the true valueY is based on all of the measurement data obtained by N sensors in a single measurement process. When the state of the measured object remains relatively constant for a certain period of time, in order to improve the estimation accuracy, when the kth estimation of the true value Y is performed, the average value of the previous measurement data for k times may be used:(27)Y¯jk=1k∑i=1kYji,j=1,2,3,…,N.To make estimation, the estimation equation can be written as follows:(28)Y¯^=∑j=1NwjY¯jk.SinceYj is an unbiased estimation of Y, it is also an unbiased estimate of Y. The estimated total variance at this time is(29)σ¯2=EY−Y¯^2=E∑j=1Nwj2Y−Y¯2k=1k∑j=1Nwjσj2.The same as the solution process ofσmin2, the conditional extreme values are(30)σ¯min2=1k∑i=1N1/σi2=σmin2k.From (30), it can be concluded that, as the number of measurement k increases, the overall variance of the true value Y estimation will become smaller, thereby achieving the purpose of estimation accuracy improvement.


### 3.2. Calculation Method ofσj2

Since the optimal weighting factorwj is determined by the variance σj2 of each sensor, σj2 is generally not known, so it is necessary to indirectly pass the measured values provided by the sensors, and find it according to the following algorithm. There are any two different sensors i and j, in which the measured values are Yi and Yj, respectively, and the corresponding observation errors are ni,nj, that is, Yi=Y+niandYj=Y+nj. Because the mean value of ni,nj is zero and is not related to each other and is not related to Y, Yj is the autocorrelation coefficient Rjj, and the correlation coefficient Rij between Yi and Yj, respectively, satisfies(31)Rjj=EYjYj=EY2+Enj2,(32)Rij=EYiYj=EY2.Substituting (31) into (32),(33)σj2=Enj2=Rjj=Rij.For the calculation ofRjj and Rij, they can be solved by the time-domain estimation: set Rjjk as the time-domain estimation value of Rjj at time k and Rijk as the time-domain estimation value of Rij at time k; then,(34)Rjjk=1k∑m=1kYjmYjm,Rijk=1k∑m=1kYimYjm.To reduce the error, the average value ofRijk, namely R¯ijk, is usually taken instead of Rijk:(35)R¯ijk=1N−1∑i=1,i≠jNRijk.Substituting (32) into (35),(36)σj2k=Rjjk−R¯ijk.


## 3.1. Principle of the Adaptive Weight Fusion Algorithm

Suppose that the same unknown quantityY is observed by N sensors, and the observation value of each sensor is Yj (j = 1, 2, …, N). Then, the observed value of the jth sensor is(19)Y^=∑j=1NWjYj,where Wj is the weight and satisfies(20)∑j=1NWj=1.The corresponding estimated variance is(21)σ2=∑j=1NWj2σj2,where σj2 represents the measurement variance of each sensor. In order to find wj at the time when the variance in equation (21) reaches a minimum value, the following auxiliary functions are constructed as(22)fw1,w2,…,wN,λ=∑j=1Nwj2σj2+λ∑j=1Nwj−1.ForW1, W2, …, WN in equation (22), the partial derivatives are, respectively, obtained, and equation (20) is used as the constraint:(23)∂f∂w1=2w1σ12+λ=0,⋯∂f∂wN=2wNσN2+λ=0,∑j=1Nwj−1=0.After organizing, the following is obtained:(24)w1+w2+⋯+wN=1,wj=uσj2,j=1,2,3,…;μ=λ2.Then, the conditional extreme valueσmin2 for σ2 is(25)σmin2=μ=1∑i=1N1/σi2.Substituting (25) into (24), the simultaneous equations are(26)wj=1σj2∑i=1N1/σi2,j=1,2,3,…,N.The above estimation process for the true valueY is based on all of the measurement data obtained by N sensors in a single measurement process. When the state of the measured object remains relatively constant for a certain period of time, in order to improve the estimation accuracy, when the kth estimation of the true value Y is performed, the average value of the previous measurement data for k times may be used:(27)Y¯jk=1k∑i=1kYji,j=1,2,3,…,N.To make estimation, the estimation equation can be written as follows:(28)Y¯^=∑j=1NwjY¯jk.SinceYj is an unbiased estimation of Y, it is also an unbiased estimate of Y. The estimated total variance at this time is(29)σ¯2=EY−Y¯^2=E∑j=1Nwj2Y−Y¯2k=1k∑j=1Nwjσj2.The same as the solution process ofσmin2, the conditional extreme values are(30)σ¯min2=1k∑i=1N1/σi2=σmin2k.From (30), it can be concluded that, as the number of measurement k increases, the overall variance of the true value Y estimation will become smaller, thereby achieving the purpose of estimation accuracy improvement.


## 3.2. Calculation Method ofσj2

Since the optimal weighting factorwj is determined by the variance σj2 of each sensor, σj2 is generally not known, so it is necessary to indirectly pass the measured values provided by the sensors, and find it according to the following algorithm. There are any two different sensors i and j, in which the measured values are Yi and Yj, respectively, and the corresponding observation errors are ni,nj, that is, Yi=Y+niandYj=Y+nj. Because the mean value of ni,nj is zero and is not related to each other and is not related to Y, Yj is the autocorrelation coefficient Rjj, and the correlation coefficient Rij between Yi and Yj, respectively, satisfies(31)Rjj=EYjYj=EY2+Enj2,(32)Rij=EYiYj=EY2.Substituting (31) into (32),(33)σj2=Enj2=Rjj=Rij.For the calculation ofRjj and Rij, they can be solved by the time-domain estimation: set Rjjk as the time-domain estimation value of Rjj at time k and Rijk as the time-domain estimation value of Rij at time k; then,(34)Rjjk=1k∑m=1kYjmYjm,Rijk=1k∑m=1kYimYjm.To reduce the error, the average value ofRijk, namely R¯ijk, is usually taken instead of Rijk:(35)R¯ijk=1N−1∑i=1,i≠jNRijk.Substituting (32) into (35),(36)σj2k=Rjjk−R¯ijk.


## 4. Improvement of the Adaptive Weight Fusion Algorithm

### 4.1. Drawbacks of the Current Algorithms

It is not difficult to conclude from (25), (26), and (30) that both of the conditional extremes of the estimation error and the sensor weights are closely related to the measurement variance of the sensor. The smaller the sensor measurement variance is, the smaller the conditional extreme of the error is estimated and the larger the corresponding sensor weight is, which reflect the characteristics that the sensor weight is autoadaptive to the sensor measurement variance. However, it is precisely because of the direct impact of the sensor measurement variance on these parameters; if the sensor measurement variance has frequent and severe jitter, the corresponding sensor weight will certainly have jitter, which will finally affect the effect of data fusion.Taking the measurement of soil moisture as an example, three humidity sensors are provided to simultaneously measure soil moisture in a certain area, and the true value of soil moisture in this area is set as 21RH% (constantly considered to be constant in a certain period of time). Based on this true value, Gaussian white noise with a mean value of 0 and variances of 0.2, 0.5, and 0.7 was added to simulate different levels of noise pollution of the three sensors, and 100 fusion processes were simulated on a computer.As shown in Figure4, because the autoadaptive weight fusion algorithm before improvement directly uses the raw measurement data of the noise-contaminated sensor as its fusion data source, the measurement variance of the sensor will experience severe jitter caused by a small sample size (sample capacity is less than 15). After this severe jitter, there is still a relatively frequent small jitter, which further leads to the frequent and random jitter of the corresponding sensor weight curve in Figure 5 within a certain range. Although this kind of sensor weight jitter reflects the dynamic adjustment characteristic of sensor weight according to the sensor measurement variance by the autoadaptive weight fusion algorithm, too much jitter will eventually affect the fusion effect. As shown in Figure 6, the frequent and irregular sensor weight jitter makes smoothness decrease the smoothed data. The data curve has more glitch, and the convergence speed is slower (the fusion curve in the figure becomes flat after 60 times of fusion).Figure 4
Variance changing curve of the data source before improvement.Figure 5
Weight curve of the sensor before improvement.Figure 6
Fusion effect of the algorithm before improvement.


### 4.2. Improved Autoadaptive Weight Fusion Algorithm

It can be found from the analysis in Section4.1 that the main reason for this drawback is that the fusion data source used by the algorithm contains a lot of noise that affect the measurement variance of the sensor. Moreover, in the fusion process, the noise which was contained in the fused data source has not been processed. It shows that the sensor measurement variance shown in Figure 4 always shakes around a certain value without significant drop after entering a relatively stable phase. If the noise in the data source can be suppressed to a certain extent, the sensor measurement variance σj2 will decrease. It can be known from equations (25) and (30) that the decrease of σj2 eventually causes the conditional extreme value σ¯min2 of the overall estimated variance to decrease, and with the increase in the number of estimates k, the trend of this decline will become more apparent.Considering that the core of the discrete Kalman filtering algorithm consists of only five formulas and the algorithm logic is clear (shown in Figure3), it is easy to be programmed by the computer. It also has advantages of rapid convergence, good stability, high precision, and low program memory overhead. Therefore, the discrete Kalman filtering algorithm can be used as an ideal data preprocessing method. The original measurement data sent by the data acquisition terminal to the host computer are filtered as follows.Set thejth (j = 1, 2, …, N) sensor of the N sensors at time k (k ≥ 1) to have the original measured value as Yjk, the initial estimated value of the filtering algorithm as Yj0, and the filtered output value as Y˜jk; then, the discrete Kalman filter formula can be written as(37)Yjkk/k−1=ΦY˜jk−1,Pk/k−1=ΦPk−1/k−1ΦT+Q,Kk=Pk/k−1HTHPk/k−1HT+R−1,Y˜jk=Yjkk/k−1+KkYjk−HYjkk/k−1,Pk/k=I−KkHPk/k−1.According to the flowchart shown in Figure3, after the calculations of equation (37), Y˜jk (j = 1, 2, …, N; k = 1, 2, and 3) is used as the fusion data source of autoadaptive weight fusion to replace the original Yjk, thus achieving the purpose of suppressing the noise and reducing σj2. The improved fusion algorithm is shown in Figure 7.Figure 7
Flowchart of the improved autoadaptive weight fusion algorithm.


## 4.1. Drawbacks of the Current Algorithms

It is not difficult to conclude from (25), (26), and (30) that both of the conditional extremes of the estimation error and the sensor weights are closely related to the measurement variance of the sensor. The smaller the sensor measurement variance is, the smaller the conditional extreme of the error is estimated and the larger the corresponding sensor weight is, which reflect the characteristics that the sensor weight is autoadaptive to the sensor measurement variance. However, it is precisely because of the direct impact of the sensor measurement variance on these parameters; if the sensor measurement variance has frequent and severe jitter, the corresponding sensor weight will certainly have jitter, which will finally affect the effect of data fusion.Taking the measurement of soil moisture as an example, three humidity sensors are provided to simultaneously measure soil moisture in a certain area, and the true value of soil moisture in this area is set as 21RH% (constantly considered to be constant in a certain period of time). Based on this true value, Gaussian white noise with a mean value of 0 and variances of 0.2, 0.5, and 0.7 was added to simulate different levels of noise pollution of the three sensors, and 100 fusion processes were simulated on a computer.As shown in Figure4, because the autoadaptive weight fusion algorithm before improvement directly uses the raw measurement data of the noise-contaminated sensor as its fusion data source, the measurement variance of the sensor will experience severe jitter caused by a small sample size (sample capacity is less than 15). After this severe jitter, there is still a relatively frequent small jitter, which further leads to the frequent and random jitter of the corresponding sensor weight curve in Figure 5 within a certain range. Although this kind of sensor weight jitter reflects the dynamic adjustment characteristic of sensor weight according to the sensor measurement variance by the autoadaptive weight fusion algorithm, too much jitter will eventually affect the fusion effect. As shown in Figure 6, the frequent and irregular sensor weight jitter makes smoothness decrease the smoothed data. The data curve has more glitch, and the convergence speed is slower (the fusion curve in the figure becomes flat after 60 times of fusion).Figure 4
Variance changing curve of the data source before improvement.Figure 5
Weight curve of the sensor before improvement.Figure 6
Fusion effect of the algorithm before improvement.


## 4.2. Improved Autoadaptive Weight Fusion Algorithm

It can be found from the analysis in Section4.1 that the main reason for this drawback is that the fusion data source used by the algorithm contains a lot of noise that affect the measurement variance of the sensor. Moreover, in the fusion process, the noise which was contained in the fused data source has not been processed. It shows that the sensor measurement variance shown in Figure 4 always shakes around a certain value without significant drop after entering a relatively stable phase. If the noise in the data source can be suppressed to a certain extent, the sensor measurement variance σj2 will decrease. It can be known from equations (25) and (30) that the decrease of σj2 eventually causes the conditional extreme value σ¯min2 of the overall estimated variance to decrease, and with the increase in the number of estimates k, the trend of this decline will become more apparent.Considering that the core of the discrete Kalman filtering algorithm consists of only five formulas and the algorithm logic is clear (shown in Figure3), it is easy to be programmed by the computer. It also has advantages of rapid convergence, good stability, high precision, and low program memory overhead. Therefore, the discrete Kalman filtering algorithm can be used as an ideal data preprocessing method. The original measurement data sent by the data acquisition terminal to the host computer are filtered as follows.Set thejth (j = 1, 2, …, N) sensor of the N sensors at time k (k ≥ 1) to have the original measured value as Yjk, the initial estimated value of the filtering algorithm as Yj0, and the filtered output value as Y˜jk; then, the discrete Kalman filter formula can be written as(37)Yjkk/k−1=ΦY˜jk−1,Pk/k−1=ΦPk−1/k−1ΦT+Q,Kk=Pk/k−1HTHPk/k−1HT+R−1,Y˜jk=Yjkk/k−1+KkYjk−HYjkk/k−1,Pk/k=I−KkHPk/k−1.According to the flowchart shown in Figure3, after the calculations of equation (37), Y˜jk (j = 1, 2, …, N; k = 1, 2, and 3) is used as the fusion data source of autoadaptive weight fusion to replace the original Yjk, thus achieving the purpose of suppressing the noise and reducing σj2. The improved fusion algorithm is shown in Figure 7.Figure 7
Flowchart of the improved autoadaptive weight fusion algorithm.


## 5. Simulation and Analysis of Improved Algorithms

As described in Section4.1, there were 3 humidity sensors (type: RS485) to measure soil moisture in a certain area at the same time. The true value of soil moisture at this moment was set to 21RH% (can be considered constant in a certain period of time), and based on this, true value Gaussian white noise (white noise launcher type: Noisecom NC6000A/NC8000A) with a mean of zero and a variance of 0.2, 0.5, and 0.7 was added, respectively, to simulate the noise pollution of the sensor. A total of three sets of measurements were generated, and every group contained 100 times of measurements. Then, discrete Kalman filtering was used for the three sets of measured values, and the three sets of filtered measured values were used as the data source of the autoadaptive weight fusion algorithm, and the variance of the filtered measured data (fused data source) is as shown in Figure 8. The initial parameters of the discrete Kalman filtering algorithm (see Table 1) can be determined from experimental data. The sensor weight curve and the fusion output curve of the improved algorithm are shown in Figures 9 and 10.Figure 8
Variance curve of the filtered fusion data source.Table 1
Initial parameters of the discrete Kalman filter.
UnitInitial estimation variance,P0|0Initial estimate,x0|0Process variance,QSensor 10.6194e − 4Sensor 20.6204e −Sensor 30.6234e − 4Figure 9
Sensor weight curve of the improved algorithm.Figure 10
Fusion output curve of the improved algorithm.As shown in Figure8, at the beginning of the discrete Kalman filtering algorithm, compared with the variance of the measured values of the prefiltered sensors (see Figure 4), the variance of the measured values of the three groups of sensors is significantly reduced after filtration, and the variance can be controlled relatively faster and maintained at a lower level (after about 30 filtering, the variance is below 0.1). This indicates that the noise contained in the sensor raw data is significantly suppressed. Therefore, using the filtered three sets of sensor measurements as the fused data source of the autoadaptive weight fusion algorithm will significantly reduce σj2 (j = 1, 2, and 3). Moreover, since the variance curve of the measured value from the filtered sensor becomes smoother with the increase of the number of filtration times, the linkage effect on the sensor weight and the fused output caused by the frequent jitter of the sensor variance can be better avoided. As shown in Figure 9, the improved algorithm has better suppression ability for the sensor weight jitter: after 15 fusions on average, the weight of each sensor has no obvious jitter, which avoids the influence on fusion precision due to frequent jitter of sensor weight and thus significantly improves the fusion accuracy and convergence speed. As shown in Figure 10, after about 35 fusions, the fusion output is already stable and extremely close to the true value, and the fused output curve has fairly high smoothness and substantially no jitter occurrence. This improved algorithm is significantly better than the algorithm before improvement shown in Figure 6.


## 6. Conclusion

The paper uses the discrete Kalman filtering algorithm to improve the acquisition approach of the fusion data source in the autoadaptive weight fusion algorithm. The original measurement data of the sensor after discrete Kalman filtration are treated as a new fusion data source, which substitute the traditional method that obtains sensor measurement data directly as fusion data source. The fusion output results have faster convergence speed, better data smoothness, and higher fusion accuracy than improved before. The improved algorithm can avoid the interference of disturbance data and mutation data, provide a new method for time-series data fusion in the same space, and lay a foundation for the next research of soil data.



---

*Source: 9673764-2020-09-26.xml*