A temperature compensation method and system for a meter box diverter
Patent Information
- Application Number
- CN202611171620.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-08-04
AI Technical Summary
[0005]本发明提供一种计量箱分流器的温度补偿方法及系统,以解决现有温度补偿方案中散热热阻参数固化、无法跟踪散热条件渐变劣化从而导致补偿精度随运行年限衰退的技术问题
[0007]其效果在于:在每个采样周期基于电流值计算焦耳热功率并驱动热模型递推自热温升值,将环境温度与自热温升值叠加得到分流器估计温度,由此计算电阻修正系数完成温度补偿。稳态辨识窗口有效时以温升除以功率直接求解散热热阻绝对值,窗口无效时以分流器电阻反推实测温度获取独立观测量,通过递推残差的滑动均值对散热热阻参数施加增量修正。该双路径更新结构覆盖稳态与非稳态全部运行工况,使散热热阻参数在无人工干预的条件下自主适应实际散热环境的变化。
Smart Images

Figure CN122690190B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power metering technology, specifically relating to a temperature compensation method and system for a metering box shunt. Background Technology
[0002] As the core metering instrument for power grid metering, settlement, and line loss analysis, the long-term accuracy of electricity meters directly affects the fairness of electricity trade settlement and the economic efficiency of distribution network operation. The shunt is a key component in the current sampling link of electronic electricity meters. The resistance value of the manganese-copper alloy shunt exhibits temperature drift characteristics. When temperature changes occur inside the metering box due to sunlight, load self-heating, or seasonal alternation, the actual operating resistance of the shunt deviates from the nominal value, leading to systematic errors in the current measurement results. Accurately compensating for the metering errors caused by shunt temperature drift is a crucial requirement for maintaining the long-term stable operation of electricity meters over a wide temperature range.
[0003] Currently, patent application CN122017309A discloses a method for compensating metering errors in electricity meters based on rapid response to non-uniform temperature fields. This method distinguishes between two operating conditions—current increase and current decrease—based on the changing trend of the shunt load current. Corresponding resistance correction models are constructed for each condition to correct the shunt resistance value, and metering error compensation is completed based on the corrected resistance value. For the current increase condition, a two-dimensional polynomial fitting model with both temperature and current dimensions is used. For the current decrease condition, a time dimension is introduced to construct a two-layer structure of a baseline model and a time correction model to cover the thermal hysteresis effect after current reduction.
[0004] However, in the above scheme, the thermal resistance, as a critical path parameter for heat transfer from the shunt to the surrounding environment, is implicitly fixed in the calibration dataset during the modeling stage. During actual operation, the thermal resistance of the metering box will slowly and irreversibly deteriorate due to factors such as dust accumulation and blockage of the heat dissipation holes, aging of the box seal, and changes in ventilation conditions in the installation environment. The fixed calibration model cannot perceive these gradual changes in heat dissipation conditions. As the years of operation increase, the deviation between the temperature information input to the model and the actual operating temperature of the shunt gradually accumulates, leading to a decline in temperature compensation accuracy and ultimately causing the metering error to exceed the design accuracy level. Summary of the Invention
[0005] This invention provides a temperature compensation method and system for a metering box shunt to solve the technical problem that existing temperature compensation schemes have fixed heat dissipation thermal resistance parameters and cannot track the gradual deterioration of heat dissipation conditions, resulting in a decline in compensation accuracy over the years of operation.
[0006] In a first aspect, the present invention provides a temperature compensation method for a metering box shunt, comprising the following steps: S101 collects the current value, ambient temperature and voltage value at both ends in each sampling period, and calculates the Joule thermal power based on the current value; S102, taking Joule thermal power and current heat dissipation thermal resistance parameters as input, obtains the self-heating temperature rise value by recursively calculating it cycle by cycle based on the thermal model, and adds the ambient temperature to the self-heating temperature rise value to obtain the estimated temperature of the shunt. S103 determines whether the current is in the steady-state identification window based on the current value and the self-heating temperature rise value. The steady-state identification window is the period when the current is stable, the temperature rise converges, and the power is effective at the same time. S104: When in the steady-state identification window, the self-heating temperature rise is divided by the Joule heat power to obtain the identification thermal resistance value, and the current heat dissipation thermal resistance parameter is updated with the identification thermal resistance value; when not in the steady-state identification window, the measured temperature of the shunt is estimated based on the voltage and current values at both ends, the difference between the estimated temperature and the measured temperature of the shunt is calculated to obtain the recursive residual, and the current heat dissipation thermal resistance parameter is incrementally corrected based on the moving average of the recursive residual. S105 calculates the resistance correction factor based on the estimated temperature of the shunt and performs temperature compensation on the current metering results.
[0007] Its effect is as follows: In each sampling period, the Joule heat power is calculated based on the current value, driving the thermal model to recursively derive the self-heating temperature rise. The ambient temperature is superimposed with the self-heating temperature rise to obtain the estimated shunt temperature, from which the resistance correction coefficient is calculated to complete temperature compensation. When the steady-state identification window is valid, the absolute value of the heat dissipation thermal resistance is directly solved by dividing the temperature rise by the power. When the window is invalid, the measured temperature is back-derived from the shunt resistance to obtain independent observations. The sliding mean of the recursive residual is used to apply incremental correction to the heat dissipation thermal resistance parameter. This dual-path update structure covers all steady-state and non-steady-state operating conditions, enabling the heat dissipation thermal resistance parameter to autonomously adapt to changes in the actual heat dissipation environment without manual intervention.
[0008] Furthermore, the current stability is determined as follows: within a sliding window ending at the current time, the coefficient of variation of all current values is calculated, and the current is determined to be stable when the coefficient of variation is lower than the preset stability threshold.
[0009] Its effect is that it uses the sliding window coefficient of variation as the criterion for judging current stability, and uses the relative fluctuation of the current value instead of the absolute fluctuation amplitude for evaluation. This allows the judgment criteria to automatically adapt to different load levels without setting thresholds for each current level. It can accurately distinguish between steady-state operation and load switching transition period within a wide current range.
[0010] Furthermore, the method for determining temperature rise convergence is as follows: calculate the difference between the self-heating temperature rise value of the current cycle and the self-heating temperature rise value of the previous cycle, divide it by the sampling cycle duration to obtain the temperature rise change rate, and determine that the temperature rise has converged when the absolute value of the temperature rise change rate is lower than the preset convergence threshold; the method for determining power validity is as follows: determine that the power is valid when the Joule thermal power is greater than the preset power threshold.
[0011] Furthermore, once the three conditions of current stability, temperature rise convergence, and power effectiveness are simultaneously met, and the condition is maintained in a continuously satisfied state for a preset number of cycles, it is determined to enter the steady-state identification window; when any of the three conditions is no longer met, it exits the steady-state identification window and the continuous counter is reset to zero.
[0012] Its effect is that it requires three conditions to be maintained continuously for a preset number of cycles before entering the steady-state identification window. If any condition is not met, it will exit and the count will be reset to zero. This mechanism filters out transient false satisfactions caused by sensor noise from the window, and avoids triggering the identification action before the thermal process has truly reached equilibrium, which would cause the identification result to deviate from the true value.
[0013] Furthermore, within the validity period of the steady-state identification window, the identification thermal resistance value is calculated and accumulated once in each sampling period. When the accumulated number reaches the preset average number, the arithmetic mean of all accumulated values is taken as the final identification result to update the current heat dissipation thermal resistance parameter.
[0014] Furthermore, the prerequisites for incremental correction are: the Joule heat power is greater than the preset power threshold, and the self-heating temperature rise is greater than the preset temperature rise threshold; if either prerequisite is not met, the current heat dissipation thermal resistance parameter remains unchanged.
[0015] Furthermore, the current heat dissipation thermal resistance parameter is incrementally corrected based on the moving average of the recursive residuals, including: calculating the arithmetic mean of the recursive residuals over the most recent multiple sampling periods to obtain the moving average of the recursive residuals; the correction increment is equal to a negative preset step size coefficient multiplied by the moving average of the recursive residuals, multiplied by the current heat dissipation thermal resistance parameter, divided by the self-heating temperature rise value, and the correction increment is added to the current heat dissipation thermal resistance parameter.
[0016] Its effect is as follows: the correction increment formula is normalized by dividing the current heat dissipation thermal resistance parameter by the current self-heating temperature rise value, so that the actual impact of each correction on the recursive temperature under different load conditions is of the same magnitude, avoiding oscillation caused by excessive correction under large load or slow convergence due to insufficient correction under small load. The preset step size coefficient provides an adjustable trade-off between response speed and stability.
[0017] Furthermore, the measured temperature of the shunt is calculated based on the voltage and current values at both ends, including: dividing the voltage value at both ends by the current value to obtain the real-time resistance value, dividing the difference between the real-time resistance value and the nominal resistance value by the product of the nominal resistance value and the temperature coefficient, and adding the reference temperature to obtain the measured temperature of the shunt.
[0018] Furthermore, after updating the current heat dissipation thermal resistance parameter by identifying the thermal resistance value, the current heat dissipation thermal resistance parameter is constrained between a preset lower bound and a preset upper bound, and the historical data of the recursive residual is cleared.
[0019] Its effects are as follows: it constrains the heat dissipation thermal resistance parameter between a preset lower bound and a preset upper bound, preventing the parameter from drifting to an physically unreasonable range due to continuous sensor bias or abnormal operating conditions; it identifies and clears the historical data of the recursive residual after the update, eliminating the interference of the residual corresponding to the old parameter on the correction direction under the new parameter, so that the residual correction can be recalculated based on accurate deviation information after the two update modes are switched.
[0020] Secondly, the present invention provides a temperature compensation system for a metering box shunt, including a memory and a processor. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the temperature compensation method for the metering box shunt described above is implemented.
[0021] The beneficial effects are as follows: This invention uses Joule heat power to drive a first-order lumped-parameter thermal model to recursively calculate the self-heating temperature rise of the shunt on a cycle-by-cycle basis. Furthermore, it employs a dual-mode collaborative mechanism of steady-state identification window and residual correction to adaptively update the heat dissipation thermal resistance parameters online, ensuring that the estimated temperature of the shunt continuously approximates the actual temperature throughout the entire lifespan of the equipment. The heat dissipation thermal resistance parameters can track gradual changes in heat dissipation conditions caused by factors such as dust accumulation and seal aging. The temperature compensation accuracy does not depend on the long-term stability of the factory calibration value, and the current measurement error remains within the design accuracy level even under the dual influence of drastic fluctuations in ambient temperature and deterioration of heat dissipation conditions. Attached Figure Description
[0022] Figure 1 This is a flowchart of the temperature compensation method for the metering box shunt.
[0023] Figure 2 This is a flowchart of the steady-state identification window determination method according to an embodiment of the present invention. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] This embodiment uses an outdoor-installed three-phase power metering box as the application object. The box integrates a manganese-copper alloy shunt, a temperature sensor, and a metering chip. It operates in an ambient temperature range of -40 degrees Celsius to 70 degrees Celsius for a long time, serving the current metering and temperature compensation of residential electricity consumption.
[0026] An embodiment of the temperature compensation method for the metering box shunt provided by the present invention: like Figure 1 As shown, the temperature compensation method for the metering box shunt includes the following steps: S101 periodically collects electrical temperature parameters and calculates Joule thermal power based on current.
[0027] In each sampling period, the current value, ambient temperature, and voltage values at both ends are collected, and the Joule thermal power is calculated based on the current value.
[0028] The metering chip synchronously collects the current value of the shunt, the ambient temperature reading of the temperature sensor, and the voltage value across the shunt at a fixed sampling period of 1 second. The typical thermal time constant of the shunt is in the range of 200 to 600 seconds, and the 1-second sampling period is about one-five-hundredth to one-two-hundredth of the thermal time constant, which meets the requirement of discrete recursion to cover the continuity of the thermal process.
[0029] After acquiring the ambient temperature, a reasonableness check is performed on the reading. The preset effective range is -30 degrees Celsius to 85 degrees Celsius, with the lower limit corresponding to extreme low temperatures in winter in frigid regions and the upper limit corresponding to extreme high temperatures inside the sealed enclosure under summer sunlight conditions. When the ambient temperature exceeds this preset effective range, the current thermal resistance parameters and self-heating temperature rise values are frozen and not updated; the last valid ambient temperature is used for subsequent calculations. This check intercepts reading jumps caused by sensor malfunctions or wiring abnormalities at the data source, preventing abnormal values from propagating to downstream stages.
[0030] The Joule thermal power is calculated based on Joule's law. The standard formula of Joule's law is used to calculate the current value to obtain the Joule thermal power for the current cycle. The Joule thermal power equals the square of the current value multiplied by the nominal resistance of the shunt, which is the factory-calibrated reference resistance value at 20 degrees Celsius. The drift of the shunt resistance with temperature is on the order of a few tenths of a percent. The relative error introduced by substituting the nominal value for the real-time resistance value in the power calculation does not exceed five ten-thousandths, and its impact on subsequent thermal model recursion is negligible.
[0031] The voltage values at both ends are temporarily stored in the data cache in this step for use in subsequent calculations of the measured temperature of the shunt.
[0032] The system synchronously collects raw data from three sources—current, ambient temperature, and voltage—at a fixed 1-second interval, establishing a complete and time-aligned input data source for thermal model recursion and thermal resistance identification. A protective barrier is implemented at the data entry point to check the reasonableness of the ambient temperature. In the event of sensor failure, a freeze strategy is employed to maintain the continuity of the compensation output, preventing the output of erroneous compensation results.
[0033] S102, input thermal power and thermal resistance, thermal model recursively solves for the estimated temperature of the shunt.
[0034] Using Joule heat power and current heat dissipation thermal resistance parameters as inputs, the self-heating temperature rise value is obtained by recursively calculating it cycle by cycle based on the thermal model. The ambient temperature is added to the self-heating temperature rise value to obtain the estimated temperature of the shunt.
[0035] The Joule heat power and the current thermal resistance parameter serve as two inputs to the first-order lumped-parameter thermal model, driving the periodic recursion of the self-heating temperature rise. The first-order lumped-parameter thermal model treats the shunt as a lumped heat node with a single heat capacity and a single heat dissipation path. The temperature rise change of the shunt in each sampling period is determined by the net heat flow divided by the heat capacity. The net heat flow is the Joule heat generation power minus the heat dissipation power, and the heat dissipation power, according to Newton's law of cooling, is equal to the current self-heating temperature rise divided by the current thermal resistance parameter.
[0036] The specific implementation of the recursive process is as follows. Let the current sampling period be the k-th period, and the self-heating temperature rise obtained from the recursion in the previous period be known. The self-heating temperature rise in this period is equal to the self-heating temperature rise in the previous period, plus the sampling period duration multiplied by the net heat flux, and then divided by the heat capacity. The net heat flux is equal to the Joule heat power of the current period minus the self-heating temperature rise in the previous period divided by the current heat dissipation thermal resistance parameter. The above relationship is expressed using the standard discrete recursive equation of a first-order lumped-parameter thermal model:
[0037] In the formula, This represents the autothermal temperature rise in the kth period, in degrees Celsius. This is the self-heating temperature rise value from the previous cycle; The sampling period is 1 second. The heat capacity of the shunt is expressed in joules per degree Celsius. The joule heat power for the kth period is expressed in watts. The current thermal resistance parameter is expressed in degrees Celsius per watt. (The text within square brackets is incomplete and likely refers to a separate parameter.) This contributes to Joule heat production. The term represents the contribution of Newtonian cooling to heat dissipation, and the difference between the two is the net heat flow that drives the temperature to continue changing. The proportionality coefficient that converts net heat flux into temperature increment has the physical meaning of the temperature rise caused by unit power within one sampling period.
[0038] heat capacity The thermal time constant is determined through factory calibration. The calibration method involves applying a known constant current to the shunt in a constant-temperature laboratory and recording the time it takes for the self-heating temperature to rise from zero to 63.2% of its steady-state value. The heat capacity is equal to the thermal time constant divided by the factory-calibrated initial thermal resistance. The heat capacity of the manganese-copper alloy shunt is mainly determined by the mass and specific heat capacity of the copper busbar, remaining constant throughout its lifespan. The factory calibration value can be used long-term without requiring online updates.
[0039] Setting the initial recursive value: After power-on, the shunt has not yet been powered on and is at the same temperature as the ambient temperature, so the self-heating temperature rise is 0, and the initial recursive value is set to 0. If a power failure and restart occur during operation, the self-heating temperature rise value last written to the non-volatile memory before the power failure will be used as the initial recursive value after the restart to avoid the transition period deviation caused by starting from 0.
[0040] After completing the recursive calculation of the self-heating temperature rise, the ambient temperature is added to the self-heating temperature rise to obtain the estimated temperature of the splitter. The ambient temperature reflects the basic thermal environment of the air inside the chamber on the splitter, while the self-heating temperature rise reflects the temperature increment of the splitter due to its own electrical heating. The sum of the two is the model estimate of the current temperature of the splitter.
[0041] The cycle-by-cycle recursion enables the self-heating temperature rise value to track the dynamic changes in the thermal state of the shunt in real time, rather than just reflecting the steady-state result. In the recursive formula, the current heat dissipation thermal resistance parameter is used as an updatable variable rather than a fixed constant in the calculation, which gives the model the ability to receive subsequent identification results and automatically correct the recursive trajectory, laying the structural foundation for closed-loop feedback.
[0042] S103 determines the steady-state identification window based on current and temperature rise, requiring three conditions to be met simultaneously.
[0043] The current value and the self-heating temperature rise value are used to determine whether the current is in the steady state identification window. The steady state identification window is the period when the current is stable, the temperature rise converges, and the power is effective.
[0044] The aforementioned current value and the aforementioned self-heating temperature rise value constitute the two input sources for determining the steady-state identification window. From this, three independent criteria are derived: current stability, temperature rise convergence, and power effectiveness. Only when all three criteria are simultaneously satisfied and continuously maintained for a preset number of cycles can it be determined that the current state is in the steady-state identification window.
[0045] Before calculating the three criteria, a start-up protection determination is performed first. Before the cumulative sampling period reaches the preset start-up protection period after power-on, the determination result of the steady-state identification window is forcibly invalidated, and no subsequent condition calculations are performed. The preset start-up protection period is 60, corresponding to a 60-second data accumulation period. This protection is based on the fact that current stability determination relies on statistical calculations within a sliding window. When the window is not yet full, the sample size is insufficient, and the coefficient of variation is not statistically representative. Forcibly invalidating the window avoids misjudgments during the start-up phase. Once the cumulative period reaches 60, the start-up protection is released, and the calculation of the three criteria is performed normally in each subsequent period.
[0046] The method for determining current stability is as follows: Within a sliding window consisting of the most recent 60 sampling periods ending at the current time, the coefficient of variation (COP) of all current values is calculated. The COP is calculated by dividing the standard deviation of the current values within the window by the arithmetic mean, using the statistical standard COP formula. First, the arithmetic mean of the 60 current values within the window is calculated. Then, the sum of the squares of the differences between each current value and the mean is divided by the number of samples, and the square root is taken to obtain the standard deviation. The standard deviation divided by the arithmetic mean is the COP. When the COP is lower than a preset stability threshold, the current stability condition is considered met; otherwise, it is considered not met.
[0047] The preset stability threshold is set to 0.05. This value was determined as follows: Current data from a typical constant power load operating in the metering box were statistically analyzed. The measured steady-state coefficient of variation ranged from 0.02 to 0.03. The preset stability threshold was set to the midpoint of the range between 1.5 and 2 times the upper limit of the measured steady-state value, i.e., 0.03 multiplied by 1.67 is approximately equal to 0.05. This value correctly identifies the constant power load operation period as a period of current stability while excluding load switching transition periods and inrush current periods.
[0048] The sliding window length is set to 60 sampling periods, corresponding to a 1-minute observation period. The typical shortest duration of constant power loads in residential electricity consumption is about 1 to 2 minutes. Setting the window length to 1 minute ensures that the data within the window are within the same steady-state segment, and avoids mixing data from two different load segments in the calculation.
[0049] The advantage of using the coefficient of variation as a criterion is that it eliminates the influence of the absolute value of the current on stability assessment. A fluctuation of 0.25 amps when flowing through 5 amps and a fluctuation of 2.5 amps when flowing through 50 amps have the same coefficient of variation of 0.05, and are considered to have the same level of stability, without the need to set different absolute fluctuation thresholds for different current levels.
[0050] The method for determining temperature rise convergence is as follows: subtract the self-heating temperature rise value of the previous cycle from the current cycle's self-heating temperature rise value, and then divide by the sampling cycle duration to obtain the temperature rise rate. When the absolute value of the temperature rise rate is lower than the preset convergence threshold, the temperature rise convergence condition is deemed met; otherwise, it is deemed not met.
[0051] The preset convergence threshold is set at 0.005 degrees Celsius per second, a value derived from the target measurement accuracy: the shunt temperature coefficient is approximately 0.00004 degrees Celsius per degree Celsius, and a 0.1% accuracy class corresponds to a tolerable temperature rise deviation of approximately 25 degrees Celsius. The control objective is to ensure that the cumulative temperature rise drift does not exceed 0.3 degrees Celsius within the identification window duration. With a minimum window duration of 60 seconds, the rate threshold is 0.3 divided by 60, which equals 0.005 degrees Celsius per second. This threshold is also higher than the single-cycle change rate corresponding to the quantization resolution of the temperature sensor, thus avoiding misjudgments caused by quantization noise.
[0052] The physical meaning of the rate of temperature change approaching 0 is that the net heat flux in the recursive formula approaches 0, the Joule heat generation power and the heat dissipation power are close to equilibrium, and the thermal state of the shunt tends to be stable. This equilibrium condition is the physical premise for accurately identifying the heat dissipation thermal resistance using the steady-state thermal balance equation.
[0053] The power validity is determined as follows: if the Joule thermal power is greater than the preset power threshold, the power validity condition is met; otherwise, it is not met. The preset power threshold is 0.05 watts. The value is based on the following: the standard deviation of the temperature sensor noise is approximately 0.02 degrees Celsius. Assuming a target identification signal-to-noise ratio of 20, the minimum identifiable self-heating temperature rise is equal to 20 multiplied by 0.02, which equals 0.4 degrees Celsius. The corresponding minimum power is 0.4 divided by the typical thermal resistance of 20 degrees Celsius per watt, which equals 0.02 watts. This is rounded up and a margin is left, setting it to 0.05 watts. When the power is below this threshold, the self-heating temperature rise signal is submerged in sensor noise, and calculating the thermal resistance by dividing the temperature rise by the power will introduce unacceptable random errors.
[0054] Once the three conditions of current stability, temperature rise convergence, and power effectiveness are simultaneously met, this state must be maintained continuously for a preset number of cycles before entering the steady-state identification window. The preset number of cycles is 10, corresponding to a 10-second continuous confirmation period. A continuous counter is maintained; the counter increments by 1 each cycle when all three conditions are met. When the counter reaches 10, the result of the steady-state identification window being valid is output. Thereafter, the window remains valid as long as the three conditions are continuously met. If any of the three conditions are no longer met, the window immediately exits and the continuous counter is reset to zero.
[0055] The preset duration of 10 cycles is based on the following: sensor noise may cause the temperature rise rate to transiently meet the condition near the threshold. False fulfillment caused by this type of noise typically lasts for 1 to 3 cycles. The requirement is that 10 consecutive cycles can reduce the probability of false triggering caused by noise to a negligible level. Assuming a single-cycle false fulfillment probability of 0.3, the probability of false fulfillment for 10 consecutive cycles is 0.3 to the power of 10, approximately equal to 0.000006, which meets the engineering reliability requirements.
[0056] The overall judgment process is illustrated using a typical operating condition: A stable current of 15 amps flows through a shunt in a metering box, and this load has been running continuously for more than 3 minutes. The arithmetic mean of the 60 current samples within the sliding window is 15.02 amps, the standard deviation is 0.18 amps, and the coefficient of variation is 0.18 divided by 15.02 equals 0.012, which is lower than the preset stability threshold of 0.05, thus the current stability condition is met. The recursively obtained self-heating temperature rise value has tended to stabilize, and the temperature rise difference between the current cycle and the previous cycle is 0.003 degrees Celsius. Dividing this by 1 second gives a change rate of 0.003 degrees Celsius per second, which is lower than the preset convergence threshold of 0.005, thus the temperature rise convergence condition is met. The Joule thermal power equals 15 squared multiplied by the nominal resistance value of 0.0005 ohms, which equals 0.1125 watts, which is greater than the preset power threshold of 0.05 watts, thus the power effectiveness condition is met. Once all three conditions are met, the continuous counter begins to accumulate, and after 10 consecutive cycles, it enters the steady-state identification window.
[0057] The determination process of the above steady-state identification window is as follows: Figure 2 As shown, each sampling cycle first checks whether the cumulative number of sampling cycles has reached the preset number of protection activation cycles. If not, the determination result is forcibly invalidated and the cycle ends. If the preset number of sampling cycles has been reached, the system sequentially checks three conditions: current stability, temperature rise convergence, and power effectiveness. If any one of these conditions is not met, the system exits the steady-state identification window and resets the continuous counter to zero. If all three conditions are met simultaneously, the continuous counter increments by 1. When the continuous counter reaches the preset number of continuous cycles, the system enters the steady-state identification window; otherwise, the window remains inactive and waits for the next cycle to continue accumulating.
[0058] The triple-factor joint judgment simultaneously constrains the identification conditions from the current excitation end, thermal response end, and signal quality end. Failure to meet any dimension will prevent the triggering of the identification action, strictly limiting the identification timing to a physical condition window where the heat dissipation thermal resistance can be accurately solved. The continuity requirement filters out transient false satisfactions caused by noise, making the window judgment robust against interference. The start-up protection eliminates invalid judgments during periods of insufficient data samples from the time dimension.
[0059] S104: In steady state, the thermal resistance is identified and updated; in unsteady state, the thermal resistance is corrected based on the mean residual.
[0060] When the system is in a steady-state identification window, the self-heating temperature rise is divided by the Joule heat power to obtain the identification thermal resistance value, which is then used to update the current heat dissipation thermal resistance parameter. When the system is not in a steady-state identification window, the measured temperature of the shunt is estimated based on the voltage and current values at both ends. The difference between the estimated temperature and the measured temperature of the shunt is calculated to obtain the recursive residual. The sliding mean of the recursive residual is used to incrementally correct the current heat dissipation thermal resistance parameter.
[0061] The determination result of the steady-state identification window divides the update logic of the current heat dissipation thermal resistance parameter into two paths: when the window is valid, the accurate identification mode is executed, and when the window is invalid, the residual correction mode is executed.
[0062] The effective steady-state identification window signifies that the Joule's heat generation power and heat dissipation power have reached equilibrium. According to Newton's law of cooling, the steady-state equilibrium condition dictates that the heat generation power is strictly equal to the self-heating temperature rise divided by the heat dissipation thermal resistance. Rearranging this equation, we obtain that the identification thermal resistance value equals the current self-heating temperature rise divided by the current Joule heat power. Using Newton's law of cooling in steady-state form:
[0063] In the formula, To identify thermal resistance values, the unit is degrees Celsius per watt; The self-heating temperature rise value for the current cycle within the steady-state identification window, in degrees Celsius; The current period's Joule thermal power is expressed in watts. Thermal steady state is a necessary and sufficient condition for this equation to hold. The triple joint judgment of the steady-state identification window ensures that this condition is met. The identification result does not contain model approximation errors and is only affected by sensor measurement noise.
[0064] Within the validity period of the steady-state identification window, the identified thermal resistance value is calculated and accumulated for each sampling period. Once the accumulated value reaches a preset average, the arithmetic mean of all accumulated values is taken as the final identification result, and this final identification result is used to update the current heat dissipation thermal resistance parameter. The preset average is 5. The arithmetic mean of 5 sampling points has a suppression capability of 5 / 5 of the noise from a single measurement of Gaussian white noise. This is approximately 0.45 times the original noise, which can control the random fluctuation of the identification value to within 1%.
[0065] If the steady-state identification window exits before accumulating the preset average number of values, it will be handled according to the following rules: if two or more thermal resistance values have been accumulated, the arithmetic mean of the existing values will be used as the final identification result for this update; if only one value has been accumulated, the sample size is insufficient to effectively suppress noise, so no update will be performed and the current heat dissipation thermal resistance parameter will remain unchanged.
[0066] After updating the thermal resistance value, the current thermal resistance parameter is constrained between a preset lower bound and a preset upper bound. The preset lower bound is 5 degrees Celsius per watt, corresponding to the optimal heat dissipation condition with the cabinet door open and forced ventilation; the preset upper bound is 50 degrees Celsius per watt, corresponding to the worst heat dissipation condition with the cabinet completely closed and the ventilation holes severely blocked. The upper and lower bounds are determined by applying a known constant power to the metering chamber under extreme heat dissipation conditions until it reaches thermal steady state, and then dividing the steady-state temperature rise by the measured power. When the updated value exceeds the range defined by the preset lower bound and the preset upper bound, the corresponding boundary value is used.
[0067] After the update, clear the historical data of the recursive residuals. The old residual data was calculated based on the thermal resistance parameters before the update and reflects the model bias under the old parameters. The thermal resistance parameters have changed, and there is no corresponding relationship between the old residual values and the new parameters. If they are retained, the residual correction mode will make unnecessary corrections based on outdated information.
[0068] When the steady-state identification window is invalid, the thermal process has not yet reached equilibrium or the current is fluctuating, making it impossible to directly solve for the absolute value of the heat dissipation thermal resistance using the steady-state equilibrium equation. The residual correction mode utilizes the deterministic correspondence between the shunt resistance and temperature to obtain a temperature observation independent of the thermal model. This observation is compared with the estimated shunt temperature, and the direction of deviation is used to determine whether the current heat dissipation thermal resistance parameter is too large or too small. Subsequently, an incremental correction is applied in the correct direction.
[0069] Before proceeding with residual correction calculations, two prerequisites must be met: the Joule heat power must be greater than a preset power threshold of 0.05 watts, and the self-heating temperature rise must be greater than a preset temperature rise threshold. The preset temperature rise threshold is set to 0.1 degrees Celsius, which is five times the standard deviation of the temperature sensor noise (0.02 degrees Celsius), ensuring that the self-heating temperature rise signal is significantly higher than the noise floor. If either prerequisite is not met, the current thermal resistance parameter remains unchanged, and subsequent correction calculations are not performed. If the power is too low and the self-heating temperature rise approaches zero, and the temperature rise threshold is not met, the division operation in the subsequent formula with the self-heating temperature rise as the denominator will result in a numerical amplification effect due to the small denominator, rendering the correction increment meaningless.
[0070] After both preconditions are met, the measured temperature of the shunt is first calculated. The real-time resistance value is obtained by dividing the voltage across the terminals by the current value, based on Ohm's law. The difference between the real-time resistance value and the nominal resistance value is then divided by the product of the nominal resistance value and the temperature coefficient, and this is added to the reference temperature to obtain the measured temperature of the shunt.
[0071] In the formula, The measured temperature of the shunt is in degrees Celsius. The reference temperature is 20 degrees Celsius. The real-time resistance value is equal to the voltage across the terminals divided by the current value, and the unit is ohms. The nominal resistance value is the factory-calibrated reference resistance value at 20 degrees Celsius, and the unit is ohms. The temperature coefficient of the shunt is typically approximately 0.00004 per degree Celsius for manganese-copper alloy. There is a deterministic monotonic relationship between shunt resistance and temperature; precise measurement of the resistance uniquely determines the temperature. Voltage and current sampling in the metering chip is performed by a high-precision analog-to-digital converter with a sampling resolution better than 0.01%, sufficient to distinguish the change in resistance corresponding to a temperature change on the order of 2.5 degrees Celsius.
[0072] After obtaining the measured temperature of the shunt, the recursive residual is calculated. The estimated shunt temperature minus the measured shunt temperature yields the recursive residual for the current period. The sign of the recursive residual carries specific physical information: when the thermal resistance parameter is greater than the actual value, the heat dissipation term in the model is underestimated, leading to an overestimation of the recursive temperature rise, and the estimated shunt temperature is higher than the measured shunt temperature, resulting in a positive recursive residual; when the thermal resistance parameter is less than the actual value, the recursive temperature rise is underestimation, resulting in a negative recursive residual. This correspondence between the sign of the residual and the direction of the deviation in the thermal resistance parameter provides a directional basis for incremental correction.
[0073] The arithmetic mean of the recursive residuals over the most recent 30 sampling periods is calculated to obtain the moving average of the recursive residuals, which is then calculated using the standard sliding window arithmetic mean method. If the accumulated recursive residual data is less than 30 periods, the correction calculation is not performed until the data is fully accumulated. The sliding window length of 30 periods is based on the fact that the overall noise standard deviation of temperature measurements is approximately 0.02 degrees Celsius. The mean of 30 samples reduces the noise standard deviation to 0.02 divided by the square root of 30, which is approximately 0.0037 degrees Celsius, effectively separating random noise from systematic bias.
[0074] The correction increment is calculated based on the moving average of the recursive residuals, using the following formula:
[0075] In the formula, The increment is adjusted to degrees Celsius per watt; This is the preset step size coefficient; The moving average of the recursive residuals is expressed in degrees Celsius. These are the current thermal resistance parameters, expressed in degrees Celsius per watt. This represents the current self-heating temperature rise, expressed in degrees Celsius.
[0076] The formula is constructed based on the following considerations: the negative sign makes the correction direction opposite to the sign of the residual: when the residual is positive, the thermal resistance is too high, so the correction increment is negative to reduce it; when the residual is negative, the thermal resistance is too low, so the correction increment is positive to increase it. Multiply by The function is to normalize the correction range according to the sensitivity of the current operating condition. The steady-state value of the self-heating temperature rise is related to the heat dissipation thermal resistance and power. The temperature rise is equal to the power multiplied by the thermal resistance, and the power is equal to the temperature rise divided by the thermal resistance. Under different load conditions, the degree of influence of the same heat dissipation thermal resistance change on the temperature rise is different. Dividing by the current temperature rise value makes the actual temperature influence of each correction on the recursive result comparable, avoiding the problem of overly aggressive correction under high load conditions or insufficient correction under low load conditions.
[0077] With a preset step size of 0.1, the heat dissipation conditions of the metering box were changed in a step manner in the laboratory to simulate the dust accumulation process. The convergence behavior under different step size was observed: when the step size was 0.05, the corrected convergence took about 200 cycles with no overshoot; when the step size was 0.2, the convergence took about 80 cycles but with slight oscillations; and when the step size was 0.1, the convergence took about 120 cycles with no overshoot, which is a compromise between response speed and stability.
[0078] The correction increment is superimposed onto the current thermal resistance parameter to complete the update. After the update, it is still constrained between the preset lower limit of 5 degrees Celsius per watt and the preset upper limit of 50 degrees Celsius per watt, and the value selection logic is the same as the aforementioned precise identification mode. When the boundary is reached, the corresponding boundary value is taken to prevent the thermal resistance parameter from drifting to physically unreasonable values due to the small bias that continues to exist in the residual.
[0079] The precise identification mode directly solves for the absolute value of thermal resistance under steady-state thermal conditions. The accuracy of the identification result is limited only by sensor noise and does not include model approximation errors. The residual correction mode uses the shunt resistor to back-calculate the temperature to obtain measured observations independent of the thermal model, and can continuously track the drift trend of thermal resistance even during current fluctuations or temperature rise transitions. Both modes cover all steady-state and non-steady-state operating conditions. With upper and lower bound constraints and a residual buffer clearing mechanism, the thermal resistance parameters always closely approximate the actual heat dissipation state throughout the entire life cycle of the equipment.
[0080] S105 uses the temperature estimated by the shunt to calculate the correction factor and complete the temperature compensation for current metering.
[0081] The resistance correction factor is calculated based on the estimated temperature of the shunt, and temperature compensation is applied to the current measurement results.
[0082] The estimated temperature of the shunt already includes the self-heating temperature rise contribution derived from the adaptively updated thermal resistance parameters. Substituting this temperature into the shunt's linear resistance temperature characteristic equation yields the actual resistance value of the shunt at the current temperature. The standard formula for resistance temperature characteristic is used:
[0083] In the formula, The resistance of the shunt at the current estimated temperature, in ohms; This is the nominal resistance value, which is the reference resistance value set at 20 degrees Celsius by the manufacturer. The temperature coefficient of the shunt; The estimated temperature for the shunt is equal to the ambient temperature plus the self-heating temperature rise. The reference temperature is 20 degrees Celsius.
[0084] The resistance correction factor is equal to the nominal resistance value divided by the resistance value at the current temperature, that is:
[0085] In the formula, This is a dimensionless resistance correction factor. When the estimated temperature of the shunt is higher than the reference temperature, the actual resistance is greater than the nominal value, and the correction factor is less than 1; when the estimated temperature of the shunt is lower than the reference temperature, the actual resistance is less than the nominal value, and the correction factor is greater than 1.
[0086] The metering chip converts the collected voltage value across the terminals into a current measurement result based on the nominal resistance value. This result does not consider the effect of temperature on resistance. Multiplying the current measurement result by a resistance correction factor yields the temperature-compensated current value. As the shunt temperature increases, the resistance increases, resulting in a larger voltage drop when the same current flows through it. The current value calculated by the metering chip based on the nominal resistance is higher than the actual value. Dividing by a correction factor less than 1 restores it to the true current. The logic reverses when the temperature decreases.
[0087] The compensated current value is output in real time with each sampling cycle, accumulating and metering the power supply. Each update to the current thermal resistance parameter uses the new parameter value to calculate the self-heating temperature rise in all subsequent cycles. This makes the shunt's estimated temperature closer to the actual temperature, and simultaneously improves the accuracy of the resistance correction coefficient. The entire data flow forms a complete closed loop: current and voltage acquisition provides the raw input; Joule thermal power drives the thermal model to recursively calculate the self-heating temperature rise; steady-state identification window determines and triggers precise identification or residual correction to complete the adaptive update of the thermal resistance parameter; the updated parameter is fed back to the thermal model to make the recursion more accurate; and finally, the shunt estimates the temperature, calculates the resistance correction coefficient, and outputs the compensation result.
[0088] Compared to the traditional temperature compensation method that uses a fixed calibrated value for thermal resistance, the adaptively updated thermal resistance parameters ensure that the estimated temperature of the shunt circuit remains close to the actual temperature, thereby reducing the calculation error of the resistance correction coefficient. Throughout the entire lifespan of the metering box, as heat dissipation conditions slowly deteriorate due to factors such as dust accumulation and seal aging, the temperature compensation accuracy does not decline over time, and the current metering error is continuously constrained within the design accuracy level.
[0089] An embodiment of the temperature compensation system for the metering box shunt provided by the present invention: The temperature compensation system of the metering box shunt includes a processor and a memory. The memory stores computer program instructions, which are executed by the processor to implement the temperature compensation method of the metering box shunt described above.
[0090] The temperature compensation system of the metering box shunt also includes other components well known to those skilled in the art, such as communication interfaces. Their settings and functions are known in the art and will not be described in detail here.
[0091] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A temperature compensation method for a metering box shunt, characterized in that, Includes the following steps: S101 collects the current value, ambient temperature and voltage value at both ends in each sampling period, and calculates the Joule thermal power based on the current value; S102, using Joule heat power and current heat dissipation thermal resistance parameters as inputs, recursively obtains the self-heating temperature rise value based on the thermal model cycle by cycle, and adds the ambient temperature to the self-heating temperature rise value to obtain the estimated temperature of the shunt; the thermal model is a first-order lumped parameter thermal model, and the self-heating temperature rise value in the k-th cycle is... satisfy: In the formula, This is the self-heating temperature rise value from the previous cycle; This refers to the sampling period duration; The shunt heat capacity is expressed in joules per degree Celsius. Let be the Joule thermal power of the k-th period; These are the current thermal resistance parameters for heat dissipation; S103 determines whether the current is within a steady-state identification window based on the current value and the self-heating temperature rise value. The steady-state identification window is a period in which the three conditions of current stability, temperature rise convergence, and power effectiveness are simultaneously met. The current stability is determined by calculating the coefficient of variation of all current values within a sliding window ending at the current time. When the coefficient of variation is lower than a preset stability threshold, the current is considered stable. The coefficient of variation is the standard deviation of the current values within the window divided by the arithmetic mean. The temperature rise convergence is determined by calculating the difference between the self-heating temperature rise value of the current period and the self-heating temperature rise value of the previous period, dividing by the sampling period duration to obtain the temperature rise change rate. When the absolute value of the temperature rise change rate is lower than a preset convergence threshold, the temperature rise is considered converged. The power effectiveness is determined by determining that the power is effective when the Joule thermal power is greater than a preset power threshold. S104 When in the steady-state identification window, the self-heating temperature rise value is divided by the Joule heat power to obtain the identification thermal resistance value, and the current heat dissipation thermal resistance parameter is updated with the identification thermal resistance value. When not in a steady-state identification window, the measured temperature of the shunt is estimated based on the voltage and current values at both ends. The difference between the estimated temperature and the measured temperature of the shunt is calculated to obtain the recursive residual. The sliding mean of the recursive residual is used to incrementally correct the current heat dissipation thermal resistance parameter. S105 calculates the resistance correction factor based on the estimated temperature of the shunt and performs temperature compensation on the current metering results.
2. The temperature compensation method for the metering box shunt according to claim 1, characterized in that, Once the three conditions of current stability, temperature rise convergence, and power effectiveness are simultaneously met, and the condition is maintained in a state that meets the conditions for a preset number of cycles, the system is determined to enter the steady-state identification window. When any one of the three conditions is no longer met, the system exits the steady-state identification window and the continuous counter is reset to zero.
3. The temperature compensation method for the metering box shunt according to claim 1, characterized in that, Within the validity period of the steady-state identification window, the identification thermal resistance value is calculated and accumulated once in each sampling period. When the accumulated number reaches the preset average number, the arithmetic mean of all accumulated values is taken as the final identification result to update the current heat dissipation thermal resistance parameter.
4. The temperature compensation method for the metering box shunt according to claim 1, characterized in that, The prerequisites for incremental correction are: the Joule heat power is greater than the preset power threshold and the self-heating temperature rise is greater than the preset temperature rise threshold; if either prerequisite is not met, the current heat dissipation thermal resistance parameter remains unchanged.
5. The temperature compensation method for the metering box shunt according to claim 1, characterized in that, The current thermal resistance parameter is incrementally corrected based on the moving average of the recursive residuals. This includes: calculating the arithmetic mean of the recursive residuals over the most recent sampling periods to obtain the moving average of the recursive residuals; the correction increment is equal to a negative preset step size coefficient multiplied by the moving average of the recursive residuals, multiplied by the current thermal resistance parameter, divided by the self-heating temperature rise value, and then the correction increment is added to the current thermal resistance parameter.
6. The temperature compensation method for the metering box shunt according to claim 1, characterized in that, The measured temperature of the shunt is calculated based on the voltage and current values at both ends, including: dividing the voltage value at both ends by the current value to obtain the real-time resistance value; dividing the difference between the real-time resistance value and the nominal resistance value by the product of the nominal resistance value and the temperature coefficient, and adding the reference temperature to obtain the measured temperature of the shunt.
7. The temperature compensation method for the metering box shunt according to claim 1, characterized in that, After updating the current heat dissipation thermal resistance parameter by identifying the thermal resistance value, the current heat dissipation thermal resistance parameter is constrained between a preset lower bound and a preset upper bound, and the historical data of the recursive residual is cleared.
8. A temperature compensation system for a metering box shunt, characterized in that, It includes a memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the temperature compensation method of the metering box shunt as described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Electric energy meter metering error compensation method based on non-uniform temperature field quick response
CN122017309A
Temperature compensation method for multifunctional electric energy meter
CN101498741A
Current measurement compensation method for shunt
CN119643946A