Spectrum analyzers can help designers determine the frequency range of interference signals so as to select a reasonable filtering solution. However, general spectrum analyzers are large in size and not convenient for use in industrial sites. Therefore, a handheld spectrum analyzer is designed that is easy to carry, has low power consumption, can record data for a long time, and can be remotely operated over the network.
The design of this spectrum analyzer is based on Xilinx's FPGA. First, the programmable amplifier is driven in the analog front end to complete the amplification and level shift of the analog signal, and then the ADC is driven according to the set sampling frequency to complete data acquisition, and then the fast Fourier transform is completed. Finally, the result is displayed on a 4-inch color LCD screen, and the data is stored or transmitted through the network according to the setting.
Spectrum analysis has a wide range of applications in production practice and scientific research. The so-called spectrum analysis is to expand the signal strength emitted by the signal source in frequency order, make it a function of frequency, and examine the law of change. For the study of an electrical signal, we can analyze its characteristics of changing over time, or we can describe it by the frequency components it contains (i.e., spectrum distribution). The former is usually called time domain analysis, and the latter is called frequency domain analysis of the signal. By performing spectrum analysis on the signal, the frequency structure of the signal can be obtained, and the frequency components of the signal or the characteristics of the system can be understood. On this basis, the tracking control of the signal can be achieved, thereby realizing the early prediction of the system state, discovering potential dangers and diagnosing the causes of possible failures, and identifying and correcting the system parameters. Therefore, spectrum analysis is an important method to reveal signal characteristics and an important means of processing signals. The instrument for spectrum analysis is a spectrum analyzer, which can automatically analyze electrical signals and display all frequency components on the entire spectrum, determine the frequency components of a changing process (called a signal), and the relative strength relationship between each frequency component.
Spectrum analyzers are widely used, and different industries and departments have different focuses on the application of spectrum analyzers. For applications that require testing and inspection in the field or at the measurement site, a spectrum analyzer with a large size, heavy weight, and poor portability is very inconvenient. If there is a spectrum analyzer with a small size, light weight, and good portability, it will bring great convenience to its application and better play the role of the spectrum analyzer.
The specific applications of spectrum analyzers mainly include the following aspects:
(1) Measuring signal parameters
(2) For signal simulation measurement
(3) Used for debugging electronic equipment
(4) For national defense
II. Main tasks and expected goals of the research project
Traditional spectrum analyzers mainly rely on analog filters to separate and measure frequency components. In order to improve the spectrum resolution, a filter with a very narrow passband is required, and because the center frequency of the analog filter will "drift" over time and ambient temperature, it is difficult to manufacture such a spectrum analyzer with high stability and high precision.
With the introduction of FFT, it is possible to use digital methods for spectrum analysis, which solves many problems of traditional spectrum analyzers, such as "temperature drift". There are different methods to implement FFT algorithm, such as using software or pure hardware. The software method can be implemented on a PC or DSP chip, and its spectrum analysis is mainly realized by software calculation. The hardware method includes FPGA or application-specific integrated circuit (ASIC). With the continuous development of technology, the performance and scale of FPGA chips have reached a very high level. It is not only possible to use it to implement fast Fourier transform (FFT), but also the performance is guaranteed. For large-scale digital systems, it can also be integrated on a FPGA chip, thereby reducing the product size and enhancing the reliability and portability of the system. Therefore, using FPGA to implement the function of spectrum analyzer is a good choice.
When designing the handheld spectrum analyzer, the spectrum analyzer based on FFT analysis is the preferred solution. For handheld spectrum analyzers, the world's two largest test instrument developers, Agilent and Tektronix, have successively developed related products, but they are expensive. At present, there are many domestic studies in this area, but most of them use DSP chip mode, and FFT is implemented by software. Therefore, in terms of system integration and system reliability, it will not be better than the single-chip FPGA hardware solution. Therefore, this topic chooses the research and design of a portable spectrum analyzer based on FPGA, in which FFT is implemented by hardware circuit.
The main task of this design is to design a handheld spectrum analyzer based on FPGA. Use high-performance FPGA to implement spectrum analysis processing based on FFT algorithm, and finally display the processing results on the LCD screen. First, study the characteristics of Fourier transform, understand the relationship between fast Fourier transform (FFT) and spectrum analysis, understand the influence of window function on fast Fourier transform (FFT), and the influence of aliasing, spectrum leakage and fence effect on spectrum analysis. Secondly, understand the working principle of FPGA and the available resources it provides, especially the available resources of Xilinx series FPGA. Finally, propose a system solution for spectrum analyzer implemented by FPGA. Design each component, integrate the whole system, and finally complete the design of spectrum analyzer.
3. Design
According to the working principle, spectrum analyzers can be roughly divided into two categories: analog and digital. This design is a digital spectrum analyzer. The analyzer first filters the collected signal through a low-pass filter, then samples and quantizes the filtered analog signal, amplifies it through an amplifier, and then sends it to the Atlys Spartan@-6 FPGA development kit for digital signal processing. The fast Fourier transform method is used to obtain the signal spectrum. The working principle block diagram of the spectrum analyzer is shown in Figure 1.
Figure 1. Working principle block diagram of digital spectrum analyzer based on fast Fourier transform
4. Proposal demonstration:
1. FFT principle:
Fourier transform is a transformation relationship between the time domain description and the frequency domain description of a signal. For a certain analog non-periodic signal, there are the following Fourier transform pairs:
(1)
(2)
Formula (2) is called the inverse Fourier transform formula. Formula (1) is called the Fourier transform formula, that is, the function is the Fourier transform or Fourier integral of, and the function reflects the spectrum of the non-periodic signal.
The essence of a signal's Fourier transform is to decompose the signal into the sum of many sine waves of different frequencies. Through Fourier transform, we can get the various frequency components of the signal and get the signal's spectrum.
Formula (1) is for the frequency domain. It can be regarded as the representation of the time function in the frequency domain. The information contained in the frequency domain is exactly the same as that contained in the time domain. The only difference is the form. Usually, it is a complex function, that is:
(3)
and are the real and imaginary parts respectively, then the amplitude spectrum (commonly known as the frequency spectrum) is expressed as
(4)
Therefore, the amplitude spectrum of the spectrum analyzer (commonly known as the spectrum) can be obtained by equation (4).
The phase function is expressed as
(5)
This formula reflects the phase-frequency characteristics of the signal. [page]
The FFT processing module used in this design is the Atlys Spartan®-6 FPGA development kit provided by Xilinx. This board is a new generation of Xilinx FPGA learning board, which is not only suitable for traditional field learning such as VHDL and Verilog HDL code, but also for the new generation of SOPC field learning. The development board is based on the XC6SLX9-TQ144 chip of the Spartan-6 series. Power supply, download and debugging are all completed through the USB interface of the board itself, and the LED, GPIO, UART and USB-JTAG circuits are expanded. The structure is shown in Figure 2. In addition, S6 CARD completes the power supply and debugging of the board through the USB line, which is easy to use. The board structure diagram is shown below:
Its main peripherals are listed below:
- Xilinx XC6SLX9-TQG144 FPGA;
- Comes with USB debugging and power supply circuit (no download cable and power supply required), CY7C68013, XC2C256;
- 32M SPI FLASH M25P32;
- MAX3232 serial port;
- 50MHz crystal oscillator;
- Buttons, LEDs, DIP switches
2. Filter principle
The signals picked up by the system from the sensor, in addition to the information needed by the system, often include a lot of noise and other signals unrelated to the measured value. Therefore, a filter with frequency selection function is added to the early circuit to filter the collected signal.
According to the different forms of processed signals, filters can be divided into two categories: analog and digital. In addition, the three frequency bands of the filter are distributed in different positions in the full frequency band, which can realize the selection of different frequency signals. Therefore, filters can be divided into four different basic types: low-pass filter, high-pass filter, band-pass filter, and band-stop filter. In addition, according to the components used in the filter, it can be divided into: LC passive filter, filter composed of special components, RC passive filter, and RC active filter.
In this design, the signal to be collected is the 50HZ frequency in the alternating current. The signal to be collected is directly filtered, so the selected filter is an analog low-pass filter. Moreover, if active devices with energy amplification are introduced into the circuit, such as electron tubes, transistors, operational amplifiers, etc., to supplement the lost energy, the RC network can obtain good frequency selection characteristics like the LC network. Therefore, the filter finally selected is an analog low-pass RC active filter.
The basic form of the analog filter circuit is the current four-stage network, and its characteristics can be expressed by the transfer function as follows:
Defined as the ratio of the Laplace changes of the output and input signal voltages (or currents). In this formula, s=σ+jω is the Laplace variable, and each coefficient is a constant determined by the network structure and component parameter values. According to the requirements of the current network stability analysis conditions, each coefficient in the denominator should be positive, and n≥m is required. n is called the network order, that is, the order of the filter, which reflects the complexity of the circuit.
In the transfer function, let the Laplace variable s = jω, and we can get the frequency characteristic function H (jω):
H(jω) = = ,
The frequency characteristic H(jω) is a complex function.
The amplitude of A(ω) = is called the amplitude-frequency characteristic. = is called the phase-frequency characteristic.
In this design, a second-order filter is selected, and the general form of its transfer function is:
, let the corresponding natural frequency, the corresponding passband gain, and the corresponding damping coefficient, rewrite the general form of the transfer function into a standard form , and its amplitude-frequency characteristics and phase-frequency characteristics are:
A(ω) =
,
The amplitude-frequency characteristics and phase-frequency characteristics of the second-order low-pass filter under different values are shown in the figure below:
The design platform of the second-order low-pass filter in this design uses the filter design platform provided by Microchip Semiconductor Corporation.
3. AD conversion principle:
According to their working principles, they are divided into direct A/D converters and indirect A/D converters. Direct A/D converters convert analog signals directly into digital signals. This type of A/D converter has a faster conversion speed. Typical circuits include parallel comparison A/D converters and successive comparison A/D converters. Indirect A/D converters first convert analog signals into an intermediate quantity (time or frequency), and then convert the intermediate quantity into a digital output. This type of A/D converter is slower. Typical circuits include dual-integral A/D converters and voltage-frequency conversion A/D converters. [page]
There are many AD conversion chips. According to the needs of the signal collected in this design, the signal is an AC signal, so an 8-bit AD converter is selected. The chip selected is MAX11662 provided by Maxim. Its parameters are as follows: VDD = 2.2V —— 3.6V, VREF = VDD.
The block diagram of the analog-to-digital converter is shown below:
The AD conversion process includes four stages: sampling, holding, quantization, and encoding. By sampling the analog signal at equal intervals T, a series of sample data at sampling points is obtained. This series of sample data can be regarded as a discrete signal (sequence) in the time domain. In this design, AD has 8 bits, so each sample data is represented by an 8-bit binary number, that is, a digital signal is formed. Therefore, the process from sampling to forming a digital signal is a quantization encoding process.
4. Amplifier principle:
The signal obtained by the low-pass filter may be very weak, so a preamplifier is added to amplify the obtained signal in order to obtain a signal that is easier to process. There are two purposes for adding the amplifier in the front: 1. To prevent the small input signal from being drowned by the noise of the subsequent circuit; 2. To prevent the noise of the filter circuit from being amplified.
The basic requirements for the measurement amplifier circuit are: ① The input resistance of the measurement amplifier circuit should match the output impedance of the sensor; ② Stable amplification factor; ③ Low noise; ④ Low input offset voltage and input offset current, as well as low drift; ⑤ Sufficient bandwidth and conversion rate; ⑥ High common-mode input range and high common-mode rejection ratio; ⑦ Adjustable closed-loop gain; ⑧ Good linearity and high accuracy; ⑨ Low cost, etc.
At present, the high common mode rejection ratio amplifier circuit is widely used, as shown in the figure below:
The common-mode rejection ratio circuit is composed of three integrated operational amplifiers, two of which are common-mode input universal integrated operational amplifiers with consistent performance (mainly referring to input impedance, common-mode rejection ratio and gain), forming a balanced symmetrical (or in-phase parallel type) differential amplifier input stage and a dual-end input single-end output output stage, which are used to further suppress the common-mode signal and meet the needs of the grounded load.
The output voltage of the input stage, that is, the difference between the operational amplifier outputs , is
It can be seen from the above formula that when the performance is consistent, the differential output of the input stage and its differential-mode gain are only related to the differential-mode input voltage, while its common-mode output, offset and drift cancel each other out at both ends. Therefore, the circuit has good common-mode suppression capability. In order to eliminate the influence of bias current, etc., it is usually taken .
The amplifier used is the LM386, which is a power amplifier designed for low-voltage consumer applications. The internal gain is 20, the input is referenced to ground, and the output is automatically biased to half the supply voltage. With a quiescent power consumption of only 24 milliwatts, the LM386 is ideal for battery operation.
5. LCD output display principle
LCD has a 7-segment (or 8-segment) display structure, so there are 7 (or 8) segment selection terminals, which must be connected to the segment driver. Each segment of the LCD must be driven by a beat square wave signal with a frequency of tens of Hz to hundreds of Hz. The square wave signal is added to the common electrode of the LCD and the beat signal input terminal of the segment driver. The drive interface circuit of the LCD display is divided into two interface forms: static drive and dynamic drive.
The function of the static drive interface is to convert the data to be displayed into display code through the decoder, and then convert it into a low-frequency alternating signal and send it to the LCD display. The dynamic drive interface is usually implemented using a dedicated integrated chip. Generally, a master driver and a slave driver are used. Both the master and slave drivers use serial data input. The master driver can drive 48 display fields or dot matrices. Each additional slave driver can drive an additional 44 display fields or dot matrices. The driving method uses a 1/3 bias method with a 1/4 duty factor.
This design uses a dynamic drive interface serial output.
Previous article:Working principle and measurement method of Huatian Electric Power Ground Resistance Tester
Next article:About the implementation principle of handheld spectrum analyzer based on FPGA platform
Recommended ReadingLatest update time:2024-11-16 16:34
- Popular Resources
- Popular amplifiers
- Analysis and Implementation of MAC Protocol for Wireless Sensor Networks (by Yang Zhijun, Xie Xianjie, and Ding Hongwei)
- MATLAB and FPGA implementation of wireless communication
- Intelligent computing systems (Chen Yunji, Li Ling, Li Wei, Guo Qi, Du Zidong)
- Summary of non-synthesizable statements in FPGA
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [Xianji HPM6750 Review 10] Drawing a multi-function expansion board and verification
- About the distance of infrared obstacle avoidance circuit
- Repost - Tesla battery violent disassembly video
- Relationship between transformer and inductor
- How to port uCOS-II to LPC17XX
- X-NUCLEO-IKS01A3 sensor driver transplantation based on NUCLEO-L011K4
- Standard EIA RS-198
- TMS320C6678 power-on configuration and FPGA reset DSP
- IEC 61000-4-5 Phases of three-phase power supply systems
- [Chuanglong TLA40i-EVM development board] +04.USB-Camera test-abnormal (zmj)