Disclosure of Invention
The invention provides a railway relay running state evaluation method based on an extreme learning machine, aiming at the defects in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme that the method comprises the following steps:
building a railway relay full-life experiment test system, and extracting characteristic parameters influencing the electric life of the railway relay;
constructing a random forest feature selection model, and performing dimensionality reduction treatment on the preliminarily extracted feature parameters;
and constructing a railway relay full-life state evaluation model based on an extreme learning machine, carrying out network training and verifying the accuracy of the model.
Further, set up railway relay life test system, extract the characteristic parameter that influences railway relay electricity life and include: acquiring voltage and current waveforms of a contact and a coil of a railway relay; the method for acquiring degradation characteristic parameters in the process of switching on and switching off the contact comprises the following steps: bounce time, pull-in time, release time, arcing time, over travel time, and contact resistance.
Still further, the bounce time: the time interval from the first contact of the finger contact and the static contact to the end of the bounce of the contact is shortened; the moment of the first contact of the movable contact and the fixed contact is recorded as teThe time when the two contacts are stably attracted is recorded as tfThen the bounce time is recorded as ttCan be expressed as:
tt=tf-te
the pull-in time is as follows: the attraction time is the time from the on-off of the coil to the first contact of the movable contact and the fixed contact. The coil energization time is denoted as tdThe moment of the first contact of the moving contact and the static contact is teIf the closing time is recorded as txCan be expressed as:
tx=te-td
the release time is as follows: the time interval from the power-down of the coil to the separation of the moving and stationary contacts. Contactor release time is denoted tsAnd the moment when the coil is powered off is recorded as tcTime of release tsCan be expressed as:
ts=ta-tc
the arcing time is as follows: the time interval from the moment the arc is generated to the moment the arc eventually extinguishes. For a certain phase contact of the contactor, the moment when the arc is generated is taThe moment of the final extinction of the arc is denoted as tbThen the phase arcing time can be expressed as tarc:
tarc=tb-ta
The arcing energy is: the arc energy E generated by the primary arc can be expressed as:
in the formula, ta、tbThe time points of arc starting and arc extinguishing are u (t), i (t) and the voltage value and the current value of the contact; in practice, the collected voltage and current signals are all discrete, so the discretization of the arcing energy is expressed as
Where Δ t is the sample point time interval, fsIs the sampling rate;
the overtravel time is as follows: from the end of the pull-in time to the time when the armature is completely closed, the armature closing time is denoted txtThen the over-travel time can be represented as tcc:
tcc=txt-tx
The contact resistance is as follows: when the relay switch-on circuit is stably electrified, contact resistance exists between the moving contact and the static contact. I.e. the ratio of the contact voltage drop to the contact current;
in the formula unIs the contact voltage i in a period when two contacts are stably attracted and electrifiednThe current of the lower contact in the same period is shown, and N is the number of points collected in the period.
Further, the constructing of the random forest feature selection model and the dimensionality reduction processing of the preliminarily extracted feature parameters comprise:
calculating an error value by selecting a mode of data outside the bag and sequencing the characteristics; the method comprises the following specific steps:
respectively calculating the error value of each decision tree by using k groups of data outside the bag, and recording the error value as
Randomly rearranging the ith characteristic of the k groups of data outside the bag, ensuring other characteristics to be unchanged, and then recalculating an error value, and recording the error value as
Calculating the feature importance, and the formula is as follows:
and sorting the features based on the importance, eliminating unimportant features according to the obtained feature importance sequence, and selecting the features with high top m importance as the input of the model.
Further, the building of the extreme learning machine-based railway relay life state assessment model, the network training and the verification of the accuracy of the model comprise:
(1) preparing data: and determining the number n and m of input and output neurons according to the training sample, giving the number s of the neurons in the hidden layer and an activation function g (·), and randomly generating an input weight w and a bias value b.
(2) Model training: and inputting the normalized samples, and solving and calculating the output weight beta meeting the requirement of the objective function through a correlation formula.
(3) And (3) testing a model: inputting a test sample, and calculating the probability value of the state category of the sample data.
Still further, the data preparation includes: given N sets of samples (x)i,yi)∈Rn×RmThen, the number of input layer neurons and the number of output layer neurons can be obtained as n and m, respectively, that is, the number of input layer neurons and the number of output layer neurons are determined by the length of the input/output attribute. Randomly generating an input weight w and a bias b by using the number of the hidden layer neurons, and selecting an activation function as g (·); x is the number ofiFor the ith sample data, yiThe output label is corresponding to the ith sample.
Still further, the model training includes: based on N groups of samples, ELM training is carried out, and the training process of the ELM comprises two stages:
in the first stage, the hidden layer output can be obtained according to the input weight w and the bias b as follows:
the second stage is to solve the weight beta between the hidden layer and the output layer, the number s of neurons in the hidden layer is artificially selected by a trial and error method, and then the mathematical model is as follows:
in the formula: biIs the hidden layer neuron bias value introduced by the model for effectively fitting the training data; y isjOutputting the model; w is aiInputting weight values for the hidden layer; beta is aiIs the weight between the hidden layer and the output layer;
the optimal solution of the output weight is obtained as follows:
β*=H+Y
in the formula, H+The generalized inverse matrix is H, and thus, the training part based on the extreme learning classifier model is completed to obtain the weights and the offsets of the input and hidden layers and the weights of the hidden layers and the output layer.
Still further, the model testing includes: and inputting the test set data into the trained recognition model, and verifying the recognition accuracy of the model to obtain the probability of the operation state category of the relay.
Compared with the prior art, the invention has the beneficial effects.
(1) The extreme learning machine is based on a feedforward neural network structure, and is different from the traditional neural network learning by a gradient descent method and a back propagation method, and continuous iteration is needed to update the weight and the threshold value. The extreme learning machine achieves the purpose of learning by increasing the number of hidden layer nodes, the number of the hidden layer nodes is generally determined according to the number of the samples, and the number of the hidden layers is skillfully connected with the number of the samples. It does not require iteration and is therefore much faster than conventional neural networks. The weights w between the input layer and the hidden layer and the threshold b of the nodes of the hidden layer are obtained by random initialization and do not need to be adjusted.
(2) The extreme learning machine model is applied to the problem of railway relay operation state evaluation for the first time, and is generally and commonly used in problems of character statement identification, population flow prediction, stock market prediction, weather prediction and the like. The contact performance degradation condition of the railway relay is influenced by a plurality of factors, so that a plurality of parameters capable of reflecting the contact performance degradation trend are extracted for data analysis, and the degradation condition of the relay can be predicted when the state evaluation aims at obtaining the contact parameters of the relay. The method realizes the online real-time prediction of the running state of the railway relay, and solves the problems of low evaluation precision and difficulty in realizing online evaluation in the traditional method.
In conclusion, the extreme learning machine model is applied to the problem of railway relay operation state evaluation for the first time, real-time online prediction of the railway relay can be achieved, stability is high, result accuracy is high, breakdown of the whole power system caused by damage of the relay is avoided to the greatest extent, and safety and reliability of the power system are greatly improved.
Detailed Description
As shown in fig. 1-4, the specific embodiment of the present invention: a railway relay running state evaluation method based on an extreme learning machine comprises the following steps: building a railway relay full-life experiment test system, and extracting characteristic parameters influencing the electric life of the railway relay; constructing a random forest feature selection model, and performing dimensionality reduction treatment on the preliminarily extracted feature parameters; constructing a railway relay life state evaluation model based on an extreme learning machine, carrying out network training and verifying the accuracy of the model; the extracted feature parameters of the full-life state are averagely divided into four state grades, the primarily extracted feature parameters are subjected to importance calculation to screen out low-dimensional parameters with higher importance, 80% of the feature parameters in all the states are randomly selected to serve as a training set to be used for training a classifier model, and the rest 20% of the feature parameters are used as test eyes to verify the accuracy of the model.
The method can realize the on-line prediction of the running state of the railway relay, and solve the problem that the traditional method is difficult to accurately identify and predict the running state of the railway relay in real time. The real-time monitoring of the running state of the relay is of great significance to the prevention of the fault of a railway signal system and further guarantee of the running safety of the train
Step 1, building a railway relay full-life experiment test system, and extracting characteristic parameters influencing the electric life of a railway relay, wherein:
the waveforms of the contact voltage and current and the coil voltage and current of the railway relay are collected, and the dynamic waveform in the contact attraction process is shown in figure 1. The degradation characteristic parameters including bounce time, pull-in time, release time, arcing time, overtravel time and contact resistance are obtained from the process of switching on and off the contacts and are taken as characteristic parameters of key researches, and the parameters can be correspondingly influenced by the contact clearance and can well reflect the performance degradation state of the relay. The relevant definitions and calculations are as follows:
(1) and (3) bounce time: the jump time refers to the time interval from the first contact between the movable contact and the static contact to the end of the bounce of the contact. The moment of the first contact of the movable contact and the fixed contact is recorded as teThe time when the two contacts are stably attracted is recorded as tfThen make a jumpThe time is recorded as ttCan be expressed as:
tt=tf-te
(2) attracting time: the attraction time is the time from the on-off of the coil to the first contact of the movable contact and the fixed contact. The coil energization time is denoted as tdThe moment of the first contact of the moving contact and the static contact is teIf the closing time is recorded as txCan be expressed as:
tx=te-td
(3) the release time is as follows: the time interval from the power-down of the coil to the separation of the moving and stationary contacts. Contactor release time is denoted tsAnd the moment when the coil is powered off is recorded as tcTime of release tsCan be expressed as:
ts=ta-tc
(4) arcing time: the time interval from the moment the arc is generated to the moment the arc eventually extinguishes. For a certain phase contact of the contactor, the moment when the arc is generated is taThe moment of the final extinction of the arc is denoted as tbThen the phase arcing time can be expressed as tarc:
tarc=tb-ta
(5) Arcing energy: the arc energy E generated by the primary arc can be expressed as:
in the formula, ta、tbAt the time of arc starting and arc extinguishing, u (t), i (t) are voltage values and current values of the contacts. In practice, the collected voltage and current signals are all discrete, so the discretization of the arcing energy is expressed as
Where Δ t is the sample point time interval, fsIs the sampling rate.
(6) Overtravel time: from the end of the pull-in time to the time when the armature is completely closed, the armature closing time is denoted txtThen the over-travel time can be represented as tcc:
tcc=txt-tx
(7) Contact resistance: when the relay switch-on circuit is stably electrified, contact resistance exists between the moving contact and the static contact. I.e., the ratio of the contact voltage drop to the contact current.
In the formula unIs the contact voltage i in a period when two contacts are stably attracted and electrifiednThe current of the lower contact in the same period is shown, and N is the number of points collected in the period.
Step 2, constructing a random forest feature selection model, and performing dimensionality reduction treatment on the preliminarily extracted feature parameters, wherein:
the error value is calculated and the features are sorted by selecting the way of out-of-bag data (OOBData). The method comprises the following specific steps:
(1) respectively calculating the error value of each decision tree by using k groups of out-of-bag data (OOBData), and recording the error value as
(2) Randomly rearranging the ith characteristic of the k groups of data outside the bag, ensuring other characteristics to be unchanged, and then recalculating an error value, and recording the error value as
(3) Calculating the feature importance, and the formula is as follows:
(4) and sorting the features based on the importance, eliminating unimportant features according to the obtained feature importance sequence, and selecting the features with high top m importance as the input of the model.
Step 3, constructing a railway relay life state evaluation model based on the extreme learning machine, carrying out network training and verifying the accuracy of the model, wherein:
the extreme learning machine is a three-layer network structure algorithm composed of an input layer, a hidden layer and an output layer, wherein the input layer is connected with the hidden layer through an input weight w, the hidden layer is connected with the output layer through an output weight beta, neurons of the hidden layer have a bias value b, and the structure of the algorithm is shown in figure 2.
The weight matrix between the input layer and the hidden layer and the weight matrix between the hidden layer and the output layer are recorded as follows:
setting the threshold b ═ b of hidden layer neuron1,b2,…,bl]'l×mThe input matrix X and the output matrix Y of the training set with Q samples are respectively as follows:
let the activation function of the hidden layer neurons be g (x), and the output T of the network be:
T=[t1,t2,…tQ]m×Q
when the error of the output function takes the minimum value, but the hidden layer neural network obtains the optimal solution, which is expressed as:
namely, the objective function of the single hidden layer neural network is a loss function, which is equivalent to the minimum value of the objective function, and is expressed as:
step 3, constructing a railway relay life state evaluation model based on the extreme learning machine, carrying out network training and verifying the accuracy of the model, wherein:
an ELM model is constructed, the data of the whole service life state of the railway relay is averagely divided into 4 states, the state grade division is shown in figure 3, 80% of data are randomly selected in each state to serve as a training set, the relation between the training data and the state category is shown in figure 4, and the training process is shown in figure 4. And (5) taking 20% of data as a test set to verify the identification accuracy of the model.
Given N sets of samples (x)i,yi)∈Rn×RmThen, the number of input layer neurons and the number of output layer neurons can be obtained as n and m, respectively, that is, the number of input layer neurons and the number of output layer neurons are determined by the length of the input/output attribute. The training process of ELM comprises two stages:
the first stage is to randomly generate input weights w and biases b from the hidden layer neuron number.
Selecting the activation function as g (-) then can derive the hidden layer output as:
the second stage is to solve the weight beta between the hidden layer and the output layer, the number s of neurons in the hidden layer is artificially selected by a trial and error method, and then the mathematical model is as follows:
in the formula: biIs the hidden layer neuron bias value introduced by the model for effectively fitting the training data; y isjOutputting the model; w is aiInputting weight values for the hidden layer; beta is aiIs the weight between the hidden layer and the output layer.
The above equation can be further simplified as:
Hβ=Y
the solution model for the hidden layer output weights β can be expressed as:
the optimal solution of the output weight can be derived through the knowledge of the line generation and the matrix theory as follows:
β*=H+Y
in the formula, H + is a generalized inverse matrix of H.
So far, the training part based on the extreme learning classifier model is completed, and the input and hidden layer weights and the bias as well as the hidden layer and output layer weights are obtained. And (4) taking the test set data as input, verifying the identification accuracy of the model, and obtaining the probability of the operation state category of the relay.
Specifically, the key steps of extreme learning model training and recognition can be summarized as follows:
(1) preparing data: and determining the number n and m of input and output neurons according to the training sample, giving the number s of the neurons in the hidden layer and an activation function g (·), and randomly generating an input weight w and a bias value b.
(2) Model training: and inputting the normalized samples, and solving and calculating the output weight beta meeting the requirement of the objective function through a correlation formula.
(3) And (3) testing a model: inputting a test sample, and calculating the probability value of the state category of the sample data.
Fig. 1 is dynamic waveforms of a relay pull-in process, wherein 1 is a dynamic waveform of a relay coil current, and 2 is a dynamic waveform of a contact voltage. t is t1To the moment of touch, t2For actuation of a sectional moment, t3To be arcingEnd time, t4At the moment of actuation, t5At the moment when the armature is fully closed, t6Is the jump back end time. The pull-in time and the overtravel time can be reflected on the contact voltage and coil current waveforms of the relay, and similarly, parameters such as release time, arcing time, bounce times and the like can be obtained through the dynamic waveforms of the contact voltage.
Fig. 2 is a hierarchical diagram of the operation state of the railway relay, in the embodiment: the running states of the railway relay are divided into 4 grades as shown in figure 3, namely { good (state I), general (state II), attention (state III), warning (state IV) }, and the good stage indicates that the electric wear of the relay contact is small, the work is stable, and the performance is excellent; the general stage shows that the relay runs for a period of time, has certain electrical wear, relatively stable working performance and lower probability of failure; the attention stage shows that the contact of the railway relay is abraded to a great extent, the probability of failure is increased compared with the prior stage, attention needs to be paid, and the working performance of the relay can still meet the working requirement; the warning stage shows that the abrasion of the relay contact is serious, the working performance is reduced, and the probability of failure is high.
Fig. 3 is a diagram of a neural network structure of an extreme learning machine, and a model for evaluating an operating state of a railway relay based on the extreme learning machine is constructed in this embodiment, the extreme learning machine is a three-layer network structure algorithm composed of an input layer, a hidden layer and an output layer, the input layer and the hidden layer are connected by an input weight w, the hidden layer and the output layer are connected by an output weight β, and a neuron of the hidden layer has an offset value b.
Fig. 4 is a flow chart of extreme learning machine model training, and first, dimensionless processing is performed on the extracted characteristic parameters, and each state category of the relay is used as a label to form a data set. And (3) randomly disordering the data set, taking 80% as a training set and 20% as a test set, training the input model of the training set, then carrying out state recognition prediction on the input model of the test set, drawing a recognition result comparison graph, and verifying the accuracy of the model.
When the practical problem is solved, the real-time running state of the relay can be obtained only by processing the real-time running data of the railway relay and inputting the processed real-time running data into the model.
It should be understood that the detailed description of the present invention is only for illustrating the present invention and is not limited by the technical solutions described in the embodiments of the present invention, and those skilled in the art should understand that the present invention can be modified or substituted equally to achieve the same technical effects; as long as the use requirements are met, the method is within the protection scope of the invention.