Keywords

1 Introduction

Distributed estimation algorithms in WSN are focused on the network system with interferences. Distributed KCF algorithm is widely concerned because of its fast convergence speed, high fusion precision, and strong robustness. In the case of packet loss and path loss, Kalman consensus filtering algorithm is used to monitor the state of the target system with a better estimation effect [1]. In practical WSN applications, the energy, bandwidth, information computing, storage, and other resources of sensor nodes are limited. Therefore, how to reduce the system energy consumption becomes the key to extend the service life of the network. In [2], it introduced the event triggering mechanism into Kalman consensus filtering calculation and achieved the goal of reducing the energy consumption of the network by reducing the number of consensus calculations during samplings. Although existing studies have solved the problem of network bandwidth limitation to a certain extent, in the actual monitoring of the target system (such as monitoring the concentrations of pollutants in the cabin), the promptness of the estimated results is of great significance. If the current estimated value cannot reflect the concentrations of pollutants in real time, it may cause hazards such as delayed alarm. In terms of improving the real-time performance of the monitoring system, many scholars have carried out the following researches: In the embedded system, Zhou et al. [3] propose a status update scheduling scheme to minimize the average AoI of the system, so that the system has the better real-time performance. Tang et al. [4] built an asymptotic optimal truncated policy that can satisfy the hard bandwidth constraint under the power limit. This policy realizes the real-time update of user information by minimizing the average AoI of the system. Talak et al. [5] study the relationship between the average AoI of the system and the real-time performance, and simulations show that the smaller the average AoI of the system, the better the real-time performance. Based on the above research, in order to ensure that the distributed WSN can timely estimate the concentrations of pollutants in the cabin under the energy restriction, a Kalman consensus filtering algorithm based on the status update scheduling scheme is designed by minimizing the average AoI of the system.

The main contribution of this paper is to design a status update scheduling scheme to minimize the average AoI of the system under the constraint of network energy. Kalman consensus filtering algorithm based on this scheme can timely estimate the concentrations of pollutants in the cabin and the algorithm is superior to other consensus filtering algorithms in terms of consensus estimation and energy saving.

2 System Model

When using a distributed WSN to monitor the cabin pollutants concentrations, the cluster head receives status updates from sensor nodes and fuse measurement values of pollutants concentrations in a cabin with its neighbor nodes based on Kalman consensus filter to obtain the consensus-estimated values. Then, the consensus-estimated values are transmitted to the data center to judge whether pollutants concentrations exceed bid. The topology diagram of WSN is defined as G = (V, E, A), where \(V = \{ v_{1} , v_{2} , \cdots , v_{n} \}\) is the set of sensor nodes within a cluster, and E = V×V is the set of edges between nodes. Define Ni represents the set of neighbor nodes for the node i, i.e., \(N_{i} = \left\{ {v_{j} \in V:(v_{i} ,v_{j} ) \in E} \right\}\). The state model of the target system and the observation model of the sensor are [1]:

$$\left\{ \begin{gathered} x_{i,k + 1} = A_{k} x_{i,k} + B_{k} w_{i,k} \hfill \\ z_{i,k} = H_{i,k} x_{i,k} + F_{i,k} v_{i,k} \hfill \\ \end{gathered} \right.$$
(1)

where xi, k and wi, k represent the state vector and the process noise vector of the target system, respectively. zi, k is the observation vector, and vi, k is the observed noise vector of the sensors. Ak and Bk are the system matrices with appropriate dimensions. Hi, k and Fi, k are the measurement matrix and the fault matrix that are assumed to be invertible.

3 KCF Algorithm Based on Scheduling Scheme

The main content of this section has two parts: (1) Design a status update scheduling scheme by determining which status updates (generated by the nodes within the cluster) will be transmitted in the cluster head with the goal of minimizing the average AoI of distributed WSN. (2) Let the status updates obtained under the above update scheduling scheme participate in KCF algorithm to obtain the consensus-estimated value of the concentrations of pollutants in the cabin.

Sensors: The sensors monitor the real-time status of the cabin and it can be assumed that the sensor sends status updates to the cluster head based on a Poisson process with rate λ. This assumption satisfies the M/M/1 queue mode [6].

Energy harvesting (EH): It can be assumed that the energy supply process obeys the Poisson distribution with the parameter of \(\eta\) [7].

Transmit process: It can be assumed that the transmission service rate is μ following the M/M/1 queueing system [8]. Therefore, the service (i.e., transmission service) times follow an exponential distribution with μ, and 1/μ is the mean service time.

3.1 Status Updates Scheduling Scheme

Aiming at minimizing the average AoI of the network, a status update scheduling scheme is designed to make the cluster head select or discard status updates to obtain the status update sequence, \(X_{i,k} \, = \,\left\{ { \ldots ,\,x_{i,k} ,\, \ldots } \right\}\) that needs to be transmitted.

According to [7], the average AoI (\(\overline{\Delta }\)) of network is determined by

$$\overline{\Delta } = \eta \left(\frac{1}{\mu }E[Y] + \frac{1}{2}E[Y^{2} ] \right)$$
(2)

where Y is the time interval of two sequential transmission of updates (since the energy arrival rate is fixed to η and the total transmission interval of updates should be equal to the total arrival interval of energy units, the sum of Yi would be fixed to n / η where n is the number of harvested energy units).

According to the Cauchy inequality [9], the minimum value of the average AoI can be obtained when Yi is close to the mean value of \(\sum\nolimits_{i = 1}^{n} {Y_{i} }\) i.e. \(1/\eta\). At the same time, the optimal updates xi can also be obtained by minimizing \(\left| {Y_{i} - 1/\eta } \right|\).

figure a

Algorithm 1 presents the updates scheduling scheme. The input includes the time intervals \(\left\{ { \ldots \,T\left( {x_{i} } \right)\, \ldots } \right\}\) of all updates \(\left\{ { \ldots ,\,x_{i,k} ,\, \ldots } \right\}\) the time intervals {E1, E2, …, En} of all the harvested energy units, the energy buffer capacity E and e is used to indicate the number of harvested energy units in the energy buffer, η is the harvested energy rate. The output returns the update which will be transmitted. For the arrived update, it will be transmitted for two cases: (1) when the energy buffer is full; (2) when energy is available and the current update minimizes \(\left| {Y_{i} - 1/\eta } \right|\) based on the time interval of the next update (marked as T(xnext)). Besides, if 7 is true, itx and e are updated. For all the other cases, this update is discarded and itx is updated. Thus, this scheduling scheme can effectively improve the convergence speed of the KCF algorithm and reduce the bandwidth pressure.

3.2 KCF Algorithm Based on the Updates Scheduling Scheme (US-KCF)

The cluster head brings the state update \(\left\{ {x_{1} ,\,x_{2} ,\, \ldots ,\,x_{m} } \right\}\,\left( {m\, < \,N} \right)\), which can minimize the average AoI of the network into the KCF algorithm introduced in [1], which not only can improve the convergence speed of filtering estimation and ensure the real-time monitoring of pollutants concentrations in the cabin but reduce the energy consumption of the network.

figure b

In addition, this paper will consider the packet drop phenomenon. Binary variables \(\alpha_{i,k}\) and \(\beta_{i,k}\) are defined to describe the packet arrival process on cluster head node i at time k. \(\alpha_{i,k} = 1\) indicates the observed packet successfully received. Similarly, \(\beta_{i,k} = 1\) indicates that the communication packet was received successfully. Furthermore, \(P\left\{ {\alpha_{i,k} = 1} \right\} = \varpi_{1} ,\) \(P\left\{ {\beta_{i,k} = 1} \right\} = \varpi_{2} .\) When considering the path loss of wireless signal transmission, assume that \(\theta_{ij}\) is the path loss rate between cluster head node i and cluster head node j. Algorithm 2 introduces the calculation process of US-KCF. Input is status updates \(\left\{ {x_{i} ,\,x_{2} ,\, \cdots ,\,x_{m} } \right\}\) and output is the estimation values of the pollutants concentrations.

4 Performance Analysis of the US-KCF Algorithm

The Monte Carlo method is used in the simulation process to carry out a large number of independently repeated experiments. Using the statistical mean value of each time, the error response of monitoring network is analyzed. By adopting the following performance indexes given in Wang et al. [10].

Mean estimation error (MEE) and mean consistency error (MCE) are

\({\text{MEE}}_{k} = \sqrt {\frac{{\sum\nolimits_{i = 1}^{m} {(e_{i,k}^{T} e_{i,k} )} }}{m}} \,\,\,e_{i,k} = \hat{x}_{i,k} - x_{i,k}\), \({\text{MCE}}_{k} = \sqrt {\frac{{\sum\nolimits_{i = 1}^{m} {(\delta_{i,k}^{T} \delta_{i,k} )} }}{m}} \,\,\,\delta_{i,k} = \hat{x}_{i,k} - \frac{{\sum\nolimits_{i = 1}^{m} {\hat{x}_{i,k} } }}{m}\)

where k is the instantaneous time, and m is the number of updates.

In order to compare to the other method, ET-KCF algorithm in Wang et al. [2], the paper selects the same parameters for US-KCF algorithm proposed in this paper.

The initial value is set as \(x_{0} = (10,8)^{T}\) and P0 = 8I2. Process noise and observed noise are independent Gaussian white noise with covariance of 10i and 100i, respectively, where i is the update index. The initial energy of each node is 8 J. The path loss rate \(\theta_{ij}\) between node i and j is 0.3, and the observed packet loss rate \(\varpi_{1}\) and communication packet loss rate \(\varpi_{2}\) are 0.4. \(\mu = 0.5\), η = 0.4, \({\uplambda }\) = 0.8 (η < \({\uplambda }\), s.t. energy is not enough).

As shown in Fig. 1, when packet loss and path loss exist, the ET-KCF algorithm is proposed in Wang et al. [2], and the US-KCF algorithm in this paper can converge stably. Besides, the US-KCF algorithm can converge after about 100 steps of sampling while the ET-KCF algorithm needs around 300 steps which can be seen the superiority of the proposed algorithm in convergence speed.

Fig. 1
figure 1

Comparison of average estimation errors for different filters under packet loss and path loss

According to Fig. 2, the average consensus error performance of US-KCF is superior to the ET-KCF. At the same time, the US-KCF algorithm can achieve consensus after about 200 steps of sampling while the ET-KCF algorithm needs around 400 steps which proves the superiority of the proposed algorithm in convergence speed also.

Fig. 2
figure 2

Comparison of average consensus error for different filters under packet loss and path loss

Figure 3 is a comparison of energy consumptions between US-KCF algorithm and ET-KCF algorithm. US-KCF consumes network energy after about 750 steps of sampling, while ET-KCF consumes energy after about 200 steps. The simulation results demonstrate that the US-KCF algorithm can reduce the bandwidth pressure while ensuring the promptness and accuracy of the estimation algorithm.

Fig. 3
figure 3

Comparison of residual energy between two filtering algorithms

5 Conclusions

In this paper, a new Kalman consensus filter algorithm based on an update scheduling scheme is proposed to monitor the concentrations of pollutants in the cabin. Update scheduling scheme is designed to minimize the average AoI of the system to enable the US-KCF algorithm can obtain the consensus estimation value timely and accurately with the influence of observed packet loss, communication packet loss as well as the path loss in distributed WSN. Besides, the US-KCF algorithm can converge quickly and reduce energy consumption to a certain extent because of the scheduling scheme. Simulation results show that the algorithm has advantages in convergence speed, consensus estimation performance and energy saving.