The rapid development of real-time digital signal processing and ultra-large-scale integrated circuit technology has continuously promoted the improvement of the performance of digital signal processors, making them play an increasingly important role in the fields of signal processing, military and civilian electronic technology, and their application breadth and depth are also constantly expanding and deepening. Digital signal processing has great advantages over analog signal processing, mainly in terms of high precision, strong flexibility, good reliability, easy large-scale integration and storage, and can adopt a variety of high-performance digital signal processing methods and algorithms. The core and symbol of real-time digital signal processing technology is the digital signal processor. The introduction of practical algorithms such as fast Fourier transform has promoted the development of digital signal processing. Digital signal processing lies in the real-time nature of calculation and processing.
As a tool for measuring electric energy, the electric energy meter has been highly valued by the national power department for many years. Electric energy meter manufacturers have spared no effort in design and development. However, the current design level of electric energy meters in my country is still relatively backward, and high-precision electric energy meters mainly rely on imports. Traditional 4-bit and 8-bit microcontrollers are inevitably stretched in terms of high-precision electric energy measurement due to their own performance limitations. The application of DSP technology in electric energy meters has brought new hope for a significant improvement in the accuracy of electric energy measurement.
&nbs
p; Application of DSP in Electric Energy Meter
According to the function and error accuracy requirements of the electric energy meter, we selected TI's TMS320VC5402 chip. In addition to completing the fast data processing work, the program design also corrected and compensated for the system nonlinear distortion.
Acquisition data processing and calculation
In practical applications, power signals are collected into the energy meter through a mutual inductor, and then converted into digital signals through a 6-channel 16-bit analog input front-end processor (AD73360) (A/D). The signals are then transmitted to the DSP, and then the sampled data is digitally filtered. The application of sampling technology in DSP requires a fast ADC, that is, to sample analog signals at a very fast speed, and a fast DSP is required to perform digital low-pass filtering and extraction. In digital signal processing, filtering plays an extremely important role. It solves problems such as voltage drift, temperature drift, and noise that analog filters cannot overcome, thereby improving the jitter of digital signals and making the waveforms of voltage and current signals tend to be ideal. The principle block diagram of the energy meter is shown in Figure 1.
Figure 1 Schematic diagram of electric energy meter
In the sampling process, the first problem is the selection of sampling frequency. The Nyquist sampling theorem points out that if the continuous signal x(t) is of limited bandwidth, the highest frequency of its spectrum is fc. When sampling x(t), if the sampling frequency fs≥2fc is guaranteed, then x(t) can be restored from the sampled signal. When sampling x(t), we must first understand the highest cutoff frequency fc of x(t) to determine the sampling frequency fs that should be selected. If x(t) is not of limited bandwidth, an anti-aliasing filter should be used to analog filter x(t) before sampling to remove the high-frequency components of f>fc. Therefore, before A/D conversion, an analog low-pass filter with a sharp roll-off characteristic is required to limit the spectrum of the analog signal. An ideal filter should allow all frequencies below fs/2 to pass through, while completely blocking all frequencies greater than fs/2. Usually, the selection of the filter and sampling frequency is to limit the frequency band of interest to between DC and fs/2.
First, the voltage and current input signals are sampled and filtered by the RC filter network, and then A/D conversion is performed. After the A/D conversion is completed, an interrupt is generated, and the result of each conversion is read out in the interrupt service subroutine as the input of the digital low-pass filter. The input of the DSP is the digital signal obtained after the A/D conversion. The DSP processes the input digital signal and obtains the corresponding energy after certain calculations and conversions. The calculation in the DSP processor is performed according to the following formula:
* Voltage measurement (effective value) calculation formula:
In the formula: U is the effective value of voltage, n is the number of sampling points per cycle, and - the voltage sampling value.
* Current measurement (effective value) calculation formula
In the formula: I is the effective value of current, n is the number of sampling points per cycle, and n is the current sampling value.
* Single element active power calculation formula
Where: P is the active power of a single component, n is the number of sampling points per cycle, n is the voltage sampling value on the component, n is the current sampling value on the component.
* Single element reactive power calculation formula
Where: Q is the reactive power of a single component, n is the number of sampling points per cycle, t is the voltage sampling value on the component, and t is the current sampling value on the component (after phase shift).
* Three-phase four-wire three-element active power calculation formula:
In the formula: - three-phase active power, - active power of each phase (i=A,B,C).
*Three-phase four-wire three-element active power calculation formula:
In the formula: - three-phase reactive power, - reactive power of each phase (i=A,B,C).
Design of digital filter #e#
Digital filter design
The difference in the operation structure of the digital filter will affect the performance indicators such as the accuracy, error, speed and economy of the system operation. In general, it is required to use as few constant multipliers and delays as possible to implement the system, and
the operation error is required to be as small as possible. We mainly use the moving average filter (MovingAverage Filter) of the FIR structure.
In digital signal processing applications, it is often necessary to design a linear phase filter. FIR filters can easily achieve strict linear phase characteristics while ensuring that the amplitude characteristics meet technical requirements. In order for the filter to meet the linear phase condition, its unit impulse response h(n) is required to be a real sequence and meet the even symmetry and odd symmetry conditions, that is, h(n)=h(N-1-n) and h(n)=-h(N-1-n).
It can be seen that the FIR filter continuously delays the input sample x(n), then performs a multiplication and accumulation algorithm to output the filtering result y(n). Therefore, FIR is actually a multiplication and accumulation operator. In digital filters, the most important feature of FIR filters is that there is no feedback loop, so there is no instability problem; at the same time, the amplitude characteristics can be set arbitrarily while ensuring accurate and strict linear phase. Stability and linear phase characteristics are the outstanding advantages of FIR filters. The following is a subroutine for FIR filter design:
.TEXT
BEGIN LDP 80H,DP
LDI @STACK_ADDR,SP
LDI 21,BK
LDI 19,RC
LDI @XN_ADDR,AR1
LDI @XNNEW_ADDR,AR2
LDI @OUTNEW_ADDR,AR3
LOOP LDF *AR2,R6
STF R6,*AR1++(1)%
LDI @HN_ADDR,AR0
CALL FIR
STF RO,*AR3
BR LOOP
Data processing method
Data processing mainly involves calculating and processing the collected discrete signals and analyzing the electrical signals using the fast Fourier algorithm (see Figure 2).
Figure 2 Data processing
The most commonly used method in DSP is frequency domain analysis. For some sequences with small lengths, discrete Fourier transform (the precise definition of DFT is: X(m)=) is usually used, while for sequences with large lengths, fast Fourier transform (FFT) is usually used. The operation speed of FFT is much faster than that of DFT, but DFT is more flexible. If a small number of frequency domain values need to be calculated, the DFT method can be less computationally intensive than FFT, the length of the data sequence can be arbitrary, and the calculation of the N output values is independent of each other. Since the output of DFT is a complex number, the real and imaginary parts are contained in two arrays of length N, and the output results can be simulated by computer software (MATLAB). Calculate and plot the output results of DFT, and through the application of FFT in DSP, calculate the Nth harmonic component, thereby improving various technical parameters on the electric energy meter.
Previous article:Design of Identity Authentication Smart Card Based on FPGA
Next article:Design of JPEG Image Compression Based on DSP
Recommended ReadingLatest update time:2024-11-16 16:02
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- Leisure
- Recommended voltage regulator chip and MCU
- Design of an extremely low power digital thermometer using MSP430
- Hey guys, how did you fix this error?
- AD17 PCB space is invalid! What to do?
- Overview of TI's 28335 chip
- Discussion on reverse connection of MOS tube in protection circuit
- Bor application of bluenrg-1
- Download and debug interface issues on product circuit boards
- Multisim op amp output is greater than the power supply problem