Disclosure of Invention
The invention aims to solve the technical problem of providing a method for identifying and analyzing the fault abnormality of an intelligent ammeter based on a big data model, which is used for intelligently identifying and analyzing the metering assets of the intelligent ammeter, analyzing the data of the intelligent ammeter, realizing the asset control of the ammeter and improving the disassembly work quality.
The invention adopts the following technical scheme:
the invention discloses a method for identifying and analyzing fault abnormality of an intelligent ammeter based on a big data model, which comprises the following steps:
step one, data preparation: collecting data of the disassembled sorting table from the SG186 system;
step two, data preprocessing: processing the prepared data into data which can be used by an intelligent electric meter metering abnormity analysis model;
step three, modeling analysis: and D, analyzing the preprocessed data in the step two by using a fault identification model of the intelligent electric meter, and judging whether the intelligent electric meter has a fault or not.
In the third step, R is set as historical data of a fault database of the intelligent electric meter, 60% of data of R is distributed to a training set S, 40% of data of S is distributed to a test set T, S is divided into n subsets S1, S2, … and Sn, wherein n is the number of attributes X in S, and entropy of the training set S is set as info (S).
The invention is as described
Where | S | is the total number of samples in S,
c in freq (Ci, S) is the number of samples (i ═ 1,2,3.., N), and N is the total number of decision-making categories.
The invention divides a training set S into n subsets according to attributes X, and then calculates the information entropy of each subset, and the formula is
In the formula of
x(S) is the information entropy of the attribute X,
Sibelong to class Ci(i ═ 1,2.. m) total number of samples, m being the number of classes of attribute X.
The information gain _ ratio (X) of the attribute X of the present invention is
In the formula: gain (X) is a gain criterion,
gain(X)=info(S)-infox(Si),
split _ info (X) is the attribute X potential information,
and taking the attribute with the maximum information gain rate as a root node to start to establish a decision tree, and continuing to recursively calculate the rest attributes according to the method with the maximum information gain rate until the whole decision tree is generated to form a preliminary prediction rule.
In the second step of the invention, the intelligent ammeter metering abnormity analysis model is screened according to the fault data with unequal sum of the total electric quantity of the ammeter and the electric quantity of each rate, and the fault with unequal sum of the total electric quantity of the ammeter and the electric quantity of each rate is judged by adopting a formula
W is active electric quantity; + the direction of the electric quantity is the positive direction; -the direction of the electrical quantity is reversed; w
+1Is the positive total electric quantity; w
-1The reverse total charge.
Formula of the invention
The method comprises the following steps:
i-1 is the total time period,
i-2 is the peak period,
i-3 is a flat period,
i-4 is the valley period,
i-5 is the spike period,
e is the number of the electric meter rate,
p is a judgment factor with unequal sum of total electric quantity and electric quantity of each rate;
when e is 4, the electric meter is represented as a four-rate electric meter, and p is 0.4;
when e is 3, the electric meter is represented as a three-rate electric meter, and P is 0.3; when e is 2, the electric meter is represented as a two-rate electric meter, and p is 0.2.
The four-rate electric meter of the invention is an electric meter supporting charging in 4 periods of peak time, flat time, valley time and peak time;
the three-rate electric meter is an electric meter supporting charging in a peak time period, a flat time period and a low-peak time period for 3 time periods;
the second rate electric meter is an electric meter supporting charging in 2 periods of flat time and low ebb time.
According to the intelligent electric meter abnormal analysis model, the intelligent electric meters with metering faults in the intelligent electric meter database are screened out.
According to the method, data are subjected to predictive analysis and comparison according to a fault identification model and a metering abnormality analysis model of the intelligent ammeter, and if abnormal data are judged, the intelligent ammeter is judged to have a fault; if any model is judged to be normal and the other model is judged to be abnormal, returning to the training set for predicting and analyzing again, and if the data returned for 5 times exceeds 3 times and is inconsistent, judging that the intelligent electric meter has a fault.
The invention has the following positive effects:
according to the intelligent ammeter fault prediction method, the intelligent ammeter fault identification model and the intelligent ammeter metering abnormity analysis model are combined, fault data of the intelligent ammeter can be analyzed, calculation rules can be aimed at, and intelligent ammeter fault prediction can be more accurately identified, analyzed and managed.
Through data mining and a big data model, short boards or management holes of power supply companies in various cities and counties are found in time, and the enterprise asset loss is reduced.
According to the invention, the anomaly detection of the intelligent ammeter is realized through data analysis; the analysis process does not need manual intervention, so that a large amount of manual reporting work is reduced, and the working efficiency is improved.
And the data feedback is utilized to guide the direction of the next round of work of the enterprise, thereby being beneficial to the innovation and the development of the enterprise.
Detailed Description
As shown in the attached figure 1, the method for identifying and analyzing the fault abnormality of the intelligent ammeter based on the big data model is characterized in that: the method comprises the following steps:
step one, data preparation: collecting data of the disassembled sorting table from the SG186 system;
step two, data preprocessing: processing the prepared data into data which can be used by an intelligent electric meter metering abnormity analysis model; screening out the smart meters with metering faults in the smart meter database according to the smart meter abnormity analysis model, namely extracting the smart meters with metering faults from the smart meter database according to certain judgment rules through working condition data (electric quantity, power, time and the like) of the smart meters; dividing historical data in the intelligent electric meter fault database into a training set and a testing set, selecting factors related to intelligent electric meter faults to analyze the historical fault data of the intelligent electric meter, calculating information gain rates of different attributes by using an algorithm, generating an intelligent electric meter state decision tree, and forming a preliminary prediction rule; evaluating the accuracy of the preliminary prediction rule through the data of the test set, determining the prediction rule if the accuracy meets the preset requirement, returning to the training set if the accuracy does not meet the requirement, and re-training; generating a fault prediction model of the intelligent ammeter according to the finally determined prediction rule; finally, extracting the intelligent electric meters with non-metering faults and no faults from the intelligent electric meter database according to the intelligent electric meter fault prediction model;
step three, modeling analysis: dividing historical data in an intelligent electric meter fault database into a training set and a testing set, selecting factors related to intelligent electric meter faults to analyze the historical fault data of the intelligent electric meter, calculating information gain rates of different attributes by using an algorithm, generating an intelligent electric meter state decision tree, and forming a preliminary prediction rule; evaluating the accuracy of the preliminary prediction rule through the data of the test set, determining the prediction rule if the accuracy meets the preset requirement, returning to the training set if the accuracy does not meet the requirement, and re-training; and (4) generating a smart meter fault prediction model according to the finally determined prediction rule, analyzing the preprocessed data in the step two by using a smart meter fault identification model, and extracting the smart meters with non-metering faults and non-faults from a smart meter database.
Setting R as historical data of a fault database of the intelligent electric meter, dividing 60% of data of R into a training set S, dividing 40% of data of S into a test set T, dividing S into n subsets S1, S2, … and Sn, wherein n is the number of attributes X in S, and setting the entropy of the training set S as info (S); the above-mentioned
Where | S | is the total number of samples in S, freq (Ci, S)C is the number of samples (i ═ 1,2,3.., N), and N is the total number of categories of decision.
Dividing the training set S into n subsets according to the attributes X, and calculating the information entropy of each subset by the formula
In the formula of
x(S) is the information entropy of the attribute X, S
iBelong to class C
i(i ═ 1,2.. m) total number of samples, m being the number of classes of attribute X.
The information gain _ ratio (X) of the attribute X is
In the formula: gain (X) is a gain criterion,
gain(X)=info(S)-infox(Si),
split _ info (X) is the attribute X potential information,
and taking the attribute with the maximum information gain rate as a root node to start to establish a decision tree, and continuing to recursively calculate the rest attributes according to the method with the maximum information gain rate until the whole decision tree is generated to form a preliminary prediction rule.
The intelligent ammeter abnormity analysis model is screened according to fault data with unequal sum of total electric quantity of the ammeter and electric quantity of each rate, and faults with unequal sum of total electric quantity of the ammeter and electric quantity of each rate are judged according to a formula
W is active electric quantity; + the direction of the electric quantity is the positive direction; -the direction of the electrical quantity is reversed; w
+1Is the positive total electric quantity; w
-1The reverse total charge.
Formula (II)
The method comprises the following steps:
i-1 is the total time period,
i-2 is the peak period,
i-3 is a flat period,
i-4 is the valley period,
i-5 is the spike period,
e is the number of the electric meter rate,
p is a judgment factor with unequal sum of total electric quantity and electric quantity of each rate;
when e is 4, the electric meter is represented as a four-rate electric meter, and p is 0.4;
when e is 3, the electric meter is represented as a three-rate electric meter, and P is 0.3; when e is 2, the electric meter is represented as a two-rate electric meter, and p is 0.2.
The four-rate electric meter is an electric meter supporting charging in 4 periods of peak time, flat time, valley time and peak time;
the three-rate electric meter is an electric meter supporting charging in a peak time period, a flat time period and a low-peak time period for 3 time periods;
the second rate electric meter is an electric meter supporting charging in 2 periods of flat time and low ebb time.
The principle of fault judgment is as follows:
(1) the electric meter has the positive and negative total electric quantity, the positive and negative peak electric quantity, the positive and negative flat electric quantity and the positive and negative valley electric quantity all larger than 0 and not empty.
(2) The absolute value of the difference value between the total electric quantity of the electric meter and the sum of the electric quantity of each rate is larger than a certain threshold value. The threshold rule is a four-rate ammeter and is judged according to 0.4; judging by a three-rate ammeter according to 0.3; and judging by the second rate meter according to 0.2.
(3) If the criterion (1) and the criterion (2) are met simultaneously, the fault is judged to be a serious fault.
The reverse active indication value of the ammeter is greater than zero
When carrying out the reverse active indicating value of ammeter and being greater than zero fault data screening, adopt and judge the reverse active indicating value of ammeter and be greater than zero trouble:
W-1>0 or Q-1>0
In the formula: q- - -reactive power;
Q-1-the total amount of reactive power in reverse for the meter.
The principle of fault judgment is as follows:
(1) the total reverse active electric quantity or the total reverse reactive electric quantity of the intelligent electric meter is greater than 0;
(2) if the criterion (1) is met, the fault is judged to be a serious fault.
And performing predictive analysis and comparison on the data according to the fault identification model and the metering abnormality analysis model of the intelligent ammeter, and judging that the intelligent ammeter has a fault if abnormal data is judged. If any model is judged to be normal and the other model is judged to be abnormal, returning to the training set for predicting and analyzing again, and if the data returned for 5 times exceeds 3 times and is inconsistent, judging that the intelligent electric meter has a fault.
Through the MDS, the marketing service application system and the electricity consumption information acquisition system, the intelligent electric meter warehouse-in and warehouse-out data, the inventory data, the order-to-order data, the receiving data, the assembly and disassembly data, the operation data, the service abnormity information and the like are acquired in real time, a big data warehouse, an intelligent electric meter fault identification model and an intelligent electric meter metering abnormity analysis model are built, the intelligent electric meter fault identification analysis management and control are enhanced, and the fine management of assets is realized. Establishment of fault probability decision tree of intelligent electric meter
And (3) taking the removal of the intelligent electric meter in 2019-11 months of XXX electric power company as an analysis object, calculating by taking the removal reason as a judgment standard of whether the intelligent electric meter has a fault or not, and establishing a decision tree.
Through statistics, 54748 samples are provided, and the removal reasons are 7, namely customer electricity utilization change, fault change, functional change, customer correction, expiration rotation, operation quality sampling/supervision sampling and quality hidden danger recall. The fault replacement and quality hidden trouble recall are selected as the judgment conditions of the fault meter, and the other reasons are the normal judgment conditions of the meter.
According to the asset archive information and the operation information of the intelligent electric meter, attributes which possibly influence the service life of the intelligent electric meter are selected, wherein the attributes comprise meter types, operation time before removal, meter versions, user types, wiring modes and 2019 annual electric quantity, the attribute numbers respectively correspond to x 1-x 6, and the operation time and the annual electric quantity are continuous variables. The fault probability of the intelligent electric meter is used as a mark, 1 represents that the meter is normal, 2 represents that the meter has faults, and a decision result is given in a probability form. And a first action mark, a second action decision probability and a third action are used for counting the proportion of the total samples for the class table in the decision tree box.
All the samples of the attributes are counted, and the kini value and the kini coefficient of each attribute can be calculated, as shown in the following table:
each attribute damping value and damping coefficient table
It can be seen from the table that the kini coefficient of the running time before the attribute removal is the minimum, so the running time before the removal is selected as the classification condition; then, calculating the remaining property kini coefficients, analogizing in turn, and comparing by calculation, as shown in a low-voltage resident sample decision tree in fig. 2, wherein the normal probability of the intelligent electric meter running for 996 days before being dismantled is 77%, namely the probability of failure of the intelligent electric meter in about 3 years is low; before the removal, the operation time is within 1346 days, the fault probability of the intelligent electric meter with the annual electric quantity within 3004kWh is 55%, namely the intelligent electric meter with low-load operation is prone to fault in about 3 to 4 years.
According to the intelligent ammeter fault prediction method, the intelligent ammeter fault identification model and the intelligent ammeter metering abnormity analysis model are combined, fault data of the intelligent ammeter can be analyzed, calculation rules can be aimed at, and intelligent ammeter fault prediction can be more accurately identified, analyzed and managed.
Through data mining and a big data model, short boards or management holes of power supply companies in various cities and counties are found in time, and the enterprise asset loss is reduced.
According to the invention, the anomaly detection of the intelligent ammeter is realized through data analysis; the analysis process does not need manual intervention, so that a large amount of manual reporting work is reduced, and the working efficiency is improved. And the data feedback is utilized to guide the direction of the next round of work of the enterprise, thereby being beneficial to the innovation and the development of the enterprise.
Finally, the above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the invention, so that any modification, equivalent replacement or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.