Power factor calculation method and system suitable for harmonic interference environment

By using wavelet transform and sliding window analysis, the fundamental signal is separated and reconstructed. Combined with attenuation factor calculation, the accuracy problem of power factor calculation under harmonic interference environment is solved, and the fundamental power factor calculation under harmonic interference environment is realized.

CN120948871BActive Publication Date: 2026-02-10BEIJING TENGINEER AIOT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511491848.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2026-02-10
Estimated Expiration
2045-10-20

AI Technical Summary

Technical Problem

Existing power factor calculation methods are difficult to accurately reflect the grid status under harmonic interference environments, leading to disputes over electricity settlement and misjudgments in power dispatch, and failing to truly reflect energy utilization efficiency.

Method used

Wavelet transform is used to decompose voltage and current signals into fundamental and high-frequency components. The stability of the fundamental active and reactive power sequences is analyzed using a sliding window. The weighted average fundamental active and reactive power is calculated by using a weakening factor, and then the fundamental power factor is calculated.

Benefits of technology

Accurately separate high-frequency disturbances and harmonic components in a harmonic interference environment, eliminate the influence of voltage/current abrupt changes, prevent fundamental power factor distortion, and achieve accurate calculation of the fundamental power factor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120948871B_ABST
    Figure CN120948871B_ABST
Patent Text Reader

Abstract

The application discloses a power factor calculation method and system of an electric energy meter suitable for a harmonic interference environment. The method first decomposes an original signal into a fundamental component and a high-frequency component, then reconstructs a fundamental voltage signal and a fundamental current signal based on the fundamental component, and generates a fundamental active power sequence and a fundamental reactive power sequence. Then, the power stability of the fundamental active power sequence and the fundamental reactive power sequence is analyzed by using a sliding window, and the weakening factor of the fundamental active power and the fundamental reactive power at each moment is determined according to the power stability analysis result. The weakening factor is used as a weight coefficient to calculate the fundamental power factor. The weakening factor can be adaptively adjusted according to the power stability to weaken the contribution of the power mutation point to the fundamental power factor, effectively eliminate the influence of the voltage / current mutation point, and prevent individual distortion points from causing the distortion of the overall fundamental power factor, so that the fundamental power factor can be accurately calculated under the harmonic interference environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electricity metering technology, and in particular to a method and system for calculating the power factor of an electricity meter in a harmonic interference environment, an electronic device, and a computer-readable storage medium. Background Technology

[0002] Power factor is an important indicator for evaluating the efficient use of electrical energy by electrical equipment. It reflects the efficiency of active power consumption by electrical equipment and is widely used in power grid metering, electricity billing, and power control. Specifically, the power factor is the ratio of active power to apparent power, and its calculation formula is: PF total Let P represent the total power factor, S represent the total apparent power, Q represent the total reactive power, and D represent the harmonic reactive power. Traditional power factor identification methods are based on Fast Fourier Transform (FFT), which calculates active and reactive power by extracting the phase difference between the fundamental voltage and current, and further derives the fundamental power factor. The calculation formula is as follows: PF1 represents the fundamental power factor, P1 represents the fundamental active power, Q1 represents the fundamental reactive power, S1 represents the fundamental apparent power, and θ1 represents the phase difference between the fundamental voltage and current. This method assumes that the voltage / current signal has a clear periodicity, low harmonic content, and relatively stable signal characteristics throughout the analysis window. It has high accuracy and feasibility under conditions of stable signal period and low harmonic content.

[0003] However, with the large-scale integration of nonlinear power electronic devices such as distributed photovoltaics, variable frequency air conditioners, and fast charging of electric vehicles, as well as sudden interference behaviors caused by motor starting, inverter switching, and capacitor switching, and severe distortion of current signals due to rapid fluctuations in the load of distribution areas, non-steady-state factors such as sudden harmonics and glitches in the power grid signal have been significantly enhanced. Traditional FFT methods, which assume that the signal is a stationary periodic wave, are difficult to accurately characterize instantaneous disturbances, which may lead to significant distortion in existing power factor calculation methods, making it impossible to truly reflect the state of the power grid, and even causing disputes in electricity settlement or misjudgments in power dispatch. For example, the FFT method assumes that the signal is periodic. When the signal does not conform to this assumption, FFT will experience spectral leakage, causing all frequency components in the signal to "cross-contaminate" each other. Assuming a current signal contains a fundamental frequency (50Hz) and higher harmonics (250Hz), if we apply a finite time window to these signals, FFT will use an incomplete periodic signal as input due to "truncation." When the window function is not exactly an integer multiple of the actual signal period, the higher harmonic components of the signal will leak into adjacent frequency ranges. This leakage will cause harmonic components within a certain frequency range to "spread" to nearby frequencies, affecting the accurate identification of harmonics. For nonlinear loads, harmonic currents will significantly increase the effective value of the current, leading to an increase in the calculated apparent power, while the active power may... Without a corresponding increase, the power factor is artificially suppressed, failing to accurately reflect actual energy utilization efficiency. Sudden events such as motor starting, inverter switching, and capacitor switching can cause short-term, strong harmonics or transient fluctuations. These disturbances are typically non-periodic and contain instantaneous high-frequency components. Since FFT performs frequency domain analysis on all signals within a time window, if a sudden disturbance occurs within a portion of the window, FFT processes the entire window's signal in the frequency domain, potentially mixing abrupt changes with normal signals, making it impossible to accurately identify harmonics at the moment of the abrupt change. When sudden load fluctuations occur in the power grid, voltage and current waveforms undergo non-linear changes, possibly even manifesting as high-frequency noise or spikes. These instantaneous changes cannot be accurately captured by FFT because FFT assumes the signal is periodic and stable. Therefore, existing power factor identification methods struggle to accurately calculate the power factor under harmonic interference environments. Summary of the Invention

[0004] This invention provides a method and system for calculating the power factor of an energy meter, an electronic device, and a computer-readable storage medium suitable for harmonic interference environments. It can accurately calculate the fundamental power factor under harmonic interference environments.

[0005] According to one aspect of the present invention, a method for calculating the power factor of an electricity meter suitable for harmonic interference environments is provided, comprising the following:

[0006] Wavelet transform is used to decompose voltage and current signals into fundamental and high-frequency components, respectively.

[0007] The fundamental wave signal is reconstructed based on the fundamental wave components of the voltage and current signals to obtain the fundamental wave voltage and fundamental wave current, and to generate the fundamental wave active power sequence and the fundamental wave reactive power sequence.

[0008] The power stability of the fundamental active power sequence and the fundamental reactive power sequence is analyzed using a sliding window method.

[0009] Based on the power stability analysis results, the attenuation factors of the fundamental active power and fundamental reactive power at each moment are determined. The attenuation factors are used as weighting coefficients to calculate the weighted average fundamental active power and weighted average fundamental reactive power, and then the fundamental power factor is calculated.

[0010] Furthermore, the process of analyzing the power stability of the fundamental active power sequence using a sliding window includes the following:

[0011] The fundamental active power sequence is continuously slid through a preset sliding window, and the average value and standard deviation of the fundamental active power within the window are calculated after each sliding.

[0012] The local deviation at each moment within the window is calculated based on the average fundamental active power within the window and the instantaneous fundamental active power at each moment within the window.

[0013] Based on the local deviation at each time point within the window and the standard deviation of the fundamental active power within the window, the deviation ratio index at each time point within the window is calculated.

[0014] Furthermore, the deviation ratio index is calculated based on the following formula:

[0015] ;

[0016] in, The deviation ratio index represents the fundamental active power at time t. This represents the local deviation of the fundamental active power at time t. t0 represents the standard deviation of the fundamental active power within the sliding window containing time t, and t0 represents the starting point of the sliding window containing time t. This represents a small constant.

[0017] Furthermore, the attenuation factor of the fundamental active power at each moment is calculated based on the following formula:

[0018] ;

[0019] in, This represents the attenuation factor at time t. It represents the deviation ratio of the fundamental active power at time t.

[0020] Furthermore, if the deviation ratio index at a certain moment is greater than a preset threshold, it is determined that there is an abnormal power fluctuation at that moment; otherwise, it is determined that there is no abnormal power fluctuation at that moment.

[0021] Furthermore, for moments with abnormal power fluctuations, the attenuation factor of the fundamental active power at each moment is calculated based on the following formula:

[0022] ;

[0023] in, This represents the attenuation factor at time t. The deviation ratio index representing the fundamental active power at time t;

[0024] For times when there are no abnormal power fluctuations, the attenuation factor is set to 1.

[0025] Furthermore, the wavelet transform has six decomposition layers.

[0026] In addition, the present invention also provides a power factor calculation system for electricity meters suitable for harmonic interference environments, comprising:

[0027] The wavelet transform module is used to decompose voltage and current signals into fundamental and high-frequency components respectively using wavelet transform.

[0028] The fundamental signal reconstruction module is used to reconstruct the fundamental signal based on the fundamental components of the voltage and current signals to obtain the fundamental voltage and fundamental current, and generate the fundamental active power sequence and the fundamental reactive power sequence.

[0029] The power stability analysis module is used to analyze the power stability of the fundamental active power sequence and the fundamental reactive power sequence using a sliding window.

[0030] The fundamental power factor calculation module is used to determine the attenuation factors of fundamental active power and fundamental reactive power at each moment based on the power stability analysis results. The attenuation factors are used as weighting coefficients to calculate the weighted average fundamental active power and weighted average fundamental reactive power, and then the fundamental power factor is calculated.

[0031] In addition, the present invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method described above by calling the computer program stored in the memory.

[0032] In addition, the present invention provides a computer-readable storage medium for storing a computer program for calculating the power factor of an electricity meter in a harmonic interference environment, wherein the computer program executes the steps of the method described above when running on a computer.

[0033] The present invention has the following beneficial effects:

[0034] The present invention provides a method for calculating the power factor of an energy meter in a harmonic interference environment. First, wavelet transform is used to decompose the original signal into fundamental and high-frequency components, accurately separating high-frequency disturbance / harmonic components and precisely extracting the fundamental component. Then, based on the fundamental component, fundamental voltage and current signals are reconstructed, generating fundamental active and reactive power sequences. Next, a sliding window analysis is used to assess the power stability of the fundamental active and reactive power sequences. Based on the power stability analysis results, a reduction factor for the fundamental active and reactive power at each moment is determined. This reduction factor is used as a weighting coefficient to calculate the weighted average fundamental active and reactive power, thereby calculating the fundamental power factor. The reduction factor can be adaptively adjusted based on power stability to reduce the contribution of power abrupt changes to the fundamental power factor, effectively eliminating the influence of voltage / current abrupt changes and preventing individual distortion points from causing overall fundamental power factor distortion. Therefore, the fundamental power factor can be accurately calculated in a harmonic interference environment.

[0035] In addition, the power factor calculation system for electricity meters in harmonic interference environments of the present invention also has the above-mentioned advantages.

[0036] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description

[0037] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:

[0038] Figure 1 This is a flowchart illustrating a preferred embodiment of the power factor calculation method for an energy meter applicable to a harmonic interference environment.

[0039] Figure 2 yes Figure 1 A schematic diagram of the sub-process of step S3;

[0040] Figure 3 This is a schematic diagram of the module structure of a power factor calculation system for an energy meter suitable for harmonic interference environments, according to another embodiment of this application. Detailed Implementation

[0041] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0042] Reference Figure 1 A preferred embodiment of this application provides a method for calculating the power factor of an energy meter suitable for harmonic interference environments, including the following:

[0043] Step S1: Use wavelet transform to decompose the voltage signal and current signal into fundamental component and high-frequency component respectively;

[0044] Step S2: Based on the fundamental components of the voltage and current signals, reconstruct the fundamental signal to obtain the fundamental voltage and fundamental current, and generate the fundamental active power sequence and the fundamental reactive power sequence.

[0045] Step S3: Analyze the power stability of the fundamental active power sequence and the fundamental reactive power sequence using a sliding window.

[0046] Step S4: Based on the power stability analysis results, determine the attenuation factors of the fundamental active power and fundamental reactive power at each moment, use the attenuation factors as weighting coefficients to calculate the weighted average fundamental active power and weighted average fundamental reactive power, and then calculate the fundamental power factor.

[0047] It is understood that the power factor calculation method for electricity meters in harmonic interference environments described in this embodiment first decomposes the original signal into fundamental and high-frequency components using wavelet transform. This accurately separates the high-frequency disturbance / harmonic components and accurately extracts the fundamental component. Then, based on the fundamental component, the fundamental voltage and current signals are reconstructed, generating fundamental active power and reactive power sequences. Next, the power stability of the fundamental active and reactive power sequences is analyzed using a sliding window. Based on the power stability analysis results, the attenuation factors of the fundamental active and reactive power at each moment are determined. The attenuation factors are used as weighting coefficients to calculate the weighted average fundamental active and reactive power, and then the fundamental power factor is calculated. The attenuation factors can be adaptively adjusted according to power stability to reduce the contribution of power abrupt changes to the fundamental power factor. This effectively eliminates the influence of voltage / current abrupt changes and prevents individual distortion points from causing overall fundamental power factor distortion, thus enabling accurate calculation of the fundamental power factor in harmonic interference environments.

[0048] In step S1, wavelet transform is used to perform multi-scale signal decomposition on the original voltage and current signals, expanding the original signals in the time-frequency domain. This effectively extracts the fundamental, harmonic, and disturbance components. Wavelet transform is a tool for performing local analysis of signals simultaneously in the time and frequency domains. Unlike Fourier transform, which uses sine waves as a basis, wavelet transform uses finite-support wavelet basis functions and performs translation and scaling. Through wavelet decomposition, the original signal x(t) can be expressed as: ,in, Represents the original signal. This represents the approximation component of the j-th layer, which is a low-frequency component (e.g., the fundamental frequency). The k-th level detail component represents the higher frequency components (e.g., harmonics or glitches), and j represents the decomposition level, which is set according to the signal frequency range and sampling rate.

[0049] Optionally, considering that the sampling frequency of the electricity meter is 6400Hz and the highest frequency of the original signal is 3200Hz, the present invention sets the number of wavelet transform decomposition layers to six. The results of the six-layer wavelet decomposition are shown in Table 1.

[0050] Table 1. Results of Six-Level Wavelet Decomposition

[0051] ;

[0052] As can be seen, A6 covers 50Hz (my country's power grid frequency) and its adjacent components, making it the most suitable for extracting the fundamental frequency component.

[0053] In addition, commonly used wavelet bases include the DB4 wavelet base, STM4 wavelet base, and COIF5 wavelet base. Among them, the DB4 wavelet base has the characteristics of tight support, smoothness, and suitability for noise filtering; the STM4 wavelet base has better symmetry and stable boundary processing; and the COIF5 wavelet base is suitable for detecting details and is often used for glitch detection. Since this invention analyzes the current / voltage signal of an electricity meter, the DB4 wavelet base is preferred.

[0054] In addition, when performing DWT operations on the current signal i(t) and the voltage signal u(t): The decomposed components D1~D6 are considered as disturbances / harmonics, and A6 is retained separately as the fundamental frequency approximation. This allows for the extraction of the fundamental component while simultaneously separating all high-frequency disturbance / harmonic components.

[0055] In addition, in step S2, after wavelet decomposition, the fundamental component (usually the j-th level approximation coefficient A) is extracted from the original voltage / current signal. j(e.g., A6). Although this process completes the separation of frequency levels, to obtain a power factor with a clear physical meaning, the following two steps are still required: ① reconstructing the fundamental wave signal waveform, ② calculating the active and reactive power of the fundamental wave.

[0056] The invertibility of wavelet transform means that the waveform of the original signal within that frequency range can be derived from the selected components. Assuming we are using the 6th level approximation component A6, the reconstruction operation of the fundamental signal is as follows: The above reconstruction operation only retains the low-frequency approximation term (fundamental component), sets all detail terms (high-frequency components) to zero, and the inverse transformation yields a smooth approximate sine signal, that is, the fundamental component of the signal in the wavelet sense. The specific reconstruction operation can be implemented through MATLAB / Python.

[0057] After wavelet reconstruction of the fundamental components of the voltage and current signals respectively, the fundamental voltage and current signals can be obtained, from which the instantaneous fundamental active power can be calculated. The calculation formula is as follows: This formula represents the fundamental projection of the power at the current moment of the electricity meter, and can be seen as the net power obtained after filtering out harmonic interference. The average fundamental active power can be obtained by averaging the instantaneous fundamental active power, and the calculation formula is as follows: In digital energy meters, this integral is obtained by sliding accumulation within a sampling window (e.g., one fundamental cycle of 20ms). Instantaneous reactive power, however, is the product of the orthogonal components of voltage and current; therefore, it needs to be calculated... Common methods for phase shifting include the Hilbert transform or orthogonal projection. Taking orthogonal projection as an example, let's assume the voltage is a pure sine wave. This decomposes the current into in-phase components. and orthogonal components Then the instantaneous fundamental reactive power is: The Hilbert transform method and orthogonal projection method are both existing technologies, and their specific principles will not be elaborated here. Therefore, after obtaining the instantaneous fundamental active power and instantaneous fundamental reactive power at each moment, the fundamental active power sequence and the fundamental reactive power sequence can be generated.

[0058] In addition, after generating the fundamental active power sequence and the fundamental reactive power sequence, the fundamental power factor can be calculated based on the following formula: ,in, , Indicates the effective value of the voltage. This represents the effective value of the current; multiplying the two values ​​gives the apparent power. This represents the fundamental power factor. It can be understood that this formula can be used to calculate the fundamental power factor in the RMS sense, avoiding fluctuations caused by instantaneous power noise.

[0059] Additionally, in step S3, as Figure 2 As shown, the process of analyzing the power stability of the fundamental active power sequence using a sliding window includes the following:

[0060] Step S31: Using a preset sliding window, continuously slide it in the fundamental active power sequence, and calculate the average value and standard deviation of the fundamental active power within the window after each slide;

[0061] Step S32: Calculate the local deviation at each moment within the window based on the average fundamental active power within the window and the instantaneous fundamental active power at each moment within the window.

[0062] Step S33: Based on the local deviation at each time point within the window and the standard deviation of the fundamental active power within the window, calculate the deviation ratio index at each time point within the window.

[0063] Specifically, in step S2 above, the fundamental active power sequence P(t) and fundamental reactive power sequence Q(t) reconstructed by wavelet have been obtained. Theoretically, these two sequences should be continuous, smooth, and have an approximately sinusoidal amplitude of energy fluctuations. However, in actual power grid operation, there may still be abrupt changes in current / voltage that are not completely eliminated, local anomalies (such as voltage drops or jumps) that interfere with power calculation, and distortions at very rare moments that cause local distortion of the fundamental power factor. Therefore, in order to identify these abrupt changes and weaken them in subsequent calculations of the fundamental power factor, a sliding window mechanism is introduced to perform power stability analysis on the fundamental active power sequence and the fundamental reactive power sequence. The sliding window is a data interval of fixed length, which slides a certain distance (which can be 1 point or more) along the time axis each time. Local statistics are performed within each window. The window length W can be set to 20 points (corresponding to the typical sampling number in one cycle of the electricity meter), and the sliding step size S can be set to 1 or 2. The current window interval is: t∈[t0,t0+W-1]. Of course, in other embodiments of the present invention, the relevant parameters of the sliding window can be set according to actual needs.

[0064] After each slide, a local statistical analysis is performed within the window. Taking P(t) as an example, within the window [t0, t0+W-1], the average value and standard deviation of the fundamental active power within the window are first calculated using the following formula: , , This represents the average value of the fundamental active power within the window. It represents the standard deviation of the fundamental active power within the window.

[0065] Then, taking the current time t as the core, calculate the local deviation at the current time t. The calculation formula is as follows: , It represents the local deviation of the fundamental active power at time t.

[0066] Next, this invention defines an anomaly criterion index: the deviation ratio index, used to quantify whether there is an anomaly in power fluctuation at a certain moment. The calculation formula for the deviation ratio index is as follows:

[0067] ;

[0068] in, The deviation ratio index represents the fundamental active power at time t. This represents the local deviation of the fundamental active power at time t. t0 represents the standard deviation of the fundamental active power within the sliding window containing time t, and t0 represents the starting point of the sliding window containing time t. To prevent the denominator from being zero, the calculated deviation ratio index is represented by a small constant. The larger the value, the worse the power stability and the more it deviates from the proportional specification. The smaller the value, the better the power stability.

[0069] Optionally, if the deviation ratio at a certain moment exceeds a preset threshold, i.e. If the value is greater than θ, and the preset threshold θ can be 2.5, then it is determined that there is an abnormal power fluctuation at that moment; otherwise, it is determined that there is no abnormal power fluctuation at that moment.

[0070] Furthermore, the process of analyzing the power stability of the fundamental reactive power sequence using a sliding window is the same as the process of analyzing the power stability of the fundamental active power sequence described above, and will not be repeated here.

[0071] Furthermore, after calculating the deviation ratio index of the fundamental active power sequence and the fundamental reactive power sequence at each moment in step S3, in step S4, this invention introduces a weakening factor to adaptively adjust the weights of the instantaneous fundamental active power and instantaneous fundamental reactive power at each moment when calculating the fundamental power factor. The formula for calculating the weakening factor is as follows:

[0072] ;

[0073] in, The attenuation factor representing the fundamental active power or fundamental reactive power at time t. This represents the deviation ratio of the fundamental active power or fundamental reactive power at time t. This attenuation factor is a Gaussian attenuation factor. This means that the power stability at that moment is good and the power data is highly reliable. ,like A large value indicates poor power stability at that moment, resulting in low reliability of the power data. Therefore, the contribution of the power data at that moment needs to be reduced. The closer the factor is to zero, the larger the attenuation factor is to the power stability; the worse the power stability is, the smaller the attenuation factor is to the power stability.

[0074] After calculating the attenuation factors of the instantaneous fundamental active power and instantaneous fundamental reactive power at each moment, the attenuation factors are used as weighting coefficients to calculate the weighted average fundamental active power and weighted average fundamental reactive power. The calculation formula is as follows: , P eef Q represents the weighted average fundamental active power. eef This represents the weighted average fundamental reactive power, from which the fundamental power factor can be calculated using the following formula: .

[0075] It is understood that by mapping the deviation ratio index to a confidence level in the range of [0,1], the present invention can adaptively adjust the attenuation factor according to the power stability to reduce the contribution of power mutation points to the fundamental power factor, effectively eliminate the influence of voltage / current mutation points, prevent individual distortion points from causing overall fundamental power factor distortion, and thus accurately calculate the fundamental power factor under harmonic interference environment.

[0076] Optionally, for times when power fluctuations are abnormal, i.e. Only when the value is greater than θ will the corresponding weakening factor be calculated based on the weakening factor calculation formula mentioned above. For moments when there is no abnormal power fluctuation, i.e., normal and stable power points, the weakening factor is directly set to 1, which means that the power data of normal and stable power points is not weakened, which helps to improve calculation efficiency.

[0077] In addition, such as Figure 3 As shown, another embodiment of the present invention also provides a power factor calculation system for electricity meters suitable for harmonic interference environments, preferably employing the power factor calculation method for electricity meters suitable for harmonic interference environments as described above, including:

[0078] The wavelet transform module is used to decompose voltage and current signals into fundamental and high-frequency components respectively using wavelet transform.

[0079] The fundamental signal reconstruction module is used to reconstruct the fundamental signal based on the fundamental components of the voltage and current signals to obtain the fundamental voltage and fundamental current, and generate the fundamental active power sequence and the fundamental reactive power sequence.

[0080] The power stability analysis module is used to analyze the power stability of the fundamental active power sequence and the fundamental reactive power sequence using a sliding window.

[0081] The fundamental power factor calculation module is used to determine the attenuation factors of fundamental active power and fundamental reactive power at each moment based on the power stability analysis results. The attenuation factors are used as weighting coefficients to calculate the weighted average fundamental active power and weighted average fundamental reactive power, and then the fundamental power factor is calculated.

[0082] It is understood that the power factor calculation system for electricity meters in harmonic interference environments of this embodiment first decomposes the original signal into fundamental and high-frequency components through wavelet transform, which can accurately separate high-frequency disturbance / harmonic components and accurately extract the fundamental component. Then, based on the fundamental component, the fundamental voltage and current signals are reconstructed, and fundamental active power and reactive power sequences are generated. Then, the power stability of the fundamental active and reactive power sequences is analyzed using a sliding window, and the attenuation factor of the fundamental active and reactive power at each moment is determined according to the power stability analysis results. The attenuation factor is used as a weighting coefficient to calculate the weighted average fundamental active power and weighted average fundamental reactive power, and then the fundamental power factor is calculated. The attenuation factor can be adaptively adjusted according to the power stability to reduce the contribution of power abrupt changes to the fundamental power factor. This can effectively eliminate the influence of voltage / current abrupt changes and prevent individual distortion points from causing overall fundamental power factor distortion, thus enabling accurate calculation of the fundamental power factor in harmonic interference environments.

[0083] In addition, another embodiment of the present invention provides an electronic device including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method described above by calling the computer program stored in the memory.

[0084] In addition, another embodiment of the present invention provides a computer-readable storage medium for storing a computer program for calculating the power factor of an electricity meter in a harmonic interference environment, wherein the computer program executes the steps of the method described above when running on a computer.

[0085] Common computer-readable storage media include: floppy disks, flexible disks, hard disks, magnetic tapes, any other magnetic media, CD-ROMs, any other optical media, punch cards, paper tape, any other physical media with perforated patterns, random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), flash erasable programmable read-only memory (FLASH-EPROM), any other memory chips or cartridges, or any other media readable by a computer. Instructions may further be transmitted or received by a transmission medium. The term transmission medium can include any tangible or intangible medium used to store, encode, or carry instructions for execution by a machine, and includes digital or analog carrier communication signals or intangible media that facilitate communication of such instructions. Transmission media include coaxial cables, copper wires, and optical fibers, which contain conductors for transmitting a bus of computer data signals.

[0086] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0087] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0088] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0089] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0090] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0091] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

[0092] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for calculating the power factor of an electricity meter suitable for environments with harmonic interference, characterized in that, Includes the following: Wavelet transform is used to decompose voltage and current signals into fundamental and high-frequency components, respectively. The fundamental wave signal is reconstructed based on the fundamental wave components of the voltage and current signals to obtain the fundamental wave voltage and fundamental wave current, and to generate the fundamental wave active power sequence and the fundamental wave reactive power sequence. The power stability of the fundamental active power sequence and the fundamental reactive power sequence is analyzed using a sliding window method. Based on the power stability analysis results, the attenuation factors of the fundamental active power and fundamental reactive power at each moment are determined. These attenuation factors are then used as weighting coefficients to calculate the weighted average fundamental active power and weighted average fundamental reactive power, thereby calculating the fundamental power factor. The formula for calculating the attenuation factor is as follows: ; in, Indicates time t Attenuation factor of fundamental active power or fundamental reactive power. Indicates time t The deviation ratio index of fundamental active power or fundamental reactive power.

2. The method for calculating the power factor of an energy meter in a harmonic interference environment as described in claim 1, characterized in that, The process of analyzing the power stability of the fundamental active power sequence using a sliding window includes the following: The fundamental active power sequence is continuously slid through a preset sliding window, and the average value and standard deviation of the fundamental active power within the window are calculated after each sliding. The local deviation at each moment within the window is calculated based on the average fundamental active power within the window and the instantaneous fundamental active power at each moment within the window. Based on the local deviation at each time point within the window and the standard deviation of the fundamental active power within the window, the deviation ratio index at each time point within the window is calculated.

3. The method for calculating the power factor of an energy meter suitable for harmonic interference environments as described in claim 2, characterized in that, The deviation ratio index is calculated based on the following formula: ; in, Indicates time t Deviation ratio index of fundamental active power Indicates time t Local deviation of fundamental active power Indicates time included t The standard deviation of the fundamental active power within the sliding window. t 0 indicates that time is included. t The starting point of the sliding window's time. This represents a small constant.

4. The method for calculating the power factor of an energy meter suitable for harmonic interference environments as described in claim 2, characterized in that, If the deviation ratio index at a certain moment is greater than the preset threshold, it is determined that there is an abnormal power fluctuation at that moment; otherwise, it is determined that there is no abnormal power fluctuation at that moment.

5. The method for calculating the power factor of an energy meter suitable for harmonic interference environments as described in claim 4, characterized in that, For times when there are no abnormal power fluctuations, the attenuation factor is set to 1.

6. The method for calculating the power factor of an energy meter in a harmonic interference environment as described in claim 1, characterized in that, The wavelet transform has six decomposition levels.

7. A power factor calculation system for electricity meters suitable for harmonic interference environments, characterized in that, include: The wavelet transform module is used to decompose voltage and current signals into fundamental and high-frequency components respectively using wavelet transform. The fundamental signal reconstruction module is used to reconstruct the fundamental signal based on the fundamental components of the voltage and current signals to obtain the fundamental voltage and fundamental current, and generate the fundamental active power sequence and the fundamental reactive power sequence. The power stability analysis module is used to analyze the power stability of the fundamental active power sequence and the fundamental reactive power sequence using a sliding window. The fundamental power factor calculation module is used to determine the attenuation factors of fundamental active power and fundamental reactive power at each moment based on power stability analysis results. The attenuation factors are then used as weighting coefficients to calculate the weighted average fundamental active power and weighted average fundamental reactive power, and finally, the fundamental power factor. The formula for calculating the attenuation factor is as follows: ; in, Indicates time t Attenuation factor of fundamental active power or fundamental reactive power. Indicates time t The deviation ratio of fundamental active power or fundamental reactive power.

8. An electronic device, characterized in that, The method includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method as described in any one of claims 1 to 6 by calling the computer program stored in the memory.

9. A computer-readable storage medium for storing a computer program for calculating the power factor of an energy meter in a harmonic interference environment, characterized in that, The computer program, when run on a computer, performs the steps of the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Multiwavelet-based random non-linear load active energy metering method

    CN102890190A

  • Electric energy metering method under distorted signal condition based on wavelet transform and curve fitting

    CN108169553A