Electric energy meter voltage out-of-tolerance identification method and system

By using the Transformer model to construct the power meter voltage overdifference recognition model, the problem of low efficiency, low reliability and accuracy of power meter voltage overdifference recognition in the prior art is solved, and more efficient, reliable and accurate voltage overdifference recognition is achieved.

CN119807744APending Publication Date: 2025-04-11STATE GRID HUNAN ELECTRIC POWER COMPANY LIMITED +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411874913.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The identification of the voltage difference of the power meter in existing power systems depends on manual timing detection, which has low efficiency, low reliability and accuracy.

Method used

The Transformer model is used to build the voltage difference recognition model of the power meter. By pre-processing and data augmenting the power meter data, the training data set is constructed, and the model is trained through the cross entropy loss function, the automatic identification of voltage difference is achieved.

Benefits of technology

It improves the reliability and accuracy of the voltage difference recognition of the power meter, improves the recognition efficiency, reduces manual intervention, and can detect and identify voltage difference more quickly and accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807744A_ABST
    Figure CN119807744A_ABST
Patent Text Reader

Abstract

The invention discloses an electric energy meter voltage out-of-tolerance identification method. The method comprises the steps of obtaining data information of an existing electric energy meter and preprocessing the data information to obtain a basic data set; performing data enhancement on the basic data set to obtain a training data set; constructing an electric energy meter voltage out-of-tolerance identification primary model by adopting a Transform model, and training by adopting the training data set to obtain an electric energy meter voltage out-of-tolerance identification model; and carrying out actual voltage out-of-tolerance identification on the electric energy meter by adopting the obtained voltage out-of-tolerance identification model of the electric energy meter. The invention also discloses a system for realizing the electric energy meter voltage out-of-tolerance identification method. According to the electric energy meter voltage out-of-tolerance identification method, the existing data are preprocessed and enhanced, and the voltage out-of-tolerance identification model is constructed by adopting the Transform model and is trained, so that the voltage out-of-tolerance identification of the electric energy meter is realized, the reliability is higher, the accuracy is better, and the efficiency is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of electrical automation, and in particular relates to a method and system for identifying voltage excess tolerance of an electric energy meter. Background Art

[0002] With the development of economy and technology and the improvement of people's living standards, electricity has become an indispensable secondary energy source in people's production and life, bringing endless convenience to people's production and life. Therefore, ensuring the stable and reliable supply of electricity has become one of the most important tasks of the power system.

[0003] Electricity metering data is an important basic data of the power system. Accurate and reliable electricity metering results can provide sufficient data support for the formulation of power system development plans and operation plans. Therefore, accurate and reliable electricity metering is of great significance to the power system.

[0004] The voltage tolerance of the electric energy meter in the power system seriously affects the stability and reliability of electric energy measurement. At present, the solution for identifying the voltage tolerance of the electric energy meter is still the scheme of timed detection and manual identification, that is, the power system staff will manually go to the site to detect and identify the voltage tolerance of the electric energy meter according to the set maintenance plan. However, this manual detection solution is not only time-consuming and labor-intensive, but also inefficient, and has low reliability and accuracy. Summary of the invention

[0005] One of the purposes of the present invention is to provide a method for identifying voltage excess tolerance of an electric energy meter with high reliability, good accuracy and high efficiency.

[0006] A second object of the present invention is to provide a system for implementing the method for identifying excessive voltage differences in electric energy meters.

[0007] The method for identifying voltage excess tolerance of an electric energy meter provided by the present invention comprises the following steps:

[0008] S1. Obtain data information of existing electricity meters;

[0009] S2. Preprocess the data information obtained in step S1 to obtain a basic data set;

[0010] S3. Perform data enhancement on the basic data set obtained in step S2 to obtain a training data set;

[0011] S4. Use the Transformer model to build a primary model for identifying voltage deviation of electric energy meters;

[0012] S5. Using the training data set obtained in step S3, the initial model for identifying excessive voltage difference of the electric energy meter constructed in step S4 is trained to obtain an excessive voltage difference identification model of the electric energy meter;

[0013] S6. Using the electric energy meter voltage tolerance identification model obtained in step S5, actual electric energy meter voltage tolerance identification is performed.

[0014] The step S1 of obtaining the data information of the existing electric energy meter specifically includes the following steps:

[0015] Taking the substation as a unit, the current data information and voltage data information of the electric energy meters in several substations are obtained.

[0016] Step S2 preprocesses the data information obtained in step S1 to obtain a basic data set, which specifically includes the following steps:

[0017] In the data information obtained in step S1, for the ith electric energy meter, the N nearest neighboring electric energy meters to the ith electric energy meter are obtained, each electric energy meter obtains M days of voltage data, and the distance d between the ith electric energy meter and the jth nearest neighboring electric energy meter is calculated using the following formula: ij :

[0018] d ij =Median(Distance(U i ,U j ))

[0019] Where Median is the median function; Distance(U i ,U j ) is the voltage data U of the i-th electric energy meter i and the voltage data U of the jth neighboring electric energy meter j Voltage correlation distance; Distance(U i ,U j ) is calculated as in is the voltage data U of the i-th electric energy meter i The average value of is the voltage data U of the jth electric energy meter j The average value of

[0020] The voltage distance matrix D of the electric energy meter in the substation is obtained as D = [d ij ];

[0021] For the ith electric energy meter, obtain the N nearest neighboring electric energy meters of the ith electric energy meter in terms of distance, calculate the median of the voltage data of the N nearest neighboring electric energy meters at each moment, and use the obtained median as the reference voltage of the ith electric energy meter at each moment, and calculate the voltage error value of the ith electric energy meter based on the reference voltage;

[0022] Finally, the electric energy meters with voltage error values ​​within the set range and the corresponding reference voltages are selected to construct the basic data set.

[0023] Step S3 performs data enhancement on the basic data set obtained in step S2 to obtain a training data set, which specifically includes the following steps:

[0024] The negative samples are set as sample data with voltage within tolerance, and the positive samples are set as sample data with voltage exceeding tolerance;

[0025] Determine the load type of each electric energy meter based on the daily average current value of each electric energy meter in the basic data set;

[0026] Select normal negative samples: In the basic data set, select several sample data with no voltage deviation in each load type as normal negative samples of each load type;

[0027] Positive sample enhancement of voltage stability out-of-tolerance mode: In the basic data set, select several sample data with no voltage out-of-tolerance in each load type, and randomly select an out-of-tolerance value within the voltage out-of-tolerance range. Then, according to the selected out-of-tolerance value, the sample data with no voltage out-of-tolerance in each load type are enhanced with positive samples of voltage stability out-of-tolerance mode.

[0028] Positive sample enhancement of voltage gradient variation mode: In the basic data set, select several sample data with no voltage variation in each load type, and select several variation values ​​in the voltage variation range. The selected variation values ​​are increased according to the set rules, and the sample data with no voltage variation in each load type are enhanced with positive samples of voltage gradient variation mode according to the selected variation values.

[0029] Positive sample enhancement of voltage variation out-of-tolerance mode: In the basic data set, select several sample data with no voltage out-of-tolerance in each load type, and randomly select several out-of-tolerance values ​​within the voltage out-of-tolerance range. Then, according to the selected out-of-tolerance values, the sample data with no voltage out-of-tolerance in each load type are enhanced with positive samples of voltage variation out-of-tolerance mode;

[0030] Enhancement of negative samples of voltage tolerance in T-connection mode: In the basic data set, select several sample data with no voltage tolerance in each load type. According to the line length and line impedance between the T-connection electric energy meter and the power supply starting point, enhance the negative samples of voltage tolerance in T-connection mode for the sample data with no voltage tolerance in each load type.

[0031] According to the on-site inspection of the power system, several electric energy meters with voltage out-of-tolerance and T-connection non-out-of-tolerance were selected as sample data;

[0032] Label all the sample data obtained;

[0033] Finally, the training dataset is constructed.

[0034] Defining the load type of each electric energy meter based on the daily average current value of each electric energy meter in the basic data set specifically includes the following steps:

[0035] According to the daily average current value of each electric energy meter in the basic data set, the daily current mean of each electric energy meter is calculated, and the daily current mean values ​​of the 25% to 75% quantiles are selected and then the current mean is calculated to obtain the current mean data of each electric energy meter;

[0036] Based on the current mean data of each electric energy meter, the load type of each electric energy meter is divided as follows:

[0037] If the current average is less than the first current threshold, it is determined to be a small load type;

[0038] If the current average is not less than the first current threshold and less than the second current threshold, it is determined to be a medium load type;

[0039] If the current average is not less than the second current threshold, it is determined to be a heavy load type;

[0040] The second current threshold is greater than the first current threshold.

[0041] The voltage stability out-of-tolerance mode positive sample enhancement specifically includes the following steps:

[0042] In the basic data set, select several sample data with no voltage deviation in each load type;

[0043] Randomly select an excess value within the voltage excess range;

[0044] According to the selected deviation value, the following formula is used to enhance the positive samples of voltage stability deviation mode for the sample data of voltage without deviation of each load type:

[0045]

[0046] In the formula is the data after the positive sample of the voltage stability out-of-tolerance mode is enhanced; e is the selected out-of-tolerance value; u i is the sample data with no voltage deviation; n i is the set voltage random disturbance value.

[0047] The voltage gradient out-of-tolerance mode positive sample enhancement specifically includes the following steps:

[0048] In the basic data set, select several sample data with no voltage deviation in each load type;

[0049] Select several voltage tolerance values ​​e1~e1 within the voltage tolerance range. d , and the selected deviation value increases according to the set rule, expressed as e d =e d-1 ×v,e d is the dth excess value, e d-1 is the d-1th excess value, and v is the set growth rate;

[0050] According to the selected deviation value, the following formula is used to enhance the positive samples of the voltage gradient deviation mode for the sample data of each load type without deviation:

[0051]

[0052] In the formula This is the data after the positive samples of the voltage gradient out-of-tolerance mode are enhanced.

[0053] The voltage variation out-of-tolerance mode positive sample enhancement specifically includes the following steps:

[0054] In the basic data set, select several sample data with no voltage deviation in each load type;

[0055] Randomly select several voltage tolerance values ​​within the voltage tolerance range;

[0056] According to the selected deviation value, the following formula is used to enhance the positive samples of the voltage deviation deviation mode for the sample data of each load type without deviation:

[0057]

[0058] In the formula is the data after the positive sample of the voltage variation out-of-tolerance mode is enhanced; e d3 is a randomly selected excess value, and e d3 =random(sign(min(m min ,error-r)),sign(max(m max ,error+r))), where random() is the random value function, sign is the sign function, m min is the minimum value of the tolerance range, m max is the maximum value of the voltage tolerance range, error is the random error within the voltage tolerance range, and r is the random width of the voltage tolerance range.

[0059] The T-connection mode voltage over-tolerance negative sample enhancement specifically includes the following steps:

[0060] In the basic data set, select several sample data with no voltage deviation in each load type;

[0061] According to the line length l between the T-connected energy meter and the power supply starting point and the unit line impedance R, the following formula is used to enhance the negative samples of voltage deviation in the T-connected mode for the sample data of voltage without deviation of each load type:

[0062]

[0063] In the formula is the data after the voltage tolerance negative sample of T-connection mode is enhanced; i i for u i The corresponding current data.

[0064] The transformer model described in step S4 is used to construct a primary model for identifying voltage deviation of an electric energy meter, which specifically includes the following steps:

[0065] The processing process of the constructed primary model for identifying voltage deviation of electric energy meters includes:

[0066] The input data is divided into several time series subsequences based on the set time unit;

[0067] Linear projection is used to map the time series subsequences into a high-dimensional embedding space as a sequence embedding vector;

[0068] Introduce category tags to connect all subsequence features and realize full time series feature extraction;

[0069] The position information of the sub-time series is encoded into a specific position vector using the following formula:

[0070]

[0071] Where PE pos=2i is the encoding result when the subsequence position is even; pos is the subsequence position; 2i is the position of the subsequence even dimension, 2i+1 is the position of the subsequence odd dimension; d is the vector dimension; PE pos=2i+1 is the encoding result when the subsequence position is an odd number;

[0072] Add the position vector and category label to the sequence embedding vector as the input of the multi-head attention mechanism;

[0073] Multi-head attention mechanism: The multi-head attention mechanism is used to assign different attention weights to different subspace learning mechanisms; different attention heads are spliced ​​and multi-head attention values ​​are obtained through linear mapping; the feedforward neural network is used, and nonlinear transformation and feature mapping are used to further process the extracted features into more abstract features;

[0074] For the linear output layer results, the softmax function is used to calculate the distribution of voltage tolerance categories, thereby obtaining the final probability distribution of voltage tolerance categories, which is expressed as

[0075]

[0076] Where y z The probability distribution of the final voltage tolerance category output by the model; is the category label feature output by the last layer of the model; W0 is the weight matrix; b0 is the bias vector; softmax is the softmax function;

[0077] Finally, select y z The voltage tolerance category corresponding to the maximum value of the medium probability is used as the tolerance category determination result output by the model.

[0078] The training described in step S5 specifically includes the following steps:

[0079] The cross entropy loss is used as the loss function to train the model.

[0080] The present invention also provides a system for realizing the method for identifying voltage deviation of electric energy meters, comprising a data acquisition module, a data preprocessing module, a data enhancement module, a model construction module, a model training module and a deviation identification module; the data acquisition module, the data preprocessing module, the data enhancement module, the model construction module, the model training module and the deviation identification module are connected in series in sequence; the data acquisition module is used to acquire data information of the existing electric energy meter and upload the data information to the data preprocessing module; the data preprocessing module is used to preprocess the acquired data information according to the received data information to obtain a basic data set, and upload the data information to the data enhancement module; the data enhancement module is used to perform preprocessing on the acquired data information according to the received data information to obtain a basic data set, and upload the data information to the data enhancement module; The basic data set is enhanced to obtain a training data set, and the data information is uploaded to the model construction module; the model construction module is used to use the Transformer model to construct a primary model for electric energy meter voltage deviation recognition based on the received data information, and upload the data information to the model training module; the model training module is used to use the obtained training data set to train the constructed initial model for electric energy meter voltage deviation recognition based on the received data information, obtain the electric energy meter voltage deviation recognition model, and upload the data information to the deviation recognition module; the deviation recognition module is used to use the obtained electric energy meter voltage deviation recognition model to perform actual voltage deviation recognition of the electric energy meter based on the received data information.

[0081] The method and system for identifying excessive voltage differences in electric energy meters provided by the present invention, by preprocessing and enhancing existing data and adopting a Transformer model to construct and train an excessive voltage difference identification model, not only realizes the identification of excessive voltage differences in electric energy meters, but also has higher reliability, better accuracy and higher efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 The figure is a schematic diagram of the method flow of the present invention.

[0083] Figure 2 It is a schematic diagram of the T-connection in the method of the present invention.

[0084] Figure 3 Schematic diagram of the functional modules of the system of the present invention. DETAILED DESCRIPTION

[0085] like Figure 1 The method flow chart of the method of the present invention is shown as follows: the method for identifying voltage excess difference of an electric energy meter disclosed in the present invention comprises the following steps:

[0086] S1. Obtaining data information of the existing electric energy meter; specifically comprising the following steps:

[0087] Taking the substation as a unit, obtaining the current data information and voltage data information of the electric energy meters in several substations;

[0088] S2. Preprocess the data information obtained in step S1 to obtain a basic data set; specifically, the steps include:

[0089] In the data information obtained in step S1, for the ith electric energy meter, the N nearest neighboring electric energy meters to the ith electric energy meter are obtained, each electric energy meter obtains M days of voltage data, and the distance d between the ith electric energy meter and the jth nearest neighboring electric energy meter is calculated using the following formula: ij :

[0090] d ij =Median(Distance(U i ,U j ))

[0091] Where Median is the median function; Distance(U i ,U j ) is the voltage data U of the i-th electric energy meter i and the voltage data U of the jth neighboring electric energy meter j Voltage correlation distance; Distance(U i ,U j ) is calculated as in is the voltage data U of the i-th electric energy meter i The average value of is the voltage data U of the jth electric energy meter j The average value of

[0092] The voltage distance matrix D of the electric energy meter in the substation is obtained as D = [d ij ];

[0093] For the ith electric energy meter, obtain the N nearest neighboring electric energy meters of the ith electric energy meter in terms of distance, calculate the median of the voltage data of the N nearest neighboring electric energy meters at each moment, and use the obtained median as the reference voltage of the ith electric energy meter at each moment, and calculate the voltage error value of the ith electric energy meter based on the reference voltage;

[0094] Finally, the electric energy meters with voltage error values ​​within the set range (preferably the allowable error is 1%) and the corresponding reference voltages are selected to construct the basic data set;

[0095] S3. Perform data enhancement on the basic data set obtained in step S2 to obtain a training data set; specifically, the steps include:

[0096] The negative samples are set as sample data with voltage within tolerance, and the positive samples are set as sample data with voltage exceeding tolerance;

[0097] According to the daily average current value of each electric energy meter in the basic data set, the load type of each electric energy meter is defined; specifically, the following steps are included:

[0098] According to the daily average current value of each electric energy meter in the basic data set, the daily current mean of each electric energy meter is calculated, and the daily current mean values ​​of the 25% to 75% quantiles are selected and then the current mean is calculated to obtain the current mean data of each electric energy meter;

[0099] Based on the current mean data of each electric energy meter, the load type of each electric energy meter is divided as follows:

[0100] If the current average is less than the first current threshold, it is determined to be a small load type;

[0101] If the current average is not less than the first current threshold and less than the second current threshold, it is determined to be a medium load type;

[0102] If the current average is not less than the second current threshold, it is determined to be a heavy load type;

[0103] The second current threshold is greater than the first current threshold, and preferably the first current threshold is 1A and the second current threshold is 10A;

[0104] Select normal negative samples: In the basic data set, select several sample data with no voltage deviation in each load type as normal negative samples of each load type;

[0105] Positive sample enhancement of voltage stability out-of-tolerance mode: In the basic data set, select several sample data with no voltage out-of-tolerance in each load type, and randomly select an out-of-tolerance value within the voltage out-of-tolerance range. According to the selected out-of-tolerance value, the sample data with no voltage out-of-tolerance in each load type are enhanced with positive samples of voltage stability out-of-tolerance mode; specifically, the following steps are included:

[0106] The voltage stability out-of-tolerance data feature refers to the fact that the error between the voltage of the out-of-tolerance meter and the reference voltage is greater than the allowable error value, and the out-of-tolerance value remains basically stable;

[0107] In the basic data set, select several sample data with no voltage deviation in each load type;

[0108] Randomly select an excess value within the voltage excess range;

[0109] According to the selected deviation value, the following formula is used to enhance the positive samples of voltage stability deviation mode for the sample data of voltage without deviation of each load type:

[0110]

[0111] In the formula is the data after the positive sample of the voltage stability out-of-tolerance mode is enhanced; e is the selected out-of-tolerance value; u i is the sample data with no voltage deviation; n i is the set voltage random disturbance value;

[0112] Positive sample enhancement of voltage gradient variation mode: In the basic data set, select several sample data with no voltage variation in each load type, and select several variation values ​​in the voltage variation range. The selected variation values ​​are increased according to the set rules, and the sample data with no voltage variation in each load type are enhanced with positive samples of voltage gradient variation mode according to the selected variation values. Specifically, the following steps are included:

[0113] The characteristic of voltage gradual variation out-of-tolerance data is that the error between the voltage of the out-of-tolerance meter and the reference voltage is greater than the allowable error value, and the out-of-tolerance value is not stable. The absolute value of the out-of-tolerance value increases continuously at a certain speed, and it starts from a non-out-of-tolerance state.

[0114] In the basic data set, select several sample data with no voltage deviation in each load type;

[0115] Select several voltage tolerance values ​​e1~e1 within the voltage tolerance range. d, and the selected deviation value increases according to the set rule, expressed as e d =e d-1 ×v,e d is the dth excess value, e d-1 is the d-1th excess value, and v is the set growth rate;

[0116] According to the selected deviation value, the following formula is used to enhance the positive samples of the voltage gradient deviation mode for the sample data of each load type without deviation:

[0117]

[0118] In the formula This is the data after the positive samples of the voltage gradient out-of-tolerance mode are enhanced;

[0119] Positive sample enhancement of voltage variation out-of-tolerance mode: In the basic data set, select several sample data with no voltage out-of-tolerance in each load type, and randomly select several out-of-tolerance values ​​within the voltage out-of-tolerance range. According to the selected out-of-tolerance values, the sample data with no voltage out-of-tolerance in each load type are enhanced with positive samples of voltage variation out-of-tolerance mode; specifically, the following steps are included:

[0120] The characteristic of voltage gradient out-of-tolerance data refers to that the error value between the voltage of the out-of-tolerance meter and the reference voltage is greater than the allowable error value, and the out-of-tolerance value is not stable, and the error value size is a random state, and an error random range is set;

[0121] In the basic data set, select several sample data with no voltage deviation in each load type;

[0122] Randomly select several voltage tolerance values ​​within the voltage tolerance range;

[0123] According to the selected deviation value, the following formula is used to enhance the positive samples of the voltage deviation deviation mode for the sample data of each load type without deviation:

[0124]

[0125] In the formula is the data after the positive sample of the voltage variation out-of-tolerance mode is enhanced; e d3 is a randomly selected excess value, and e d3 =random(sign(min(m min ,error-r)),sign(max(m max ,error+r))), where random() is the random value function, sign is the sign function, m min is the minimum value of the tolerance range, m maxis the maximum value of the voltage tolerance range, error is the random error within the voltage tolerance range, and r is the random width of the voltage tolerance range;

[0126] Enhancement of negative samples of voltage tolerance in T-connection mode: In the basic data set, select several sample data with no voltage tolerance in each load type, and perform T-connection mode voltage tolerance negative sample enhancement on the sample data with no voltage tolerance in each load type according to the line length and line impedance between the T-connection electric energy meter and the power supply starting point; specifically, the following steps are included:

[0127] T-connection is a common situation that can easily cause misjudgment of voltage excess, where T-connection is defined as a situation where a certain electric energy meter is far away from other electric energy meters on the same voltage branch, such as Figure 2 As shown in the figure: the single electric energy meter on the right and the meter box on the left are in the same power supply branch, and the power supply starting point is close. However, since the electric energy meter is far away from the power supply starting point and the line impedance value is large, the voltage not only fluctuates similarly with the voltage at the power supply starting point, but is also affected by its power consumption state. One phenomenon caused is that the voltage shape is similar to the voltage shape of the meter box, but due to its line impedance, its voltage value is smaller than the power supply starting voltage. When obtaining the reference voltage, the N electric meters in the meter box are generally taken as the nearest neighbor meters, and the median of their voltage at each moment is obtained as the reference voltage. At this time, it may be calculated that its error value exceeds the normal operating error value, and it is judged as an electric energy meter with voltage out-of-tolerance. However, in reality, the voltage measurement state of this electric energy meter is normal, and the voltage drop is caused by line impedance. Therefore, it is necessary to exclude the out-of-tolerance meter detected in this case, so it is necessary to perform negative sample enhancement on the normal state of the electric energy meter in T-connection mode;

[0128] The voltage does not exceed the tolerance data characteristics under T-connection. The voltage of the T-connected meter has a strong relationship with its power consumption, and has a strong relationship with the voltage of the T-connected adjacent meter when no power is used. The change of voltage under power consumption is mainly determined by the impedance from the starting point of the power supply branch to its installation location and the size of its line current.

[0129] In the basic data set, select several sample data with no voltage deviation in each load type;

[0130] According to the line length l between the T-connected energy meter and the power supply starting point and the unit line impedance R, the following formula is used to enhance the negative samples of voltage deviation in the T-connected mode for the sample data of voltage without deviation of each load type:

[0131]

[0132] In the formula is the data after the voltage tolerance negative sample of T-connection mode is enhanced; i i for u i Corresponding current data;

[0133] According to the on-site inspection of the power system, several electric energy meters with voltage out-of-tolerance and T-connection non-out-of-tolerance were selected as sample data;

[0134] Label all the sample data obtained;

[0135] In addition, in the obtained data set, the number of samples is kept balanced, and the sample data fluctuates above and below the preset threshold X, with a floating range of no more than 10%, to avoid the adverse effects of sample imbalance on the model;

[0136] Finally, the training data set is constructed;

[0137] S4. Use the Transformer model to build a primary model for identifying voltage deviation of electric energy meters; specifically, the following steps are included:

[0138] The processing process of the constructed primary model for identifying voltage deviation of electric energy meters includes:

[0139] The input data is divided into several time series subsequences based on the set time unit;

[0140] Linear projection is used to map the time series subsequences into a high-dimensional embedding space as a sequence embedding vector;

[0141] Introduce category tags to connect all subsequence features and realize full time series feature extraction;

[0142] The position information of the sub-time series is encoded into a specific position vector using the following formula:

[0143]

[0144] Where PE pos=2i is the encoding result when the subsequence position is even; pos is the subsequence position; 2i is the position of the subsequence even dimension, 2i+1 is the position of the subsequence odd dimension; d is the vector dimension; PE pos=2i+1 is the encoding result when the subsequence position is an odd number;

[0145] Add the position vector and category label to the sequence embedding vector as the input of the multi-head attention mechanism;

[0146] Multi-head attention mechanism: The multi-head attention mechanism is used to assign different attention weights to different subspace learning mechanisms; different attention heads are spliced ​​and multi-head attention values ​​are obtained through linear mapping; the feedforward neural network is used, and nonlinear transformation and feature mapping are used to further process the extracted features into more abstract features;

[0147] For the linear output layer results, the softmax function is used to calculate the distribution of voltage tolerance categories, thereby obtaining the final probability distribution of voltage tolerance categories, which is expressed as

[0148]

[0149] Where y z The probability distribution of the final voltage tolerance category output by the model; is the category label feature output by the last layer of the model; W0 is the weight matrix; b0 is the bias vector; softmax is the softmax function;

[0150] Finally, select y z The voltage tolerance category corresponding to the maximum value of the medium probability is used as the tolerance category determination result output by the model;

[0151] S5. Using the training data set obtained in step S3, the initial model for identifying excessive voltage difference of the electric energy meter constructed in step S4 is trained to obtain an excessive voltage difference identification model of the electric energy meter;

[0152] During training, cross entropy loss is used as the loss function to train the model;

[0153] S6. Using the electric energy meter voltage tolerance identification model obtained in step S5, actual electric energy meter voltage tolerance identification is performed.

[0154] like Figure 3The functional module schematic diagram of the system of the present invention is shown as follows: the system disclosed in the present invention for realizing the method for identifying voltage deviation of the electric energy meter comprises a data acquisition module, a data preprocessing module, a data enhancement module, a model construction module, a model training module and a deviation identification module; the data acquisition module, the data preprocessing module, the data enhancement module, the model construction module, the model training module and the deviation identification module are connected in series in sequence; the data acquisition module is used to acquire the data information of the existing electric energy meter and upload the data information to the data preprocessing module; the data preprocessing module is used to preprocess the acquired data information according to the received data information to obtain a basic data set, and upload the data information to the data enhancement module; the data enhancement module is used to The data information is used to enhance the basic data set obtained to obtain the training data set, and upload the data information to the model construction module; the model construction module is used to use the Transformer model to construct a primary model for identifying excessive voltage differences of the electric energy meter according to the received data information, and upload the data information to the model training module; the model training module is used to use the obtained training data set to train the constructed initial model for identifying excessive voltage differences of the electric energy meter according to the received data information, to obtain the excessive voltage difference identification model of the electric energy meter, and upload the data information to the excessive voltage identification module; the excessive voltage identification module is used to use the obtained excessive voltage difference identification model of the electric energy meter according to the received data information to perform actual excessive voltage difference identification of the electric energy meter.

Claims

1. A method for identifying voltage tolerance of an electric energy meter, comprising the following steps: S1. Obtain data information of existing electric energy meters; S2. Preprocess the data information obtained in step S1 to obtain a basic data set; S3. Perform data enhancement on the basic data set obtained in step S2 to obtain a training data set; S4. Use the Transformer model to build a primary model for identifying voltage deviation of electric energy meters; S5. Using the training data set obtained in step S3, the initial model for identifying excessive voltage difference of the electric energy meter constructed in step S4 is trained to obtain an excessive voltage difference identification model of the electric energy meter; S6. Using the electric energy meter voltage tolerance identification model obtained in step S5, actual electric energy meter voltage tolerance identification is performed.

2. The method for identifying voltage excess of an electric energy meter according to claim 1, characterized in that The step S1 of obtaining the data information of the existing electric energy meter specifically includes the following steps: Taking the substation as a unit, the current data information and voltage data information of the electric energy meters in several substations are obtained.

3. The method for identifying voltage excess of an electric energy meter according to claim 2, characterized in that Step S2 preprocesses the data information obtained in step S1 to obtain a basic data set, which specifically includes the following steps: In the data information obtained in step S1, for the ith electric energy meter, the N nearest neighboring electric energy meters to the ith electric energy meter are obtained, each electric energy meter obtains M days of voltage data, and the distance d between the ith electric energy meter and the jth nearest neighboring electric energy meter is calculated using the following formula: ij : d ij =Median(Distance(U i ,U j )) Where Median is the median function; Distance(U i ,U j ) is the voltage data U of the i-th electric energy meter i and the voltage data U of the jth neighboring electric energy meter j Voltage correlation distance; Distance(U i ,U j ) is calculated as in is the voltage data U of the i-th electric energy meter i The average value of is the voltage data U of the jth electric energy meter j The average value of The voltage distance matrix D of the electric energy meter in the substation is obtained as D = [d ij ]; For the ith electric energy meter, obtain the N nearest neighboring electric energy meters of the ith electric energy meter in terms of distance, calculate the median of the voltage data of the N nearest neighboring electric energy meters at each moment, and use the obtained median as the reference voltage of the ith electric energy meter at each moment, and calculate the voltage error value of the ith electric energy meter based on the reference voltage; Finally, the electric energy meters with voltage error values ​​within the set range and the corresponding reference voltages are selected to construct the basic data set.

4. The method for identifying voltage excess of an electric energy meter according to claim 3 is characterized in that Step S3 performs data enhancement on the basic data set obtained in step S2 to obtain a training data set, which specifically includes the following steps: The negative samples are set as sample data with voltage within tolerance, and the positive samples are set as sample data with voltage exceeding tolerance; Determine the load type of each electric energy meter based on the daily average current value of each electric energy meter in the basic data set; Select normal negative samples: In the basic data set, select several sample data with no voltage deviation in each load type as normal negative samples of each load type; Positive sample enhancement of voltage stability out-of-tolerance mode: In the basic data set, select several sample data with no voltage out-of-tolerance in each load type, and randomly select an out-of-tolerance value within the voltage out-of-tolerance range. Then, according to the selected out-of-tolerance value, the sample data with no voltage out-of-tolerance in each load type are enhanced with positive samples of voltage stability out-of-tolerance mode. Positive sample enhancement of voltage gradient variation mode: In the basic data set, select several sample data with no voltage variation in each load type, and select several variation values ​​in the voltage variation range. The selected variation values ​​are increased according to the set rules, and the sample data with no voltage variation in each load type are enhanced with positive samples of voltage gradient variation mode according to the selected variation values. Positive sample enhancement of voltage variation out-of-tolerance mode: In the basic data set, select several sample data with no voltage out-of-tolerance in each load type, and randomly select several out-of-tolerance values ​​within the voltage out-of-tolerance range. Then, according to the selected out-of-tolerance values, the sample data with no voltage out-of-tolerance in each load type are enhanced with positive samples of voltage variation out-of-tolerance mode; Enhancement of negative samples of voltage tolerance in T-connection mode: In the basic data set, select several sample data with no voltage tolerance in each load type. According to the line length and line impedance between the T-connection electric energy meter and the power supply starting point, enhance the negative samples of voltage tolerance in T-connection mode for the sample data with no voltage tolerance in each load type. According to the on-site inspection of the power system, several electric energy meters with voltage out-of-tolerance and T-connection non-out-of-tolerance were selected as sample data; Label all the sample data obtained; Finally, the training dataset is constructed.

5. The method for identifying voltage excess of an electric energy meter according to claim 4, characterized in that Defining the load type of each electric energy meter based on the daily average current value of each electric energy meter in the basic data set specifically includes the following steps: According to the daily average current value of each electric energy meter in the basic data set, the daily current mean of each electric energy meter is calculated, and the daily current mean values ​​of the 25% to 75% quantiles are selected and then the current mean is calculated to obtain the current mean data of each electric energy meter; Based on the current mean data of each electric energy meter, the load type of each electric energy meter is divided as follows: If the current average is less than the first current threshold, it is determined to be a small load type; If the current average is not less than the first current threshold and less than the second current threshold, it is determined to be a medium load type; If the current average is not less than the second current threshold, it is determined to be a heavy load type; The second current threshold is greater than the first current threshold.

6. The method for identifying voltage excess of an electric energy meter according to claim 5, characterized in that The voltage stability out-of-tolerance mode positive sample enhancement specifically includes the following steps: In the basic data set, select several sample data with no voltage deviation in each load type; Randomly select an excess value within the voltage excess range; According to the selected deviation value, the following formula is used to enhance the positive samples of voltage stability deviation mode for the sample data of voltage without deviation of each load type: In the formula is the data after the positive sample of the voltage stability out-of-tolerance mode is enhanced; e is the selected out-of-tolerance value; u i is the sample data with no voltage deviation; n i is the set voltage random disturbance value; The voltage gradient out-of-tolerance mode positive sample enhancement specifically includes the following steps: In the basic data set, select several sample data with no voltage deviation in each load type; Select several voltage tolerance values ​​e1~e1 within the voltage tolerance range. d , and the selected deviation value increases according to the set rule, expressed as e d =e d-1 ×v,e d is the dth excess value, e d-1 is the d-1th excess value, and v is the set growth rate; According to the selected deviation value, the following formula is used to enhance the positive samples of the voltage gradient deviation mode for the sample data of each load type without deviation: In the formula This is the data after the positive samples of the voltage gradient out-of-tolerance mode are enhanced; The voltage variation out-of-tolerance mode positive sample enhancement specifically includes the following steps: In the basic data set, select several sample data with no voltage deviation in each load type; Randomly select several voltage tolerance values ​​within the voltage tolerance range; According to the selected deviation value, the following formula is used to enhance the positive samples of the voltage deviation deviation mode for the sample data of each load type without deviation: In the formula is the data after the positive sample of the voltage variation out-of-tolerance mode is enhanced; e d3 is a randomly selected excess value, and e d3 =random(sign(min(m min ,error-r)),sign(max(m max ,error+r))), where random() is the random value function, sign is the sign function, m min is the minimum value of the tolerance range, m max is the maximum value of the voltage tolerance range, error is the random error within the voltage tolerance range, and r is the random width of the voltage tolerance range; The T-connection mode voltage over-tolerance negative sample enhancement specifically includes the following steps: In the basic data set, select several sample data with no voltage deviation in each load type; According to the line length l between the T-connected energy meter and the power supply starting point and the unit line impedance R, the following formula is used to enhance the negative samples of voltage deviation in the T-connected mode for the sample data of voltage without deviation of each load type: In the formula is the data after the voltage tolerance negative sample of T-connection mode is enhanced; i i for u i The corresponding current data.

7. The method for identifying voltage excess of an electric energy meter according to claim 6, characterized in that The transformer model described in step S4 is used to construct a primary model for identifying voltage deviation of an electric energy meter, which specifically includes the following steps: The processing process of the constructed primary model for identifying voltage deviation of electric energy meters includes: The input data is divided into several time series subsequences based on the set time unit; Linear projection is used to map the time series subsequences into a high-dimensional embedding space as a sequence embedding vector; Introduce category tags to connect all subsequence features and realize full time series feature extraction; The position information of the sub-time series is encoded into a specific position vector using the following formula: Where PE pos=2i is the encoding result when the subsequence position is even; pos is the subsequence position; 2i is the position of the subsequence with an even dimension, and 2i+1 is the position of the subsequence with an odd dimension; d is the vector dimension; PE pos=2i+1 is the encoding result when the subsequence position is an odd number; Add the position vector and category label to the sequence embedding vector as the input of the multi-head attention mechanism; Multi-head attention mechanism: The multi-head attention mechanism is used to assign different attention weights to different subspace learning mechanisms; different attention heads are spliced ​​and multi-head attention values ​​are obtained through linear mapping; the feedforward neural network is used to further process the extracted features into more abstract features using nonlinear transformation and feature mapping; For the linear output layer results, the softmax function is used to calculate the distribution of voltage tolerance categories, thereby obtaining the final probability distribution of voltage tolerance categories, which is expressed as Where y z The probability distribution of the final voltage tolerance category output by the model; is the category label feature output by the last layer of the model; W0 is the weight matrix; b0 is the bias vector; softmax is the softmax function; Finally, select y z The voltage tolerance category corresponding to the maximum value of the medium probability is used as the tolerance category determination result output by the model.

8. The method for identifying voltage excess of an electric energy meter according to claim 7, characterized in that The training described in step S5 specifically includes the following steps: The cross entropy loss is used as the loss function to train the model.

9. A system for implementing the method for identifying voltage deviation of an electric energy meter according to any one of claims 1 to 8, characterized in that It includes a data acquisition module, a data preprocessing module, a data enhancement module, a model building module, a model training module and an out-of-tolerance recognition module; the data acquisition module, the data preprocessing module, the data enhancement module, the model building module, the model training module and the out-of-tolerance recognition module are connected in series in sequence; the data acquisition module is used to acquire the data information of the existing electric energy meter and upload the data information to the data preprocessing module; The data preprocessing module is used to preprocess the acquired data information according to the received data information, obtain the basic data set, and upload the data information to the data enhancement module; The data enhancement module is used to perform data enhancement on the basic data set according to the received data information, obtain the training data set, and upload the data information to the model construction module; The model building module is used to build a primary model for identifying voltage deviation of electric energy meters using the Transformer model according to the received data information, and upload the data information to the model training module; The model training module is used to train the constructed initial model for identifying excessive voltage differences of electric energy meters using the obtained training data set according to the received data information, obtain the excessive voltage difference identification model of electric energy meters, and upload the data information to the excessive voltage difference identification module; The voltage tolerance recognition module is used to perform actual voltage tolerance recognition of the electric energy meter based on the received data information and the obtained voltage tolerance recognition model of the electric energy meter.