Electric energy quality analysis method and system

By using SPI interface and DMA in the power grid to receive power monitoring data, and using wavelet transformation and FFT algorithm to process voltage and current signals, the problem of inaccurate measurement of power quality parameters in the power grid is solved, and higher accuracy of power quality analysis is achieved.

CN119510932AActive Publication Date: 2025-02-25CHINA UNIV OF GEOSCIENCES (WUHAN)

Patent Information

Application Number
CN202411468519.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-25
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

The measurement of power quality parameters in the power grid is inaccurate, which makes it difficult to accurately monitor and analyze the power quality problems in the power grid.

Method used

The SPI interface is used to receive the power monitoring message data through DMA, and the voltage and current signals are processed through wavelet transformation and FFT algorithms, and the power quality parameters of the power grid are analyzed, including voltage, frequency, harmonics, interharmonics, etc., and displayed through visualization.

Benefits of technology

Through the combination of wavelet transformation and FFT algorithm, the transient and non-stationary characteristics of the signal are accurately captured, which improves the accuracy of power quality analysis and reduces the error in parameter measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119510932A_ABST
    Figure CN119510932A_ABST
Patent Text Reader

Abstract

The invention discloses an electric energy quality analysis method and system, and relates to the field of electric power monitoring, and the method comprises the steps: receiving electric energy monitoring message data through a DMA mode by using an SPI interface, and temporarily storing the received message data in an RAM; performing wavelet transform and FFT algorithm processing on the voltage and current signals of the electric energy monitoring message data; and analyzing electric energy quality parameters of the power grid, including voltage, frequency, voltage sag / rise, short-time interruption times, short-time and long-time flicker, harmonic waves and inter-harmonic waves, and displaying the parameters in a visual manner. According to the method, the measured parameter error is smaller, and the accuracy of electric energy quality analysis is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric power monitoring, and more specifically, to a method and system for analyzing power quality. Background Art

[0002] As one of the most widely used forms of energy in today's society, the level of its development and utilization is directly related to the country's development strength. In order to improve the efficiency of electricity use, better serve public life and meet the needs of social production, it is particularly important to conduct in-depth analysis of power quality.

[0003] With the rapid development of renewable energy such as wind energy, hydropower, and solar energy, these new energy sources have brought diversification to energy supply, but their inherent randomness, intermittency, volatility, and unschedulability have affected the quality of the converted power to a certain extent. Therefore, it is very important to analyze the quality of the power converted from these new energy sources to ensure its safe and controllable use.

[0004] In addition, in the face of growing demand for electricity, as well as the rapid development of renewable energy generation and grid-connected technologies, the grid structure and load characteristics have undergone significant changes. The coexistence of AC and DC in the electrical environment, as well as the presence of special loads, may lead to problems such as harmonic interference, voltage fluctuations, and three-phase voltage imbalance. These problems make it difficult to accurately measure power quality parameters in the grid. Summary of the invention

[0005] The purpose of the present invention is to solve the problem of inaccurate measurement of power quality parameters in a power grid and to propose a power quality analysis method, comprising the following steps:

[0006] S1. Using the SPI interface, the power monitoring message data is received through DMA mode, and the received message data is temporarily stored in RAM;

[0007] S2, performing wavelet transform and FFT algorithm processing on the voltage and current signals of the electric energy monitoring message data;

[0008] S3. Analyze the power quality parameters of the power grid, including voltage, frequency, voltage swell / sag, number of short-term interruptions, short-term and long-term flicker, harmonics, and interharmonics, and display them in a visual way.

[0009] Furthermore, S1 is specifically:

[0010] S11, initialize the SPI interface and configure it to data receiving mode;

[0011] S12, wait for DMA interrupt to be triggered, data reception is completed;

[0012] S13, verifying the received data;

[0013] S14, temporarily storing the verified message data in RAM.

[0014] Furthermore, every 16 frames of data are stored in an array, and a 4096-point FFT is performed after all 16 frames of data are stored.

[0015] Furthermore, S2 is specifically:

[0016] S21, parsing the message data to obtain the required voltage sampling value;

[0017] S22, performing wavelet transform on the collected voltage and current signals;

[0018] S23, performing FFT algorithm processing on the data processed by wavelet transform, and converting the time domain data into frequency domain.

[0019] Furthermore, wavelet transform is used to decompose the sampled voltage or current signal into high-frequency and low-frequency components to improve the frequency domain resolution, which is expressed as:

[0020]

[0021] Among them, ψ j,k (x) represents the wavelet function associated with parameters j and k, s j is a scale variable, j is a frequency domain parameter, k is a translation variable, j, k∈Z means that the wavelet transformed according to j, k belongs to the wavelet function set, Z represents the parameter change set in the wavelet function set, j0 is an arbitrary starting point in the wavelet function set, c j0 (k) represents the approximation coefficient, d j (k) represents the refinement coefficient, represents the scaling function, f(x) represents the sampled voltage or current signal, and x represents the time variable.

[0022] Furthermore, S3 is specifically:

[0023] S31. Extract frequency domain amplitude information from the FFT calculation results. The integer multiples of the fundamental frequency are harmonics, and the rest are interharmonics. For harmonics, monitor the harmonic voltage and harmonic current content of 2 to 50 times, the effective value of harmonic current of 2 to 50 times, and calculate the voltage and current total harmonic distortion rate. For interharmonics, monitor the interharmonic voltage and harmonic current content of 0.5 to 49.5 times, and the effective value of harmonic current of 0.5 to 49.5 times;

[0024] S32, perform square root operation on the voltage value to obtain the effective value of the voltage; calculate the average value once every 16 frames of data are received to obtain the effective average value of the voltage; calculate the absolute value of the difference between the effective value of the voltage and 220V and divide it by 220V to obtain the deviation value of the voltage;

[0025] S33, obtaining the signal frequency, and calculating the average frequency every time 16 frames of data are received;

[0026] S34, monitor voltage abnormality. If the abnormal condition is restored within 10ms to 1min, it is recorded as an abnormality; otherwise, it is not considered as an abnormality;

[0027] S35, flicker monitoring, calculated according to the requirements of IEC-61000-4-15, obtain the instantaneous flicker value with half a cycle as the time interval, obtain a short-term flicker value every 10 minutes, and obtain a flicker value every two hours; specifically, the RMS value of each frame of data is calculated twice for a half cycle, and a 512-point FFT is performed after storage; the instantaneous flicker value is calculated based on the FFT result, and the short-term flicker value is calculated 120 times cumulatively, and the long-term flicker value is calculated 12 times cumulatively;

[0028] S36. After the data is processed and calculated, the data is packaged and sent through the UART protocol. The packaged data is parsed and displayed graphically.

[0029] Furthermore, the calculation formula of harmonic voltage content rate is as follows:

[0030]

[0031] Among them, HRuh represents the harmonic voltage content rate, v n It represents the nth order harmonic voltage value, and v1 represents the fundamental voltage value.

[0032] The present invention also provides a power quality analysis system, comprising:

[0033] The data receiving unit is used to receive the power monitoring message data by DMA mode using the SPI interface, and temporarily store the received message data in the RAM;

[0034] A signal processing unit, used for performing wavelet transform and FFT algorithm processing on the voltage and current signals of the electric energy monitoring message data;

[0035] The parameter analysis unit is used to analyze the power quality parameters of the power grid, including: voltage, frequency, voltage swell / sag, number of short-time interruptions, short-time and long-time flicker, harmonics, and interharmonics, and display them in a visual way.

[0036] The beneficial effects brought by the technical solution provided by the present invention are:

[0037] The present invention analyzes the data of the power grid by using an algorithm combining wavelet transform and FFT, which can accurately capture the transient characteristics and non-stationary characteristics of the signal, making the measured parameter errors smaller and improving the accuracy of power quality analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a flow chart of a power quality analysis method according to an embodiment of the present invention;

[0039] Figure 2 is a flow chart of wavelet transform and FFT calculation in an embodiment of the present invention;

[0040] Figure 3 This is a flow chart of harmonic analysis calculation in an embodiment of the present invention;

[0041] Figure 4 is a flow chart of frequency and frequency deviation calculation according to an embodiment of the present invention;

[0042] Figure 5 It is a short-time flicker calculation flow chart of an embodiment of the present invention. DETAILED DESCRIPTION

[0043] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0044] The flow chart of the power quality analysis method according to the embodiment of the present invention is as follows: Figure 1 , specifically including the following steps:

[0045] S1. Use the SPI interface to receive the power monitoring message data through DMA mode, and temporarily store the received message data in RAM.

[0046] Specifically:

[0047] S11, initialize the SPI interface and configure it to data receiving mode.

[0048] S12, wait for DMA interrupt to be triggered, and the interrupt is triggered when 1546 data are received, and the data reception is completed.

[0049] S13. Verify the frame header, check bit, frame tail, etc. of the received data. If the data packet information does not meet expectations, it means that the data packet may be damaged or a communication error occurs.

[0050] S14, temporarily storing the verified message data in RAM.

[0051] Specifically, the data receiving and detecting device of the embodiment of the present invention is designed based on the ARM Cortex-M4 core and is used to efficiently monitor the power quality parameters in the power grid. The device is suitable for receiving the power grid frequency data provided by the single-phase smart IoT power meter through SPI communication, and realizing real-time monitoring of key parameters such as voltage deviation, frequency deviation and harmonics.

[0052] S2. Perform wavelet transform and FFT algorithm processing on the voltage and current signals of the power monitoring message data. Wavelet transform is used to accurately capture the transient characteristics of the signal, while FFT converts the time domain data into the frequency domain to analyze parameters such as harmonics and interharmonics. In the embodiment of the present invention, every 16 frames of data are stored in an array, and a 4096-point FFT is performed after all 16 frames of data are stored.

[0053] Specifically:

[0054] S21, parsing the message data to obtain the required voltage sampling value;

[0055] S22. Perform wavelet transform on the collected voltage and current signals to extract detailed features of the signals, including transient signals and non-stationary features. Use MATLAB to design the wavelet transform algorithm, and then use the MATLAB Coder tool to convert the MATLAB M file into C code and import it into the project file. The main program calls the wavelet transform function to process the sampled signal. The wavelet transform is used to repeatedly decompose the sampled voltage or current signal into high-frequency and low-frequency components to gradually improve the frequency domain resolution. Initially, the signal is divided into details (high frequency) and approximation (low frequency) by orthogonal wavelet bases. Then, the approximate part is decomposed again to produce a more detailed decomposition level. With each additional level of decomposition, finer details can be obtained in the frequency domain. Wavelet packet decomposition is further developed on the basis of discrete wavelet transform, and wavelet transform is nested on each layer. The wavelet function is as follows:

[0056]

[0057] To restore the original signal:

[0058]

[0059] Among them, ψ j,k (x) represents the wavelet function associated with parameters j and k, s j is a scale variable, j is a frequency domain parameter ∈ Z, indicating that the wavelet transformed according to j, k belongs to the wavelet function set, and Z represents the parameter change set in the wavelet function set.

[0060] S23, performing FFT algorithm processing on the data after wavelet transform processing, converting the time domain data into frequency domain, so as to analyze parameters such as harmonics and interharmonics.

[0061] refer to Figure 2 , Figure 2 This is a flow chart of wavelet transform and FFT calculation in an embodiment of the present invention. When processing data, the collected signal is first decomposed by wavelet packet transform method, the system is initialized and the wavelet packet transform basis function is selected, and then the analysis scale is determined and the characteristic value of the sampled signal is extracted. Next, the system will check whether the waveform has changed. If it has changed, the change time is recorded and the stable signal before and after the change is extracted for FFT processing, and finally the whole processing flow is terminated.

[0062] refer to Figure 3 , Figure 3 The figure is a flow chart of harmonic analysis calculation in an embodiment of the present invention. The system accumulates and stores every 16 frames of data in an array. When the array is full, a 4096-point fast Fourier transform (FFT) is performed on the data. Through the results of FFT, the system can extract amplitude information in the frequency domain, where the amplitude at the integer multiple position of the fundamental frequency is identified as harmonic, and the amplitude at other positions is interharmonic.

[0063] S3. Analyze the power quality parameters of the power grid, including voltage, frequency, voltage swell / sag, number of short-term interruptions, short-term and long-term flicker, harmonics, and interharmonics, and display them in a visual way.

[0064] Specifically:

[0065] S31. Extract frequency domain amplitude information from the FFT calculation results. The integer multiples of the fundamental frequency are harmonics, and the rest are interharmonics. For harmonics, monitor the harmonic voltage and harmonic current content of 2 to 50 times, the effective value of harmonic current of 2 to 50 times, and calculate the voltage and current total harmonic distortion rate. For interharmonics, monitor the interharmonic voltage and harmonic current content of 0.5 to 49.5 times, and the effective value of harmonic current of 0.5 to 49.5 times.

[0066] The calculation formula of harmonic voltage content rate is as follows:

[0067]

[0068] Among them, HRuh represents the harmonic voltage content rate, v n It represents the nth order harmonic voltage value, and v1 represents the fundamental voltage value.

[0069] S32, calculate the effective value, effective average value and deviation of the voltage: perform square root operation on the voltage value to obtain the effective value of the voltage; calculate the average value once every 16 frames of data are received to obtain the effective average value of the voltage; calculate the absolute value of the difference between the effective value of the voltage and 220V and divide it by 220V to obtain the deviation value of the voltage.

[0070] S33, obtain the signal frequency, and calculate the average frequency every 16 frames of data received. Figure 4 , Figure 4 The system uses falling edge interruption to obtain the signal frequency through input capture, and calculates the average value of the frequency after receiving 16 frames of data to ensure the accuracy of the measurement result.

[0071] S34. Monitor voltage abnormalities. If the abnormal condition is restored within 10ms to 1min, it is recorded as an abnormality; otherwise, it is not considered an abnormality.

[0072] S35, flicker monitoring, calculated in accordance with the requirements of IEC-61000-4-15, to obtain the instantaneous flicker value with a half-cycle time interval, a short-time flicker value every 10 minutes, and a flicker value every two hours; specifically, the RMS value of each frame of data is calculated twice for a half cycle, and a 512-point FFT is performed after storage; the instantaneous flicker value is calculated based on the FFT result, and the short-time flicker value is calculated 120 times cumulatively, and the long-time flicker value is calculated 12 times cumulatively.

[0073] refer to Figure 5 , Figure 5 This is a short-time flicker calculation flow chart of an embodiment of the present invention. When the system processes each frame of data, it first calculates the root mean square value of two half cycles and stores these values. Subsequently, a 512-point FFT is performed using these stored data. Based on the results of the FFT, the system further calculates the instantaneous flicker value. When 120 data are accumulated, the system calculates the short-time flicker value; and when 12 data are accumulated, the long-time flicker value is calculated.

[0074] S36. After the data is processed and calculated, the data is packaged and sent through the UART protocol. The packaged data is parsed and displayed graphically.

[0075] The embodiment of the present invention further includes: a power quality analysis system, characterized in that it includes:

[0076] The data receiving unit is used to receive the electric energy monitoring message data by DMA mode using the SPI interface, and temporarily store the received message data in the RAM.

[0077] The signal processing unit is used to perform wavelet transform and FFT algorithm processing on the voltage and current signals of the electric energy monitoring message data.

[0078] The parameter analysis unit is used to analyze the power quality parameters of the power grid, including: voltage, frequency, voltage swell / sag, number of short-time interruptions, short-time and long-time flicker, harmonics, and interharmonics, and display them in a visual way.

[0079] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for analyzing power quality, characterized in that: The following steps are involved: S1. Using the SPI interface, the power monitoring message data is received through DMA mode, and the received message data is temporarily stored in RAM; S2, performing wavelet transform and FFT algorithm processing on the voltage and current signals of the electric energy monitoring message data; S3. Analyze the power quality parameters of the power grid, including voltage, frequency, voltage swell / sag, number of short-term interruptions, short-term and long-term flicker, harmonics, and interharmonics, and display them in a visual way.

2. A method for analyzing power quality according to claim 1, characterized in that: S1 is specifically: S11, initialize the SPI interface and configure it to data receiving mode; S12, wait for DMA interrupt to be triggered, data reception is completed; S13, verifying the received data; S14, temporarily storing the verified message data in RAM.

3. A method for analyzing power quality according to claim 1, characterized in that: Store every 16 frames of data in an array, and perform a 4096-point FFT after storing all 16 frames of data.

4. A method for analyzing power quality according to claim 1, characterized in that: S2 is specifically: S21, parsing the message data to obtain the required voltage sampling value; S22, performing wavelet transform on the collected voltage and current signals; S23, performing FFT algorithm processing on the data processed by wavelet transform, and converting the time domain data into frequency domain.

5. A method for analyzing power quality according to claim 4, characterized in that: Wavelet transform is used to decompose the sampled voltage or current signal into high-frequency and low-frequency components to improve the frequency domain resolution, which can be expressed as: Among them, ψ j,k (x) represents the wavelet function associated with parameters j and k, s j is a scale variable, j is a frequency domain parameter, k is a translation variable, j, k∈Z means that the wavelet transformed according to j, k belongs to the wavelet function set, Z represents the parameter change set in the wavelet function set, j0 is an arbitrary starting point in the wavelet function set, c j0 (k) represents the approximation coefficient, d j (k) represents the refinement coefficient, represents the scaling function, f(x) represents the sampled voltage or current signal, and x represents the time variable.

6. A method for analyzing power quality according to claim 1, characterized in that: S3 is specifically: S31. Extract frequency domain amplitude information from the FFT calculation results. The integer multiples of the fundamental frequency are harmonics, and the rest are interharmonics. For harmonics, monitor the harmonic voltage and harmonic current content of 2 to 50 times, the effective value of harmonic current of 2 to 50 times, and calculate the voltage and current total harmonic distortion rate. For interharmonics, monitor the interharmonic voltage and harmonic current content of 0.5 to 49.5 times, and the effective value of harmonic current of 0.5 to 49.5 times; S32, perform square root operation on the voltage value to obtain the effective value of the voltage; calculate the average value once every 16 frames of data are received to obtain the effective average value of the voltage; calculate the absolute value of the difference between the effective value of the voltage and 220V and divide it by 220V to obtain the deviation value of the voltage; S33, obtaining the signal frequency, and calculating the average frequency every time 16 frames of data are received; S34, monitor voltage abnormality. If the abnormal condition is restored within 10ms to 1min, it is recorded as an abnormality; otherwise, it is not considered as an abnormality; S35, flicker monitoring, calculated according to the requirements of IEC-61000-4-15, obtain the instantaneous flicker value with half a cycle as the time interval, obtain a short-term flicker value every 10 minutes, and obtain a flicker value every two hours; specifically, the RMS value of each frame of data is calculated twice for a half cycle, and a 512-point FFT is performed after storage; the instantaneous flicker value is calculated based on the FFT result, and the short-term flicker value is calculated 120 times cumulatively, and the long-term flicker value is calculated 12 times cumulatively; S36. After the data is processed and calculated, the data is packaged and sent through the UART protocol. The packaged data is parsed and displayed graphically.

7. A method for analyzing power quality according to claim 5, characterized in that: The calculation formula for harmonic voltage content is as follows: Among them, HRuh represents the harmonic voltage content rate, v n It represents the nth order harmonic voltage value, and v1 represents the fundamental voltage value.

8. The ARM-based power quality analysis system is characterized by: include: The data receiving unit is used to receive the power monitoring message data by DMA mode using the SPI interface, and temporarily store the received message data in the RAM; A signal processing unit, used for performing wavelet transform and FFT algorithm processing on the voltage and current signals of the electric energy monitoring message data; The parameter analysis unit is used to analyze the power quality parameters of the power grid, including: voltage, frequency, voltage swell / sag, number of short-time interruptions, short-time and long-time flicker, harmonics, and interharmonics, and display them in a visual way.

Citation Information

Patent Citations

  • Voltage fluctuation analysis method and system for photovoltaic direct-current grid-connected point

    CN112611914A

  • Three-phase electric energy meter check meter and power-on working method thereof

    CN117761607A

  • Power supply quality analysis device based on short distance radio communication technique

    CN208672718U

Cited By

  • Micro-grid electric energy quality intelligent analysis method and system based on FPGA and medium

    CN120354319A

  • An FPGA-based micro-grid power quality intelligent analysis method, system and medium

    CN120354319B