# Fault Diagnosis for Compensating Capacitors of Jointless Track Circuit Based on Dynamic Time Warping

Authors: Wei Dong
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

Aiming at the problem of online fault diagnosis for compensating capacitors of jointless track circuit, a dynamic time warping (DTW) based diagnosis method is proposed in this paper. Different from the existing related works, this method only uses the ground indoor monitoring signals of track circuit to locate the faulty compensating capacitor, not depending on the shunt current of inspection train, which is an indispensable condition for existing methods. So, it can be used for online diagnosis of compensating capacitor, which has not yet been realized by existing methods. To overcome the key problem that track circuit cannot obtain the precise position of the train, the DTW method is used for the first time in this situation to recover the function relationship between receiver’s peak voltage and shunt position. The necessity, thinking, and procedure of the method are described in detail. Besides the classical DTW based method, two improved methods for improving classification quality and reducing computation complexity are proposed. Finally, the diagnosis experiments based on the simulation model of track circuit show the effectiveness of the proposed methods.


---

## Body

## 1. Introduction

Track circuit is one of the most important basic equipment in train control system. It is used for detection of train’s occupancy on the track, train-ground communication, and detection of broken rails, and its functions are crucial in ensuring safe operation of trains. In track circuit, the rails are taken as parts of the working circuit and the current flows from transmitter to receiver through the rails (Figure1). If some train is located between the transmitter and the receiver (this interval is called “block section”), then the circuit will be shorted by the wheels and axles of the train (Figure 2). So a remarkable drop in the receiver’s voltage will indicate a train’s occupancy. In this way, the train control system can obtain the information which block sections are occupied and which block sections are empty. Based on this information, the train control system can release movement authorities to each train in order to avoid collisions between trains. If the track circuits have some faults, the most serious consequence is to cause collisions of trains, resulting in catastrophes. Even if the fail-safety mechanism plays its role and no catastrophic accident happens, the transportation efficiency of railway will be affected seriously, causing considerable economic loss. So the timely fault diagnosis for track circuit is significant to both safety and efficiency of the railway transportation system.Figure 1
Basic structure of track circuit (empty).Figure 2
Basic structure of track circuit (occupied).In the practical application, as track circuits must be laid along the rails and the length of one track circuit is about 1~2 kilometers, the application scope of track circuits is quite large. And due to the special structure and complex working environment, track circuits are easily affected by temperature, humidity, ballast resistance, electromagnetic interference, and mechanical vibration, which results in a high fault rate of track circuit [1–4]. As a result of the above two aspects, the loss caused by faults of track circuits is very huge. For example, according to the report from the official website of the Ministry of Railways of China, up to the end of 2012, the number of track circuits laid along Chinese railways reaches about 600 thousand, and the equipment assets of track circuits reach about 60 billion RMB. And according to the statistical data released by Chinese railway department, there were about 8 thousand faults happening in the signal and communication systems of Chinese railways per year. The majority of these faults were caused directly or indirectly by track circuits, resulting in a total traffic delay time of about 4 hundred thousand minutes. In other words, each fault caused an average traffic delay of about 50 minutes [5].Among different fault types of track circuit, compensating capacitor’s fault is one of the most important fault types. Compensating capacitors are used to compensate the inductive impedance of the rails, so that the current signal can be transmitted along the rails far enough. To this end, compensating capacitors are installed at equal intervals along the rails, and the installation interval is about 80~100 meters (Figure3). Due to influence of bad weather and mechanical vibration and so on, compensating capacitors are prone to be faulty. Once some compensating capacitors are faulty, the signal transmitted along the rails will be attenuated rapidly, which may result in red light faults. When a track circuit has this kind of faults, the track circuit will declare that it is occupied (i.e., in red light state) when there is no train on the track in fact. In this case, to find the faulty compensating capacitors, maintenance personnel have to check the compensating capacitors one by one along the very long rails, which not only consumes lots of human resources but also causes a long delay in train’s operation. For example, in the spring of 2009, the large-range faults of the compensating capacitors in Chinese Beijing-Tianjin intercity high-speed railway were caused by snowstorm. In order to repair the faults as soon as possible, on the condition of lacking related diagnosis technologies, the railway department was forced to replace all the compensating capacitors within 2 days, resulting in a huge consumption of human and material resources.Figure 3
Structure of track circuit.Despite the importance, the problem of fault diagnosis for track circuit has not been solved very well and there are still many difficulties. In industrial community, up to now, the most commonly adopted methods for fault diagnosis of track circuit are periodic maintenance and field inspection [4], resulting in low working efficiency, high working strength, and long repair time. In academic community, a lot of work has been done. Chen et al. [3, 4] and Huang et al. [6] gave fault diagnosis methods for track circuit based on neurofuzzy systems, which can detect and diagnose the most common faults of track circuit. However, due to lack of dynamic diagnostic information, this method cannot be used to diagnose compensating capacitor’s faults. Aiming at the features of track circuit’s multiple fault modes and uncertain and nonaccurate fault symptom information, Oukhellou et al. [7] gave an information fusion method for fault diagnosis of compensating capacitor based on Dempster-Shafer classifier. However, this method can only be used by inspection train, resulting in that it cannot be used for online diagnosis.Similar to [7], most existing methods for fault diagnosis of compensating capacitors in track circuit are based on the shunt current (“shunt current” is the current flowing through the wheels and axle of a train when the track circuit is occupied (see Figure 2)) of inspection train. For example, Côme et al. [8, 9] proposed noiseless independent factor analysis methods for fault diagnosis of compensating capacitors in track circuit. Zhao et al. [10] designed a kind of onboard autotest system to detect the faults of track circuit’s compensating capacitors in real time. Zhao et al. [11] used the induced voltage recorded by cab signal as fault feature and gave a fault diagnosis method for track circuit based on discrete binary wavelet transform (DBWT) and wavelet ridge (WR), finally detecting the changes of instantaneous frequency to diagnose the disconnection fault of compensating capacitor. Zhao et al. [12] used the transmission line theory to construct a track circuit model with cascade form of multiple four terminal networks. Based on the constructed model, the typical fault modes of compensating capacitor were analyzed through the fault features of track voltage, shunt current, and input impedance of main track circuit. Linhai et al. [13] proposed a wavelet analysis based method to detect the integrity of the compensating capacitors of UM71 track circuit, by making use of the recorded data in the cab signal recorder. Zhao and Mu [14] analyzed induced voltage envelope of cab signal (IVECS) of track circuit by simulation model under different faulty conditions and proposed a compensating capacitor diagnosis method based on adaptive optimal kernel time-frequency representation (AOK-TFR). Zhao et al. [15] adopted B-spline DBWT and improved Hilbert-Huang transformation for noise reduction and fault feature retrieve and proposed a diagnosis method for compensating capacitor based on cab signal recorder information. Zhao et al. [16] proposed a diagnosis method for compensating capacitor based on the regression model of the shunt current. This method adopted Levenberg-Marquardt (L-M) algorithm to verify the model and generalized S-transform (GST) to compute the instantaneous frequency so as to locate the faulty capacitors. Zhao et al. [17] analyzed the influence law of compensating capacitor’s fault on the induced voltage envelope of the cab signal and proposed a comprehensive fault diagnosis method based on genetic algorithm to locate faulty compensating capacitors. Lin-Hai et al. [18] presented a collaborative fault diagnosis system for compensating capacitors in track circuit using AOK-TFR and adaptive genetic algorithm (AGA) based on the cab signal. Sun et al. [19] presented a diagnosis approach for compensating capacitors based on empirical mode decomposition (EMD) and Teager energy operator (TEO) theory, which can detect multiple capacitor faults.The common feature of the above research on fault diagnosis of compensating capacitor is that they must depend on the shunt current of inspection train. The problems of these methods can be summarized as follows.(1)
For a specific railway line, the inspection train has a specific running period and can only be used when the railway line is idle, so these methods cannot be used for online diagnosis. Online diagnosis of compensating capacitor is important, because it can help to find the faulty compensating capacitors in time so as to avoid traffic delay. Usually, one faulty compensating capacitor may not result in failure of track circuit, but more faulty compensating capacitors may result in failure of track circuit. So finding faulty compensating capacitors in time is important for avoiding failure of track circuit.(2)
If there is no inspection train, to use these methods, some shunt current detecting and fault diagnosis devices must be installed on common trains, which will result in huge cost input and huge workload for modifications of equipment. Besides, considering safety, modifications of on-board equipment are rigorously restricted by the management department, so it is hard to install these devices.(3)
Since the shunt current must be detected through electromagnetic induction, the detected results are easily interfered by noise.(4)
These methods take the function relationship between shunt current and shunt position as the diagnostic basis, so the position of the train’s first wheel-set must be obtained accurately. But in engineering practice, the precise position of the train is not easy to obtain by track circuit, resulting in that the diagnosis results are easily affected by position error.To overcome the above problems, a dynamic time warping (DTW) based fault diagnosis method for compensating capacitors in track circuit is proposed in this paper. In order to realize online diagnosis, this method does not depend on the shunt current of inspection train and only collects the voltage signals in receiver of track circuit. However, static voltage information is insufficient to locate the faulty capacitor. In order to promote the diagnosis resolution, this method uses the dynamic voltage information which is varying when a train is passing the track circuit (in this situation, the structure of track circuit is changing (see Figure2), so more information can be obtained). Different from the existing methods, this method only needs the function relationship between receiver’s peak voltage and shunt time (instead of shunt position) as the diagnostic basis, and the DTW method is used in this situation to recover the original function relationship between receiver’s peak voltage and shunt position. Finally, by DTW, the characteristic curve is compared to the sample curves of different faults to locate the faulty capacitor. The contributions and advantages of the method proposed in this paper can be listed as follows.(1)
This method only uses the ground monitoring signals of track circuit to locate the faulty compensating capacitor, not depending on inspection train. So, this method can be used for online diagnosis of compensating capacitor, which is not yet realized by existing methods.(2)
This method does not need the outdoor monitoring signals (see Figure3) or the on-board monitoring signals, so the existing system does not need to be modified greatly, which means a good engineering feasibility.(3)
Since the precise train position is very hard to obtain based on the existing monitoring system of track circuit (the position information of a train is easily obtained by on-board devices instead of ground devices. However, on-board devices are not suitable for online diagnosis of track circuit), this method does not need the position of the train and adopts DTW to recover the function relationship between receiver’s peak voltage and shunt position. So, this method overcomes the problem that the existing methods must depend on the precise position of the train.This paper is organized as follows. Section1 gives an overall background and introduces the problem. Section 2 gives a description of track circuit structure and track circuit model. Section 3 gives the fault diagnosis method for track circuit based on dynamic time warping. Section 4 gives the results and discussion. Finally, Section 5 gives the conclusion.


## 2. Track Circuit and Track Circuit Model

### 2.1. Track Circuit Structure

The structure of a track circuit is shown in Figure3. A track circuit consists of four parts: transmitter part, receiver part, main track circuit, and small track circuit. Transmitter part, which is used for signal transmitting, consists of transmitter, lightning protector, cable simulator, SPT (“SPT” is just a code for digital signal cable in Chinese railway. “SP” means “digital signal cable” and “T” means “railway”) cable, and matching transformer. Transmitter is used to generate a frequency-shift modulated signal with high stability and precision. Lightning protector is used to protect against lightning impulses which are introduced indoors by the cable. SPT cable is used to transmit signals from indoor transmitter to outdoor steel rails, and cable simulator is used to compensate the actual SPT cable so that the total equivalent length of SPT cable is equal to 10 km. Matching transformer is used to couple the frequency-shift modulated signal into steel rails or collect the frequency-shift modulated signal from steel rails. Receiver part, which is used for signal receiving, consists of receiver, attenuator, lightning protector, cable simulator, SPT cable, and matching transformer. Except for attenuator, which is used to attenuate the signal for receiving, the others are the same as the transmitter part. Main track circuit, which is the main body of the current loop, consists of two steel rails and some compensating capacitors connected between the two rails. Small track circuit (also called “electrical insulation joint”) consists of tune units, air-core coil, and 29 meters long steel rails. These circuit components constitute different kinds of resonant circuits and are used to separate two signals of different frequencies in different track sections.Different track circuits have different working frequencies. There are totally four working frequencies for track circuits: 1700 Hz, 2000 Hz, 2300 Hz, and 2600 Hz. The distribution of these four working frequencies is shown in Figure4. By this distribution, the interference between two adjoining track circuits can be reduced effectively.Figure 4
Frequency distribution of track circuits.


### 2.2. Track Circuit Model

The track circuit model is used to generate sufficient data for research, so as to make up for the deficiency of data from actual devices. The “SimPowerSystems” tool box in Matlab is used to construct the track circuit model, and receiver’s dynamic peak voltages are calculated by adjust the structure and parameters of the model automatically. The main parameters of the track circuit model are shown in Table1.Table 1
Main parameters of track circuit model.
Parameter name
Parameter value
Working frequency
2000 Hz
Peak voltage in transmitter
142 V
Capacitance of compensating capacitor
5 × 10−5 F
Shunt resistance
0.15 Ω
Length
1301 m
The number of compensating capacitors
16
Contact resistance of compensating capacitor
1 × 10−4 ΩFor reasonable simplification of the model, the following assumptions are made.(1)
Due to the frequency-shift modulation mechanism, the signal on track circuit is not a strict sine wave. However, since the frequency offset (11 Hz) is very small relative to the working frequency (2000 Hz), the track circuit can be considered as a sine steady circuit within an acceptable error range.(2)
Because the transient signal component decays very quickly when the train is shunting on the rails [20], this paper only considers steady states of track circuit. And the peak voltages of receiver (V5, shown in Figure 3) under different shunt positions are picked as fault features (Figure 5).(3)
Because the shunt resistance is very small (0.04–0.15 Ω), the electrical effect of multiple wheel-sets shunting on the rails is almost the same as the situation of one wheel set [21]. So, this paper only considers one wheel set’s shunt on the rails and the shunt resistance is supposed to be 0.15 Ω (for smaller shunt resistance, transmitter’s current instead of receiver’s voltage can be selected as fault feature, and the diagnosis process is all the same).Figure 5
Peak voltages of receiver under different shunt positions (when track circuit has no faults, without noise).


### 2.3. Verification and Validation of Track Circuit Model

In order to verify and validate the track circuit model, a physical model of track circuit has been set up (shown in Figure6). This physical model consists of completely real track circuit devices except for the steel rails, which cannot be installed indoors due to its huge size. The steel rails in main track circuit and small track circuit are replaced by the corresponding track simulators, which have been carefully calibrated according to real steel rails.Figure 6
The physical model of ZPW-2000A track circuit. ①  Transmitter; ②  receiver; ③  attenuator; ④  lightning protector and cable simulator; ⑤  small track simulator; ⑥  tune unit; ⑦  air core coil; ⑧  compensating capacitor; ⑨  main track simulator.The verification and validation scheme is as follows. Four typical peak voltages (V1,V2,V3,V4, shown in Figure 3) of track circuit are selected as features for comparison. One set of voltages are obtained from the simulation model, and the other set of voltages are obtained by averaging 100 sets of measured values from the physical model. The comparative results are shown in Table 2, which shows that the deviation between the simulation model and the physical model is very small.Table 2
The verification and validation results.
V
1
V
2
V
3
V
4
Simulation model
142.31 (V)
41.58 (V)
13.46 (V)
1.09 (V)
Physical model
142.56 (V)
41.44 (V)
13.39 (V)
1.06 (V)
Absolute error
−0.25 (V)
0.14 (V)
0.07 (V)
0.03 (V)
Relative error
−0.18%
0.34%
0.52%
2.83%


## 2.1. Track Circuit Structure

The structure of a track circuit is shown in Figure3. A track circuit consists of four parts: transmitter part, receiver part, main track circuit, and small track circuit. Transmitter part, which is used for signal transmitting, consists of transmitter, lightning protector, cable simulator, SPT (“SPT” is just a code for digital signal cable in Chinese railway. “SP” means “digital signal cable” and “T” means “railway”) cable, and matching transformer. Transmitter is used to generate a frequency-shift modulated signal with high stability and precision. Lightning protector is used to protect against lightning impulses which are introduced indoors by the cable. SPT cable is used to transmit signals from indoor transmitter to outdoor steel rails, and cable simulator is used to compensate the actual SPT cable so that the total equivalent length of SPT cable is equal to 10 km. Matching transformer is used to couple the frequency-shift modulated signal into steel rails or collect the frequency-shift modulated signal from steel rails. Receiver part, which is used for signal receiving, consists of receiver, attenuator, lightning protector, cable simulator, SPT cable, and matching transformer. Except for attenuator, which is used to attenuate the signal for receiving, the others are the same as the transmitter part. Main track circuit, which is the main body of the current loop, consists of two steel rails and some compensating capacitors connected between the two rails. Small track circuit (also called “electrical insulation joint”) consists of tune units, air-core coil, and 29 meters long steel rails. These circuit components constitute different kinds of resonant circuits and are used to separate two signals of different frequencies in different track sections.Different track circuits have different working frequencies. There are totally four working frequencies for track circuits: 1700 Hz, 2000 Hz, 2300 Hz, and 2600 Hz. The distribution of these four working frequencies is shown in Figure4. By this distribution, the interference between two adjoining track circuits can be reduced effectively.Figure 4
Frequency distribution of track circuits.


## 2.2. Track Circuit Model

The track circuit model is used to generate sufficient data for research, so as to make up for the deficiency of data from actual devices. The “SimPowerSystems” tool box in Matlab is used to construct the track circuit model, and receiver’s dynamic peak voltages are calculated by adjust the structure and parameters of the model automatically. The main parameters of the track circuit model are shown in Table1.Table 1
Main parameters of track circuit model.
Parameter name
Parameter value
Working frequency
2000 Hz
Peak voltage in transmitter
142 V
Capacitance of compensating capacitor
5 × 10−5 F
Shunt resistance
0.15 Ω
Length
1301 m
The number of compensating capacitors
16
Contact resistance of compensating capacitor
1 × 10−4 ΩFor reasonable simplification of the model, the following assumptions are made.(1)
Due to the frequency-shift modulation mechanism, the signal on track circuit is not a strict sine wave. However, since the frequency offset (11 Hz) is very small relative to the working frequency (2000 Hz), the track circuit can be considered as a sine steady circuit within an acceptable error range.(2)
Because the transient signal component decays very quickly when the train is shunting on the rails [20], this paper only considers steady states of track circuit. And the peak voltages of receiver (V5, shown in Figure 3) under different shunt positions are picked as fault features (Figure 5).(3)
Because the shunt resistance is very small (0.04–0.15 Ω), the electrical effect of multiple wheel-sets shunting on the rails is almost the same as the situation of one wheel set [21]. So, this paper only considers one wheel set’s shunt on the rails and the shunt resistance is supposed to be 0.15 Ω (for smaller shunt resistance, transmitter’s current instead of receiver’s voltage can be selected as fault feature, and the diagnosis process is all the same).Figure 5
Peak voltages of receiver under different shunt positions (when track circuit has no faults, without noise).


## 2.3. Verification and Validation of Track Circuit Model

In order to verify and validate the track circuit model, a physical model of track circuit has been set up (shown in Figure6). This physical model consists of completely real track circuit devices except for the steel rails, which cannot be installed indoors due to its huge size. The steel rails in main track circuit and small track circuit are replaced by the corresponding track simulators, which have been carefully calibrated according to real steel rails.Figure 6
The physical model of ZPW-2000A track circuit. ①  Transmitter; ②  receiver; ③  attenuator; ④  lightning protector and cable simulator; ⑤  small track simulator; ⑥  tune unit; ⑦  air core coil; ⑧  compensating capacitor; ⑨  main track simulator.The verification and validation scheme is as follows. Four typical peak voltages (V1,V2,V3,V4, shown in Figure 3) of track circuit are selected as features for comparison. One set of voltages are obtained from the simulation model, and the other set of voltages are obtained by averaging 100 sets of measured values from the physical model. The comparative results are shown in Table 2, which shows that the deviation between the simulation model and the physical model is very small.Table 2
The verification and validation results.
V
1
V
2
V
3
V
4
Simulation model
142.31 (V)
41.58 (V)
13.46 (V)
1.09 (V)
Physical model
142.56 (V)
41.44 (V)
13.39 (V)
1.06 (V)
Absolute error
−0.25 (V)
0.14 (V)
0.07 (V)
0.03 (V)
Relative error
−0.18%
0.34%
0.52%
2.83%


## 3. Fault Diagnosis Method for Track Circuit Based on Dynamic Time Warping

### 3.1. Problem Formulation

#### 3.1.1. Targets and Constraints

According to the introduction section, the following targets or constraints should be achieved or met.(1)
Online fault diagnosis for compensating capacitors of track circuit should be realized. Here, only single disconnection fault of compensating capacitor is considered, because disconnection fault is the most possible fault type of compensating capacitor and two compensating capacitors are almost impossible to be faulty synchronously.(2)
Only the indoor voltages or currents of track circuit (see Figure3) can be obtained for fault diagnosis. Because the outdoor voltages or currents are hard to be measured under existing conditions, and the shunt current cannot be used for online diagnosis, as discussed in Section 1.(3)
Under existing conditions, a train’s exact position information cannot be obtained by track circuit or its monitoring system. So the shunt position information cannot be used for fault diagnosis.Based on the above targets and constraints, the problem to be solved is to distinguish 17 kinds of states (listed in Table3) of track circuit by specific fault features. Without loss of generality, the peak voltage of receiver is picked as fault feature.Table 3
Fault state list of track circuit.
State symbol
Meaning
F
0
No fault
F
i
(i=1,2,3,…,16)
Numberi (numbered from transmitter to receiver) compensating capacitor disconnects from the rails


#### 3.1.2. Insufficiency of Static Voltage Information

(Here, “Static” means there is no train passing the track circuit, so the peak voltage is invariable.) Under different fault states, the peak voltages of receiver (V5 in Figure 3) are shown in Table 4.Table 4
Peak voltage of receiver under different fault states.
Fault state
Peak voltage of receiver (V)
F
0
0.5917
F
1
0.5343
F
2
0.5257
F
3
0.5246
F
4
0.5313
F
5
0.5276
F
6
0.5258
F
7
0.5299
F
8
0.5275
F
9
0.5272
F
10
0.5292
F
11
0.5263
F
12
0.5275
F
13
0.5309
F
14
0.5251
F
15
0.5258
F
16
0.5341It can be seen from Table4 that if only static peak voltage is obtained, F8 and F12, as well as F6 and F15, cannot be distinguished at all. Besides, if a measurement noise of ±0.005 V is considered, there are 120 pairs of indistinguishable faults (i.e., VFi-VFj≤0.01(V)), occupying 88% of all fault pairs. In this case, besides F0, all other fault states cannot be distinguished, which means the fault can be detected but cannot be located. Even if a measurement noise of ±0.002 V is considered, there are still 76 pairs of indistinguishable faults.Besides the peak voltage of receiver, other static voltages or currents can also be selected as fault features, but the results are similar. Moreover, in theory, the phase information of voltages or currents can also be used as fault features. But in engineering practice, the accurate phase information is hard to obtain when the working frequency reaches 2000 Hz, so the phase information is not considered in this paper.From the above analysis, it can be seen that, if only static voltages or currents are used, it is very hard or even impossible to locate the compensating capacitor’s fault.


#### 3.1.3. Advantage of Adopting Dynamic Voltage Information

(Here, “Dynamic” means there is a train passing the track circuit, so the peak voltage will vary according to the train’s position.) Since static information is not enough for locating the compensating capacitor’s fault, some other methods should be considered according to track circuit’s characteristics. It should be noticed that there are trains periodically passing through the track circuit. When a train is passing through the track circuit, the circuit structure of the track circuit will change, so more information about faults can be obtained. Based on this thinking, the peak voltages of receiver under different shunt positions can be taken as fault features (Figure7).Figure 7
Peak voltages of receiver under different shunt positions (for fault statesF0, F1, F2, and F10, without noise).From Figure7, it can be seen that different curves under different fault states have remarkable differences. In fact, the minimal Euclidean distance (d=∑x=1N(Vi(x)-Vj(x))2/N. Here, 1/N is taken as a constant factor for comparability with the static situation) between these curves is 0.0113 V, which is remarkably larger than the static situation.To verify the diagnosis effect based on this kind of fault features, a diagnosis (classification) experiment based on support vector machine (SVM) has been done. This experiment is described by Table5.Table 5
Description of the diagnosis (classification) experiment based on SVM.
Item
Description
Vector dimension (the number of sampling points in a curve)
156
The number of classes
17
Training data set
1 vector per class (without noise)
Testing data set
50 vectors per class (with ±0.005 V uniformly distributed measurement noise and smoothing filtering with 3 points)
SVM tool
LIBSVM [29]
Scaling scheme [30]
Vectors in training data set are linearly consistently scaled to the range[0,1], and testing data set has the same scaling proportion as the training data set
SVM type
C-SVM [29]
Kernel type for SVM
Linear kernel
Penalty factor of the error term in C-SVM
C
=
1
Testing result
Classification accuracy = 100%From the testing result in Table5, it can be seen that, based on this kind of fault features, the diagnosis (classification) effect is very good.


#### 3.1.4. Necessity of Adopting Dynamic Time Warping (DTW)

Though the dynamic voltage information is promising to give a good diagnosis effect, there is still a big problem: the train’s exact position information cannot be obtained by track circuit or its monitoring system. So, in Figure7, the horizontal axis cannot be “shunt position,” but “shunt time.” In this case, if the train travels in a constant speed, the new (actual) curve will have the same shape with the original curve, so there is no problem. But if the train does not travel in a constant speed, except for start point and end point (at the start point, there will be a fall edge, because the train enters the track circuit. At the end point, there will be a rising edge, because the train leaves the track circuit), other points in new curve cannot be aligned with the corresponding points in the original curve, resulting in a nonlinear stretching deformation of the curve in horizontal direction (shown in Figure 8).Figure 8
Original curve and deformed curve of fault state F3 (with noise and smoothing filtering).In this case, the diagnosis (classification) effect based on the actual deformed curves will become bad. To verify this point, the SVM classification experiment has been performed once again with the deformed testing data set (see the appendix for details). This time, the classification accuracy drops to 81.29%, which means there are a lot of incorrect diagnosis results. So, it is necessary to adopt dynamic time warping (DTW) method to overcome the deformation effect.


### 3.2. DTW Method for Fault Diagnosis of Compensating Capacitors

#### 3.2.1. Introduction of DTW

Dynamic time warping (DTW) is a well-known dynamic-programming-based method to find an optimal alignment between two given sequences under certain constraints. Intuitively, the sequences are warped in a nonlinear fashion to match each other [22]. DTW was originally used in speech recognition for comparing different speech patterns [23]. DTW was also successfully applied in the fields of data mining and information retrieval, to cope with time deformations of time-dependent data [24, 25].Among main DTW methods, the classical DTW [22] aims at computing the DTW distance and optimal warping path using the dynamic programming method, which can be realized by calculating cost matrix and accumulated cost matrix. Besides the classical DTW, some variations of DTW [22] aim at avoiding abnormal alignments and promoting computational efficiency by adding step size condition, local weights, and global constraints. The approximate DTW and multiscale DTW [26, 27] were proposed to speed up DTW computations based on the idea to perform the alignment on coarsened versions of the sequences X and Y.The related concepts and algorithms of the classical DTW are simply introduced as follows [22].Objective of DTW. The objective of DTW is to find an optimal alignment between two given sequences: X:=(x1,x2,…,xN) of length N and Y:=(y1,y2,…,yM) of length M.Local Cost Measure and Cost Matrix. To measure the alignment level of two different features xi,yj∈F, a local cost measure c:F×F→R≥0 is needed. Based on the local cost measure, the cost matrix C∈RN×M can be defined by C(i,j):=c(xi,yj).Warping Path. An (N,M)-warping path (“warping path” for short) is a sequence p=(p1,p2,…,pL) with pl=(il,jl)∈[1:N]×[1:M], (l∈[1:L]) satisfying the following conditions:(1)
boundary condition:p1=(1,1) and pL=(N,M);(2)
monotonicity condition:n1≤n2≤⋯≤nL and m1≤m2≤⋯≤mL;(3)
step size condition:pl+1-pl∈{(1,0),(0,1),(1,1)}, (l∈[1:L-1]).A warping path defines an alignment between sequenceX and sequence Y.Total Cost. The total cost of a warping path is defined as cp(X,Y):=∑l=1Lc(xil,yjl),(il,jl)∈p. The total cost represents the alignment level of an alignment defined by the warping path p.DTW Distance. The minimum total cost is defined as DTW distance:
(1)dDTW(X,Y)≔min⁡{cp(X,Y)∣pisankkkk(N,M)-warpingpath}.Optimal Warping Path. The warping paths corresponding to the DTW distance are defined as optimal warping paths, which represent the optimal alignments. An optimal warping path defines a path through the cost matrix, which has the minimum total cost.The objective of DTW can be summarized as finding the DTW distance and the optimal warping paths.Accumulated Cost Matrix. The accumulated cost matrix is used to calculate the DTW distance and the optimal warping paths. It is defined as follows:
(2)D(n,m):=dDTW(X(1:n),Y(1:m))X(1:n):=(x1,x2,…,xn),n∈[1:N]Y(1:m):=(y1,y2,…,ym),m∈[1:M].Algorithm for DTW Distance. Based on the accumulated cost matrix, the algorithm for calculating DTW distance is as follows:
(3)D(n,1)=∑k=1nc(xk,y1),n∈[1:N]D(1,m)=∑k=1mc(x1,yk),m∈[1:M]D(n,m)=min⁡{D(n-1,m-1),D(n-1,m),kkkkD(n,m-1)}+c(xn,ym),llllllllllllforn∈[2:N],m∈[2:M]dDTW(X,Y)=D(N,M).The computation complexity of this algorithm isO(NM).Algorithm for Optimal Warping Path. Based on the accumulated cost matrix, the algorithm for calculating optimal warping paths is as follows:
(4)pL=(N,M)Supposepl=(n,m)if(n,m)=(1,1)thenlmustbe1andalgorithmfinisheselsepl-1={(1,m-1),ifn=1(n-1,1),ifm=1argmin⁡{D(n-1,m-1),kkkkkkkD(n-1,m),D(n,m-1)},otherwise.


#### 3.2.2. Basic DTW Method for Fault Diagnosis of Compensating Capacitors

Since the problem is to classify the deformed curves into 17 classes (17 fault states) according to the 17 training samples (see Table5), instead of directly using SVM, the problem can be solved by using DTW between the deformed curve and the 17 training sample curves. That is, the DTW distances between the deformed curve and the 17 training sample curves can be calculated, and the training sample curve corresponding to the minimum DTW distance will be the target class.This algorithm can be formally described as follows.X
i
:
=
(
x
1
i
,
x
2
i
,
…
,
x
N
i
) of length N is the training sample for class i and Y:=(y1,y2,…,yM) of length M is the deformed curve to be classified. Based on the above classical DTW, the classification (diagnosis) result can be calculated as follows:
(5)t=argmin⁡{dDTW(Xi,Y)∣i∈[1:17]}.According to this algorithm, the deformed curve in Figure8 can be restored to approach the original curve (shown in Figure 9).Figure 9
Original curve and restored curve of fault state F3 (with noise and smoothing filtering).To verify the diagnosis effect of the DTW based method, the deformed testing data set in Section3.1.4 is again used for the verification experiment. The experiment is described in Table 6.Table 6
Description of the diagnosis (classification) experiment based on DTW.
Item
Description
Vector dimension (the number of sampling points in a curve)
156
The number of classes
17
Local cost measure
c
(
x
,
y
)
=
|
x
-
y
|
Training data set
1 vector per class (without noise)
Testing data set
50 vectors per class with:(i) ±0.005 V uniformly distributed measurement noise (ii) Smoothing filtering with 3 points(iii) Deformation (see Appendix for details)
Testing result
Classification accuracy = 99.88%
Computation complexity
O (156 × 156 × 17 × (50 × 17))
Classification stability (minimum)
−0.0429 (0.1795 for correct classifications)
Classification stability (average)
0.9260From the testing result in Table6, it can be seen that, in spite of the deformation of testing data set, by the DTW based method, the classification accuracy can still reach 99.88%. In Section 3.1.4, the classification accuracy can only reach 81.29% by SVM method.Besides classification accuracy, in Table6, the “classification stability” is also used as an index for judging the classification quality. The stability ψ for one classification is defined as follows:
(6)SupposeYbelongstoclasst,t∈[1:17]d1=dDTW(Xt,Y),d2=min⁡{dDTW(Xi,Y)∣i∈[1:17],i≠t}ψ=(d2-d1)min⁡(d1,d2).If the classification result is incorrect, thenψ<0; otherwise, ψ>0. Regardless of ψ<0 or ψ>0, bigger ψ implies better classification quality. ψ=0 is a special situation, which means the minimum DTW distance is not unique.


#### 3.2.3. Improvement on DTW Method for Classification Quality

The classification quality of the above DTW method can still be improved by simple modification of the local cost measure. Since local cost measure is a cost measure for one step in a warping path, it can be considered to modify the cost structure to encourage the correct alignment. The modification scheme is as follows:(7)supposed=|x-y|,c(x,y)=f(d),s.t.f′′(d)>0.The basic idea here is thatf′(d) should increase with d’s increment, which means bigger d should have a higher cost rate. This is because(1)
smalld is tolerable in correct alignment, because it may be caused by noise;(2)
bigd is intolerable in correct alignment, because it is unlikely to be caused by noise.A simple local cost measure satisfying the conditionf′′(d)>0 is c(x,y)=|x-y|2. The diagnosis (classification) experiment based on this local cost measure is described in Table 7 (other items are the same as Table 6).Table 7
Description of the diagnosis (classification) experiment based on DTW (with improved local cost measure).
Item
Description
Local cost measure
c
(
x
,
y
)
=
|
x
-
y
|
2, f′′(d)=2
Testing result
Classification accuracy = 100%
Classification stability (minimum)
0.4165
Classification stability (average)
5.0881From the testing result and classification stability in Table7, it can be seen that, with the improved local cost measure, there is a remarkable improvement on the classification quality.


#### 3.2.4. Improvement on DTW Method for Computation Complexity

In order to reduce the computation complexity, the global constraints in variations of DTW [22] can be used. However, neither the Sakoe-Chiba band region [22] nor the Itakura parallelogram region [22] is adopted for the global constraint. According to the characteristic of the train’s dynamics (see the appendix for details), the following global constraint region (Figure 10), which is generated by boundary gears (maximum gear or minimum gear) and boundary velocities (v1=0 or v2=0.), is adopted for the DTW method applied in fault diagnosis of track circuit.Figure 10
The global constraint region based on the dynamic characteristics of CRH3.The boundary conditions of the global constraint region in Figure10 can be analyzed as follows (the related symbols are defined in Table 8).Table 8
Related symbols for analysis of the boundary conditions of the global constraint region.
Symbol
Description
x
Abscissa in Figure10
y
Ordinate in Figure10
s
Displacement (m)
v
Velocity (m/s)
t
Time (s)
a
Acceleration (m/s2)
v
1
Start velocity on the track circuit (m/s)
v
2
End velocity on the track circuit (m/s)
T
Total time on the track circuit (s)
L
Length of the track circuit (m)
k
Slope of curve in Figure10
k
1
Start slope of curve in Figure10
k
2
End slope of curve in Figure10First, the lower boundary curve is considered. According to the physical relationships between the above variables, the following formulas can be given:(8)t=xT160,s=yL160,v=dsdt=dydx·LT,∴k=dydx=v·TL.For reasonable simplification, the acceleration is assumed to be constant; then the following formulas can be given:(9)v22-v12=2aLT=2Lv2+v1v2=2aL+v12(10)∴Δk=k2-k1=(v2-v1)·TL=2aLv2+v1·2v2+v1=4aL(v2+v1)2=4aL2aL+2v12+22aL+v12·v1=4L2L+2v12/a+22L/a+v12/a2·v1.So,Δk will decrease when v1 is increasing and will increase when a is increasing. Thus, when v1 is minimum and a is maximum, the maximum Δk can be gotten, which corresponds to the maximum deformation of the lower boundary curve.So, the boundary conditions of the lower boundary curve arev1=0 and a=max⁡. The upper boundary curve is symmetrical with the lower boundary curve. So the upper boundary conditions are v2=0 and a=-max⁡.In the case of the global constraints, the elements beyond the global constraint region in accumulated cost matrix does not need to be calculated and can be directly set as infinity, so the computation complexity can be reduced toSregion/Ssquare (area ratio) of the original computation complexity. The diagnosis (classification) experiment based on this global constraint region is described in Table 9 (other items are the same as Table 6).Table 9
Description of the diagnosis (classification) experiment based on DTW (with the global constraint).
Item
Description
Local cost measure
c
(
x
,
y
)
=
|
x
-
y
|
2, f′′(d)=2
Testing result
Classification accuracy = 99.88%
Computation complexity
O (29.26% × (156 × 156) × 17 × (50 × 17))
Classification stability (minimum)
−0.0468 (0.1299 for correct classifications)
Classification stability (average)
6.5735From the results in Table9, it can be seen that, with the global constraint, there is a remarkable reduction in the computation complexity, at the cost of one incorrect classification.


## 3.1. Problem Formulation

### 3.1.1. Targets and Constraints

According to the introduction section, the following targets or constraints should be achieved or met.(1)
Online fault diagnosis for compensating capacitors of track circuit should be realized. Here, only single disconnection fault of compensating capacitor is considered, because disconnection fault is the most possible fault type of compensating capacitor and two compensating capacitors are almost impossible to be faulty synchronously.(2)
Only the indoor voltages or currents of track circuit (see Figure3) can be obtained for fault diagnosis. Because the outdoor voltages or currents are hard to be measured under existing conditions, and the shunt current cannot be used for online diagnosis, as discussed in Section 1.(3)
Under existing conditions, a train’s exact position information cannot be obtained by track circuit or its monitoring system. So the shunt position information cannot be used for fault diagnosis.Based on the above targets and constraints, the problem to be solved is to distinguish 17 kinds of states (listed in Table3) of track circuit by specific fault features. Without loss of generality, the peak voltage of receiver is picked as fault feature.Table 3
Fault state list of track circuit.
State symbol
Meaning
F
0
No fault
F
i
(i=1,2,3,…,16)
Numberi (numbered from transmitter to receiver) compensating capacitor disconnects from the rails


### 3.1.2. Insufficiency of Static Voltage Information

(Here, “Static” means there is no train passing the track circuit, so the peak voltage is invariable.) Under different fault states, the peak voltages of receiver (V5 in Figure 3) are shown in Table 4.Table 4
Peak voltage of receiver under different fault states.
Fault state
Peak voltage of receiver (V)
F
0
0.5917
F
1
0.5343
F
2
0.5257
F
3
0.5246
F
4
0.5313
F
5
0.5276
F
6
0.5258
F
7
0.5299
F
8
0.5275
F
9
0.5272
F
10
0.5292
F
11
0.5263
F
12
0.5275
F
13
0.5309
F
14
0.5251
F
15
0.5258
F
16
0.5341It can be seen from Table4 that if only static peak voltage is obtained, F8 and F12, as well as F6 and F15, cannot be distinguished at all. Besides, if a measurement noise of ±0.005 V is considered, there are 120 pairs of indistinguishable faults (i.e., VFi-VFj≤0.01(V)), occupying 88% of all fault pairs. In this case, besides F0, all other fault states cannot be distinguished, which means the fault can be detected but cannot be located. Even if a measurement noise of ±0.002 V is considered, there are still 76 pairs of indistinguishable faults.Besides the peak voltage of receiver, other static voltages or currents can also be selected as fault features, but the results are similar. Moreover, in theory, the phase information of voltages or currents can also be used as fault features. But in engineering practice, the accurate phase information is hard to obtain when the working frequency reaches 2000 Hz, so the phase information is not considered in this paper.From the above analysis, it can be seen that, if only static voltages or currents are used, it is very hard or even impossible to locate the compensating capacitor’s fault.


### 3.1.3. Advantage of Adopting Dynamic Voltage Information

(Here, “Dynamic” means there is a train passing the track circuit, so the peak voltage will vary according to the train’s position.) Since static information is not enough for locating the compensating capacitor’s fault, some other methods should be considered according to track circuit’s characteristics. It should be noticed that there are trains periodically passing through the track circuit. When a train is passing through the track circuit, the circuit structure of the track circuit will change, so more information about faults can be obtained. Based on this thinking, the peak voltages of receiver under different shunt positions can be taken as fault features (Figure7).Figure 7
Peak voltages of receiver under different shunt positions (for fault statesF0, F1, F2, and F10, without noise).From Figure7, it can be seen that different curves under different fault states have remarkable differences. In fact, the minimal Euclidean distance (d=∑x=1N(Vi(x)-Vj(x))2/N. Here, 1/N is taken as a constant factor for comparability with the static situation) between these curves is 0.0113 V, which is remarkably larger than the static situation.To verify the diagnosis effect based on this kind of fault features, a diagnosis (classification) experiment based on support vector machine (SVM) has been done. This experiment is described by Table5.Table 5
Description of the diagnosis (classification) experiment based on SVM.
Item
Description
Vector dimension (the number of sampling points in a curve)
156
The number of classes
17
Training data set
1 vector per class (without noise)
Testing data set
50 vectors per class (with ±0.005 V uniformly distributed measurement noise and smoothing filtering with 3 points)
SVM tool
LIBSVM [29]
Scaling scheme [30]
Vectors in training data set are linearly consistently scaled to the range[0,1], and testing data set has the same scaling proportion as the training data set
SVM type
C-SVM [29]
Kernel type for SVM
Linear kernel
Penalty factor of the error term in C-SVM
C
=
1
Testing result
Classification accuracy = 100%From the testing result in Table5, it can be seen that, based on this kind of fault features, the diagnosis (classification) effect is very good.


### 3.1.4. Necessity of Adopting Dynamic Time Warping (DTW)

Though the dynamic voltage information is promising to give a good diagnosis effect, there is still a big problem: the train’s exact position information cannot be obtained by track circuit or its monitoring system. So, in Figure7, the horizontal axis cannot be “shunt position,” but “shunt time.” In this case, if the train travels in a constant speed, the new (actual) curve will have the same shape with the original curve, so there is no problem. But if the train does not travel in a constant speed, except for start point and end point (at the start point, there will be a fall edge, because the train enters the track circuit. At the end point, there will be a rising edge, because the train leaves the track circuit), other points in new curve cannot be aligned with the corresponding points in the original curve, resulting in a nonlinear stretching deformation of the curve in horizontal direction (shown in Figure 8).Figure 8
Original curve and deformed curve of fault state F3 (with noise and smoothing filtering).In this case, the diagnosis (classification) effect based on the actual deformed curves will become bad. To verify this point, the SVM classification experiment has been performed once again with the deformed testing data set (see the appendix for details). This time, the classification accuracy drops to 81.29%, which means there are a lot of incorrect diagnosis results. So, it is necessary to adopt dynamic time warping (DTW) method to overcome the deformation effect.


## 3.1.1. Targets and Constraints

According to the introduction section, the following targets or constraints should be achieved or met.(1)
Online fault diagnosis for compensating capacitors of track circuit should be realized. Here, only single disconnection fault of compensating capacitor is considered, because disconnection fault is the most possible fault type of compensating capacitor and two compensating capacitors are almost impossible to be faulty synchronously.(2)
Only the indoor voltages or currents of track circuit (see Figure3) can be obtained for fault diagnosis. Because the outdoor voltages or currents are hard to be measured under existing conditions, and the shunt current cannot be used for online diagnosis, as discussed in Section 1.(3)
Under existing conditions, a train’s exact position information cannot be obtained by track circuit or its monitoring system. So the shunt position information cannot be used for fault diagnosis.Based on the above targets and constraints, the problem to be solved is to distinguish 17 kinds of states (listed in Table3) of track circuit by specific fault features. Without loss of generality, the peak voltage of receiver is picked as fault feature.Table 3
Fault state list of track circuit.
State symbol
Meaning
F
0
No fault
F
i
(i=1,2,3,…,16)
Numberi (numbered from transmitter to receiver) compensating capacitor disconnects from the rails


## 3.1.2. Insufficiency of Static Voltage Information

(Here, “Static” means there is no train passing the track circuit, so the peak voltage is invariable.) Under different fault states, the peak voltages of receiver (V5 in Figure 3) are shown in Table 4.Table 4
Peak voltage of receiver under different fault states.
Fault state
Peak voltage of receiver (V)
F
0
0.5917
F
1
0.5343
F
2
0.5257
F
3
0.5246
F
4
0.5313
F
5
0.5276
F
6
0.5258
F
7
0.5299
F
8
0.5275
F
9
0.5272
F
10
0.5292
F
11
0.5263
F
12
0.5275
F
13
0.5309
F
14
0.5251
F
15
0.5258
F
16
0.5341It can be seen from Table4 that if only static peak voltage is obtained, F8 and F12, as well as F6 and F15, cannot be distinguished at all. Besides, if a measurement noise of ±0.005 V is considered, there are 120 pairs of indistinguishable faults (i.e., VFi-VFj≤0.01(V)), occupying 88% of all fault pairs. In this case, besides F0, all other fault states cannot be distinguished, which means the fault can be detected but cannot be located. Even if a measurement noise of ±0.002 V is considered, there are still 76 pairs of indistinguishable faults.Besides the peak voltage of receiver, other static voltages or currents can also be selected as fault features, but the results are similar. Moreover, in theory, the phase information of voltages or currents can also be used as fault features. But in engineering practice, the accurate phase information is hard to obtain when the working frequency reaches 2000 Hz, so the phase information is not considered in this paper.From the above analysis, it can be seen that, if only static voltages or currents are used, it is very hard or even impossible to locate the compensating capacitor’s fault.


## 3.1.3. Advantage of Adopting Dynamic Voltage Information

(Here, “Dynamic” means there is a train passing the track circuit, so the peak voltage will vary according to the train’s position.) Since static information is not enough for locating the compensating capacitor’s fault, some other methods should be considered according to track circuit’s characteristics. It should be noticed that there are trains periodically passing through the track circuit. When a train is passing through the track circuit, the circuit structure of the track circuit will change, so more information about faults can be obtained. Based on this thinking, the peak voltages of receiver under different shunt positions can be taken as fault features (Figure7).Figure 7
Peak voltages of receiver under different shunt positions (for fault statesF0, F1, F2, and F10, without noise).From Figure7, it can be seen that different curves under different fault states have remarkable differences. In fact, the minimal Euclidean distance (d=∑x=1N(Vi(x)-Vj(x))2/N. Here, 1/N is taken as a constant factor for comparability with the static situation) between these curves is 0.0113 V, which is remarkably larger than the static situation.To verify the diagnosis effect based on this kind of fault features, a diagnosis (classification) experiment based on support vector machine (SVM) has been done. This experiment is described by Table5.Table 5
Description of the diagnosis (classification) experiment based on SVM.
Item
Description
Vector dimension (the number of sampling points in a curve)
156
The number of classes
17
Training data set
1 vector per class (without noise)
Testing data set
50 vectors per class (with ±0.005 V uniformly distributed measurement noise and smoothing filtering with 3 points)
SVM tool
LIBSVM [29]
Scaling scheme [30]
Vectors in training data set are linearly consistently scaled to the range[0,1], and testing data set has the same scaling proportion as the training data set
SVM type
C-SVM [29]
Kernel type for SVM
Linear kernel
Penalty factor of the error term in C-SVM
C
=
1
Testing result
Classification accuracy = 100%From the testing result in Table5, it can be seen that, based on this kind of fault features, the diagnosis (classification) effect is very good.


## 3.1.4. Necessity of Adopting Dynamic Time Warping (DTW)

Though the dynamic voltage information is promising to give a good diagnosis effect, there is still a big problem: the train’s exact position information cannot be obtained by track circuit or its monitoring system. So, in Figure7, the horizontal axis cannot be “shunt position,” but “shunt time.” In this case, if the train travels in a constant speed, the new (actual) curve will have the same shape with the original curve, so there is no problem. But if the train does not travel in a constant speed, except for start point and end point (at the start point, there will be a fall edge, because the train enters the track circuit. At the end point, there will be a rising edge, because the train leaves the track circuit), other points in new curve cannot be aligned with the corresponding points in the original curve, resulting in a nonlinear stretching deformation of the curve in horizontal direction (shown in Figure 8).Figure 8
Original curve and deformed curve of fault state F3 (with noise and smoothing filtering).In this case, the diagnosis (classification) effect based on the actual deformed curves will become bad. To verify this point, the SVM classification experiment has been performed once again with the deformed testing data set (see the appendix for details). This time, the classification accuracy drops to 81.29%, which means there are a lot of incorrect diagnosis results. So, it is necessary to adopt dynamic time warping (DTW) method to overcome the deformation effect.


## 3.2. DTW Method for Fault Diagnosis of Compensating Capacitors

### 3.2.1. Introduction of DTW

Dynamic time warping (DTW) is a well-known dynamic-programming-based method to find an optimal alignment between two given sequences under certain constraints. Intuitively, the sequences are warped in a nonlinear fashion to match each other [22]. DTW was originally used in speech recognition for comparing different speech patterns [23]. DTW was also successfully applied in the fields of data mining and information retrieval, to cope with time deformations of time-dependent data [24, 25].Among main DTW methods, the classical DTW [22] aims at computing the DTW distance and optimal warping path using the dynamic programming method, which can be realized by calculating cost matrix and accumulated cost matrix. Besides the classical DTW, some variations of DTW [22] aim at avoiding abnormal alignments and promoting computational efficiency by adding step size condition, local weights, and global constraints. The approximate DTW and multiscale DTW [26, 27] were proposed to speed up DTW computations based on the idea to perform the alignment on coarsened versions of the sequences X and Y.The related concepts and algorithms of the classical DTW are simply introduced as follows [22].Objective of DTW. The objective of DTW is to find an optimal alignment between two given sequences: X:=(x1,x2,…,xN) of length N and Y:=(y1,y2,…,yM) of length M.Local Cost Measure and Cost Matrix. To measure the alignment level of two different features xi,yj∈F, a local cost measure c:F×F→R≥0 is needed. Based on the local cost measure, the cost matrix C∈RN×M can be defined by C(i,j):=c(xi,yj).Warping Path. An (N,M)-warping path (“warping path” for short) is a sequence p=(p1,p2,…,pL) with pl=(il,jl)∈[1:N]×[1:M], (l∈[1:L]) satisfying the following conditions:(1)
boundary condition:p1=(1,1) and pL=(N,M);(2)
monotonicity condition:n1≤n2≤⋯≤nL and m1≤m2≤⋯≤mL;(3)
step size condition:pl+1-pl∈{(1,0),(0,1),(1,1)}, (l∈[1:L-1]).A warping path defines an alignment between sequenceX and sequence Y.Total Cost. The total cost of a warping path is defined as cp(X,Y):=∑l=1Lc(xil,yjl),(il,jl)∈p. The total cost represents the alignment level of an alignment defined by the warping path p.DTW Distance. The minimum total cost is defined as DTW distance:
(1)dDTW(X,Y)≔min⁡{cp(X,Y)∣pisankkkk(N,M)-warpingpath}.Optimal Warping Path. The warping paths corresponding to the DTW distance are defined as optimal warping paths, which represent the optimal alignments. An optimal warping path defines a path through the cost matrix, which has the minimum total cost.The objective of DTW can be summarized as finding the DTW distance and the optimal warping paths.Accumulated Cost Matrix. The accumulated cost matrix is used to calculate the DTW distance and the optimal warping paths. It is defined as follows:
(2)D(n,m):=dDTW(X(1:n),Y(1:m))X(1:n):=(x1,x2,…,xn),n∈[1:N]Y(1:m):=(y1,y2,…,ym),m∈[1:M].Algorithm for DTW Distance. Based on the accumulated cost matrix, the algorithm for calculating DTW distance is as follows:
(3)D(n,1)=∑k=1nc(xk,y1),n∈[1:N]D(1,m)=∑k=1mc(x1,yk),m∈[1:M]D(n,m)=min⁡{D(n-1,m-1),D(n-1,m),kkkkD(n,m-1)}+c(xn,ym),llllllllllllforn∈[2:N],m∈[2:M]dDTW(X,Y)=D(N,M).The computation complexity of this algorithm isO(NM).Algorithm for Optimal Warping Path. Based on the accumulated cost matrix, the algorithm for calculating optimal warping paths is as follows:
(4)pL=(N,M)Supposepl=(n,m)if(n,m)=(1,1)thenlmustbe1andalgorithmfinisheselsepl-1={(1,m-1),ifn=1(n-1,1),ifm=1argmin⁡{D(n-1,m-1),kkkkkkkD(n-1,m),D(n,m-1)},otherwise.


### 3.2.2. Basic DTW Method for Fault Diagnosis of Compensating Capacitors

Since the problem is to classify the deformed curves into 17 classes (17 fault states) according to the 17 training samples (see Table5), instead of directly using SVM, the problem can be solved by using DTW between the deformed curve and the 17 training sample curves. That is, the DTW distances between the deformed curve and the 17 training sample curves can be calculated, and the training sample curve corresponding to the minimum DTW distance will be the target class.This algorithm can be formally described as follows.X
i
:
=
(
x
1
i
,
x
2
i
,
…
,
x
N
i
) of length N is the training sample for class i and Y:=(y1,y2,…,yM) of length M is the deformed curve to be classified. Based on the above classical DTW, the classification (diagnosis) result can be calculated as follows:
(5)t=argmin⁡{dDTW(Xi,Y)∣i∈[1:17]}.According to this algorithm, the deformed curve in Figure8 can be restored to approach the original curve (shown in Figure 9).Figure 9
Original curve and restored curve of fault state F3 (with noise and smoothing filtering).To verify the diagnosis effect of the DTW based method, the deformed testing data set in Section3.1.4 is again used for the verification experiment. The experiment is described in Table 6.Table 6
Description of the diagnosis (classification) experiment based on DTW.
Item
Description
Vector dimension (the number of sampling points in a curve)
156
The number of classes
17
Local cost measure
c
(
x
,
y
)
=
|
x
-
y
|
Training data set
1 vector per class (without noise)
Testing data set
50 vectors per class with:(i) ±0.005 V uniformly distributed measurement noise (ii) Smoothing filtering with 3 points(iii) Deformation (see Appendix for details)
Testing result
Classification accuracy = 99.88%
Computation complexity
O (156 × 156 × 17 × (50 × 17))
Classification stability (minimum)
−0.0429 (0.1795 for correct classifications)
Classification stability (average)
0.9260From the testing result in Table6, it can be seen that, in spite of the deformation of testing data set, by the DTW based method, the classification accuracy can still reach 99.88%. In Section 3.1.4, the classification accuracy can only reach 81.29% by SVM method.Besides classification accuracy, in Table6, the “classification stability” is also used as an index for judging the classification quality. The stability ψ for one classification is defined as follows:
(6)SupposeYbelongstoclasst,t∈[1:17]d1=dDTW(Xt,Y),d2=min⁡{dDTW(Xi,Y)∣i∈[1:17],i≠t}ψ=(d2-d1)min⁡(d1,d2).If the classification result is incorrect, thenψ<0; otherwise, ψ>0. Regardless of ψ<0 or ψ>0, bigger ψ implies better classification quality. ψ=0 is a special situation, which means the minimum DTW distance is not unique.


### 3.2.3. Improvement on DTW Method for Classification Quality

The classification quality of the above DTW method can still be improved by simple modification of the local cost measure. Since local cost measure is a cost measure for one step in a warping path, it can be considered to modify the cost structure to encourage the correct alignment. The modification scheme is as follows:(7)supposed=|x-y|,c(x,y)=f(d),s.t.f′′(d)>0.The basic idea here is thatf′(d) should increase with d’s increment, which means bigger d should have a higher cost rate. This is because(1)
smalld is tolerable in correct alignment, because it may be caused by noise;(2)
bigd is intolerable in correct alignment, because it is unlikely to be caused by noise.A simple local cost measure satisfying the conditionf′′(d)>0 is c(x,y)=|x-y|2. The diagnosis (classification) experiment based on this local cost measure is described in Table 7 (other items are the same as Table 6).Table 7
Description of the diagnosis (classification) experiment based on DTW (with improved local cost measure).
Item
Description
Local cost measure
c
(
x
,
y
)
=
|
x
-
y
|
2, f′′(d)=2
Testing result
Classification accuracy = 100%
Classification stability (minimum)
0.4165
Classification stability (average)
5.0881From the testing result and classification stability in Table7, it can be seen that, with the improved local cost measure, there is a remarkable improvement on the classification quality.


### 3.2.4. Improvement on DTW Method for Computation Complexity

In order to reduce the computation complexity, the global constraints in variations of DTW [22] can be used. However, neither the Sakoe-Chiba band region [22] nor the Itakura parallelogram region [22] is adopted for the global constraint. According to the characteristic of the train’s dynamics (see the appendix for details), the following global constraint region (Figure 10), which is generated by boundary gears (maximum gear or minimum gear) and boundary velocities (v1=0 or v2=0.), is adopted for the DTW method applied in fault diagnosis of track circuit.Figure 10
The global constraint region based on the dynamic characteristics of CRH3.The boundary conditions of the global constraint region in Figure10 can be analyzed as follows (the related symbols are defined in Table 8).Table 8
Related symbols for analysis of the boundary conditions of the global constraint region.
Symbol
Description
x
Abscissa in Figure10
y
Ordinate in Figure10
s
Displacement (m)
v
Velocity (m/s)
t
Time (s)
a
Acceleration (m/s2)
v
1
Start velocity on the track circuit (m/s)
v
2
End velocity on the track circuit (m/s)
T
Total time on the track circuit (s)
L
Length of the track circuit (m)
k
Slope of curve in Figure10
k
1
Start slope of curve in Figure10
k
2
End slope of curve in Figure10First, the lower boundary curve is considered. According to the physical relationships between the above variables, the following formulas can be given:(8)t=xT160,s=yL160,v=dsdt=dydx·LT,∴k=dydx=v·TL.For reasonable simplification, the acceleration is assumed to be constant; then the following formulas can be given:(9)v22-v12=2aLT=2Lv2+v1v2=2aL+v12(10)∴Δk=k2-k1=(v2-v1)·TL=2aLv2+v1·2v2+v1=4aL(v2+v1)2=4aL2aL+2v12+22aL+v12·v1=4L2L+2v12/a+22L/a+v12/a2·v1.So,Δk will decrease when v1 is increasing and will increase when a is increasing. Thus, when v1 is minimum and a is maximum, the maximum Δk can be gotten, which corresponds to the maximum deformation of the lower boundary curve.So, the boundary conditions of the lower boundary curve arev1=0 and a=max⁡. The upper boundary curve is symmetrical with the lower boundary curve. So the upper boundary conditions are v2=0 and a=-max⁡.In the case of the global constraints, the elements beyond the global constraint region in accumulated cost matrix does not need to be calculated and can be directly set as infinity, so the computation complexity can be reduced toSregion/Ssquare (area ratio) of the original computation complexity. The diagnosis (classification) experiment based on this global constraint region is described in Table 9 (other items are the same as Table 6).Table 9
Description of the diagnosis (classification) experiment based on DTW (with the global constraint).
Item
Description
Local cost measure
c
(
x
,
y
)
=
|
x
-
y
|
2, f′′(d)=2
Testing result
Classification accuracy = 99.88%
Computation complexity
O (29.26% × (156 × 156) × 17 × (50 × 17))
Classification stability (minimum)
−0.0468 (0.1299 for correct classifications)
Classification stability (average)
6.5735From the results in Table9, it can be seen that, with the global constraint, there is a remarkable reduction in the computation complexity, at the cost of one incorrect classification.


## 3.2.1. Introduction of DTW

Dynamic time warping (DTW) is a well-known dynamic-programming-based method to find an optimal alignment between two given sequences under certain constraints. Intuitively, the sequences are warped in a nonlinear fashion to match each other [22]. DTW was originally used in speech recognition for comparing different speech patterns [23]. DTW was also successfully applied in the fields of data mining and information retrieval, to cope with time deformations of time-dependent data [24, 25].Among main DTW methods, the classical DTW [22] aims at computing the DTW distance and optimal warping path using the dynamic programming method, which can be realized by calculating cost matrix and accumulated cost matrix. Besides the classical DTW, some variations of DTW [22] aim at avoiding abnormal alignments and promoting computational efficiency by adding step size condition, local weights, and global constraints. The approximate DTW and multiscale DTW [26, 27] were proposed to speed up DTW computations based on the idea to perform the alignment on coarsened versions of the sequences X and Y.The related concepts and algorithms of the classical DTW are simply introduced as follows [22].Objective of DTW. The objective of DTW is to find an optimal alignment between two given sequences: X:=(x1,x2,…,xN) of length N and Y:=(y1,y2,…,yM) of length M.Local Cost Measure and Cost Matrix. To measure the alignment level of two different features xi,yj∈F, a local cost measure c:F×F→R≥0 is needed. Based on the local cost measure, the cost matrix C∈RN×M can be defined by C(i,j):=c(xi,yj).Warping Path. An (N,M)-warping path (“warping path” for short) is a sequence p=(p1,p2,…,pL) with pl=(il,jl)∈[1:N]×[1:M], (l∈[1:L]) satisfying the following conditions:(1)
boundary condition:p1=(1,1) and pL=(N,M);(2)
monotonicity condition:n1≤n2≤⋯≤nL and m1≤m2≤⋯≤mL;(3)
step size condition:pl+1-pl∈{(1,0),(0,1),(1,1)}, (l∈[1:L-1]).A warping path defines an alignment between sequenceX and sequence Y.Total Cost. The total cost of a warping path is defined as cp(X,Y):=∑l=1Lc(xil,yjl),(il,jl)∈p. The total cost represents the alignment level of an alignment defined by the warping path p.DTW Distance. The minimum total cost is defined as DTW distance:
(1)dDTW(X,Y)≔min⁡{cp(X,Y)∣pisankkkk(N,M)-warpingpath}.Optimal Warping Path. The warping paths corresponding to the DTW distance are defined as optimal warping paths, which represent the optimal alignments. An optimal warping path defines a path through the cost matrix, which has the minimum total cost.The objective of DTW can be summarized as finding the DTW distance and the optimal warping paths.Accumulated Cost Matrix. The accumulated cost matrix is used to calculate the DTW distance and the optimal warping paths. It is defined as follows:
(2)D(n,m):=dDTW(X(1:n),Y(1:m))X(1:n):=(x1,x2,…,xn),n∈[1:N]Y(1:m):=(y1,y2,…,ym),m∈[1:M].Algorithm for DTW Distance. Based on the accumulated cost matrix, the algorithm for calculating DTW distance is as follows:
(3)D(n,1)=∑k=1nc(xk,y1),n∈[1:N]D(1,m)=∑k=1mc(x1,yk),m∈[1:M]D(n,m)=min⁡{D(n-1,m-1),D(n-1,m),kkkkD(n,m-1)}+c(xn,ym),llllllllllllforn∈[2:N],m∈[2:M]dDTW(X,Y)=D(N,M).The computation complexity of this algorithm isO(NM).Algorithm for Optimal Warping Path. Based on the accumulated cost matrix, the algorithm for calculating optimal warping paths is as follows:
(4)pL=(N,M)Supposepl=(n,m)if(n,m)=(1,1)thenlmustbe1andalgorithmfinisheselsepl-1={(1,m-1),ifn=1(n-1,1),ifm=1argmin⁡{D(n-1,m-1),kkkkkkkD(n-1,m),D(n,m-1)},otherwise.


## 3.2.2. Basic DTW Method for Fault Diagnosis of Compensating Capacitors

Since the problem is to classify the deformed curves into 17 classes (17 fault states) according to the 17 training samples (see Table5), instead of directly using SVM, the problem can be solved by using DTW between the deformed curve and the 17 training sample curves. That is, the DTW distances between the deformed curve and the 17 training sample curves can be calculated, and the training sample curve corresponding to the minimum DTW distance will be the target class.This algorithm can be formally described as follows.X
i
:
=
(
x
1
i
,
x
2
i
,
…
,
x
N
i
) of length N is the training sample for class i and Y:=(y1,y2,…,yM) of length M is the deformed curve to be classified. Based on the above classical DTW, the classification (diagnosis) result can be calculated as follows:
(5)t=argmin⁡{dDTW(Xi,Y)∣i∈[1:17]}.According to this algorithm, the deformed curve in Figure8 can be restored to approach the original curve (shown in Figure 9).Figure 9
Original curve and restored curve of fault state F3 (with noise and smoothing filtering).To verify the diagnosis effect of the DTW based method, the deformed testing data set in Section3.1.4 is again used for the verification experiment. The experiment is described in Table 6.Table 6
Description of the diagnosis (classification) experiment based on DTW.
Item
Description
Vector dimension (the number of sampling points in a curve)
156
The number of classes
17
Local cost measure
c
(
x
,
y
)
=
|
x
-
y
|
Training data set
1 vector per class (without noise)
Testing data set
50 vectors per class with:(i) ±0.005 V uniformly distributed measurement noise (ii) Smoothing filtering with 3 points(iii) Deformation (see Appendix for details)
Testing result
Classification accuracy = 99.88%
Computation complexity
O (156 × 156 × 17 × (50 × 17))
Classification stability (minimum)
−0.0429 (0.1795 for correct classifications)
Classification stability (average)
0.9260From the testing result in Table6, it can be seen that, in spite of the deformation of testing data set, by the DTW based method, the classification accuracy can still reach 99.88%. In Section 3.1.4, the classification accuracy can only reach 81.29% by SVM method.Besides classification accuracy, in Table6, the “classification stability” is also used as an index for judging the classification quality. The stability ψ for one classification is defined as follows:
(6)SupposeYbelongstoclasst,t∈[1:17]d1=dDTW(Xt,Y),d2=min⁡{dDTW(Xi,Y)∣i∈[1:17],i≠t}ψ=(d2-d1)min⁡(d1,d2).If the classification result is incorrect, thenψ<0; otherwise, ψ>0. Regardless of ψ<0 or ψ>0, bigger ψ implies better classification quality. ψ=0 is a special situation, which means the minimum DTW distance is not unique.


## 3.2.3. Improvement on DTW Method for Classification Quality

The classification quality of the above DTW method can still be improved by simple modification of the local cost measure. Since local cost measure is a cost measure for one step in a warping path, it can be considered to modify the cost structure to encourage the correct alignment. The modification scheme is as follows:(7)supposed=|x-y|,c(x,y)=f(d),s.t.f′′(d)>0.The basic idea here is thatf′(d) should increase with d’s increment, which means bigger d should have a higher cost rate. This is because(1)
smalld is tolerable in correct alignment, because it may be caused by noise;(2)
bigd is intolerable in correct alignment, because it is unlikely to be caused by noise.A simple local cost measure satisfying the conditionf′′(d)>0 is c(x,y)=|x-y|2. The diagnosis (classification) experiment based on this local cost measure is described in Table 7 (other items are the same as Table 6).Table 7
Description of the diagnosis (classification) experiment based on DTW (with improved local cost measure).
Item
Description
Local cost measure
c
(
x
,
y
)
=
|
x
-
y
|
2, f′′(d)=2
Testing result
Classification accuracy = 100%
Classification stability (minimum)
0.4165
Classification stability (average)
5.0881From the testing result and classification stability in Table7, it can be seen that, with the improved local cost measure, there is a remarkable improvement on the classification quality.


## 3.2.4. Improvement on DTW Method for Computation Complexity

In order to reduce the computation complexity, the global constraints in variations of DTW [22] can be used. However, neither the Sakoe-Chiba band region [22] nor the Itakura parallelogram region [22] is adopted for the global constraint. According to the characteristic of the train’s dynamics (see the appendix for details), the following global constraint region (Figure 10), which is generated by boundary gears (maximum gear or minimum gear) and boundary velocities (v1=0 or v2=0.), is adopted for the DTW method applied in fault diagnosis of track circuit.Figure 10
The global constraint region based on the dynamic characteristics of CRH3.The boundary conditions of the global constraint region in Figure10 can be analyzed as follows (the related symbols are defined in Table 8).Table 8
Related symbols for analysis of the boundary conditions of the global constraint region.
Symbol
Description
x
Abscissa in Figure10
y
Ordinate in Figure10
s
Displacement (m)
v
Velocity (m/s)
t
Time (s)
a
Acceleration (m/s2)
v
1
Start velocity on the track circuit (m/s)
v
2
End velocity on the track circuit (m/s)
T
Total time on the track circuit (s)
L
Length of the track circuit (m)
k
Slope of curve in Figure10
k
1
Start slope of curve in Figure10
k
2
End slope of curve in Figure10First, the lower boundary curve is considered. According to the physical relationships between the above variables, the following formulas can be given:(8)t=xT160,s=yL160,v=dsdt=dydx·LT,∴k=dydx=v·TL.For reasonable simplification, the acceleration is assumed to be constant; then the following formulas can be given:(9)v22-v12=2aLT=2Lv2+v1v2=2aL+v12(10)∴Δk=k2-k1=(v2-v1)·TL=2aLv2+v1·2v2+v1=4aL(v2+v1)2=4aL2aL+2v12+22aL+v12·v1=4L2L+2v12/a+22L/a+v12/a2·v1.So,Δk will decrease when v1 is increasing and will increase when a is increasing. Thus, when v1 is minimum and a is maximum, the maximum Δk can be gotten, which corresponds to the maximum deformation of the lower boundary curve.So, the boundary conditions of the lower boundary curve arev1=0 and a=max⁡. The upper boundary curve is symmetrical with the lower boundary curve. So the upper boundary conditions are v2=0 and a=-max⁡.In the case of the global constraints, the elements beyond the global constraint region in accumulated cost matrix does not need to be calculated and can be directly set as infinity, so the computation complexity can be reduced toSregion/Ssquare (area ratio) of the original computation complexity. The diagnosis (classification) experiment based on this global constraint region is described in Table 9 (other items are the same as Table 6).Table 9
Description of the diagnosis (classification) experiment based on DTW (with the global constraint).
Item
Description
Local cost measure
c
(
x
,
y
)
=
|
x
-
y
|
2, f′′(d)=2
Testing result
Classification accuracy = 99.88%
Computation complexity
O (29.26% × (156 × 156) × 17 × (50 × 17))
Classification stability (minimum)
−0.0468 (0.1299 for correct classifications)
Classification stability (average)
6.5735From the results in Table9, it can be seen that, with the global constraint, there is a remarkable reduction in the computation complexity, at the cost of one incorrect classification.


## 4. Results and Discussion

The results of the above experiments can be summarized in Table10.Table 10
Summary of results of all the experiments.
Method
Classification accuracy
Classification stability (average)
Computation complexity (for one classification)
Comparison of static voltages
Very low (not able to locate the faults)
NA*
NA
SVM (without DTW)
81.29%
NA
NA
Classical DTW
99.88%
0.9260
O (156 × 156 × 17)
DTW with improved local cost measure
100%
5.0881
O (156 × 156 × 17)
DTW with global constraint
99.88%
6.5735
O (29.26% × 156 × 156 × 17)
*“NA” means not applicable.From Table10, the results of all the experiments can be analyzed as follows.(1)
The method of comparison of static voltages has very poor classification quality and can hardly be used for fault location of compensating capacitors.(2)
The method of SVM without DTW has a generally acceptable classification quality, but there are still many incorrect classifications, which will cause trouble in practical applications.(3)
The classical DTW has good classification accuracy, but the classification stability is poor, which means incorrect classifications are prone to appear under severe conditions such as big noise. Besides, the computation complexity of this method is great, which means it is not suitable for online diagnosis.(4)
The DTW method with improved local cost measure has very good classification accuracy and good classification stability, but the computation complexity has not been improved.(5)
The DTW method with global constraint has good classification quality, great classification stability, and reduced computation complexity. The very few incorrect classifications, which are not general situations, may be caused by the nonconservative global constraint region. As a whole, this method is the best one among these methods for online fault diagnosis of compensating capacitors in track circuit.


## 5. Conclusions

Aiming at the problem of online fault diagnosis for compensating capacitors of jointless track circuit, a dynamic time warping (DTW) based diagnosis method is proposed in this paper. Different from the existing related works, this method only uses the ground monitoring signals of track circuit to locate the faulty compensating capacitor, not depending on the shunt current of inspection train, which is an indispensable condition for existing methods. So, it can be used for online diagnosis of compensating capacitor, which has not yet been realized by existing methods. Besides, this method does not need the outdoor monitoring signals or the on-board monitoring signals, so the existing system does not need to be modified greatly, which means a good engineering feasibility. To overcome the key problem that track circuit cannot obtain the precise position of the train, the DTW method is used for the first time in this situation to recover the function relationship between receiver’s peak voltage and shunt position. Besides the classical DTW based method, two improved methods for improving classification quality and reducing computation complexity are proposed. Finally, the diagnosis experiments based on the simulation model of track circuit show the effectiveness of the proposed methods. Fault diagnosis for compensating capacitors under uncertain ballast resistance and shunt resistance will be the future work.



---

*Source: 324743-2014-03-25.xml*