State-space gaussian process based meter monthly adaptive error prediction method
Patent Information
- Application Number
- CN202611141225.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]现有数据驱动方法多侧重于点预测精度,难以有效给出具有统计意义的预测区间
1、本发明不直接采用传统高斯过程的稠密核矩阵建模方式,而是将高斯过程表示为状态空间随机动态模型,并利用卡尔曼滤波进行精确递推。该结构将高维矩阵分解计算转化为时间递推计算,在保持概率预测能力的同时,显著降低了长序列及多重启优化场景下的计算复杂度。
Smart Images

Figure CN122986353A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart energy meter state assessment and error prediction technology, specifically a monthly adaptive error prediction method for energy meters based on state-space Gaussian processes. Background Technology
[0002] As a key sensing terminal in advanced metering architecture, smart meters have long been responsible for functions such as energy metering, two-way information interaction, dynamic electricity pricing, distributed energy access management, and demand-side data collection. Compared to traditional induction-type mechanical energy meters, smart meters integrate microprocessors, memory, communication modules, and high-precision sampling circuits, making them more sensitive to external environmental stresses such as temperature, humidity, and operating time. During long-term service, their internal materials and semiconductor structures may undergo irreversible degradation such as electromigration, oxidation, and insulation deterioration, ultimately manifesting as nonlinear drift in the fundamental error and affecting metering accuracy.
[0003] Current verification methods typically involve dismantling or rotating smart meters at fixed intervals. While convenient to implement, this approach struggles to balance asset utilization efficiency with metering risk control. On one hand, meters in good condition may be prematurely retired from operation; on the other hand, meters that have experienced significant error drift during their service life may lack timely warnings within the verification interval. Therefore, there is an urgent need to establish a method that integrates environmental stress information and can predict the evolution trend of basic errors in smart meters, providing support for condition assessment, differentiated verification, and operation and maintenance decisions.
[0004] Existing data-driven methods primarily focus on point prediction accuracy, making it difficult to effectively provide statistically significant prediction intervals. When the meter error approaches a critical threshold, a single prediction value cannot support reliable risk assessment. Furthermore, while traditional Gaussian processes can output prediction variance, the computational cost of solving the full kernel matrix is high, and the fixed isovariance interval is difficult to adapt to the differences in error fluctuation across different calendar months. To address these issues, this invention proposes a basic error prediction method for smart meters based on a state-space Gaussian process and a monthly adaptive interval. Through state-space modeling, Kalman filtering, three-layer drift correction, and monthly variance contraction, it achieves a joint output of point and interval predictions. Summary of the Invention
[0005] To address the problems existing in the prior art, this invention proposes a monthly adaptive error prediction method for electricity meters based on state-space Gaussian processes.
[0006] The technical solution of the present invention is as follows: This invention proposes a monthly adaptive error prediction method for electricity meters based on state-space Gaussian processes, the specific steps of which include: S1: Collect historical operating data of smart energy meters and synchronous environmental stress data and preprocess them, then select core variables to construct training sequences; S2: Construct a state-space Gaussian process model that includes observation equations and a six-dimensional hidden state vector. The observation equations include trend components, seasonal components, and environmental stress variables. S3: Use Kalman filtering to perform forward recursion on the training sequence, calculate the prediction residual and marginal log-likelihood step by step, and then use the L-BFGS-B multi-restart maximum likelihood estimation method to solve the hyperparameters of the state-space Gaussian process model to complete the model training. S4: Using the trained state-space Gaussian process model, the baseline point prediction value and prediction covariance of the future basic error are obtained through Kalman forward propagation; the phase drift correction term, the monthly residual EWMA bias correction term and the same month linear anchor point correction term are superimposed on the baseline point prediction value to synthesize the final point prediction value. S5: The out-of-sample residual sequence is constructed using a forward-chain rolling strategy. The residuals are aggregated by calendar month. The monthly standard deviation is obtained by empirical Bayesian shrinkage estimation. The monthly adaptive prediction interval is generated by centering on the final point prediction value and combining it with the monthly standard deviation of the corresponding month. The prediction results are output for smart meter status assessment and operation and maintenance decision-making.
[0007] In a preferred embodiment, the historical operating data includes at least the basic error of the smart meter, and the synchronous environmental stress data includes at least temperature and humidity.
[0008] In a preferred embodiment, the selection process for the core variables is as follows: Based on historical operating data and synchronous environmental stress data, an environmental stress correlation heatmap was drawn to observe the degree of correlation between various environmental variables and basic errors. Combining the aging mechanism of electricity meter materials under high humidity and heat environment, operating time, temperature and humidity were selected as core variables.
[0009] In a preferred embodiment, the preprocessing steps in collecting historical operating data of smart meters and synchronous environmental stress data and performing preprocessing include: The collected historical operational data and synchronous environmental stress data are processed for missing values, outlier removal, monthly sampling, and standardization.
[0010] In a preferred embodiment, the six-dimensional hidden state vector includes trend level, trend rate of change, first harmonic cosine state, first harmonic sine state, second harmonic cosine state, and second harmonic sine state.
[0011] In a preferred embodiment, the trend component uses the Matérn 3 / 2 kernel function as the kernel function, the seasonal component is constructed using a Fourier harmonic recursive structure, and the environmental stress variable is obtained based on synchronous environmental stress data.
[0012] As a preferred embodiment, the monthly residual EWMA bias correction term is calculated as follows: Extract the out-of-sample prediction residuals for the same calendar month during the training phase, and assign them exponential decay weights according to their time proximity for calculation:
[0013] In the formula, This is the monthly residual EWMA bias correction term. For the i-th residual sample, This represents the total number of samples for that month. As the attenuation factor, It is an exponentially decaying weight.
[0014] In a preferred embodiment, the step of obtaining the monthly standard deviation through empirical Bayesian shrinkage estimation specifically involves: Calculate the monthly residual mean square and the global residual mean square by calendar month; Then, the monthly local residual mean squares are contracted to the global residual mean squares using the contraction formula, resulting in a robust monthly variance estimate, and the monthly standard deviation is further calculated. When the monthly sample size is insufficient, the global standard deviation is used as the monthly standard deviation.
[0015] As a preferred embodiment, the forward chain rolling strategy is specifically as follows: In the training sequence, samples are selected sequentially according to time. For each time step, the model is trained using only the historical samples before that time step and a one-step prediction is performed. The one-step prediction residual is calculated, thus forming the out-of-sample residual sequence.
[0016] In a preferred embodiment, the rule for generating the monthly adaptive prediction interval is as follows: If the month to which the forecast point belongs has a valid monthly standard deviation, then the monthly adaptive forecast interval is generated according to the following range:
[0017] In the formula, This means that in month k, the basic error of the smart energy meter has a 95% probability of falling within this range; k represents the month. This represents the predicted final point value for month k; The monthly standard deviation of the month to which the forecast point belongs; If the month to which the prediction point belongs lacks available monthly standard deviations, then the global standard deviation is used to generate the monthly adaptive prediction interval.
[0018] The present invention has the following beneficial effects: 1. This invention does not directly employ the dense kernel matrix modeling method of traditional Gaussian processes. Instead, it represents the Gaussian process as a state-space stochastic dynamic model and uses Kalman filtering for accurate recursion. This structure transforms high-dimensional matrix decomposition calculations into time-recursive calculations, significantly reducing computational complexity in long sequences and multi-restart optimization scenarios while maintaining probabilistic prediction capabilities.
[0019] 2. This invention decomposes the fundamental error of a smart energy meter into three components: long-term trend, seasonal harmonics, and environmental covariate response. The long-term trend describes the slow aging and nonlinear degradation of components, the seasonal harmonics characterize annual and semi-annual periodic oscillations, and the temperature and humidity covariates reflect the direct impact of external environmental stress on the error. This decomposition method balances physical interpretability with statistical modeling capabilities.
[0020] 3. To address the issues of seasonal phase reversal, monthly system deviation, and missing local trends in the same month that may occur during the long-term operation of smart energy meters, this invention proposes a three-layer post-processing mechanism. Through phase drift correction, monthly residual EWMA bias correction, and same-month linear anchor point correction, the main prediction results of the state-space Gaussian process model are compensated step by step, which significantly improves the stability of the model under seasonal phase drift scenarios.
[0021] 4. This invention proposes a monthly adaptive interval construction method based on forward-chain out-of-sample residuals and empirical Bayesian variance contraction. This method no longer uses a single global standard deviation to generate fixed-width intervals, but adaptively adjusts the interval width according to the calendar month to which the predicted point belongs. This not only characterizes the heteroscedasticity features of hot and humid months or seasonal transition months, but also avoids interval estimation instability in small sample months by contracting towards the global scale.
[0022] 5. This invention can simultaneously output the point prediction value of the basic error and the monthly adaptive prediction range, providing a decision-making basis for smart meter status assessment, verification cycle optimization, error over-limit early warning, and differentiated operation and maintenance. Compared with methods that only output a single prediction value, this invention can provide prediction uncertainty information, making it more suitable for risk assessment when the metering error approaches the threshold. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of the steps of the present invention; Figure 2 The thermogram matrix diagram showing the correlation between basic error and environmental stress; Figure 3 This is a schematic diagram of the basic error training sets for companies A and B. Figure 4 This is a schematic diagram of the specific steps of the present invention after disassembly; Figure 5 This is a schematic diagram of the basic error prediction results for Company A. Figure 6 The result of the basic error prediction for Company B is shown in the figure. Figure 7 A comparison chart of basic error predictions for Company A's smart energy meters; Figure 8 This is a comparison chart of the basic error predictions for Company B's smart meters. 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 embodiments of the present invention, and not all embodiments. 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] It should be understood that the step numbers used in the text are for ease of description only and are not intended to limit the order in which the steps are performed.
[0026] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0027] The terms “comprising” and “including” indicate the presence of the described feature, whole, step, operation, element and / or component, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.
[0028] The term “and / or” refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes these combinations.
[0029] Example 1: See Figure 1 A monthly adaptive error prediction method for electricity meters based on state-space Gaussian processes, the specific steps of which include: S1: Collect historical operating data of smart energy meters and synchronous environmental stress data and preprocess them, then select core variables to construct training sequences; S2: Construct a state-space Gaussian process model that includes observation equations and a six-dimensional hidden state vector. The observation equations include trend components, seasonal components, and environmental stress variables. S3: Use Kalman filtering to perform forward recursion on the training sequence, calculate the prediction residual and marginal log-likelihood step by step, and then use the L-BFGS-B multi-restart maximum likelihood estimation method to solve the hyperparameters of the state-space Gaussian process model to complete the model training. S4: Using the trained state-space Gaussian process model, the baseline point prediction value and prediction covariance of the future basic error are obtained through Kalman forward propagation; the phase drift correction term, the monthly residual EWMA bias correction term and the same month linear anchor point correction term are superimposed on the baseline point prediction value to synthesize the final point prediction value. S5: The out-of-sample residual sequence is constructed using a forward-chain rolling strategy. The residuals are aggregated by calendar month. The monthly standard deviation is obtained by empirical Bayesian shrinkage estimation. The monthly adaptive prediction interval is generated by centering on the final point prediction value and combining it with the monthly standard deviation of the corresponding month. The prediction results are output for smart meter status assessment and operation and maintenance decision-making.
[0030] In this embodiment, a detailed breakdown of each step is provided: Step 1: Data Collection and Correlation Analysis Collect historical operating data and synchronous environmental stress data from smart meters. The historical operating data includes at least the basic error of the smart meter, and the environmental stress data includes at least temperature and humidity. After collection, plot as shown in the attached diagram. Figure 2 The environmental stress correlation heatmap shown is used to observe the degree of correlation between various environmental variables and basic errors.
[0031] Step 2: Data Preprocessing and Variable Selection The original data underwent missing value processing, outlier removal, monthly sampling, and standardization to form a training sequence arranged in chronological order. Based on... Figure 2 Based on the correlation results and combined with the aging mechanism of electricity meter materials under high humidity and heat environment, operating time, temperature and humidity were selected as core modeling variables.
[0032] Step 3, State-space Gaussian process modeling The observation equations for the state-space Gaussian process are constructed as follows:
[0033] In the formula, for t The measured error value of the electricity meter at any given time; The hidden state vector; This is the observation projection vector, used to map the hidden state to the observation space; Represents the environmental weight coefficient vector; This is a vector of environmental stress variables, including temperature and humidity. For observation noise that follows a zero-mean Gaussian distribution; The observation noise variance is used to describe the random uncertainty in the observation process.
[0034] The observation equations include trend components, seasonal components, and environmental stress variables. The trend components employ the Matérn 3 / 2 kernel function to describe long-term nonlinear degradation, specifically:
[0035] In the formula, For the trend term kernel function, These are any two time input points; It indicates the magnitude of the trend and reflects the uncertainty of the magnitude of long-term trend changes; It represents the trend length scale and is used to control the smoothness of the trend function as it changes over time.
[0036] The spectral density corresponding to the Matérn 3 / 2 nucleus is:
[0037] In the formula, , It is a constant. The spectral density is about The rational function can be equivalently transformed into a continuous-time stochastic differential equation, and further written as an accurate two-dimensional state-space model. The spectral density denominator of Matérn 3 / 2 is the square of a second-order polynomial, corresponding to a two-dimensional state system, where the trend state vector is defined as... , Indicates the trend status; This represents its instantaneous rate of change. The stochastic differential equation for the equivalent transformation is:
[0038] In the formula, Let be the transition matrix of the two-dimensional state equation; It is noise. The specific form is as follows:
[0039] The seasonal components are constructed using a Fourier harmonic recursive structure. First, the seasonal angular frequencies are determined using the following formula:
[0040] In the formula, It follows a seasonal cycle.
[0041] The first and second Fourier harmonic states are then recursively derived using the following recursive formulas:
[0042]
[0043] In the formula, This is a two-dimensional state vector, representing the cosine and sine components respectively. t The instantaneous amplitude at a given moment; Let be the process noise vector of the j-th Fourier harmonic at time t; To control the intensity of random disturbances that cause the seasonal state to drift slowly over time; It is a second-order identity matrix.
[0044] Finally, the initial covariance of the seasonal term is set using the following formula:
[0045] In the formula, The initial seasonal state variance is used to characterize the uncertainty of the model regarding the initial seasonal state.
[0046] The environmental stress variables are obtained based on synchronous environmental stress data.
[0047] Step 4: Hidden State Organization and State Recursion A six-dimensional hidden state vector is constructed, including trend level, trend rate of change, first harmonic cosine state, first harmonic sine state, second harmonic cosine state, and second harmonic sine state, expressed by the following formula:
[0048] In the formula, Indicates the trend status. The instantaneous rate of change representing the trend state. The first harmonic cosine and sine components are respectively in t Moment amplitude, The second harmonic cosine and sine components are respectively in t Moment amplitude.
[0049] It is important to note that at each monthly point in time, the state is recursively calculated using the state recursion formula, as follows:
[0050] In the formula, The state transition matrix is obtained by combining the trend block state matrix and two sets of seasonal rotation matrices in a block diagonal form. For process noise, Let be the process noise covariance matrix.
[0051] According to the definition of a state vector, the observed values From trend level state Together with the cosine components of each seasonal harmonic at the current moment, it constitutes the current harmonic. The rate of change in the long-term degradation trend cannot be directly observed; the sinusoidal components of each harmonic act as orthogonal components to maintain rotation. Therefore... It is not directly entered into the observation equation. The corresponding observation projection vector is taken as: H = [1, 0, 1, 0, 1, 0] The exogenous response of temperature and humidity to the fundamental error is calculated using the following formula:
[0052] In the formula, These are the regression coefficients for temperature and humidity, respectively. The temperature input value at time t. This is the humidity value.
[0053] Step 5, Hyperparameter Estimation The trend length scale, trend amplitude, seasonal amplitude, seasonal drift intensity, observation noise variance, and temperature and humidity regression coefficients are used as hyperparameters to be estimated in the state-space Gaussian process model. Kalman filtering is used to perform forward recursion on the training sequences, progressively calculating the prediction residuals and marginal log-likelihoods. The L-BFGS-B multi-restart maximum likelihood estimation method is then employed to solve for these hyperparameters.
[0054] Step 6, Baseline Input for Future Forecasts Using the trained state-space Gaussian process model, Kalman forward propagation is performed on future months using the state recursion formula to obtain the baseline point prediction value of the future basic error and its prediction covariance.
[0055] Step 7: Overlay three layers of post-processing correction onto the baseline point prediction results, and synthesize the final point prediction values: First, the phase drift correction term is calculated to compensate for the cross-year phase misalignment of seasonal peak and trough positions caused by annual variations. The specific calculation formula is as follows:
[0056] In the formula, To adjust the weights, The cross-cycle distance relative to the nearest in-phase sample at a future time. The slope is the linear fit of the historical in-phase sequence.
[0057] Secondly, the one-step prediction residuals during the training phase are calculated, and the EWMA bias correction term for the monthly residuals is calculated by combining the residuals of the same calendar month; the specific formula for calculating the one-step prediction residuals is as follows:
[0058] In the formula, These are the actual observed values. The system observations at the current time are predicted based on the state estimate at the previous time step.
[0059] The specific formula for calculating the EWMA bias correction term of the monthly residuals is as follows:
[0060] In the formula, This is the monthly residual EWMA bias correction term. For the i-th residual sample, This represents the total number of samples for that month. As the attenuation factor, It is an exponentially decaying weight.
[0061] Finally, the linear anchor point correction term for the same month is calculated to enhance the model's ability to fit the local year-end trend of the same month in history. The specific calculation formula is as follows:
[0062] In the formula, This indicates the point prediction after applying the first two layers of correction; For anchor point fusion weights; The anchor point prediction value is obtained by linearly fitting the historical data for the same month.
[0063] Finally, the three post-processing corrections are combined to obtain the final point prediction value, calculated using the following formula:
[0064] In the formula, This represents the predicted value of a state-space Gaussian process. These represent the correction amounts for the three post-processing layers, respectively.
[0065] Step 8: Construct out-of-sample residual sequences Within the training set, a forward-chained time-series rolling strategy is used to construct out-of-sample residuals: for each time step, the model is trained using only historical samples prior to that time step, the one-step prediction residual is calculated first, and then a forward-chained out-of-sample residual sequence is formed according to the following formula:
[0066] In the formula, For the out-of-sample prediction residual of the i-th sample, Let be the actual basic error value of the smart energy meter at time i. This is the one-step prediction mean of the basic error at time i after training the model based on all historical samples before time i.
[0067] This provides input for subsequent monthly interval scaling estimation.
[0068] Step 9, Empirical Bayesian contraction estimation of monthly variance Aggregate the out-of-sample residuals obtained in step 8 by calendar month: For each month, calculate the monthly mean squared residuals using the following formula:
[0069] In the formula, Indicates that it belongs to the month m The set of time steps This represents the number of residual samples for that month.
[0070] For all training residuals, calculate the global residual mean square using the following formula:
[0071] In the formula, N This represents the total number of samples for the overall predicted residuals.
[0072] Then, the monthly local residual scale is shrunk to the global residual scale using empirical Bayesian shrinkage, and the shrinkage formula is as follows:
[0073] In the formula, The prior equivalent sample size is used to control the trade-off between local monthly information and the overall error scale.
[0074] After obtaining a robust monthly variance estimate, the monthly standard deviation is further calculated using the following formula:
[0075] In the formula, For monthly standard deviation, This represents the monthly variance.
[0076] If the sample size for a certain month is insufficient, the calculated global standard deviation is used as the degradation measure (i.e., the monthly standard deviation), and the calculation formula is as follows:
[0077] In the formula, The global standard deviation is... This represents the global variance.
[0078] Step 10: Monthly Adaptive Forecast Interval Generation Based on the calendar month to which the prediction point belongs, select the monthly standard deviation obtained in step 9, and generate a monthly adaptive prediction interval centered on the final point prediction value obtained in step 7. The specific calculation formula is as follows:
[0079] In the formula, in the formula, This means that in month k, the basic error of the smart energy meter has a 95% probability of falling within this range; k represents the month. This represents the predicted final point value for month k; The monthly standard deviation of the month to which the forecast point belongs; If the month to which the prediction point belongs lacks available monthly standard deviations, a degenerate interval based on the global standard deviation is generated. The specific calculation formula is as follows:
[0080] Step 11, Results Output and Engineering Applications This function outputs the predicted basic error points, prediction range, and evaluation results for smart meters in the coming months. In engineering applications, the output prediction range can be compared with the metering allowable error threshold for smart meter status evaluation, calibration scheduling, and maintenance early warning.
[0081] Based on the above steps, the complete process flow is as follows: Figure 4 As shown.
[0082] Example 2: Based on the specific steps in Example 1, the operational data of two smart energy meters deployed in a typical high-humidity and heat environment test base are used as an example for demonstration: Collect historical operating data and synchronous environmental stress data of smart meters. The historical operating data includes at least the basic error of the smart meter, and the environmental stress data includes at least temperature and humidity.
[0083] The data includes variables such as the basic error (Be) of smart energy meters, temperature (Tem), humidity (RH), atmospheric pressure (Pre), wind speed (WS), and solar irradiance (Lux). The training samples cover December 2017 to July 2020, with monthly averages used to form continuous monthly samples. Correlation analysis shows that the basic error has the highest correlation with temperature, with a correlation coefficient of -0.4940. Although humidity has a lower linear correlation coefficient, it continuously participates in the material aging and insulation degradation process under high humidity and heat conditions, and therefore is still retained as a core environmental stress variable. The correlation heatmap between basic error and environmental stress is shown below. Figure 2 As shown, the time series distribution of the training sets of companies A and B is as follows: Figure 3 As shown.
[0084] Company A's data is generally within the negative error range, with a relatively stable fluctuation pattern, mainly exhibiting periodic fluctuations around a low error level. Company B's data shows a more pronounced structural change, with its seasonal characteristic gradually shifting from "higher in summer and lower in winter" in the early stages to "lower in summer and higher in winter" in the later stages, indicating a significant seasonal phase drift problem in the series. The basic error prediction results for Companies A and B are as follows: Figure 5 , Figure 6 As shown.
[0085] The method of this invention was compared with Model 1, Model 2, and Model 3, and the evaluation indicators were the root mean square error (RMSE) and the coefficient of determination (R²). The evaluation indicators for the comparative experiments are shown in Table 1. The prediction curves of Company A and Company B are compared as follows: Figure 7 and Figure 8 As shown in the figure. The results show that, on the data from Company A, the RMSE of the method of this invention is 0.00700 and the R² is 0.97333; on the data from Company B, the RMSE is 0.00581 and the R² is 0.86578, both of which are better than the comparison model. Especially in the scenario where Company B has obvious seasonal phase drift, the method of this invention can still maintain a high fitting ability.
[0086] Table 1 Evaluation Indicators for Comparative Experiments
[0087] Further ablation experiments were conducted: M0 represented the complete method, and M1 involved the SS... GP trunk replaced with standard RBF GP and M2 disable temperature and humidity covariates, M3 disable three-layer drift post-processing, and M4 disable monthly adaptive intervals. The ablation experiment evaluation indices for Company A and Company B are shown in Tables 2 and 3, respectively. For Company A data, the RMSE of the complete method M0 was 0.0070, R² was 0.9733, CRPS was 0.0058, and IS95 was 0.0406; for Company B data, the RMSE of the complete method M0 was 0.0058, R² was 0.8658, CRPS was 0.0053, and IS95 was 0.0631. The ablation results demonstrate that SS... The GP backbone, drift post-processing, temperature and humidity covariates, and monthly adaptive intervals together constitute a hierarchical adaptive prediction system suitable for non-stationary environments.
[0088] Table 2A Company Ablation Experiment Evaluation Indicators
[0089] Table 3B Company Ablation Experiment Evaluation Indicators
[0090] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A monthly adaptive error prediction method for electricity meters based on state-space Gaussian processes, characterized in that, The specific steps include: S1: Collect historical operating data of smart energy meters and synchronous environmental stress data and preprocess them, then select core variables to construct training sequences; S2: Construct a state-space Gaussian process model that includes observation equations and a six-dimensional hidden state vector. The observation equations include trend components, seasonal components, and environmental stress variables. S3: Use Kalman filtering to perform forward recursion on the training sequence, calculate the prediction residual and marginal log-likelihood step by step, and then use the L-BFGS-B multi-restart maximum likelihood estimation method to solve the hyperparameters of the state-space Gaussian process model to complete the model training. S4: Using the trained state-space Gaussian process model, the baseline point prediction value and prediction covariance of the future basic error are obtained through Kalman forward propagation; the phase drift correction term, the monthly residual EWMA bias correction term and the same month linear anchor point correction term are superimposed on the baseline point prediction value to synthesize the final point prediction value. S5: The out-of-sample residual sequence is constructed using a forward-chain rolling strategy. The residuals are aggregated by calendar month. The monthly standard deviation is obtained by empirical Bayesian shrinkage estimation. The monthly adaptive prediction interval is generated by centering on the final point prediction value and combining it with the monthly standard deviation of the corresponding month. The prediction results are output for smart meter status assessment and operation and maintenance decision-making.
2. The method for predicting monthly adaptive errors of electricity meters based on state-space Gaussian processes according to claim 1, characterized in that, The historical operating data includes at least the basic error of the smart energy meter, and the synchronous environmental stress data includes at least temperature and humidity.
3. The method for predicting monthly adaptive errors of electricity meters based on state-space Gaussian processes according to claim 2, characterized in that, The selection process for the core variables is as follows: Based on historical operating data and synchronous environmental stress data, an environmental stress correlation heatmap was drawn to observe the degree of correlation between various environmental variables and basic errors. Combining the aging mechanism of electricity meter materials under high humidity and heat environment, operating time, temperature and humidity were selected as core variables.
4. The method for predicting monthly adaptive errors of electricity meters based on state-space Gaussian processes according to claim 1, characterized in that, The preprocessing steps in collecting historical operating data of smart meters and synchronous environmental stress data and performing preprocessing include: The collected historical operational data and synchronous environmental stress data are processed for missing values, outlier removal, monthly sampling, and standardization.
5. The method for predicting monthly adaptive errors of electricity meters based on state-space Gaussian processes according to claim 1, characterized in that, The six-dimensional hidden state vector includes trend level, trend rate of change, first harmonic cosine state, first harmonic sine state, second harmonic cosine state, and second harmonic sine state.
6. The method for predicting monthly adaptive errors of electricity meters based on state-space Gaussian processes according to claim 1, characterized in that, The trend component uses the Matérn 3 / 2 kernel function as the kernel function, the seasonal component is constructed using a Fourier harmonic recursive structure, and the environmental stress variable is obtained based on synchronous environmental stress data.
7. The method for predicting monthly adaptive errors of electricity meters based on state-space Gaussian processes according to claim 1, characterized in that, The calculation method for the monthly residual EWMA bias correction term is as follows: Extract the out-of-sample prediction residuals for the same calendar month during the training phase, and assign them exponential decay weights according to their time proximity for calculation: In the formula, This is the monthly residual EWMA bias correction term. For the i-th residual sample, This represents the total number of samples for that month. As the attenuation factor, It is an exponentially decaying weight.
8. The method for predicting monthly adaptive errors of electricity meters based on state-space Gaussian processes according to claim 1, characterized in that, The specific steps for obtaining the monthly standard deviation through empirical Bayesian shrinkage estimation are as follows: Calculate the monthly residual mean square and the global residual mean square by calendar month; Then, the monthly local residual mean squares are contracted to the global residual mean squares using the contraction formula, resulting in a robust monthly variance estimate, and the monthly standard deviation is further calculated. When the monthly sample size is insufficient, the global standard deviation is used as the monthly standard deviation.
9. The method for predicting monthly adaptive errors of electricity meters based on state-space Gaussian processes according to claim 1, characterized in that, The forward chained rolling strategy is specifically as follows: In the training sequence, samples are selected sequentially according to time. For each time step, the model is trained using only the historical samples before that time step and a one-step prediction is performed. The one-step prediction residual is calculated, thus forming the out-of-sample residual sequence.
10. The method for predicting monthly adaptive errors of electricity meters based on state-space Gaussian processes according to claim 1, characterized in that, The rule for generating the monthly adaptive prediction interval is as follows: If the month to which the forecast point belongs has a valid monthly standard deviation, then the monthly adaptive forecast interval is generated according to the following range: In the formula, This means that in month k, the basic error of the smart energy meter has a 95% probability of falling within this range; k represents the month. This represents the predicted final point value for month k; The monthly standard deviation of the month to which the forecast point belongs; If the month to which the prediction point belongs lacks available monthly standard deviations, then the global standard deviation is used to generate the monthly adaptive prediction interval.