Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 5, No. 1, 2023 196 Spectrum Test System Based on XILINX FPGA Jie Su1, a 1Southwest Minzu University, Chengdu 610041, China a1307744592@qq.com Abstract: Gaussian channel is a radio frequency communication channel, which contains the characteristics of specific noise spectral density of various frequencies, resulting in arbitrary distribution of errors in the channel. Gaussian channel, often referred to as weighted Gaussian white noise (AWGN) channel. This noise assumes that the power spectral density (PSD) is constant over the entire channel bandwidth, and the amplitude conforms to the Gaussian probability distribution. The system takes the system generator as the development platform, combines matlab with the modern communication comprehensive experimental platform, and simulates and comprehensively realizes the designed spectrum test system. The analog signal input port is designed. The received analog signal is converted into digital signal through ADC module in the system, the time domain signal is converted into frequency domain signal through fast Fourier transform, and then converted into analog signal through DAC module, and output to the display instrument for display. Keywords: FPGA, MATLAB, Gaussian channel. 1. Introduction 1.1. System development background With the rapid and large-scale development of mobile communication, the threshold in the field of communication is also getting higher and higher, so at present, how to promote the modern cause of communication through the integration of multi-disciplinary development has become the top priority to be solved urgently. Probability theory and stochastic process, a basic course of mathematics, is one of the subjects closely related to communication. Signal processing in the field of communication has a great dependence on stochastic processes. Due to the limitation of frequency bandwidth, how to allocate the frequency band reasonably through the method of probability theory is also the key point to be considered in the future. It is not difficult to find that the course of probability theory has great influence and strong importance in the field of communication, so some people conclude that if the foundation of probability theory can not reach the undergraduate communication, there will be no law, and if the foundation of random process can not reach the scientific research work of communication. Probability theory is mainly applied to signal science in communication, that is, to study the system stability resistance when the system interferes with the input signal system and to use the interference to propagate the signal. The distribution of the interference signals of the actual system can be studied in many cases. How to ensure the stability of the system under the influence of these interference signals, how to control the overshoot, and how to improve the control error diffusion through coding are very critical issues. In addition, some communication methods rely on some specific human interference, such as Gaussian white noise (thermal noise). According to the traditional understanding, communication is the transmission of information. In today's highly informationized society, information and communication have become the "lifeblood" of modern society. Information is a kind of resource, only through extensive dissemination and exchange, can it produce use value, promote cooperation among members of society, promote the development of social productive forces, and create huge economic benefits. In the analysis of communication systems, stochastic process is a very important mathematical tool, because the signal and noise in communication systems have a certain degree of randomness, which needs to be described by stochastic process. In nature, there is a phenomenon that can only know the possible results of the phenomenon before it happens, but it is impossible to confirm which result will happen, which is the random phenomenon. For example, there are n communicators with the same performance and the same working conditions, and n recorders are used to record the output noise waveforms of each communicator. The result of the test shows that two identical waveforms cannot be found. It can be found that the change of the noise voltage of the communication machine output with time is unpredictable, which is a random process. The transmitted signal must have a certain degree of unpredictability, or randomness, otherwise it will lose the value of transmission. In addition, the interference and noise in the intervening system and the fluctuation of channel characteristics are also random. An example is thermal noise, which is generated by the thermal motion of electrons in a resistive component. Another example is that in mobile communication, the propagation path of electromagnetic waves is constantly changing, and the received signal is also randomly changing. Therefore, the source, noise and signal transmission characteristics in communication can be described by random processes. Stochastic process is a kind of process that changes randomly with time, and it can not be described by an exact function of time. The stochastic process can be illustrated from two different perspectives. One perspective is to view the stochastic process as a collection of time processes corresponding to the outcomes of different randomized trials. For example, in the analog electronic circuit experiment just finished, the principle of loudspeaker is used to realize signal amplification. If the external signal is not added and the scale of the oscilloscope is adjusted to the minimum, it can be seen that the waveform displayed on the oscilloscope is a signal waveform that changes irregularly with time. According to the principle learned, without considering the precision of the 197 experimental equipment, this irregular signal is likely to be caused by the thermal noise of the resistance in the system. From another point of view, random process is an extension of the concept of random variable. In other words, the value of a stochastic process at any time is a random variable. Therefore, we can think of a stochastic process as a collection of random variables at different times in the course of time. This perspective is more suitable for precise mathematical description of stochastic process theory, and can be better applied to communication systems. 1.2. Significance of system research In communication and control systems, Gaussian white noise is a very common noise signal, so it is necessary to use Gaussian white noise signal source to test and verify the anti- interference performance of the system. At the same time, Gaussian white noise signal source is often needed in the study of wireless communication channel characteristics. Therefore, it is very important to design a simple and reliable Gaussian white noise signal source for system detection and theoretical research. At present, many Gaussian white noise sources are implemented on software systems such as microprocessors and DSPs, because they can easily calculate sine and exponential functions by using function libraries. However, compared with software simulation, hardware simulator can greatly improve the speed of simulation. The existing hardware Gaussian noise generators are usually divided into two categories: physical noise generators and digital synthesized noise generators. Although the physical noise generator has high precision, but the circuit is more complex, so the digital noise generator is more used in the project. This paper presents a white Gaussian noise generator based on FPGA. Different from the traditional method, the design uses a direct look-up table technology and uses the additivity of normal distribution to obtain Gaussian white noise random numbers. Compared with other generators, it has the characteristics of fast speed, high utilization rate and simple structure. At the same time, the user can configure its parameters through the serial interface of the generator, which greatly improves the flexibility of the noise generator. The system is programmed with Verilog HDL, so it is easy to transplant and can be embedded in other systems as a functional module for testing and simulation. 2. Introduction of Related Software and Hardware Experimental Platform 2.1. Introduction of FPGA FPGA are often referred to as field-programmable gate arrays, which were originally proposed by Xilinx. Since Xilinx company produced the first FPGA in the world in the middle of 1980s, this new type of programmable logic device has won the favor of designers in the industry for its superior performance, and its application has been rapidly popularized. Compared with other programmable logic devices, the scale of FPGA can be very large, and it is common for a chip to integrate hundreds of thousands or even millions of logic gates. In addition, its logic function is not limited to logic gates, but can have more complex logic functions, thus greatly enhancing the function of the entire chip. With the rapid development of science and technology, the electronics industry has experienced a huge leap. The design of integrated circuits is developing in the direction of high speed, high performance, large capacity, small size and low power consumption. This development will inevitably lead to the increasing design scale and complexity of integrated circuits. Based on this situation, the emergence and development of programmable logic devices has greatly changed the traditional design method, which makes the design of electronic systems more simple, convenient, flexible and fast. With the emergence of system-level FPGA and system-on- chip, the design of hardware and software coordination and system design is becoming more and more important. 2.2. Introduction of MATLAB 2018 a software MATLAB is a large mathematical calculation software developed by MathWorks Company in the United States. It has powerful matrix processing and drawing functions, and has been widely used in various fields of scientific research and engineering technology. In scientific research and engineering applications, a large number of mathematical calculations are often carried out, including matrix operations. Generally speaking, these operations are difficult to be carried out accurately and quickly by hand, and approximate calculations need to be made with the help of computer programs. The main functions of MATLAB include: general numerical analysis, matrix operations, digital signal processing, modeling and system control and optimization applications, and the integration of applications and graphics in a user-friendly integrated environment. In this environment, the Matlab language expression of the problem solved is the same as its mathematical expression, and there is no need to program according to the traditional method. This characteristic of MATLAB language greatly reduces the requirements for the user's mathematical foundation and computer language knowledge, and makes the programming efficiency and computing efficiency extremely high, and can directly output results and exquisite graphics copies on the computer. MATLAB is the United StatesMathWorksBusiness produced by the companyMathematical software? ForData analysis, Wireless communication, Deep learning, Image processing And Computer vision, Signal processing Quantitative Finance and Risk Management, Robotics, Control System And other fields. MATLAB is the two words of matrix and laboratory.Combination, which means Matrix Factory (Matrix Lab), is a high-tech computing environment for scientific computing, visualization, and interactive programming. It willNumerical analysis, Matrix calculation Scientific Data Visualization and UnablLinear Of a dynamic systemModellingAnd simulation in an easy-to-use Windows environment, it provides a comprehensive solution for scientific research, engineering design and many scientific areas where effective numerical computation is necessary, and to a large extent gets rid of the traditional non- interactive.Programming language(E.g. C, Fortran). MATLAB andMathematica态MapleIt is also known as the three major mathematical software. It is second to none in mathematical science and technology application software in terms of numerical calculation. OkMatrixOperations, drawing functions and data, implementing algorithms, creating user interfaces, connecting programs of other programming languages, etc. The basic data unit of MATLAB is matrix, and itsInstructionExpressionIt is very 198 similar to the form commonly used in mathematics and engineering, so using MATLAB to solve problems is better than using C.FORTRANOther languages do the same thing much more easily, and MATLAB also absorbs the advantages of software like Maple, making MATLAB a powerful Mathematical software. In the new version, we have also added the rightC, FORTRAN, C++m JAVASupport for. 2.3. Introduction to VIVADO 2018.3 Software Vivado Design Suite, YesFPGAThe integrated design environment released by Xilinx in 2012. Includes a highly integrated design environment and a new generation of tools from the system to the IC level, based on a shared, extensible data model and a common debugging environment. It is also an open environment based on the AMBA AXI4 Interconnect Specification, IP-Xact IP Encapsulation Metadata, Tool Command Language (TCL), Synopsys System Constraints (SDC), and other industry standards that help tailor the design process to customer needs. The Vivado tool built by Xilinx combines various programmable technologies and can scale up to 100 million equivalentASICDesign of the door. Vivado tools feature a hierarchical device editor and placement planner that are 3 to 15 times faster and provide SystemVerilog with the industry's best supported logic synthesis tool, a 4 times faster and more deterministic placement and routing engine. And a "cost" function that can minimize multiple variables such as timing, line length, route congestion, etc. Through analysis techniques. In addition, the incremental process allows any ECO changes to be handled quickly with only a small reimplementation of the design, while ensuring that performance is not compromised. Finally, the Vivado tool leverages the latest shared scalable data models to estimate power, timing, and footprint at various stages of the design process, enabling pre-analysis to optimize integrated functions such as automated clock gates. 2.4. Introduction of System Generator for DSP System Generator is a digital signal processing software developed by XILINX. Its characteristic is that it embeds the IP module developed by XILINX into SIMULINK library, so that FPGA can be simulated in SIMULINK fixed-point, and compared with the floating-point simulation of SIMULIN itself. Assist to complete FPGA design and provide design efficiency. In addition, SysGen can generate a HDL netlist, which can be called by VIVADO, or directly generate a bitstream download file, which can be directly simulated on the FPGA development board without recompiling to Verilog and other hardware description languages, thus speeding up the development of DSP systems. However, the wide application of FPGA in the field of digital signal processing is limited by several factors. First, DSP developers are not familiar with hardware design; Especially FPGAs. They use Matlab to verify algorithms, program in C or assembly language, and usually do not use hardware description languages (VHDL or Verilog) to implement digital designs. Secondly, although VHDL language also provides many high-level language abstractions, VHDL programming based on parallel hardware system is quite different from serial programming based on microprocessor. Based on the above reasons, Xilinx developed a System Generator for DSP tool based on Matlab. SystemGenerator for DSP is a signal processing modeling and design tool based on FPGA in Simulink. The tool can represent a DSP system as a highly abstract module and automatically map the system to an FPGA-based hardware solution. Importantly, the System Generator for DSP implements these features without compromising hardware performance. Simulink provides a powerful high-level modeling environment for DSP systems, which can be widely used in algorithm development and verification. As a toolbox of Simulink, System Generator for DSP embodies these characteristics well, and at the same time, it can automatically convert the design into an efficient hardware implementation that can be synthesized. The hardware implementation is faithful to the original design, so there is a one-to-one correspondence between the design model and the hardware implementation at the sample points (defined in Simulink). By using Xilinx's well-designed IP (intellectual property) core, the hardware solution can have smaller latency and size. Although the IP block in the System Generator is functionally abstracted, it also has direct access to the underlying hardware details for designers familiar with FPGAs. For example, the System Generator multiplier module can be specified to use a dedicated high-speed multiplier element from the Virtex-ll family of FPGAs, a user-defined IP module can also be plugged into the system as a black box, and so on. 2.5. Introduction of experimental system platform Modern Communication Integrated Experiment Platform" is composed of FPGA core module, test and measurement module, AD/DA and GPIO module. The Experimental platform is equipped with 4-channel 8-bit serial ADC and 4- channel 8-bit serial DAC circuits, combined with MATLAB/SIMULINK algorithm simulation software, VIVADO/ISE development software, System Generator for DSP (SysGen) algorithm logic software and other development tools. Users can directly carry out all the work and processes such as floating-point simulation of algorithms, fixed-point simulation of FPGA and logic implementation in the collaborative environment of SIMULINK. With the help of SIMULINK's perfect signal generation, observation and analysis tools, the signal on the FPGA chip can be analyzed in real time. At the same time, the platform also has VGA, Ethernet, audio, USB and other peripherals and expansion interfaces, so that FPGA can communicate and exchange data with PC or other peripherals. In addition, the platform is equipped with DIGILENT Analog Discovery2, which can provide dual-channel oscilloscope, signal source, 16-bit logic analyzer, network analyzer, spectrum analyzer and other functions, so that the computer with the experimental system can independently complete all aspects of algorithm simulation, design, implementation, testing and debugging. It gets rid of the shackles of traditional test instruments and equipment on the experimental platform. The System Generator is produced by Xilinx CorporationDigital signal processingBy embedding some modules developed by Xilinx into the Simulink library, fixed- point simulation can be carried out in Simulink, and the type of fixed-point signal can be set, so that the difference between fixed-point simulation and floating-point simulation can be compared. And can generate a HDL file, or a netlist, which can be called in ISE/VIVADO. Or directly generate a bitstream download file. 199 3. The System Function Module Design First, the signal sent from the signal transmitter is subjected to analog filtering and amplification to follow the output signal to meet the range of A/D acquisition for A/D conversion. The AD conversion control module is designed through the system generator, and the module is converted into Verilog language, and the bit file is synthesized in vivado, at the same time, each pin of ADC is constrained to complete the data interaction between external data and FPGA. Secondly, FFT module is developed with Matlab. Thirdly, the discrete digital signal uses FFT IP core to complete fast Fourier transform and amplitude correction, and calculates the frequency spectrum of the signal. Fourthly, the results are compared with Matlab simulation, and the analysis results have satisfactory accuracy. 3.1. Information source module Figure 1. Encoding Module The main process of the encoding module is: Encoding is cognitively a basic perceptual process of interpreting incoming stimuli. Technically, this is a complex, multi-stage transformation from more objective sensory inputs (such as light and sound) to subjectively meaningful experiences.Character encodingCharacter encoding is a set of rules that can be used to pair a collection of natural language characters, such as an alphabet or a syllabary, with a collection of something else, such as numbers or electrical impulses. The code isInformationThe process of converting from one form or format to another. Also called the code of a computer programming language. To encode characters, numbers or other objects into digital codes by a prescribed method, or to convert information or data into prescribed electrical pulse signals. Code inElectronic computer, TelevisionAnd is widely use in remote control, communication and that like. Encoding is the process of converting information from one form or format to another.Decode, is the inverse of the encoding. Figure 2. Source Module The main purpose of the source module design is to generate a variety of different signals for comparison of simulation data. It uses a 1-of-8 data selector that selectively enables the source module to generate a total of eight modulation signals. As shown in the following figure. 3.2. Noise module 200 Figure 3. Noise Module (1) Enable module (2) ROM module: generate noise through ROM The parameter configuration is shown in the figure below: Figure 4. Counter Parameter Configuration Figure 5. ROM Parameter Configuration 201 3.3. D/A module Figure 6. D/A Module The D/A conversion module has been packaged, as shown in the figure above. The module mainly defines the output pin symbol, digital signal conversion, analog signal and clock control. In order to display the data after FFT on the oscilloscope, we need to use the D/A module. DA drive circuit design: Due to the development of modern computing communication and electronic circuit technology, the current mainstream communication systems are mostly digital communication systems, but because people can not directly identify digital signals, they need D/A modules to convert digital signals into analog signals, and then through different types of displays, they can bring intuitive representation to people. The main purpose of the DAC module design is to make the simulation waveform generated in the FPGA easy to observe in the external oscilloscope through digital-to-analog conversion. The parameter configuration is shown in the figure below: 3.4. System module Figure 7. System configuration 202 As shown in the figure above, the System Generater module is also the most important module in this stage. Because it is directly related to the clock control of the whole system, the corresponding chip model, and the type of code to be generated. Specific parameter settings are as follows: (1) Compilation: Compilation type setting and determining the generation type of System Generator code. (2) part: This part is to select the corresponding FPGA model. We chose the csg324 chip here. This module plays the role of system clock in the whole system, just like the clock in daily life, there is a default timing system, which effectively unifies and coordinates the orderly progress of all aspects. When the entire simulation system architecture based on System Generator is successfully simulated on the computer, we can double-click this module, click the Generate button, and then a corresponding netlist file will be generated. We will pass the Vivado software in the next link. Convert the data in this folder to a BIT file. 4. Simulation and Test This design is completed in simlink and generates vivado project. The following will simulate and test the whole system. 4.1. Gaussian channel simulation test Figure 8. Overall Design of Gaussian Channel The overall design of the Gaussian channel is shown in the figure. In order to observe the change of signal waveform and noise more obviously, a switch and a noise enable terminal are added to control the input signal waveform. The input waveform in this Gaussian channel simulation is AM modulation signal, as shown in Figure 5.2. After adding the noise, the oscilloscope displays the waveform as shown in Figure 5.3. It can be seen that the noise is superimposed on the signal, and the test result is correct. And the signal-to- noise ratio of the channel at this time is about 2.4 dB. 4.2. Simulation results Figure 9. Waveform of AM modulation signal 203 Figure 10. DSB Modulation Signal Waveform As shown in the figure above, it is the output result when the DSB is used to simulate the signal source. The upper and lower parts are the output without noise and with noise respectively. Figure 11. FSK Modulation Signal Waveform 5. Summary and Analysis Wireless channel is the most important part of the communication system. It is related to the quality of information exchange in our daily life. Previous research on channel is measured in the actual test environment, which not only wastes manpower, material and financial resources, but also changes the physical characteristics of the channel, even in the same place and different time periods. In order to solve this problem, the channel modeling technology has been recognized. This not only reduces human and financial resources, but also reduces the complexity of actual measurement. However, the predecessors usually only simulate the transmission model of the channel on the computer and study its related physical characteristics, and there is little research on the use of hardware to achieve the channel model. Based on the above ideas, this paper decided to use FPGA to complete the hardware design of the channel simulation platform. In this paper, the background and significance of the research are described first, and then the physical 204 characteristics and mathematical model of the wireless channel are briefly introduced, and the Gaussian channel model is analyzed. Each channel model is simulated in Simulink environment, and the overall design is completed in the system generator. The Gaussian channel model, Rayleigh channel model and frequency selective channel model are implemented by FPGA. Finally, each model is tested and validated. It can be seen that the wireless channel simulation platform designed in this paper can simulate its physical characteristics well. In addition, the performance also meets the expected requirements, which provides a reference for further research of future scholars. Although the channel simulation platform designed in this paper can achieve better channel simulation, there are still some shortcomings to be further studied. First of all, in this low-carbon and energy-saving society, it is particularly important to reduce electricity consumption. Secondly, it can save the internal resources of FPGA. Therefore, the design of this paper only studies a small part of the wireless channel, and there are still many problems to be solved, which requires scholars to work harder on this basis to further implement. Acknowledgment I thank myself for my efforts. This is an article in the direction of the research group and a paper on FPGA in the graduate stage. I will continue to work hard and hope to publish more high-quality articles in my research direction. References [1] Hou Bibo, He Zishu, Li Huiyong. Channelized receiver based on FPGA [J]. Electronic Design Engineering, 2010,18 (7). [2] Xia Hao, Shen Yuanlong. Mobile Gaussian Channel Simulation Analysis [J]. Computer Technology and Development, 2011, 21 (8). [3] Zheng Xiaotian, Zhan Yongjie, Zhang Zhengning. FPGA and Gaussian Channel Analysis and Modeling [J]. Electronic Design Engineering, 2011, 19 (8). [4] Wang Weijiang. Real-time Gaussian noise generation method [J]. Journal of Instrumentation, 2006, 27 (11). [5] He Hongbin, Xi Zemin, Liu Feng. Real-time Gaussian noise generation method based on FPGA [J]. Ship Electronics Engineering, 2008. [6] Tao Songbo, Xu Xiangdong, Meng Zangzhen. A Gaussian filter based on FPGA [J]. Journal of Air Force Radar Academy, 2009, 22 (1).