# A Novel Bitrate Adaptation Method for Heterogeneous Wireless Body Area Networks
## 3 Novel Rate Adaptation Method
### Proposed Novel Method for Data Streams Allocation  
Considering the objectives and assumptions listed above, a new method, AMASD, was developed. The block diagram of the method is shown in the Figure 2.  
The developed AMASD method presented in Figure 2 uses the following data for the estimation and prediction of the radio channel parameters:  
* RSSI [dBm]) parameter obtained from the NB RI, with a minimum 1 dB measurement resolution required;
* total power (TP) [dBm] obtained from the UWB RI, with a minimum 1 dB measurement resolution required;
* parameter _xLOS_ [dB] determines the condition of direct visibility of the radio link antennas, which is obtained based on the UWB channel impulse response (CIR); and
* RDM [m] obtained from the UWB RI, where the error of the distance estimation between the nodes should not exceed 2 m.  
The CIR estimation allows the LOS/NLOS conditions to be determined based on the first path power (FPP) and TP. For this purpose, the _xLOS_ parameter was defined as [27; 28]:  
\[xLOS\ =\ TP-FPP. \tag{1}\]  
The floating point _xLOS_ value was low-pass filtered, which eliminates the false alarms about the change of LOS/NLOS conditions by minimizing the fluctuations of the signal power and the power of the first path difference. The filtration can be carried out using a linear MAF, which is a special case of the finite impulse response (FIR) filter, whose length, \(M\ =\ 10\), was determined empirically. This filter can be described as follows:  
\[\overrightarrow{y}[n]\ =\ \frac{1}{M}\sum_{j=0}^{M-1}\overrightarrow{x}[n-j] \tag{2}\]  
where \(\overrightarrow{x}\) is the input data vector, and \(\overrightarrow{y}\) is the output data vector. The MAF, due to its drawbacks, i.e., filter delay, computational complexity, and operational memory demand, can also be replaced by the implementation of a single tap infinite impulse response (IIR) filter [29], expressed as:  
\[y[n]\ =\ \alpha\cdot x[n]\ +\ (1-\alpha)\cdot y[n-1], \tag{3}\]  
where the \(\alpha\) parameter is the filter coefficient. According to ref. [26], there are many methods to calculate the value of the \(\alpha\) parameter based on the length of the MAF. One of them is to minimize the function:  
\[J(\alpha\ )\ =\ \sum_{i=0}^{M-1}\left(\alpha\ (1-\alpha)\ ^{i}-\frac{1}{M} \right)^{2} \tag{4}\]  
Solving numerically Equation (4) for \(\alpha\ \epsilon[0;1]\), the value, \(\alpha_{\min}\ =\ 0.13\), that minimizes the function, \(J(\alpha)\), for the implementation of the MAF with the length, \(M\ =\ 10\), is determined. Then, a binary decision system is used, which is implemented in accordance with the dependence:  
\[xLOS^{\prime}\ =\ \left\{ \begin{array}{ll}0,&\mbox{where}\ \ \ xLOS\ <6\ \mathrm{dB}\ \ \ (\LOS\ conditions),\\ 1,&\mbox{where}\ \ \ xLOS\ \geq\ 6\ \mathrm{dB}\ (\NLOS\ conditions),\end{array} \right. \tag{5}\]  
where \(xLOS^{\prime}\) is the binary information about the LOS/NLOS conditions used in the channel estimation and prediction block for grouping system loss data. It should be noted that system loss is understood  
Figure 2: Block diagram of the proposed developed novel adaptive method for data stream allocation (AMASD). as the difference in the power delivered to the terminals of the transmitting antenna and the power available at the terminals of the receiving antenna [30]. An innovative element of the developed method was the usage of RDMs for estimating the user motion parameters, and, consequently, performing the spatial filtration of the received power values and a dynamic system loss exponent determination. It was assumed that RDMs were realized at the beginning of the time slot, before sending the user data packet. This mechanism provides an additional function of the proposed algorithm, i.e., the minimization of the data loss probability. This means that if a packet of RDM procedure was lost (e.g., due to fading), user data was not sent in a given time slot due to the high probability of its loss in the same time slot.