# Performance Analysis of Two-Hop mmWave Relay Nodes over the 5G NR Uplink Signal
## 3 Link-Level Co-Operative Simulator  
In this section, the link-level co-operative simulator for the uplink mmWave MIMO NR relay node co-operative system is described and presented in Figure 7. To achieve its simulation, the MatlabTM and SimulinkTM software have been used. Furthermore, it should be noted that the developed link-level co-operative simulator takes into account realistic assumptions for node implementations, for example, NI-USRP 2944R, mmWave Transmitter Chain, and mmWave Receiver Chain, in which the two last will be described in detail in this section. From the figure, it can be seen that the developed simulator is composed of one New Radio User Equipment (NR-UE), which is achieved with a baseband unit through the MatlabTM tool, where the digital algorithms, for example, symbol generation, M-QAM modulation scheme, coding of the UL-SCH and PUSCH channels, and CP-OFDM waveform generation, have been performed. These characteristics fulfill the requirements of the 5G uplink 3 GPP in [19; 20]. Additionally, the RF stage (Digital/IF/RF Unit) is implemented by means of SimulinkTM software, where the mmWave Transmitter architecture has been developed [18] and is shown in this section. At present, there are many computer programs that simulate the real operation of communications systems, especially when their implementation is mathematically complex or difficult to reproduce. In this sense, in this work the MatlabTM and SimulinkTM software are used, also employing the Monte-Carlo simulation method. Here, the Monte-Carlo method, considering the simulator in Figure 7, first determines and configures the input signals. Therefore, the frame number (\(10^{3}\)) to evaluate has been defined for each SNR point, as well as the SNR vector, which in this work has been defined from 0 to 20 dB with a step of 2 dB. After that, the transmitted data symbols are randomly generated in the NR-UE. Additionally, the PUSCH and UL-SCH encoders are configured taking into account the transmitted data symbols and the employed modulation scheme (64-QAM  
Figure 7: Architecture of the link-level co-operative simulator for uplink mmWave MIMO NR relay node system. and 256-QAM). The other determined input parameters are the configurator of the access link channel in the mmWave band (26 GHz) and the backhaul link channel in the 3.5 GHz band. Furthermore, the path loss in the access and backhaul links are calculated taking into account the expression described in this section. On the other hand, the encoding and decoding functions in the NR relay node are defined. In the gNodeB side, the decoding functions are configured with the arrays to store the Key Performance Indicators (KPIs) of the system, and in this paper the throughput and Bit Error Rate (BER) have been measured. By creating the input variables, we are prepared to simulate the processing loop in the Monte-Carlo method, which is described by Algorithm 2. ```
for\(i\gets 1:2:SNR\)do for\(j\gets 1:Frame\)do
1. Transmitted data symbols from NR-UE. 2. Transmitted signal passes through the mmWave channel and it is added the path loss in the Access Link. 3. mmWave signal is captured, processed, and transmitted by the NR Relay Node (A&F or D&F). 4. Transmitted signal by the RN passes by means of backhaul channel and, furthermore it is summed the path loss of the link. 5. Calculates and stores the metric of the throughput for each frame. 6. Determines and store the BER for each frame, considering the transmitted signal by the NR-UE. 7. Calculates and stores the throughput mean for each SNR point. Determines and stores the BER mean for each SNR point. ```  
**Algorithm 2**Monte-Carlo processing loop in the link-level co-operative simulator  
On the other hand, A&F, D&F with or without the knowledge channel relaying protocols were carried out through Matlab(tm) (for the baseband signal processing) and Simulink(tm) (for the RF stage) software.