Real-time metering method, system and electric energy metering box
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]现有的电能计量误差检测与补偿技术主要针对单只电能表或关口计量装置,尚未将内部集成多表位、接插件、母排及开关等多种元器件的计量箱作为整体误差补偿单元进行系统化处理,难以全面反映多元器件共同作用下的综合计量误差;传统方案多基于简化模型或固定参数,难以有效捕捉接触电阻变化、多表位负荷耦合等因素对计量精度产生的非线性、时变性影响;且当前主要采用定期现场校验、远程比对的误差检测方式,误差识别至补偿的闭环周期较长,无法实现计量偏差的实时在线动态矫正
Smart Images

Figure CN122545862A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity metering technology, specifically to a real-time metering method, system, and electricity metering box. Background Technology
[0002] As the core foundation for power system trade settlement and operation control, the reliability of electricity metering accuracy directly affects the fairness of electricity transactions and the economic efficiency of power grid operation. Currently, the accuracy assurance of electricity metering equipment mainly relies on three technical means: periodic on-site calibration, periodic laboratory verification, and replacement upon expiration. In essence, all of these belong to a passive maintenance mode of "post-event discovery and offline processing," which generally suffers from systemic defects such as long anomaly detection cycles, the need for power outages and meter removal during calibration, and difficulty in identifying individual trends of accuracy degradation.
[0003] For electricity metering boxes widely deployed in low-voltage distribution networks, they integrate various components such as multi-position electricity meters, connectors, busbars, and incoming / outgoing line switches. Their operating environment and conditions are more complex and variable than those of a single electricity meter. The compact internal space and dense arrangement of multiple components in the metering box make issues such as deteriorated contact conditions, uneven temperature distribution, and multi-position load coupling more significant in their impact on metering accuracy. This also places higher demands on the metering box's status sensing and error correction capabilities.
[0004] Existing electricity metering error detection and compensation technologies mainly target single electricity meters or metering devices at the gateway. They have not yet systematically processed metering boxes that integrate multiple meter positions, connectors, busbars, and switches as a whole error compensation unit, making it difficult to comprehensively reflect the combined metering error under the combined effect of multiple components. Traditional solutions are mostly based on simplified models or fixed parameters, making it difficult to effectively capture the nonlinear and time-varying effects of factors such as changes in contact resistance and load coupling of multiple meter positions on metering accuracy. Furthermore, the current error detection methods mainly adopt periodic on-site calibration and remote comparison, resulting in a long closed-loop cycle from error identification to compensation, which cannot achieve real-time online dynamic correction of metering deviations.
[0005] The information disclosed in this background section is intended only to enhance the understanding of the overall background of this application and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0006] To address the shortcomings of existing technologies, the present invention aims to provide a real-time metering method, system, and energy metering box, which to some extent solves the problems raised in the background technology, realizes online multi-dimensional sensing of the operating status of each meter position in the energy metering box and real-time dynamic correction of metering deviation, and improves the dynamic metering accuracy and long-term operational stability under complex working conditions.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a real-time metering method, comprising the following steps: Synchronously collect multi-dimensional status sensing data of the power metering box during operation, including electrical parameter data stream, environmental parameter data stream and mechanical status data stream; The multi-dimensional state perception data is registered in the time domain, and the electrical distortion component, thermal stress accumulation component, contact reliability component, and operating condition complexity component are calculated to obtain a multi-dimensional state feature vector. A measurement deviation extrapolation model is constructed, and the multidimensional state feature vector is input into the measurement deviation extrapolation model to obtain the real-time deviation estimate; The dynamic correction coefficient matrix is calculated based on the real-time deviation estimate, and the dynamic correction coefficient matrix is applied to the current sample value and voltage sample value in a sampling point-by-sampling manner to obtain the corrected instantaneous power value. The corrected instantaneous power value is integrated over time to obtain the real-time corrected cumulative energy value, and the metering deviation extrapolation model is updated periodically based on the real-time deviation estimate.
[0008] In a preferred embodiment of the real-time metering method described in this application, the electrical distortion component is a weighted synthesis of the fundamental distortion sub-component and the harmonic distortion sub-component, calculated as follows: Calculate the absolute values of voltage deviation rate, current deviation rate and power factor deviation for each meter position, and then perform a weighted summation to obtain the fundamental distortion sub-component. The voltage amplitude and current amplitude of the fundamental wave and each harmonic are extracted from the voltage sampling sequence and current sampling sequence of the current power frequency cycle, respectively. The ratio of the voltage amplitude of each harmonic to the voltage amplitude of the fundamental wave, and the ratio of the current amplitude of each harmonic to the current amplitude of the fundamental wave are calculated to obtain the voltage harmonic content and current harmonic content of the corresponding harmonic. Voltage weighting coefficients and current weighting coefficients are set for each harmonic, and the voltage harmonic content is multiplied by the corresponding voltage weighting coefficients one by one and then summed to obtain the voltage-weighted harmonic content. The current-weighted harmonic content is obtained by successively multiplying the current harmonic content of each harmonic with the corresponding current weighting coefficient and summing the results. The voltage-weighted harmonic content and the current-weighted harmonic content are then weighted and summed to obtain the harmonic distortion sub-component.
[0009] In a preferred embodiment of the real-time metering method described in this application, the cumulative thermal stress component is calculated as follows: Calculate the highest temperature inside the electricity metering box at the current moment, and calculate the difference between the highest temperature inside the electricity metering box and the reference temperature to obtain the highest temperature rise value; Calculate the daily average temperature rise for each day within the first time window, and then sum the daily average temperature rise values according to the time decay weight to obtain the cumulative temperature rise effect value. The ratio of the internal humidity of the power metering box to the preset humidity benchmark is used as the humidity acceleration factor, and the difference between the external ambient temperature and the benchmark temperature is used as the ambient temperature difference correction term. The cumulative thermal stress component is obtained by weighting and summing the maximum temperature rise, cumulative temperature rise effect, humidity acceleration factor, and environmental temperature difference correction term.
[0010] In a preferred embodiment of the real-time metering method described in this application, the contact reliability component is calculated as follows: Calculate the ratio of the contact resistance of the connector at each position to the corresponding initial contact resistance to obtain the contact resistance degradation degree of the corresponding position; calculate the mechanical wear factor of each position based on the number of times the connector is inserted and removed. Multiply the contact resistance degradation degree by the mechanical wear factor of the corresponding position to obtain the comprehensive degradation degree of each position, and take the maximum value of the comprehensive degradation degree among all positions as the overall contact state degradation degree. Within a preset second time window, vibration intensity index and vibration characteristic frequency band index are calculated based on vibration acceleration, and the vibration intensity index and vibration characteristic frequency band index are multiplied to obtain the vibration influence factor; The long-term aging acceleration factor is calculated based on the cumulative operating time of the power metering box. The contact reliability component is obtained by weighting and summing the overall contact condition deterioration, vibration influence factor and long-term aging acceleration factor.
[0011] As a preferred embodiment of the real-time metering method described in this application, the calculation method for the operating condition complexity component is as follows: The power fluctuation index and maximum power change rate are calculated based on the active power sequence of each station within the third time window. The power change rate sequence is obtained by differential calculation of the active power sequence within the third time window. Calculate the Pearson correlation coefficient between the power change rate sequences of each epitope to obtain the correlation coefficient matrix, and perform singular value decomposition on the correlation coefficient matrix, taking the maximum singular value as the coupling complexity. Based on the current sampling sequence of the current power frequency cycle, the ratio of reactive power to active power, and the power factor, the load type of each meter position is determined, and the weighted correction coefficient of each meter position is calculated according to the load type. The power fluctuation index and the maximum power change rate are weighted and summed to obtain a first intermediate quantity; the cumulative product of the first intermediate quantity, the weighted correction coefficient, and the coupling complexity factor is calculated to obtain the operating condition complexity component.
[0012] In a preferred embodiment of the real-time metering method described in this application, the load type includes resistive loads, motor loads, switching power supply loads, and electric vehicle charging loads, and the determination method is as follows: Calculate the total harmonic distortion rate and the proportion of odd harmonics of the current at each position based on the current sampling sequence of the current frequency cycle. Based on the total harmonic distortion rate of the current, the proportion of odd harmonics, the ratio of reactive power to active power, and the power factor, the load type of each meter position is determined by judging layer by layer according to the preset judgment priority order. The priority order for judgment, from high to low, is as follows: electric vehicle charging load, switching power supply load, motor load, and resistive load.
[0013] In a preferred embodiment of the real-time measurement method described in this application, the dynamic correction coefficient matrix is calculated as follows: Based on the real-time deviation estimate, the inverse vectors of the basic error, fluctuation error, and drift error are calculated respectively, and the inverse vectors of the basic error, fluctuation error, and drift error are multiplied together to obtain the dynamic correction coefficient matrix. The dynamic correction coefficient matrix is a two-dimensional matrix, where the row index corresponds to the sampling time and the column index corresponds to the frequency component, and the frequency component includes the fundamental frequency and each harmonic. Each element of the dynamic correction coefficient matrix is a dimensionless real number, and its physical meaning is the correction ratio that should be applied to the original sampled value for any frequency component.
[0014] As a preferred embodiment of the real-time measurement method described in this application, the real-time deviation estimate includes the basic error offset, the additional error fluctuation, and the long-term drift trend. Calculate the product of the basic error offset and the preset sensitivity coefficient, add 1 to the product, and use the reciprocal of the sum as the inverse vector of the basic error; the sensitivity coefficient is a frequency response coefficient that varies with the frequency components. Calculate the product of the additional error fluctuation amount and the preset time-varying weight coefficient, add 1 to the product, and take the reciprocal of the sum as the inverse vector of the fluctuation error; the time-varying weight coefficient changes with time and is positively correlated with the degree of drastic change in the current load. Calculate the product of the long-term drift trend and the preset aging fitness coefficient, add the product to 1, and use the reciprocal of the sum as the inverse vector of the drift error; the aging fitness coefficient increases monotonically with the increase of the cumulative operating time of the power metering box.
[0015] As a preferred embodiment of the real-time metering method described in this application, the specific method of applying the dynamic correction coefficient matrix to the current sample value and the voltage sample value in a sampling point-by-sampling manner is as follows: Using the current power frequency cycle as the analysis window, the sliding discrete Fourier transform is performed on the voltage sampling sequence and current sampling sequence at the current moment to obtain the complex amplitude values of voltage and current for each frequency component. The voltage complex amplitude value of each frequency component is multiplied point by point with the correction coefficient of the corresponding frequency component in the dynamic correction coefficient matrix to obtain the corrected voltage complex amplitude value. The current complex amplitude value of each frequency component is multiplied point by point with the correction coefficient of the corresponding frequency component in the dynamic correction coefficient matrix to obtain the corrected current complex amplitude value. Perform inverse discrete Fourier transform on the corrected voltage complex amplitude value and the corrected current complex amplitude value respectively to obtain the corrected instantaneous voltage value and the corrected instantaneous current value at each sampling point.
[0016] As a preferred embodiment of the real-time measurement method described in this application, the measurement deviation inference model is a neural network model that has been pre-trained offline and supports online incremental learning, including an input layer, a first deep feature extraction module, a second deep feature extraction module, a multi-head cross-attention fusion module, and an output layer. During the real-time operation of the electricity metering box, the multi-dimensional state feature vector at the current moment is input into the metering deviation inference model with each power frequency cycle as the update cycle. After forward propagation calculation by the metering deviation inference model, the deviation estimate of three dimensions is output in real time: basic error offset, additional error fluctuation and long-term drift trend.
[0017] Secondly, the present invention provides a real-time metering system, including a data acquisition module, a deviation estimation module, a power correction module and an update module; The data acquisition module synchronously collects multi-dimensional status perception data of the power metering box during operation, including electrical parameter data stream, environmental parameter data stream and mechanical status data stream; The deviation estimation module performs time-domain registration on the multi-dimensional state perception data and calculates electrical distortion components, thermal stress accumulation components, contact reliability components, and operating condition complexity components to obtain a multi-dimensional state feature vector. The deviation estimation module also constructs a measurement deviation inference model and inputs the multi-dimensional state feature vector into the measurement deviation inference model to obtain a real-time deviation estimate. The power correction module calculates a dynamic correction coefficient matrix based on the real-time deviation estimate, and applies the dynamic correction coefficient matrix to the current sample value and voltage sample value in a sampling point-by-sampling manner to obtain the corrected instantaneous power value; the power correction module also performs time integration on the corrected instantaneous power value to obtain the real-time corrected cumulative power value. The update module periodically updates the measurement deviation extrapolation model based on the real-time deviation estimate.
[0018] Thirdly, the present invention provides an electricity metering box, comprising: The enclosure, and the incoming switch, busbar, energy meter connector, and outgoing circuit breaker installed inside the enclosure; Memory, used to store computer programs; A processor is used to execute the computer program, causing the energy metering box to perform operations that implement the above-described real-time metering method. The communication interface is used to communicate with the upper-level system and send control commands to the outgoing circuit breaker.
[0019] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: By performing time-domain registration on multi-dimensional state-sensing data and extracting feature components from four dimensions—electrical distortion, thermal stress accumulation, contact reliability, and operating condition complexity—the original multi-dimensional data can be transformed into a structured feature vector that comprehensively reflects the operating status of the energy metering box. This eliminates the time-scale differences between multi-source data and achieves comprehensive quantification of multi-physical domain factors affecting metering accuracy. Furthermore, by constructing a multi-input, multi-output neural network model, real-time mapping from the multi-dimensional state feature vector to three-dimensional deviation estimates is achieved, establishing an online extrapolation capability between the metering box's operating status and metering deviation, providing a basis for subsequent dynamic correction. Accurate and refined deviation quantification basis; by constructing a matrix containing dynamic correction coefficients and implementing differentiated correction for each frequency component in a sampling-point manner, the response time for deviation detection and compensation can be shortened from the traditional several weeks to the sampling level, significantly improving the dynamic metering accuracy under complex operating conditions; by accumulating the corrected instantaneous power integral to output the corrected cumulative energy value, and combining the long-term drift trend to periodically perform incremental learning and updates on the model, the model can adaptively track the aging process of the metering box and environmental changes, achieving long-term accurate cumulative energy output while continuously ensuring the stability and reliability of metering accuracy throughout the entire life cycle. Attached Figure Description
[0020] Figure 1 A flowchart of a real-time metering method provided in this application; Figure 2 A framework diagram of a real-time metering system provided in this application; Figure 3 A physical image of an electricity metering box provided for this application. Detailed Implementation
[0021] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations thereof.
[0022] Example 1 like Figure 1 As shown in the figure, this embodiment introduces a real-time metering method, including the following steps: The system synchronously collects multi-dimensional status sensing data of the power metering box during operation; the multi-dimensional status sensing data includes electrical parameter data stream, environmental parameter data stream and mechanical status data stream.
[0023] Specifically, the electrical parameter data stream refers to the instantaneous set of electrical parameters reflecting the operating status of each electrical circuit inside the energy metering box, including real-time voltage, real-time current, active power, reactive power, power factor, and system frequency. The acquisition method is as follows: a multi-channel synchronous sampling analog-to-digital converter unit is used to synchronously acquire the voltage and current signals at the incoming terminal and the outgoing terminals of each meter position of the energy metering box at a preset sampling frequency, obtaining voltage and current sampling sequences; the voltage and current sampling sequences are then digitally filtered to eliminate random noise and sampling spikes within the power frequency cycle, and the effective voltage and current values are calculated within one power frequency cycle to obtain real-time voltage and real-time current; the sampling of all sampling channels of the multi-channel synchronous sampling analog-to-digital converter unit... The sample-and-hold circuit is controlled by the same trigger signal; the voltage sampling sequence and the current sampling sequence are multiplied point by point to obtain the instantaneous power sequence, and the arithmetic mean of the instantaneous power sequence is calculated within one power frequency cycle to obtain the active power; the voltage sampling sequence is shifted by 90 degrees and multiplied point by point with the current sampling sequence, and the arithmetic mean of the product sequence is calculated within one power frequency cycle to obtain the reactive power; the apparent power is calculated based on the product of the effective voltage value and the effective current value, and the power factor is calculated based on the ratio of active power to apparent power; the system frequency is calculated by detecting the time interval between two adjacent zero crossings of the voltage sampling sequence, thereby realizing the synchronous acquisition of real-time voltage, real-time current, active power, reactive power, power factor and frequency in the electrical parameter data stream.
[0024] In this embodiment, the voltage signal is acquired through a precision voltage transformer; the precision voltage transformer has an accuracy of not less than 0.2 class, a primary side rated voltage of single-phase 220V or three-phase 380V, and a secondary side output of a standard low voltage signal, which is then sent to the analog-to-digital converter after being filtered by an anti-aliasing low-pass filter; the current signal is acquired through a current transformer, wherein the direct-access meter position uses a current transformer with an accuracy of not less than 0.2S class, whose primary side rated current matches the corresponding meter position specification, and whose secondary side outputs a standard small current signal, which is converted into a voltage signal by a sampling resistor and then filtered before being sent to the analog-to-digital converter; the analog-to-digital converter uses a successive approximation type with at least 16-bit resolution to quantize the analog voltage signal of each sampling channel, obtaining a voltage sampling sequence and a current sampling sequence. The system frequency is calculated using the following formula: ;in, f Let N be the system frequency, and N be the number of sampling points between two consecutive zero-crossings in the voltage sampling sequence. T s This is the time interval between two consecutive zero crossings of the voltage sampling sequence.
[0025] Optionally, the method for presetting the sampling frequency may include: setting the sampling frequency based on the highest order M of harmonic analysis inside the power metering box and the Nyquist sampling theorem. f s satisfy f s ≥2×M× f 0 ,in f 0 With the system's rated frequency of 50Hz, M is set to 31, thus determining... f s The sampling frequency should be no less than 3100Hz, preferably 4000Hz; simultaneously, to ensure that an integer number of sampling points can be collected within one power frequency cycle to achieve accurate integration of the periodic signal, the sampling frequency... f s Set to the system rated frequency f 0 Integer multiples of, i.e. f s =K× f 0 Where K is an integer, and in this embodiment K=80. f s =4000Hz, so that there are 80 sampling points within each 20ms power frequency cycle; or a phase-locked loop frequency doubling synchronous sampling method is adopted: the phase-locked loop circuit tracks the fluctuation of the system frequency in real time, dynamically adjusts the sampling frequency to always be an integer multiple of the system frequency, and ensures that the sampling window is always synchronized with the power frequency cycle, thereby eliminating the impact of spectrum leakage on the accuracy of RMS and harmonic analysis.
[0026] The environmental parameter data stream refers to the set of physical quantities characterizing the thermal and humid environment inside the energy metering box and its key components. This includes the temperature of the energy meter itself, the internal ambient temperature of the energy metering box, the external ambient temperature, and the internal humidity of the energy metering box. The data is collected as follows: a temperature sensor is placed on the surface of the energy meter casing corresponding to each energy meter position to acquire the real-time temperature of each energy meter; multiple temperature sensors are placed at key heat-generating parts and areas susceptible to environmental influences within the energy metering box to collect the internal ambient temperature; an ambient temperature sensor is installed on the backlit surface of the outer wall of the energy metering box or at the inlet of the incoming cable to collect the external ambient temperature; and a humidity sensor is placed at the bottom of the inlet chamber inside the metering box, away from heat sources and where water is unlikely to accumulate, to collect the internal humidity of the energy metering box.
[0027] In this embodiment, a digital temperature chip is arranged directly above the metering chip inside each energy meter or at the location on the outer casing where the heat conduction path is shortest, to collect the body temperature of each energy meter; the key heat-generating parts and areas susceptible to environmental influences of the energy metering box include, but are not limited to: the terminal block of the incoming switch, the busbar connection node, the vicinity of the energy meter connector contacts (at least one measuring point per row), and the terminal block of the outgoing circuit breaker located in the middle of the inner wall of the box; the humidity sensor is a capacitive humidity sensor; all temperature sensors and humidity sensors have the same sampling period.
[0028] The mechanical state data stream refers to a set of physical quantities characterizing the structural state, mechanical actions, and connection reliability of the electricity metering box. This includes vibration acceleration, connector insertion / removal counts, connector contact resistance, and mechanical switch actuation counts. The data is collected as follows: The base plate of the electricity metering box has a concentrated mass and good rigidity near the incoming switch; therefore, a triaxial MEMS accelerometer is installed at this location to collect vibration acceleration in the X, Y, and Z directions in real time. Microswitches or reed switches are installed at the location of the electricity meter mounting clips or connector operating mechanisms. Whenever the electricity meter is inserted or removed, the switch state changes. The processor detects this change and increments the corresponding meter insertion / removal count counter to obtain the connector insertion / removal count. In the connector's current loop, a known calibration current is used to measure the small voltage drop across the connector using a four-wire method, and the connector contact resistance is calculated based on the current value. The number of operations of operable switches such as the incoming disconnect switch and outgoing circuit breaker is accumulated to obtain the mechanical switch actuation count.
[0029] The multi-dimensional state perception data is registered in the time domain, and the electrical distortion component, thermal stress accumulation component, contact reliability component, and operating condition complexity component are extracted to obtain a multi-dimensional state feature vector. Since the sampling frequency of the electrical parameter data stream is much higher than that of the environmental parameter data stream and the mechanical state data stream, in order to construct a multi-dimensional state feature vector at a unified time, the multi-dimensional state perception data needs to be registered in the time domain.
[0030] The specific method of time-domain registration is as follows: taking the sampling time of the electrical parameter data stream as the reference time axis, for low-frequency sampled environmental parameters and mechanical state parameters, nearest neighbor interpolation or linear interpolation methods are used to map them to the time grid points of each power frequency cycle; for example: let t be the end time of the kth power frequency cycle of the electrical parameter data stream. k Then t k The corresponding values of the environmental parameter data stream and the mechanical state data stream most recently sampled before time t are used as t. k The corresponding parameters at each time point; all data after interpolation are used to form a multi-source synchronous dataset under a unified time scale for subsequent feature extraction.
[0031] The electrical distortion component reflects the degree to which the voltage and current waveforms deviate from the ideal sinusoidal waveform, and is a weighted synthesis of the fundamental distortion sub-component and the harmonic distortion sub-component. ;in, For electrical distortion components, For the fundamental frequency distortion subcomponent, For harmonic distortion subcomponents; and These are the preset weighting coefficients for the fundamental distortion sub-component and the harmonic distortion sub-component, respectively. .
[0032] The weighting coefficients for the fundamental distortion subcomponent and the harmonic distortion subcomponent are set as follows: based on the frequency response characteristics of the energy meter and its associated current transformer and voltage sampling circuit in the energy metering box, the weighting coefficients are determined by experimental calibration. and Specifically, on a standard energy meter calibration device, pure sinusoidal voltage and current signals and distorted signals containing typical harmonic components are applied respectively, with the total harmonic distortion rate set at different levels such as 5%, 10%, and 20%. The metering error of the energy metering box under each signal condition is measured, and through multiple linear regression analysis, the weighting coefficients that maximize the correlation coefficient between the weighted electrical distortion components and the actual error contribution rate are determined. and In this embodiment, the weighting coefficient of the fundamental distortion subcomponent is 0.6, and the weighting coefficient of the harmonic distortion subcomponent is 0.4. The weighting coefficients of the fundamental distortion subcomponent and the harmonic distortion subcomponent can be adaptively adjusted according to the typical load characteristics of the area where the power metering box is installed, such as the lower harmonic content in residential areas and the higher harmonic content in industrial areas or areas with a high density of charging piles. This will not be elaborated on further here.
[0033] Specifically, the fundamental distortion sub-component is calculated as follows: The rated voltage of each meter position at the current moment is obtained, and the difference between the corresponding real-time voltage and the rated voltage is calculated, i.e., real-time voltage minus rated voltage, to obtain the voltage deviation of the corresponding meter position; the absolute value of the voltage deviation is calculated as the ratio of the rated voltage to obtain the voltage deviation rate of the corresponding meter position; the rated current of each meter position at the current moment is obtained, and the difference between the corresponding real-time current and the rated current is calculated, i.e., real-time current minus rated current, to obtain the current deviation of the corresponding meter position; the absolute value of the current deviation is calculated as the ratio of the rated current to obtain the current deviation rate of the corresponding meter position; the rated power factor of each meter position at the current moment is obtained, and the absolute value of the difference between the corresponding power factor and the rated power factor is calculated, to obtain the absolute value of the power factor deviation; the voltage deviation rate, the current deviation rate, and the absolute value of the power factor deviation are weighted and summed according to preset first weighting coefficients, second weighting coefficients, and third weighting coefficients to obtain the fundamental distortion sub-component.
[0034] The sum of the first, second, and third weighting coefficients is 1, determined based on the sensitivity of different electrical parameters within the electricity metering box to metering errors. Specifically, under standard test conditions, voltage, current, and power factor are changed individually, and the rate of change of metering error caused by each parameter change is recorded. The normalized ratio of each rate of change of metering error is used as the corresponding weighting coefficient. The normalized ratio refers to the ratio of the rate of change of metering error caused by each parameter change to the algebraic sum of the rate of change of metering error caused by all parameter changes. The standard test conditions are: applying a pure sine wave voltage signal, with the voltage amplitude at the rated voltage and the frequency at 50Hz, the current amplitude at the rated current value of the corresponding meter position, the power factor at 1.0, the ambient temperature controlled at 25℃±2℃, and the humidity controlled at 45% to 75%RH.
[0035] In this embodiment, the first weighting coefficient is 0.2, the second weighting coefficient is 0.6, and the third weighting coefficient is 0.2. Optionally, each weighting coefficient can be adaptively corrected according to actual operating data: when the processor detects that the system frequency fluctuation exceeds ±0.2Hz or the voltage deviates from the rated value by more than 5% for a long period of time, the first weighting coefficient is appropriately increased; when a large number of inductive loads, such as motors and air conditioning compressors, are detected to cause drastic fluctuations in the power factor due to frequent start-stop of the power factor, the third weighting coefficient is appropriately increased, and the second weighting coefficient is correspondingly decreased, so as to ensure that the fundamental distortion sub-component can accurately reflect the actual contribution of each factor to the measurement deviation under the current operating conditions.
[0036] The calculation method for the harmonic distortion sub-components is as follows: using the current power frequency cycle as the analysis window, perform discrete Fourier transform on the voltage sampling sequence and the current sampling sequence respectively to obtain the voltage amplitude and current amplitude of the fundamental wave and each harmonic; for each harmonic, calculate the ratio of its voltage amplitude to the fundamental wave voltage amplitude to obtain the voltage harmonic content of the corresponding harmonic; calculate the ratio of the current amplitude of each harmonic to the fundamental wave current amplitude to obtain the current harmonic content of the corresponding harmonic; based on the influence of each harmonic on the power metering error... The following steps are taken: Voltage weighting coefficients and current weighting coefficients are set for each harmonic; the voltage harmonic content of each harmonic is multiplied successively by its corresponding voltage weighting coefficient and then summed to obtain the voltage-weighted harmonic content; the current harmonic content of each harmonic is multiplied successively by its corresponding current weighting coefficient and then summed to obtain the current-weighted harmonic content; the voltage-weighted harmonic content and the current-weighted harmonic content are weighted and summed according to preset fourth and fifth weighting coefficients to obtain the harmonic distortion sub-component.
[0037] Specifically, the highest harmonic analysis order is determined based on the Nyquist sampling theorem and the sampling frequency. In this embodiment, the sampling frequency is 4000Hz, theoretically allowing for a maximum of 39 harmonics to be analyzed, but 31 is used in practice to allow for engineering margin. The voltage and current weighting coefficients are set as follows: a single-frequency sinusoidal signal is applied to the energy meter calibration device, starting from the fundamental frequency of 50Hz and increasing sequentially to each harmonic frequency. The amplitude and phase errors of the current transformer and metering chip at each frequency point are recorded to form a frequency-error characteristic curve. Using the amplitude and phase errors at the fundamental frequency as reference values, the multiples of the amplitude error relative to the fundamental amplitude error and the multiples of the phase error relative to the fundamental phase error at each harmonic frequency are calculated. The arithmetic mean of these two multiples is used as the initial weighting coefficient for the corresponding harmonic. The initial weighting coefficient is then corrected according to the harmonic order: for odd harmonics, including the 3rd, 5th, 7th, and 9th harmonics... For even-order harmonics, including the 2nd, 4th, 6th, 8th, and 10th harmonics, which are usually less prevalent in power systems, the initial weighting coefficient is multiplied by 0.6. For higher-order harmonics, i.e., the 11th and above, considering the complex impact of their higher frequency on metering errors, such as significantly increased eddy current losses in the current transformer core and limited sampling rate of the metering chip, the initial weighting coefficient is multiplied by 0.8. The corrected weighting coefficients are then normalized so that the sum of the voltage weighting coefficients for each harmonic is 1, and the sum of the current weighting coefficients for each harmonic is 1, thus obtaining the final voltage and current weighting coefficients.
[0038] In this embodiment, the fourth and fifth weighting coefficients are set as follows: Error contribution rate tests are performed on the voltage sampling circuit and current sampling circuit within the energy metering box; on a standard energy meter calibration device, voltage and current signals containing typical harmonic components are simultaneously applied to the energy metering box; the typical harmonic components are configured according to the harmonic content limits specified in the public power grid harmonic standards for power quality; during the test, the harmonic components of the voltage channel and the harmonic components of the current channel are introduced or removed separately, i.e., in the first test, only the voltage signal contains harmonic components, while the current signal remains a pure sine wave, and the meter reading under this condition is recorded. Measurement error E1; the second test only includes harmonic components in the current signal and keeps the voltage signal a pure sine wave, and the measurement error E2 under this condition is recorded; the third test includes harmonic components in both the voltage and current signals, and the measurement error E3 under this condition is recorded; the ratio of E1 to E3 is taken as the voltage harmonic error contribution rate, and the ratio of E2 to E3 is taken as the current harmonic error contribution rate; the voltage harmonic error contribution rate and the current harmonic error contribution rate are normalized so that their sum is 1, and the normalized voltage harmonic error contribution rate is taken as the fourth weighting coefficient, and the normalized current harmonic error contribution rate is taken as the fifth weighting coefficient.
[0039] The thermal stress accumulation component is used to characterize the drift of electrical characteristics of components and the stress accumulation effect of mechanical structure caused by heat generation during operation and changes in ambient temperature inside the power metering box. Its calculation method is as follows: Using the current moment as a reference, obtain the highest value of the temperature of the electricity meter body and the highest value of the ambient temperature measuring points inside the electricity metering box, and take the maximum value of the two as the highest temperature value inside the electricity metering box at the current moment; using a preset reference temperature as a reference temperature, calculate the difference between the highest temperature value inside the electricity metering box and the reference temperature, that is, the highest temperature value inside the electricity metering box minus the reference temperature to obtain the highest temperature rise value at the current moment.
[0040] In this embodiment, the reference temperature is set according to the rated operating conditions of the power metering box. The rated operating conditions refer to the reference conditions specified by the power metering box in the standard metrological verification procedure, including an ambient temperature of 23℃±2℃, a relative humidity of 45% to 75%RH, an atmospheric pressure of 86kPa to 106kPa, a rated voltage, a rated current, a power factor of 1.0, a frequency of 50Hz, and external magnetic field interference of less than 0.05mT. Among these, ambient temperature is the most significant factor affecting the electrical characteristics of the components inside the power metering box and the metering error. Therefore, the ambient temperature setting value in the rated operating conditions is used as the reference temperature.
[0041] The cumulative operating time of the energy metering box is obtained, and a first time window is determined based on the cumulative operating time. In this embodiment, the cumulative operating time is obtained by the real-time clock built into the processor, continuously counting from the date the energy metering box is first powered on and put into operation, in hours. The first time window is determined as follows: when the cumulative operating time is less than 720 hours, the cumulative operating time is used as the length of the first time window; when the cumulative operating time reaches or exceeds 720 hours, the length of the first time window is 720 hours.
[0042] Within the first time window, the difference between the daily average of the highest temperature inside the power metering box and the reference temperature is calculated on a daily basis to obtain the daily average temperature rise value for that day. The daily average temperature rise values for each day within the first time window are weighted and summed according to the time decay weight to obtain the cumulative temperature rise effect value. The time decay weight decreases exponentially with the increase of the number of days between the current time and the historical date, and the decay coefficient is controlled by a preset forgetting factor. The forgetting factor is calibrated according to the thermal aging characteristic curves of the insulating materials and electronic components inside the power metering box.
[0043] In this embodiment, typical insulation material samples and key electronic component samples from the electricity metering box are selected as calibration samples. The insulation materials include the insulating support components of the electricity meter connector, the busbar insulating sheath, the cable trays, and the non-metallic parts of the inner wall of the box. The key electronic components include current transformers, metering chips, and precision resistive elements in the sampling circuit. At least three aging temperature points higher than the upper limit of the rated operating temperature of the electricity metering box are selected. In this embodiment, 105℃, 120℃, and 135℃ are selected as the three aging temperature points. At each aging temperature point, the calibration samples are subjected to multiple sets of aging treatments for different durations. The aging duration of each set is set according to a geometric series, for example, 100 hours, 250 hours, 500 hours, and 10 hours respectively. 00 hours and 2000 hours; after completing the aging treatment at each aging temperature point, the calibrated samples were taken out and cooled to room temperature, and their impact strength of insulation materials was tested respectively; the reciprocal of the thermodynamic temperature of each aging temperature point was used as the abscissa, and the logarithm of the aging time when the key performance index of the sample at the corresponding temperature drops to the preset failure threshold was used as the ordinate, and a linear fit was performed, and the slope and intercept of the linear fit line were used as the thermal aging characteristic parameters of the material or component; the fitted line was extrapolated to the normal operating temperature of the power metering box. In this embodiment, the normal operating temperature is taken as the long-term operating temperature corresponding to the highest temperature rise inside the power metering box, and the theoretical aging life of the insulation material and electronic components at this temperature is obtained. And according to the relation Calculate the forgetting factor ; where ln is the logarithm with base e; the failure threshold is the minimum allowable value of the corresponding performance index specified in the product standard or technical specification corresponding to the calibration sample.
[0044] Based on the current highest temperature rise, cumulative temperature rise effect, internal humidity of the energy metering box, and external ambient temperature, a thermal stress cumulative component is constructed. Specifically, the highest temperature rise is used as the current instantaneous thermal stress intensity index, the cumulative temperature rise effect is used as the long-term cumulative thermal stress damage index, the ratio of the internal humidity of the energy metering box to a preset humidity benchmark is used as the humidity acceleration factor, and the difference between the external ambient temperature and the benchmark temperature is used as the ambient temperature difference correction term. The current instantaneous thermal stress intensity index, long-term cumulative thermal stress damage index, humidity acceleration factor, and ambient temperature difference correction term are weighted and summed according to preset sixth, seventh, eighth, and ninth weighting coefficients to obtain the thermal stress cumulative component. The sum of the sixth, seventh, eighth, and ninth weighting coefficients is 1.
[0045] The preset humidity benchmark is the relative humidity of the electricity metering box under the reference conditions specified in the standard metrological verification procedure, which is set to 60%RH in this embodiment. The sixth, seventh, eighth, and ninth weighting coefficients are set as follows: accelerated aging tests are conducted on key components in the electricity metering box, including current transformers, electricity metering chips, and connector insulation supports. The influence weights of temperature cycling, continuous high temperature, humid heat environment, and low temperature environment on the metering error of each component are measured respectively, and the normalized value of each influence weight is used as the corresponding weighting coefficient.
[0046] Specifically, several current transformers, energy meter chips, and connector insulation supports were selected from the same production batch as test samples. Under standard metrological verification conditions (ambient temperature 20℃±2℃, relative humidity 45%~75%RH, and no electromagnetic interference), initial metrological error tests were conducted on each test sample, and the initial metrological error values of each test sample under rated operating conditions were recorded. Accelerated aging tests were then conducted on the test samples under four environmental stresses: temperature cycling, continuous high temperature, damp heat, and low temperature. The metrological error changes of each component at each test node were calculated. For each environmental stress, the environmental... The weighted sum of the average metering error changes of the current transformer, metering chip, and connector insulation support under stress is used to obtain the comprehensive impact of environmental stress on the overall metering error of the energy metering box, i.e., the impact weight. The weight coefficients of the average metering error changes of the current transformer, metering chip, and connector insulation support are determined as follows: under standard metrological verification conditions, the errors of the current transformer, metering chip, and connector contact resistance are increased separately, and the rate of change of the overall metering error of the energy metering box is recorded. The normalized ratio of each rate of change, i.e., the ratio of each rate of change to the sum of all rates of change, is used as the corresponding contribution weight coefficient.
[0047] The contact reliability component is used to characterize the degree of contact degradation of each meter unit connector and electrical connection node in the energy metering box due to factors such as mechanical wear, thermal expansion and contraction, vibration and shock, and oxidation and corrosion, as well as the contribution of the resulting increase in contact resistance to the additional error of the metering circuit. Its calculation method is as follows: Obtain the initial connector contact resistance calibrated at the factory for each meter position, and calculate the ratio of the connector contact resistance of each meter position to the corresponding initial connector contact resistance to obtain the contact resistance degradation degree of the corresponding meter position.
[0048] Based on the number of connector insertions and removals, the mechanical wear factor of each position is calculated using a pre-calibrated insertion and removal wear characteristic function. In this embodiment, the insertion and removal wear characteristic function is obtained by conducting accelerated insertion and removal life tests on connectors of the same model. The number of connector insertions and removals is used as input and the mechanical wear factor is used as output. The mechanical wear factor increases monotonically with the number of connector insertions and removals and takes a value of 1 when the design life of the connector is reached.
[0049] The contact resistance degradation degree is multiplied by the mechanical wear factor of the corresponding meter position to obtain the comprehensive degradation degree of each meter position; for multi-meter position energy metering boxes, the maximum value of the comprehensive degradation degree among all meter positions is taken as the overall contact state degradation degree.
[0050] Within a preset second time window, the root mean square (RMS) values of vibration acceleration in the X, Y, and Z directions are calculated respectively, and the root mean square (RMS) of these three RMS values is calculated to obtain the corresponding vibration intensity index. A fast Fourier transform is performed on the vibration acceleration within the second time window, and the proportion of spectral energy within a preset frequency band is extracted as the vibration characteristic frequency band index. The vibration intensity index is multiplied by the vibration characteristic frequency band index, and normalization is performed using the reference vibration characteristic value recorded during the transportation and installation of the power metering box as the normalized denominator to obtain the vibration influence factor.
[0051] The preset frequency band is set based on the vibration frequency distribution characteristics that the electricity metering box may encounter during actual transportation, installation, and operation, and is determined in conjunction with the frequency range specified in the vibration test standards for electrical and electronic products. Specifically, it includes low-frequency, mid-frequency, and high-frequency bands. In this embodiment, the low-frequency band is 1Hz to 10Hz. This frequency band corresponds to the low-frequency bump vibration caused by vehicle movement during transportation of the electricity metering box, as well as the low-frequency structural vibration transmitted through the ground or walls by adjacent equipment such as transformers and large motors after installation. The vibration energy in this frequency band is usually large but the frequency is low, which has a cumulative effect on the loosening of mechanical connecting parts inside the metering box, such as connectors and bolt fasteners. The mid-frequency band is from 10Hz to 100Hz. This band corresponds to the vibration frequencies generated by the magnetostriction of the core of the electromagnetic transformer and the impact of the switching mechanism, as well as the 50Hz power frequency and its integer multiples of harmonics in the power system, such as the vibration component of 100Hz transmitted to the box structure through electromagnetic coupling. Among these, 50Hz and its second harmonic, 100Hz, are the most dominant vibration characteristic frequencies in this band. The high-frequency band is from 100Hz to 1000Hz. This band corresponds to the impact excitations experienced by the energy metering box during transportation and installation, such as the high-frequency response components excited by drops during loading and unloading and knocks during installation, as well as the vibration components generated by the coupling of high-frequency electromagnetic harmonics in the environment. Therefore, the preset frequency band in this embodiment is from 1Hz to 1000Hz.
[0052] In this embodiment, the time window is determined based on the frequency resolution and measurement stability requirements for vibration signal analysis; according to the basic principles of Fourier transform, the frequency resolution Δ f With the length T of the second time window w The Δ between them satisfy f =1 / T w The relationship; to ensure effective differentiation of low-frequency vibration components that may occur in the operating environment of the electricity metering box, a frequency resolution Δ is required. f The time window length T is determined based on the frequency not exceeding 1 Hz. wTo ensure the statistical stability of vibration intensity indicators, the root mean square value of vibration signals should be calculated within a sufficiently long time window, not less than 1 second, in order to eliminate the influence of random noise and instantaneous impact on the statistical results. However, if the second time window is too long, the real-time performance of vibration feature extraction will decrease, and it will be unable to reflect the rapid changes in vibration state during the operation of the power metering box in a timely manner. Therefore, taking into account both frequency resolution requirements and real-time requirements, the length of the second time window is set to 5 seconds.
[0053] The cumulative operating time of the power metering box is converted into a cumulative number of operating days in days, and the cumulative number of operating days is normalized with the design life days of the power metering box as the denominator to obtain the long-term aging acceleration factor; the overall contact state deterioration degree, vibration influence factor and long-term aging acceleration factor are weighted and summed according to the preset tenth weight coefficient, eleventh weight coefficient and twelfth weight coefficient to obtain the contact reliability component; the sum of the tenth weight coefficient, eleventh weight coefficient and twelfth weight coefficient is 1.
[0054] In this embodiment, the tenth, eleventh, and twelfth weighting coefficients are set as follows: by conducting a comprehensive accelerated aging test simulating on-site operating conditions on connectors of the same type of power metering box, the influence of the three factors of increased connector contact resistance, vibration and shock, and long-term aging on the metering error under individual and combined effects is determined, and the standardized regression coefficients of each factor are solved by multiple linear regression analysis, with the normalized value of each standardized regression coefficient used as the corresponding weighting coefficient.
[0055] The operating condition complexity component is used to characterize the drastic dynamic changes of the load at each meter position in the electricity metering box, the mutual coupling effect of loads among multiple users, and the differentiated effect of different load types on metering errors. Its calculation method is as follows: Obtain the active power sequence of each station within a preset third time window, and calculate the standard deviation of the active power sequence of each station within the third time window; use the sum of the active power of all stations at the current time as the normalized denominator to normalize the standard deviation of each station, and obtain the power fluctuation index of the corresponding station; the power fluctuation index reflects the proportion of the absolute amplitude of the load fluctuation of each station relative to the current total load level, and the larger the value, the more severe the load fluctuation.
[0056] The third time window refers to the historical data time span covered by the processor when performing a single power fluctuation analysis on the active power sequence of each meter position. Its setting must satisfy the fluctuation cycle coverage constraint and the electricity theft measurability constraint. The fluctuation cycle coverage constraint refers to the random fluctuations in user electricity load on a minute-scale scale caused by the start and stop of electrical equipment, with a typical fluctuation cycle of 1 to 5 minutes. The length of the third time window should cover at least three complete typical fluctuation cycles to ensure that the window contains sufficient load fluctuation samples, making the calculated power standard deviation statistically representative. If the third time window is too short, the standard deviation may not accurately reflect the inherent amplitude of load fluctuations due to insufficient sample size. The electricity theft measurability constraint refers to the fact that the access or removal of electricity theft operations are usually completed within seconds to minutes, causing a step change in the active power of the corresponding meter position. The length of the third time window should be greater than the average duration of the electricity theft operation to ensure that the power change rate sequence can completely capture this transient change process. Simultaneously, the length of the third time window should not be too long to avoid the natural changes in normal load within the window masking the power surge signal caused by electricity theft. Based on the above constraints, in this embodiment, the length of the third time window is 10 minutes, that is, the active power data within 10 minutes prior to the current time as the end of the third time window is taken as an analysis window; with a sampling period of 1 minute, the third time window contains 10 sampling points, which can cover the complete fluctuation cycle of the start and stop of electrical equipment, and at the same time meet the requirements for capturing transient signals of electricity theft.
[0057] The active power sequence within the third time window is differentially calculated to obtain the power change rate sequence; the maximum value of the absolute value of the power change rate of all meters at all times is taken, and normalized with the preset reference power change rate as the denominator to obtain the maximum power change rate, so as to capture the extreme case of instantaneous peak load impact in multiple meters.
[0058] The reference power change rate is set as follows: based on the historical power data of each meter within the initial reference period, the power change rate of each meter is calculated window by window according to the same third time window length as the real-time monitoring, and the maximum value of the absolute value of the power change rate of all meters in all windows is counted, and the maximum value is taken as the reference power change rate.
[0059] Calculate the Pearson correlation coefficient between the power change rate sequences of each station to obtain a correlation coefficient matrix with the dimension of the number of stations multiplied by the number of stations. Perform singular value decomposition on the correlation coefficient matrix and take the largest singular value as the coupling complexity. Divide the coupling complexity by the number of stations for normalization to obtain the coupling complexity factor. The coupling complexity factor ranges from 0 to 1. The larger the value, the stronger the correlation between the load changes of each station and the closer the mutual influence of the loads.
[0060] Using the current power frequency cycle as the analysis window, a Fast Fourier Transform is performed on the current sampling sequence to extract the amplitudes of the fundamental current and the 3rd, 5th, and 7th harmonics of each meter position. The total harmonic distortion (THD) and the proportion of odd harmonics for each meter position are calculated. The proportion of odd harmonics is the ratio of the root mean square (RMS) amplitude of the 3rd, 5th, and 7th harmonics to the fundamental amplitude. Based on the THD, the proportion of odd harmonics, the ratio of reactive power to active power, and the power factor, the load type of each meter position is determined, and a weighted correction coefficient is calculated for each meter position according to the load type. The load types include resistive loads, motor loads, switching power supply loads, and electric vehicle charging loads.
[0061] The load type determination method is as follows: a hierarchical determination rule based on multiple characteristic parameters is adopted. According to four characteristic parameters of each meter position, namely the total harmonic distortion rate of the current, the proportion of odd harmonics, the ratio of reactive power to active power, and the power factor, the load type of each meter position is determined layer by layer according to a preset determination priority order. The determination priority order is as follows: first determine electric vehicle charging loads, then determine switching power supply loads, then determine motor loads, and finally determine resistive loads. The determination priority order is arranged according to the degree of influence of each type of load on the power metering error from high to low, that is, the loads with significant error influence are determined first, so as to ensure that the high-impact load type is identified first when multiple characteristics overlap.
[0062] For any meter position, when its power factor is less than a preset first factor threshold, and the ratio of reactive power to active power is greater than or equal to a preset first ratio threshold, and the total harmonic distortion rate of the current is greater than or equal to a preset first distortion rate threshold, and the proportion of odd harmonics is greater than or equal to a preset first proportion threshold, the load type of the corresponding meter position is determined to be an electric vehicle charging load.
[0063] When the above electric vehicle charging load determination conditions are not met, it is further determined whether it is a switching power supply type load: when the total harmonic distortion rate of the current is greater than or equal to the preset second distortion rate threshold, and the proportion of odd harmonics is greater than or equal to the preset second proportion threshold, and the ratio of reactive power to active power is less than the preset second ratio threshold, and the power factor is less than the preset second factor threshold but greater than or equal to the preset third factor threshold, the load type of the corresponding position is determined to be a switching power supply type load.
[0064] When the above-mentioned conditions for determining electric vehicle charging load and switching power supply load are not met, it is further determined whether it is a motor load: when the total harmonic distortion rate of the current is less than the preset third distortion rate threshold, and the proportion of odd harmonics is less than the preset third proportion threshold, and the ratio of reactive power to active power is greater than or equal to the preset third ratio threshold, and the power factor is less than the preset fourth factor threshold but greater than or equal to the preset fifth factor threshold, the load type of the corresponding position is determined to be a motor load.
[0065] When a load position does not meet any of the above-mentioned load type determination conditions, the load type of the corresponding load position is determined to be a resistive load. It should be noted that the preset thresholds involved in the load type determination in this embodiment are all pre-calibrated and stored in the processor after statistical analysis of the measured waveform data of various typical loads. The specific calibration method is as follows: select the actual operating current waveforms of various typical loads (including resistive loads, motor loads, switching power supply loads, and electric vehicle charging loads), extract four characteristic parameters of each load type: total harmonic distortion rate, odd harmonic ratio, reactive power to active power ratio, and power factor, and plot the distribution intervals of various loads in the four-dimensional feature space. The boundary values or quantile values of the distribution intervals of the characteristic parameters of various loads are used as the corresponding preset thresholds. The determination thresholds between different categories do not overlap or only allow a very small fuzzy overlap area to ensure the accuracy and reliability of the determination.
[0066] The weighted correction coefficient is calculated as follows: On a standard energy meter calibration device, the typical current waveforms of various load types are used as inputs to measure the metering error of the energy metering box under each load type; the metering error under resistive load is used as the reference value, and the correction factor of the load type corresponding to the reference value is set to 1. The ratio of the metering error to the reference value under other load types is calculated as the correction factor for the corresponding load type; the arithmetic mean of all meter position correction factors is calculated to obtain the weighted correction coefficient.
[0067] The power fluctuation index and the maximum power change rate are weighted and summed to obtain a first intermediate quantity; the cumulative product of the first intermediate quantity, the weighted correction coefficient, and the coupling complexity factor is calculated to obtain the operating condition complexity component.
[0068] The sum of the weighting coefficients of the power fluctuation index and the maximum power change rate is 1. The setting method is as follows: dynamic load current waveforms with different power fluctuation amplitudes and different peak impact intensities are applied to the standard energy meter calibration device, the metering error under each dynamic operating condition is measured, and the standardized regression coefficients of the two independent variables, power fluctuation amplitude and peak impact intensity, are solved by multiple linear regression analysis. The normalized values of each standardized regression coefficient are used as the weighting coefficients of the power fluctuation index and the maximum power change rate.
[0069] A measurement deviation inference model is constructed, and the multidimensional state feature vector is input into the measurement deviation inference model to obtain a real-time deviation estimate. The measurement deviation inference model is a multi-input multi-output neural network model that is pre-trained offline and supports online incremental learning. Its input is the multidimensional state feature vector, and its output is a three-dimensional real-time deviation estimate, namely, the basic error offset, the additional error fluctuation, and the long-term drift trend. The measurement deviation inference model adopts a multi-layer feedforward neural network architecture, specifically including an input layer, a first deep feature extraction module, a second deep feature extraction module, a multi-head cross-attention fusion module, and an output layer.
[0070] The input layer receives the multidimensional state feature vector and normalizes each component to ensure that each component is of the same numerical magnitude, thereby eliminating the impact of dimensional differences on model training. In this embodiment, the normalization process uses the Z-score standardization method, which involves subtracting the historical mean from each feature component and then dividing by the historical standard deviation. The historical mean and historical standard deviation are obtained statistically from the training samples during the offline pre-training phase of the model and stored in the processor.
[0071] The first deep feature extraction module is connected to the input layer and consists of two fully connected network layers. It is used to independently extract features from the four components of the multidimensional state feature vector. Specifically, the first fully connected network layer has 64 neurons and uses the ReLU activation function to map the input four-dimensional feature vector to a 64-dimensional intermediate feature space to capture the nonlinear features within each physical domain. The second fully connected network layer has 32 neurons and also uses the ReLU activation function to further compress and abstract the 64-dimensional features into 32-dimensional intra-domain deep features. The output of the first deep feature extraction module is a 32-dimensional deep feature vector corresponding to each of the four components.
[0072] The second deep feature extraction module receives four 32-dimensional deep feature vectors output by the first deep feature extraction module, concatenates them into a 128-dimensional fused feature vector, and performs overall feature extraction through a fully connected network with 64 neurons and ReLU activation function, outputting 64-dimensional global fused features.
[0073] The multi-head cross-attention fusion module receives the 64-dimensional global fusion feature output by the second deep feature extraction module and captures the nonlinear coupling relationship between features from different physical domains through a multi-head self-attention mechanism. Specifically, the multi-head cross-attention fusion module includes four attention heads, each independently calculating the query matrix, key matrix, and value matrix, and performing scaled dot product attention operations. After concatenating the outputs of the four attention heads, the dimension is restored to 64 dimensions through a linear mapping layer, and then processed by residual connections and layer normalization to obtain the fused 64-dimensional cross-attention feature. The multi-head cross-attention fusion module is used to capture nonlinear interactions across physical domains, such as positive feedback coupling where increased contact resistance leads to accelerated temperature rise, and the temperature rise, in turn, accelerates the increase in contact resistance.
[0074] The output layer receives the 64-dimensional cross-attention features output by the multi-head cross-attention fusion module, and maps them to a one-dimensional output space through three independent linear mapping layers, respectively outputting the basic error offset, the additional error fluctuation, and the long-term drift trend; all three output quantities are dimensionless real numbers, and the estimated value of the measurement error is expressed as a percentage.
[0075] In this embodiment, the offline pre-training method of the metering deviation inference model is as follows: during the type test phase of the electricity metering box, measured data of metering errors under multiple operating conditions are collected as training samples; specifically, on the standard electricity meter calibration device, with the rated voltage as the benchmark, values are taken in 5% increments within the range of 85% to 115% of the rated voltage; values are taken in different time increments within the range of 5% to 120% of the rated current of the corresponding meter position; values are taken in 0.1 increments within the range of 0.5L to 1.0; and values are taken in 5℃ increments within the range of -25℃ to +70℃. At the same time, harmonic components of different contents are superimposed to construct a test matrix covering the entire operating range of the electricity metering box. Under each operating condition, the reading of a high-precision standard energy meter is used as the reference true value to record the measurement error value of the energy metering box. At the same time, the corresponding multi-dimensional state feature vector is collected and calculated to form a training sample set labeled with the real measurement error. Each sample in the training sample set contains the input feature vector and its corresponding real measurement error value. The training sample set is divided into a training set, a validation set, and a test set. In this embodiment, the training set accounts for 70%, the validation set accounts for 15%, and the test set accounts for 15%. The mean squared error is used as the loss function, and the Adam optimization algorithm is used to train the measurement deviation inference model. The initial learning rate is set to 0.001, the batch size is set to 32, and the training rounds are set to 500 rounds. The training is terminated early when the validation set loss no longer decreases in 50 consecutive training rounds to prevent overfitting. After training, the trained model parameters, including the weight matrix and bias vector of each fully connected network layer, the projection matrix of the multi-head attention mechanism, and the weight matrix and bias vector of the output layer, are stored in the non-volatile memory of the energy metering box.
[0076] It should be noted that each component in the multidimensional state feature vector corresponds to a different physical meaning and numerical range. In order to eliminate the influence of the difference in dimensions on model training, normalization is performed before inputting the multidimensional state feature vector into the model, so that each component is mapped to a standard normal distribution space with a mean of 0 and a standard deviation of 1. Optionally, for components with the same dimensions and similar physical meanings, the maximum-minimum normalization method can also be used to map them to the [0,1] interval, which will not be elaborated on here.
[0077] After completing the offline pre-training of the metering deviation inference model, it is deployed to the processor of the power metering box. During the real-time operation of the power metering box, with each power frequency cycle as the update cycle, the multi-dimensional state feature vector obtained by time domain registration and feature extraction at the current moment is input into the metering deviation inference model. After forward propagation calculation of the metering deviation inference model, the deviation estimate of three dimensions is output in real time: basic error offset, additional error fluctuation and long-term drift trend.
[0078] The basic error offset corresponds to the inherent system error base value of the metering channel under standard verification conditions (voltage is rated voltage, current is rated current, power factor is 1.0, temperature is reference temperature 25℃, and harmonic distortion rate is close to 0). It is determined by the initial accuracy level and circuit topology of the current transformer, voltage sampling resistor, analog-to-digital converter and metering chip. This value is relatively stable in the early stage of operation of the power metering box and only changes slowly as the components age.
[0079] The additional error fluctuation corresponds to the dynamic disturbance portion of the offset relative to the basic error under the current operating conditions. It reflects the time-varying characteristics of the error caused by factors such as temperature changes, harmonic pollution, load fluctuations, and changes in contact resistance. This value fluctuates in real time with changes in operating conditions.
[0080] The long-term drift trend corresponds to the cumulative drift trend of metering errors caused by factors such as component aging, connector wear, residual magnetism accumulation in the current transformer core, and performance degradation of insulation materials during the long-term operation of the electricity metering box. This value changes monotonically and slowly over time, and the rate of change is related to the operating environment and aging state of the electricity metering box.
[0081] Optionally, to improve the estimation accuracy of the long-term drift trend, a Long Short-Term Memory (LSTM) unit or a Gated Recurrent Unit (GRU) is introduced into the measurement deviation inference model. The multidimensional state feature vector sequence within the past time window is used as input, and the dynamic law of feature evolution over time is captured by the recurrent neural network, thereby outputting a more accurate long-term drift trend estimate. For example, the multidimensional state feature vector sequence of each power frequency cycle in the past 720 hours is used as the input sequence, and the long-term drift trend at the current moment is output after being processed by the recurrent neural network. The recurrent neural network is trained together with the main network of the measurement deviation inference model during the offline pre-training stage.
[0082] Optionally, before inputting the multidimensional state feature vector into the measurement deviation inference model, outlier detection is also performed on the multidimensional state feature vector: when any component in the multidimensional state feature vector exceeds the historical value range covered by that component in the offline training phase (defined by the minimum and maximum values of that component in the training set), it is determined that the current multidimensional state feature vector is an abnormal working condition not covered by the measurement deviation inference model. At this time, the measurement deviation inference model is paused, the most recent output is used as the current deviation estimate, and the multidimensional perception data under the abnormal working condition is stored in the processor, to be uploaded to the cloud through the communication interface for incremental training and expansion of the measurement deviation inference model.
[0083] The dynamic correction coefficient matrix is calculated based on the real-time deviation estimate, and then applied to the current and voltage sample values on a sample-by-sample-point basis to obtain the corrected instantaneous power value. The calculation method of the dynamic correction coefficient matrix is as follows: Calculate the product of the basic error offset and the preset sensitivity coefficient, and add the product to 1. The reciprocal of the sum is used as the inverse vector of the basic error. The sensitivity coefficient is a frequency response coefficient that varies with frequency components. It is used to characterize the transmission characteristics of the metering box at different frequencies. It reflects the error transmission ratio of the metering box at the fundamental frequency and each harmonic frequency. It is calibrated by applying standard signals to each harmonic frequency point and measuring the error transmission ratio during the type test of the metering box.
[0084] Calculate the product of the additional error fluctuation amount and the preset time-varying weight coefficient, and add the product to 1. The reciprocal of the sum is used as the inverse vector of the fluctuation error. The time-varying weight coefficient changes with time and is positively correlated with the degree of drastic change in the current load. That is, when the load fluctuates drastically, the time-varying weight coefficient takes a larger value to enhance the suppression of fluctuation error, and when the load is stable, the time-varying weight coefficient takes a smaller value to avoid overcorrection and the introduction of additional noise.
[0085] In this embodiment, the lower limit of the time-varying weight coefficient is 1, corresponding to the operating condition where the current load change rate is zero or within the normal fluctuation range. Under this condition, the load is stable, and the measurement deviation mainly originates from the system's own steady-state error, rather than the dynamic error introduced by load fluctuations. Therefore, there is no need to additionally suppress or amplify the additional error fluctuation, hence the lower limit of the time-varying weight coefficient is 1. If the time-varying weight coefficient is less than 1, it means that the contribution of the additional error fluctuation to the inverse fluctuation error is actively weakened, which will lead to insufficient reflection of the actual measurement error when the load is stable, failing to meet the basic requirements of error assessment. The upper limit of the time-varying weight coefficient is 3, corresponding to the operating condition where the current load change rate exceeds a preset threshold for severe fluctuations. Under severe load fluctuation conditions, the amplitude of the additional error fluctuation may reach 2 to 3 times its average amplitude under normal operating conditions. After amplification with an upper limit of 3, the corresponding inverse fluctuation error vector can be effectively compressed to 1 / 3 of the original error fluctuation, achieving sufficient suppression of the fluctuation error. The threshold for severe fluctuations is: based on the historical power change rate data of each station within the initial reference period, the 95th percentile of all historical power change rate data is taken as the threshold for severe fluctuations.
[0086] Calculate the product of the long-term drift trend and the preset aging fitness coefficient, and add the product to 1. The reciprocal of the sum is used as the inverse vector of the drift error. The aging fitness coefficient increases monotonically with the increase of the cumulative operating time of the power meter box to reflect the characteristic of the long-term drift accumulating faster over time. The lower limit of the aging fitness coefficient is 1, corresponding to the operating condition where the power metering box has just been put into operation or has a very short cumulative operating time. Under this condition, the long-term drift trend has not yet accumulated significantly, and the aging effects such as the reference voltage drift of the metering chip and the resistance change of the precision resistor are still in the early stable stage. The measured long-term drift trend itself is a true reflection of the current aging state and does not require additional amplification. The upper limit of the aging fitness coefficient is 3, corresponding to the operating condition where the cumulative operating time of the power metering box reaches or exceeds its design service life. At the end of the design service life of the power metering box, the parameter drift rate of key components, such as the bandgap reference source inside the metering chip and the precision resistor in the sampling circuit, is usually 2 to 3 times that of the initial operation. After amplifying the accelerated accumulation effect with an upper limit of 3, the corresponding drift error inverse vector can be effectively compressed to 1 / 3 of the original drift trend, so that the system can still maintain sufficient correction force for aging error at the end of its life. It should be noted that if the upper limit is too small, the correction for accelerated aging will be insufficient, and the system will not be able to effectively suppress aging errors at the end of its lifespan; if the upper limit is too large, unnecessary overcorrection may be introduced in the early stages of operation, causing the slight aging trend under normal conditions to be abnormally amplified.
[0087] The inverse vectors of the basic error, fluctuation error, and drift error are multiplied to obtain the dynamic correction coefficient matrix. The dynamic correction coefficient matrix is a two-dimensional matrix, where the row index corresponds to the sampling time and the column index corresponds to the frequency component. The frequency component includes the fundamental wave and all harmonics. Each element of the dynamic correction coefficient matrix is a dimensionless real number, and its physical meaning is the correction ratio that should be applied to the original sampled value of a certain frequency component. When the correction coefficient is greater than 1, it means that the sampled value of the frequency component needs to be amplified, and when it is less than 1, it means that the sampled value of the frequency component needs to be reduced.
[0088] In this embodiment, the basic error inverse vector and the drift error inverse vector are regarded as quasi-static quantities on a millisecond time scale and are calculated at an update frequency of once per second; the fluctuation error inverse vector is recalculated in each power frequency cycle with the update of the additional error fluctuation amount to reflect the instantaneous error disturbance under dynamic operating conditions; the hierarchical update strategy can significantly reduce the real-time computing overhead of the processor while ensuring timely response to high-frequency fluctuation errors.
[0089] The specific method for applying the dynamic correction coefficient matrix to the current and voltage sample values on a sample-by-sample-point basis is as follows: For the voltage and current sampling sequences at the current moment, using the current power frequency cycle as the analysis window, perform sliding discrete Fourier transforms to transform the voltage and current sampling sequences from the time domain to the frequency domain, obtaining the complex amplitude values of voltage and current for each frequency component.
[0090] The voltage complex amplitude of each frequency component is multiplied point by point with the correction coefficient of the corresponding frequency component in the dynamic correction coefficient matrix to obtain the corrected voltage complex amplitude; the current complex amplitude of each frequency component is multiplied point by point with the correction coefficient of the corresponding frequency component in the dynamic correction coefficient matrix to obtain the corrected current complex amplitude.
[0091] Perform inverse discrete Fourier transform on the corrected voltage complex amplitude and the corrected current complex amplitude respectively, and restore the corrected frequency domain components to the time domain to obtain the corrected instantaneous voltage value and the corrected instantaneous current value at each sampling point.
[0092] The corrected instantaneous voltage value is multiplied point-by-point by the corrected instantaneous current value to obtain the corrected instantaneous power value. The corrected instantaneous power value is then integrated over time with the sampling period as the integration step size to obtain the real-time corrected cumulative energy value. Simultaneously, the metering deviation estimation model is periodically updated based on the real-time deviation estimate. This periodic updating of the metering deviation estimation model based on the long-term drift trend is specifically implemented by incrementally learning and fine-tuning the output layer parameters of the metering deviation estimation model on a monthly update cycle. This allows the metering deviation estimation model to adaptively track the aging process of the energy metering box and environmental changes, as detailed below: At the end of each update cycle, it is determined whether a valid reference metering error value has been obtained within the current update cycle. The reference metering error value is obtained by the maintenance personnel using a portable standard energy meter to perform on-site comparison and verification of the energy metering box, and inputting the verified reference error value to the processor through the communication interface of the energy metering box, or by comparing the reading of the metering device at the upper level of the same distribution area with the total reading of the energy metering box to calculate the reference error value, and automatically sending it to the energy metering box through the communication network via the distribution area management terminal.
[0093] If no valid reference measurement error value is obtained within the current update cycle, the model update will not be triggered, and the change trajectory of the long-term drift trend in the current update cycle will be recorded in memory, awaiting the next update cycle. If a valid reference measurement error value is obtained within the current update cycle, the model update process will be initiated. The specific model update process is as follows: Collect sample data for model updates within this update cycle; the sample data includes: multidimensional state feature vectors recorded at 0:00 every day within this update cycle and their corresponding long-term drift trend quantities, forming a temporary sample set; calculate the average value of the long-term drift trend quantities in the temporary sample set, and calculate the difference between the reference measurement error value and the average value of the long-term drift trend quantities, that is, the reference measurement error value minus the average value of the long-term drift trend quantities, to obtain the deviation residual. If the absolute value of the deviation residual is less than or equal to the preset model update initiation threshold, it is determined that the error between the current model output and the actual deviation on site is within an acceptable range, and no model update is required. The data for this update cycle is recorded and the process awaits the next update cycle. If the absolute value of the deviation residual is greater than the preset model update initiation threshold, it is determined that a model update is required. The model update initiation threshold is used to determine whether the error between the current model output and the actual deviation on site is within an acceptable range. It is determined based on the maximum permissible error corresponding to the accuracy level of the electricity metering box. The larger the maximum permissible error, the larger the model update initiation threshold. In this embodiment, one-third of the maximum permissible error is taken as the model update initiation threshold. When the deviation residual between the long-term drift trend estimated by the model and the true value of the on-site reference exceeds one-third of the maximum permissible error, it indicates that the model output has deviated from the actual deviation to a degree that may affect the compliance of the metering accuracy. At this time, a model update should be initiated to ensure that the corrected metering error can continue to meet the accuracy level requirements.
[0094] When it is determined that a model update is required, all network layer parameters in the measurement bias inference model except for the output layer are frozen, including all weight matrices and bias vectors of the first deep feature extraction module, the second deep feature extraction module and the multi-head cross-attention fusion module, and incremental training is performed on the three independent linear mapping layers of the output layer using only the temporary sample set. To obtain the target value for updating the output layer parameters, the multidimensional state feature vector in the temporary sample set is used as input, and the corresponding long-term drift trend value after correction by the deviation residual is used as the supervision label, that is, the corrected supervision label is made to approximate the actual drift level indicated by the reference measurement error value; the mean square error is used as the loss function to incrementally train the parameters of the output layer, with 100 training rounds and the learning rate set to one-tenth of the initial training rate to prevent the parameter update amplitude from being too large and causing the model performance to degrade; After each parameter update, all parameter values of all weight matrices and bias vectors of the output layer before and after the update are extracted, expanded into one-dimensional vectors, and the Euclidean distance between the one-dimensional vectors is calculated. If the Euclidean distance is greater than a preset update magnitude threshold, the current learning rate is halved, and the parameter update is re-executed with the updated learning rate until the Euclidean distance is less than or equal to the update magnitude threshold or the number of halving operations reaches the preset maximum number of halving operations. The update magnitude threshold is used to constrain the change magnitude of the output layer parameters during a single incremental learning process to prevent parameter mutations from causing model performance degradation. It is determined based on the parameter space distribution characteristics of the output layer parameters after the initial training. In this embodiment, after the offline pre-training of the measurement bias inference model is completed, the parameter values of all weight matrices and bias vectors of the three independent linear mapping layers of the output layer are obtained. All parameters are expanded into one-dimensional vectors, and the median of the absolute values of each element in the one-dimensional vector is used as the benchmark value of the parameter magnitude. The update magnitude threshold is set to half of the benchmark value. The maximum number of halvings is used to limit the number of retries for halving the learning rate, preventing the model update process from getting stuck in an infinite loop due to the continuous exceeding of the update limit. It is determined based on the convergence characteristics of model training. In this embodiment, during the offline pre-training stage of the econometric bias model, the decrease in the loss function after each halving of the learning rate during training is recorded. The maximum number of actual halvings of the learning rate from the initial learning rate until the validation set loss reaches a plateau is calculated as the maximum number of halvings.
[0095] Optionally, the update cycle can be adaptively adjusted according to the cumulative operating time of the electricity metering box. For example, when the cumulative operating time is less than 12 months, the electricity metering box is in the initial stage of operation, the components age relatively quickly and the model is still in the adaptation stage, so the update cycle is shortened to once every half month; when the cumulative operating time reaches or exceeds 12 months but is less than 60 months, the update cycle is maintained at once a month; when the cumulative operating time reaches or exceeds 60 months, the electricity metering box has entered the stable operation period, the model's fitting of the deviation pattern tends to be mature, so the update cycle is extended to once a quarter to reduce the processor's computing overhead.
[0096] Example 2 This embodiment is the second embodiment of this application; it is based on the same inventive concept as Embodiment 1, and refers to... Figure 2 This embodiment introduces a real-time metering system, including a data acquisition module, a deviation estimation module, a power correction module, and an update module; The data acquisition module synchronously collects multi-dimensional status perception data of the power metering box during operation, including electrical parameter data stream, environmental parameter data stream and mechanical status data stream; The deviation estimation module performs time-domain registration on the multi-dimensional state perception data and extracts electrical distortion components, thermal stress accumulation components, contact reliability components, and operating condition complexity components to obtain a multi-dimensional state feature vector. The deviation estimation module also constructs a measurement deviation inference model and inputs the multi-dimensional state feature vector into the measurement deviation inference model to obtain a real-time deviation estimate. The measurement deviation extrapolation model is a multi-input multi-output neural network model that is pre-trained offline and supports online incremental learning. Its input is the multi-dimensional state feature vector, and its output is a three-dimensional real-time deviation estimate, namely, the basic error offset, the additional error fluctuation, and the long-term drift trend. The power correction module calculates a dynamic correction coefficient matrix based on the real-time deviation estimate, and applies the dynamic correction coefficient matrix to the current sample value and voltage sample value in a sampling point-by-sampling manner to obtain the corrected instantaneous power value; the power correction module also performs time integration on the corrected instantaneous power value to obtain the real-time corrected cumulative power value. The update module periodically updates the measurement deviation extrapolation model based on the real-time deviation estimate.
[0097] The specific functions of each of the above steps are described in the relevant content of the real-time metering method in Embodiment 1, and will not be repeated here.
[0098] Example 3 This embodiment is the third embodiment of this application; it is based on the same inventive concept as Embodiments 1 and 2, and refers to... Figure 3 This embodiment describes an electricity metering box, including: The enclosure, and the incoming switch, busbar, energy meter connector, and outgoing circuit breaker installed inside the enclosure; Memory, used to store computer programs; A processor is used to execute the computer program, causing the energy metering box to perform operations that implement the above-described real-time metering method. The communication interface is used to communicate with the upper-level system and send control commands to the outgoing circuit breaker.
[0099] 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 embodied 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.
[0100] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of protection of this application, and these forms are all within the protection scope of this application.
Claims
1. A real-time measurement method, characterized in that, Includes the following steps: Synchronously collect multi-dimensional status sensing data of the power metering box during operation, including electrical parameter data stream, environmental parameter data stream and mechanical status data stream; The multi-dimensional state perception data is registered in the time domain, and the electrical distortion component, thermal stress accumulation component, contact reliability component, and operating condition complexity component are calculated to obtain a multi-dimensional state feature vector. A measurement deviation extrapolation model is constructed, and the multidimensional state feature vector is input into the measurement deviation extrapolation model to obtain the real-time deviation estimate; The dynamic correction coefficient matrix is calculated based on the real-time deviation estimate, and the dynamic correction coefficient matrix is applied to the current sample value and voltage sample value in a sampling point-by-sampling manner to obtain the corrected instantaneous power value. The corrected instantaneous power value is integrated over time to obtain the real-time corrected cumulative energy value, and the metering deviation extrapolation model is updated periodically based on the real-time deviation estimate.
2. The real-time metering method as described in claim 1, characterized in that, The electrical distortion component is a weighted synthesis of the fundamental distortion sub-component and the harmonic distortion sub-component, calculated as follows: Calculate the absolute values of voltage deviation rate, current deviation rate and power factor deviation for each meter position, and then perform a weighted summation to obtain the fundamental distortion sub-component. The voltage amplitude and current amplitude of the fundamental wave and each harmonic are extracted from the voltage sampling sequence and current sampling sequence of the current power frequency cycle, respectively. The ratio of the voltage amplitude of each harmonic to the voltage amplitude of the fundamental wave, and the ratio of the current amplitude of each harmonic to the current amplitude of the fundamental wave are calculated to obtain the voltage harmonic content and current harmonic content of the corresponding harmonic. Voltage weighting coefficients and current weighting coefficients are set for each harmonic, and the voltage harmonic content is multiplied by the corresponding voltage weighting coefficients one by one and then summed to obtain the voltage-weighted harmonic content. The current-weighted harmonic content is obtained by successively multiplying the current harmonic content of each harmonic with the corresponding current weighting coefficient and summing the results. The voltage-weighted harmonic content and the current-weighted harmonic content are then weighted and summed to obtain the harmonic distortion sub-component.
3. The real-time metering method as described in claim 1, characterized in that, The calculation method for the cumulative thermal stress component is as follows: Calculate the highest temperature inside the electricity metering box at the current moment, and calculate the difference between the highest temperature inside the electricity metering box and the reference temperature to obtain the highest temperature rise value; Calculate the daily average temperature rise for each day within the first time window, and then sum the daily average temperature rise values according to the time decay weight to obtain the cumulative temperature rise effect value. The ratio of the internal humidity of the power metering box to the preset humidity benchmark is used as the humidity acceleration factor, and the difference between the external ambient temperature and the benchmark temperature is used as the ambient temperature difference correction term. The cumulative thermal stress component is obtained by weighting and summing the maximum temperature rise, cumulative temperature rise effect, humidity acceleration factor, and environmental temperature difference correction term.
4. The real-time metering method as described in claim 1, characterized in that, The contact reliability component is calculated as follows: Calculate the ratio of the contact resistance of the connector at each position to the corresponding initial contact resistance to obtain the contact resistance degradation degree of the corresponding position; calculate the mechanical wear factor of each position based on the number of times the connector is inserted and removed. Multiply the contact resistance degradation degree by the mechanical wear factor of the corresponding position to obtain the comprehensive degradation degree of each position, and take the maximum value of the comprehensive degradation degree among all positions as the overall contact state degradation degree. Within a preset second time window, vibration intensity index and vibration characteristic frequency band index are calculated based on vibration acceleration, and the vibration intensity index and vibration characteristic frequency band index are multiplied to obtain the vibration influence factor; The long-term aging acceleration factor is calculated based on the cumulative operating time of the power metering box. The contact reliability component is obtained by weighting and summing the overall contact condition deterioration, vibration influence factor and long-term aging acceleration factor.
5. The real-time metering method as described in claim 1, characterized in that, The calculation method for the operating condition complexity components is as follows: The power fluctuation index and maximum power change rate are calculated based on the active power sequence of each station within the third time window. The power change rate sequence is obtained by differential calculation of the active power sequence within the third time window. Calculate the Pearson correlation coefficient between the power change rate sequences of each epitope to obtain the correlation coefficient matrix, and perform singular value decomposition on the correlation coefficient matrix, taking the maximum singular value as the coupling complexity. Based on the current sampling sequence of the current power frequency cycle, the ratio of reactive power to active power, and the power factor, the load type of each meter position is determined, and the weighted correction coefficient of each meter position is calculated according to the load type. The power fluctuation index and the maximum power change rate are weighted and summed to obtain a first intermediate quantity; the cumulative product of the first intermediate quantity, the weighted correction coefficient, and the coupling complexity factor is calculated to obtain the operating condition complexity component.
6. The real-time metering method as described in claim 5, characterized in that, The load types include resistive loads, motor loads, switching power supply loads, and electric vehicle charging loads, and the determination method is as follows: Calculate the total harmonic distortion rate and the proportion of odd harmonics of the current at each position based on the current sampling sequence of the current frequency cycle. Based on the total harmonic distortion rate of the current, the proportion of odd harmonics, the ratio of reactive power to active power, and the power factor, the load type of each meter position is determined by judging layer by layer according to the preset judgment priority order. The priority order for judgment, from high to low, is as follows: electric vehicle charging load, switching power supply load, motor load, and resistive load.
7. The real-time metering method as described in claim 1, characterized in that, The dynamic correction coefficient matrix is calculated as follows: Based on the real-time deviation estimate, the inverse vectors of the basic error, fluctuation error, and drift error are calculated respectively, and the inverse vectors of the basic error, fluctuation error, and drift error are multiplied together to obtain the dynamic correction coefficient matrix. The dynamic correction coefficient matrix is a two-dimensional matrix, where the row index corresponds to the sampling time and the column index corresponds to the frequency component, and the frequency component includes the fundamental frequency and each harmonic. Each element of the dynamic correction coefficient matrix is a dimensionless real number, and its physical meaning is the correction ratio that should be applied to the original sampled value for any frequency component.
8. The real-time metering method as described in claim 7, characterized in that, The real-time deviation estimate includes the basic error offset, the additional error fluctuation, and the long-term drift trend. Calculate the product of the basic error offset and the preset sensitivity coefficient, add 1 to the product, and use the reciprocal of the sum as the inverse vector of the basic error; the sensitivity coefficient is a frequency response coefficient that varies with the frequency components. Calculate the product of the additional error fluctuation amount and the preset time-varying weight coefficient, add 1 to the product, and take the reciprocal of the sum as the inverse vector of the fluctuation error; the time-varying weight coefficient changes with time and is positively correlated with the degree of drastic change in the current load. Calculate the product of the long-term drift trend and the preset aging fitness coefficient, add the product to 1, and use the reciprocal of the sum as the inverse vector of the drift error; the aging fitness coefficient increases monotonically with the increase of the cumulative operating time of the power metering box.
9. A real-time metering method as described in claim 8, characterized in that, The specific method for applying the dynamic correction coefficient matrix to the current and voltage sample values on a sample-by-sample-point basis is as follows: Using the current power frequency cycle as the analysis window, the sliding discrete Fourier transform is performed on the voltage sampling sequence and current sampling sequence at the current moment to obtain the complex amplitude values of voltage and current for each frequency component. The voltage complex amplitude value of each frequency component is multiplied point by point with the correction coefficient of the corresponding frequency component in the dynamic correction coefficient matrix to obtain the corrected voltage complex amplitude value. The current complex amplitude value of each frequency component is multiplied point by point with the correction coefficient of the corresponding frequency component in the dynamic correction coefficient matrix to obtain the corrected current complex amplitude value. Perform inverse discrete Fourier transform on the corrected voltage complex amplitude value and the corrected current complex amplitude value respectively to obtain the corrected instantaneous voltage value and the corrected instantaneous current value at each sampling point.
10. The real-time metering method as described in claim 1, characterized in that, The measurement deviation inference model is a neural network model that has been pre-trained offline and supports online incremental learning, including an input layer, a first deep feature extraction module, a second deep feature extraction module, a multi-head cross-attention fusion module, and an output layer; During the real-time operation of the electricity metering box, the multi-dimensional state feature vector at the current moment is input into the metering deviation inference model with each power frequency cycle as the update cycle. After forward propagation calculation by the metering deviation inference model, the deviation estimate of three dimensions is output in real time: basic error offset, additional error fluctuation and long-term drift trend.
11. A real-time metering system for implementing a real-time metering method as described in any one of claims 1-10, characterized in that, It includes a data acquisition module, a deviation estimation module, a power correction module, and an update module; The data acquisition module synchronously collects multi-dimensional status perception data of the power metering box during operation, including electrical parameter data stream, environmental parameter data stream and mechanical status data stream; The deviation estimation module performs time-domain registration on the multi-dimensional state perception data and calculates electrical distortion components, thermal stress accumulation components, contact reliability components, and operating condition complexity components to obtain a multi-dimensional state feature vector. The deviation estimation module also constructs a measurement deviation inference model and inputs the multi-dimensional state feature vector into the measurement deviation inference model to obtain a real-time deviation estimate. The power correction module calculates a dynamic correction coefficient matrix based on the real-time deviation estimate, and applies the dynamic correction coefficient matrix to the current sample value and voltage sample value in a sampling point-by-sampling manner to obtain the corrected instantaneous power value; the power correction module also performs time integration on the corrected instantaneous power value to obtain the real-time corrected cumulative power value. The update module periodically updates the measurement deviation extrapolation model based on the real-time deviation estimate.
12. An electricity metering box, characterized in that, include: The enclosure, and the incoming switch, busbar, energy meter connector, and outgoing circuit breaker installed inside the enclosure; Memory, used to store computer programs; A processor is configured to execute the computer program, causing the energy metering box to perform operations that implement a real-time metering method as described in any one of claims 1-10; The communication interface is used to communicate with the upper-level system and send control commands to the outgoing circuit breaker.