Fluctuation load power calculation method suitable for electric energy meter and power consumption terminal, electric energy meter and power consumption terminal
By combining a phase-locked loop and a state observer, rapid and accurate power calculation under fluctuating load conditions is achieved, solving the problem of insufficient dynamic metering accuracy in existing technologies and improving the dynamic response speed and metering accuracy of energy meters and user terminals.
Patent Information
- Application Number
- CN202511573894.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-10-31
AI Technical Summary
Existing technologies for electronic energy meters lack sufficient dynamic metering accuracy under fluctuating load conditions, leading to energy metering errors, especially when power changes cannot be tracked in real time during load switching.
By combining a phase-locked loop (PLL) with a state observer, active and reactive power can be quickly calculated through adaptive estimation and dq transformation, eliminating the need for a low-pass filter. This enables synchronous estimation of in-phase and quadrature signals of voltage and current signals, and allows direct extraction of the fundamental component from signals containing DC components.
Under fluctuating load conditions, it achieves fast and accurate power calculation, improves the dynamic metering accuracy and response speed of electricity meters and user terminals, and avoids the response lag and computational burden in traditional methods.
Smart Images

Figure CN121027606B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electricity metering, specifically relating to a method for calculating fluctuating load power applicable to electricity meters and power consumption terminals, as well as the electricity meters and power consumption terminals. Background Technology
[0002] In the field of electricity metering, the measurement accuracy of active and reactive power is directly related to the fairness of trade settlement and the reliability of smart grid control. With the large-scale connection of fluctuating and impulsive loads such as electric vehicle charging, distributed photovoltaics, and industrial electric arc furnaces, the load characteristics of the power grid are becoming increasingly complex. The core requirements for electricity metering equipment have expanded from steady-state accuracy to dynamic accuracy, that is, it is required to maintain extremely high metering accuracy when the load power changes rapidly.
[0003] Currently, the digital sampling method based on instantaneous power theory is commonly used in electronic energy meters. Its technical approach is as follows: first, the instantaneous power is calculated, and then a low-pass filter is used to filter out the AC components that are twice the power frequency and higher frequencies, and finally the DC component representing the active power is extracted.
[0004] This traditional method reveals inherent technical flaws under fluctuating load conditions, directly hindering the improvement of dynamic metering accuracy: the narrow-bandwidth low-pass filter designed to ensure steady-state accuracy has an inherently large time constant, resulting in a significant lag in system response. When load power undergoes a step change, the power calculation result cannot immediately track the actual value, but requires a slow ramp-up process. This lag introduces significant energy metering errors at critical moments of load switching, causing under- or over-metering of electricity, resulting in the energy meter losing accuracy during dynamic moments when precise measurement is most needed. Summary of the Invention
[0005] This invention proposes a method for calculating fluctuating load power applicable to electricity meters and user terminals. The purpose of this invention is to enable rapid and lag-free tracking of power signal changes under fluctuating load conditions, thereby effectively ensuring the accuracy of electricity metering during dynamic moments such as load switching.
[0006] The technical solution of this invention is as follows:
[0007] A method for calculating fluctuating load power applicable to electricity meters and power consumption terminals includes the following steps:
[0008] Step S1: Continuously and synchronously sample the grid voltage signal and current signal and filter out high-frequency harmonic interference respectively to obtain the voltage channel signal sequence and the current channel signal sequence;
[0009] Step S2: Based on the state observer, without removing the DC component contained in the voltage channel signal sequence and current channel signal sequence obtained in step S1, adaptive estimation of the in-phase and quadrature signals of the voltage and current signals is achieved, and the state estimation vectors of the voltage channel and the current channel are obtained.
[0010] Step S3: Input the state estimation vector of the voltage channel into the phase-locked loop, and estimate the angular frequency and phase of the voltage signal based on the dq transform;
[0011] Step S4: Calculate the active power and reactive power based on the current path state estimation vector obtained in step S2, and the voltage phase estimation value and voltage d-axis component estimated in step S3.
[0012] As a further improvement to the fluctuating load power calculation method applicable to electricity meters and user terminals, in step S2, adaptive estimation is performed for both the voltage channel and the current channel in the following manner:
[0013] Step S2-1: Establish the asymptotic observer equation for the current channel:
[0014] ;
[0015] in, The state estimation vector of the current channel is in the th... The estimated value at each moment, For the state estimation vector at the th The derivative at time n, For the output vector at the th The value at each moment, The state matrix, For the state-output matrix, The observer gain matrix is... The DC correlation matrix is as follows:
[0016] ;
[0017] ;
[0018] ;
[0019] ;
[0020] In the above formula, The voltage channel signal sequence or current channel signal sequence processed in step S1 is in the... The value at each moment, For the first The intermediate state at any given moment. Indicates the first The estimated value of the angular frequency at each moment. and These are two elements of the observer gain matrix;
[0021] Step S2-2: Initialize the variables in the asymptotic observer equation;
[0022] Step S2-3: Substitute the signal values of the signal sequence obtained in step S1 into the corresponding asymptotic observer equations, and process the intermediate states. Perform adaptive updates;
[0023] Step S2-4: Calculate the current observer error:
[0024] ;
[0025] Step S2-5: Determine the observer error Is it less than a specified threshold? If it is less than a specified threshold, the observer output of the current signal channel is determined to be stable; otherwise, the current signal channel is determined to be unstable.
[0026] Once the observers for both the voltage and current channels are stable, the corresponding state estimation vectors will contain the in-phase and quadrature signals for those channels. The state estimation vector of the voltage channel at each time step is denoted as . The state estimation vector of the current channel is denoted as... .
[0027] As a further improvement to the fluctuating load power calculation method applicable to electricity meters and user terminals, in steps S2-3, each time a new value is substituted... back:
[0028] First calculate the current ;
[0029] Then based on the current and Calculate At the same time, according to the current and Calculate the next moment :
[0030] ;
[0031] In the above formula, These are parameters that affect the convergence speed;
[0032] According to the current The second element Calculate intermediate variables Current derivative:
[0033] ;
[0034] Then based on and current Calculate ;
[0035] Meanwhile, we wait for step S3 to update the estimated angular frequency as... .
[0036] As a further improvement to the fluctuating load power calculation method applicable to electricity meters and user terminals, step S3 specifically includes:
[0037] Step S3-1: Perform dq transformation on the state estimation vector of the voltage signal according to the following formula:
[0038] ;
[0039] in, The first phase-locked loop obtained Phase estimate of voltage signal at each moment.
[0040] As a further improvement to the fluctuating load power calculation method applicable to electricity meters and user terminals, step S3 also includes:
[0041] Step S3-2: Convert the voltage q-axis component from step S3-1. The input is fed into the PI controller, and the intermediate quantity is calculated according to the following formula. :
[0042] ;
[0043] in, and For PI controller parameters, Indicates an integrator;
[0044] Step S3-3: Estimate the current voltage signal angular frequency using the following formula. and phase estimate :
[0045] ;
[0046] in, The angular frequency is fixed by bias.
[0047] As a further improvement to the fluctuating load power calculation method applicable to electricity meters and user terminals, step S3 also includes:
[0048] Step S3-4: Estimate the angular frequency and phase estimate Feedback is sent to the preceding input to update the variables in the corresponding steps; where The observer model feeds back to the voltage and current paths. Feedback is provided to the dq transformation stage of the voltage and current channels.
[0049] As a further improvement to the fluctuating load power calculation method applicable to electricity meters and user terminals, step S4 specifically includes:
[0050] Step S4-1: Based on the estimated angular frequency, perform coordinate transformation on the state estimation vector of the current path obtained in step S2 to obtain the... Current intermediate state vector at each time step :
[0051] ;
[0052] Step S4-2: Based on the voltage phase estimate and voltage d-axis component obtained in step S3, calculate the active power according to the following formula. and reactive power :
[0053] ;
[0054] in, It is the d-axis component of the voltage calculated in step S3.
[0055] As a further improvement to the fluctuating load power calculation method applicable to electricity meters and user terminals, step S4 also includes:
[0056] Step S4-4: Determine whether the stability condition of step S2-5 is met; if it is met, then the output active power is... and reactive power This is the desired power RMS value; otherwise, continue executing steps S1 to S4 until the output stabilizes.
[0057] The present invention also discloses an energy meter, including a processor and a memory, wherein a program stored in the memory is configured to be executed by the processor to implement the above-described fluctuating load power calculation method.
[0058] The present invention also discloses a data acquisition terminal, including a processor and a memory, wherein a program stored in the memory is configured to be executed by the processor to implement the above-described fluctuating load power calculation method.
[0059] Compared with the prior art, the present invention has the following beneficial effects:
[0060] 1. This invention combines a phase-locked loop (PLL) with a state observer to construct a system structure capable of rapidly and accurately calculating power under fluctuating load conditions. The PLL provides dynamic frequency and phase tracking capabilities, while the state observer synchronously estimates the in-phase and quadrature components in the voltage and current signals without prior DC removal processing. This allows for the effective extraction of the fundamental component even in the presence of DC components, significantly improving the accuracy of power calculation under fluctuating load conditions.
[0061] 2. This invention employs an adaptive estimation mechanism based on a state observer. By introducing DC-related terms and a gradient update strategy into the state equation, it achieves online compensation for the DC component in voltage and current signals. This method avoids the problem of traditional DC removal calculation steps requiring multiple cycles, overcomes the resulting dynamic response delay, and is particularly suitable for scenarios with rapidly changing loads.
[0062] 3. This invention utilizes the synchronous frequency characteristics of the voltage and current channels, feeding back the frequency and phase information estimated from the voltage channel to the current channel processing, and achieving power calculation through a unified coordinate rotation operation. This structure not only eliminates the low-pass filtering stage in traditional power calculation, reducing the computational burden, but also achieves synchronous output of active and reactive power, further improving the system's dynamic response speed and real-time performance.
[0063] By comprehensively utilizing the above-mentioned technical means, this invention can achieve rapid, stable and accurate power measurement in application scenarios with high real-time requirements, such as electricity meters and data acquisition terminals, under complex conditions of frequency fluctuations and the presence of DC components. Attached Figure Description
[0064] Figure 1 This is a flowchart illustrating the method of the present invention. Detailed Implementation
[0065] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0066] Example 1
[0067] like Figure 1 A method for calculating fluctuating load power applicable to electricity meters and user terminals includes the following steps:
[0068] Step S1: Continuously and synchronously sample the grid voltage and current signals to obtain multiple sets of voltage and current sampling sequences, and save them to a buffer. Perform low-pass filtering on the voltage and current sampling sequences respectively to remove high-frequency harmonic interference, obtaining the voltage channel signal sequence and the current channel signal sequence.
[0069] The design of the digital filter follows conventional techniques, and this embodiment does not provide a specific implementation method. Based on engineering experience, a 6th-order Butterworth IIR filter with a passband of 45 Hz to 55 Hz can be used to meet the requirement of -40 dB stopband attenuation. It should be noted that although the IIR filter does not satisfy linear phase, the effects of the filter on phase can cancel each other out because the voltage and current paths pass through the filter simultaneously.
[0070] It should be noted that the low-pass filtering in this step is a basic processing procedure for the sampled signal, rather than the low-pass filtering process in traditional calculation schemes that filters out AC components at twice the power frequency and higher frequencies after obtaining the instantaneous power to extract the DC component. The two are fundamentally different. The low-pass filtering of the sampled signal in this step does not require a large time constant, therefore there is no issue of response lag.
[0071] Assuming that after step S1, the voltage channel signal sequence and the current channel signal sequence are in the th... The signal values at each time point are respectively represented as follows: and and has the following forms:
[0072] ;
[0073] in, Indicates voltage amplitude. Indicates the current amplitude. The signal angular frequency, Sampling frequency, For voltage phase, For current phase, The DC component of the voltage signal. This is the DC component of the current signal.
[0074] Step S2: Based on the state observer, without removing the DC component contained in the voltage channel signal sequence and current channel signal sequence obtained in step S1, adaptive estimation of the in-phase and quadrature signals of the voltage and current signals is achieved, and the state estimation vectors of the voltage channel and the current channel are obtained.
[0075] For both voltage and current paths, adaptive estimation is performed using the following method:
[0076] Step S2-1: Establish the asymptotic observer equation for the current channel:
[0077] ;
[0078] in, The state estimation vector of the current channel is in the th... The estimated value at each moment, For the state estimation vector at the th The derivative at time n, For the output vector at the th The value at each moment, The state matrix, For the state-output matrix, The observer gain matrix is... The DC correlation matrix is as follows:
[0079] ;
[0080] ;
[0081] ;
[0082] ;
[0083] In the above formula, The voltage channel signal sequence or current channel signal sequence processed in step S1 is in the... The value at each moment, For the first The intermediate state at any given moment. Indicates the first The estimated value of the angular frequency at each moment. and These are two elements of the observer gain matrix. This represents the DC component of the currently estimated signal.
[0084] In this observer, and It is not directly estimated by the observer; the former is updated by subsequent steps, while the latter is... It is part of something that does not need to be explicitly expressed.
[0085] According to the stability condition of the state equation, the matrix The value of needs to satisfy , i.e., matrix Negative determination. Based on engineering experience, Possible values .
[0086] Step S2-2: Initialize the variables in the asymptotic observer equation.
[0087] In this embodiment: , , , There is also an intermediate state. .
[0088] Step S2-3: Substitute the signal values of the signal sequence obtained in step S1 into the corresponding asymptotic observer equations one by one, each time substituting a new value... back:
[0089] First calculate the current ;
[0090] Then based on the current and Calculate ( , (for the sampling period), and also based on the current and Calculate the next moment :
[0091] ;
[0092] In the above formula, The parameter that affects the convergence speed has a value greater than 0, and is generally 100.
[0093] According to the current The second element Calculate intermediate variables Current derivative:
[0094] ;
[0095] Then based on and current Calculate ;
[0096] Meanwhile, we wait for step S3 to update the estimated angular frequency as... .
[0097] According to the Lyapunov stability criterion for nonlinear systems, selecting the gradient update method in step S2-3 can guarantee the asymptotic stability of the nonlinear system.
[0098] Step S2-4: Calculate the current observer error.
[0099] The formula for calculating the observer error is:
[0100] .
[0101] Step S2-5: Determine the observer error Check if it is less than a specified threshold. If it is less than the specified threshold, the observer output of the current signal channel is considered stable; otherwise, the current signal channel is considered unstable.
[0102] Once stabilized, the observer can quickly estimate the DC component, but this invention does not require explicit use of the DC component value. Its purpose is to introduce... The update mechanism can quickly estimate and compensate for DC effects at each sampling point, thus eliminating the need for multiple cycles of averaging in traditional methods to remove DC, and significantly improving the dynamic response speed.
[0103] Once the observers for both the voltage and current channels are stable, the corresponding state estimation vectors will contain the in-phase and quadrature signals for those channels. The state estimation vector of the voltage channel at each time step is denoted as . The state estimation vector of the current channel is denoted as... .
[0104] Step S3: Input the state estimation vector of the voltage channel into the phase-locked loop, and estimate the angular frequency and phase of the voltage signal based on the dq transformation.
[0105] Step S3-1: Perform dq transformation on the state estimation vector of the voltage signal according to the following formula:
[0106] ;
[0107] in, The first phase-locked loop obtained Phase estimate of voltage signal at each moment.
[0108] Step S3-2: Convert the voltage q-axis component from step S3-1. The input is fed into the PI controller, and the intermediate quantity is calculated according to the following formula. :
[0109] ;
[0110] in, and For PI controller parameters, empirical values can be taken as follows: , ; This represents an integrator.
[0111] After the system stabilizes (i.e., after the conditions in step S2-5 are met), there should be , .
[0112] Step S3-3: Estimate the current voltage signal angular frequency using the following formula. and phase estimate :
[0113] ;
[0114] in, A fixed angular frequency bias is used to accelerate convergence; generally, it can be set to a value that is suitable for this purpose. .
[0115] Step S3-4: Estimate the angular frequency and phase estimate Feedback is sent to the previous input to update the variables in the corresponding steps. The observer model feeds back to the voltage and current paths. Feedback is provided to the dq transformation stage of the voltage and current channels.
[0116] Step S4: Calculate the active power and reactive power based on the current path state estimation vector obtained in step S2, and the voltage phase estimation value and voltage d-axis component estimated in step S3.
[0117] Step S4-1: Based on the estimated angular frequency, perform coordinate transformation on the state estimation vector of the current path obtained in step S2 to obtain the... Current intermediate state vector at each time step :
[0118] .
[0119] Step S4-2: Based on the voltage phase estimate and voltage d-axis component obtained in step S3, calculate the active power according to the following formula. and reactive power :
[0120] ;
[0121] in, It is the d-axis component of the voltage calculated in step S3.
[0122] For power vector Inverting the second term yields the reactive power. The first term of this vector is the active power. .
[0123] Step S4-4: Determine whether the stability condition of step S2-5 is met. If it is met, then the output active power is... and reactive power This is the desired power RMS value. Otherwise, continue executing steps S1 to S4 until the output stabilizes.
[0124] Since the coordinate transformation has eliminated twice the power frequency AC signal, the resulting , This is a DC signal, specifically the RMS value of the power. In practical engineering applications, a moving average operation can also be performed on the power signal to further stabilize the power estimate.
[0125] It should be noted that steps S1 to S4 are executed synchronously. While continuously sampling through step S1, the state estimation vector needs to be obtained through step S2, the angular frequency and phase need to be estimated through step S3, and the active power and reactive power need to be calculated through step S4 in each sampling period.
[0126] This method combines phase-locked loop (PLL) and observer methods, leveraging the excellent dynamic characteristics of PLLs to simultaneously estimate orthogonal voltage and current signals as well as frequency, achieving high estimation accuracy even under fluctuating load conditions. This invention eliminates the need for explicit DC-DC removal of voltage and current signals, simultaneously estimating orthogonal signals and DC through the observer, resulting in fast dynamic response. Furthermore, this invention utilizes the synchronous frequency characteristics of the voltage and current channels, feeding back the estimated information from the voltage channel to the current channel. Through coordinate rotation, it achieves simultaneous calculation of active and reactive power with low computational complexity, eliminating the need for a low-pass filter and significantly improving response speed.
[0127] Example 2
[0128] This embodiment discloses an energy meter, including a processor and a memory. A program stored in the memory is configured to be executed by the processor, and when executed, it implements the fast power calculation method described in Embodiment 1, which is the fluctuating load power calculation method used by this energy meter.
[0129] Example 3
[0130] This embodiment discloses a data acquisition terminal, including a processor and a memory. A program stored in the memory is configured to be executed by the processor, and when executed, it implements the fast power calculation method described in Embodiment 1, which is the fluctuating load power calculation method used by the energy meter.
[0131] It should be noted that, as will be apparent to those skilled in the art, the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics thereof. The scope of the present invention is defined by the claims rather than the foregoing description.
Claims
1. A fluctuating load power calculation method suitable for electric energy meters and terminals, characterized by, The method comprises the following steps: Step S1: continuously synchronously sampling the grid voltage signal and the current signal and filtering out high-frequency harmonic interference respectively to obtain a voltage channel signal sequence and a current channel signal sequence; Step S2: based on a state observer, realizing adaptive estimation of in-phase signals and quadrature signals of the voltage signal and the current signal without removing the direct current components contained in the voltage channel signal sequence and the current channel signal sequence obtained in step S1 to obtain a state estimation vector of the voltage channel and a state estimation vector of the current channel; In step S2, for the voltage channel and the current channel, adaptive estimation is realized in the following manner: Step S2-1: establishing an asymptotic observer equation of the current channel: ; wherein is an estimate of the state estimation vector for the current channel at the time instant, is the derivative of the state estimation vector at the time instant, is the value of the output vector at the time instant, is the state matrix, is the state-output matrix, is the observer gain matrix, is the direct current correlation matrix, in particular: ; ; ; ; In the above formulae, is the value of the voltage channel signal sequence or the current channel signal sequence after step S1 at the th time instant, is the intermediate state at the th time instant, denotes the estimate of the angular frequency at the th time instant, and are two elements of the observer gain matrix; Step S2-2: initializing variables in the asymptotic observer equation; Step S2-3: substituting the signal values of the signal sequence obtained in step S1 into the corresponding progressive observer equation in turn, and performing adaptive update on the intermediate state ; In step S2-3, one new later: First, the current ; Then based on the current and the next time is calculated while according to the current and the next time is calculated : ; In the above formula, is a parameter that influences the convergence speed; According to the current the second element in the current computing the intermediate variable the current derivative: ; Then based on and the current calculated ; At the same time, the step S3 waits for the update of the estimated value of the corner frequency as ; Step S2-4: calculating a current observer error: ; Step S2-5: judging the observer error whether it is less than a specified threshold: if it is less than the specified threshold, it is judged that the observer output of the current signal channel is stable at this time, otherwise it is judged that the current signal channel is unstable; When the observers of the voltage channel and the current channel are both stable, the corresponding state estimation vector contains the in-phase signal and the quadrature signal of the corresponding channel, and the state estimation vector of the voltage channel at the first moment is denoted as , and the state estimation vector of the current channel is denoted as ; Step S3: inputting the state estimation vector of the voltage channel into a phase-locked loop to estimate an angular frequency and a phase of the voltage signal based on dq transformation; Step S4: calculating active power and reactive power according to the state estimation vector of the current channel obtained in step S2 and the voltage phase estimation value and the voltage d-axis component estimated in step S3.
2. The fluctuating load power calculation method suitable for electric energy meters and usage terminals according to claim 1, characterized in that, Step S3 specifically comprises: Step S3-1: performing dq transformation on the state estimation vector of the voltage signal according to the following formula: ; wherein is the phase estimate of the voltage signal at the kth time instant obtained by the phase locked loop. is the phase estimate of the voltage signal at the kth time instant obtained by the phase locked loop.
3. The fluctuating load power calculation method suitable for electric energy meters and usage terminals according to claim 2, characterized in that, Step S3 further comprises: Step S3-2: The voltage q-axis component in step S3-1 is divided by the voltage dc-link voltage Vdc The incoming PI controller calculates an intermediate quantity according to the following equation : ; wherein and are PI controller parameters, denotes an integrator; Step S3-3: Estimate the current voltage signal angle frequency estimate value in accordance with the following equation and phase estimate value : ; wherein is the angular frequency fixed bias.
4. The fluctuating load power calculation method suitable for electric energy meters and usage terminals according to claim 3, characterized in that, Step S3 further comprises: Step S3-4: The angle frequency estimate and phase estimate are fed back to the previous input, updating the variables in the corresponding steps; wherein the observer model for the voltage channel and the current channel, the dq transformation block for the voltage channel and the current channel.
5. The fluctuating load power calculation method suitable for electric energy meters and usage terminals according to claim 2, wherein, Step S4 specifically comprises: Step S4-1: Based on the angular frequency estimation value, coordinate transform the state estimation vector of the current channel estimated in step S2 to obtain the current intermediate state vector of the first time point : ; Step S4-2: Calculate the active power and the reactive power according to the voltage phase estimation value and the voltage d-axis component estimated in step S3, as follows: P = Vd * Id Q = Vd * Iq ; wherein is the voltage d-axis component calculated in step S3.
6. The fluctuating load power calculation method suitable for electric energy meters and usage terminals according to claim 5, wherein, Step S4 further comprises: Step S4-4: Determine whether the stability condition of step S2-5 is met; if it is met, then the output active power is... and reactive power This is the desired power RMS value; otherwise, continue executing steps S1 to S4 until the output stabilizes.
7. An electric energy meter, characterized by: The device comprises a processor and a memory, and a program stored in the memory is configured to be executed by the processor, and when executed, realizes the fluctuation load power calculation method according to any one of claims 1 to 6.
8. A terminal for use with a server, the terminal comprising: The device comprises a processor and a memory, and a program stored in the memory is configured to be executed by the processor, and when executed, realizes the fluctuation load power calculation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Estimation method and device for positive sequence voltage component and negative sequence voltage component of power grid
CN107798162A
Phase-locked loop-based speed sensorless control strategy of linear traction motor
CN109412489A