# Real-Time Statistical Measurement of Wideband Signals Based on Software Defined Radio Technology
## 3 Materials and Methods
### Software Implementation  
The main challenge of this project was the implementation of the software, which involved both digital signal processing and Python programming skills. Starting from scratch with the GNU Radio libraries and the Python programming language, we managed to implement the main functions of a SA, such as real-time frequency domain spectrum analysis, CP and CCDF measurement functions, with the possibility of saving the results, for bandwidths up to 160 MHz. GNU Radio is an open-source software development toolkit that enables the efficient design and implementation of software-defined radios (SDRs) and wireless communication systems through a wide range of signal-processing blocks [37]. It is written in the Python and C++ programming languages. GNU Radio provides a large collection of signal processing blocks for a variety of tasks such as modulation, demodulation, filtering, and coding. These blocks can be used to build custom communication systems, such as those for wireless communications, digital signal processing, and software-defined radio. The blocks can be combined and connected in a variety of ways to form a flowchart that represents the structure of the processing system. In the development of the CCDF and CP measurement application, the workflow (Figure 2) was divided into three stages: sample reception, filtering and spectrum monitoring (Figure 3), CP measurement, display and data save (Figure 4), CCDF calculation and plotting (Figure 5). \begin{table}
\begin{tabular}{l l} \hline  & \(\bullet\) & 2 transceiver card slots \\  & \(\bullet\) & Dual SFP+ Transceivers (1 GigE/10 GigE) \\  & \(\bullet\) & PCI Express over cable (MXI) gen1 \(\times\)4 \\  & \(\bullet\) & External PPS input and output \\  & \(\bullet\) & External reference (10 MHz, 11.52 MHz, 23.04 MHz, or 30.72 MHz) input and output \\  & \(\bullet\) & Expandable via 2 nd SFP+ interface \\  & \(\bullet\) & Supported master clock rates: 200 MHz and 184.32 MHz \\  & \(\bullet\) & Variable daughterboard clock rates \\  & \(\bullet\) & External GPIO Connector with UHD API control \\  & \(\bullet\) & External USB Connection for built-in JTAG debugger \\  & \(\bullet\) & Internal GPSDO option \\  & \(\bullet\) & 2 RX DDC chains in FPGA \\ FPGA & \(\bullet\) & 2 TX DUC chain in FPGA \\ Capabilities & \(\bullet\) & Timed commands in FPGA \\  & \(\bullet\) & Timed sampling in FPGA \\  & \(\bullet\) & Up to 120 MHz of RF bandwidth with 16-bit samples \\  & \(\bullet\) & 10 MHz to 6 GHz \\ UBX 160 USRP & \(\bullet\) & Up to 160 MHz Bandwidth \\ Daughterboard & \(\bullet\) & RF Shielding \\ Capabilities & \(\bullet\) & Phase Alignment Capable \\  & \(\bullet\) & Full duplex operation with independent TX and RX frequencies \\ \hline \end{tabular}
\end{table} 
Table 1: Main features of the USRP X310 platform. Figure 1: Hardware components of the system. Figure 3: Flowgraph of sample acquisition, filtering, and spectrum monitoring. Figure 2: Workflow diagram. The first approach was achieved using the USRP Signal Source, Band Pass Filter, Frequency Sink and Complex to mag'2. The USRP Signal Source is designed to be flexible and programmable, allowing users to modify the RF front end and digital processing to meet their specific needs. For example, in our case, the receive channel/ daughterboard, center frequency, sampling frequency, and gain were set. The sampling frequency also determines the measurement span. Since the sampling frequency must be an even submultiple of the master clock rates, a bandpass filter was used to measure only the useful bandwidths. The spectrum can be viewed after reception as well as after filtering. After this step, the flowgraph is split in two. All samples are sent on both paths and are transformed from a complex-valued signal to its magnitude squared (Figure 3). The complex to magnitude squared transformation is performed by calculating the square of the magnitude of the complex signal (calculated as the square root of the sum of the squares of the real and imaginary components).