Disclosure of Invention
The invention aims to provide a motor fault diagnosis method and system, which can find abnormal conditions of motor operation in time and carry out fault diagnosis, and are convenient to use and easy to implement.
In order to achieve the above object, the present invention provides a motor fault diagnosis method, comprising the steps of:
s1: selecting normal operation data of a motor to be detected as a normal training data set, calculating a first detection statistic according to the normal training data set, and calculating a detection threshold according to the first detection statistic;
s2: selecting different types of fault data from historical fault operation data as a fault training data set, calculating second detection statistics according to the fault training data set, calculating a fault probability density function of the second detection statistics by adopting a kernel density estimation method, and constructing probability density function sets of all types of fault samples;
s3: selecting real-time operation data of a motor to be tested as a test data set, calculating third detection statistic according to the test data set, comparing the third detection statistic with the detection threshold, if the value of the third detection statistic is larger than the detection threshold, judging that a fault occurs, and entering S4; otherwise, the test data set is selected again until the motor is detected to be in fault;
s4: and calculating a probability density function of the third detection statistic by adopting a kernel density estimation method, constructing a probability density function set of a test data set, and diagnosing the fault type according to the distance between the probability density function set of the test data set and the probability density function sets of all types of fault samples in the S2.
Preferably, the S1 specifically includes the following steps:
s11: the normal training data set X is represented as:
in the formula, m is the number of the motor sensors, N is the number of sampling points, x is a motor operation data sample collected according to a time sequence,
is a real number set;
s12: carrying out normalization pretreatment on the data set X to obtain a data set
Comprises the following steps:
computing a data set
The calculation formula of the mean matrix μ is:
in the formula (I), the compound is shown in the specification,
computing a data set
The calculation formula of the covariance matrix S is as follows:
calculating a first detection statistic by adopting a sliding window method, wherein the calculation formula is as follows:
wherein l (k) is the kth normal training sample set
Is detected in the first detection statistic of (a),
for the kth normal training sample set
The average value matrix of (a) is,
for the kth normal training sample set
Of the covariance matrix, S
-1Is the inverse matrix of the covariance matrix of the normal training data set, | | | is a two-norm, tr () is the trace of the matrix;
after h sliding windows, h first detection statistics of the normal training data set are obtained as follows: l (1), …, l (h);
s13: randomly extracting B statistics from h first detection statistics of a normal training data set to form a set { l }
1,…,l
BB < h, and reordering the B sample samples in descending order: l
(1)<l
(2)<…<l
(w)And (3) making the w-th maximum statistic value w be lambda multiplied by alpha, wherein alpha is an allowable false alarm rate, and lambda is a random sampling frequency, and obtaining the following result after repeating lambda sampling:
calculating a detection threshold J
thThe calculation formula is as follows:
preferably, the S2 specifically includes the following steps:
s21: selecting n types of fault data samples from historical fault operation data, wherein the f type of fault samples form a fault training data set XfComprises the following steps:
wherein f is 1, …, n;
for data set X
fCarrying out normalization processing to obtain a fault training data set
Comprises the following steps:
wherein f is 1, …, n;
s22: computing a data set
Is a mean matrix of
The calculation formula is as follows:
in the formula (I), the compound is shown in the specification,
wherein d is a slave data set
The number of samples extracted in (1), q is the qth fault training data set, and i is 1, …, m, q is 1, …, t;
computing a data set
Covariance matrix of
The calculation formula is as follows:
q fault training sample set for calculating f fault by adopting sliding window method
Second detection statistic l
f(q) the calculation formula is:
after t sliding windows, t second detection statistics of the f-th type fault training sample set are obtained as follows: lf(1),…,lf(t);
S23: calculating a qth fault training sample set of the f-type fault by adopting a kernel density estimation method
Second detection statistic l
f(q) fault probability density function P
f(q) the calculation formula is:
the probability density function of the t second detection statistics for the class f fault is Pf(1),…,Pf(t);
From t probability density functions P by sliding window methodf(1),…,PfG data are sequentially extracted in (t), and an r probability density function set corresponding to the f type fault is formed as follows:
wherein r is 1, …, rl。
Preferably, the step of calculating the second detection statistic according to the fault training data set in S3 specifically includes the following steps:
s31: selecting real-time operation data of the motor to be tested as a test data set Y:
carrying out normalization pretreatment on the test data set Y to obtain a data set
Comprises the following steps:
calculating a mean matrix of the test data set Y
The calculation formula is as follows:
in the formula (I), the compound is shown in the specification,
and i is 1, …, m, q is 1, …, t, where d is the number of samples extracted from the data set Y and q is the qth test training data set;
calculating a covariance matrix for test dataset Y
The calculation formula is as follows:
calculating the qth test sample set Y by adopting a sliding window methodqdThird detection statistic ly(q) the calculation formula is:
after t sliding windows, t third detection statistics of the test sample set are obtained as follows: ly(1),…,ly(t)。
Preferably, the normal data includes: the operating voltage, current, power, and speed of the motor.
Preferably, the S4 specifically includes the following steps:
S41:calculating the qth test sample set Y by using a nuclear density estimation methodqdThird detection statistic lyProbability density function P of (q)y(q) the calculation formula is:
wherein q is 1, …, t;
t third detection statistics l corresponding to the set of test samplesy(q) a probability density function of Py(1),…,Py(t);
From t probability density functions P by sliding window methody(1),…,PyG data are sequentially extracted in (t), and the probability density function set of the r test sample is formed as follows:
wherein r is 1, …, rl;
Calculating the distance between the probability density function set of the r test sample and the probability density function set of the f type fault sample, wherein the calculation formula is as follows:
the distance between the probability density function set of the r test sample and the probability density function set of the n types of fault samples is as follows:
r under f-type fault
lThe distance values are:
form it into a distance set
Then r is
lProbability density function set and n classes of individual test samplesThe set of distances between the fault sample probability density function sets are respectively as follows:
set D of the above distances
fThe distance data in (1) is rearranged from small to large
Calculating the lower quartile of each distance data by adopting a box type graph area calculation method
Median number
Upper quartile
Upper limit of U
maxAnd lower limit U
minComprises the following steps:
in the formula (I), the compound is shown in the specification,
it is indicated that the direction is positive in the upward direction,
to get
Centralizing data at corresponding positions;
all D are plotted against the calculated values of equation (20)f1, …, n; respectively calculate all corresponding DfArea S of box plotf:
Sf=IQRf×W;(23)
In the formula, W is the width of the bottom edge;
s42: judging all DfAnd judging the fault type corresponding to the box type graph as the fault type of the motor to be tested.
Preferably, the first detection statistic, the second detection statistic, and the third detection statistic are all of KL detection statistics.
Preferably, in S41, the distance between the r-th test sample probability density function set and the n-type fault sample probability density function set is KL divergence between the r-th test sample probability density function set and the n-type fault sample probability density function set.
As a general inventive concept, the present invention also provides a motor fault diagnosis system, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
The invention has the following beneficial effects:
the invention provides a motor fault diagnosis method and system, which adopt a kernel density estimation method to calculate a fault probability density function, diagnose the fault type by comparing the probability density function of real-time operation data with the fault probability density functions of all types of faults, can find the abnormal condition of motor operation in time and carry out fault diagnosis, and have wide applicability, high accuracy, convenient use and easy implementation; the maintenance work can be conveniently and timely arranged, and the motor safety maintenance device has important significance in improving the safe operation of the motor.
The present invention will be described in further detail below with reference to the accompanying drawings.
Detailed Description
The embodiments of the invention will be described in detail below with reference to the drawings, but the invention can be implemented in many different ways as defined and covered by the claims.
Unless otherwise defined, all terms of art used hereinafter have the same meaning as commonly understood by one of ordinary skill in the art. The use of "first," "second," and similar terms in the description and in the claims of the present application do not denote any order, quantity, or importance, but rather the intention is to distinguish one element from another. Also, the use of the terms "a" or "an" and the like do not denote a limitation of quantity, but rather denote the presence of at least one.
Example 1
Referring to fig. 1, the present embodiment provides a motor fault diagnosis method, including the following steps:
s1: selecting normal operation data of a motor to be detected as a normal training data set, calculating a first detection statistic according to the normal training data set, and calculating a detection threshold according to the first detection statistic;
s2: selecting different types of fault data from historical fault operation data as a fault training data set, calculating second detection statistics according to the fault training data set, calculating a fault probability density function of the second detection statistics by adopting a kernel density estimation method, and constructing probability density function sets of all types of fault samples;
s3: selecting real-time operation data of the motor to be tested as a test data set, calculating third detection statistic according to the test data set, comparing the third detection statistic with a detection threshold, if the value of the third detection statistic is larger than the detection threshold, judging that a fault occurs, and entering S4; otherwise, the test data set is selected again until the motor is detected to be in fault;
s4: and calculating a fault density function of the third detection statistic by adopting a kernel density estimation method, constructing a probability density function set of the test data set, and diagnosing the fault type according to the distance between the probability density function set of the test data set and the probability density function sets of all types of fault samples in S2.
The motor fault diagnosis method can find the abnormal condition of the motor operation in time and carry out fault diagnosis, and has the advantages of wide applicability, high accuracy, convenient use and easy implementation; the maintenance work can be conveniently and timely arranged, and the motor safety maintenance device has important significance in improving the safe operation of the motor.
Specifically, the motor failure in the rail transit traction drive control system is taken as an example for explanation.
In the embodiment, the three-phase current of the motor is derived from the phase a, the phase b and the phase c of the rotor; the sampling time is 60000ms, which corresponds to 60000 samples; selecting a sample from the normal operation data to form a normal training data set, and calculating KL detection statistic (Kullback-Leibler divergence) of the normal operation data, wherein the normal operation data comprises parameters such as operation voltage, current, power, rotating speed and the like of the motor. In the embodiment, the KL detection statistic of the normal training data set is the first detection statistic, and a detection threshold value is obtained by a self-service method; selecting different types of fault samples from fault operation data to form a fault training data set, calculating KL detection statistics of the fault training data set, and calculating probability density functions of different types of faults by adopting a kernel density estimation method; selecting a sample from the field operation data to form a test data set, calculating KL detection statistics of the test data set, and comparing the KL detection statistics with a detection threshold to judge whether the motor fails; if the fault occurs, calculating KL divergence (distance) between the probability density function set of the test sample and the probability density function sets of all types of fault samples and box type graph areas of all types of faults; and judging the type of the current fault with the smallest area.
Preferably, the implementation steps of the invention are elaborated in combination with a motor air gap eccentricity fault in a traction drive control system fault injection benchmark software (TDCS-FIB V2.0) platform:
firstly, selecting a sample from normal operation data of a motor without air gap eccentric fault to form a normal training data set:
carrying out normalization pretreatment on the data set X to obtain a data set
Comprises the following steps:
calculating a data set by the above formula (1) and formula (2)
And the data set
The covariance matrix S.
Further, calculating KL detection statistics of the normal training sample set, specifically: from normal training data sets using a sliding window method
Extracting z-200 samples, and forming a kth normal training sample set as follows:
in the formula, k is 1, …, h, in this embodiment, the step length of each sliding window movement is set to 1, and h is N-z +1 normal training sample sets are extracted; then calculating a normal training sample set
Is a mean matrix of
Sum covariance matrix
Computing the kth Normal training sample set
KL detection statistic l (k) of (a), formula:
the h KL detection statistics of the normal training data set are obtained as follows: l (1), …, l (59801).
Note that the normal training sample set
The calculation method is specifically as follows: using sliding window method to extract data from data set
Extracting z samples to form the kth sample set
k is 1, …, h; in this embodiment, the step length of each sliding window movement is set to 1, and N-z +1 normal training sample sets are extracted altogether.
Further, a detection threshold J is calculatedth。
Collecting known air gap eccentric fault data to form a fault training data set; injecting air gap eccentric fault information based on the fault of the traction transmission control system, wherein the fault information comprises that the fault type is an air gap eccentric fault, the fault degree is 0.3, and the fault time is 40000ms, and the fault information is specifically shown in the following table 1:
TABLE 1 TDCS-FIB V2.0 platform Motor Fault
In this embodiment, the air gap eccentricity fault data sample is:
in the present embodiment, f is 1;
the fault data samples obtained by preprocessing are as follows:
preferably, the step length of each sliding window movement is set to 1, further, t-N-d +1 sliding window method acquisitions are performed on the data set, and each time d-200 fault samples are taken, then:
wherein q is 1, …, t;
calculating the mean matrix of the fault samples each time a sliding window is performed
Covariance matrix
Q-th fault training sample set for calculating air gap eccentricity fault
KL detection statistic l
1(q) the formula:
after t sliding windows, t KL detection statistics of the air gap eccentric fault training sample set are obtained as follows: l1(1),…,l1(59801);
Q fault training sample set for calculating air gap eccentric fault
KL detection statistic l
1(q) fault probability density function P
1(q) is:
probability density of failure function of air gap eccentricity is P1(1),…,P1(59801). In the same way, the other 3 kinds of fault data of the motor are collected from the platform: broken bar fault, bearing fault, turn-to-turn short circuit fault. And respectively calculating the fault probability density function P of the 3 fault dataf(q),f=2,…,4;
From 59801 probability density functions P by adopting sliding window method
f(1),…,P
f(t), f is 1, …,4, sequentially extracting g is 100 data, and forming the r-th probability density function set corresponding to the f-th fault
The step length of each sliding window movement is 1, and r is extracted
lT-g +1 f-th fault sample probability density function sets;
further, collecting motor operation data injected with air gap eccentric faults from real-time operation data of a traction drive control system fault injection reference software (TDCS-FIB V2.0) platform to form a test data set:
the method comprises the following steps of (1) collecting a test data set by a sliding window method for t-N-d +1 times, wherein d-200 samples are taken each time:
calculating the mean matrix of the corresponding data set each time a sliding window is performed
Sum covariance matrix
Computing the qth test sample set Y
qdKL detection statistic l
y(q) is:
then the t KL detection statistics of the test sample set are: ly(1),…,ly(59801)。
And then judging the fault condition of the test data. Specifically, the average value of t KL detection statistics of the test sample set and a detection threshold J are calculatedthComparing; if the average value of the detection statistics of the test sample set is larger than the threshold value JthJudging the running state of the motor to be a fault;
after the occurrence of the fault is detected, calculating the q test sample set Y by adopting a nuclear density estimation methodqdKL detection statistic lyProbability density function P of (q)y(q) the formula:
then t KL detection statistics l corresponding to the test sample sety(q) a probability density function of Py(1),…,Py(59801)。
From 59801 probability density functions P by adopting sliding window method
y(1),…,P
y(59801) Sequentially extracting g-100 data to form the probability density function set of the r-th test sample
In this embodiment, the step length of each sliding window movement is 1, and r is extracted altogether
lT-g +1 sets of probability density functions.
Calculating the probability density function set of the r test sample
Probability density function set of class f fault sample
KL divergence (distance) between
In this embodiment, the KL divergence (distance) between the r-th test sample probability density function set and the 4-class fault sample probability density function set is:
r under f-type fault
lThe individual KL divergence (distance) values are:
form it into a distance set
Then r is
lThe KL divergence (distance) set between the probability density function set of each test sample and the probability density function set of the n-type fault samples is respectively as follows:
and further, judging the fault type based on the area of the box type graph. Put KL divergence (distance) set D
fIn the order from small to large
Calculating the lower quartile of each distance data
Median number
Upper quartile
Upper limit U
maxAnd lower limit U
minAll D are plotted using the calculated values of equation 16
f1, …, n; respectively calculate all corresponding D
fArea S of box plot
f:
Sf=IQRf×W;(13)
In the formula, W is the base width, and in this embodiment, the value is 1. Specifically, when a fault occurs, the area calculation value of the box type diagram is shown in table 2 below, the waveform diagram of the fault detection result is shown in fig. 2, and the box type diagram of the fault diagnosis result is shown in fig. 3; when a bearing fault occurs, the area calculation value of the box type diagram is shown in the following table 3, the fault detection result waveform diagram is shown in fig. 4, and the fault diagnosis result box type diagram is shown in fig. 5; when a turn-to-turn short circuit fault occurs, the area calculation value of the box diagram is shown in the following table 4, the fault detection result waveform diagram is shown in fig. 6, and the fault diagnosis result box diagram is shown in fig. 7;
TABLE 2 area calculation values of box plots in the event of a broken bar fault
TABLE 3 area calculation values of box plot in case of bearing failure
TABLE 4 area calculation values of box plots in the event of turn-to-turn short circuit fault
Judging the type of the fault with the smallest area:
min(Sf)→f;
wherein min (S)f) → f denotes taking SfThe minimum value of the medium area corresponds to the fault, in the embodiment, the fault is the motor air gap eccentric fault, the waveform diagram of the fault detection result is shown in fig. 8, and the diagnosis result is shown in the chart box type diagram in fig. 9. In fig. 9, the box-shaped area corresponding to the motor air gap eccentricity fault is the smallest.
Example 2
In correspondence with the above method embodiments, the present embodiment provides a motor fault diagnosis system, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the steps of the above method when executing the computer program.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. 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.