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.

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 [212] 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 [1517]. As shown in Figure 1, the improved algorithm [17] runs on the host computer system and fuses the raw measurement data (including noise) [1825] which are sent to the host computer through the ZigBee wireless sensor [2633] 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.

2. Discrete Kalman Filtering Algorithm

2.1. Principle of Discrete Kalman Filtering

The soil moisture data [3438] 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:where the first equation is the state equation of the data acquisition system, is the system state at time , and is the system state transition matrix, and is a constant when in the single model. The second equation is the measurement equation, is the measured value at time , and H is the measurement matrix of the measurement system, and H is a constant when in the single model. is the process noise, and is the measurement noise. In engineering, zero-mean Gaussian white noise is usually applied to simulate and , and the covariance of these two parameters is and , and they are uncorrelated. That is, for all of the following , are

In the initial state of the measurement system, the statistical characteristics are set as follows: . Based on the previous system state, we can get

is the estimated value of the current system state, and is the optimal estimation result of the previous state.

After obtaining the estimated value of the current state in the system, combined with the measured value of the current time, the optimal estimated value of the current time state of the system is obtained aswhere is the Kalman gain matrix, which keeps the estimated error variance matrix extremely small. To find , the following formulas are defined:

Equation (5) is the system estimation error before the measurement data, namely, , are obtained, and equation (6) is the system estimation error after is obtained. Substituting (1) and (5) into (6), the following is obtained:

Then, the variance matrix of the estimated error can be expressed as

Definition:

The aforementioned definition is the estimated covariance matrix corresponding to . Also, because of

Substituting (9)–(11) into (8), the following is obtained:

Since the purpose of is to minimize the estimated error variance matrix , therefore, can be transformed by formula (12) to

It can be known from (13) that if is kept to the minimum, corresponding should be as follows:

At this time, the error correlation matrix used to measure the accuracy of the estimated value can be written as

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 to corresponding to should be obtained. Subtracting from both sides of equation (3), the following is obtained:

Substituting (1) and (5) into (16),

In summary, the model of the discrete Kalman filter shown in Figure 2 can be derived.

Based on Figure 2 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.

3. Adaptive Weight Fusion Algorithms

3.1. Principle of the Adaptive Weight Fusion Algorithm

Suppose that the same unknown quantity is observed by sensors, and the observation value of each sensor is (j = 1, 2, …, N). Then, the observed value of the jth sensor iswhere is the weight and satisfies

The corresponding estimated variance iswhere represents the measurement variance of each sensor. In order to find at the time when the variance in equation (21) reaches a minimum value, the following auxiliary functions are constructed as

For W1, W2, …, WN in equation (22), the partial derivatives are, respectively, obtained, and equation (20) is used as the constraint:

After organizing, the following is obtained:

Then, the conditional extreme value for is

Substituting (25) into (24), the simultaneous equations are

The above estimation process for the true value is based on all of the measurement data obtained by 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 estimation of the true value is performed, the average value of the previous measurement data for times may be used:

To make estimation, the estimation equation can be written as follows:

Since is an unbiased estimation of , it is also an unbiased estimate of . The estimated total variance at this time is

The same as the solution process of , the conditional extreme values are

From (30), it can be concluded that, as the number of measurement increases, the overall variance of the true value estimation will become smaller, thereby achieving the purpose of estimation accuracy improvement.

3.2. Calculation Method of

Since the optimal weighting factor is determined by the variance of each sensor, 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 and , in which the measured values are and , respectively, and the corresponding observation errors are , that is, . Because the mean value of is zero and is not related to each other and is not related to , is the autocorrelation coefficient , and the correlation coefficient between and , respectively, satisfies

Substituting (31) into (32),

For the calculation of and , they can be solved by the time-domain estimation: set as the time-domain estimation value of at time and as the time-domain estimation value of at time ; then,

To reduce the error, the average value of , namely , is usually taken instead of :

Substituting (32) into (35),

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 Figure 4, 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).

4.2. Improved Autoadaptive Weight Fusion Algorithm

It can be found from the analysis in Section 4.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 will decrease. It can be known from equations (25) and (30) that the decrease of eventually causes the conditional extreme value 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 Figure 3), 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 the jth (j = 1, 2, …, N) sensor of the N sensors at time k (k ≥ 1) to have the original measured value as , the initial estimated value of the filtering algorithm as , and the filtered output value as ; then, the discrete Kalman filter formula can be written as

According to the flowchart shown in Figure 3, after the calculations of equation (37), (j = 1, 2, …, N; k = 1, 2, and 3) is used as the fusion data source of autoadaptive weight fusion to replace the original , thus achieving the purpose of suppressing the noise and reducing . The improved fusion algorithm is shown in Figure 7.

5. Simulation and Analysis of Improved Algorithms

As described in Section 4.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.

As shown in Figure 8, 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 (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.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this article.

Acknowledgments

This research was supported by Shaanxi Science and Technology Department Project (16JK1100) and Shaanxi Provincial Science and Technology Department Social Development Science and Technology Project (2016SF-418).