## 5 Transmission Power Control Algorithms  
In this section, we shortly describe our approaches for the transmission power control (TPC approaches) for WBSNs, which were initially introduced in [6,7]. We present again the main ideas of these algorithms, as the work presented here is an experimental validation of both approaches in a realistic simulation scenario, as well as the upgrade of the Castalia simulator to support both TPC policies.  
Firstly, our reactive algorithm requires that each subject/patient has been previously characterized completely with respect to the RSSI and PER metrics in all scenarios (body positions) and for all transmitted power levels of the radio. Once the communication link is correctly characterized, the computation of the optimal transmission power level is done off-line, using the experimental traces and resulting in a LUT of power levels. The control of the transmission power is done on-line by using the movement detection based on acceleration with low complexity and low overhead (see Figure 2). A detailed description of this algorithm is presented in [6].  
Our RSSI prediction-based transmission power control, introduced in [7], consists of two blocks (see Figure 3): an A-LQE model for the specific link, which was explained in Section 4, that allows the  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Link** & **Inputs Name** & **RMSE** & **R2** & **MAE** \\ \hline L1 & Ptx /BPosition /BFM/MUAC & 5.38 & 0.84 & 4.21 \\ L2 & Ptx/BPosition/LLL & 4.66 & 0.85 & 3.6 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Link quality estimator models based on ANFIS (Adaptive Neuro-Fuzzy Inference System) (A-LQE) for both links with the training dataset.  
Figure 2: Reactive algorithm for the transmission power control.  
prediction of the RSSI variations, and a block named the TPC block, which adjusts the transmission power to the minimum value found experimentally to assure that the RSSI value does not drop below a threshold.  
From the RSSI value predicted by the A-LQE model, the TCP block gives as a result an adjusted power level. This power value corresponds to a fixed value that is assigned according to the type of policy chosen (conservative or aggressive) into a range determined from the simulation dataset. In the TCP algorithm, the range of RSSI values are divided into three zones: (1) Zone 1, RSSI values lower than the minimum simulation threshold (Tmin = \(-80\) dBm); (2) Zone 2, RSSI values between \(-80\) dBm and \(-75\) dBm; (3) Zone 3, RSSI values over \(-75\) dBm. The number of zones can be defined by the transmission power levels available in the radio; thus, for a larger number of power levels, a larger number of zones are defined, allowing a finer granularity in the output power.  
According to the experimental and simulation results previously obtained, we have decided to implement an aggressive focus for both links, with transmission power levels from 0 dBm to \(-10\) dBm for Link 1 and from 0 dBm to \(-15\) dBm for Link 2. The lowest transmission power level (\(-25\) dBm) was not selected, because there are some critical positions from the point of view of packet loss that do not admit these power values.