# Real-Time Statistical Measurement of Wideband Signals Based on Software Defined Radio Technology
## 3 Materials and Methods
### Software Implementation
In the second step (Figure 4), to measure the channel power, we need the Moving Average block, which helps to calculate the moving average of a specific time slice. Next, the values are converted to dBm using a correction factor that is modified according to the reference equipment, and the result is displayed using Number Sink and saved to a.csv file using the Data Save block. The save block does not exist in the GNU Radio library and was developed for this application using a Python script. The last step (Figure 5) is to implement the CCDF function (Complementary Cumulative Distribution Function plot). It is a graph showing the probability that a random  
Figure 4: CP measurement, display and data save. Figure 5: Flowgraph for CCDF implementation in GNU Radio. variable is greater than a certain value. In the CCDF plot, the horizontal axis represents the possible values of the random variable, and the vertical axis represents the probability of obtaining a value greater than the value given on the horizontal axis. In GNU Radio, the CCDF calculation function is not yet implemented. To fulfill this requirement, it was necessary to create scripts in Python to facilitate the calculation, display, and saving of CCDF parameters. For this purpose, the following steps were taken into account when developing the Python scripts:  
1. The input data are transformed into a vector (a one-dimensional matrix) of a specified size from which the CCDF is calculated;
2. The mean value is calculated for all measured samples in the vector, using the reference point (0 dB) on the left side of the \(x\)-axis;
3. All samples are normalized to the mean, expressed in decibels (dB);
4. Each sample is assigned to a specific bin on the \(x\)-axis, ranging from 0 to 30 dB;
5. The total number of samples falling into each \(x\)-axis bin, relative to the total number of samples measured, is calculated and plotted as a percentage;
6. For greater precision, the \(y\)-axis is plotted in logarithmic format. As can be seen in Figure 5, points 2 through 6 have been implemented in the block written in Python and imported into GNU RADIO, called CCDF PLOT. This block performs the CCDF calculation, displays the graph, and saves the data from the graph. Figure 6 shows the results. In order not to overload the displayed graph, the display and storage of the mean, peak and crest values from the CCDF calculation were implemented separately. Figure 6 shows the final result of the software implementation when analyzing a wireless channel with a bandwidth of 40 MHz. On the main screen, the filtered wireless channel is displayed in the frequency domain, and on the left side, the parameters such as the Crest, Mean, Peak and Channel Power are also displayed. The second screen shows the CCDF graph, with the amplitude above the mean signal value (in dB) plotted on the \(Ox\)  
Figure 6: Complete software implementation—graphical user interface. axis and the percentage of time the signal reached the corresponding amplitude level (in %) on the _Oy_ axis. The four most significant indicators are extracted as pairs of percentages (10%, 1%, 0.1%, 0.01%)--amplitude above mean (dB) in the right area of the graph, as can be observed in Figure 6.