introduction
Digitalization, intelligence and networking are the major trends in the development of contemporary information technology, and digitalization is the basis of intelligence and networking. There are many kinds of signals encountered in real life, such as radio signals, television signals, etc. Most of these signals are analog signals, and a small part are digital signals. Analog signals are continuous functions of independent variables, and the independent variables can be one-dimensional, two-dimensional or multi-dimensional. Digital filter technology is an important branch of digital signal analysis and processing technology. Whether it is signal acquisition, transmission, or signal processing and exchange, filtering technology is indispensable, which is crucial for the safe, reliable, effective and flexible transmission of signals. Among all electronic systems, digital filters are the most used and complex.
1 Design Principle of Digital Filter
Digital filters can be divided into two types according to the time domain characteristics of their impulse response functions, namely infinite impulse response (IIR) filters and finite impulse response (FIR) filters. The characteristic of IIR filters is that they have impulse responses of infinite duration. This type of filter generally needs to be implemented using a recursive model, so it is sometimes also called a recursive filter. The impulse response of the FIR filter can only last for a period of time. In engineering practice, it can be implemented recursively or non-recursively. There are many ways to design digital filters, such as bilinear transformation method, window function design method, Chebyshev approximation method, etc.
With the continuous improvement of LabVIEW software, especially the signal processing workbox of LabVIEW, not only the computer-aided design of digital filters has become possible, but also the design can be optimized. The filters designed using LabVIEW are not only simple to design, but also much more convenient to use than the filters implemented using text files. LabVIEW provides designers with FIR and IIR filter VIs, which are very convenient to use. You only need to enter the corresponding index parameters, without the need for complex function design and a large number of calculations. Different filter VIs have their own characteristics when filtering, so they have different uses.
2 Filter selection method
When using LabVIEW to implement filtering functions, choosing a suitable filter is the key. When choosing a filter, you can refer to the characteristics of different filters and consider the actual requirements of filtering to choose a suitable filter. The characteristics of various filters and the steps for selecting filters are shown in Figure 1. IIR digital filter:
IIR digital filter design principle: IIR digital filter is to map the causally stable Ha(s) into the causally stable H(z), that is, the left half plane of the s plane must be mapped to the inside of the unit circle of the z plane. The frequency response of H(z) can imitate the frequency response of Ha(s), that is, the imaginary axis of the s plane must be mapped to the unit circle of the z plane. The main characteristics of the filter in the time domain or frequency domain before and after the transformation (frequency response or unit impulse response, etc.) should be as similar or close as possible. There are many ways to convert the transfer function Ha(s) from the s plane to the z plane, mainly the impulse invariance method and the bilinear transformation method.
If the aliasing phenomenon is not considered, the digital filter implemented by the impulse invariance method will reproduce the frequency characteristics of the original analog filter very well. Moreover, the unit pulse response of the digital filter completely imitates the unit impulse response of the analog filter, and the time domain characteristics are well approximated. In this design, the impulse function is used as the system excitation signal, and various digital filters are used as the test system. The impulse function has an infinitely wide spectrum. Using the impulse function as an excitation signal is equivalent to inputting signals of all frequencies into the test system, and the system must have corresponding outputs. The Transfer function is used to calculate the ratio of the Fourier transform of the system output to the input, thereby obtaining the frequency response function of the system.
A LabVIEW program consists of two parts: the front panel program and the block diagram program.
The whole program is based on multi-threaded design, that is, the front panel and the system program each occupy a thread. The front panel is a user interface, that is, an interactive interface, for users to input various control parameters into the program and observe output quantities. In the front panel, various simulation icons are used, such as switches, knobs, etc., and the output test results in various forms such as digital or real-time trend charts are used to simulate the panel of the real instrument. The waveform of the signal after passing through the Butterworth and Chebyshev bandpass filters and the waveform of the signal after passing through the Bessel and elliptical bandpass filters.
The program contains two modules, namely two case structures: one is used to implement frequency response testing; the other is used to simulate the extraction of sine waves from signal data mixed with high-frequency noise. Since the filter's analysis of the signal requires a loop, and the entire process is expected to be manually controlled, a While loop structure is required in the block diagram program.
Module 1: Frequency response test module. The impulse function is used as the excitation signal during the frequency response test, which is implemented by calling the function sub-template, and the three parameters of the impulse function, namely the number of samples, amplitude and delay, need to be set. The Transfer function is used to calculate the ratio of the Fourier transform of the system output and input, so as to obtain the frequency response function of the system. In this design system, there are 4 types of filters, namely: Butterworth filter, Chebyshev filter, Bessel filter, and elliptic filter. It is implemented by calling the corresponding function sub-template in the module, and the order, type, low (high) end cutoff frequency, passband ripple and other parameters of the filter are set. In order to verify the effect of the designed system on the analysis of the filter frequency response characteristics, the switch is set to the open state. If the waveforms of the four filters are all displayed in one waveform measurement node, it will affect the observation effect, so when designing the program, the waveforms of the filter are divided into two groups of outputs.
Figure 2 Module 1 Program Diagram
Use transferfunction.vi in LabVIEW to calculate the frequency response functions of the two filters.
Module 2: Module for extracting sine waves using low-pass filters. Usually, the input signal of a microcomputer application system will inevitably be interfered by various noises, which can be weakened or filtered out by digital filtering methods. The input signal of this module is a sine wave, and a white noise is added to simulate the interference signal in signal transmission. In the design process, a Butterworth low-pass filter is used to filter out the noise component, so as to achieve the purpose of extracting the sine wave. There are two Butterworth filters in this module program. First, the SinePatternvi subroutine and the UniformWhiteNoisevi subroutine are called to generate a sine wave and uniformly distributed white noise (used to simulate the actual mixed interference signal). The interference signal passes through a Butterworth high-pass filter to generate a high-frequency noise and superimpose it with the sine signal to simulate the sampling sequence containing noise. The signal then passes through a Butterworth low-pass filter to achieve sine wave extraction.
Figure 3 Module 2 Program Diagram
Through simulation experiments, it can be confirmed that when the order of the filter is higher, the frequency response speed of the system is faster, and the higher the order, the closer it is to the ideal characteristics. In this example, the Butterworth filter is selected, which has the smoothest frequency response. Outside the cutoff frequency, the frequency response decreases monotonically. It is an ideal unit response in the passband and zero response in the stopband. The advantage of the Butterworth filter is that it has a smooth, monotonically decreasing frequency response, and the disadvantage is that the transition between the passband and the stopband is slow. In contrast, the amplitude characteristic of the Chebyshev filter has this equiripple characteristic in the passband, and the higher the order, the greater the equiripple, and the attenuation in the stopband also increases accordingly. The digital filter design based on LabVIEW effectively suppresses the noise after filtering, and the filtering effect is good.
4 FIR digital filter
FIR digital filter design principle: FIR filter is a polynomial represented by -, so that its characteristics on the unit circle are close to the required frequency characteristics. The design task of FIR filter is to select the polynomial coefficient h (n), that is, the unit sampling response and order N of the filter, given the required frequency characteristics according to certain optimal approximation criteria, so that the frequency characteristics meet the design requirements. Usually there are three methods for FIR filter design: window function weighting method, frequency sampling design and Chebyshev ripple approximation method. Here, the design is done by the window function weighting method.
Figure 4 Program flowchart
This design adopts the window function method, and uses the front panel to set input values and observe output quantities to simulate the front panel of the real filter. Since the virtual panel is directly facing the user, it is the core of the virtual filter control software. The actual signal to be tested can be collected and filtered in real time by the data acquisition card, or it can be collected by the data acquisition card and saved in a file format that can be recognized by LabVIEW, and then analyzed and filtered by LabVIEW. Here, basic signals (sine wave, cosine wave, square wave) are used to simulate the original signal. The program adopts the calculation process of the window function method, and convolves the window function with the signal to be filtered to achieve signal filtering.
Figure 5: Program flowchart
The user can set the original signal, noise signal and filter parameters. The waveform of the original signal and the filtering result can be displayed in real time. In this way, after the program runs successfully, the result can be obtained from the display area, making the result more intuitive.
5 Conclusion
Digital filters can be programmed to realize various systems to meet different needs. They can also change coefficients at any time, adjust filter parameters, and select the best solution. Using the LabVIEW software platform to develop virtual instruments such as electrical parameter measuring instruments has achieved higher efficiency, saved more hardware costs, facilitated system maintenance, and reduced the burden of instrument updates. Using virtual instruments to gradually replace traditional instruments has become a development trend in the testing field. However, in actual applications, it is still necessary to optimize the program and combine software and hardware according to specific circumstances to enable virtual instruments to perform at a higher performance.
Previous article:Design of digital adjustable resonance source based on low power consumption STM32F103C8 chip
Next article:Digital Temperature Measurement System Based on ARM and DS18B20
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- 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
- What is the difference between AGPS and DGPS?
- Can Software Radio Become Open Radio?
- Sincerely recruiting embedded software and hardware engineers
- The problem of sending 10 seconds of data through the network port
- What is the function of the forward connection of the op amp output to the voltage regulator diode here?
- Adjustable speed fan cooling system with temperature measurement feedback
- Wi-Fi Solutions for IoT Wireless Designs
- [TI recommended course] #TI? Application of interface chips in automotive products#
- 【GD32E231_DIY】-01: Schematic diagram & PCB
- Live broadcast at 10 am today [ST three-phase motor control solution for home appliances]