CN112763798A - Harmonic calculation method based on high-performance DSP - Google Patents

Harmonic calculation method based on high-performance DSP Download PDF

Info

Publication number
CN112763798A
CN112763798A CN202011537882.7A CN202011537882A CN112763798A CN 112763798 A CN112763798 A CN 112763798A CN 202011537882 A CN202011537882 A CN 202011537882A CN 112763798 A CN112763798 A CN 112763798A
Authority
CN
China
Prior art keywords
frequency
data
dsp
harmonic
sampling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011537882.7A
Other languages
Chinese (zh)
Inventor
王钢
曾德辉
兰金晨
李松奕
代锋
毕浩然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
GUANGZHOU JIAYUAN ELECTRIC POWER TECHNOLOGY CO LTD
South China University of Technology SCUT
Original Assignee
GUANGZHOU JIAYUAN ELECTRIC POWER TECHNOLOGY CO LTD
South China University of Technology SCUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by GUANGZHOU JIAYUAN ELECTRIC POWER TECHNOLOGY CO LTD, South China University of Technology SCUT filed Critical GUANGZHOU JIAYUAN ELECTRIC POWER TECHNOLOGY CO LTD
Priority to CN202011537882.7A priority Critical patent/CN112763798A/en
Publication of CN112763798A publication Critical patent/CN112763798A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R23/00Arrangements for measuring frequencies; Arrangements for analysing frequency spectra
    • G01R23/16Spectrum analysis; Fourier analysis

Landscapes

  • Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Complex Calculations (AREA)

Abstract

The invention relates to a harmonic calculation method based on a high-performance DSP, which comprises the following steps: s1, sampling the original analog signal; s2, moving the sampling data by EDMA; s3, moving the sampling data from the memory to the DDR 3; s4, frequency division processing is carried out on the sampling data; s5, calculating the frequency-divided data by utilizing a double-spectral-line interpolation FFT with a black-man window; and S6, acquiring the result of harmonic components contained in the sampling data. The method reasonably utilizes DSP storage space, utilizes EDMA of the DSP to effectively reduce CPU resource consumption, and carries out windowing interpolation FFT operation through frequency division sections, thereby not only reducing the calculation amount, but also calculating harmonic and inter-harmonic components in the frequency range from fundamental wave to 50 harmonic of the power system, having high calculation precision, short total time spent on each time of processing and high calculation speed, and being capable of meeting the requirement of real-time harmonic calculation of the power system.

Description

Harmonic calculation method based on high-performance DSP
Technical Field
The invention relates to the field of harmonic measurement of power systems, in particular to a harmonic calculation method based on a high-performance DSP.
Background
With the continuous increase of power demand, the rapid development of new energy technology and the continuous progress of direct current transmission technology, the ultra-high voltage direct current transmission is widely concerned and greatly developed.
With the addition of a direct-current transmission system in a power system, alternating-current transmission and direct-current transmission are allowed to be combined into a normal state, but a large number of power electronic conversion devices are used, and generate a large number of harmonic waves and inter-harmonic waves in the working process, the harmonic oscillation problem of the system can be caused, and the harmonic oscillation problem becomes an important factor influencing the safe and stable operation of the system. The precondition for solving the harmonic problem existing in the actual alternating current and direct current system is accurate harmonic detection.
The existing harmonic detection method mainly comprises wavelet transformation, prony algorithm, Fast Fourier Transform (FFT), Hilbert-Huang transformation and the like. Although the wavelet transform has the characteristic of time-frequency locality, the wavelet transform is difficult to be widely applied in practice due to the frequency band aliasing phenomenon, the difficulty in selecting wavelet basis functions and the low calculation speed; the prony algorithm has high frequency resolution, but cannot identify a mutation signal, is extremely sensitive to noise and has poor stability, and the prony algorithm adopts a fitting method, so that the calculation amount is extremely large, and the requirement of real-time calculation processing cannot be met; the fast Fourier transform FFT has the advantages of high calculation speed, good stability and practicability, and can inhibit frequency spectrum leakage and barrier effect by windowing interpolation and other methods, and is most widely applied to harmonic detection.
The existing harmonic wave calculating instrument on the market mainly adopts an off-line access mode, and aims at the problems that the calculating speed is low and the real-time harmonic wave calculating and processing requirements are difficult to meet, and the harmonic wave result obtained by an off-line processing method cannot effectively reveal the harmonic wave condition in the application of the current power system and cannot analyze and process the harmonic wave oscillation problem.
Disclosure of Invention
In order to solve the technical problems in the prior art, the invention provides a harmonic calculation method based on a high-performance DSP. The method reasonably uses DSP storage space, uses enhanced direct memory access EDMA of the DSP to effectively reduce CPU resource consumption, and carries out windowing interpolation Fast Fourier Transform (FFT) operation through frequency division bands, thereby not only reducing the calculated amount, but also calculating harmonic and inter-harmonic components in the frequency range from fundamental waves to 50 harmonic waves of the power system, having high calculation precision, short total time spent on each processing and high calculation speed, and being capable of meeting the requirements of real-time harmonic calculation of the power system.
The invention is realized by adopting the following technical scheme: the harmonic calculation method based on the high-performance DSP comprises the following steps:
s1, sampling the original analog signal;
s2, utilizing the enhanced direct memory access EDMA of the DSP to move the sampled data from the external memory interface EMIF of the DSP to the internal memory area of the DSP;
s3, moving the sampling data from the DSP internal storage area to the external storage area DDR3 for storage;
s4, frequency division processing is carried out on the sampling data;
s5, calculating the frequency-divided data by utilizing a double-spectral-line interpolation Fast Fourier Transform (FFT) with a black-man window;
and S6, acquiring the result of harmonic components contained in the sampling data.
Compared with the prior art, the invention has the following advantages and beneficial effects:
the method reasonably utilizes DSP storage space, utilizes enhanced direct memory access EDMA of the DSP to effectively reduce CPU resource consumption, and carries out windowing interpolation Fast Fourier Transform (FFT) operation through frequency division bands, thereby not only reducing the calculated amount, but also calculating harmonic and inter-harmonic components in the frequency range from fundamental waves to 50 harmonic waves of the power system, having high calculation precision, short total time spent on each processing and high calculation speed, and being capable of meeting the requirement of real-time harmonic calculation of the power system.
Drawings
FIG. 1 is a flow chart of a harmonic calculation method of the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but the present invention is not limited thereto.
Examples
As shown in fig. 1, the harmonic calculation method based on high performance DSP of the present invention mainly includes the following steps:
and S1, sampling the original analog signal.
Utilizing a DSP with a main frequency of 1GHz, wherein the calculation speed of fixed point data is 40GMAC, the calculation speed of floating point data is 20GFLOP, the size of a memory storage area is 32KB, and the size of an external memory DDR3 is 8 GB;
the original analog signal is sampled by an 18-bit analog-to-digital converter ADC, the sampling frequency is 50kHz, the original analog signal is converted into a discrete digital signal which is convenient for the DSP to process and calculate, and data converted by the analog-to-digital converter ADC is output to an external memory interface EMIF of the DSP.
And S2, utilizing the Enhanced Direct Memory Access (EDMA) of the DSP to move the sampled data from the external memory interface EMIF of the DSP to the internal memory area of the DSP.
Carrying out data transfer by using an enhanced direct memory access EDMA of the DSP, wherein the enhanced direct memory access EDMA adopts an interrupt mode, and a trigger mode is a pulse signal sent by completing the conversion of an analog-to-digital converter (ADC); the enhanced direct memory access EDMA is used for moving data, and has the advantages that compared with the method of directly using the CPU to read data, the enhanced direct memory access EDMA has higher efficiency of reading data, and does not occupy the CPU when reading, so that the CPU can be used for executing other tasks, and the consumption of system resources is greatly reduced.
Due to the zero drift and coefficient problems of the analog-to-digital converter ADC, zero drift compensation and coefficient correction need to be carried out on the sampled data, otherwise, larger errors are brought. The significance of firstly moving the sampled data to the internal storage area by using the enhanced direct memory access EDMA is that the DSP has a higher processing speed on the data in the internal storage area, and the processing adopts a mode of sampling and processing at the same time, so that the phenomenon that a large amount of data is stored in the external storage area DDR3 and then is processed in a centralized manner to cause a large amount of time occupation can be effectively avoided, and the real-time performance of the harmonic calculation method is greatly influenced.
And S3, transferring the sampled data from the DSP internal storage area to the external storage area DDR3 for storage.
Due to the limited space capacity of the internal storage area of the DSP, the sampled data needs to be moved to an external storage area DDR3 with a large space for storage.
And S4, frequency division processing is carried out on the sampling data.
In order to effectively improve the calculation speed, the frequency division processing can be carried out on the sampling data in consideration of the fact that low-frequency components in the data of the power system are dense and high-frequency data are scattered; the frequency division processing method is that the low-frequency data is stored at 10 points, the original sampling frequency of 50KHz is reduced to 5000Hz, and then the data sampled at the sampling frequency of 5000Hz is subjected to Fast Fourier Transform (FFT), and the number of points is calculated to be 512; sampling the high-frequency data by adopting an original 50KHz sampling frequency, performing Fast Fourier Transform (FFT) on the sampled data, and calculating the number of points 2048; the dividing point of the high frequency and the low frequency is 781.25Hz, and can be flexibly adjusted according to actual needs. After frequency division processing, the number of calculation points of the low frequency band is greatly reduced, and the sampling frequency of 5000Hz is enough to meet the requirement of the actual sampling frequency, namely, the sampling frequency is at least 4 times greater than the highest frequency component of the data, so that the calculation speed is greatly improved.
And S5, calculating the frequency-divided data by utilizing a double-spectral-line interpolation Fast Fourier Transform (FFT) with a black-man window.
The stable data are processed by adopting a windowed interpolation Fast Fourier Transform (FFT) algorithm, the calculation speed of the stable data is high, and the calculation precision is high. Because frequency in the power grid fluctuates and inter-harmonics are non-integral multiples of fundamental waves, synchronous sampling of data is difficult, when non-synchronous sampling is carried out, the Fast Fourier Transform (FFT) can generate a frequency spectrum leakage phenomenon and a fence effect, so that a detection result has a large error, and the windowing interpolation Fast Fourier Transform (FFT) algorithm can better inhibit the frequency spectrum leakage and the fence effect, so that the harmonic detection precision is improved.
In order to reduce frequency leakage, the data is subjected to black-man window processing, wherein the black-man window is as follows:
Figure BDA0002853680080000031
where w (N) is a window function, N is 0,1,2, …, N-1, and N is the total number of sampling points of the signal.
Windowing the data x (n), xw(n) ═ x (n) w (n), after discrete Fourier transform, neglecting the side lobe influence of the spectrum peak at the negative frequency point, and obtaining a DFT expression as:
Figure BDA0002853680080000041
wherein x isw(n) is the windowed signal, X (k) is xw(n) discrete Fourier transform, m is a frequency component contained in the signal, j is an imaginary number, W is a discrete Fourier transform of a window function, AmIs the magnitude of the component m and,
Figure BDA0002853680080000042
is the phase of the component m, fmIs the frequency of the component m,. DELTA.f is the frequency resolution, fsIs the sampling frequency, k is 0,1,2, …, N-1; wherein, Δ f ═ fs/N。
Performing Fast Fourier Transform (FFT) processing on the windowed data, and acquiring an amplitude correction formula of the Fast Fourier Transform (FFT) by adopting a polynomial approximation method by utilizing the principle of double-spectral-line interpolation:
A=(y1+y2)(2.70205774+1.07115106α2+0.23361915α4+0.04017668α6)/N
wherein, y1、y2Maximum and second maximum spectral lines, A is the amplitude after double spectral line interpolation, alpha is the FFT amplitude correction coefficient, and alpha is y-y1-0.5; where y is the actual peak value of the signal.
The frequency correction formula of the data is as follows:
f=(k1+α+0.5)fs/N
the phase correction formula of the data is:
θ=arg[X(k1)]-π·(α+0.5)
wherein: f is frequency, theta is phase, X (k)1) Is a discrete Fourier transform, k, of a signal1Is the maximum spectral line.
And S6, acquiring the result of harmonic components contained in the sampling data.
In this embodiment, a data signal is sent by a real-time digital simulation system (RTDS), and the harmonic calculation method based on the high-performance DSP of the present invention is compared with a calculation result of an offline access type harmonic calculator manufactured by FLUKE, a model of which is 435 POWER QUALITY ANALYZER, and the experimental results are shown in tables 1 and 2.
Figure BDA0002853680080000043
TABLE 1
Figure BDA0002853680080000044
Figure BDA0002853680080000051
TABLE 2
Comparing experimental data, it can be obtained that the harmonic calculation method of the present invention can not only calculate the amplitude of the harmonic component, but also measure the frequency and phase data of the harmonic component, while the harmonic calculator of FLUKE 435 cannot measure the specific harmonic frequency, can only give the number of harmonics, and cannot measure the phase. For practical power systems, the real-time frequency of the data signal is continuously changed and cannot be a right integer, and the method can give specific frequency measurement results, so that the advantages are obvious in comparison. Meanwhile, the method takes total time less than 7ms, the number of frequency components of the data signals is not easily influenced, the stability is good, inter-harmonic data of non-integral multiple of fundamental waves can be measured, and the FLUKE 435 harmonic calculator does not have the inter-harmonic measurement function.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such changes, modifications, substitutions, combinations, and simplifications are intended to be included in the scope of the present invention.

Claims (9)

1. The harmonic calculation method based on the high-performance DSP is characterized by comprising the following steps:
s1, sampling the original analog signal;
s2, utilizing the enhanced direct memory access EDMA of the DSP to move the sampled data from the external memory interface EMIF of the DSP to the internal memory area of the DSP;
s3, moving the sampling data from the DSP internal storage area to the external storage area DDR3 for storage;
s4, frequency division processing is carried out on the sampling data;
s5, calculating the frequency-divided data by utilizing a double-spectral-line interpolation Fast Fourier Transform (FFT) with a black-man window;
and S6, acquiring the result of harmonic components contained in the sampling data.
2. The high-performance DSP based harmonic calculation method according to claim 1, wherein in step S1, a DSP with a dominant frequency of 1GHz is utilized, a fixed-point data calculation speed is 40GMAC, a floating-point data calculation speed is 20GFLOP, a memory storage area size is 32KB, and an external storage DDR3 size is 8 GB.
3. The high-performance DSP based harmonic calculation method according to claim 2, wherein in step S1, the original analog signal is sampled by an 18-bit analog-to-digital converter ADC, the sampling frequency is 50kHz, the original analog signal is converted into a discrete digital signal, and the data converted by the analog-to-digital converter ADC is output to an external memory interface EMIF of the DSP.
4. The harmonic calculation method based on high-performance DSP as claimed in claim 1, wherein the step S2 utilizes an enhanced direct memory access EDMA of DSP to perform data movement, the enhanced direct memory access EDMA employs an interrupt mode, and the trigger mode is a pulse signal sent by the ADC conversion completion.
5. The harmonic calculation method based on high-performance DSP according to claim 1, wherein the frequency-division processing method in step S4 is to adopt a method of storing low-frequency data at 10 points, reduce the original 50KHz sampling frequency to 5000Hz, then perform fast fourier transform FFT on the data sampled at 5000Hz sampling frequency, and calculate the number of points 512; sampling the high-frequency data by adopting an original 50KHz sampling frequency, performing Fast Fourier Transform (FFT) on the sampled data, and calculating the number of points 2048; wherein the dividing point of the high frequency and the low frequency is 781.25 Hz.
6. The high-performance DSP based harmonic calculation method according to claim 1, wherein the step S5 is performed by applying a black-man window to the data, wherein the black-man window is:
Figure FDA0002853680070000011
where w (N) is a window function, N is 0,1,2, …, N-1, and N is the total number of sampling points of the signal.
7. The high-performance DSP based harmonic calculation method according to claim 6,in the step S5, windowing is performed on the data x (n), xw(n) ═ x (n) w (n), and a DFT expression obtained after discrete fourier transform is:
Figure FDA0002853680070000021
wherein x isw(n) is the windowed signal, X (k) is xw(n) discrete Fourier transform, m is a frequency component contained in the signal, j is an imaginary number, W is a discrete Fourier transform of a window function, AmIs the magnitude of the component m and,
Figure FDA0002853680070000022
is the phase of the component m, fmIs the frequency of the component m,. DELTA.f is the frequency resolution, fsIs the sampling frequency, k is 0,1,2, …, N-1.
8. The harmonic calculation method based on high performance DSP according to claim 7, wherein in step S5, the windowed data is processed by fast fourier transform FFT, and the amplitude modification formula of the black-man windowed fast fourier transform FFT is obtained by a polynomial approximation method according to the principle of two-spectral line interpolation:
A=(y1+y2)(2.70205774+1.07115106α2+0.23361915α4+0.04017668α6)/N
wherein, y1Is the maximum spectral line, y2Is a second largest value spectral line, A is the amplitude after the double spectral line interpolation, and alpha is the fast Fourier transform FFT amplitude correction coefficient.
9. The high-performance DSP based harmonic calculation method according to claim 8, wherein the frequency correction formula of the data in step S5 is:
f=(k1+α+0.5)fs/N
the phase correction formula of the data is:
θ=arg[X(k1)]-π·(α+0.5)
wherein: f is frequency, theta is phase, X (k)1) Is a discrete Fourier transform, k, of a signal1Is the maximum spectral line.
CN202011537882.7A 2020-12-23 2020-12-23 Harmonic calculation method based on high-performance DSP Pending CN112763798A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011537882.7A CN112763798A (en) 2020-12-23 2020-12-23 Harmonic calculation method based on high-performance DSP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011537882.7A CN112763798A (en) 2020-12-23 2020-12-23 Harmonic calculation method based on high-performance DSP

Publications (1)

Publication Number Publication Date
CN112763798A true CN112763798A (en) 2021-05-07

Family

ID=75694858

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011537882.7A Pending CN112763798A (en) 2020-12-23 2020-12-23 Harmonic calculation method based on high-performance DSP

Country Status (1)

Country Link
CN (1) CN112763798A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115575707A (en) * 2022-12-05 2023-01-06 国网山西省电力公司营销服务中心 Harmonic detection device and method based on combination of improved FFT algorithm and wavelet transform

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203069669U (en) * 2013-01-22 2013-07-17 广西电网公司电力科学研究院 Harmonic energy measuring system based on parameter analysis
CN107561359A (en) * 2017-08-31 2018-01-09 国网新疆电力公司 A kind of m-Acetyl chlorophosphonazo extracting method based on Blackman window

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203069669U (en) * 2013-01-22 2013-07-17 广西电网公司电力科学研究院 Harmonic energy measuring system based on parameter analysis
CN107561359A (en) * 2017-08-31 2018-01-09 国网新疆电力公司 A kind of m-Acetyl chlorophosphonazo extracting method based on Blackman window

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
滕小波: "基于DSP和CPLD的电力谐波检测系统的研究与设计", 《中国优秀硕士论文全文数据库 信息科技II辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115575707A (en) * 2022-12-05 2023-01-06 国网山西省电力公司营销服务中心 Harmonic detection device and method based on combination of improved FFT algorithm and wavelet transform

Similar Documents

Publication Publication Date Title
CN104897960B (en) Harmonic wave rapid analysis method and system based on the spectral line interpolation FFT of adding window four
CN102435844B (en) Sinusoidal signal phasor calculating method being independent of frequency
CN107543962B (en) Calculation method of dominant inter-harmonic frequency spectrum distribution
CN101113995A (en) Base wave and harmonic detecting method based on Nuttall window double peak interpolation FFT
CN103308766A (en) Harmonic analysis method based on Kaiser self-convolution window dual-spectrum line interpolation FFT (Fast Fourier Transform) and device thereof
CN103441762A (en) ADC dynamic parameter testing method based on Blackman window three-spectrum-line interpolation
CN115575707A (en) Harmonic detection device and method based on combination of improved FFT algorithm and wavelet transform
CN111222088B (en) Improved method for estimating weighted power harmonic amplitude of flat-top self-convolution window
CN103353550A (en) Method for measuring signal frequency and harmonic parameters of electric power system
CN110837001A (en) Method and device for analyzing harmonic waves and inter-harmonic waves in electric power system
CN103983849B (en) A kind of Electric Power Harmonic Analysis method of real-time high-precision
WO2023226117A1 (en) Integrated circuit analog-to-digital conversion chip parameter testing method and testing system
CN105486921A (en) Kaiser third-order mutual convolution window triple-spectrum-line interpolation harmonic wave and inter-harmonic wave detection method
CN103795411A (en) SFDR testing method based on five-maximum-sidelobe-damping-window three-spectral-line interpolation
CN103675447A (en) High-precision real-time harmonic wave analysis method of electrified railway
CN112763798A (en) Harmonic calculation method based on high-performance DSP
CN116466134A (en) Harmonic metering method, medium, system and harmonic electric energy meter
CN117169590B (en) Power harmonic analysis method and device based on software variable sampling rate
CN109444525B (en) Method for calculating AC sampling data effective value and power factor of transformer substation measurement and control device
CN109541304B (en) Power grid higher order weak amplitude harmonic detection method based on six-term minimum sidelobe window interpolation
CN107942139B (en) Synchronous sampling method for power harmonic parameter software
CN112730982A (en) Harmonic detection method of hybrid direct-current power transmission system
CN105372492B (en) Signal frequency measuring method based on three DFT plural number spectral lines
Roscoe et al. Fast-responding measurements of power system harmonics using discrete and fast fourier transforms with low spectral leakage
CN109254202B (en) Synchronous phasor measurement device applied to power distribution network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210507

RJ01 Rejection of invention patent application after publication