LSTM-based power meter aging state prediction method and system
By constructing a matching vector of aging driving force indicators and fine-tuning the LSTM model, the problem of mismatch between laboratory data and field data was solved, and accurate prediction of the aging status of electricity meters was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUXI HENGTONG ELECTRIC CO LTD
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-03
AI Technical Summary
Existing LSTM models have large prediction errors in predicting the aging status of electricity meters due to the mismatch between laboratory data and field data.
By constructing aging driving force indicators of simulated vectors and field vectors, matching vectors are found and fine-tuned. The matching vectors are then used to train the prediction model, reducing the difference between laboratory data and field data.
This improved the accuracy of predicting the aging status of electricity meters and reduced the prediction error of the model in practical applications.
Smart Images

Figure CN122087464B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity meter technology. More specifically, this invention relates to a method and system for predicting the aging status of electricity meters based on LSTM. Background Technology
[0002] Over long-term operation, electricity meters gradually age and their metering accuracy decreases due to the combined effects of environmental temperature, humidity, vibration, and electric fields. Predicting the aging state of electricity meters allows for precise, on-demand maintenance. Compared to periodically replacing meters, this approach reduces maintenance costs and improves resource utilization while ensuring grid security.
[0003] To predict the aging status of electricity meters, the traditional approach is to directly train an LSTM (Long Short-Term Memory) model using historical aging data from the field. However, due to the sparse nature of historical aging data (usually validated quarterly or semi-annually), the sample size is severely insufficient. To address this, existing technologies have constructed aging simulation laboratories to obtain a large amount of aging simulation data as training samples through accelerated aging experiments. However, the laboratory environment (with controllable and singular characteristics) and the field environment (with uncontrollable and complex characteristics) cannot be perfectly aligned, and the aging simulation data and the field data cannot be absolutely equivalent. This mismatch results in a large error in the prediction of the trained LSTM model in practical applications. Summary of the Invention
[0004] To address the problem that the LSTM models trained using existing technologies have large errors when predicting the aging state of electricity meters, this invention provides solutions in the following aspects.
[0005] The first aspect of this application proposes an LSTM-based method for predicting the aging state of electricity meters. The method includes: equally dividing an acquired laboratory data sequence into multiple simulated subsequences, constructing a simulated vector for each simulated subsequence, and training a pre-set LSTM model based on all simulated vectors to obtain a prediction model. The laboratory data sequence is pre-processed accelerated aging data of electricity meters. The second aspect involves equally dividing an acquired field data sequence into multiple field subsequences, constructing a field vector for each field subsequence, and the field data sequence is pre-processed historical aging data of electricity meters. The third aspect involves calculating the aging driving force index of each field vector and the aging driving force index of each simulated vector, taking any field vector as the target vector, calculating the absolute difference between the aging driving force index of the target vector and the aging driving force index of each simulated vector, using the simulated vector corresponding to the minimum absolute difference as the matching vector of the target vector, constructing a mapping vector of the target vector by combining the aging driving force index of the target vector, the aging driving force index of the matching vector, and the matching vector, iterating through each field vector to obtain the mapping vector, fine-tuning the prediction model based on all mapping vectors, and predicting the aging state of the electricity meter to be predicted based on the fine-tuned prediction model.
[0006] Preferably, constructing the simulation vector for each simulated subsequence includes: taking any simulated subsequence as the target sequence, taking any sampling point in the target sequence as the target point, obtaining multiple aging feature values of the target point, calculating collaborative feature values based on the multiple aging feature values, constructing an enhanced feature vector for the target point by combining the multiple aging feature values and collaborative feature values, traversing to obtain the enhanced feature vector of each sampling point in the target sequence, and using all enhanced feature vectors as vector elements to construct the simulation vector of the target sequence; and traversing to obtain the simulation vector for each simulated subsequence.
[0007] Preferably, calculating the synergistic feature value based on multiple aging feature values includes: taking any aging feature value as the target value, taking any other aging feature value that has a synergistic aging effect with the target value as the reference value, calculating the target difference between the target value and the preset target control value, calculating the reference difference between the reference value and the preset reference control value, calculating the synergistic feature value between the target value and the reference value based on the product of the target difference and the reference difference; and iterating to obtain the synergistic feature value of each aging feature value.
[0008] Preferably, calculating the aging driving force index of each field vector and the aging driving force index of each simulated vector includes: collecting the measurement error of the target vector, calculating the relative aging degree of the target vector based on the measurement error of the target vector; collecting the measurement error of the previous field vector adjacent to the target vector, calculating the aging rate of the target vector based on the measurement error of the target vector and the measurement error of the previous field vector; weighted summing the relative aging degree and the aging rate to obtain the aging driving force index of the target vector; traversing to obtain the aging driving force index of each field vector, and calculating the aging driving force index of each simulated vector using the calculation method of the aging driving force index of the field vector.
[0009] Preferably, the weighted summation of the relative aging degree and the aging rate to obtain the aging driving force index of the target vector includes: collecting the measurement error of each simulated vector to construct an error set; calculating the relative aging degree of each simulated vector to construct a degree set; calculating the aging rate of each simulated vector to construct a rate set; calculating the correlation coefficient between the error set and the degree set and normalizing it to obtain the degree weight; calculating the correlation coefficient between the error set and the rate set and normalizing it to obtain the rate weight; weighting the relative aging degree according to the degree weight, and weighting the aging rate according to the rate weight, and using the sum of the two weighted results as the aging driving force index of the target vector.
[0010] Preferably, constructing a mapping vector for the target vector by combining the aging driving force index of the target vector, the aging driving force index of the matching vector, and the matching vector includes: obtaining an initial vector, using the difference between the initial vector and the matching vector as a feature difference, calculating a normalized value of the absolute difference between the aging driving force index of the target vector and the aging driving force index of the matching vector, weighting the feature difference according to the normalized value, and using the sum of the weighted feature difference and the target vector as the mapping vector of the target vector.
[0011] Preferably, fine-tuning the prediction model based on all mapping vectors includes: calculating the aging rate of each field vector, determining the aging stage based on the average aging rate of all field vectors, and controlling the fine-tuning parameter ratio of the prediction model based on the aging stage.
[0012] Preferably, fine-tuning the prediction model based on all mapping vectors includes: taking any mapping vector as a first reference vector, inputting the first reference vector into the prediction model to obtain a first predicted value, taking the previous mapping vector adjacent to the reference vector as a second reference vector, inputting the second reference vector into the prediction model to obtain a second predicted value, calculating the prediction difference between the first and second predicted values, collecting the measurement error of the second reference vector and calculating the sign function value, combining the sign function value, the prediction difference, and the maximum value function to calculate the training loss of the second reference vector; traversing to obtain the training loss of each mapping vector, and constructing a penalty term for the prediction model based on all training losses.
[0013] The second aspect of this application proposes an LSTM-based aging state prediction system for electricity meters. The system includes a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the aforementioned LSTM-based aging state prediction method for electricity meters is implemented.
[0014] The beneficial effects of this invention are:
[0015] This invention introduces an aging driving force index. For each field vector, a matching vector is found among multiple simulated vectors using this index. The field vector is then fine-tuned based on the matching vector to obtain a corresponding mapping vector. Finally, this mapping vector is used as a retraining sample for the prediction model to train it, thus completing the fine-tuning. Compared to existing technologies where the mismatch between simulated aging data and field data leads to large errors in model predictions, this invention uses simulated data closest to the field data to correct the field data. This corrected data possesses both simulated and field attributes, effectively bridging the gap between laboratory and field environments and solving the mismatch problem. Furthermore, using the mapping vector as a fine-tuning sample allows the prediction model to more accurately learn aging patterns that conform to actual field conditions, thereby reducing prediction errors in real-world applications. Attached Figure Description
[0016] Figure 1 This is a flowchart of steps S1-S3 in an LSTM-based method for predicting the aging status of an energy meter according to an embodiment of the present invention. Detailed Implementation
[0017] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0018] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0019] Reference Figure 1 A method for predicting the aging status of electricity meters based on LSTM includes steps S1-S3, as detailed below:
[0020] Step S1: Divide the acquired laboratory data sequence into multiple simulated subsequences, construct the simulated vector for each simulated subsequence, and train the preset LSTM model based on all simulated vectors to obtain the prediction model. The laboratory data sequence is the preprocessed accelerated aging data of the electricity meter.
[0021] It should be further explained that the aging simulation laboratory applies physical stresses, such as high temperature and high humidity, to the electricity meter to induce aging. The natural aging process of years is compressed into Months. The accelerated aging data for the electricity meter comes from an aging simulation laboratory. Months.
[0022] For example, the accelerated aging data of the electricity meter of the present invention includes aging characteristic values (physical stress data) collected every 2 hours and metering error collected every 5 days. Aging characteristic values include laboratory temperature. Laboratory humidity Vibration acceleration of an electricity meter in the laboratory Laboratory electric field strength Preprocessing includes handling missing values and data normalization.
[0023] Preferably, constructing the simulation vector for each simulated subsequence includes: taking any simulated subsequence as the target sequence, taking any sampling point in the target sequence as the target point, obtaining multiple aging feature values of the target point, calculating collaborative feature values based on the multiple aging feature values, constructing an enhanced feature vector for the target point by combining the multiple aging feature values and collaborative feature values, traversing to obtain the enhanced feature vector of each sampling point in the target sequence, and using all enhanced feature vectors as vector elements to construct the simulation vector of the target sequence; and traversing to obtain the simulation vector for each simulated subsequence.
[0024] It should be further explained that during the aging process of electricity meters, the effects of a single physical stress (such as temperature, humidity, vibration, and electric field) on aging do not exist in isolation, but rather have a synergistic aging effect. For example, under high temperature conditions, the aging acceleration effect of humidity on insulation materials is significantly enhanced because water molecules become more active at high temperatures, penetrating into the microstructure of the insulation material and causing a sharp decline in dielectric properties. Similarly, under vibration conditions, the electric field will exacerbate the fretting at the contact interface, leading to rapid deterioration of contact resistance. At high temperatures, the elastic modulus of the material decreases, making it more susceptible to vibration and the formation of microcracks.
[0025] Understandably, by quantifying the synergistic aging effect between physical stresses, this invention can compensate for the deficiency that a single feature cannot reflect the overall aging state of an electricity meter. This allows the simulation vector to comprehensively and accurately characterize the aging state of the electricity meter within the corresponding time period, providing richer and more realistic feature inputs for subsequent LSTM model training and enhancing the model's ability to learn aging features.
[0026] Preferably, calculating the synergistic feature value based on multiple aging feature values includes: taking any aging feature value as the target value, taking any other aging feature value that has a synergistic aging effect with the target value as the reference value, calculating the target difference between the target value and the preset target control value, calculating the reference difference between the reference value and the preset reference control value, calculating the synergistic feature value between the target value and the reference value based on the product of the target difference and the reference difference; and iterating to obtain the synergistic feature value of each aging feature value.
[0027] It should be further explained that any other aging characteristic value refers to any aging characteristic value other than the target value among multiple aging characteristic values.
[0028] For example, laboratory temperature Laboratory humidity There is a synergistic aging effect, laboratory temperature Laboratory humidity Collaborative eigenvalues ,in, For the target value, For the target difference, For reference only. The reference difference is 1, since all data have been normalized during preprocessing.
[0029] Similarly, the vibration acceleration of an electricity meter in the laboratory With laboratory electric field strength There is a synergistic aging effect, vibration acceleration With laboratory electric field strength Collaborative eigenvalues .
[0030] Similarly, laboratory temperature Vibration acceleration of an electricity meter in the laboratory There is a synergistic aging effect, laboratory temperature With vibration acceleration Collaborative eigenvalues .
[0031] Combined with aging characteristic values , , , and co-eigenvalues , and Constructing enhanced feature vectors of sampling points .
[0032] For example, the laboratory data sequence is divided into multiple simulated subsequences at 5-day intervals. There are a total of 60 sampling points over the 5 days (collected every 2 hours), meaning each simulated subsequence includes 60 sampling points. The simulated vector can be represented as... ,in, For the index of the sampling point, For the first Enhanced feature vectors of each sampling point , For the first Laboratory temperature at each sampling point For the first Laboratory humidity at each sampling point For the first Vibration acceleration of electricity meters in laboratories at each sampling point For the first The laboratory electric field strength at each sampling point, here according to calculate.
[0033] It should be noted that a simulated vector is a training sample of a pre-defined LSTM model, and the label of the training sample is... , indicating the first Measurement error at each sampling point.
[0034] Step S2: Divide the acquired field data sequence into multiple field subsequences, construct the field vector for each field subsequence, and the field data sequence is the preprocessed historical aging data of the electricity meter.
[0035] It should be noted that the historical aging data of the electricity meters is collected and recorded on-site from the meters to be predicted. Since the on-site electricity meters are calibrated quarterly or semi-annually, records of metering errors are scarce. After several recordings, the electricity meters may show signs of aging, at which point aging status prediction is necessary.
[0036] For example, the historical aging data of the electricity meter of the present invention includes physical stress data collected every 15 minutes and metering error data collected quarterly. Physical stress data includes on-site temperature. On-site humidity Vibration acceleration of the on-site electricity meter On-site electric field strength Preprocessing includes handling missing values, data normalization, and downsampling.
[0037] Specifically, historical aging data from electricity meters is aggregated daily (daily averages are taken), reducing the sampling frequency to once a day to obtain a field data sequence. Then, a sliding window method is used: taking each metering error record point as the endpoint, a 60-day field data sequence is taken backwards and divided equally, with the corresponding metering error value used as a label. The sliding window length is set to 60 days, with a window step of 1 day, ensuring that each metering error corresponds to a complete 60-day field data sequence.
[0038] It should be noted that the method for constructing field vectors is the same as that for simulation vectors.
[0039] The field vector can be represented as ,in, For the index of the sampling point, For the first Enhanced feature vectors of each sampling point , For the first The on-site temperature at each sampling point For the first The on-site humidity at each sampling point For the first Vibration acceleration of electricity meters at each sampling point in the field. For the first The on-site electric field strength at each sampling point, here according to The calculation shows that, when constructing training samples based on the on-site vectors, the labels of the training samples are... , representing the first data sequence in the field Measurement error at each sampling point.
[0040] It should be noted that the measurement error is mainly obtained through the standard table method (also known as the comparison method), which is existing technology and will not be described in detail here.
[0041] Step S3: Calculate the aging driving force index of each field vector and the aging driving force index of each simulated vector. Take any field vector as the target vector and calculate the absolute difference between the aging driving force index of the target vector and the aging driving force index of each simulated vector. Take the simulated vector corresponding to the minimum absolute difference as the matching vector of the target vector. Combine the aging driving force index of the target vector, the aging driving force index of the matching vector, and the matching vector to construct the mapping vector of the target vector. Iterate through the mapping vectors of each field vector to obtain the mapping vector. Fine-tune the prediction model based on all the mapping vectors. Predict the aging state of the energy meter to be predicted based on the fine-tuned prediction model.
[0042] Preferably, calculating the aging driving force index of each field vector and the aging driving force index of each simulated vector includes: collecting the measurement error of the target vector, calculating the relative aging degree of the target vector based on the measurement error of the target vector; collecting the measurement error of the previous field vector adjacent to the target vector, calculating the aging rate of the target vector based on the measurement error of the target vector and the measurement error of the previous field vector; weighted summing of the relative aging degree and aging rate to obtain the aging driving force index of the target vector; traversing to obtain the aging driving force index of each field vector, and calculating the aging driving force index of each simulated vector using the calculation method of the aging driving force index of the field vector.
[0043] For example, the formula for calculating the aging driving force index of the target vector is as follows:
[0044]
[0045] In the formula middle, The aging driving force index for the target vector. The aging rate of the target vector. This is the difference between the measurement error of the target vector and the measurement error of the previous field vector (adjacent to the target vector). The sampling interval between the sampling point corresponding to the measurement error of the target vector and the sampling point corresponding to the measurement error of the adjacent previous field vector (as in the previous example). (for one quarter) The weight of aging rate (rate weight). The relative aging degree of the target vector. The weight is the relative degree of aging (degree weight).
[0046] For the above formula It should be noted that the initial metering error of the electricity meter is 15% (calibrated value for a new meter), the allowable error limit is 1.0% (according to the accuracy class regulations for electricity meters), and the metering error corresponding to the target vector is 0.82%. Therefore, the relative aging degree of the target vector is... This indicates that the electricity meter has consumed 79% of its allowable error margin, which is the relative degree of aging.
[0047] For the above formula It should be noted that the aging driving force index is positively correlated with both the aging rate and the relative degree of aging. The aging rate, i.e., the rate of change of measurement error, indicates that the aging rate is rapidly accelerating. The larger the value, the greater the relative aging degree, indicating that the allowable error margin has been consumed. The larger. The larger the value, the more equivalent the current data point is to a sample nearing failure in terms of aging intensity. The smaller the value, the more likely the energy meter state corresponding to the target vector is equivalent to the initial stage.
[0048] It should be noted that the aging driving force index for each simulation vector is also based on the formula. Calculate and simulate the aging driving force index of the vector. This indicates that at this time It lasts for 5 days.
[0049] For the above formula It should be further noted that the data collected under accelerated aging conditions in the laboratory and the data from electricity meters operating in actual power grid environments show significant differences in their distribution within a multidimensional feature space composed of environmental factors such as temperature, humidity, vibration, and electric field. Laboratory data is concentrated in extreme environmental areas such as high temperature and humidity, while field data is mainly distributed in conventional environmental areas. There is almost no overlap between the two in the feature space. This distribution difference makes it difficult to accurately predict the aging state of field electricity meters using models trained directly in the laboratory. Existing methods either employ complex physical equations (such as the Arrhenius model) or use statistical alignment without physical meaning, both of which struggle to balance engineering simplicity and physical interpretability.
[0050] This invention proposes a mapping mechanism based on aging stage semantics. The core idea is: instead of directly mapping the original stress value, it identifies aging stage characteristics by calculating aging driving force indicators (reflecting both the current aging state level of the electricity meter and the rate of change in the aging process), establishing a correspondence between the laboratory and field at the aging stage level. This allows the model to understand the equivalent representation of the same aging stage under different environments. For example, when the electricity meter in the field is in the mid-acceleration stage (… When the value is 0.65, the system automatically matches the time point in the laboratory where the aging driving force index is closest to 0.65 (such as the 8th month). Even if the on-site temperature is 45 degrees and the laboratory temperature is 75 degrees, it can achieve an equivalent mapping at the aging mechanism level.
[0051] Preferably, the aging driving force index of the target vector obtained by weighted summation of relative aging degree and aging rate includes: collecting the measurement error of each simulated vector to construct an error set; calculating the relative aging degree of each simulated vector to construct a degree set; calculating the aging rate of each simulated vector to construct a rate set; calculating the correlation coefficient between the error set and the degree set and normalizing it to obtain the degree weight; calculating the correlation coefficient between the error set and the rate set and normalizing it to obtain the rate weight; weighting the relative aging degree according to the degree weight, and weighting the aging rate according to the rate weight, and using the sum of the two weighted results as the aging driving force index of the target vector.
[0052] It should be noted that due to insufficient field data, there is a limited amount of field vector data. Therefore, the correlation between aging speed and aging degree and measurement error is determined based on simulated vector quantization.
[0053] It should be noted that the correlation coefficient here is the Spearman correlation coefficient, and the calculation method for this coefficient is existing technology and will not be described in detail here. The larger the correlation coefficient, the greater its contribution to the calculation of aging driving force indicators.
[0054] Preferably, constructing a mapping vector for the target vector by combining the aging driving force index of the target vector, the aging driving force index of the matching vector, and the matching vector includes: obtaining an initial vector, using the difference between the initial vector and the matching vector as a feature difference, calculating the normalized value of the absolute difference between the aging driving force index of the target vector and the aging driving force index of the matching vector, weighting the feature difference according to the normalized value, and using the sum of the weighted feature difference and the target vector as the mapping vector of the target vector.
[0055] It should be noted that the initial vector can be constructed based on the relevant physical stress data during the initial installation of the electricity meter to be predicted, or it can be set as needed.
[0056] It should be further explained that, based on the aging driving force index, a matching vector is found for the target vector among multiple simulated vectors. For the target vector, the... The simulated vector corresponding to the minimum value of the (absolute difference) is used as the matching vector, and the target vector is mapped using the matching vector. During the mapping process, the sampling points of the matching vector are aligned with the sampling points of the target vector.
[0057] Specifically, the mapping process for each enhanced feature vector in the target vector is as follows:
[0058]
[0059] In the formula middle, For the target vector The enhanced feature vector after mapping each sampling point For the target vector Enhanced feature vectors of each sampling point For the matching vector of the th Enhanced feature vectors of each sampling point The first initial vector Enhanced feature vectors for each sampling point.
[0060] In the formula middle, The aging driving force index for the target vector. The aging driving force index for the matching vector of the target vector. This represents the absolute difference between the aging driving force index of the target vector and the aging driving force index of the matching vector. This is the normalized value of the absolute difference. and The closer the two vectors are, the closer their aging states are. The smaller the absolute difference, the greater the contribution of the matching vector when calculating the mapping vector. This allows the mapping vector to fully absorb the aging patterns inherent in the laboratory data. The mapped data maintains the actual operating characteristics in the field while also reasonably drawing upon the rich experience accumulated during accelerated aging in the laboratory. and The greater the difference, the greater the difference in aging state between the target vector and the matching vector. In order to fine-tune the model so that it can match the effect of field application, reduce the influence of laboratory data on the mapping vector, and make the mapping vector more dependent on the original field data.
[0061] It should be noted that a mapping vector is used as a training sample to train the prediction model.
[0062] Preferably, fine-tuning the prediction model based on all mapping vectors includes: calculating the aging rate of each field vector, determining the aging stage based on the average aging rate of all field vectors, and controlling the proportion of fine-tuning parameters of the prediction model based on the aging stage.
[0063] It should be further explained that the prediction model contains multiple network layers, each with a large number of parameters. In the early, stable phase of meter aging, the aging pattern of the model is relatively simple and uniform. Therefore, only a very small number of parameters need to be adjusted (mainly the weights related to the output layer and coupling features). For example, if the model has a total of 10,000 parameters, then in the initial stage, only no more than 500 parameters are allowed to be modified. This design ensures that even under extreme conditions with only 10-15 field data points, the model will not lose the core aging patterns learned from 2,700 laboratory samples due to over-adjustment. At the same time, by strictly limiting the proportion of adjustable parameters, overfitting in small sample cases is effectively prevented, ensuring the stability and reliability of the model's predictions. As the aging stage progresses (mid-term and late-term), the proportion of adjustable parameters is gradually increased (15%, 30%) according to the increasing complexity of aging, achieving precise adaptation to the specific characteristics of individual meters.
[0064] For example, if the average aging rate of all field vectors is less than 0.01%, it indicates that the field energy meter is in the initial stable stage. At this time, only the output layer parameters and coupling feature weights of the prediction model are enabled, and the proportion of fine-tuning parameters is controlled within 5%. If the average aging rate of all field vectors is not less than 0.01% and less than 0.05%, it indicates that the field energy meter is in the mid-acceleration stage. At this time, the output layer and the last LSTM layer parameters are enabled, and the proportion of fine-tuning parameters is controlled within 15%. If the average aging rate of all field vectors is not less than 0.05%, it indicates that the field energy meter is in the late mutation stage. At this time, the output layer and the last two LSTM layers parameters are enabled, and the proportion of fine-tuning parameters is controlled within 30%.
[0065] Preferably, fine-tuning the prediction model based on all mapping vectors includes: taking any mapping vector as a first reference vector, inputting the first reference vector into the prediction model to obtain a first predicted value, taking the previous mapping vector adjacent to the reference vector as a second reference vector, inputting the second reference vector into the prediction model to obtain a second predicted value, calculating the prediction difference between the first and second predicted values, collecting the measurement error of the second reference vector and calculating the sign function value, combining the sign function value, the prediction difference, and the maximum value function to calculate the training loss of the second reference vector; traversing to obtain the training loss of each mapping vector, and constructing a penalty term for the prediction model based on all training losses.
[0066] It should be noted that since the mapping vector is obtained from the field vector, the measurement error of the mapping vector is the same as the measurement error of the reference vector.
[0067] For example, the formula for the penalty term is as follows:
[0068]
[0069] In the formula middle, This is a penalty term for the prediction model. This represents the number of mapping vectors (i.e., the number of field vectors). For the first The predicted value of each mapping vector (corresponding to the first reference vector) (corresponding to the first predicted value). For the first The predicted value of each mapping vector (corresponding to the second reference vector) (corresponding to the second predicted value). For the first The measurement error of each mapping vector, For symbolic functions, It is a function with maximum value. This is due to training losses.
[0070] The loss function with the added penalty term is ultimately expressed as: .
[0071] It is known that the metering error of an electricity meter has a clear positive and negative distinction: a positive error occurs when the meter's reading is greater than the standard value, meaning the meter over-counts electricity; a negative error occurs when the meter's reading is less than the standard value, meaning the meter under-counts electricity. During the normal aging process of an electricity meter, the metering error exhibits a monotonic change characteristic over time: when the error is positive, the aging process will gradually increase the positive error; when the error is negative, the aging process will gradually decrease the negative error (the absolute value will increase). Formula By analyzing the direction of change between adjacent predicted values (prediction difference), we can ensure that the predicted sequence conforms to the irreversible aging law.
[0072] For example, the formula can be understood by referring to the following process. Punishment mechanism:
[0073] Scenario 1: Historical measurement error on site is positive ( (greater than 0):
[0074] at this time, ,for If the aging process is followed, that is The maximum value function is 0, meaning there is no loss; if the aging law is not satisfied, that is... The maximum value function is greater than 0, indicating a loss.
[0075] Scenario 2: The historical measurement error on site is negative ( Less than 0):
[0076] at this time, ,for If the aging process is followed, that is The maximum value function is 0, meaning there is no loss; if the aging law is not satisfied, that is... The maximum value function is greater than 0, indicating a loss.
[0077] The training loss of each mapping vector during model training can be calculated as above, and then a penalty term can be constructed based on all training losses.
[0078] It should be further explained that, due to the extremely sparse historical metering error data (only 10-15 points), a single data fitting loss cannot guarantee that the model strictly adheres to the fundamental physical law of irreversible aging of electricity meters during prediction. This invention, through a clever combination of sign and maximum value functions, automatically identifies and penalizes predictions that violate the aging law: when the historical metering error is positive, the prediction error is forced not to decrease; when the historical metering error is negative, the prediction error is forced not to increase. This ensures a balance between data fitting accuracy and adherence to physical laws under small sample conditions, enabling the fine-tuned model to accurately predict the aging state of the target electricity meter while ensuring that the prediction results conform to the irreversible physical law of aging.
[0079] It should be noted that the process of predicting the aging status of the electricity meter under test based on the fine-tuned prediction model (the prediction period can be set to 60 days) is as follows:
[0080] 1. Single-point prediction execution process:
[0081] (1) Data collection: Collect real-time on-site data of the power meter over the past 60 days, including ambient temperature. relative humidity Vibration acceleration electric field strength The sampling frequency is once every 15 minutes, and the data is uploaded in real time via RS-485 bus and 4G network;
[0082] (2) Feature enhancement processing: Based on the coupled feature mechanism constructed in this invention, an enhanced feature vector is constructed for the preprocessed field data of each day. 60-day enhanced feature sequence was obtained. ;
[0083] (3) Single-point prediction: Input the 60-day enhanced feature sequence into the fine-tuned prediction model and output the aging state prediction value on the 61st day. and will Using this as a representative value for the aging state over the next two months (days 61-120), complex multi-step predictions are avoided, significantly reducing the demand for computing resources.
[0084] 2. Standard Error Limit Warning Trigger Mechanism: Based on the permissible error limit of the electricity meter (e.g., ±1.0%), a three-level warning mechanism is established, with a 0.2% safety margin to ensure timely replacement before the specified limit is reached.
[0085] (1) Level I warning (0.3% ≤ <0.5%): Record monitoring data, maintain normal operation, and generate an operational status report every quarter;
[0086] (2) Level II warning (0.5% ≤ <0.8%): Increase the frequency of on-site verification to once per quarter, strengthen data monitoring, and initiate preparations for rotation plans;
[0087] (3) Level III early warning ( ≥ 0.8%): Immediately trigger a replacement warning work order, with a 0.2% safety margin to ensure that the rotation is completed before the error reaches the allowable error limit.
[0088] This invention also provides an LSTM-based system for predicting the aging status of electricity meters. The system includes a processor and a memory, the memory storing computer program instructions. When the processor executes the computer program instructions, it implements the LSTM-based method for predicting the aging status of electricity meters according to the first aspect of this invention. The system also includes other components well-known to those skilled in the art, such as a communication bus and a communication interface; their configuration and functions are known in the art and will not be described further here.
[0089] It should be noted that the preferred embodiments of this application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of this application. For those skilled in the art, various modifications and improvements can be made without departing from the concept of the invention, and these all fall within the protection scope of the invention. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A method for predicting the aging state of an electric energy meter based on LSTM, characterized in that, include: The acquired laboratory data sequence is divided into multiple simulated subsequences, and a simulated vector is constructed for each simulated subsequence. A pre-set LSTM model is trained based on all simulated vectors to obtain a prediction model. The laboratory data sequence is pre-processed accelerated aging data of electricity meters. The acquired field data sequence is divided into multiple field subsequences, and a field vector is constructed for each field subsequence. The field data sequence is the preprocessed historical aging data of the electricity meter. Calculate the aging driving force index of each field vector and the aging driving force index of each simulated vector. Take any field vector as the target vector and calculate the absolute difference between the aging driving force index of the target vector and the aging driving force index of each simulated vector. Take the simulated vector corresponding to the minimum absolute difference as the matching vector of the target vector. Combine the aging driving force index of the target vector, the aging driving force index of the matching vector, and the matching vector to construct the mapping vector of the target vector. Iterate through the mapping vectors of each field vector to obtain the mapping vector. Fine-tune the prediction model according to all the mapping vectors. Predict the aging state of the energy meter to be predicted according to the fine-tuned prediction model. The simulation vectors used to construct each simulated subsequence include: Take any simulated subsequence as the target sequence, take any sampling point in the target sequence as the target point, obtain multiple aging feature values of the target point, calculate the collaborative feature value based on the multiple aging feature values, combine the multiple aging feature values and the collaborative feature value to construct the enhanced feature vector of the target point, traverse to obtain the enhanced feature vector of each sampling point in the target sequence, use all enhanced feature vectors as vector elements to construct the simulated vector of the target sequence, and traverse to obtain the simulated vector of each simulated subsequence; The mapping formula for each enhanced feature vector in the target vector is as follows: In the above formula, For the target vector The enhanced feature vector after mapping each sampling point For the target vector Enhanced feature vectors of each sampling point For the matching vector of the th Enhanced feature vectors of each sampling point The first initial vector Enhanced feature vectors of each sampling point The aging driving force index for the target vector. The aging driving force index is the matching vector of the target vector.
2. The LSTM-based method for predicting the aging status of electricity meters according to claim 1, characterized in that, The synergistic characteristic value is calculated based on multiple aging characteristic values, including: Take any aging characteristic value as the target value, take any other aging characteristic value that has a synergistic aging effect with the target value as the reference value, calculate the target difference between the target value and the preset target control value, calculate the reference difference between the reference value and the preset reference control value, and calculate the synergistic characteristic value between the target value and the reference value based on the product of the target difference and the reference difference. Iterate through each aging feature to obtain its co-feature value.
3. The method for predicting the aging status of electricity meters based on LSTM according to claim 1, characterized in that, The calculation of the aging driving force index for each field vector and the aging driving force index for each simulated vector includes: The measurement error of the target vector is collected, and the relative aging degree of the target vector is calculated based on the measurement error of the target vector. The measurement error of the previous field vector adjacent to the target vector is collected, and the aging rate of the target vector is calculated based on the measurement error of the target vector and the measurement error of the previous field vector. The aging driving force index of the target vector is obtained by weighted summation of the relative aging degree and the aging rate. The aging driving force index of each field vector is obtained by traversing through the data. The aging driving force index of each simulated vector is calculated using the calculation method of the aging driving force index of the field vector.
4. The LSTM-based method for predicting the aging status of electricity meters according to claim 3, characterized in that, The aging driving force index for obtaining the target vector by weighted summation of the relative aging degree and the aging rate includes: The measurement error of each simulated vector is collected to construct an error set, the relative aging degree of each simulated vector is calculated to construct a degree set, and the aging rate of each simulated vector is calculated to construct a rate set. Calculate the correlation coefficient between the error set and the degree set and normalize it to obtain the degree weight; Calculate the correlation coefficient between the error set and the velocity set and normalize it to obtain the velocity weight; The relative aging degree is weighted according to the degree weight, and the aging speed is weighted according to the speed weight. The sum of the two weighted results is used as the aging driving force index of the target vector.
5. The method for predicting the aging status of electricity meters based on LSTM according to claim 1, characterized in that, Fine-tuning the prediction model based on all mapping vectors includes: The aging rate of each field vector is calculated, the aging stage is determined based on the average aging rate of all field vectors, and the fine-tuning parameter ratio of the prediction model is controlled according to the aging stage.
6. The LSTM-based method for predicting the aging status of electricity meters according to claim 1, characterized in that, Fine-tuning the prediction model based on all mapping vectors includes: Take any mapping vector as the first reference vector, input the first reference vector into the prediction model to obtain the first predicted value, take the previous mapping vector adjacent to the reference vector as the second reference vector, input the second reference vector into the prediction model to obtain the second predicted value, calculate the prediction difference between the first predicted value and the second predicted value, collect the measurement error of the second reference vector and calculate the sign function value, and combine the sign function value, the prediction difference and the maximum value function to calculate the training loss of the second reference vector. The training loss of each mapping vector is obtained by iterating through the vectors, and a penalty term for the prediction model is constructed based on all the training losses.
7. An LSTM-based system for predicting the aging status of electricity meters, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement the LSTM-based method for predicting the aging state of an energy meter according to any one of claims 1-6.