Summary of the invention
It is an object of the invention to for the problems referred to above, propose a kind of intelligent electric meter fault real-time estimate side based on decision tree
Method, with real now forecast accuracy reliably in the case of, intelligent electric meter fault is carried out real-time estimate.
For reaching above-mentioned purpose, the present invention uses the technical scheme to be:
The intelligent electric meter data of power information acquisition system are carried out data prediction by step 1;
Step 2, according to intelligent electric meter breakdown judge model, by the out of order number of intelligent electric meter of power information acquisition system
According in screening to intelligent electric meter Mishap Database;
The effect of described intelligent electric meter breakdown judge model is to judge whether intelligent electric meter breaks down.
Step 3, chooses the historical data in intelligent electric meter Mishap Database, is classified as training set and test set, uses
Decision Tree algorithms carries out data mining to training set, forms intelligent electric meter fault decision tree, then forms preliminary classification rule;
Step 4, carries out accuracy assessment by the data of test set to preliminary classification rule, if accuracy meets requirement,
Then determine classifying rules, if accuracy is unsatisfactory for requirement, is then back to training set, re-starts training;
Step 5, is generated intelligent electric meter fault real-time prediction model by the classifying rules finally determined;
Step 6, is connected to intelligent electric meter fault real-time prediction model by intelligent electric meter real time fail data basd link and carries out in real time
Prediction, obtains intelligent electric meter fault real-time estimate result.
The step that described step 1 carries out data prediction to the intelligent electric meter data of power information acquisition system is, first
First remove the data that the attribute data unrelated with intelligent electric meter fault, the data having apparent error and attribute repeat, then will be each
Individual attribute continuous data discretization.
Described step 2 according to intelligent electric meter breakdown judge model by faulty for the intelligent electric meter of power information acquisition system
Data screening as follows to the method in intelligent electric meter Mishap Database:
(1) when carrying out the fault data screening that the total electricity of ammeter does not waits with each rate electricity sum, following formula is used to judge
The fault that the total electricity of ammeter and each rate electricity sum do not wait:
In formula: W represents electricity ,+the direction that represents electricity is forward, and-the direction that represents electricity is reverse, and i=1 represents total
Period, W+1Represent the total electricity of forward, W-1Representing the most total electricity, i=2 represents peak period, and i=3 represents section at ordinary times, i=4
Representing low-valley interval, i=5 represents the spike period, and e is ammeter rate number, and ρ is total electricity and sentencing that each rate electricity sum does not waits
The disconnected factor.As e=4, represent that ammeter is four rate ammeters, take ρ=0.4;As e=3, represent that ammeter is three rate ammeters,
Take ρ=0.3;As e=2, represent that ammeter is two rate ammeters, take ρ=0.2;
Described four rate ammeters refer to support peak period, at ordinary times section, low-valley interval, 4 the period chargings of spike period
Ammeter;Three rate ammeters refer to support only peak period, at ordinary times section, the ammeter of 3 period chargings of low-valley interval;Two rate ammeters refer to
Only support section, the ammeter of 2 period chargings of low-valley interval at ordinary times;
Judgment principle is as follows:
1. when forward and reverse total electricity of ammeter, electricity forward and reverse peak period, forward and reverse electricity of section at ordinary times, forward and reverse low ebb
Section electricity is all higher than 0, and is not empty;
2. the forward and reverse each rate electricity sum of ammeter is more than 0;
3. the total electricity of ammeter and the absolute value of each rate electricity sum difference are more than certain threshold values, and threshold rule is as follows: as
Fruit is four rate ammeters, judges by 0.4, and three rate ammeters are by 0.3 judgement, and two rate ammeters are by 0.2 judgement;
If meet judgment principle the most simultaneously, then it is judged as catastrophe failure;
(2) when carrying out electric energy meter and flying away with mutation failure data screening, it is judged that the fault journey that electric energy meter flies away and suddenlys change
Sequence is as follows:
First maximum electricity W on the same day is calculatedf:
In formula: WfFor maximum electricity on the same day;ImaxFor maximum current;IbFor fundamental current;
The most then calculate ammeter to fly away and mutation factor K:
In formula: K is that ammeter flies away and mutation factor, WtFor electricity on the same day;
Judgment principle is as follows:
1. for resident's table, 1,2,7,8,9, December take maximum current Imax, flown away by 12 hours calculating ammeters and dashed forward
Variable factor K;3,4,5,6,10, November take 3 times of fundamental current Ib, fly away and mutation factor K by 8 hours calculating ammeters;
3., when carrying out electric energy meter and flying away with mutation failure data screening, formula (4) is used to judge that electric energy meter flies away and dashes forward
Accident hinders:
K≥1 (4)
If 3. meeting criterion 2., then it is judged as catastrophe failure;
(3) when carry out ammeter reversely gain merit indicating value more than zero failure data screening time, use following formula judge that ammeter reversely has
The merit indicating value fault more than zero:
In formula: P represents active power, Q represents reactive power, P-totalRepresent ammeter reversely to gain merit general power, Q-totalRepresent ammeter
Reverse idle general power;
Judgment principle is as follows:
1. there is the most meritorious general power or reverse idle general power more than 0 in electric energy meter;
If 2. meeting criterion 1., then it is judged as catastrophe failure;
(4) when carry out electric energy meter fall away fault data screening time, electric energy meter falls away the premise that judges for eliminating copy reading ammeter
Positive and negative total electricity is always empty record, uses following formula to judge the fault that electric energy meter falls away:
In formula: W+1yFor the total electricity of forward of the previous day, W-1yThe most total electricity for the previous day;
Judgment principle is as follows:
Judge according to day electricity statistical table, for low pressure resident and single-phase industrial and commercial producer, only judge that the previous day forward is the most electric
Whether amount and the most total electricity are more than the indicating value of checking meter on the same day, if set up, are then judged as catastrophe failure;
(5) when carrying out ammeter clock and fault data not being screened, ammeter clock not to breakdown judge program as follows:
Errors number m when first determining whether pair, if pair time errors number more than 3 times, be the most directly judged to catastrophe failure,
That is:
M > 3 is serious (7)
In formula: errors number when m is pair;
If m is not more than 3, on-line monitoring inquire about the requirement whether meeting Δ t, and when the standard pressing Δ t generates electric energy meter
The overproof grade of clock, then use formula (8) to judge:
In formula: Δ t is the difference of terminal and clock of power meter, computational methods are shown in formula (9):
Δ t=| tTerminal-tAmmeter| (9)
In formula: tTerminalRepresent terminal clock, tAmmeterRepresent clock of power meter;
Judgment principle is as follows:
1. pair if errors number m is more than 3 times time, catastrophe failure directly it is judged as;
2. 5min≤Δ t < 15min is met such as the difference Δ t of terminal Yu clock of power meter, it is judged that for generic failure;
If 15min≤Δ t < 30min is judged as important fault;If Δ t > 30min is judged as catastrophe failure;
(6) when carrying out ammeter electric energy rate and arranging abnormal failure data screening, following formula is used to judge ammeter electric energy rate
Abnormal fault is set:
W+5≠ 0 or W-5≠0 (10)
Judgment principle is as follows:
The most only judge the electric energy meter of DLT-2007 stipulations;
2. judging whether forward spike period electricity or reverse spike period electricity, if existing, being then judged as serious
Fault;
(7) when carrying out the screening of electric energy meter forward shunt running fault data, following formula is used to judge the event of electric energy meter forward shunt running
Barrier:
Or
Judgment principle is as follows:
If meeting formula (11) 3 times, being then judged as important fault, if meeting formula (11) 5 times, being then judged as serious event
Barrier;
(8) when carrying out the screening of electric energy meter reverse shunt running fault data, following formula is used to judge the event of the reverse shunt running of electric energy meter
Barrier:
Judgment principle is as follows:
The total electricity of electric energy meter forward and the most total electricity for clearing class exist simultaneously and are more than the situation of 0.1, then sentence
Break as catastrophe failure.
Described step 3 chooses the historical data in intelligent electric meter Mishap Database, is classified as training set and test set,
Use decision Tree algorithms that training set carries out data mining, form intelligent electric meter fault decision tree, then form preliminary classification rule
Then, its step is as follows:
If R is the historical data of intelligent electric meter Mishap Database, and 60% data of R are given training set S, the 40% of R
Data give test set T.As a example by using C5.0 algorithm, training set S is carried out data mining.
Setting tool has the attribute X of n value that S is divided into n subset S1, S2..., SnIf the sum of sample is | S |, freq in S
(Ci, S) is to belong to classification C in Si(i=1,2 ..., N) number of samples, in S, certain sample belongs to classification CiProbability beThe information that it is passed on is:
The entropy info (S) of training set S is represented by formula (13);
After training set S is divided into n subset according to attribute X, calculates the comentropy of each subset, then gather the expectation of S
Information infoX(S) represent with formula (14);
In order to measure the information obtained by the S carrying out subregion according to inspection by attributes X, use gain standard gain (X), its choosing
Selecting and make its value to maximize, what i.e. this standard selected is that the attribute with the highest information gain is to carry out every subzone;
Gain (X)=info (S)-infoX(S) (15)
According to attribute X n is different, and S is divided into S by value1, S2..., SnThe potential information produced after n subset altogether
Split_info (X) is with shown in formula (16);
Formula (17) is that X carries out division information ratio of profit increase gain_ratio (X) to S;
Calculating first and use the attribute selecting the highest information gain-ratio as the root node of decision tree, then decision tree is every
One node calculates the information gain-ratio of residue attribute by the method, throws away and selects the attribute of the highest information gain-ratio as decision tree
Present node, until ultimately form whole decision tree;
Preliminary classification rule is formed by this decision tree.
Described step 4 carries out accuracy assessment by the data of test set to preliminary classification rule, if accuracy meets
Requirement, it is determined that classifying rules, if accuracy is unsatisfactory for requirement, is then back to training set, re-starts training, its detailed step
As follows:
(1) accuracy assessment formula is:
In formula, Z is assessment accuracy, and A is that preliminary classification rule predicts correct number in test set T;B is test set T
Total data number;
(2) Z ' is set as the accuracy set;If Z >=Z ', it is determined that classifying rules;If Z is < Z ', then return training set again
Training decision tree.
Intelligent electric meter fault real-time predicting method of the present invention can reflect intelligent electric meter real time fail situation exactly.
Detailed description of the invention
Below in conjunction with the accompanying drawings and detailed description of the invention the present invention will be further described.
Below by a collection of model for DDZY102-Z intelligent electric meter the In A Certain Place of Xinjiang district service data of 2 years add up as a example by right
The present invention is described further.
As it is shown in figure 1, present invention intelligent electric meter based on decision tree fault real-time predicting method comprises the following steps:
The DDZY102-Z intelligent electric meter data of power information acquisition system are carried out data prediction by step 1, and step is such as
Under:
(1) data that the attribute data unrelated with intelligent electric meter fault, the data having apparent error and attribute repeat are removed;
(2) by each attribute continuous data discretization.
Step 2, according to DDZY102-Z intelligent electric meter breakdown judge model, by the intelligent electric meter of power information acquisition system
Out of order data screening is in intelligent electric meter Mishap Database, and step is as follows:
The effect of described intelligent electric meter breakdown judge model is to judge whether intelligent electric meter breaks down.
DDZY102-Z intelligent electric meter breakdown judge model is as follows:
(1) when carrying out the fault data screening that the total electricity of ammeter does not waits with each rate electricity sum, because of DDZY102-Z intelligence
Can ammeter be four rate ammeters, e=4, judgement factor ρ that total electricity and each rate electricity sum do not wait takes 0.4.Employing following formula is sentenced
The fault that the total electricity of power-off table and each rate electricity sum do not wait:
Judgment principle is as follows:
1. when forward and reverse total electricity of ammeter, electricity forward and reverse peak period, forward and reverse electricity of section at ordinary times, forward and reverse low ebb
Section electricity is all higher than 0, and is not empty.
2. the forward and reverse each rate electricity sum of ammeter is more than 0;
3. the total electricity of ammeter and the absolute value of each rate electricity sum difference are more than 0.4.
If meet judgment principle the most simultaneously, then it is judged as catastrophe failure.
(2) when carrying out electric energy meter and flying away with mutation failure data screening, it is judged that the fault journey that electric energy meter flies away and suddenlys change
Sequence is as follows:
First maximum electricity W on the same day is calculatedf:
In formula: WfFor maximum electricity on the same day;ImaxFor maximum current;IbFor fundamental current.
The most then calculate ammeter to fly away and mutation factor K:
In formula: K is that ammeter flies away and mutation factor;WtFor electricity on the same day.
Judgment principle is as follows:
1. in two annual datas of DDZY102-Z intelligent electric meter, 1,2,7,8,9, December take maximum current Imax,
Fly away and mutation factor K by 12 hours calculating ammeters;3,4,5,6,10, November take 3 times of fundamental current Ib, based on 8 hours
Calculate ammeter to fly away and mutation factor K.
2., when carrying out electric energy meter and flying away with mutation failure data screening, formula (4) is used to judge that electric energy meter flies away and dashes forward
Accident hinders:
K≥1 (4)
If 3. meeting criterion 2., then it is judged as catastrophe failure.
(3) when carry out ammeter reversely gain merit indicating value more than zero failure data screening time, use following formula judge that ammeter reversely has
The merit indicating value fault more than zero:
In formula: P represents active power, Q represents reactive power, P-totalRepresent ammeter reversely to gain merit general power, Q-totalRepresent ammeter
Reverse idle general power.
Judgment principle is as follows:
1. there is the most meritorious general power or reverse idle general power more than 0 in electric energy meter.
If 2. meeting criterion 1., then it is judged as catastrophe failure.
(4) when carry out electric energy meter fall away fault data screening time, electric energy meter falls away the premise that judges for eliminating copy reading electric energy
Indicating value forward and reverse meritorious be always empty record, employing following formula judges the fault that electric energy meter falls away:
In formula: W+1yFor the total electricity of forward of the previous day, W-1yThe most total electricity for the previous day.
Judgment principle is as follows:
Judge according to day electricity statistical table, for low pressure resident and single-phase industrial and commercial producer, only judge that the previous day forward is the most electric
Whether amount and the most total electricity are more than the indicating value of checking meter on the same day, if set up, are then judged as catastrophe failure.
(5) when carrying out ammeter clock and fault data not being screened, ammeter clock not to breakdown judge program as follows:
Errors number m when first determining whether pair, if pair time errors number more than 3 times, be the most directly judged to catastrophe failure,
That is:
M > 3 is serious (7)
In formula: errors number when m is pair.
If m is not more than 3, on-line monitoring inquire about the requirement whether meeting Δ t, and when the standard pressing Δ t generates electric energy meter
The overproof grade of clock, then use formula (8) to judge:
In formula: Δ t is the difference of terminal and clock of power meter, computational methods are shown in formula (9):
Δ t=| tTerminal-tAmmeter| (9)
In formula: tTerminalRepresent terminal clock, tAmmeterRepresent clock of power meter.
Judgment principle is as follows:
1. pair if errors number m is more than 3 times time, catastrophe failure directly it is judged as;
2. 5min≤Δ t < 15min is met such as the difference Δ t of terminal Yu clock of power meter, it is judged that for generic failure;
If 15min≤Δ t < 30min is judged as important fault;If Δ t > 30min is judged as catastrophe failure;
(6) when carrying out ammeter electric energy rate and arranging abnormal failure data screening, following formula is used to judge ammeter electric energy rate
Abnormal fault is set:
W+5≠ 0 or W-5≠0 (10)
Judgment principle is as follows:
The most only judge the electric energy meter of DLT-2007 stipulations.
2. judging whether forward spike period electricity or reverse spike period electricity, if existing, being then judged as serious
Fault.
(7) when carrying out the screening of electric energy meter forward shunt running fault data, following formula is used to judge the event of electric energy meter forward shunt running
Barrier:
Or
Judgment principle is as follows:
If meeting formula (11) 3 times, being then judged as important fault, if meeting formula (11) 5 times, being then judged as serious event
Barrier.
(8) when carrying out the screening of electric energy meter reverse shunt running fault data, following formula is used to judge the event of the reverse shunt running of electric energy meter
Barrier:
Judgment principle is as follows:
The total electricity of electric energy meter forward and the most total electricity for clearing class exist simultaneously and are more than the situation of 0.1, then sentence
Break as catastrophe failure.
The institute gone out by DDZY102-Z intelligent electric meter breakdown judge model discrimination faulty deposits to DDZY102-Z Intelligent electric
In table Mishap Database.
Step 3, chooses the historical data in DDZY102-Z intelligent electric meter Mishap Database, is classified as training set and survey
Examination collection, uses decision Tree algorithms that training set carries out data mining, forms intelligent electric meter fault decision tree, then forms preliminary point
Rule-like, its detailed step is as follows:
If R is the historical data of intelligent electric meter Mishap Database, and 60% data of R are given training set S, the 40% of R
Data give test set T.As a example by using C5.0 algorithm, training set S is carried out data mining.
Setting tool has the attribute X of n value that S is divided into n subset S1, S2..., SnIf the sum of sample is | S |, freq in S
(Ci, S) is to belong to classification C in Si(i=1,2 ..., N) number of samples, in S, certain sample belongs to classification CiProbability beThe information that it is passed on is:
The entropy info (S) of training set S is represented by formula (13);
After training set S is divided into n subset according to attribute X, calculates the comentropy of each subset, then gather the expectation of S
Information infoX(S) represent with formula (14);
In order to measure the information obtained by the S carrying out subregion according to inspection by attributes X, use gain standard gain (X), its choosing
Selecting and make its value to maximize, what i.e. this standard selected is that the attribute with the highest information gain is to carry out every subzone;
Gain (X)=info (S)-infoX(S) (15)
According to attribute X n is different, and S is divided into S by value1, S2..., SnThe potential information produced after n subset altogether
Split_info (X) is with shown in formula (16);
Formula (17) is that X carries out division information ratio of profit increase gain_ratio (X) to S;
Calculating first and use the attribute selecting the highest information gain-ratio as the root node of decision tree, then decision tree is every
One node calculates the information gain-ratio of residue attribute by the method, throws away and selects the attribute of the highest information gain-ratio as decision tree
Present node, until ultimately form whole decision tree.
Preliminary classification rule is formed by this decision tree.
Step 4, carries out accuracy assessment by the data of test set to preliminary classification rule, if accuracy meets requirement,
Then determining classifying rules, if accuracy is unsatisfactory for requirement, is then back to training set, re-starts training, its detailed step is as follows:
(3) accuracy assessment formula is:
In formula, Z is assessment accuracy, and A is that preliminary classification rule predicts correct number in test set T;B is test set T
Total data number.
(4) Z ' is set as the accuracy set.If Z >=Z ', it is determined that classifying rules;If Z is < Z ', then return training set again
Training decision tree.
Step 5, is generated DDZY102-Z intelligent electric meter fault real-time prediction model by the classifying rules finally determined;
Step 6, is connected to DDZY102-Z intelligent electric meter fault real by DDZY102-Z intelligent electric meter real time fail data base
Time forecast model carry out real-time estimate, obtain DDZY102-Z intelligent electric meter fault real-time estimate result.