Method and system for automatic error calibration of an electric energy meter
By installing high-precision sensors on the electricity meter and using analysis models to determine the type of electromagnetic interference and the probability of deviation, the system automatically decides whether to perform calibration, solving the problem of inaccurate measurement of electricity meters in complex electromagnetic environments. This achieves real-time and accurate calibration and reduces operation and maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2026-03-17
AI Technical Summary
Existing electricity meters struggle to achieve real-time and effective error calibration in complex electromagnetic interference environments, leading to inaccurate measurements and impacting the fairness of electricity settlement and system stability.
By installing high-precision electromagnetic signal sensors to acquire interference characteristic data of the electricity meter area, and using analysis models to determine the type of interference and predict the offset probability, the system can automatically decide whether to perform calibration, thus avoiding unnecessary calibration operations.
It enables real-time and accurate calibration of electricity meters in complex electromagnetic interference environments, reducing operation and maintenance costs and improving measurement accuracy and system stability.
Smart Images

Figure CN120686180B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of metering technology, and more specifically, to an automatic error calibration method and system for electricity meters. Background Technology
[0002] With the continuous advancement of smart grid construction, electricity meters, as the core equipment for electricity metering, directly affect the economic settlement between power companies and users, as well as the stable operation and efficient management of the power system. In modern society, electricity meters are widely used in various scenarios such as residential buildings, commercial buildings, and industrial enterprises. However, in these application scenarios, electricity meters are inevitably subject to interference from various electromagnetic signals.
[0003] In power systems, harmonics generated by power electronic devices and transformers can create electromagnetic interference. Signals emitted by communication equipment such as base stations and wireless LANs, as well as electromagnetic radiation generated during the operation of industrial equipment, can also affect the normal operation of electricity meters. These electromagnetic interference signals can interfere with the normal operation of the internal circuitry of electricity meters, leading to errors in the meter's readings and causing the metered data to deviate from the actual energy consumption. Once the measurement error of the electricity meter exceeds the allowable range, it can not only lead to unfair electricity settlement but also affect load forecasting and dispatching in the power system, posing a potential risk to the safe and stable operation of the power system.
[0004] Currently, the traditional methods for calibrating electricity meter errors mainly involve periodic manual calibration or post-error calibration. Manual calibration requires significant manpower and time, has a long calibration cycle, and is difficult to handle complex and ever-changing electromagnetic interference environments in real time. Post-error calibration, on the other hand, takes measures only after the error has occurred and been discovered, failing to prevent the error from occurring in advance, and may have already caused significant impacts while the error exists.
[0005] Therefore, in order to improve the accuracy and reliability of electricity meter measurements and reduce operation and maintenance costs, there is an urgent need for a method that can monitor electromagnetic interference in real time and automatically perform error calibration based on the interference situation. Summary of the Invention
[0006] In response, the present invention provides an automatic error calibration method, system, electronic device, computer storage medium, and computer program product for electricity meters to solve at least one of the above-mentioned technical problems.
[0007] In a first aspect, the present invention provides an automatic error calibration method for an electricity meter, applicable to an electricity meter, the method comprising the following steps:
[0008] Obtain interference characteristic data of electromagnetic signals in the area where the electricity meter is located, and determine whether the electromagnetic signal belongs to a preset interference type based on the interference characteristic data;
[0009] When the electromagnetic signal does not belong to the preset interference type, the interference feature data is analyzed and processed using an analysis model to predict the offset probability. The offset probability is used to characterize the probability that the power detection data of the power meter equipped with an anti-interference mechanism will be higher than the offset threshold under the interference of the electromagnetic signal.
[0010] If the offset probability is higher than the probability threshold, automatic calibration of the electricity meter will be initiated; otherwise, automatic calibration of the electricity meter will not be initiated.
[0011] In a second aspect, the present invention provides an automatic error calibration system for an electricity meter, which is applied to an electricity meter. The system includes an acquisition unit, a calibration analysis unit, and a calibration unit.
[0012] The acquisition unit is used to acquire interference characteristic data of electromagnetic signals in the area where the electricity meter is located, and to determine whether the electromagnetic signal belongs to a preset interference type based on the interference characteristic data.
[0013] The calibration analysis unit is used to analyze and process the interference feature data using an analysis model when the electromagnetic signal does not belong to a preset interference type, and predict the offset probability; the offset probability is used to characterize the probability that the power detection data of the power meter equipped with an anti-interference mechanism will be higher than the offset threshold under the interference of the electromagnetic signal.
[0014] The calibration unit is used to initiate automatic calibration of the energy meter if the offset probability is higher than the probability threshold, and not to initiate automatic calibration of the energy meter otherwise.
[0015] In a third aspect, the present invention provides an electronic device comprising: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the computer program being executed by the processor to implement the method as described in any of the preceding claims.
[0016] In a fourth aspect, the present invention provides a computer storage medium storing a computer program executable by a processor, the computer program being executed by the processor to implement the method as described in any of the preceding claims.
[0017] In a fifth aspect, the present invention provides a computer program product comprising a computer program executable by a processor, the computer program being executed by the processor to perform the method as described in any of the preceding claims.
[0018] Compared to traditional calibration methods, this invention designs a more efficient automatic calibration method. Moreover, it can use analytical models to analyze whether the energy meter's anti-interference mechanism can cope with the current electromagnetic signal interference, and then decide whether to start automatic calibration, which can significantly reduce the calibration load caused by unnecessary calibration operations. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating an automatic error calibration method for an electricity meter disclosed in an embodiment of the present invention.
[0021] Figure 2 This is a schematic diagram of the structure of the analysis model disclosed in the embodiments of the present invention;
[0022] Figure 3 This is a schematic diagram of the structure of an automatic error calibration system for an electricity meter disclosed in an embodiment of the present invention. Detailed Implementation
[0023] The following specific embodiments illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] Furthermore, the technical features involved in the different embodiments of this application described below can be combined with each other as long as they do not conflict with each other.
[0025] In smart grid environments, electromagnetic interference (EMI) has an increasingly significant impact on the metering accuracy of electricity meters. Traditional calibration methods cannot distinguish between temporary and long-term EMI, leading to overcalibration or calibration lag. This invention achieves intelligent calibration decisions by analyzing and determining the characteristics and types of electromagnetic signals, thereby improving calibration efficiency and accuracy.
[0026] like Figure 1 As shown in the figure, an embodiment of the present invention discloses an automatic error calibration method for an electricity meter, which is applied to an electricity meter. The method includes the following steps:
[0027] S10, acquire interference characteristic data of electromagnetic signals in the area where the electricity meter is located, and determine whether the electromagnetic signal belongs to a preset interference type based on the interference characteristic data.
[0028] A high-precision electromagnetic signal sensor is installed inside or around the electricity meter. This electromagnetic signal sensor can cover a wide frequency range (e.g., 10kHz-1GHz) to comprehensively detect various electromagnetic interference signals that may exist, including but not limited to power system harmonics, communication equipment signals, and electromagnetic radiation from industrial equipment.
[0029] It is understandable that electromagnetic signal detectors can be of the following types:
[0030] Electromagnetic sensors based on microelectromechanical systems (MEMS): These sensors combine MEMS technology with electromagnetic induction or capacitive induction, enabling the detection of weak electromagnetic signals through miniaturized structures. The weak electromagnetic signals are then output via on-chip amplifiers and digital signal processing modules. Suitable for integration within space-constrained energy meters, they can detect weak electromagnetic radiation generated by high-frequency signal crosstalk (e.g., clock signal interference above 100MHz) or partial discharge on circuit boards.
[0031] Antenna-coupled RF signal detectors: These detectors employ miniaturized dipole or loop antennas to couple electromagnetic radiation signals in space into electrical signals. After amplification by a low-noise amplifier (LNA), the signals are fed into an RF front-end for filtering, mixing, and analog-to-digital conversion. Finally, a microcontroller performs spectrum analysis. This method is suitable for detecting high-frequency electromagnetic interference (30MHz-6GHz) generated by communication base stations and wireless devices, such as 2.6GHz or 3.5GHz signals emitted by 5G base stations.
[0032] Hall effect magnetic field detector: Utilizing the sensitivity of Hall elements to changes in magnetic fields, when an alternating magnetic field exists, the Hall element outputs a voltage signal proportional to the magnetic field strength. After noise removal by a signal conditioning circuit, it is converted into a digital signal by an ADC. It is commonly used to monitor power frequency magnetic fields (50 / 60Hz) and low-frequency magnetic field interference generated by equipment such as transformers and motors, such as magnetic field distortion caused by transformer leakage flux in substations.
[0033] After detecting an electromagnetic interference signal, interference feature data is further extracted from the electromagnetic signal. The electromagnetic signal is then judged based on a pre-set interference type standard library, that is, whether it belongs to a preset interference type in the standard library.
[0034] Understandably, electricity meters are typically equipped with anti-interference mechanisms. These mechanisms can suppress or compensate for some common, minor electromagnetic interferences (such as communication equipment signals), ensuring that the deviation between the detected electricity value and the actual value remains within a normal range. By conducting preliminary measurements on various typical electromagnetic signals of different types, the types of interference (i.e., minor electromagnetic signals) that the anti-interference mechanism can handle can be determined, and their corresponding characteristic parameters (such as frequency range, signal strength threshold, waveform characteristics, etc.) are stored in the aforementioned standard library. The detected electromagnetic signal characteristic data is compared with the characteristic parameters in the standard library. If it matches the characteristics of a preset interference type, the electromagnetic signal is determined to belong to the preset interference type; otherwise, the process proceeds to step S20 for further analysis.
[0035] S20, when the electromagnetic signal does not belong to the preset interference type, the interference feature data is analyzed and processed using an analysis model to predict the offset probability; the offset probability is used to characterize the probability that the power detection data of the power meter equipped with an anti-interference mechanism will be higher than the offset threshold under the interference of the electromagnetic signal.
[0036] When the electromagnetic signal does not belong to the preset interference type, it indicates that the anti-interference mechanism configured in the electricity meter may not be able to effectively deal with it. In this case, the present invention uses an analysis model to further analyze the interference characteristic data to determine whether automatic calibration of the electricity meter is necessary. The analysis model can be an algorithm based on machine learning or deep learning, trained on a large amount of historical data, and has learned the complex relationship between different electromagnetic signal interference characteristics and the offset of the electricity meter's detection data.
[0037] The interference characteristic data obtained in step S10, such as the sequence data of electromagnetic signal intensity, frequency components, and waveform characteristics at different time points, are input into the analysis model. The analysis model mines the patterns and laws of electromagnetic signal changes over time, analyzes the impact of these interference characteristic data on the energy meter equipped with an anti-interference mechanism, and thus predicts the offset probability. This offset probability is used to characterize the probability that, under the current electromagnetic signal interference, the energy detection data of the energy meter equipped with an anti-interference mechanism will be higher than the offset threshold, that is, the degree of interference of the electromagnetic signal has exceeded the capability range of the energy meter's anti-interference mechanism.
[0038] It is understood that the aforementioned offset threshold can be determined based on the accuracy class of the electricity meter. For example, when the accuracy class of the electricity meter is 0.2S, the offset threshold can be ±0.2%; when the accuracy class of the electricity meter is 0.5S, the offset threshold can be ±0.3%; when the accuracy class of the electricity meter is Class 1, the offset threshold can be ±0.6%. This invention does not impose specific limitations on this.
[0039] S30, if the offset probability is higher than the probability threshold, then start the automatic calibration of the energy meter; otherwise, do not start the automatic calibration of the energy meter.
[0040] If the offset probability is higher than the preset probability threshold (e.g., 80%), it is determined that the electricity meter is greatly affected by the current electromagnetic signal interference and has a high risk of error. In this case, it is necessary to start the automatic calibration program for the electricity meter.
[0041] For example, the automatic calibration program first reads the current detection data and calibration parameters of the electricity meter, and then corrects the detection data according to a preset calibration algorithm. The calibration algorithm can be based on comparative calibration using a standard power signal source, or it can use an adaptive calibration method based on historical calibration data and an error model. By adjusting the metering parameters and compensation coefficients inside the electricity meter, the detection data of the electricity meter is brought back to the accurate range.
[0042] If the offset probability is lower than the probability threshold, it means that the current electromagnetic signal interference has little impact on the energy meter's detection results. The energy meter can maintain relatively accurate measurement under the action of the anti-interference mechanism. At this time, the automatic calibration of the energy meter is not initiated, and the electromagnetic signal continues to be monitored in real time to ensure the measurement accuracy of the energy meter.
[0043] Compared to traditional calibration methods, this invention designs a more efficient automatic calibration method. Moreover, it can use analytical models to analyze whether the energy meter's anti-interference mechanism can cope with the current electromagnetic signal interference, and then decide whether to start automatic calibration, which can significantly reduce the calibration load caused by unnecessary calibration operations.
[0044] Further, determining whether the electromagnetic signal belongs to a preset interference type based on the interference feature data includes:
[0045] Determine whether each element feature in the interference feature data exceeds the corresponding preset threshold. If so, perform feature matching based on each element feature and each preset interference type in the pre-built interference type standard library.
[0046] If a preset interference type exists where all the aforementioned element features are successfully matched, then the electromagnetic signal is determined to belong to the preset interference type.
[0047] First, threshold verification is performed on each element of the interference feature data (such as frequency range, signal strength threshold, waveform characteristics, etc.). Each element corresponds to a preset safety threshold (such as frequency range, upper limit of strength). If any element exceeds the safety threshold, it is initially determined that the electromagnetic signal has a low probability of having a substantial impact on the electricity meter, and only then is the subsequent precise matching process triggered. This setting can quickly identify obviously abnormal interference signals, reduce unnecessary complex matching calculations, and improve judgment efficiency.
[0048] If at least one preset threshold is exceeded, each element's feature is compared one by one with the feature parameters corresponding to the preset interference type in the standard library. The matching process must simultaneously meet the following conditions: Frequency feature: The frequency range of the interference signal must fall completely within the frequency range of the preset type; Intensity feature: The signal intensity must exceed the intensity threshold of the corresponding type (reflecting the severity of the interference); Waveform feature: The time-domain / frequency-domain waveform must reach a specific similarity with the preset interference type (e.g., calculated through correlation coefficient).
[0049] The electromagnetic signal is determined to belong to a preset interference type only when all element characteristics completely match all characteristic parameters of a preset interference type. If any element characteristic does not match, it is determined that it does not belong to the preset interference type, and the process proceeds to the subsequent processing flow in step S20.
[0050] It is understandable that if none of the elements in the interference feature data exceed the corresponding preset safety threshold, then it is directly identified as belonging to the preset interference type.
[0051] Furthermore, such as Figure 2 As shown, the analysis model includes a feature encoding layer, a spatiotemporal attention module, and a probability prediction layer; then, the step of using the analysis model to analyze and process the interfering feature data and predict the offset probability includes:
[0052] The feature coding layer extracts frequency domain feature vectors, statistical feature vectors, and time-frequency feature vectors from the interference feature data to form high-dimensional feature vectors.
[0053] The spatiotemporal attention module uses a multi-head self-attention mechanism to perform global dependency modeling on the high-dimensional feature vector, obtaining an intermediate representation containing long-distance feature associations. The intermediate representation is then used to capture temporal dynamic features through a bidirectional GRU network to obtain a hidden state sequence.
[0054] The probability prediction layer compresses the hidden state sequence into a fixed-length feature vector through global average pooling, performs a nonlinear transformation on the feature vector through two layers of residual network, and outputs the offset probability through a fully connected layer and activation function.
[0055] First, the interference feature data includes frequency features, signal strength features, and waveform features. The feature coding layer extracts frequency domain feature vectors, statistical feature vectors, and time-frequency feature vectors from the above interference feature data, as follows:
[0056] Frequency domain feature extraction: The Fast Fourier Transform (FFT) is applied to convert the time-domain signal into the frequency domain, generating a spectral feature vector of dimension F. For example, performing an FFT on a signal within a 50ms sampling window can extract the energy distribution of 2048 frequency points.
[0057] Statistical feature extraction: Sliding window statistics are applied to the signal intensity sequence to calculate S-dimensional statistical features such as mean, variance, and gust factor. Variance reflects the degree of signal fluctuation, while gust factor characterizes pulse characteristics.
[0058] Time-frequency feature extraction: Wavelet transform is used to perform multi-resolution analysis of waveform features, extracting time-domain parameters such as rise time, fall time, and duty cycle to generate W-dimensional time-frequency features. Simultaneously capturing both time-domain and frequency-domain features is suitable for analyzing non-stationary signals, such as lightning interference.
[0059] The frequency domain feature vector, statistical feature vector, and time-frequency feature vector are concatenated to form a high-dimensional feature vector with dimension D = F + S + W. .
[0060] Since electromagnetic interference contains multi-dimensional information such as frequency, intensity, and waveform, a single feature cannot fully characterize its impact on electricity meters. Therefore, this invention sets up a method to extract frequency domain, statistical, and time-frequency features and fuse them into a high-dimensional vector. This can completely preserve interference information, improve the quality of model input, and enhance adaptability to complex interference.
[0061] Next, the high-dimensional feature vector Arranged into a sequence according to time steps Input to the spatiotemporal attention module. The spatiotemporal attention module performs the following processing steps in sequence:
[0062] 1. Location coding
[0063] Add location information to each time step, using the following formula:
[0064] The position is When, even-numbered dimensions (the first dimension) The sinusoidal position code value of (dimensional);
[0065] The position is When, odd-numbered dimensions (the first) The cosine position code value of (dimensional).
[0066] Positional encoding enables the analysis model to perceive the temporal position of features, thus solving the problem of permutation invariance in self-attention.
[0067] 2. Multi-head attention calculation
[0068] The high-dimensional feature vector after position encoding is input into the multi-head self-attention mechanism to calculate the correlation weight between features at any two time steps. For example, the coupling strength between a 3.5 GHz radio frequency signal and a 50 Hz power frequency harmonic is calculated at different times.
[0069] The calculation formula is:
[0070] .
[0071] in, , , , It is a learnable linear transformation matrix; To output a linear transformation matrix, the concatenated features are mapped to the final dimension (aligned with the overall dimension of the model).
[0072] 3. Bidirectional GRU timing modeling
[0073] The self-attention output is input into a bidirectional GRU to capture temporal dependencies, thereby obtaining the hidden state sequence. , For the hidden layer dimension.
[0074] , representing the hidden state of the forward GRU at time t.
[0075] , representing the hidden state of the backward GRU at time t.
[0076] This represents hiding the forward state. and backward hidden state It involves splicing together elements in different dimensions.
[0077] This leads to the hidden state sequence. Each It includes global correlation and time-series dynamic information.
[0078] This step utilizes a bidirectional GRU, which can simultaneously leverage past and future information to capture long-term temporal dependencies, such as the periodicity of interference pulses.
[0079] Electromagnetic interference exhibits long-distance dependence and temporal dynamic changes. The multi-head self-attention mechanism used in this invention can capture the feature correlations at different time steps, while the bidirectional GRU can handle temporal dependence. The combination of the two improves the ability to identify complex interference patterns, reduces long sequence prediction errors, and improves computational efficiency.
[0080] Next, the hidden state sequence The input is fed into the probability prediction layer, which performs the following processing steps:
[0081] To eliminate temporal length differences and make it suitable for batch processing of interference data of different lengths, the features in the temporal dimension are first averaged and compressed into a feature vector of fixed length. :
[0082] .
[0083] This invention designs a two-layer residual network. The first layer is used for nonlinear transformation to effectively fit the nonlinear relationship between disturbance and error, while the second layer is used to prevent gradient vanishing.
[0084] Nonlinear transformation based on the first-layer residual network:
[0085] ;
[0086] Residual connections are performed based on the second-layer residual network:
[0087] .
[0088] After completing the residual join, Output offset probabilities using fully connected layers and activation functions (e.g., sigmoid):
[0089]
[0090] in, This indicates the probability that the power detection data exceeds an offset threshold (e.g., ±0.5%). , , These represent the weight matrix, , , For bias terms, This represents the Sigmoid activation function.
[0091] Furthermore, the spatiotemporal attention module employs a multi-head self-attention mechanism to perform global dependency modeling on the high-dimensional feature vector, obtaining an intermediate representation containing long-distance feature associations, including:
[0092] The spatiotemporal attention module repeatedly concatenates the reference feature vector corresponding to the current region with the high-dimensional feature vector to obtain an enhanced feature matrix. The reference feature vector is obtained by integrating the signal features of several typical electromagnetic interference signals in the current region.
[0093] A multi-head self-attention mechanism is used to perform global dependency modeling on the enhanced feature matrix to obtain an intermediate representation containing long-distance feature associations.
[0094] Typical electromagnetic interference (EMI) in different regions (e.g., harmonics in industrial areas, communication signals in commercial areas) exhibits significant differences in characteristics. In this embodiment, the present invention designs a reference feature vector based on the signal characteristics of typical EMI signals in the region, providing "prior knowledge" for the spatiotemporal attention module. This allows the spatiotemporal attention module to quickly match known interference types, narrowing the feature search space and improving sensitivity to typical EMI within the region. Specifically:
[0095] Based on the electricity meter installation area (e.g., via GPS positioning or power system topology identification), a set of typical interference signals is retrieved from the built-in database. For example:
[0096] Industrial Zone: Extract signals such as inverter harmonics (1800Hz) and motor magnetic field (50Hz);
[0097] Commercial area: retrieve signals from 5G base stations (3.5GHz), WiFi signals (2.4GHz), etc.
[0098] Feature extraction was performed on the aforementioned typical interference signals (including frequency domain features, statistical features, and time-frequency features), and these features were integrated into a reference feature vector using principal component analysis (PCA) or clustering algorithms. Through learnable projection matrices Will Mapped to the same dimension space as the high-dimensional feature vectors, i.e. .
[0099] High-dimensional feature vectors With reference feature vector of the region In practice, repeated splicing is performed to form an enhanced feature matrix. .
[0100] Enhance the feature matrix As input to the multi-head self-attention mechanism, the query matrix Key matrix Value matrix Set all to .
[0101] Then, global dependency modeling is performed in the same way as in the previous embodiments to obtain an intermediate representation containing long-distance feature associations, which will not be described in detail here.
[0102] The aforementioned enhanced feature matrix enables the self-attention mechanism to simultaneously learn the correlation between the current interference and typical regional interference. For example, if the current interference matches the reference feature (e.g., a known frequency band harmonic appears in an industrial park), it is given a high weight for rapid identification; if a rare regional feature appears (e.g., an unknown frequency band signal generated by a new type of equipment), the anomaly is highlighted through weight comparison, thereby improving the sensitivity to unknown interference.
[0103] Furthermore, the reference feature vector is derived by integrating the signal characteristics of several typical electromagnetic interference signals in the area, including:
[0104] Identify multiple typical electromagnetic interference signals corresponding to the area and determine the typicality value of each typical electromagnetic interference signal; determine the corresponding typicality threshold based on the anti-interference capability level of the energy meter's anti-interference mechanism.
[0105] The reference feature vector is derived by integrating the signal characteristics of each typical electromagnetic interference signal whose typicality value is higher than the typicality threshold.
[0106] While referencing feature vectors can improve the analysis model's ability to identify complex interference patterns, the anti-interference capabilities (e.g., hardware shielding, software filtering) of different energy meters vary significantly. For energy meters with high anti-interference capabilities, there is no need to process low-threat interference, thus avoiding computational redundancy. For example, for precision energy meters in substations (anti-interference level 5), a higher typicality threshold can be set to allow the spatiotemporal attention module of the analysis model to use strong interference features for reference more often, thereby reducing unnecessary computation and mitigating interference from "atypical" electromagnetic interference signals. Specifically:
[0107] Cluster analysis of historical interference signals within the region (e.g., using the DBSCAN algorithm) can identify typical interference types (e.g., 5G base station signals, power frequency harmonics, impulse interference, etc.).
[0108] The following dimensions are considered comprehensively: (1) Frequency of occurrence: the percentage of times the signal appears per unit time; (2) Strength stability: the reciprocal of the standard deviation of signal strength fluctuation; (3) Degree of influence: the historical impact of the signal on the metering error of the electricity meter. A typicality value is calculated for each typical electromagnetic interference signal. Specifically, a comprehensive score is obtained by weighting the scores of the above dimensions and using it as the typicality value.
[0109] At the same time, the anti-interference capability level is determined in advance based on the hardware protection level of the electricity meter (e.g., IEC 61000-4 standard) and the effectiveness of the software algorithm. And, the typicality threshold is determined through a piecewise function, for example:
[0110]
[0111] in, Based on the threshold, The maximum threshold, is the gradient step size for the threshold.
[0112] For low-impact meters, such as ordinary residential electricity meters, a lower typicality threshold is used to include more interference types to enhance early warning; for high-impact meters, such as precision meters in substations, a higher typicality threshold is used to focus on strong interferences to reduce computational overhead.
[0113] like Figure 3 As shown, this embodiment of the invention also provides an automatic error calibration system 10 for an electricity meter, which is applied to an electricity meter. The system includes an acquisition unit 101, a calibration analysis unit 102, and a calibration unit 103.
[0114] The acquisition unit 101 is used to acquire interference characteristic data of electromagnetic signals in the area where the electricity meter is located, and to determine whether the electromagnetic signal belongs to a preset interference type based on the interference characteristic data.
[0115] The calibration analysis unit 102 is used to analyze and process the interference feature data using an analysis model when the electromagnetic signal does not belong to a preset interference type, and predict the offset probability; the offset probability is used to characterize the probability that the power detection data of the power meter equipped with an anti-interference mechanism will be higher than the offset threshold under the interference of the electromagnetic signal.
[0116] The calibration unit 103 is used to initiate automatic calibration of the energy meter if the offset probability is higher than the probability threshold, and not to initiate automatic calibration of the energy meter otherwise.
[0117] Furthermore, the acquisition unit 101 is specifically used for:
[0118] Determine whether each element feature in the interference feature data exceeds the corresponding preset threshold. If so, perform feature matching based on each element feature and each preset interference type in the pre-built interference type standard library.
[0119] If a preset interference type exists where all the aforementioned element features are successfully matched, then the electromagnetic signal is determined to belong to the preset interference type.
[0120] Furthermore, the analysis model includes a feature encoding layer, a spatiotemporal attention module, and a probability prediction layer; therefore, the calibration analysis unit 102 is specifically used for:
[0121] The feature coding layer extracts frequency domain feature vectors, statistical feature vectors, and time-frequency feature vectors from the interference feature data to form high-dimensional feature vectors.
[0122] The spatiotemporal attention module uses a multi-head self-attention mechanism to perform global dependency modeling on the high-dimensional feature vector, obtaining an intermediate representation containing long-distance feature associations. The intermediate representation is then used to capture temporal dynamic features through a bidirectional GRU network to obtain a hidden state sequence.
[0123] The probability prediction layer compresses the hidden state sequence into a fixed-length feature vector through global average pooling, performs a nonlinear transformation on the feature vector through two layers of residual network, and outputs the offset probability through a fully connected layer and activation function.
[0124] Furthermore, the calibration analysis unit 102 is specifically used for:
[0125] The spatiotemporal attention module repeatedly concatenates the reference feature vector corresponding to the current region with the high-dimensional feature vector to obtain an enhanced feature matrix. The reference feature vector is obtained by integrating the signal features of several typical electromagnetic interference signals in the current region.
[0126] A multi-head self-attention mechanism is used to perform global dependency modeling on the enhanced feature matrix to obtain an intermediate representation containing long-distance feature associations.
[0127] Furthermore, the acquisition unit 101 is also used to acquire the reference feature vector; the reference feature vector is obtained in advance by integrating it in the following manner:
[0128] Identify multiple typical electromagnetic interference signals corresponding to the area and determine the typicality value of each typical electromagnetic interference signal; determine the corresponding typicality threshold based on the anti-interference capability level of the energy meter's anti-interference mechanism.
[0129] The reference feature vector is derived by integrating the signal characteristics of each typical electromagnetic interference signal whose typicality value is higher than the typicality threshold.
[0130] This invention also provides an electronic device comprising: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the computer program being executed by the processor to implement the method as described in any of the preceding claims.
[0131] This invention also provides a computer storage medium storing a computer program executable by a processor, the computer program being executed by the processor to implement the method as described in any of the preceding claims.
[0132] This invention also provides a computer program product comprising a computer program executable by a processor to perform the method as described in any of the preceding claims.
[0133] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0134] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for automatically calibrating errors of an electric energy meter, applied to an electric energy meter, characterized in that, The method comprises the following steps: Obtaining interference characteristic data of an electromagnetic signal in the area where the electric energy meter is located, and determining whether the electromagnetic signal belongs to a preset interference type based on the interference characteristic data; When the electromagnetic signal does not belong to the preset interference type, using an analysis model to analyze and process the interference characteristic data, and predicting a deviation probability; the deviation probability is used to represent the probability of the electric energy detection data of the electric energy meter equipped with an anti-interference mechanism being higher than a deviation threshold value under the interference of the electromagnetic signal; If the deviation probability is higher than a probability threshold value, automatic calibration of the electric energy meter is started, otherwise, automatic calibration of the electric energy meter is not started; The analysis model comprises a feature encoding layer, a space-time attention module and a probability prediction layer; the analysis model is used to analyze and process the interference characteristic data, and the deviation probability is predicted, which comprises: The feature encoding layer extracts a frequency domain feature vector, a statistical feature vector and a time-frequency feature vector from the interference characteristic data to form a high-dimensional feature vector; The space-time attention module uses a multi-head self-attention mechanism to model global dependence of the high-dimensional feature vector to obtain an intermediate representation containing long-distance feature correlation; the intermediate representation is subjected to time sequence dynamic feature capture through a bidirectional GRU network to obtain a hidden state sequence; The probability prediction layer compresses the hidden state sequence into a fixed-length feature vector through a global average pooling operation, and performs non-linear transformation on the feature vector through two residual networks; the deviation probability is output through a fully connected layer and an activation function.
2. The method for automatically calibrating error of an electric energy meter according to claim 1, characterized in that: The method comprises the following steps: Determine whether each element feature in the interference characteristic data exceeds a corresponding preset threshold value; if so, perform feature matching based on each element feature and each preset interference type in a pre-constructed interference type standard library; If there is a preset interference type in which each element feature is successfully matched, it is determined that the electromagnetic signal belongs to the preset interference type.
3. The method for automatically calibrating error of an electric energy meter according to claim 1, characterized in that: The space-time attention module uses a multi-head self-attention mechanism to model global dependence of the high-dimensional feature vector to obtain an intermediate representation containing long-distance feature correlation, which comprises: The space-time attention module repeatedly splices the reference feature vector corresponding to the area and the high-dimensional feature vector to obtain an enhanced feature matrix; the reference feature vector is integrated based on the signal features of a plurality of typical electromagnetic interference signals in the area; The multi-head self-attention mechanism is used to model global dependence of the enhanced feature matrix to obtain an intermediate representation containing long-distance feature correlation.
4. The method for automatically calibrating error of an electric energy meter according to claim 3, characterized in that: The reference feature vector is integrated based on the signal features of a plurality of typical electromagnetic interference signals in the area, which comprises: Determine a plurality of typical electromagnetic interference signals corresponding to the area, and determine a typical degree value of each typical electromagnetic interference signal; determine a typical degree threshold value corresponding to the anti-interference ability level of the anti-interference mechanism of the electric energy meter; The reference feature vector is integrated based on the signal features of each typical electromagnetic interference signal whose typical degree value is higher than the typical degree threshold value.
5. An automatic error calibration system of an electric energy meter, applied to an electric energy meter, characterized in that, The system comprises an acquisition unit, a calibration analysis unit and a calibration unit. The acquisition unit is configured to acquire interference characteristic data of an electromagnetic signal in a region where an electric energy meter is located, and determine whether the electromagnetic signal belongs to a preset interference type based on the interference characteristic data. The calibration analysis unit is configured to analyze and process the interference characteristic data using an analysis model to predict a drift probability when the electromagnetic signal does not belong to the preset interference type, wherein the drift probability is used to represent a probability of electric energy detection data of the electric energy meter equipped with an anti-interference mechanism being higher than a drift threshold value under the interference of the electromagnetic signal. The calibration unit is configured to start automatic calibration of the electric energy meter if the drift probability is higher than a probability threshold value, and not to start automatic calibration of the electric energy meter otherwise. The analysis model comprises a feature encoding layer, a space-time attention module and a probability prediction layer, and the analysis model is used to analyze and process the interference characteristic data to predict the drift probability, including: The feature encoding layer extracts a frequency domain feature vector, a statistical feature vector and a time-frequency feature vector from the interference characteristic data to form a high-dimensional feature vector. The space-time attention module uses a multi-head self-attention mechanism to model global dependence of the high-dimensional feature vector to obtain an intermediate representation containing long-distance feature correlation, and the intermediate representation is subjected to time sequence dynamic feature capture through a bidirectional GRU network to obtain a hidden state sequence. The probability prediction layer compresses the hidden state sequence into a fixed-length feature vector through a global average pooling operation, and performs non-linear transformation on the feature vector through two layers of residual network, and outputs the drift probability through a fully connected layer and an activation function.
6. The automatic error calibration system of an electric energy meter according to claim 5, characterized in that: The acquisition unit is specifically configured to: determine whether each element feature in the interference characteristic data exceeds a corresponding preset threshold value, and if so, perform feature matching based on each element feature and each preset interference type in a pre-constructed interference type standard library; if there is a preset interference type to which each element feature is successfully matched, it is determined that the electromagnetic signal belongs to the preset interference type.
7. An electronic device, comprising: The electronic device comprises at least one processor, a memory and a computer program stored in the memory and executable on the at least one processor, wherein the computer program is executed by the processor to implement the method according to any one of claims 1-4.
8. A computer storage medium, characterized in that: The computer storage medium stores a computer program executable by a processor, wherein the computer program is executed by the processor to implement the method according to any one of claims 1-4.
9. A computer program product, characterised in that: The computer program product comprises a computer program executable by a processor, wherein the computer program is executed by the processor to implement the method according to any one of claims 1-4.
Citation Information
Patent Citations
Ammeter metering error compensation method and system based on Eyring-normal distribution model
CN113899912A
Electric energy metering method and system based on historical data analysis
CN117272117A