Artificial neural network based detection of neutral relay defects

The problem considered in the work is concerned to the automatic detecting and identifying defects in a neutral relay. The special design of electromechanical neutral relays is responsible for the strong asymmetry of its output signal for all possible safety-critical influences, and therefore neutral relays have negligible values of dangerous failures rate. To ensure the safe operation of relay-based train control systems, electromechanical relays should be periodically subjected to routine maintenance, during which their main operating parameters are measured, and the relays are set up in accordance with technical regulations. These measurements are mainly done manually, so they take a lot of time (up to four hours per relay), are expensive, and the results are subjective. In recent years, fault diagnosis methods based on artificial neural networks (ANN) have received considerable attention. The ANN-based classification of relay defects using the time dependence of the transient current in the relay coil during its switching is very promising for practical utilization, but for efficient use of ANN a lot of data is required to train the artificial neural network. To reduce the ANN training time, a pre-processing of the time dependence of relay transient current was proposed using wavelet transform and wavelet energy entropy, which makes it possible to reveal the features of the main defects of the relay armature, contact springs, and magnetic system. The effectiveness of the proposed approach for automatic detecting and identifying of the neutral relays defects was confirmed during testing of the relays with various artificially created defects.


Introduction
Most railway signalling systems that are currently in use were built over half century ago and are mainly based on the use of electromechanical contact components (transmitters, relays, etc.). Although the computer-based automation systems have appeared in the last decade, the part of electromechanical signalling systems on Ukrainian railways is still exceed 90%. Most of the existing relay-contact systems are already outdated. The functional safety of railway electromechanical signalling systems is based on the use of so-called neutral relays (NRs), which have specific design that provides strong asymmetry of their output when all possible adverse for the safe system's operation factors arise [1].
In order to ensure the safe operation of relay signalling systems, NRs should be subjected to periodic routine maintenance, during which their main operating parameters are measured and regulated in accordance with technical regulations [2]. Since these measurements are usually performed manually, they require a lot of time (up to four hours per relay), are expensive, and their results are exposed to the influence of subjective factors [2,3]. Automation of measurements of most NRs' electrical parameters, such as the minimum pick-up voltage (operating voltage), must drop-out voltage (must release voltage), coil resistance, contacts resistance, etc., can be easily implemented based on modern measuring equipment. But the automation of the mechanical parameters measuring of NRs encounters serious difficulties. The mechanical and electrical forces that act on the armature of NR when it is switched determine the switching time of the NR, simultaneous or nonsimultaneous switching of the contacts, contact pressure, etc. The technical condition of the relay armature, contact springs, magnetic system and design parameters of relays, such as the height of the antimagnetic pin, inter-contact air gap, paramagnetic gap between yoke and core, etc., strongly influence on mechanical parameters of NRs.
As was shown in [4,5], the electrical transient current that flows in the relay coil when NR is turned on and off reflects the mechanical processes occurring during the armature movement, and, therefore, the features of the transient current can be used to monitor the technical condition of the armature and magnetic system of NRs. The use of wavelet transform for detecting defects of the armature of neutral relays investigated in [6]. Wavelet decomposition of signal current was used for detecting disturbances in it [7]. The multi-resolution wavelet analysis of voltage and current signals acquired by distance relays was used to identify various faults in signals [8]. The wavelet technique for fault detection in transmission line during power swing was proposed in [9]. Discrete wavelet transform for improving the accuracy of an unbalance current protection relay due to transient fault and inrush current signals was investigated in [10]. The use of an artificial neural network (ANN) to detect and identify NRs' defects by analyzing of the timedependences of their transient current is promising for effective and prompt monitoring of NR technical conditions [3]. However, training the ANN for detecting all possible defects of the armature and the magnetic system by using the time-dependences of the transient current of the NRs is a very difficult and inefficient procedure for practical application. Combination of neural network and wavelet transform for islanding detection of distributed generation in a small-scale network was proposed in [11].
The purpose of this work is to investigate the effectiveness of the proposed new method of monitoring the technical condition of the NRs, which consists of two stages. At the first stage, the NRs' time-dependences of the transient currents are measured when NRs are energized, and then these dependences are analyzed using the wavelet transform and wavelet energy Shannon entropy for revealing the features of the main defects of armature and magnetic system of neutral relays. At the second stage, NRs' defects are detected and identified using an ANN classifier, which has been preliminary trained using the revealed features of relay defects.

2
Mathematical descriptions of electromechanical processes in relay NR consists of a soft iron magnetic system, which is composed of a magnetic core with a coil, a yoke, a moving armature, and springsets with contacts of change-over type, which linked to armature. The magnetic flux generated by the electric current in the NR coil varies along the core due to the leakage flux in the air between the core and the yoke of the relay. Therefore, the use of magnetic equivalent circuits (MEC) to simulate a magnetic field in a relay proposed in [12] is not enough correct.
Typical time dependence of the transient current in relay coil during voltage switching is shown in Fig. 1. The transient current plot can be divided into six segments. First three segments (from 0 t  to correspond to relay energizing, and second three (from 3 t t  to 5 t t  ) correspond to its de-energizing. In the first segment from moment 0 t  to 1 t t  , the relay armature does not move, since the magnetic force is not strong enough to begin movement, and relationship for the relay energy balance can be written in a form [4,6]   is the energy stored in the magnetic and electric fields; FL W is the energy loss due to magnetic hysteresis, eddy currents in the magnetic system, and the dielectric losses; U is the voltage applied to relay coil; R is the active resistance of relay coil; ( ) i t is the instantaneous current value; is the instantaneous interlinkage flux in relay core. The current ( ) i t in the first segment exponentially increases in time.
The second segment from 1 t to 2 t , which corresponds to the movement of the armature, is accompanied by the conversion of part of the total energy, supplied by the electric source E W at the first stage and accumulated in the magnetic and electric fields FS W , into the mechanical work M W of the motion of the armature. The current in the second segment decreases.
In the third segment, the relay armature is completely attracted to the core at the moment 2 t , and the relay current again exponentially increases with time.
Due to the fact that the core and the yoke of NRs are located parallel at a distance significantly smaller than their length, it allows to use the theory of lines with distributed parameters to describe the magnetic flux flowing in them [4]. Differential equations for magnetic flux M  and magnetic potential M U in the cross section of the core with the coordinate x can be written as where M g is the permanence of leakage per unit length (p.u.l.) of the core, M e iw  is the magnetomotive force (p.u.l.), i is the current in the relay coil, w is the number of winds in the coil (p.u.l.), M R is the magnetic reluctance of the core and yoke (p.u.l.) expressed by 0 0 where 0  is the permeability of free space, C  and C S are the permeability and cross-section of the core, Y  and Y S are the permeability and cross-section of the yoke. Equation (2), (3) have well-known solutions [4]       where 1 C and 2 C are constants of integration, values of which are determined from boundary conditions for the start 0 x  and the end x l  (near the armature) points of the magnetic circuit.
Magnetic interlinkage is expressed by Electromagnetic attraction force of the armature to the coil expressed as where  is instant value of the air gap between the core and the armature, and M W is the magnetic energy stored in magnetic field Movement of the relay armature when relay is energized or de-energized can be described by equation [4]  ; where M F is the equivalent magnetic attraction force reduced to equivalent mass centre (r.e.m.c.), W F is the equivalent weight of the moving components of relay (r.e.m.c.); E F is the equivalent elastic force due to deformation of contact springs (r.e.m.c.); F F is the equivalent force of friction (r.e.m.c.), A M is the equivalent mass of relay armature (r.e.m.c.), C  is the reduced distance between mass centre of the moving components and the magnetic core.
When a voltage V is applied to relay coil the electrical process in the system is described by equation Note, that (12) accounts only the energy losses in a form of heat and not eddy current and hysteresis losses. By substituting (10) in (9) with using (12) the expression for the electromagnetic attraction force can be written as Therefore, M F can be calculated on the basis of the measured time dependence of the transient current, provided that the speed of the armature movement was simultaneously measured during the switching of the relay.
Thus, the electromagnetic force of the armature attraction to the core is determined by the magnetic flux in the magnetic circuit, and as a result, the defects in the magnetic system that can be in the form of increased gap between the core and the yoke, or shorted winds in the coils, lead to a decrease in the electromagnetic attraction force.
Changing of any force in (11) lead to change of mechanical parameters of NRs. The most common cause of changes in mechanical parameters is curved contact springs that occurs during the operation of the NRs.
Wavelet analysis is realized by projecting the original signal ( ) f t onto a sequence of basic functions, known as wavelets. There are two basic wavelet functions: the father wavelet ( ) t  called as the scale function and the mother wavelet ( ) t  called as the wavelet function, which can be scaled and translated to form the basis for the Hilbert space of square-integrable functions The father and the mother wavelets are defined as [15] is the scaling parameter in a J -level decomposition, and k is a translation parameter The long-term trend of the function is fixed by the father wavelet, the integral of which is 1, while the mother wavelet, the integral of which is 0, describes the fluctuations from the trend. The continuous wavelet transform of the square-integrable time signal ( ) f t consists of the scaling , j k a and wavelet coefficients, , j k b [15] , , , , DWT can decompose the approximate part in each level, while the detail part remains unchanged. Consequently, the resolution of DWT is not high enough to separate the fault signals from the extra components. Differing from DWT, DWPT can decompose the detail part signals from the extra components. Therefore, wavelet packet method is a generalization of wavelet decomposition that offers a richer range of possibilities for signal analysis.
In wavelet analysis a signal is split into an approximation and a detail. The approximation is then itself split into a second-level approximation and detail, and the process is repeated. For n -level decomposition, there are 1 n  possible ways to decompose signal.
where ( ) f t is the original signal. In recent years, wavelet entropy has become widespread tool used for the study of complex nonstationary processes. Wavelet packet energy Shannon entropy (WPESEE) is described by the expression [16]   , , , , , , , , where , , i j k P is the probability of the k -th coefficient, and , , i j k W is the energy of the k -th coefficient in the j -th node at i -th level of the wavelet decomposition; , i j W is the total energy in the j -th node at i -th level.

Artificial neural network
Methods based on artificial neural networks have recently attracted much attention due to their ability to analyze complex, non-linear processes. ANN has a variety of architectures, but the most widely used is the feed forward multilayer perceptron (MLP) network trained by back propagation algorithm. A MLP consists of at least three layers of nodes: an input layer, a hidden layer and an output layer [17].
In a single-layer network with R input elements and S neurons, the input vector   is the weight matrix, b is a bias vector, f is an activation function or transfer function. The most common activation function includes linear function, tangent hyperbolic function, threshold function and sigmoid function.

Measurement Techniques
The measurements were carried out using a special laboratory bench that consists of stable voltage source, 14-bit analog-to-digital converter, connected to PC, and the voltage switching device. The measuring equipment and technique are described in [6]. The appearance of the measuring equipment is shown in Fig. 2. To reveal the features of relay armature defects, a transient current in relay coil as well as current in all contacts were recorded by PC when relay energized and de-energized. The contacts in NR have double-throw structure. Therefore, the back and front contacts of the same contact group were connected in parallel and included in the break of the measuring circuit on the one side, while the common contact was included in the same break on the other side. Thus the current in measurement circuit through contacts was interrupted in time when common contact moved from front to back contact or in return direction. For investigations ten groups of different types of NRs were chosen. Each group contained NRs with different artificially created defects of armature or magnetic system. These defects are listed in Table 1. Up to 100 experiments were carried out in each group with varying degrees of defects. Paper presents only results for one type of NR, namely NMSH 4-600, with nominal coil resistance of 600 Ohms, and the nominal switching voltage of 12 V. The results obtained for other types of NR were, in general, similarly and were used for training ANN, and for statistical confirmation of the conclusions made in the work.

Revealing of relay defect features
The time dependences of the transient currents of NR strongly depend on the defects of their armature (Fig. 3,  4). The parameters of the transient process when NR switching were characterized by pick-up time a t , the maximum value of the current in the time interval corresponding to the armature movement m I , and the drop-out (release) time when the armature moves to the initial position r t . Time a t was determined as the time interval from the moment, when the voltage is applied to the relay coil, to the time corresponding to the local minimum on the transient current curve, which corresponds to the point between the first and second segments of the transient current (Fig. 1).  All mechanical defects of the relay (such as bending contact springs, or increase of the resistance force due to fixing various loads on the armature, as well as defects of the magnetic circuit, in the form of shorting turns of the relay coil, or an increase in the paramagnetic gap between the core and the yoke) lead to an increase in the a t , m I parameters, and to decrease r t parameter (Fig. 3,  4). For the relay with deliberately increased friction force the a t , r t , m I parameters have slightly larger values compared to the same parameters for a relay in good condition. Consequently, the observed effect of defects in relay armature and magnetic system on the parameters of the transient current allows the use of these parameters as features of defects. To compare the parameters of the transient current for different relays and for the convenience of training ANN, these parameters were converted into relative form as the ratio to similar parameters for relays in good condition, and the obtained values are presented in Table 1. For relays with armature defects the ssecond segments of the transient current curves, which corresponds to the armature movement, contain some features in a form of swells and sags (Fig. 3, 4), the value, position and number of which correlate with the technical conditions of the relay contact springs. An increase in the number and degree of deformation of the contact springs leads to an increase in the number, and values of amplitude and duration of sags and swells at the second segment of the transient curve of the relay. For relays with armature bounces (rebounds) after it striking to the relay core on the transient current curve after the time a t , when the armature is fully raised, the damped oscillations are observed. For the relays with magnetic circuit defects the values of the current m I and the switching time values a t , r t are higher than similar parameters for NR that is in good condition (type A), but wavy segments with excessive sags, swells or oscillations that are observed for relays with curved contact springs (type C, D), do not appear on the transient current curves.
As mentioned earlier (Fig. 1), when the relay is energized, its armature does not move in time intervals corresponded to the first and third segments of the transient current curve. If the magnetic flux in the core is not saturated, one can make a reasonable assumption that the transient current in the first and third segments increases exponentially in time, and the time constants of the current increase depend on the technical state of the magnetic system.
The values of the time constants were calculated from, and their normalized values 1n T and 3n T , calculated as a ratio to the corresponding values for the relays that is in good condition, are performed in Table 1. Obtained values are in satisfactory agreement with the values calculated from the directly measured coil resistance and inductance for two stable position of the armature.
The values of time constants for the first 1n T and the third 3n T segments are not significantly depended on the armature defects for the relay of type A, B, C. D, E, F, I, J (Table 1), but have a lower values for relays with magnetic system defects (NRs of type J and H).
Moreover, the ratio 1 3 n n T T for defects in the form of an increased paramagnetic gap between the core and the yoke has a slightly larger value compared to the similar ratio for a magnetic system with shorted winds in coil. These resultes makes it possible to use 1n T and 3n T as features of the magnetic system defects.
Thus, the features of the transient current curve are very sensitive to defects in the armature and the magnetic system due to their influence on the magnetic and mechanical forces acting in the system when the relay is switched. But these features are small compared to the amplitude values of the transient current during relay switching, Therefore, the direct use of transient relay currents to detect defects using the ANN classifier is inefficient for practical use because it requires the processing of redundant data of sampled transient current that is not related to the features of defects. To reduce the amount of data for the ANN classifier, it is reasonable to preliminary reveal the main features of relay defects using wavelet transform.

Wavelet analysis of transient currents
To reveal the features of defects on transient current curve, the values of which exceed a certain acceptable level, the measured transient currents for relay with different defects were analyzed by using DWPT. Transient current decomposition was performed using a three level DWPT. The distributions of the energy in the DWPT nodes for NRs with armature defects are shown in Fig. 5, and the time dependences of the wavelet coefficients at nodes (3.2), (3.3), and (3.6) for relay that is in good condition (of type A) and for relay with bent contact springs (of type D) are shown in Fig. 6. These nodes are selected since the features of the relay armature defects are most distinguishable in them.
As can be seen, defects of NRs are affected on distribution of the energy in the DWPT nodes (Fig, 5). Defects of the armature lead to a strong increase in the DWPT decomposition coefficients. In Fig. 6 results are presented for type (D) relays only. For other NRs with armature defects, the results are similar. The DWPT decomposition coefficients increase with increasing number and degree of deformation of the bent contact springs, and these coefficients can be used for revealing defects of this type. For relays with a completely removed contacts (type A), the time dependences of the DWPT coefficients at nodes (3.2), (3.3), (3.6) have one narrow peak at time 0.19 s, which corresponds to the moment when the armature is touched to magnetic core. The bending of several contact springs in relay of E type leads to the appearance of several swells and sags on the time dependence of the DWPT coefficients, whose amplitudes increase with increasing degree of bending of the contact springs.
Therefore, WT-analysis of the transient currents of the relay allows to reveal the features of the main armature and magnetic system defects, but their automatic recognition and identification still require large amounts of the DWPT coefficients. For automatic prompt detecting of NR armature defects, the wavelet packet energy Shannon entropy (WPESE) was proposed to use.  Table 1. Armature defects of NR in the form of bent contact springs (NR types C, D, E) cause a strong increase in WPESE1 values, while defects in the magnetic circuit of the relay have a much smaller effect on WPESE1 values. At the same time, the relay defect in the form of anchor rebound after striking to the NR core, leads to a noticeable increase in WPESE2. Thus, the wavelet entropy can be used as a feature for the effective detection of armature relay defects.

Neural network Classifier
Based on the features of the main defects of the NR (Table 1), the Artificial Neural Network architecture was designed as three layer feed-forward network with seven inputs, eight outputs, a hidden layer, and sigmoid function neurons. Each input node is connected to a hidden layer node, and each hidden node is connected to an output node in the same way.
The target output vector has all zero components if the NR is in good condition, and when a certain defect occurs, the corresponding component of the target vector takes a value equal to one. The total amount of data prepared for ANN training consisted of 900 input-output (target) vectors, which contain 100 vectors for NR in good technical conditions, and 800 vectors for NR with various defects belonging to the eight main defects group listed in Table 1. Part of these data (60%) was used for ANN training purposes, 20% of the data for validation and 20% of the data for ANN testing. The testing data comprises of both data for relay in good condition, as well as data for NR with defects and are totally different from the ANN training data.
The error back-propagation algorithm with Levenberg-Marquardt optimization technique was used to train ANN. The initial weights and biases of the network were generated automatically by the program. The mean square error achieved during ANN training is 0.0027. After training, the ANN performance is assessed using 180 test data. A trained ANN correctly classified 179 data from 180, which indicates a total detection rate of 99.4%. The testing and the validation curves have similar characteristics which is an indication of efficient training.

Conclusions
A new method for the automatic detection of defects in a neutral relays based on ANN is proposed. To reveal the features of the armature and magnetic system defects of NR, the time dependences of the transient current when relay is switched are measured and analyzed using wavelet packet transform and wavelet energy Shannon entropy.
The dependence of the transient current on time when the relay is turned on can be divided into three characteristic segments. In the first segment, the relay armature does not move, since the magnetic force is not strong enough to begin movement. The current in the first segment exponentially increases in time.
In the second segment, the armature moves, and part of the total energy stored in the first stage in the magnetic and electric fields of the magnetic circuit is converted into the mechanical work of the armature movement, and this process is accompanied by a certain decrease in the relay current, In the third segment, the relay armature is completely attracted to the core, and the relay current again exponentially increases with time. The time constants of the exponential increase in the transient current of the relay in the first and third segments can be used to detect defects in the magnetic system of the relay. The features of the transient current in the second segment can be used to identify defects in relay armature.
Since the changes in the transient current curve caused by the armature defects are small, the discrete wavelet packet transform was used to reveal features of the defects. For automatic prompt detecting of armature defects, the wavelet energy Shannon entropy has been proposed to use.
To detect and classify defects of NR the three layers feed-forward artificial neural network with seven inputs, eight outputs, a hidden layer, and sigmoid function neurons was used. A trained ANN correctly classified 179 data from 180, which indicates a total detection rate of 99.4%.
The effectiveness of the proposed approach for automatic detecting and identifying of the neutral relays defects was confirmed during testing of the relays with various artificially created defects.