Effective-SNR estimation for wireless sensor network using Kalman filter

In many Wireless Sensor Network (WSN) applications, the availability of a simple yet accurate estimation of the RF channel quality is vital. However, due to measurement noise and fading effects, it is usually estimated through probe or learning based methods, which result in high energy consumption or high overheads. We propose to make use of information redundancy among indicators provided by the IEEE 802.15.4 system to improve the estimation of the link quality. A Kalman filter based solution is used due to its ability to give an accurate estimate of the un-measurable states of a dynamic system subject to observation noise. In this paper we present an empirical study showing that an improved indicator, termed Effective-SNR, can be produced by combining Signal to Noise Ratio (SNR) and Link Quality Indicator (LQI) with minimal additional overhead. The estimation accuracy is further improved through the use of Kalman filtering techniques. Finally, experimental results demonstrate that the proposed algorithm can be implemented on resource constraints devices typical in WSNs.


Introduction
Wireless Sensor Networks (WSNs) have been widely promoted over the last decade, to monitor various environmental parameters, e.g. temperature, light, and humidity. Recent applications of WSNs have expanded to encompass more advanced sensing demands, for example structural health monitoring, manufacturing automation monitoring, and multimedia sensor network. In these advanced applications, deployed WSN have to deal with the challenge of intensive traffic load as well as the harsh RF environment. The harsh RF environment often possesses characteristics such as thermal cycling, and multi-path effects, due to stationary or moving metallic structures and environment RF noise from machinery (i.e. power generator and motor) or other RF devices. In addition, field tests [1][2][3] and our own investigations have revealed that these impairments are generally time-varying. These factors adversely affect the quality of the wireless communication, causing challenges, especially for WSNs with intensive traffic loads.
To understand the problems faced in advanced applications, a real life WSN project will be provided as an example. BP has deployed a trail WSNs system aiming to monitor the status of ship engines. It used 98 vibration sensors attached to 28 wireless nodes to monitor engine condition in an environment that can be considered harsh due to the shadowing and fading effect caused by metallic surfaces and RF interference from heavy machinery. This is an example of a high throughput system due to the multiple vibration sensors attached to each node required to operate in harsh RF environments and is the focus of this paper.
In recent publications, several algorithms have been proposed to increase system performance within similar situations. Some of them aim at enabling concurrent transmission to increase the network capacity through the exchange of the margin of link quality [4][5][6]; others attempt data rate adaptation [7][8][9][10] using an understanding of environment variations. However, all these methods rely on an accurate link estimation to increase the network performance. As Aguayo et al. [11] showed, the raw SNR may not be a good indicator to predict successful delivery of data packets, due to the fading channel and device impairments. In order to improve the quality of the link estimation instead of using the SNR, some recently proposed methods represented by Vutukuru et al. [5] make use of learning algorithms to estimate the link quality, which switch the radio transceiver into receiving state to monitor all the wireless activities and learn the potential interference levels from different devices. However, these learning based methods require that the sensor node must be active all the time to overhear all wireless transmissions, which is not suitable for energy constrained WSNs. Other approaches calibrate the relationship between SNR and Packet Error Rate (PER) by exchange probe packets. Such operation will cause a relatively high overhead, which is normally scalable as the size of the network increases. At least one WSN deployment crashed due to the expected high volume of overhead packets [12].
As specified in the IEEE 802.15.4 standard [13], all IEEE 802.15.4 compatible devices [14,15] have to provide a Link Quality Indicator (LQI) to represent the quality of the wireless link. Usually this value results from the correlation of multiple symbols within the received packet and indicates the error performance directly. Although different vendors calculated LQI in different ways (e.g. AT86RF231 provided by ATMEL correlated with the packet error rate, while CC2420 provides an indicator correlated with the chip error rate), it is believed that LQI is more accurate and reliable than the SNR in representing the link quality. Our experimental results, as well as previously published results [2,16], have shown that the average LQI has a high correlation with the error performance. This feature of IEEE 802.15.4 makes it possible to accurately estimate the link quality without the overhead of probe based calibration. Therefore, LQI is recommended by many standards including ZigBee [17], IETF 6LoWPAN WG [18]. Nevertheless, the utilisation of LQI has been challenged by many problems in this implementation. Firstly, the LQI is related to the error performance and yet only available within the transition area, i.e. successful receiving ratio is less than 100%, which means it fails to show the wider link margin. Secondly, the instantaneous raw LQI is known to vary over a wide range. As a result, many algorithms rely on the average of LQI over many packets to achieve affordable accuracy and thus fail to capture a fast changing channel. In advanced WSN applications, although there could be sufficient traffic load for the average operation to give adequate performance, a fast converging indicator is usually required for high layer optimisation.
We are consequently motivated to exploit the redundancy between the LQI and SNR to assist in providing a better link quality indicator, which is referred to as the Effective-SNR, 1 which should be able to provide reliable and fast estimation without additional overhead or hardware support. The proposed method is expected to be not only accurate but also easily implemented. Accordingly, several immediate questions should be addressed. Firstly, is the LQI good enough to express the link quality? Secondly, if so, is there a simple but effective approach to combine LQI and SNR to produce a trusted output? Thirdly, is the cost of such algorithm acceptable in resource constrained WSN? To address these questions, in this paper, we first investigate the different relationships between SNR, LQI, and PER. Based on the analysis of experiment results, we decompose the link quality into multiple components and build an Effective-SNR model to represent the underlying relationship among these components. This model enables us to make use of mature Kalman filter techniques to reduce the measurement noise and enhance the accuracy of the estimation. To the best of our knowledge, this is the first deployment of Kalman filter tracking of the variation of signal strength, environment noise strength, and signal impairment at the same time, while most pervious work only focus on the signal strength using simple average based approaches. With the help of this framework, LQI and SNR can be combined to generate a trustable Effective-SNR indicator, which provides an accurate estimation of the link quality margin to allow concurrent transmission as well as rate adaptation. In comparison with other approaches, the main advantage of our method is that it can avoid the overhead of probe packets or overhearing, which makes it suitable for WSNs deployment. The proposed algorithm can be easily employed by many other higher level algorithms to increase their performance. We also demonstrate that such a filter is can be easily deployed with fixed-point computation and is therefore acceptable for implementation in simple 8 bit microprocessors which are widely employed by many WSN platforms.
We start in Section 2, by presenting an overview of related work. This is followed by Section 3, in which we formulize the problem and provide the general model of link quality based on empirical evidence. Section 4 introduces the design of the Kalman filter and shows how to deploy the algorithm in a resource constraint platform. In Section 5, experimental results based on a COTS (Commercial Off-the-Shelf) platform are provided to illustrate the performance of the proposed method. The paper concludes by discussing some key issues of potential future work in Section 6.

Related works
Spatial reuse also known as the exposed terminal problem has been widely studied in the area of wireless networking. Most existing protocols exchange link quality information to enable concurrent transmission and thus increase the overall performance of the system. Indeed, such approaches heavily rely on the link quality estimation. The most recent study employed a probe-based approach [4]. The system monitors the delivery rate of probe packets and thus builds the Signal to Interference and Noise Ratio (SINR) to PER relationship for different environments. As expected, the frequent transmission of probe packets will cause high overheads and longer convergence time. Learning based methods [5] have been proposed to avoid such overhead caused by the probe and exchange packets. However, such designs require the device to remain in the receiving state to allow it to overhear all ongoing transmissions, which limits its potential application in WSNs, due to the high energy consumption of RF operation. Considering that MCU based calculations and radio transceivers operations require different levels of energy (e.g. 4 mA for ATMEGA128 working at 8 MHz and 19.7 mA for CC2420 working in receiving mode), we are motivated to trade more local calculation cost with less RF operations to achieve a not only accurate but also energy efficient solution.
To enable operation in dynamic and harsh RF environment, some vendors have recently released non-standard IEEE802.15.4 radio transceivers [15] with rate adaptation functions. These work by changing the spreading code length, which give WSNs the ability to select the best trade-off between data-rate and error performance. Rate adaptation in IEEE 802.11 based networks have been widely investigated [7,10,21,22], which demonstrate the reliance on accurate link quality estimation.
Several empirical studies have given us a better understanding of the complex correlation between SINR and link quality. In particular, Aguayo et al. [11] have studied several packet loss related factors including SNR, interference, and multi-path fading effects. Based on the experiment results collected from an IEEE 802.11 mesh network, they argued that, SNR cannot be used as a reliable predictor of link quality. In the context of WSNs, Son et al. [23] experimentally studied concurrent transmission performance using Mica2 platforms. They confirmed that the assumption proposed by Aguayo et al. [11] also exists in low-power wireless links. Our analysis further studied why the correlation between SINR and PER breaks down in fading channels, and proposed techniques to overcome this limitation.
There are many channel estimation methods designed for operation in wireless communication network, however most of them partly focused on improving accuracy without concern to additional complexity. For example, Jamieson et al. [10,24] proposed a highly accurate link indicator for wireless networks named SoftPHY. SoftPHY uses a Maximum Likelihood (ML) based approach in the decoding step of the physical layer to directly estimate the likelihood of error probability of tagged wireless links. However, their approach modified the core hardware of the RF transceiver in the GNU Radio software defined radio platform. Therefore, unlike our solution, it cannot be deployed in existing COTS platforms making it unsuitable for deployment in current WSNs.
Murat et al. [25] proposed a Kalman filter based link quality estimation scheme for wireless sensor network. However, their approach takes Received Signal Strength Indicator (RSSI) as the only observer parameter, thus failing to consider signal distortion caused by multi-path and other harsh RF effects. The Kalman filter has also been widely used in the context of wireless network for many other purposes. For instance, Hamilton et al. [26] proposed the utilisation of Kalman filter to achieve a better accuracy in distributed clock synchronisation for WSNs. Bianchi et al. [27] employed an extended Kalman filter to estimate the number of interference source in IEEE 802.11 networks. However in these cases, the proposed algorithm only focused on the theoretic analyses without consideration of the complexity of implementation in real platforms. In this paper, we introduce a Kalman filter based approach specially designed for resource constrained WSN platforms.

Problem formulation
According to the well known wireless communication theory, it can be assumed that if sensor networks are deployed in an ideal Additive White Gaussian Noise (AWGN) channel, then the capacity of the wireless link can be accurately estimated by the SNR. In order to validate this hypothesis, we first designed an experiment to replicate an AWGN channel by using an attenuator to model the path loss of the channel. The device used in this experiment is a COTS product equipped with IEEE802.15.4 compatible AT86RF231 transceiver [15], which, in addition, supports four data rates modes. In this experiment, the transmitter device works in saturation model which means there is always a packet ready in the queue to be sent. Thus, as shown in Fig. 1, the experimental results are further converted to the form of BER versus normalised received signal strength for different spreading modes. The data shown in this experiment is collected from several experiments, including changing the transmission power, the path loss, and the environment noise. Without loss of generality, all variables have been normalised to simplify the comparison. The normalised received signal strength is defined as ''the received signal strength to achieve the same performance without any effect of additional environmental noise''. Although the results show a statistical variance, the overall trend for each mode is clear and the thresholds are comparable to the sensitivity threshold provided by the datasheet of AT86RF231 [15], which demonstrates that the SNR is able to estimate the capacity of the wireless link accurately in an AWGN channel.
However, in reality the channel will include fading effects which cannot be accurately represented by the SNR, due to the distortion of signals. It is still possible to estimate the system capacity in a fading channel, but this usually requires a high complexity analytic model, which cannot be afforded by resource constraint WSN platforms. Therefore, we propose the estimation of Effective-SNR, by which the channel quality in harsh RF environments is simply mapped to a corresponding effective SNR in an AWGN channel. Then, the channel capacity can be obtained by substituting this indicator into a system performance model for an AWGN channel. The following section will discuss how to estimate this indicator through the analysis of the varying RF channel and by utilising existed measurements available in COTS platforms.

Notation
In this paper, the following notation and assumptions have been used: Transmission Power (P tx ) in dBm denotes the signal power at the antenna of transmitter. Received Signal Strength (P rss ) in dBm denotes the signal power at the antenna of the receiver. At the same time, the RSSI is the measurable indicator of P rss , provided by the RF transceiver. Environment Noise (N e ): We define the noise from devices outside the network as environment noise, which may be from other RF devices e.g. WiFi, or the EM noise generated by machinery (i.e. power generator, motor, or microwave oven). In our application, the latter tends to be a more important issue since it is a common effect in industrial environments. Through field trials it has been shown that such noise can be as high as À30 dBm around 2.4 GHz in the engine test site of Rolls Royce [28,29]. Similar effects have been reported in [30] for a power plant site around 915 MHz with a lower value of À64 dBm. As with the received signal strength, there is a measurable indicator of environment noise, defined as NOI (Noise Indicator). Internal Noise (N i ): We define all noise added to the signal after the antenna of the receiver device as internal noise, mainly consisting of thermal noise and can be represented by a noise figure. Other factors include quantisation noise and impairments due to device manufacturing. It has previously been demonstrated that due to manufacturing tolerances, different devices may have different noise figures, which can be easily calibrated offline. It should be noted that, the measurements of RSSI raw and NOI will go through the same RF chain and will be affected by the internal noise and contributing to the measurement noise.
Interference: We define the signal from other network devices during the current transmission as interference. However, unlike the environment noise, the interference signals derive from the same type of device and can be demodulated at the receiver as the known source. Therefore, the interference will be processed as potential wireless link pair not a special type of noise. The estimated results will aid the solution of hidden terminal problems and exposed terminal problems. Signal Quality Degradation (SQD): Wireless channels suffer from reflection and diffraction caused by objects in the environment or refractions in the medium. Such effects, usually termed fading effects, will cause distortion of the signal at receiver device and will further increase the error probability. Therefore, we define SQD as the degradation of signal when compared with the same signal transmitted via an AWGN channel.

Propagation model in the harsh RF environment
There are two main types of signal propagation, depending on their effects on the different space and time scales: (1) Path loss and shadowing are the largest contributors to signal loss. One of the most common radio propagation models is the log-normal shadowing path loss model [31], which can be represented by a Gaussian random process X r with zero mean and standard deviation of r.
(2) Fading effects, often termed multi-path fading or frequency selective fading, causes distortion to the signal. If only the strength of the received signal is considered, then the multi-path effect can be described with the same random process X r .
These relationships can be expressed by Eq. (1) according to Zuniga and Krishnamachari [31].
where PL(d) is the path loss at the distance d, d 0 is a reference distance, n is the path loss exponent and X r is a zeromean Gaussian random process with standard deviation r representing the effects of the time-varying channel fading. Therefore, the SNR (in dB) at the receiver side can be expressed in Eq. (2) by subtracting internal noise and environment noise.
If the transmitter and receiver are connected through an AWGN channel without any fading effects, the components of X r can be avoided, which means no variance and more importantly no distortion to the signal. Thus the error performance can be accurately estimated from the SNR, which has also been validated by the experimental results shown in Fig. 1.
The calculation of SNR requires both information on the received signal strength and the noise power at the receiver. However, due to constraints on cost and power, it is not possible to integrate a separate instrument into a WSN node to measure the received signal strength. Fortunately, as a regulation of IEEE 802.15.4, Zigbee compatible devices must provide a Received Signal Strength Indicator (RSSI) to higher level applications. Although the RSSI is linked to both received signal strength and the environment noise and can be used to calculate SNR, the SNR calculated from the RSSI is typically inaccurate. A recent study [7] has also reported such effect in an anechoic chamber environment (i.e. almost AWGN channel) and therefore, we cannot rely on pure RSSI values to obtain an accurate SNR. Due to the effects of fading and multi-path, the relationship between RSSI and the received signal strength (P rss ) and noise (N e ) becomes a nonlinear function.
We first consider this nonlinear effect on RSSI measurement. The raw RSSI (denoted as RSSI raw ) provided by the RF transceiver can be expressed as following: The RSSI detection function of an RF transceiver detects only the received signal strength at the antenna without attempting to distinguish whether it is due to signal or noise as the noise power (N i and N e ) also contributes to the RSSI value. In the worst case, where the environment noise power is high, the signal strength is masked by the noise and the value of RSSI deviates from the true received signal strength (P rss ). Therefore, to obtain an accurate value of P rss , the effect of environment noise should be eliminated first. Considering that the environmental noise N e still follows the propagation law of RF signals, it is possible for the device to obtain the environment noise strength by carry out a channel detection when there is no transmitting operation in the wireless channel. The detected RSSI value will be constituted of the environment noise and the internal noise. We use the term of NOI to represent this value. Such an approach is being employed by IEEE 802.11 k [32] to estimate the environment noise and interference. This nonlinear relationship between P rss , RSSI and environment noise can now be given by Eq. (4). Let P rss denote the actual value of the real received signal strength indicator, which can be obtained through the deduction of NOI from the raw RSSI as shown in Eq. (4).

P rss ¼ 10
RSSIraw þb 10 À 10 where b is the base value of RSSI detection, which is normally around À91 dBm, but calibration is required for different devices. It should be noted that, this calculated P rss value can be understand as P rss suffered from the measurement error.
In applications without high fading effect, e.g. remote sensing applications, if we consider that the measurement noise has already been eliminated (e.g. a simple moving average method like in [7]), the observed P rss and N e can be used to calculate SNR prior to estimating the error performance by using a combination of Eq. (2) and a look up table generated from Fig. 1. The look up table of standard IEEE 802.15.4 mode has been provided in Table 1 as an example. One the SNR is calculated, the algorithm can located the correct region and use a linear regression model to obtain an approximate BER value. For easy reference, we use the term RSSI-SNR model to denote this relationship for the following analysis.

Effective-SNR model
It is well known that, multi-path and other factors cause signal distortion, which increases error probability. Without any doubt, such effects will make offline tested SNR-PER measurements unreliable. For example, although a measured SNR margin is 8 dB, the real margin may only be 6 dB. Based on this inaccurate indicator, the higher-level application algorithm will make an incorrect decision to decrease the system performance, e.g. allow concurrent transmissions which should not occur, or switch to a high data rate which cannot be supported, causing a decrease in capacity instead of the expected increase. In order to provide an accurate estimation of link margin, some algorithms [4,7] rely on the probe packets and online calibration to rebuild the SNR to PER relationship in various environments, or even give an offline measurement [5]. As discussed previously, these techniques are able to mitigate this problem but suffer from several drawbacks including transmission overheads and long converge time.
In this paper, a new variable Effective-SNR (denoted by SNR effective in equations) is introduced as the equalised value of SNR to achieve the same error performance as would be expected in an AWGN channel. Effective-SNR can be obtained by including all negative effects on the signal quality as factors in the Signal Quality Degradation (SQD) calculation, as shown in Eq. (5). Without loss of generality, we assume SQD is a large-time scale factor, since the multi-path effect is relatively constant for a static sensor network system. 2 If we have already estimated SQD and combined it with the SNR, the error performance PER can be simply obtained through a look up table measured off-line with Effective-SNR as an input which can avoid the high overhead as well as achieve high accuracy. The only problem is how to estimate SQD in a low cost device. The straightforward calculation of SQD requires a very detailed specification of the low level demodulator employed in the RFIC. This may be possible in expensive software define radio development kits, but is impractical for low cost COTS products.
The acquisition of SQD in widely used WSN platforms is not straightforward, because this variable is usually embedded behind the complex combination of several indicators provided by the low cost WSN system. Notwithstanding, it is possible to obtain the Effective-SNR at a low cost from raw LQI, one of the indicators provided by IEEE 802.15.4 system. As reported in many test reports, the output of the LQI has significant correlation with error performance. As discussed earlier, Effective-SNR is linked with PER, which implies a correlation between LQI and Effective-SNR. However, as indicated by the vendor [15]:  Fig. 2 was provided in the format of PER in one second versus the average LQI per second. As the LQI can be understood as the error probability of the current packet, the average LQI in one second can be considered to be the best indicator of error performance for that second. Therefore, the results provided in Fig. 2 show very high correlations with the PER regardless of the different packet lengths (performances of three different lengths 20 bytes, 40 bytes and 100 bytes with multiple environment including AWGN and potential multi-path scenarios have been examined). To better understand the relationship between the averaged LQI and the instantaneous LQI, a snapshot of the experiment result (with packet length of 20 bytes) has been illustrated in Fig. 3. As expected, only the averaged LQI shows the similar trends with the channel capacity (i.e. successfully received packet number per second), the instantaneous LQI varies over a much wider range and less correlated with the error performance. However it should be noted that, the averaged LQI is only a posteriori statistical value which cannot be utilised to predict the channel quality. In this context, a low cost statistical method is required to obtain a reliable a priori indicator, which is the motivation of this work.
Similarly, a regression model has been generated to map the LQI and PER, which has been provided in Table 2 and plotted in Fig. 2. Then, it is straightforward to convert a recorded LQI to the corresponding PER, and use the look up table shown in Table 1 to further convert to the corresponding SNR in AWGN channel, which has been named as Effective-SNR. However, the relationship between LQI and Effective-SNR is segmented, resulting in values for SQD not always being available. Such nonlinearity increases the complexity in estimating Effective-SNR. Indeed, the system cannot rely on estimating Effective-SNR directly from LQI for each transmission. Nonetheless, aware that the SQD is mainly caused by multi-path effects, once the locations of transmitter-receiver devices have been fixed, the SQD for each tagged link can be approximated as a static value. Hence, we propose to estimate SQD through Effective-SNR in the situation where the LQI is provided. Values of SQD can be easily calculated by applying the estimated Effective-SNR to Eq. (5) with the SNR detected using the RSSI function discussed in Section 3.2. The estimated SQD can be maintained to estimate Effective-SNR for other situations.
Based on the analysis above, it can be concluded that a better estimation of SNR and the link quality margin can be achieved by using the information redundancy among RSSI, LQI, and the measured noise power N e . In fact, we define a new variable Effective-SNR to replace the SNR, and it is expected that the Effective-SNR should give a better description of the channel condition than the original SNR directly provided by the RFIC. Furthermore, as shown in the Effective-SNR model, the information redundancy between SNR and LQI is accounted for in the estimation of Effective-SNR, where the information redundancy helps to improve the accuracy of the SNR estimation. However, due to the nonlinearity existed in both models, it is challenging to get an accurate estimation of Effective-SNR. A carefully designed estimator is required to deal with the nonlinearity, segmentation and the measurement noise in RSSI raw and LQI. Beyond that, due to the nature of resource constraints in WSNs, such an estimator must be able to be deployed on low cost devices. In the next section, we will introduce the design of a Kalman filter and show that it can be implemented to achieve higher estimation accuracy while avoiding the transmission overheads required by other techniques such as probe packets.

Kalman filter design
According to the discussion of last section, it is clear to notice that this problem is a typical time-varying system with measurement noise. In particular, the measurement noise in WSNs is worse due to the low cost hardware platform. It is necessary to improve the estimation of channel quality by getting rid of the measurement noise. Since the mature Kalman filter has been shown its promising ability to track (estimate) the system parameters (states) from noisy measurements, it is worth designing and deploying a Kalman filter to track the variation of channel quality and against the measurement noise from low cost hardware platform. Other state of art approaches for similar scenarios include the moving average filter which has been deployed in a rate adaptation algorithm for WiFi systems [33] and a Geometric based solution [34]. Compared with these methods, Kalman filter can converge much faster than the moving average filter due to a better modelling and understanding of the signal relationship and measurement noise. The Kalman filter provides quantised accurate channel quality estimation comparing with the simple good or bad result generated by the Geometric methods. Therefore, the mature Kalman filter is a good tradeoffs between the performance and the computation costs and we choose Kalman filter as our solution to solve this problem.
Based on the two models presented in the preceding section, the algorithm will first try to remove the nonlinearity in the input of parameters. Then a novel Bi-KF (meaning double Kalman filter) estimator is proposed to deal with the measurement noise and stochastic fading effects resulting in a more reliable estimate of Effective-SNR while tracking the time varying link quality with high accuracy. The advantages of using KF are threefold: (1) The link quality is a time varying variable, for example, the shadowing effects caused by a moving object have a dramatic affect on the link quality. Since the KF is good at tracking time varying systems, the proposed Bi-KF estimator is able to track the variation quickly (usually able to converge in less than 10 iterations according to empirical experience). (2) The linear KF is of low computation cost. In comparison with probe-base and learning-based meth- ods, the proposed Bi-KF method can give an acceptable estimation of Effective-SNR without the additional probe packets or increased energy consumption. (3) The information redundancy between signals is fully utilised by the KF. Such information redundancy contributes significantly to the accuracy of the estimation. Fig. 4 illustrates the structure of the proposed Bi-KF estimator. The first Kalman filter (KF1) filters the measurement noise from the RSSI-SNR model while the second Kalman filter (KF2) generates Effective-SNR using SNR and SQD as input parameters. KF2 aims at using the information redundancy between SNR and LQI to improve the Effective-SNR estimation. KF1 uses the RSSI raw and environment noise reading (denoted by NOI in the rest of this paper) from RFIC as the input. Since the RSSI raw and NOI readings are immediately available when a packet arrives, KF1 provides a filtered SNR value once a packet is received. Because of the availability of SQD, KF2 only updates the value of Effective-SNR when the received packet's LQI is less than 255. Whereas, when the LQI is saturated (equal to 255), KF2 does not update the observe equation of KF2. In this situation the estimation is only updated by the state equations of KF2.

Input nonlinearity
Based on the discussion in Section 3, we note that the object system is nonlinear. For a nonlinear system, a nonlinear Kalman filter, referred as an Extended Kalman filter (EKF), has to be designed. However, the design of an EKF requires higher computation costs, which is not suitable for WSN nodes with low computation recourse. Furthermore, we observe that this is a inherently linear system. The nonlinearity exists only in the system inputs and the main dynamics of the system can be described by a linear system. More specifically, by introducing two intermediate variables P rss , N e , the nonlinear function relating SNR to RSSI raw , NOI can be decomposed into two parts: (a) input nonlinearity: the nonlinear function relating P rss , N e to RSSI raw , NOI, which is modelled by Eq. (4); (b) linear block: relating SNR to P rss , N e ,which is modelled by Eq. (2). For such an input nonlinear system (referred to as the Hammerstein model [35]) with inherent linearity, the common and low-cost estimation method is to separate the linear part from nonlinear part. In the proposed method, an input nonlinearity block is employed to convert RSSI raw , NOI into P rss , N e by using Eq. (4). Thus, the nonlinearity is eliminated in the following process and only a linear Kalman filter is required for the linear part relating P rss , N e to SNR. Therefore, the system state can be easily estimated using a linear Kalman filter at lower computation cost, instead of a complex Extended Kalman filter. Meanwhile the process of LQI is rather complex. As shown in Fig. 2, the LQI shows a significant correlation with PER, and thus a one to one mapping function can be set up to obtain PER probability of the current packet through LQI. As specified in the standard, IEEE 802.15.4 employ a Cyclic Redundancy Check (CRC) with a length of 16 bits as the frame check to indicate bit errors [15], which means a single bit error will flag the entire packet as in the error received state.
Therefore, once the PER value is ready, a BER value can be calculated using Eq. (6) and the packet length. The packet length is also provided once a packet was successfully received. By indexing the empirical data (shown in Fig. 2), it will be easy to find out the equalised signal to noise ratio in an AWGN channel, which is the expected Effective-SNR. Hence, in the online process, once a packet has been successfully received, the Effective-SNR can be simply obtained through searching the look up table discussed in Sections 3.2 and 3.3 with the index of LQI and packet length.

Kalman filter design
The design of KF1 is to address the variation of signal strength P rss and environment noise N e by filtering the measurement noise. Although the function of KF1 is similar to the average filtering method, Kalman filter may give higher accuracy with faster tracking ability. Considering that the packet transmission and environment noise are subjected to the fading effects, P rss and N e can be assumed to be slowly changing variables. Therefore, the system can be modelled as: where w s and w n represent the impact of fading on the signal and the environment noise, respectively. w s and w n are assumed independent with zero mean Gaussian distributions.
For the sake of compact notation, Eq. (7) can be rewritten in vector form, which gives the following state evolution equation: is the state variable of the dynamic sys- In the RSSI-SNR model, it can be seen that the state variable can be observed by the RFIC 3 directly and is subject to measurement noise, which is mainly contributed by the internal noise. Therefore, the observation equation can be written as: Once the state space model has been setup by Eqs. (7)-(9), the associated Kalman filter is straightforward [36].
where x À k is the a priori estimation of state, x k is the a posteriori estimation of state, P À k 2 R 2Â2 is the a priori estimated error covariance, P À k 2 R 2Â2 is the a posteriori estimated error covariance. K À k 2 R 2Â2 is the Kalman gain, Q is the variance of state noise and R is the variance of measurement noise. Since the initial value P does not affect the converged value of K, a non-zero matrix can be assigned to P as the initial value, and K will automatically converge to the final value. The appropriate values of P and Q will be determined empirically and discussed in the next section.
Unlike the first Kalman filter, the second Kalman filter is trigged only if the LQI of received packet is less than 255. Once the second Kalman filter has been activated, it will use the output of the first Kalman filter as one of its measurements through a simply deduction of two states variables. As discussed in Section 3, the SQD can be approximated to be a static variable over short time-scales. Hence, the estimated SQD rather than Effective-SNR can be more useful in this Kalman filter design, because the maintained variable could be used to estimate Effective-SNR when the LQI is not provided. Then the state equation is given by (11).
. w snr and w sqd represent the variations of the SNR and SQD, from the view of the signal strength degradation and signal distortion, respectively. Theoretically, these two noises depend on the environment and channel status, but change following different models as discussed in Section 3, which can be assumed to be independent. However, in the imple-mentation, the SQD is calculated through a linear process from SNR to LQI, making these two noises correlated. As a result, the independence between w snr and w sqd is not met to some degree, which will degraded the tracking performance. However, our preliminary experiments show that the correlation between these two noises is relatively small. In order to reduce the computation costs, it is assumed that these two noise are independent. Although the assumption may degrade the performance, the performance drop is slight. This is verified by our experiments where the proposed Kalman filter system can still converge and track the system variation.
The observation equation can be written in Eq. (12). where v snr and v lqi are the measurement noise caused by tolerances in the hardware design.
In common with the evolution of KF1, the second Kalman filter can be solved by applying Eq. (10) to the model described in (11) and (12). Note that, the parameter matrices of KF1 (i.e., A, B, C, D, P, Q) in (10) should be replaced by the parameter matrices of KF2, respectively.

Estimating the covariance matrices
It is well known that the performance of a Kalman filter depends on the accuracy of the parameter matrices, particularly the process noise covariance matrix Q and the measurement noise covariance matrix R. In practice, the selection of Q and R play an important role on the evaluation of Kalman filter.
Since the measurement noises are devices dependent, different hardware platforms have different noise features and the theoretic derivation of these covariance matrices may not accurate enough for all platforms. This is particularly true to the low cost platforms like WSN nodes. In practice, it is more straightforward and accurate to obtain these covariance matrices from carefully designed experiments in an offline fashion. In the following sections, we will describe the process of obtaining these parameters (b) (a) Fig. 5. Statistic of measurement noise. 3 To obtain the environment noise indicator a carefully designed MAC protocol is required to avoid the effect of interference, especially for applications which enable concurrent transmission.
for one hardware platform. The same process can be applied to and works for all other platform as well.

Measurement noise
The variance of the measurement noise, i.e. internal noise, can be accurately calculated through an AWGN based experiment as shown in Fig. 1. In this experiment the values of P tx , PL can be manually set, external noise removed and fading effect negated. Therefore, it is reasonable to consider this as the true value of received signal strength. This can be validated with standard measurement equipment, i.e. a spectrum analyser.
We are then able to determine the measurement noise through a comparison between the P rss and the RSSI measurement produced. Using the statistic methods, it is straightforward to calculate the variance R as shown in Fig. 5A. As the measurement of RSSI raw and NOI are obtained using the same method at different time points, the variances should be same. Due to the manufacturing and components tolerances, the devices used exhibit slightly differing performance parameters. As shown in Fig. 5B, a similar method can be employed to determine the variance of the LQI detection and finally calculate the measurement variance of Effective-SNR. Differing from the RSSI measurement, the detection of LQI is only based on the correlation of symbols inside the data frame and thus can expect to be hardware independent.

Process noise
Unfortunately, the process noise in the proposed Kalman filter is caused by the fading channel, hence, its vari-ance will be highly dependent on the deployed location of the WSNs system. Similar effects have been reported in [7], which implemented the experiment in different locations and showed variance changes between 1.9 dB and 12.34 dB. Due to the implementation limitation, the noises on SNR and SQD are correlated and the off-diagonal entries of the covariance matrices are non-zero. However, according to our implementation experience, their correlation is relatively small which means that the off-diagonal entries are close to zero. Thus it is convenient to assume they are independent and adopt diagonal covariance matrices for the purpose of reducing the computation costs of Kalman filter.
Although some methods has been proposed to estimate the unknown process noises, 4 their computation complexity make them not applicable to the WSN devices with limited computational resources. To determine an initial value of Q to start the Kalman process, we developed an experimental set up in an anechoic chamber with several metal devices positioned to cause multi-path reflections. The process noise can be observed by calculating the statistical distribution of the received packet number compared with the maximum possible value (i.e. when LQI is equal to 255). The process noise required by the Bi-KF system can be obtained by applying PRR into system models.

Simplified implementation of Kalman filter
From our experiment, it was seen that the dynamic range of the metric used in Kalman filter is relatively small and bounded. Therefore, we suggest that it is unnecessary to employ floating point numbers in this implementation. Without significant loss of accuracy, the 16-bit fixed point method with a scale of 128 (i.e. a measurement of 1 will be scaled to 128, giving a resolution around 0.01 and the fullscale of [À256 256]) was employed.
Given that the two states in Eq. (5) are independent of each other, the vector Kalman filter can be decomposed into two independent scalar Kalman filters, thus transforming the matrix inverse operation in Eq. (10) into a simple fix point division operation that greatly decreases the calculation cost. However, unlike the 1st Kalman filter, the calculations used in the second Kalman filter cannot avoid complex matrix operations, e.g. product and inverse. This consumes most of the calculation cycles required by this algorithm. Nevertheless, fixed point calculations can still be used for the second Kalman filter and result in a decrease in the computation time from 2.14 ms to 0.2 ms in our implementation. Considering that the normal packet delivery time is around 10 ms, such cost of computation and time can be well accepted in WSNs.

Experiment results
We have implemented the proposed estimation algorithm on a COTS platform, where the MCU is an ATme-ga128 working at 8 MHz. Such a configuration is comparable to most low-power WSN platforms (e.g. MicaZ, TelosB). We therefore suggest that the proposed algorithm is capable of being implemented on almost all common WSN platforms. The experiment has been setup in our laboratory, which contains instruments and workbenches with metal surface. As it is expected, such an environment demonstrates relatively high fading effects, which has been confirmed using an RF network analyser. As shown in Fig. 6, different channels will suffers from different degree of fading. However, the fading is highly related to the location of two RF probes and cannot be guarantee even for the same channel as channel quality varies significantly with even small changes in location.
In the experiment, the transmitter was configured to work in saturation mode, meaning there is always a packet ready in the queue to be sent. A wideband RF source and antenna was located near the receiver and was used to generate noise in the wireless channel. Each packet contained a 100 bytes information payload. The receiver recorded several metrics including: the number of packets it received at one second intervals, the averaged LQI for the period, instantaneous values of LQI and estimated Effective-SNR and raw SNR at the start of the period. It should be noted that the averaged LQI cannot be employed in the real application as it is a posteriori statistic value, and we provide it only as the upper-bound of the a priori indicators.
The experiment shown in Fig. 7 was undertaken in the presence of adjustable environment noise from a wideband signal generator ranging from À39 dBm to À28 dBm. As a result, the link quality of the wireless channel will inevitably be affected, which can be observed by the decrease in the number of successfully received packets. To simplify the illustration, we normalised the received packet number to give a Packet Receive Ratio (PRR, which is equal to 1-PER, but easier to measure in the experiment) by comparing each result with the maximum number of received packet number. This can be seen to decrease steadily with increasing environment noise strength as shown in Fig. 7a. The averaged and instantaneous LQI performance is shown in the second subplot. Both of them decreased nonlinearity, while the instantaneous LQI demonstrates a very high degree of variance. In the third subplot of Fig. 7a, we provided the raw SNR calculated  from the quantised RSSI raw and the estimated Effective-SNR with trend lines to illustrate the averaged values. These two indicators also decreased with increasing environment noise, while the Effective-SNR has much less variance and better linearity than the SNR. It is easy to understand that the lower the variance, the more reliable the estimation. To highlight the degree of variance, the experimental data has been further processed to show the correlation between the indicator and the PRR result, which have been illustrated in Fig. 7b. In the figure, we use a double arrow to briefly demonstrate the variance margin of different indicators. Cleary, the Effective-SNR shows the smallest variance among the three indicators, only slightly worse than the chosen upper-bound; the averaged LQI. The instantaneous LQI values tend to show much wider variance than the Effective-SNR, while the quantised RSSI raw based indicator is loosely correlated with the PRR with lower resolution. We also presented the result of increasing the channel quality, where the transmitter power was varied at transmitter from À12 dBm to 0 dBm, in Fig. 8a and b. The experimental results in Fig. 8 show almost the same trends as seen in Fig. 7, which demonstrate that the indicators are independent of the cause of channel quality change.
It is clear that in both experiments the Effective-SNR indicator shows very high correlation with the PRR, demonstrating the suitability of Effective-SNR as a channel performance indicator. To further examine the accuracy of applying indicators to estimate the channel capacity, a program has been implemented in MATLAB, which utilised the indicators obtained to estimate the error performance in the corresponding time period with the help of the error estimation model discussed in [38]. In order to better understand the comparison between different estimated results, a Root Mean Square (RMS) and a standard deviation (STD) of the residual are proposed as performance criteria.
Let ðPRR k Þ denotes the estimated PRR, the residual was defined as: Then the RMS and STD for N data samples can be defined as: where r k is the mean value of the N samples.
The RMS and STD of the residual error for different estimation methods are provided in Table 3. In general, the proposed Kalman estimator method (highlighted with bold in the table) significantly outperforms other methods approaching the averaged LQI value which is provided for reference. These results validate the effectiveness and improvement gained by the proposed Kalman filter based estimation method. In which a more reliable Effective-SNR is generated without high transmission overhead in WSNs.

Conclusion
In order to utilise the maximum capacity of WSNs in high-bandwidth and high noise applications, an accurate and low cost estimation of link quality must be available. This paper proposes a novel Kalman filter based algorithm to provide an accurate estimate of the link quality. In particular, we have examined the effect of different channel indicators including SNR and LQI, based on experiment results. We then derived a general model to describe the variation of link quality through the study of the relationship between these results. A more efficient, statistical scheme based on the Kalman filter has been proposed. It should be noted that it is possible to employ a higher order Kalman filter to further improve the accuracy of the estimation. With the consideration of calculation cost for the resource constrained WSN platform, we propose to implement a linear Kalman filter to guarantee its implementation in such platforms. The demonstrated COTS WSN platform based implementation shows that such an algorithm can be implemented in the low cost fashion. In comparison with other existing link estimators, our approach focused on exploring a trade-off between accuracy and implementation to make it compatible with the existed resource constraints of WSNs. Experimental results in various scenarios have demonstrated the feasibility and performance of our proposal.
We have provided an easy method to implement link quality indicator, which is not only accurate in wide link margin but also be able to converge with only few inputs. The link quality estimator can be implemented in conjunction with a variety of the upper-layer algorithms in sensor networks, such as exposed terminal problem and data rate adaptation. The utilisation of our approach by existed algorithms can be expected to produce higher performance, due to the reduction of overhead caused by other estimation methods and the improvement in accuracy of the proposed estimator.