Positioning method for automatically detecting meter position fault of assembly line of electric energy meter
Technical Field
The invention relates to the technical field of electric energy meter fault location, in particular to a location method for automatically detecting an epitope fault of an assembly line of an electric energy meter.
Background
With the continuous popularization of the centralized verification mode, the annual verification task amount of the metering center is continuously improved, the construction scale of the automatic verification facility is continuously enlarged, and the quality control of the automatic verification facility is greatly examined by large-scale and long-time continuous verification. At present, the epitope faults are the most frequent faults of an automatic verification assembly line of the electric energy meter, and are mainly divided into epitope intermittent faults caused by pin abrasion, epitope displacement and the like and epitope permanent damage faults caused by pin impact bending, epitope bottom plate breakdown and the like. The frequent occurrence of the epitope faults not only affects the verification efficiency, but also causes the verification result of the electric energy meter to lack reliability.
In order to improve the operation and maintenance efficiency of the automatic verification assembly line, shorten the fault time of the automatic verification assembly line, monitor the working condition of equipment and improve the verification quality, a verification quality abnormity monitoring mechanism needs to be perfected, so that a wiring fault positioning technology of the automatic verification assembly line is very necessary to be explored.
Disclosure of Invention
The invention provides a positioning method for an epitope fault of an electric energy meter automatic verification assembly line, overcomes the defects of the prior art, and can effectively solve the problems that the time delay for searching the epitope fault by the existing automatic verification method is long and the verification efficiency is seriously influenced.
One of the technical schemes of the invention is realized by the following measures: a positioning method for automatically detecting the epitope fault of an assembly line of an electric energy meter comprises the following steps:
s1, data preparation: respectively acquiring electric energy meter verification data, electric energy meter wiring data and verification device fault processing data on a certain verification assembly line;
s2, constructing an epitope abnormal time sequence feature set by adopting a time sequence sliding window algorithm: respectively constructing a characteristic set of the verification qualification rate of the electric energy meter and the wiring success rate of the electric energy meter in an observation window according to a time sequence sliding window algorithm;
s3, constructing an electric energy meter automatic verification assembly line epitope abnormity diagnosis model: a support vector machine model based on a time series sliding window algorithm, called an SVM model for short, is adopted to construct a classifier so as to distinguish whether the epitope is abnormal or not;
s4, constructing an electric energy meter automatic verification assembly line epitope fault reason diagnosis model: judging the type of the fault;
s5, electric energy meter verification quality tracking: and acquiring an electric energy meter list with uncertain verification quality.
The following is further optimization or/and improvement of the technical scheme of the invention:
in the above step S2, a time series sliding window algorithm is used to construct an epitope abnormal time series feature: respectively constructing the verification qualification rate of the electric energy meter and the wiring success rate characteristic set of the electric energy meter in an observation window according to a time sequence sliding window algorithm, and comprising the following processes:
constructing an epitope abnormal time sequence characteristic by adopting a time sequence sliding window algorithm: respectively constructing the verification qualification rate of the electric energy meter and the wiring success rate characteristic set of the electric energy meter in an observation window according to a time sequence sliding window algorithm, and comprising the following processes:
s21, according to the electric energy meter epitope-associated electric energy meter verification data, the electric energy meter wiring data and the verification device fault processing data;
s22, integrating the electric energy meter verification data and the electric energy meter wiring data by using a time sequence sliding window algorithm and then arranging the electric energy meter verification data and the electric energy meter wiring data in an ascending order according to verification time;
s23, performing fragmentation processing on the sorted electric energy meter verification data and electric energy meter wiring data according to the fixed data window size M, and moving the data lower backward by one data unit in window fragmentation each time to obtain N windows to form a fragmented data set D;
s24, calculating the verification qualification rate x of the verification record in each window in the data set D by using the verification data of the electric energy meter and the wiring data of the electric energy meterk1And a wiring success rate xk2;
S25, rootAccording to the fault processing data of the calibrating device, constructing the calibrating epitope state y of each window periodk3Forming a data set DiThe formula is as follows:
respectively obtaining training sets D according to formula (1)1Test set D2Real-time data set D3;
Wherein k is 1,2, 3.., n; n represents the number of rows of the data set.
In the above S3, the method for constructing a classifier to distinguish whether there is an abnormality in an epitope by using a support vector machine model based on a sliding window algorithm includes the following steps:
s31, determining epitope state y for each window periodk3Constructing SVM model, and using training set D1Including the qualification rate x of the verificationk1Connection success rate xk2And detecting epitope state yk3Training the model; the process of training the support vector machine model based on the time series sliding window algorithm is as follows:
let the classification hyperplane be wx + b ═ 0, support vector (x)
s,y
s) The distance from the classification hyperplane is:
let the functional distance between the support vector and the classification hyperplane be 1, then maximizing the distance of the support vector from the classification hyperplane can be converted into:
constructing a Lagrangian function for equation (2):
solving the formula (3) according to the KKT condition and the solution method of the dual problem, and converting the formula (2) into the following formula:
the above transformed equation (4) is solved by:
the classification hyperplane wx + b is calculated as 0 according to equation (5), using test set D2Verifying the validity of the model;
s32, using the trained SVM model to perform real-time data set D3Corresponding assay epitope State yk3Is classified, i.e. D3Verification pass rate xk1Connection success rate xk2And (4) carrying in a trained decision function f (x) ═ sign (w · x + b) to obtain the state of the verification epitope, and recording abnormal information.
And S33, if the verification epitope state is classified as fault, sending an epitope abnormity alarm to the verification epitope.
In the step S4, constructing an electric energy meter automatic verification assembly line epitope fault cause diagnosis model, and determining the fault type includes the following processes:
s41, constructing a Bayes model according to the abnormal fault alarm information of the verification epitope:
let the number of continuous abnormal alarms be J, the time of continuous J abnormal alarms be T, the number of continuous J abnormal alarms be event B, let AiFor wiring fault events, wherein A is set1For epitope intermittent fault events, A2For an epitope permanent damage event, the bayesian likelihood estimation formula is as follows:
P(Ai|B)∝P(B|Ai)·P(Ai) (6)
s42, calculating A according to formula (6)1Event and A2A probability of an event;
s44, according to A1Event and A2Calculating the probability of the event, and judging the fault type, namely when P (A)1|B)>P(A2If | B), then report A1Class of wiring fault event whenP(A1|B)≤P(A2If | B), then report A2A wiring fault event of a class.
In the above S5, the electric energy meter verification quality tracking step of obtaining the electric energy meter list with uncertain verification quality includes the following steps:
s51, for exact AiEvent, marking Nth determined by SVM modeliList L of electric energy meters with verification risk under (i ═ 1,2 … N) time windows1;
S52, for exact AiEvent, marking Nth determined by SVM modeli(i is 1,2 … N) time windows, the time length T from the backward to the first abnormal alarm, the time T for judging J abnormal alarms by a Bayesian model, and an electric energy meter list L with verification risks in the time length of T + T2;
S53, obtaining an electric energy meter list with uncertain verification quality as follows: l is1+L2。
And S6, modifying the model, namely re-modeling the newly added labeled fault sample, modifying the SVM model parameter according to the condition that the diagnosis result of the constructed SVM model and Bayesian model is inconsistent with the actual field, and increasing the sample size of the SVM model to improve the accuracy of the model output.
According to the invention, the verification conclusion of the automatic verification assembly line is analyzed by applying a big data technology, the fault equipment is quickly positioned, the cause of the epitope fault is accurately fed back, and the equipment abnormity is timely repaired, so that the purposes of improving the verification efficiency and improving the verification quality are achieved.
Drawings
FIG. 1 is a flow chart of a method according to an embodiment of the present invention.
FIG. 2 is a flowchart of a method for constructing a epitope abnormality temporal feature set according to another embodiment of the present invention.
Fig. 3 is a flowchart of a method for constructing an electric energy meter automatic verification pipeline epitope abnormality diagnosis model according to another embodiment of the present invention.
Fig. 4 is a flowchart of a method for constructing an electric energy meter automatic verification pipeline epitope fault cause diagnosis model according to another embodiment of the present invention.
Fig. 5 is a flow chart of a method for verifying quality tracking of an electric energy meter according to another embodiment of the invention.
FIG. 6 is a flow chart of a method including model modification according to another embodiment of the present invention.
Detailed Description
The present invention is not limited by the following examples, and specific embodiments may be determined according to the technical solutions and practical situations of the present invention.
The invention is further described with reference to the following examples and figures:
the first embodiment is as follows: as shown in fig. 1, a positioning method for automatically detecting an epitope fault of a production line of an electric energy meter comprises the following steps:
s1, data preparation: respectively acquiring electric energy meter verification data, electric energy meter wiring data and verification device fault processing data on a certain verification assembly line;
s2, constructing an epitope abnormal time sequence feature set by adopting a time sequence sliding window algorithm: respectively constructing a characteristic set of the verification qualification rate of the electric energy meter and the wiring success rate of the electric energy meter in an observation window according to a time sequence sliding window algorithm;
s3, constructing an electric energy meter automatic verification assembly line epitope abnormity diagnosis model: a support vector machine model based on a time series sliding window algorithm, called an SVM model for short, is adopted to construct a classifier so as to distinguish whether the epitope is abnormal or not;
s4, constructing an electric energy meter automatic verification assembly line epitope fault reason diagnosis model: judging the type of the fault;
s5, electric energy meter verification quality tracking: and acquiring an electric energy meter list with uncertain verification quality.
The electric energy meter verification data and the electric energy meter wiring data are as follows: the method mainly comprises the steps of verifying the epitope number, verifying time, verifying conclusion (qualified and unqualified) of the electric energy meter and wiring state (successful and unsuccessful) of the electric energy meter;
the failure processing data of the calibrating device is as follows: the method mainly comprises the steps of detecting the serial number of the epitope, the occurrence time of the wiring fault and the type of the wiring fault (such as intermittent fault of the epitope or permanent damage of the epitope).
The positioning method for automatically detecting the epitope fault of the assembly line of the electric energy meter can be further optimized or/and improved according to actual needs:
as another embodiment of the present invention: as shown in fig. 2, in S2, a time-series sliding window algorithm is used to construct a set of epitope abnormal temporal features: respectively constructing the verification qualification rate of the electric energy meter and the wiring success rate characteristic set of the electric energy meter in an observation window according to a time sequence sliding window algorithm, and comprising the following processes:
constructing an epitope abnormal time sequence characteristic by adopting a time sequence sliding window algorithm: respectively constructing the verification qualification rate of the electric energy meter and the wiring success rate characteristic set of the electric energy meter in an observation window according to a time sequence sliding window algorithm, and comprising the following processes:
s21, according to the electric energy meter epitope-associated electric energy meter verification data, the electric energy meter wiring data and the verification device fault processing data;
s22, integrating the electric energy meter verification data and the electric energy meter wiring data by using a time sequence sliding window algorithm and then arranging the electric energy meter verification data and the electric energy meter wiring data in an ascending order according to verification time;
s23, performing fragmentation processing on the sorted electric energy meter verification data and electric energy meter wiring data according to the fixed data window size M, and moving the data lower backward by one data unit in window fragmentation each time to obtain N windows to form a fragmented data set D;
s24, calculating the verification qualification rate x of the verification record in each window in the data set D by using the verification data of the electric energy meter and the wiring data of the electric energy meterk1And a wiring success rate xk2;
S25, according to the failure processing data of the calibrating device, constructing the calibrating epitope state y of each window periodk3Forming a data set DiThe formula is as follows:
respectively obtaining training sets D according to formula (1)1Test set D2Real-time data set D3;
Wherein k is 1,2, 3.., n; n represents the number of rows of the data set.
The electric energy meter verification data in S23 mainly refers to the electric energy meter verification conclusion (0: unqualified, 1: qualified) and the electric energy meter wiring data mainly refers to the electric energy meter wiring state (0: successful, 1: unsuccessful).
As another embodiment of the present invention: as shown in fig. 3, in S3, an electric energy meter automatic verification assembly line epitope abnormality diagnosis model is constructed: a support vector machine model (hereinafter referred to as SVM model) based on a sliding window algorithm is adopted to construct a classifier so as to distinguish whether an epitope is abnormal or not, and the method comprises the following processes:
s31, determining epitope state y for each window periodk3Constructing SVM model, and using training set D1Including the qualification rate x of the verificationk1Connection success rate xk2And detecting epitope state yk3Training the model; the process of training the support vector machine model based on the time series sliding window algorithm is as follows:
let the classification hyperplane be wx + b ═ 0, support vector (x)
s,y
s) The distance from the classification hyperplane is:
let the functional distance between the support vector and the classification hyperplane be 1, then maximizing the distance of the support vector from the classification hyperplane can be converted into:
constructing a Lagrangian function for equation (2):
solving the formula (3) according to the KKT condition and the solution method of the dual problem, and converting the formula (2) into the following formula:
the above transformed equation (4) is solved by:
the classification hyperplane wx + b is calculated as 0 according to equation (5), using test set D2Verifying the validity of the model;
s32, using the trained SVM model to perform real-time data set D3Corresponding assay epitope State yk3Is classified, i.e. D3Verification pass rate xk1Connection success rate xk2And (4) carrying in a trained decision function f (x) ═ sign (w · x + b) to obtain the state of the verification epitope, and recording abnormal information.
And S33, if the verification epitope state is classified as fault, sending an epitope abnormity alarm to the verification epitope.
As another embodiment of the present invention: as shown in fig. 4, in S4, a power meter automated verification assembly line epitope fault cause diagnosis model is constructed, which includes the following processes:
s41, constructing a Bayes model according to the abnormal fault alarm information of the verification epitope:
let the number of continuous abnormal alarms be J, the time of continuous J abnormal alarms be T, the number of continuous J abnormal alarms be event B, let AiFor wiring fault events, wherein A is set1For epitope intermittent fault events, A2For an epitope permanent damage event, the bayesian likelihood estimation formula is as follows:
P(Ai|B)∝P(B|Ai)·P(Ai) (6)
s42, calculating A according to formula (6)1Event and A2A probability of an event;
s43, according to A1Event and A2Calculating the probability of the event, and judging the fault type, namely when P (A)1|B)>P(A2If | B), then report A1Class of wiring fault event, when P (A)1|B)≤P(A2When | B), report A2Class of wiring faultsAnd (3) a component.
As another embodiment of the present invention: as shown in fig. 5, in S5, the verification quality of the electric energy meter tracks:
s51, for exact AiEvent, marking Nth determined by SVM modeliList L of electric energy meters with verification risk under (i ═ 1,2 … N) time windows1;
S52, for exact AiEvent, marking Nth determined by SVM modeli(i is 1,2 … N) time windows, the time length T from the backward to the first abnormal alarm, the time T for judging J abnormal alarms by a Bayesian model, and an electric energy meter list L with verification risks in the time length of T + T2;
S53, obtaining an electric energy meter list with uncertain verification quality as follows: l is1+L2。
As another embodiment of the present invention: as shown in fig. 6, on the basis of the above embodiment, the method further includes S6, where the method further includes model modification, that is, modeling the newly added labeled fault sample again, modifying the SVM model parameters according to the situation that the diagnosis result of the constructed SVM model and the bayesian model does not conform to the actual field, and then increasing the sample size of the SVM model to improve the accuracy of the model output.
The technical characteristics form an embodiment of the invention, which has strong adaptability and implementation effect, and unnecessary technical characteristics can be increased or decreased according to actual needs to meet the requirements of different situations.