## 4 Implementation of the Experiment Results in OMNeT++ Discrete Event Simulator  
Implementation of Packet Error Rate Distribution in OMNeT++ Discrete Event Simulator for the Study Results  
The aim of this work was to model the link quality estimators in the OMNeT++ discrete event simulator. The PER in OMNeT++ discrete event simulator varies according to the obtained power level at the receiver's antenna, which is given by the RSSI. In addition to the characteristics of the used hardware, as a result of the measurements in Sections 3.1.1 and 3.1.2, different levels of sensitivity and other values for the PER to rise from 0% to 100% were given.  
The OMNeT++ discrete event simulator has a predefined error model, which is located in the physical layer of the INET framework. In the packet-level package, the model contains different error models such as BER, sequence error rate (SER), and PER. This model is static, lacks inputs, and is limited. It is based on the variation in the distance in 802.11g wireless networks.  
The PER function was implemented in the physical layer of the INET framework in the APSK error model. This module is based on the RSSI module, in addition to the sensitivity and the transition interval parameters that define the radio chip. The sensitivity and the transition interval are initialized by the user using the initialisation (INI) file. An editor considers all supported configurations to different module options and offers them in several forms. The module is described by the inheritance diagram in Figure 18.  
The computePacketErrorRateBrssi application protocol interface (API) includes the error function modeled in Section 3.2, with the Weibull distribution that was included in the transition interval when the PER passed from 100% to 0%. The PER calculation was registered during the simulation in the receiver part as a signal message. The OMNeT++ discrete event simulator has a hierarchical architecture: it connects different modules, and those modules communicate through signals to send it to the result-recording module. The results are saved as a vector.  
A simulation scenario was built in the OMNeT++ discrete event simulator, where two WuRxs were becoming closer to each other. The path-loss attenuation decreased, resulting in the RSSI built-in function increasing and the PER dropping from 100% to 0%.  
Figure 19 gives the simulation result on the wake-up radio chip based on AS3933 after entering the according sensitivity and transition interval, which are provided by the nonlinear regression error function in Section 3.2: \(-\)59.55 dBm sensitivity and around 3.01 dB transition interval. It is clear that the distribution had no significant impact on the PER curve, as shown in Figure 20. The obtained result for the WuRx based on the LFPM was due to the shorter transition interval of the AS3933 WuRx 3 dB compared with that of the SPIRIT1 transceiver, which is almost 7 dB.  
Figure 17: Noise distribution modeling block diagram using multiple stages of Weibull function.  
Figure 19: Simulation of WuRx Based on AS3933 LFPM PER model in OMNeT++ discrete event simulator.  
Figure 20: Simulation of Spirit1 transceiver PER model in OMNeT++ discrete event simulator.