# Wireless Sensor Networks for Enabling Smart Production Lines in Industry 4.0
## 3 Algorithm Implementation and Validation via Simulations and Measurements
### Implementation
#### 3.1.3 Reconfiguration  
The PHY parameters that are reconfigurable depend on the technology. The reconfigurable parameters we consider are listed in Table 2 for different technologies.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Standard BW Mode** & **Narrow BW Mode** \\ \hline Bandwidth (MHz) & 2 & 0.25 \\ Data rate (kbps) & 250 & 31.25 \\ Sensitivity (dBm) & \(-\)98 & \(-\)107 \\ \hline \hline \end{tabular}
\end{table}
Table 1: IEEE 802.15.4 PHY software-defined radio (SDR) characteristics [52].  
The reconfiguration algorithm is outlined in Figure 5. For IEEE 802.11n/ax WiFi, we can adjust the transmit power, frequency, and MCS. When the throughput QoS is not met and the 5 GHz frequency band is used, we switch to the 2.4 GHz frequency band as PL increases with frequency. When we already use the 2.4 GHz band, we try to lower the MCS if possible. If, by lowering the MCS, we cannot achieve the required throughput, we increase the TX power to the maximum value. For LoRa, we can change the TX power but also change the spreading factor, which defines the used modulation array. As the sensitivity increases with increasing spreading factor, we first try to increase the spreading factor. If this is not possible, given the required data rate, the TX power is increased. For BLE 5.0, we have three different PHY versions: the 1 Mbps PHY used in BLE 4, the 2 Mbps PHY, and the Coded PHY. LE Coded PHY has a lower receiver sensitivity than the LE 1M and LE 2M PHYs. We can switch between the three PHYs, and we can modify TX powers. As BLE uses adaptive frequency hopping, we do not set the frequency channel.  
For the chirp spread spectrum (CSS) PHY used by IEEE 802.15.4, we can only change the frequency and TX power. We also consider an SDR which is IEEE 802.15.4 compliant but has a configurable channel BW. By lowering the channel BW from the 20 MHz defined in the IEEE 802.15.4 specification [55] down to 2 MHz, the data rate lowers from 250 kbps to 31.25 kbps and the receiver sensitivity of the radio improves from \(-97\) dBm to \(-110\) dBm. Therefore, using a narrower band, the receiver sensitivity decreases, and the coverage increases at the cost of a lower data rate. If using the narrowband mode is not sufficient, we increase the TX power.  
Note that for the technologies listed in Table 2, the maximum TX power is defined by regulations. To have the flexibility for the reconfiguration, we select a default TX power that is lower than the maximum allowable TX power. This results in more APs being placed on the floor plan than necessary, but it allows for more flexible reconfiguration due  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Technology** & **Transmit Power** & **Frequency** & **MCS** & **Bandwidth** \\ \hline IEEE 802.11n/ax & ✓ & ✓ & ✓ & \\ LoRa & ✓ & & ✓ & \\ BLE & ✓ & & ✓ & \\ SDR IEEE & ✓ & ✓ & & ✓ \\
802.15.4 & ✓ & ✓ & & ✓ \\ standard IEEE & ✓ & ✓ & & \\
802.15.4 & ✓ & ✓ & & \\ \hline \hline \end{tabular}
\end{table}
Table 2: Reconfigurable physical (PHY) layer parameters for different technologies.  
Figure 5: Reconfiguration algorithm: reconfiguring PHY parameters for different wireless technologies.  
to environmental changes. The optimal default TX power is derived from simulations, presented in Section 4.  
When a reconfiguration is triggered, a process is started to verify whether settings can be reverted, that is, whether we can decrease TX power. As an example, when machinery is moved in the factory, the RSSI of one link can decrease, causing a reconfiguration. On the other hand, the RSSI of another link can increase so that it is not needed anymore when a certain AP transmits at full power. For WiFi, we also verify whether we can use the 5 GHz frequency band (to minimize interference with other APs). LoRa APs could decrease the spreading factor, and BLE APs that use the coded PHY could revert to the LE 1M PHY.