## 3 System Implementation in MATLAB
### Lossy System  
This section provides a brief description of the implementation of the PDCCH with path losses, considering the position of the user equipment (UE) (height and elevation angle) in relation to the 5G NR base station (gNB). The process of transmitting information for the PDCCH also initiates on the transmitter side with the transmission of 140 bits of information [4; 5].  
The following processes are then executed: DCI encoding, PDCCH encoding, and the OFDM transmission technique with a single-input single-output (SISO) antenna transmission system. The information is transmitted through the channel, incorporating losses generated by the path. On the receiver side, the following processes are carried out: the OFDM transmission technique, PDCCH decoding, and DCI decoding, leading to the retrieval of the transmitted 140 bits. For this scenario, losses generated by the path between the gNB, the UE, and the effect of noise are considered.  
Figure 1 depicts the flowcharts of the two implemented scenarios. The main distinction between the two scenarios primarily lies in the channel model and the parameters being evaluated in each scenario. For the first scenario (the lossless system), the outcomes are illustrated in terms of BER vs. SNR. Conversely, for the second scenario (the lossy system), the results are presented in terms of BER vs. transmit power (PTx), which is evaluated at varying UE heights and UE angles.  
It is worth noting that the calculations of distances, heights, and angles between the gNB and the UE are conducted using rectangular coordinates. This approach enables the formation of a right triangle that aids us in determining the losses. The angle is determined using the tangent function of the right triangle, as illustrated in Figure 2. The parameters of the right loss triangle are listed below:  
* \(gNBAlt\): The height of the gNB, which varies between 10 and 150 m;
* \(UEAlt\): The height of the UE, can take values from 1 to 10 m. This takes a value of 1.5 m for the system with angle variation losses;
* \(DiggNBAlt-UEAlt\): The difference between the height of the gNB and the height of the UE;
* \(DiggNB-UE\): The distance that separates the gNB from the UE. The gNB is located at \(x=0\), therefore, the value of the distance \(gNB-EUI\) represents the position of the UE. Having: 'RMA' scenario and no line of sight. So, \(10\ \mathrm{m}\ \leq\ DisgNB-UE\ \leq\ 5\ \mathrm{km}\);  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Transmitter:** & **Receiver:** \\  • & Source: 140 bits of control information; & • & OFDM demodulation; \\  • & DCI encoding—constituted by CRC 24, & • & Unmapping; \\ & polar encoding, and rate matching; & • & PDCCH decoding—constituted by \\ & PDCCH encoding—constituted by & & unscrambling and QPSK demodulation; \\ & scrambling and QPSK modulation; & • & DCI decoding—constituted by CRC 24 \\  • & Mapping; & & elimination, 5G polar decoding, and rate \\  • & OFDM transmission technique. & & unmatching; \\ \hline
**Channel:** &  • & Calculation of the evaluation parameters. \\ \hline \hline \end{tabular}
\end{table}
Table 1: Block diagram of transmission–reception implemented system [4; 5].  
* Angle: The angle of elevation (rad)) formed between the UE and the gNB. This value is calculated with the tangent function or can be assumed. The angle value is \(\pi/3\) [rad] for the PDCCH channel with height variation losses.  
Figure 1: The PDCCH system implemented in MATLAB. (**a**) Lossless System and (**b**) Lossy System.  
Figure 2: Downlink loss calculation triangle.  
All elements relate to the tangent trigonometric function, as shown in Equation (1).  
\[Tan(angle)=\frac{DiffNBAlt-UEAlt}{DigsNB-UE}=\frac{gNBAlt-UEAtl}{DigsNB-UE} \tag{1}\]  
To have the position of the UE on the \(x\)-axis of (1), solve for the value of \(DigsNB-UE\). The determination of the ranges of allowed angles works with \(gNBAlt=150\) m, while the limits are: \(10\) m \(\leq\)\(DigsNB-UE\)\(\leq\)\(5\) km and \(UEAtl\).