Application of FFT algorithm based on DSP in reactive power compensation controller

Publisher:快乐航程Latest update time:2011-04-25 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
0 Introduction
In the power system, reactive power is an important factor affecting voltage stability, and reactive power compensation is one of the effective measures to ensure efficient and reliable operation of the power system. To achieve the best effect of reactive compensation, active power and reactive power must be accurately measured. Based on the reactive power theory of non-sinusoidal periodic signals, this paper adopts the fast Fourier algorithm to measure active power and reactive power. Accurate calculation can effectively improve the switching accuracy and simplify the switching strategy, but its disadvantage is that the amount of calculation is large, and the calculation speed of the single-chip microcomputer system is far from meeting the requirements. However, the application of DSP solves the problem of large amount of calculation and slow calculation speed.
Fourier transform is based on synchronous sampling, requiring the signal to be intercepted in the whole cycle and sampled at strict equal intervals. Therefore, it is necessary to ensure that the sampled signal and the actual signal are strictly synchronized, that is, the sampling frequency is an integer multiple of the signal frequency, otherwise spectrum leakage will occur, causing errors in the Fourier transform results and affecting the measurement accuracy. Since the frequency of the power grid often fluctuates slightly, the above phenomenon is inevitable when a fixed sampling frequency is used. This paper adopts an improved method of software phase locking to reduce synchronization error, that is, the number of sampling points is fixed, DSP timely measures the power frequency cycle, and adaptively adjusts the sampling interval.

1 Synchronous sampling problem
Considering that the system frequency does not change very quickly, in order to achieve timely adjustment of the sampling frequency with the change of the system power frequency, the count value corresponding to the previous cycle of the system frequency can be measured first (in units of DSP timer clock cycles), and then according to the number of sampling points per cycle N, the count value of each sampling interval TS is calculated in time, and sampling is performed with TS as the cycle to achieve timely tracking of the sampling frequency. To achieve this process, the power frequency voltage is first shaped into a square wave and sent to the capture pin CAP1 of the TMS320F2812 capture unit. The capture unit captures the rising edge or falling edge of the square wave, measures the time difference between the two jumps in an interrupt mode, and obtains the timely power frequency cycle count value. The sampling interval is calculated, and TS is used as the time interval to adjust the period register value of the timer, modify the sampling interval of the next cycle, set the software timer interrupt, and preset the time to enter the interrupt next time. Data acquisition control is performed in the software timer interrupt to complete tracking sampling. The improved method is simple to implement, highly timely, has an unlimited scope of application, and adds very little workload. The improved method is applied to the reactive power compensation control system to achieve software phase locking, which enables 64-point sampling to be completed within a full cycle regardless of how the frequency of the power grid fluctuates, thereby reducing leakage errors, ensuring the accuracy of calculations, and effectively reducing the impact of power system frequency changes on measurement accuracy. This method of calculating frequency by measuring the length of time between successive zero-crossing points of the signal waveform can be easily implemented through the hardware functions provided by TMS320F2812. The capture unit of the DSP automatically records the time of the jump without the intervention of the processor, which has high real-time performance and high recording accuracy. However, this method is susceptible to harmonics and random interference. Considering that most of the harmonics in the power system are integer harmonics, which have little effect on the zero-crossing point, the system adopts this frequency measurement method. 2 FFT algorithm for power measurement The fast Fourier transform is used to detect and process the electrical parameters in real time to achieve the best effect of reactive power compensation. The controller adopts simultaneous sampling of three-phase voltage and three-phase current, and uses the fast Fourier transform (FFT) algorithm to measure the electrical parameters in the power grid in real time. Only three FFTs are needed to calculate the FFT results of three-phase voltage and three-phase current. The measurement algorithm of one phase voltage and current is as follows: the N-point voltage sequence {u(n)} and current sequence {i(n)} are sampled simultaneously, and the two constitute a complex discrete time series: where: X(K) and X*(NK) are the DFT transforms of x(n) and x*(n) respectively. In the process of processing data, the system first performs FFT transformation on equation (2) to obtain X(K), then obtains X*(NK), and finally uses the transformation method of equation (4) to obtain the spectrum of voltage and current. Suppose UK is the vector representation of the Kth harmonic of u(t); IK is the vector representation of the Kth harmonic of i(t), then the voltage and current vectors and their spectrum have the following relationship: When K=O, X(NK)=X(N)=X(O), which implies periodicity. The DC component is not considered here. In this way, the effective value (UK, IK) and active power (PK) of the harmonic voltage and current of each phase (1≤K≤N/2-1) can be derived as follows: Where: XR(K) and XI(K) are the real and imaginary parts of X(K), respectively, and XR(NK) and XI(NK) are the real and imaginary parts of X(NK), respectively. Then the effective value of the voltage and current of this phase are: Where: L=N/2-1, so the system obtains various parameters of this phase. The processing method of various parameters of the other two phases is the same. The above is the calculation method for single-phase power. For three-phase power, there are: power factor: The calculation of voltage and current involves square, summation, division and square root. In the instruction system of TMS320F2812 , summation is easy to implement. For multiplication, TMS320F2812 has a dedicated hardware multiplier, and the effective execution time of the multiplication instruction is 1 CPU clock cycle. For division, there is no single-cycle division instruction. Division can be decomposed into a series of subtractions and shifts, which are implemented using subroutines. For square root, the DSP library function can be directly called in the assembly program. Based on the above formula, real-time voltage and reactive power can be calculated. It provides a basis for the comprehensive regulation of voltage and reactive power. From the above data processing process, it can be seen that after using the FFT algorithm to separate the DC component and the harmonics of the AC component, only the AC component is considered in the data processing process, which eliminates the influence of DC drift in the test circuit on the measurement accuracy. Using DSP for FFT operation has the following advantages: (1) Fast Fourier transform (FFT) is used in signal analysis to process complex time domain signals to obtain clearer frequency domain signals. In engineering applications, it has the characteristics of simplicity, accuracy, and speed. The control chip DSP has become the preferred processor for executing FFT with its own advantages such as pipeline operation and fast speed. (2) Fast Fourier transform is a data processing method that is superior to ordinary Fourier transform. In this paper, the voltage quantity is regarded as the real part and the current quantity is regarded as the imaginary part. Then, the two parts of the frequency quantity are separated by a formula, which doubles the operation speed and saves time. (3) In Fourier transform, the quantity to be transformed is only an integer cycle, otherwise the accuracy of the transformed data will be reduced. Due to the algorithm, the fast Fourier transform has a false frequency phenomenon. After N groups of data are FFTed, N/2 frequency quantities are obtained. The other N/2 quantities are actually the repetition of the previous frequency quantities. Using the relationship between the voltage and current vectors and their spectrum, the initial phase angle of the voltage and the initial phase angle of the current can be obtained. The system uses the relationship between the initial phase angles a1 and b1 of the fundamental wave (K=1) voltage and current to determine the leading or lagging situation of the voltage and current, and assigns a "+" or "-" sign to the power factor cosφ, providing a basis for the judgment of switching capacitors. 3 Conclusion




























Driven by the development of edge science such as power electronics and microelectronics, reactive power compensation technology has made great progress in the field of power systems. This paper uses DSP to perform FFT operations to achieve the tracking and measurement of the frequency of the input signal. The algorithm that calculates the sampling period according to the actual frequency solves the problem of synchronous sampling without increasing hardware investment. This improved method of software phase locking is simple to implement, has high real-time performance, and low computational workload. A three-phase power calculation method based on AC sampling and Fourier algorithm is introduced. This method can effectively eliminate the errors caused by harmonics in three-phase power measurement and improve measurement accuracy. In the design of reactive power compensation control system, software methods are used to achieve synchronous sampling, simplify hardware structure, and reduce costs.
Reference address:Application of FFT algorithm based on DSP in reactive power compensation controller

Previous article:Design of Electro-hydraulic Position Servo Control System Based on DSP NNC-PID
Next article:Application of FFT in Low Power Microprogram Controller

Latest Industrial Control 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号