Adaptive self-calibrating dc power metering method and apparatus

By using an adaptive and self-calibrating DC power metering method, the range and sampling frequency are dynamically adjusted, and error compensation is performed by combining an AI prediction model. This solves the metering error problem of traditional metering schemes in complex environments and achieves high-precision and stable metering results.

CN122307447APending Publication Date: 2026-06-30国网河北省电力有限公司营销服务中心 +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
国网河北省电力有限公司营销服务中心
Filing Date
2026-02-05
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Traditional DC power metering schemes are difficult to adapt to wide range of voltage and current fluctuations, resulting in large metering errors. Furthermore, they are not accurate in tracing the source of errors in complex environments and lack dynamic adaptability, failing to meet the high requirements of power trading settlement and energy efficiency assessment.

Method used

An adaptive and self-calibrating DC power metering method is adopted. By collecting power, environmental and equipment status information, the range and sampling frequency are dynamically adjusted to construct multiple calibration points. Combined with an AI prediction model, error compensation is performed to achieve accurate metering under all operating conditions.

Benefits of technology

It significantly improves the accuracy and long-term stability of DC power metering under all operating conditions, meets the requirements of high-precision metering, reduces system energy consumption, and improves the consistency and accuracy of metering results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122307447A_ABST
    Figure CN122307447A_ABST
Patent Text Reader

Abstract

This invention provides an adaptive and self-calibrating DC power metering method and device. First, it collects power parameters, environmental parameters, and equipment status information. Then, based on the power parameters, it switches measurement ranges and adaptively adjusts the sampling frequency and sampling step size to acquire raw power signals. Next, based on the acquired raw power signals, it divides the voltage and current ranges into different ranges to construct multiple calibration points covering the entire operating range. Then, based on environmental parameters, equipment status information, calibration information, and an AI prediction model, it determines calibration parameters. Finally, based on the raw power signals and calibration parameters, it determines the DC power metering result. This invention, by constructing a multi-point segmented calibration system covering the entire operating range and combining it with an AI prediction model for dynamic error compensation of environmental parameters and equipment status, achieves adaptive adjustment and full-dimensional self-calibration under wide ranges and complex operating conditions, significantly improving the accuracy and long-term stability of DC power metering under all operating conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power metering and management technology, and in particular to an adaptive self-calibrating DC power metering method and device. Background Technology

[0002] With the rapid popularization of emerging DC power consumption scenarios such as new energy vehicles, photovoltaic energy storage, and DC power distribution networks, the requirements for the accuracy and reliability of DC power metering are becoming increasingly stringent. Traditional DC power metering schemes mostly adopt fixed range and single calibration point designs, which are difficult to adapt to wide range of voltage and current fluctuations (such as the current in the fast charging scenario of new energy vehicles, which can suddenly change from 1mA to 1kA, and the voltage covers 0.1V~1.5kV). Under non-rated operating conditions, they are prone to large metering errors due to signal overflow and sampling distortion. At the same time, factors such as temperature and humidity changes, electromagnetic interference (100MHz~1GHz frequency band), and long-term aging of devices in complex application environments will further aggravate metering deviations, making traditional schemes unable to meet the high metering accuracy requirements of scenarios such as power trading settlement and energy efficiency assessment. There is an urgent need to break through the limitations of fixed parameter metering modes.

[0003] Although existing smart metering technologies have attempted to introduce simple algorithm optimizations, they generally suffer from problems such as inaccurate error tracing and insufficient dynamic adaptation capabilities. Summary of the Invention

[0004] This invention provides an adaptive and self-calibrating DC power metering method and device to address the problems of inaccurate error tracing and insufficient dynamic adaptation capabilities in existing smart metering technologies.

[0005] A first aspect of this invention provides an adaptive self-calibrating DC power metering method, comprising: Collect power parameters, environmental parameters, and equipment status information; Based on the electrical energy parameters, the range setting is switched and the sampling frequency and sampling step size are adaptively adjusted to acquire the raw electrical energy signal; Based on the collected raw power signals, the voltage and current ranges are divided into grades to construct multiple calibration points covering the entire operating range. Each calibration point pre-stores the calibration information corresponding to the current range. The calibration information includes voltage gain, current gain, power gain, power offset, and phase calibration parameters. Based on environmental parameters, equipment status information, calibration information, and AI prediction models, calibration parameters are determined. The DC power metering results are determined based on the original power signal and calibration parameters.

[0006] In one possible implementation, the range is switched and the sampling frequency and sampling step size are adaptively adjusted according to the electrical energy parameters to acquire the raw electrical energy signal, including: A signal amplitude detection circuit is used to identify the real-time amplitude range of voltage and current in electrical energy parameters; Based on the voltage and current amplitude in the power parameters, the signal range is identified and the range setting is automatically matched; Determine the characteristic information of the electrical signal based on the current mutation rate in the electrical energy parameters; Based on the characteristics of the electrical signal, the sampling frequency and sampling step size are dynamically adjusted to acquire the original electrical signal.

[0007] In one possible implementation, the voltage and current ranges are divided into segments based on the acquired raw electrical energy signal to construct multiple calibration points covering the entire operating range, including: Based on the rated current, the current range is divided into at least three segments according to the preset range of the current amplitude; Based on the rated voltage, select at least five voltage test points within the operating voltage range; By combining voltage test points with current segments, multiple calibration points are formed that cover the entire operating range.

[0008] In one possible implementation, calibration parameters are determined based on environmental parameters, device status information, calibration information, and an AI prediction model, including: Multimodal error decomposition is performed on the acquired raw electrical energy signal to construct an error vector; Input the error vector, environmental parameters, equipment status information and historical measurement error data into the AI ​​prediction model to predict the measurement error offset within a preset time period in the future. The initial weight matrix of the measurement error offset is obtained, and the target weight matrix is ​​obtained by optimizing the initial weight matrix with the optimization objective of minimizing error and balancing calibration adjustment costs. The calibration parameters are determined based on the measurement error offset and the target weight matrix.

[0009] In one possible implementation, multimodal error decomposition is performed on the acquired raw electrical energy signal to construct an error vector, including: Determine the error sensitivity dimensions of the raw power signal under different application scenarios; The original electrical signal is decomposed into multiple layers using wavelet basis to obtain signal fundamental components containing different frequency characteristics; The signal's fundamental components are decomposed based on the error-sensitive dimension and wavelet packet transform to obtain multiple target components. These target components include low-frequency stationary components, high-frequency abrupt change components, cross-frequency coupling components, transition state fluctuation components, and random noise components. An error vector is constructed based on multiple target components.

[0010] In one possible implementation, the AI ​​prediction model includes a multi-scale feature extraction module, an attention module, and a multi-branch recurrent network module. Error vectors, environmental parameters, equipment status information, and historical measurement error data are input into the AI ​​prediction model to predict the measurement error offset within a preset future time period, including: The error vector, environmental parameters, equipment status information, and historical measurement error data are preprocessed to obtain the input dataset; Based on the input dataset and the multi-scale feature extraction module, determine the multi-scale error features; The multi-scale error features are input into the attention module to obtain the global attention weights; Based on multi-scale error characteristics, global attention weights, and multi-branch recurrent network modules, branch-level temporal feature vectors are obtained; among them, the network structure parameters of each branch of the multi-branch recurrent network module are determined according to the error contribution ratio of multiple target components. The branch-level time series feature vectors are fused to obtain the fused feature vector; The measurement error offset is determined based on the fused feature vector.

[0011] In one possible implementation, an initial weight matrix for the measurement error offset is obtained, and the initial weight matrix is ​​optimized with the optimization objective of minimizing error and balancing calibration adjustment costs to obtain a target weight matrix, including: Construct an objective function that includes an error weight term and a control weight term. The error weight term is used to characterize the weight of the measurement error, and the control weight term is used to characterize the weight of the calibration parameter adjustment cost. The coefficients of the error weighting terms are determined based on the measurement error offset and the preset error priority. The coefficients of the control weighting term are determined based on the adjustment range and frequency of the calibration parameters. The initial weight matrix is ​​iteratively optimized based on the objective function until the preset convergence condition is met or the preset number of iterations is reached, thus obtaining the target weight matrix.

[0012] In one possible implementation, calibration parameters are determined based on the measurement error offset and the target weight matrix, including: Determine the corresponding compensation strategy based on the magnitude of the measurement error offset; The parameter adjustment amount corresponding to the determined compensation strategy is added to the calibration information to obtain the calibration parameters.

[0013] In one possible implementation, the DC power metering result is determined based on the raw power signal and calibration parameters, including: Calculate instantaneous power based on the voltage and current signals in the original electrical energy signal; The instantaneous power is integrated using the integral method to obtain the original electrical energy value; Obtain the multivariate weighting coefficients, which include at least the voltage weighting coefficient, the current weighting coefficient, and the power weighting coefficient; The total gain compensation coefficient is calculated based on the multivariate weighting coefficients and the voltage gain, current gain, and power gain in the calibration parameters. Based on the total gain compensation coefficient, the original energy value, the power offset and phase calibration parameters in the calibration parameters, a multi-factor compensation calculation is performed to obtain the DC energy metering result.

[0014] A second aspect of the present invention provides an adaptive self-calibrating DC power metering device, comprising: The data acquisition module is used to collect electrical energy parameters, environmental parameters, and equipment status information. The switching module is used to switch the range setting according to the power parameters and adaptively adjust the sampling frequency and sampling step size to acquire the raw power signal; The calibration module is used to divide the voltage and current ranges according to the acquired raw power signals to construct multiple calibration points covering the entire working range. Each calibration point pre-stores the calibration information corresponding to the current range. The calibration information includes voltage gain, current gain, power gain, power offset, and phase calibration parameters. The prediction module is used to determine calibration parameters based on environmental parameters, equipment status information, calibration information, and AI prediction models. The metering module is used to determine the DC power metering result based on the raw power signal and calibration parameters.

[0015] Compared to traditional technologies, this invention provides an adaptive and self-calibrating DC power metering method and device. First, it collects power parameters, environmental parameters, and equipment status information. Then, based on the power parameters, it switches measurement ranges and adaptively adjusts the sampling frequency and sampling step size to collect raw power signals. Next, based on the collected raw power signals, it divides the voltage and current ranges into segments to construct multiple calibration points covering the entire operating range. Each calibration point pre-stores calibration information corresponding to the current range, including voltage gain, current gain, power gain, power offset, and phase calibration parameters. Then, based on environmental parameters, equipment status information, calibration information, and an AI prediction model, it determines the calibration parameters. Finally, based on the raw power signals and calibration parameters, it determines the DC power metering result. This invention, by constructing a multi-point segmented calibration system covering the entire operating range and combining it with an AI prediction model for dynamic error compensation of environmental parameters and equipment status, achieves adaptive adjustment and full-dimensional self-calibration under wide ranges and complex operating conditions, significantly improving the full-condition accuracy and long-term stability of DC power metering. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating the implementation of an adaptive self-calibrating DC power metering method provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of an adaptive self-calibrating DC power metering device provided in an embodiment of the present invention. Detailed Implementation

[0017] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0018] Figure 1 This is a flowchart illustrating the implementation of an adaptive self-calibrating DC power metering method provided in an embodiment of the present invention. Figure 1 As shown, the system includes: S110 collects power parameters, environmental parameters, and equipment status information; S120, based on the power parameters, switches the range setting and adaptively adjusts the sampling frequency and sampling step size to acquire the raw power signal; S130 divides the voltage and current ranges according to the acquired raw power signals to construct multiple calibration points covering the entire working range; each calibration point pre-stores the calibration information corresponding to the current range; the calibration information includes voltage gain, current gain, power gain, power offset and phase calibration parameters. S140 determines calibration parameters based on environmental parameters, equipment status information, calibration information, and AI prediction models; S150 determines the DC power metering result based on the original power signal and calibration parameters.

[0019] In this embodiment of the invention, the acquisition of electrical energy parameters covers core data such as instantaneous voltage values, instantaneous current values, voltage and current amplitudes, frequencies, and current mutation rates. The acquisition frequency is linked and adapted to the subsequent sampling step size to ensure real-time capture of dynamic changes in electrical energy signals, providing accurate data support for subsequent range switching and sampling parameter adjustment. Environmental parameter acquisition focuses on key interference factors in the metering scenario, with a focus on acquiring temperature (measurement accuracy up to 0.1℃), relative humidity (measurement range 20%~90%RH), and electromagnetic interference intensity in the 100MHz~1GHz frequency band. Real-time data acquisition and transmission are achieved through high-precision sensors, accurately capturing the characteristics of external environmental interference under complex operating conditions. Equipment status information acquisition focuses on the operating status of core metering components, real-time monitoring of the operating temperature and cumulative operating time of key components such as metering chips and sensors, thereby understanding the aging degree and temperature drift trend of metering components due to long-term operation. The three types of information are acquired collaboratively through time-series alignment and synchronous storage, laying a solid data foundation for subsequent end-to-end error tracing, accurate compensation, and adaptive adjustment.

[0020] First, the system analyzes the acquired voltage and current amplitude ranges in real time. It automatically matches and switches to the appropriate range based on preset threshold ranges. The voltage range covers 0.1V to 1.5kV, and the current range covers 1mA to 1kA. Range switching is achieved using a programmable proportional control standard with a response time ≤10ms. This effectively avoids problems such as signal overflow due to exceeding the range or insufficient sampling accuracy due to excessively small signals, which are common in traditional fixed-range modes. Simultaneously, the system accurately identifies the steady-state and dynamic characteristics of the power signal by calculating the current fluctuation rate in real time. When the current fluctuation rate is ≤100A / s, it is determined to be a steady-state signal. In this case, a low sampling rate of 50kHz and a sampling step size of 1μs are used to reduce system power consumption while ensuring measurement accuracy. When the current fluctuation rate is >100A / s, it is determined to be a dynamic fluctuation signal. The sampling rate is immediately and automatically increased to 1MHz, and the sampling step size is adjusted to 0.1μs to ensure complete capture of the signal's fluctuation details. In addition, during the sampling process, the system will dynamically adjust the stability of the sampling parameters according to the signal-to-noise ratio of the signal, so as to achieve accurate and efficient acquisition of raw power signals with different fluctuation characteristics and different amplitude ranges.

[0021] Based on the amplitude distribution and fluctuation characteristics of the raw electrical signals collected in the early stages, and combined with the rated voltage and rated current parameters of the metering equipment, the voltage and current ranges are finely divided using a segmented interval method. Specifically, using the rated current as a benchmark, the current range is divided into at least three intervals: low current, medium current, and high current. Within each interval, 3-5 characteristic test points are evenly selected to ensure coverage of the entire process of current increase and decrease. Using the rated voltage as a benchmark, within the operating voltage range of 80%-115%, five key voltage test points are selected: 80% rated voltage, 90% rated voltage, rated voltage, 110% rated voltage, and 115% rated voltage, comprehensively covering low, medium, and high voltage scenarios. Subsequently, each voltage test point is cross-combined with each current segment to form multiple calibration points covering the entire operating range. Each calibration point is pre-calibrated through prior experiments and has pre-stored targeted calibration information. This calibration information specifically includes five core parameters: voltage gain, current gain, power gain, power offset, and phase calibration parameters. All calibration parameters are stored after CRC verification.

[0022] The system performs multimodal error decomposition on the raw electrical signals acquired in the early stages. At least five levels of wavelet decomposition are performed using the db4 wavelet basis, and wavelet packet transform is combined to refine the high-frequency band, separating low-frequency stationary components, high-frequency abrupt components, cross-frequency coupling components, transient fluctuation components, and random noise components. Based on the physical error sources corresponding to each component, the system accurately identifies various types of errors, including steady-state errors caused by device temperature drift, transient errors caused by load abrupt changes, and coupling errors caused by the superposition of electromagnetic interference and temperature and humidity, constructing a multidimensional error vector. Subsequently, the system integrates the previously acquired environmental parameters, equipment status information, and pre-stored basic calibration information, along with the constructed error vector and historical metrological error data, and inputs them into the AI ​​prediction model. This AI prediction model includes a multi-scale feature extraction module, an attention module, and a multi-branch recurrent network module. The multi-scale feature extraction module captures error features at different time dimensions, the attention module strengthens the feature weights of key error dimensions and key time nodes, and the multi-branch recurrent network module adapts to the temporal evolution patterns of different types of errors, ultimately accurately predicting the metrological error offset within a preset time period. Finally, the system constructs an objective function that includes error weights and control weights, iteratively optimizes the initial weight matrix based on the predicted measurement error offset, balances the minimization of measurement error with the cost of adjusting calibration parameters, and finally determines the optimal calibration parameters that are suitable for the current operating conditions.

[0023] The raw electrical energy signal acquired after adaptive adjustment is synchronously sampled and analyzed to extract the real-time voltage and current signals at each sampling moment. The instantaneous power value at each sampling moment is calculated based on the instantaneous power formula. The sampling interval is strictly consistent with the adaptively adjusted sampling step size to ensure the synchronization and accuracy of the power calculation. Subsequently, a high-precision instantaneous power integration method is used to discretize and integrate the instantaneous power value. The integration interval is dynamically set according to the current operating conditions: 100ms for steady-state scenarios and 50ms for dynamic scenarios. DMA direct memory access mode is enabled during the integration process to reduce CPU interrupt overhead and effectively reduce integration error, ensuring an integration error ≤0.5ppm, ultimately yielding the raw electrical energy value. Next, the system calls the previously determined optimal calibration parameters and substitutes them into a multi-variable compensation formula to perform multi-factor compensation correction on the raw electrical energy value, comprehensively eliminating the influence of various errors such as voltage gain deviation, current gain deviation, and phase shift on the measurement results. In addition, the system also introduces the measurement value of the reference equipment traceable to the national standard as a reference, calculates the relative error between the corrected power value and the reference value. If the relative error is ≤0.3%, the corrected power value is directly output as the final measurement result. If the relative error is between 0.3% and 0.5%, the secondary compensation algorithm is used to fine-tune the power offset parameter and recalculate. If the relative error is >0.5%, the previous AI intelligent optimization process is triggered to redetermine the calibration parameters until the error meets the requirements, and finally outputs the DC power measurement result that meets the high-precision measurement requirements.

[0024] In some embodiments, the method involves switching the measurement range and adaptively adjusting the sampling frequency and sampling step size according to the power parameters to acquire the raw power signal. This includes: using a signal amplitude detection circuit to identify the real-time amplitude range of voltage and current in the power parameters; identifying the signal range and automatically matching the measurement range based on the voltage and current amplitudes in the power parameters; determining the characteristic information of the power signal based on the current mutation rate in the power parameters; and dynamically adjusting the sampling frequency and sampling step size according to the characteristic information of the power signal to acquire the raw power signal.

[0025] In this embodiment of the invention, the power parameter acquisition uses a high-precision synchronous acquisition module to accurately capture amplitude-related data such as instantaneous voltage, instantaneous current, RMS, and peak values. Simultaneously, it calculates voltage frequency, current frequency, and current mutation rate in real time (with a calculation accuracy of 1A / s). The acquisition frequency can be dynamically linked with subsequent sampling step sizes within the range of 1kHz to 1MHz to ensure accurate tracking of transient fluctuations and steady-state characteristics of power signals under different operating conditions. Environmental parameter acquisition relies on a dedicated sensor array. Temperature acquisition uses a PT1000 platinum resistance sensor (measurement accuracy ±0.1℃, measurement range -40℃ to 85℃), relative humidity acquisition covers 20% to 90%RH (accuracy ±2%RH), and electromagnetic interference intensity acquisition targets the 100MHz to 1GHz industrial frequency band, using an electromagnetic coupling sensor for accurate capture. All environmental data is transmitted after filtering and noise reduction. Equipment status information acquisition is achieved through the collaboration of the metering chip's built-in monitoring unit and external sensing circuits, real-time acquisition of the metering chip's core computing unit temperature, voltage sampling channel temperature, and sensor operating temperature. Simultaneously, a timer accumulates the equipment's operating time to quantify the device's aging degree and temperature drift coefficient. The three types of acquired data are time-aligned using an FPGA chip (time synchronization accuracy ≤10ns) and stored in a high-speed cache, providing high-fidelity and high-synchronization data support for subsequent end-to-end error tracing, accurate compensation, and adaptive adjustment.

[0026] In the adaptive adjustment stage, the electrical parameters are first analyzed in real time through a dedicated signal amplitude detection circuit. This circuit adopts a combination architecture of instrumentation amplifier and comparator, with a voltage amplitude detection resolution of 1mV and a current amplitude detection resolution of 1μA. It can quickly identify the real-time amplitude range of voltage and current and trigger the programmable gain amplifier to automatically switch the range. The voltage range covers 0.1V~1.5kV, divided into three core ranges: 0.1V~10V, 10V~100V, and 100V~1500V. The current range covers 1mA~1kA, divided into three core ranges: 1mA~100mA, 100mA~500mA, and 500mA~1kA. The range switching response time is ≤10ms, effectively avoiding the problems of signal overflow distortion or insufficient small signal sampling accuracy in traditional fixed range modes. Meanwhile, the system determines the characteristics of the power signal based on the current mutation rate threshold (preset 100A / s): when the current mutation rate is ≤100A / s, it is determined to be a steady-state signal, and a sampling rate of 50kHz and a sampling step size of 1μs are adopted to reduce system power consumption while ensuring metering accuracy; when the current mutation rate is >100A / s, it is determined to be a dynamic fluctuation signal, and the sampling parameter switching is immediately triggered to increase the sampling rate to 1MHz and adjust the sampling step size to 0.1μs to ensure complete capture of signal mutation details. In the multi-calibration point construction phase, a refined strategy of "interval segmentation + cross-combination" is adopted. Based on the rated current In of the equipment, thresholds are set at 20%In, 60%In, 100%In, and 120%In. The current range is divided into three core intervals: small current segment (≤20%In), medium current segment (20%In~100%In), and large current segment (>100%In). Three characteristic test points are evenly selected in each segment. Based on the rated voltage Un, five key voltage test points are selected within the working voltage range of 80%Un~115%Un: 80%Un, 90%Un, Un, 110%Un, and 115%Un. Subsequently, each voltage test point is cross-combined with the characteristic test points of each current range to form a calibration point matrix covering the entire working range. Each calibration point has five core information types, namely voltage gain, current gain, power gain, power offset, and phase calibration parameters, pre-stored through standard source calibration experiments. All calibration data are stored in non-volatile memory after being verified by CRC-32 (verification accuracy ≥99.999%), to achieve point-to-point accurate calibration and adaptation under different operating conditions.

[0027] In the calibration parameter optimization stage, the system first performs multimodal error decomposition on the acquired raw power signal: using the db4 wavelet basis for 5-level wavelet decomposition, it separates low-frequency stationary components, high-frequency abrupt components, cross-frequency coupling components, transitional fluctuation components, and random noise components. Then, through the error source tracing model, the low-frequency stationary components are mapped to device temperature drift error, the high-frequency abrupt components to load abrupt transient error, the cross-frequency coupling components to electromagnetic-temperature-humidity coupling error, the transitional fluctuation components to operating condition switching transition error, and the random noise components to random interference error, finally constructing a five-dimensional error vector. Subsequently, this error vector is fused and preprocessed with previously acquired environmental parameters, equipment status information, and historical metering error data synchronized from the cloud (including calibration data under different operating conditions over the past 3 months), and then input into the adaptive multi-branch LSTM prediction model. This model captures error features across different time dimensions through a multi-scale feature extraction module (configured with 3 1D convolutional kernels with different receptive fields). It strengthens the feature weights of key error dimensions and abrupt change time nodes through an error-time dual attention module. Multi-branch LSTM units model the temporal evolution of various errors, accurately predicting measurement error shifts within the next 1-5 minutes. Based on the prediction results, the system constructs a dual-objective optimization function of "minimizing error and minimizing calibration cost," and uses an improved particle swarm optimization algorithm to iteratively optimize the initial weight matrix (50-100 iterations) to ultimately determine the optimal calibration parameters suitable for the current operating conditions, achieving a technological leap from traditional "post-calibration" to "pre-calculation compensation." In the measurement result output stage, the system first acquires voltage and current synchronization signals through a synchronous sampling module. Based on the instantaneous power formula p(t)=u(t)×i(t), it calculates the instantaneous power value at each sampling moment. Then, it uses the trapezoidal integral method to discretize and integrate the instantaneous power value (integration error ≤0.5ppm) to obtain the original energy value. Then, the optimal calibration parameters are substituted to perform multi-factor compensation correction. The correction formula is as follows: W_corr=W_raw×(0.4×Kv + 0.4×Ki + 0.2×Kp) - Op - φ×(U_rms×I_rms) Where Kv is voltage gain, Ki is current gain, Kp is power gain, Op is power offset, and φ is phase calibration value.

[0028] Meanwhile, the system uses the standard energy meter reading as a reference to calculate the relative error between the corrected energy value and the standard value: if the relative error is ≤0.3%, the corrected energy value is output directly; if 0.3% < relative error ≤0.5%, the secondary compensation algorithm is used to fine-tune the power offset parameters and then recalculate; if the relative error is >0.5%, the calibration parameter optimization step is triggered to resolve the optimal parameters, ensuring that the final output DC energy metering result meets the high-precision metering requirements.

[0029] In some embodiments, the voltage and current ranges are divided into segments based on the acquired raw electrical energy signals to construct multiple calibration points covering the entire operating range. This includes: dividing the current range into at least three segments based on the rated current and the preset range in which the current amplitude is located; selecting at least five voltage test points within the operating voltage range based on the rated voltage; and combining the voltage test points with the current segments to form multiple calibration points covering the entire operating range.

[0030] Traditional DC power metering schemes often employ a single calibration point under rated operating conditions. Under atypical conditions where voltage and current deviate from their rated values, significant metering errors can easily arise due to nonlinear device characteristics and signal attenuation. This new scheme, however, precisely analyzes the amplitude distribution and fluctuation characteristics of the original power signal. Combined with the rated parameters of the metering equipment, it performs range classification and test point selection, constructing a calibration point system that provides "full-condition coverage and point-to-point adaptation." This system offers targeted basic calibration for metering compensation under different operating conditions, fundamentally improving the consistency and accuracy of metering results.

[0031] In this embodiment of the invention, the current range is divided based on the rated current, employing a refined strategy of "threshold interval definition + multi-segment uniform coverage" to ensure comprehensive adaptation to different current amplitude ranges. The system first extracts the statistical distribution characteristics of the current amplitude from the collected raw power signal to determine the minimum operating value, maximum operating value, and fluctuation range of the current. Then, using the device's rated current In as the core benchmark, the current range is divided into at least three segments according to preset thresholds. Specifically, four key thresholds are typically set: 20%In, 60%In, 100%In, and 120%In, corresponding to three core intervals: a small current segment (≤20%In), a medium current segment (20%In~100%In), and a large current segment (>100%In). The medium current segment, as the regular operating interval, is further subdivided into two sub-intervals: 40%In and 80%In. Within each current segment, 3 to 5 test points are selected according to the principle of "uniform distribution + feature point coverage". These points include feature locations such as the midpoint and endpoints of the segment, as well as the dynamic changes in current increase and decrease, ensuring that the measurement error patterns in different current segments can be accurately captured.

[0032] The selection of voltage test points, based on the rated voltage, focuses on full coverage of the operating voltage range and key adaptation to critical operating conditions, balancing versatility and scenario-specificity. The system first analyzes the actual operating voltage range from the raw power signal. Combining this with industry-standard voltage fluctuation criteria, the operating voltage range is defined as 80%Un to 115%Un (Un being the rated voltage). This range covers voltage fluctuation requirements for scenarios such as fast charging of new energy vehicles and photovoltaic energy storage, and also conforms to voltage deviation specifications for industrial DC power supply systems. Within this range, at least five voltage test points are selected according to the principle of "equal spacing + reinforcement of key nodes," with five core points typically selected: 80%Un, 90%Un, Un, 110%Un, and 115%Un. 80%Un and 115%Un correspond to the upper and lower limits of voltage fluctuation, 90%Un and 110%Un correspond to typical values ​​within the normal fluctuation range, and Un is the rated reference point. These five points comprehensively capture the differences in metering characteristics during voltage changes from low to high.

[0033] By combining voltage test points with current segments, a calibration point matrix covering the entire operating range is constructed, achieving full-dimensional coverage of the "voltage-current" operating conditions. The system uses a Cartesian product combination method, corresponding each voltage test point to all test points within each current segment, forming a calibration point matrix with a quantity equal to "number of voltage test points × total number of current test points". For example, 5 voltage test points and 9 current test points (3 from each of the 3 segments) can be combined to form 45 calibration points, comprehensively covering various typical operating conditions such as low current-low voltage, medium current-medium voltage, and high current-high voltage, as well as special operating conditions such as low current-high voltage and high current-low voltage. Each calibration point corresponds to a unique combination of operating condition parameters, providing a clear basis for subsequent targeted calibration parameter calibration.

[0034] In some embodiments, the calibration parameters are determined based on environmental parameters, equipment status information, calibration information, and an AI prediction model, including: performing multimodal error decomposition on the collected raw power signals to construct an error vector; inputting the error vector, environmental parameters, equipment status information, and historical metering error data into the AI ​​prediction model to predict the metering error offset within a preset time period; obtaining the initial weight matrix of the metering error offset, and optimizing the initial weight matrix with the optimization objective of minimizing error and balancing calibration adjustment costs to obtain a target weight matrix; and determining the calibration parameters based on the metering error offset and the target weight matrix.

[0035] In this embodiment of the invention, the acquired raw electrical signal is first preprocessed, and high-frequency random noise interference is removed using a filtering algorithm. Then, a 5-level wavelet decomposition is performed using the db4 wavelet basis, and the high-frequency band is finely split using wavelet packet transform. Finally, five types of characteristic components are obtained: low-frequency stationary components, high-frequency abrupt components, cross-frequency coupling components, transient fluctuation components, and random noise components. Subsequently, through an error source tracing mechanism, each component is precisely associated with a specific error type. The low-frequency stationary components correspond to steady-state errors caused by device temperature drift and aging; the high-frequency abrupt components correspond to transient errors caused by load abrupt changes; the cross-frequency coupling components correspond to coupling errors caused by the superposition of electromagnetic interference and temperature and humidity; the transient fluctuation components correspond to transient errors caused by operating condition switching; and the random noise components correspond to unpredictable random interference errors. Finally, the various errors are quantified and calculated, and a five-dimensional error vector is constructed in the order of "steady-state error - transient error - coupling error - transient error - random error," providing accurate error feature input for subsequent AI model prediction.

[0036] The core function of the AI ​​prediction model is to integrate multi-dimensional data and accurately predict the measurement error offset within a preset time period. The system first performs collaborative preprocessing on the constructed error vector, collected environmental parameters (temperature, humidity, electromagnetic interference intensity), equipment status information (device temperature, operating time), and historical measurement error data. This preprocessing completes data normalization, time-series alignment, and outlier removal, forming a standardized time-series input dataset. This dataset is then input into an adaptive multi-branch LSTM prediction model, which includes a multi-scale feature extraction module, a dual-attention module, and a multi-branch recurrent network module. The multi-scale feature extraction module extracts features from the input data using convolutional kernels with different receptive fields, capturing error evolution features across different time dimensions. The dual-attention module assigns weights to the error and time dimensions respectively, strengthening the feature weights of key error types and abrupt change time nodes. The multi-branch recurrent network module models the time-series evolution patterns of different error types separately, improving prediction accuracy. Finally, the model outputs a sequence of measurement error offsets within the next 1-5 minutes, providing accurate error prediction for calibration parameter adjustments.

[0037] Weight matrix optimization is a crucial step in balancing the minimization of metrological errors with calibration adjustment costs. The core principle is to obtain a target weight matrix adapted to the current operating conditions through iterative optimization. The system first initializes the weight matrix based on the correlation between the parameter types (voltage gain, current gain, etc.) and the metrological error offset. The initial weight coefficients for core parameters directly related to metrological accuracy (voltage gain, current gain, phase calibration parameters) are set to 0.25~0.35, while the initial weight coefficients for auxiliary parameters (power gain, power offset) are set to 0.15~0.25. The sum of all matrix elements is normalized to 1. Subsequently, a dual-objective optimization function of "error minimization - calibration cost balance" is constructed, introducing an error weight matrix and a control input weight matrix to represent the importance of the two objectives, respectively. An improved particle swarm optimization algorithm is used to iteratively optimize the initial weight matrix. During the iteration process, the inertia weight and learning factor are dynamically adjusted to balance local and global search capabilities until the objective function converges or the preset number of iterations is reached. Finally, a target weight matrix that balances error compensation effectiveness and calibration economy is obtained.

[0038] The final determination of calibration parameters involves a deep integration of error prediction results and the optimized weight matrix to ensure the accuracy and relevance of parameter adjustments. The system first performs a weighted calculation on the predicted measurement error offset sequence and the target weight matrix to obtain the error correction requirement value for each calibration parameter, clarifying the adjustment direction and initial adjustment magnitude for each parameter. Then, based on the preset compensation strategy grading rules, the system matches the corresponding adjustment method according to the magnitude of the error correction requirement value: low error levels use a fine-tuning mode, making only minor corrections to core parameters; medium error levels use a conventional compensation mode, simultaneously adjusting core and auxiliary parameters; high error levels use a deep compensation mode, comprehensively adjusting all calibration parameters and triggering a secondary verification. Finally, the adjusted calibration parameters are substituted into the measurement model for simulation verification. If the verified measurement error meets the preset accuracy requirements, it is determined as the final calibration parameter; otherwise, the system returns to the weight matrix optimization stage for iterative iteration until the required calibration parameters are obtained.

[0039] In some embodiments, multimodal error decomposition is performed on the acquired raw power signal to construct an error vector, including: determining the error sensitivity dimension of the raw power signal under different application scenarios; performing multi-level decomposition of the raw power signal using a wavelet basis to obtain signal basic components containing different frequency characteristics; splitting the signal basic components according to the error sensitivity dimension and wavelet packet transform to separate multiple target components; the target components include low-frequency stationary components, high-frequency abrupt change components, cross-frequency coupling components, transition state fluctuation components, and random noise components; and constructing an error vector based on the multiple target components.

[0040] In this embodiment of the invention, determining the scenario-based error sensitivity dimension is a preliminary adaptation step for multimodal error decomposition. The core is to accurately locate the core influencing factors of error in combination with the diverse application scenarios of DC power metering. The system first sorts out the operating condition characteristics of typical application scenarios such as supercharging of new energy vehicles, photovoltaic DC transmission, energy storage charging and discharging, and DC power distribution network supply. Then, through scenario-error correlation analysis, it clarifies the error sensitivity dimension of the original power signal in each scenario: the supercharging scenario focuses on the error associated with current mutation (mutation rate > 100A / s), the photovoltaic DC transmission scenario focuses on the error caused by voltage fluctuation (±10% of rated voltage), the energy storage charging and discharging scenario focuses on the error of the charging and discharging switching transition state, the DC power distribution network scenario focuses on the cumulative error of device aging over long-term operation, and complex industrial scenarios need to take into account the coupling error of electromagnetic interference and temperature and humidity superposition, providing scenario-oriented basis for subsequent targeted error decomposition.

[0041] A multi-level decomposition of the original electrical signal using wavelet basis is employed to extract fundamental signal components with different frequency characteristics from the complex signal, laying the foundation for subsequent accurate decomposition of target components. The system preferentially selects the db4 wavelet basis as the decomposition basis function, which possesses excellent time-frequency localization characteristics and can accurately capture the signal's abrupt changes and stationary trends. During the decomposition process, the number of decomposition levels is dynamically set according to the sampling frequency and fluctuation characteristics of the original electrical signal, typically performing 5-7 levels of wavelet decomposition. Through layer-by-layer decomposition, the original signal is broken down into low-frequency and high-frequency components of different scales, ultimately integrating them to form a set of fundamental signal components covering different frequency ranges, including the low-frequency steady-state segment, the high-frequency abrupt segment, and the cross-frequency coupling segment, achieving a comprehensive analysis of the frequency characteristics of the original signal.

[0042] By combining error sensitivity dimensions with wavelet packet transform, the fundamental components of the signal are finely decomposed to achieve precise separation of target components. The system first uses the error sensitivity dimensions of various application scenarios as a guide to determine the correlation between components and error types in different frequency ranges. Then, wavelet packet transform is used to further refine the decomposition of the high-frequency bands in the fundamental signal components. Compared to traditional wavelet decomposition, wavelet packet transform can uniformly divide the high-frequency band across the entire frequency range, avoiding the omission of high-frequency error features. Through this combination of "fundamental decomposition + precise subdivision," five types of target components are finally separated from the fundamental signal components, and each type of component corresponds to a specific error carrier: low-frequency stationary components correspond to steady-state errors, high-frequency abrupt change components correspond to transient errors, cross-frequency coupling components correspond to multi-factor coupling errors, transitional fluctuation components correspond to operating condition switching errors, and random noise components correspond to random interference errors.

[0043] The system constructs an error vector based on the separated target components, providing standardized error feature inputs for subsequent AI model predictions. First, it performs error quantization calculations for each type of target component, adapting the quantization model to the error-sensitive dimensions of the corresponding scenario: for low-frequency stable components, a temperature-aging coupling model is used to calculate the steady-state error value; for high-frequency abrupt changes, a transient error value is obtained through a transient response model; for cross-frequency coupled components, a multi-factor coupling model is used to quantize the coupling error value; for transitional fluctuation components, a piecewise integration method is used to obtain the transitional error value; and for random noise components, a statistical averaging method is used to determine the random error value. Then, following a preset order of "steady-state error - transient error - coupling error - transitional error - random error," the five types of error quantization values ​​are normalized, ultimately constructing a five-dimensional error vector to ensure that each dimension of the vector accurately represents the characteristic intensity of different types of errors.

[0044] In some embodiments, the AI ​​prediction model includes a multi-scale feature extraction module, an attention module, and a multi-branch recurrent network module. The model inputs error vectors, environmental parameters, equipment status information, and historical measurement error data into the AI ​​prediction model to predict the measurement error offset within a preset time period. This includes: preprocessing the error vectors, environmental parameters, equipment status information, and historical measurement error data to obtain an input dataset; determining multi-scale error features based on the input dataset and the multi-scale feature extraction module; inputting the multi-scale error features into the attention module to obtain global attention weights; obtaining branch-level temporal feature vectors based on the multi-scale error features, global attention weights, and the multi-branch recurrent network module; wherein the network structure parameters of each branch of the multi-branch recurrent network module are determined according to the error contribution ratio of multiple target components; fusing the branch-level temporal feature vectors to obtain a fused feature vector; and determining the measurement error offset based on the fused feature vector.

[0045] In this embodiment of the invention, the preprocessing of multi-dimensional input data is a fundamental prerequisite for ensuring the accuracy of AI prediction models, and the core lies in achieving data standardization and collaborative adaptation. The system first classifies and cleans the error vector (containing five types of quantified error values), environmental parameters (temperature, humidity, electromagnetic interference intensity), equipment status information (device temperature, operating time), and historical measurement error data, using the 3σ criterion to remove outliers and filling in missing data through linear interpolation. Then, normalization is performed, mapping all data to the [0,1] interval, where the error vector is scaled according to the maximum threshold of each dimension's error, and the environmental and equipment status parameters are normalized based on industry standard ranges. Finally, time-series alignment is completed based on atomic timescales, and a multi-granularity time-series input sequence is constructed according to the fluctuation period of the target components obtained from multimodal error decomposition, forming a structurally unified and reliable input dataset.

[0046] The multi-scale feature extraction module accurately captures error-related features across different time dimensions from the input dataset through dynamically adaptable computational logic. This module is configured with dynamically selectable 1D convolutional kernel groups, including three kernels with different receptive fields (corresponding to 10ms, 50ms, and 100ms time windows). The number and size of the kernels are adaptively adjusted based on the temporal characteristics of the input data. Small receptive field kernels are used for high-frequency abrupt error-related data, while large receptive field kernels are used for low-frequency steady-state error data. Through convolution operations and pooling, the temporal information of the input dataset is transformed into multi-scale feature maps, preserving both the detailed features of error abrupt changes and capturing the long-term trend of error evolution, providing comprehensive feature support for subsequent feature enhancement and temporal modeling.

[0047] The core function of the attention module is to assign weights to multi-scale error features, thereby enhancing key error information and suppressing redundant information. Internally, the module employs a dual attention mechanism of error dimension and time. First, a multilayer perceptron learns the correlation scores between each dimension of the error vector and historical measurement errors. This, combined with the error contribution percentage obtained from multimodal error decomposition, calculates the dimension attention weights, assigning high weights to core error dimensions with a contribution percentage ≥25%. Then, a temporal attention mask is constructed based on abrupt error changes (such as current surges or operating condition switching), assigning enhancement weights to features before and after the abrupt change, while weights decay exponentially during non-abrupt periods. Finally, the two types of weights are fused through Hadamard product operations to obtain a global attention weight matrix, completing the weighted enhancement of the multi-scale feature map.

[0048] The multi-branch recurrent network module is the core unit for capturing the temporal evolution of errors, and its branch structure parameters are deeply bound to the multimodal error decomposition results. The module pre-defines five parallel LSTM branches, corresponding to the temporal modeling of five error types. Each branch includes independent input gates, forget gates, cell states, and output gates. The network structure parameters of each branch (hidden layer dimension, iteration step size, and gating coefficients) are dynamically determined based on the error contribution ratio of the corresponding target component: core error branches with a contribution ratio ≥30% have a hidden layer dimension of 256 and an iteration step size adapted to the error fluctuation cycle; secondary error branches with a contribution ratio ≤10% have a hidden layer dimension of 64 to simplify computation. Weighted multi-scale features are assigned to the corresponding branches according to error type, and the long-term and short-term temporal dependencies of various errors are captured through a gating mechanism, outputting independent branch-level temporal feature vectors.

[0049] The fusion stage of branch-level temporal feature vectors focuses on achieving synergistic complementarity among multiple types of error features. The system employs a scenario-adaptive weighted fusion strategy. First, it matches the current application scenario based on the multimodal error decomposition results and calls the pre-trained fusion weight matrix for that scenario. The fusion weights are dynamically iterated based on the prediction accuracy in historical scenarios, assigning higher weights to branch features with high prediction contributions. Simultaneously, a cross-attention mechanism is introduced to calculate the correlation coefficient between features of each branch, applying additional fusion weights to branch features with a correlation coefficient ≥ 0.6 to strengthen the synergistic information between features. Through weighted summation and dimensionality regularization, the multi-branch temporal feature vectors are fused into a one-dimensional fusion feature vector, achieving efficient aggregation of various error features.

[0050] The fused feature vectors are then processed to output the measurement error offset, completing a precise mapping from features to prediction results. The system inputs the fused feature vectors into two fully connected layers, using linear transformations and activation functions to map the features into a preliminary error offset sequence. The preset duration is adaptively selected based on the error change trend obtained from multimodal error decomposition: 1-2 minutes (1-second step) when transient errors dominate, and 3-5 minutes (5-second step) when steady-state errors dominate. Finally, a residual network is used to incorporate real-time error monitoring data to correct the preliminary results. The correction coefficient is dynamically adjusted based on the deviation between the predicted and historical measured values, ensuring that the output measurement error offset sequence accurately reflects the error evolution pattern in future periods.

[0051] In some embodiments, an initial weight matrix of the measurement error offset is obtained, and the initial weight matrix is ​​optimized with the optimization objective of minimizing error and balancing calibration adjustment costs to obtain a target weight matrix. This includes: constructing an objective function containing an error weight term and a control weight term, whereby the error weight term characterizes the weight of the measurement error and the control weight term characterizes the weight of the calibration parameter adjustment cost; determining the coefficient of the error weight term based on the measurement error offset and a preset error priority; determining the coefficient of the control weight term based on the adjustment magnitude and frequency of the calibration parameters; and iteratively optimizing the initial weight matrix based on the objective function until a preset convergence condition is met or a preset number of iterations is reached to obtain the target weight matrix.

[0052] In this embodiment of the invention, the initial weight matrix is ​​not obtained through simple random assignment, but rather through targeted initialization based on the correlation between calibration parameters and error types, providing a reasonable starting point for subsequent optimization. The system first identifies five core calibration parameters: voltage gain, current gain, power gain, power offset, and phase calibration parameters. It clarifies the sensitivity of each parameter to different error types—voltage gain, current gain, and phase calibration parameters directly compensate for steady-state and transient errors, and are therefore core compensation parameters; power gain and power offset are primarily used to assist in correcting coupling and random errors. Based on this, the weight coefficients of the core compensation parameters in the initial weight matrix are set to 0.25~0.35, and the auxiliary parameters are set to 0.15~0.25. Normalization is used to ensure that the sum of all elements in the matrix is ​​1, guaranteeing a reasonable weight allocation for each parameter while avoiding excessive initial value deviations that could affect optimization efficiency.

[0053] Constructing a dual objective function that balances error minimization and calibration cost is the core guiding principle of weight matrix optimization. The design of the error weight term and control weight term in the function directly determines the optimization effect. The error weight term is used to quantify the compensation priority of different error types. Based on the magnitude of the measurement error offset predicted by the AI ​​model, combined with the preset error priority rules (steady-state error and transient error have higher priority than coupling error and transient error, and random error has the lowest priority), the system assigns differentiated coefficients to various errors—the larger the error offset, the higher the priority, and the larger the corresponding coefficient, ensuring that high-impact errors are compensated in a focused manner. The control weight term focuses on the economics of adjusting calibration parameters. Coefficients are set according to the adjustment difficulty and hardware loss cost of different parameters. For example, adjusting voltage gain and current gain involves hardware circuit parameter reconstruction, which has high adjustment costs, and the corresponding coefficient is set to 0.5~0.7; power offset only requires fine-tuning at the software level, which has low cost, and the coefficient is set to 0.1~0.2, achieving a balance between compensation effect and cost.

[0054] The coefficients for error weighting and control weighting terms need to be dynamically adapted based on real-time operating conditions and historical data, rather than being fixed values. For the error weighting term coefficients, the system first calculates the proportion of each type of error offset to the total error. For error types with a proportion ≥30%, the corresponding coefficient is increased to 0.4~0.5. At the same time, the compensation effect of each type of error in historical measurement data is referenced. If the accuracy of a certain type of error is significantly improved after compensation, the coefficient can be appropriately increased. For the control weighting term coefficients, in addition to the basic cost assessment, the historical adjustment frequency of calibration parameters also needs to be considered. For parameters with excessively high adjustment frequencies, their control coefficients should be appropriately increased to avoid shortening the hardware lifespan due to frequent adjustments. Dynamic coefficient adjustments allow the objective function to better meet the needs of actual application scenarios.

[0055] Iterative optimization based on the objective function is a crucial step in obtaining the target weight matrix, requiring scientific optimization algorithms and convergence rules to ensure the reliability of the results. The system employs an improved particle swarm optimization algorithm, using the initial weight matrix as the initial particle position and minimizing the objective function value as the fitness function. During iteration, the inertia weight is dynamically adjusted (0.7~0.9 when fitness increases, and reduced to 0.3~0.5 when stagnation occurs), balancing global search and local optimization capabilities. The iteration termination condition is set with dual constraints: iteration stops when the change in the objective function value is ≤0.001 after 5 consecutive iterations, or when the number of iterations reaches a preset 100. After iteration, the weight matrix corresponding to the particle with the best fitness is selected as the candidate target weight matrix. This matrix is ​​then substituted into historical metrology data for verification. If, after verification, the metrology error is ≤2ppm and the calibration cost is reduced by ≥15%, it is determined as the final target weight matrix, ensuring both accurate compensation and cost-effectiveness.

[0056] In some embodiments, determining calibration parameters based on the measurement error offset and the target weight matrix includes: determining a corresponding compensation strategy based on the magnitude of the measurement error offset; and superimposing the parameter adjustment amount corresponding to the determined compensation strategy onto the calibration information to obtain the calibration parameters.

[0057] In this embodiment of the invention, calibration parameters are determined based on the measurement error offset and the target weight matrix. The primary core principle is to match a targeted compensation strategy according to the magnitude of the measurement error offset, ensuring that the calibration accurately meets the error compensation requirements while avoiding over-adjustment that increases costs and hardware losses. The system first divides the error magnitude into three levels based on the high-precision requirements of DC power metering, clarifying the compensation priority and adjustment rules corresponding to different magnitudes: error offset ≤ 2ppm is considered low error, 2~5ppm is medium error, and > 5ppm is high error. This magnitude division synchronously references the weight percentage of each error dimension in the target weight matrix. For error types with higher weight percentages, the corresponding magnitude threshold is appropriately lowered to ensure priority compensation for core errors. At low error levels, only the top three core calibration parameters (voltage gain, current gain, and phase calibration parameters) in the target weight matrix are slightly adjusted without adjusting auxiliary parameters, thus avoiding redundant operations that could affect metrological stability. At medium error levels, collaborative compensation for core parameters and auxiliary parameters (power gain and power offset) is initiated simultaneously. The adjustment range of core parameters is adapted according to their weight proportions, while auxiliary parameters are used to specifically correct coupling errors and transient errors. At high error levels, a full-dimensional deep compensation strategy is triggered, which not only adjusts all calibration parameters but also links with the previous multimodal error decomposition results to supplement the operating condition adaptability adjustment coefficients. At the same time, a pre-calibration verification mechanism is initiated to avoid incomplete adjustments in a single operation and to ensure that the error can accurately fall back to the acceptable range.

[0058] After completing the compensation strategy matching, the core is to accurately superimpose the corresponding parameter adjustment amounts onto the basic calibration information. After verification and optimization, the final usable calibration parameters are obtained, achieving precise error cancellation. The system first calculates the product of the weight coefficient of each calibration parameter and the measurement error offset based on the target weight matrix, obtaining the initial adjustment amount for each parameter. The direction of the adjustment amount is determined by the error offset direction; a positive error offset corresponds to a positive adjustment of the corresponding calibration parameter, and a negative offset corresponds to a reverse adjustment. The adjustment range strictly adheres to the limit requirements of the corresponding compensation strategy: the single adjustment range of core parameters does not exceed ±5% of the initial value, and auxiliary parameters do not exceed ±3%, preventing sudden parameter changes from causing measurement inaccuracies. Subsequently, the initial adjustment amounts of each parameter are superimposed onto the pre-stored basic calibration information to obtain the initial values ​​of the calibration parameters. The basic calibration information consists of pre-stored calibration parameters from calibration points under all operating conditions. During the superposition process, the basic information of the corresponding calibration points is matched according to real-time operating conditions to ensure that the adjustment conforms to the characteristics of the current operating conditions. Finally, the initial values ​​of the calibration parameters are double-checked. First, the corrected error values ​​are calculated by substituting them into the metrological simulation model to verify whether they meet the accuracy requirements. Second, the parameters are checked to see if they are within the hardware safety threshold range. If they exceed the threshold, they are corrected according to the nearest principle. After passing the check, they are determined as the final calibration parameters, and the adjustment records are stored synchronously to provide data support for subsequent iterative optimization of calibration parameters.

[0059] In some embodiments, determining the DC power metering result based on the original power signal and calibration parameters includes: calculating the instantaneous power based on the voltage and current signals in the original power signal; integrating the instantaneous power using an integral method to obtain the original power value; obtaining multivariate weighting coefficients, which include at least voltage weighting coefficients, current weighting coefficients, and power weighting coefficients; calculating the total gain compensation coefficient based on the multivariate weighting coefficients and the voltage gain, current gain, and power gain in the calibration parameters; and performing multi-factor compensation calculation based on the total gain compensation coefficient, the original power value, the power offset, and the phase calibration parameters in the calibration parameters to obtain the DC power metering result.

[0060] In this embodiment of the invention, the DC power metering result is determined based on the original power signal and calibration parameters. The first step is to accurately calculate the instantaneous power based on the synchronous voltage and current signals in the original power signal, which is the core foundation of power metering. The system first performs synchronous alignment verification on the original voltage and current signals obtained by adaptive sampling to ensure that the instantaneous voltage and current values ​​at each sampling moment correspond one-to-one, avoiding power calculation errors caused by timing deviations. The sampling synchronization accuracy is controlled within 10ns, perfectly matching the sampling step size and frequency adjusted in the early stage. Then, point-by-point calculation is performed according to the core instantaneous power calculation formula. The instantaneous power value at each sampling moment is equal to the product of the instantaneous voltage and current values ​​at the corresponding moment. During the calculation, a hardware multiplier is used to accelerate the processing, balancing computational efficiency and accuracy. At the same time, the calculation results are filtered in real time to remove abnormal power values ​​caused by random noise, ensuring that the instantaneous power sequence can truly reflect the real-time state of power transmission and provide accurate and continuous basic data for subsequent integration calculations.

[0061] Integrating the instantaneous power sequence using a high-precision integration method is crucial for obtaining the raw electrical energy value. The core principle is to convert the accumulated instantaneous power into total electrical energy through integration, while avoiding measurement deviations caused by improper integration methods. The system employs the trapezoidal integration method for discretized integration, balancing computational complexity and integration accuracy. Compared to the rectangular integration method, this method effectively reduces integration errors caused by signal fluctuations, keeping the integration error within 0.5 ppm, fully meeting the requirements of high-precision DC metering. The integration interval is not fixed but dynamically adapted based on the signal characteristics obtained from the previous multi-mode error decomposition. Under steady-state conditions, the integration interval is set to 100 ms, balancing metering efficiency and data stability; under dynamic fluctuation conditions, the integration interval is adjusted to 50 ms to ensure accurate capture of energy changes caused by sudden power fluctuations. DMA (Direct Memory Access) mode is enabled during integration to reduce computational latency caused by CPU intervention. After integration, the raw electrical energy value is output, and key information such as the integration interval and the number of sampling points are recorded simultaneously, providing clear data traceability for subsequent multi-factor compensation.

[0062] Accurately acquiring multivariate weighting coefficients and calculating the total gain compensation coefficient is the core link to achieving precise matching between calibration parameters and original power values, providing crucial correction basis for multi-factor compensation calculations. The multivariate weighting coefficients are fixed optimized coefficients determined based on extensive calibration experiments, including at least voltage, current, and power weighting coefficients. These three are allocated according to the principle of "core priority, synergistic complementarity," with voltage and current weighting coefficients being core coefficients, respectively adapting to the compensation weights of voltage gain and current gain. The power weighting coefficient is an auxiliary coefficient, adapting to the compensation weight of power gain, and the sum of the three is normalized to 1 to ensure a balanced and reasonable allocation of compensation weights. After determining the multivariate weighting coefficients, the system performs a weighted calculation with the voltage gain, current gain, and power gain in the calibration parameters. Specifically, the total gain compensation coefficient equals the sum of the voltage weighting coefficient multiplied by the voltage gain, the current weighting coefficient multiplied by the current gain, and the power weighting coefficient multiplied by the power gain. Sufficient decimal places are retained during the calculation to avoid truncation errors affecting compensation accuracy, ensuring that the total gain compensation coefficient comprehensively integrates the compensation effects of the three types of gain parameters.

[0063] The multi-factor compensation calculation, based on the total gain compensation coefficient, the original energy value, and the remaining calibration parameters, is the key closed loop for obtaining accurate DC energy metering results. This loop comprehensively offsets the impact of various errors on the metering results. The compensation calculation uses the original energy value as a benchmark. First, the gain of the original energy value is corrected using the total gain compensation coefficient, eliminating gain deviations in the voltage, current, and power acquisition stages. Then, power offset compensation from the calibration parameters is specifically superimposed to counteract the fixed power deviation generated during the metering process. The amount of power offset compensation is linearly related to the gain-corrected energy value. Finally, phase calibration parameters are introduced for phase deviation compensation. Although DC signals theoretically have no phase difference, line impedance and sensing delay can cause slight phase shifts during actual acquisition. Correction using phase calibration parameters further improves metering accuracy. The multi-factor compensation calculation is executed sequentially according to a preset formula. After completion, a preliminary metering result is output. Simultaneously, a standard value traceable to the national metrological benchmark is introduced for comparison and verification, ensuring that the relative error of the final DC energy metering result is ≤0.3%, meeting the high-precision metering requirements of various scenarios such as power trading settlement and energy efficiency assessment.

[0064] Figure 2 This is a schematic diagram of the structure of an adaptive self-calibrating DC power metering device provided in an embodiment of the present invention. Figure 2 As shown, the adaptive and self-calibrating DC power metering device includes: The data acquisition module 210 is used to acquire electrical energy parameters, environmental parameters, and equipment status information; The switching module 220 is used to switch the range setting and adaptively select the sampling frequency and sampling step size according to the power parameters in order to acquire the raw power signal. The calibration module 230 is used to divide the voltage and current ranges according to the acquired raw power signals to construct multiple calibration points covering the entire working range. Each calibration point pre-stores the calibration information corresponding to the current range. The calibration information includes voltage gain, current gain, power gain, power offset, and phase calibration parameters. Prediction module 240 is used to determine calibration parameters based on environmental parameters, equipment status information, calibration information and AI prediction model; The metering module 250 is used to determine the DC power metering result based on the original power signal and calibration parameters.

[0065] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.

[0066] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. An adaptive and self-calibrating DC power metering method, characterized in that, include: Collect power parameters, environmental parameters, and equipment status information; Based on the electrical energy parameters, the range setting is switched and the sampling frequency and sampling step size are adaptively adjusted to acquire the original electrical energy signal; Based on the collected raw electrical energy signals, the voltage and current ranges are divided into grades to construct multiple calibration points covering the entire operating range; each calibration point pre-stores calibration information corresponding to the current range; the calibration information includes voltage gain, current gain, power gain, power offset, and phase calibration parameters. Based on the environmental parameters, equipment status information, calibration information, and AI prediction model, the calibration parameters are determined. The DC power metering result is determined based on the original power signal and the calibration parameters.

2. The adaptive self-calibrating DC power metering method according to claim 1, characterized in that, Based on the stated electrical energy parameters, the range setting is switched and the sampling frequency and sampling step size are adaptively adjusted to acquire the raw electrical energy signal, including: A signal amplitude detection circuit is used to identify the real-time amplitude range of voltage and current in the electrical energy parameters; Based on the voltage and current amplitudes in the electrical energy parameters, the signal range is identified and the range setting is automatically matched. The characteristic information of the electrical signal is determined based on the current mutation rate in the electrical parameters. Based on the characteristics of the electrical signal, the sampling frequency and sampling step size are dynamically adjusted to acquire the original electrical signal.

3. The adaptive self-calibrating DC power metering method according to claim 1, characterized in that, Based on the collected raw electrical energy signals, the voltage and current ranges are divided into different ranges to construct multiple calibration points covering the entire operating range, including: Based on the rated current, the current range is divided into at least three segments according to the preset range of the current amplitude; Based on the rated voltage, select at least five voltage test points within the operating voltage range; The voltage test points are combined with the current segments to form multiple calibration points covering the entire operating range.

4. The adaptive self-calibrating DC power metering method according to claim 1, characterized in that, Based on the environmental parameters, equipment status information, calibration information, and AI prediction model, calibration parameters are determined, including: Multimodal error decomposition is performed on the acquired raw electrical energy signal to construct an error vector; The error vector, environmental parameters, equipment status information, and historical measurement error data are input into the AI ​​prediction model to predict the measurement error offset within a preset time period in the future. An initial weight matrix for the measurement error offset is obtained, and the target weight matrix is ​​obtained by optimizing the initial weight matrix with the optimization objective of minimizing error and balancing calibration adjustment costs. The calibration parameters are determined based on the measurement error offset and the target weight matrix.

5. The adaptive self-calibrating DC power metering method according to claim 4, characterized in that, Multimodal error decomposition is performed on the acquired raw electrical energy signal to construct an error vector, including: Determine the error sensitivity dimensions of the raw power signal under different application scenarios; The original electrical signal is decomposed into multiple layers using a wavelet basis to obtain signal fundamental components containing different frequency characteristics. The signal's fundamental components are decomposed based on the error-sensitive dimension and wavelet packet transform to obtain multiple target components; the target components include low-frequency stationary components, high-frequency abrupt change components, cross-frequency coupling components, transition state fluctuation components, and random noise components; The error vector is constructed based on multiple target components.

6. The adaptive self-calibrating DC power metering method according to claim 5, characterized in that, The AI ​​prediction model includes a multi-scale feature extraction module, an attention module, and a multi-branch recurrent network module. The error vector, environmental parameters, equipment status information, and historical measurement error data are input into the AI ​​prediction model to predict the measurement error offset within a preset time period, including: The error vector, environmental parameters, equipment status information, and historical measurement error data are preprocessed to obtain the input dataset; Based on the input dataset and the multi-scale feature extraction module, determine the multi-scale error features; The multi-scale error features are input into the attention module to obtain the global attention weights; Based on the multi-scale error features, the global attention weights, and the multi-branch recurrent network module, a branch-level temporal feature vector is obtained; wherein, the network structure parameters of each branch of the multi-branch recurrent network module are determined according to the error contribution ratio of the multiple target components; The branch-level temporal feature vectors are fused to obtain a fused feature vector; The measurement error offset is determined based on the fused feature vector.

7. The adaptive self-calibrating DC power metering method according to claim 4, characterized in that, An initial weight matrix for the measurement error offset is obtained, and the initial weight matrix is ​​optimized with the optimization objective of minimizing error and balancing calibration adjustment costs to obtain a target weight matrix, including: Construct an objective function that includes an error weight term and a control weight term. The error weight term is used to characterize the weight of the measurement error, and the control weight term is used to characterize the weight of the calibration parameter adjustment cost. The coefficient of the error weighting term is determined based on the measurement error offset and the preset error priority. The coefficient of the control weight term is determined based on the adjustment range and frequency of the calibration parameters; The initial weight matrix is ​​iteratively optimized based on the objective function until a preset convergence condition is met or a preset number of iterations is reached, thereby obtaining the target weight matrix.

8. The adaptive self-calibrating DC power metering method according to claim 4, characterized in that, The calibration parameters are determined based on the measurement error offset and the target weight matrix, including: Determine the corresponding compensation strategy based on the magnitude of the measurement error offset; The parameter adjustment amount corresponding to the determined compensation strategy is added to the calibration information to obtain the calibration parameters.

9. The adaptive self-calibrating DC power metering method according to claim 1, characterized in that, Based on the original power signal and the calibration parameters, the DC power metering result is determined, including: The instantaneous power is calculated based on the voltage and current signals in the original electrical energy signal; The instantaneous power is integrated using an integral method to obtain the original electrical energy value; Obtain multivariate weighting coefficients, wherein the multivariate weighting coefficients include at least voltage weighting coefficients, current weighting coefficients, and power weighting coefficients; The total gain compensation coefficient is calculated based on the multivariate weighting coefficients and the voltage gain, current gain, and power gain in the calibration parameters. Based on the total gain compensation coefficient, the original power value, the power offset and phase calibration parameters in the calibration parameters, a multi-factor compensation calculation is performed to obtain the DC power metering result.

10. An adaptive and self-calibrating DC power metering device, characterized in that, include: The data acquisition module is used to collect electrical energy parameters, environmental parameters, and equipment status information. The switching module is used to switch the range setting and adaptively adjust the sampling frequency and sampling step size according to the power parameters in order to acquire the original power signal. The calibration module is used to divide the voltage and current ranges according to the acquired raw power signals to construct multiple calibration points covering the entire working range. Each calibration point pre-stores the calibration information corresponding to the current range. The calibration information includes voltage gain, current gain, power gain, power offset, and phase calibration parameters. The prediction module is used to determine the calibration parameters based on the environmental parameters, equipment status information, calibration information, and AI prediction model. The metering module is used to determine the DC power metering result based on the original power signal and the calibration parameters.