## 3 Architecture and Design Methodology of the LHM-N Model
### Design Methodology of the LHM-N Model
#### 3.2.2 Design Methodology
Initializes\(\rightarrow\)\(BL_{O}\); \(BL_{G\mathit{Min}}\)\(BL_{F}\) ; % Block of originating, general minimum threshold, and forwarding packet length, respectively;
3. For \(BL_{G\mathit{Min}}\)\(\leftarrow\)\(BL_{F}\);
3. Move packet block to forwarding state;
4. if \(BL_{O}\)\(>=\)\(BL_{G\mathit{Min}}\);
5. Determine interface port address;
6. if \(BL_{O}\)\(<\)\(BL_{(\mathit{min-RC})}\);
7. re-route or find appropriate interface;
8. else if \(Port_{Addr}\)\(=\)\(Port_{RC}\)\(\&\)\(BL_{O}\)\(>=\)\(BL_{(\mathit{min-RC})}\) &&\(BL_{O}\)\(<=\)\(BL_{(\mathit{max-RC})}\) ;
9. Forward \(BL_{O}\) to RedCap;
10. else if \(Port_{Addr}\)\(=\)\(Port_{NB}\)\(\&\)\(BL_{O}\)\(>=\)\(BL_{(\mathit{min-NB})}\) &&\(BL_{O}\)\(<=\)\(BL_{(\mathit{max-NB})}\);
11. Forward \(BL_{O}\) to NB2-IoT;
12. else if \(Port_{Addr}\)\(=\)\(Port_{LR}\)\(\&\)\(BL_{O}\)\(>=\)\(BL_{(\mathit{min-LR})}\) &&\(BL_{O}\)\(<=\)\(BL_{(\mathit{max-LR})}\) &&\(BL_{O}\)\(<=\)\(BL_{(\mathit{max-LR})}\)
13. Forward \(BL_{O}\) to LoRaWAN;
14. else if \(Port_{Addr}\)\(=\)\(Port_{SF}\)\(\&\)\(BL_{O}\)\(>=\)\(BL_{(\mathit{min-SF})}\) &&\(BL_{O}\)\(<=\)\(BL_{(\mathit{max-SF})}\) &&\(BL_{O}\)\(<=\incremented \(BL_{O}\) is greater than or less than \(BL_{F}\), it should be forwarded to the appropriate interface. Else it should move to initialize \(BL_{GMin}\), then to \(BL_{F}\) state. End if conditions are met, otherwise the process begins again, then ends. Benefits of the PSFE Algorithm: PSFE uses a strategy that allows data packets to fulfill certain conditions before forwarding. Instead of forwarding packets arbitrary and too frequently, packets are accumulated to a substantial level before forwarding to their respective interfaces. This is because frequent packet forwarding causes excessive overheads to the packet header and trailer, thereby leading to errors, a sluggish network, and high energy. \[PO=\frac{Totalpacketlength-payload}{Total\,packetlength} \tag{3}\]  
The total packet length comprises the header length, trailer length, and payload size. The smaller the value of the protocol overhead, the better the efficiency of the device protocol. Further, because the PSFE does not follow conventional packet forwarding, session hijacking and injection attacks that use conventional brute force attack methods are overwhelmed and circumvented. Hence the benefits of PSFE includes:  
* Minimized packet-error forwarding
* Energy-efficient packet forwarding
* Lightweight and less overhead packet forwarding
* Reliable network packet forwarding
* Mitigation of session hijacking and injection attacks  
Phase 2: The Model: The design of the LHM-N model considers a system model comprising a transmitter (Tx) and a receiver diversity with two receiver (Rx1 and Rx2) systems; that is, a single-input multiple-output (SIMO) system. Figure 4 illustrates the receiver diversity (RX)-TCM system model. The transmitter is responsible for sending a bit stream (message signal), which has been encoded by the TCM encoder and modulated by a 16-QAM (quadrature amplitude modulation) modulator before transmitting. A Rayleigh fading channel is considered during this transmission. The signals received by the two receiving antennas are combined by the maximum ratio combiner (MRC) technique. The corresponding output is then demodulated and decoded by the TCM decoder; the result is then checkmated with the initial bits stream by the bit error rate (BER) estimator for error performance computation. Assuming the channel state information (CSI) is known at the receivers' side, the received signal \(y\) is represented as  
\[y_{1}=h_{1}x+n_{1} \tag{4}\]  
Figure 4: RX-TCM system model.png. \[y_{2}=h_{2}x+n_{2} \tag{5}\]  
where \(y_{1}\) is the signal received by antenna 1, \(h_{1}\) is the fading channel at antenna 1, \(x\) is the transmitted coded signal, and \(n_{1}\) is the Gaussian noise coefficient at antenna 1. Similarly, \(y_{2}\) is the signal received by antenna 2, \(h_{2}\) is the fading channel at antenna 2, and \(n_{2}\) is the Gaussian noise coefficient at antenna 2.