About the implementation principle of handheld spectrum analyzer based on FPGA platform

Publisher:紫色小猫Latest update time:2015-03-10 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The purpose and significance of the research project

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

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.

Reference address:About the implementation principle of handheld spectrum analyzer based on FPGA platform

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

Design of Power Fiber Signal Analyzer Based on ARM and FPGA
With the expansion and complication of power networks and the advent of regional interconnection trends, the behavior of power systems will become more and more complex. The applicability of some original assumptions and simplified models will be further challenged and tested. In this case, rich and detailed field mea
[Test Measurement]
Design of Power Fiber Signal Analyzer Based on ARM and FPGA
Design and implementation of SoC prototype verification based on FPGA
0 Introduction As the scale of SoC design increases day by day, its functions become more and more complex, and the chip verification stage occupies most of the time of the entire chip development. In order to shorten the verification time, many new verification methods have emerged based on traditional simulation v
[Embedded]
Design and implementation of SoC prototype verification based on FPGA
Implementation of SD card file system based on FPGA and Nios II soft core
Abstract: A SPI controller for SD card reading and writing is constructed using Cyclone II series FPGA, and an embedded file system based on Nios II soft-core processor is implemented on it. This file system is implemented by transplanting znFAT32 file system on Nios II EDS development platform. Keywords
[Embedded]
Implementation of SD card file system based on FPGA and Nios II soft core
Design of PCI Express Bus in Double Buffer Mode Based on FPGA
     introduction   In recent years, software radio (SDR) has developed rapidly and has shown its superiority in many fields. The background of this project is to realize the baseband signal processing of digital audio broadcasting (DAB) through software radio, which requires the software radio platform to have hig
[Embedded]
Design of PCI Express Bus in Double Buffer Mode Based on FPGA
Design of large-capacity data storage using FPGA and SRAM
1 Introduction Aiming at the shortcoming of limited internal BlockRAM in FPGA, a method of improving the design by combining FPGA with external SRAM is proposed, and some VHDL programs are given. 2 Hardware Design Here we will mainly discuss the design ideas of using Xilinx's FPGA (XC2S600E-6f
[Industrial Control]
FPGA Implementation of Real-time Video Data Acquisition
The video monitoring system uses the existing enterprise computer network platform to transmit, store and share the video, audio and other data required within the monitoring range in digital form through the network, so that the security monitoring department can obtain real-time, accurate, specific and intuitive data
[Embedded]
FPGA Implementation of Real-time Video Data Acquisition
Design and implementation of HDLC protocol controller based on FPGA+ARM
Aiming at the communication requirements of HDLC protocol in flight control simulation device, a new HDLC protocol controller based on FPGA+ARM architecture is designed. The frame structure and cyclic redundancy check (CRC) principle of HDLC protocol are first introduced in this paper. Then, combined with the advantag
[Microcontroller]
Design and implementation of HDLC protocol controller based on FPGA+ARM
Research on circuit-level protection technology against DPA attacks based on FPGA platform
0 Introduction In recent years, Field Programmable Gate Array (FPGA) has been widely used due to its high performance, low price, high development speed, convenient programming, etc. However, DPA (Differential Power Analysis) attacks on FPGA have become one of the main threats to information security in
[Security Electronics]
Research on circuit-level protection technology against DPA attacks based on FPGA platform
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号