Change Point Detection for Piecewise Envelope Current Signal Based on Wavelet Transform

One of the key issues of the accurate parameters analysis for the piecewise envelope current signal is to position the change point precisely. Discretewavelettransform (DWT)modulus maxima method can detect change point, but the detection window of DWT will cause suspicious change point. Besides, the amount of calculated data is very large in actual process of envelope current signal. Therefore, in this paper, the envelope is used instead of the original sampling data for DWT so as to reduce the calculation amount. What is more, combined with the sliding dislocation window method, the change point can be located accurately and the pseudo-change point can be eliminated. The simulation results as well as the electric locomotive current and forging machine current examples show that it is feasible to detect the change point precisely through the proposed method, which provides possibilities for real-time online monitoring of change point.

The traditional electric energy meter usually works in sinusoidal linear load condition with high precision.However, in practical terms, the current signal often has different envelopes, which is the piecewise envelope current signal actually.The harmonics and the varying amplitudes in the current signal will cause difficulties for accurate measurement of conventional energy meter [6,7].In order to overcome this defect, the precise analysis of signal parameters is particularly significant.Moreover, the harmonics and nonstationary amplitudes have a serious impact on power quality.Therefore, this paper focuses on the change point detection of piecewise envelope current signal.
In general, change point analysis may be performed in either parametric or nonparametric approaches.These approaches follow some statistical framework, including CUSUM (cumulative sum), GLR (generalized likelihood ratio), and the change finder.Generally, these approaches have limitation, that is, heavily relying on prespecified parametric models such as probability density models and statespace models [8].Therefore, these methods are not flexible enough in real-world change point detection.On the other hand, wavelet transform (WT) is a promising approach for 0 DWT has the ability of multiresolution analysis.It can represent local information in both time domain and frequency domain [9,10].It has wide applications in signal processing, image processing, digital communications, etc.According to [11][12][13][14], wavelet transform modulus maxima method has proven to be an effective approach in singularities and transient phenomena detection of image processing, statistical chatter detection, damage detection, etc.The signal change point can be determined through DWT modulus maxima method.However, the amount of calculated data is very large and the time of data processing is too long in actual process of envelope current signal, which causes difficulties for real-time online detection of change point.What is worse, DTW will result in suspicious change points at both ends of the detection window.
Therefore, this paper positions the change point through DWT of the envelope of the current signal (not the original sampling data), which aims to reduce the calculation time.Besides, The DWT modulus maxima method is applied to detect the change point, and the sliding dislocation window is introduced to eliminate the suspicious change point.Furthermore, the simulation for dynamic current signal is applied to analyze the performance of the proposed method.An electric locomotive current signal and forging machine current are analyzed in the end.

The principle of Discrete Wavelet
Transforms and Modulus Maxima 2.1.Discrete Wavelet Transform.Wavelet transform includes continuous wavelet transform and discrete wavelet transform.They both can be used to detect the signal change point.However, the amount of calculated data of continuous wavelet transform is too large, which results in a long computing time.Therefore, the discrete wavelet transform is suitable for online calculation.Discrete wavelet transform decomposes the dynamic signal into the various scales of frequency bands by multiresolution analysis [15,16].
The DWT of a signal f (t) takes this form Furthermore, in the multiresolution analysis process, a give n signal f (t) can be completely decomposed based on scaling function (t) and wavelet function (t).Hence the Jlevel DWT representation of f (t) can be defined as where a , is the approximation coefficients at level J. d , is detail coefficients.The decomposition level of discrete wavelet transform n should satisfy  = log 2 (√1/8  /  ) + 0.5, where   is the fundamental frequency of the signal and   is the sampling frequency.The frequency bands corresponding to the DWT signal are shown in Figure 1.

DWT Modulus Maximum
( 0 ,  0 ) is the point of modulus maxima of detail coefficients.Therefore, at a given level j 0, a set of modulus maxima can be obtained from the detail coefficients.For a signal f (t) where a discontinuity exists, the signal is a singular signal and it must be singular at the point of discontinuity, which appears as a wavelet modulus maxima point.Thus, the change point of dynamic current signal can be detected through modulus maximum method.

The Principle of Sliding Dislocation Window
The change point of dynamic signal can be easily identified through modulus maximum method.However, in the actual signal processing, it often truncates the sampling data for wavelet transform with detection window because the computer program is not able to perform an analysis for infinite sampling data points.However, due to the windowing of the sampled data points, wavelet transforms will cause a sudden change in the edge of the detection window, which is likely to cause pseudo-change point.In other words, the sudden change may not be due to the waveform jump of the envelope itself.
In order to solve this problem, this paper presents a method to eliminate these pseudo-change points by the sliding dislocation window.The steps are as follows: (1) Set the length of the sliding window as 10 cycles, the time duration as 0.2s, and the total number of sampling data points as 1280.
(2) The sampling points of the total data to be processed are divided according to the length of the detection window.The envelope points of the signal are searched via the local maximum method.
(3) Ignore the suspicious change point near the initial point of the detection window.Then DWT is performed for the points in the detection window.The ratio of the modulus maxima and the modulus average, called  m/a in this paper, is obtained through the detail coefficients of the first layer. m/a is defined as (4) If  m/a ≥1 for the end point of the detection window in step (3), it is a suspicious change point.And 2 dislocation windows which cover 10 cycles of sampling points near the left and right sides of the suspicious change points are added.The DWT is used to decompose the envelope data points at the middle of the dislocation window and  m/a is calculated for the detail coefficients of the first layer.If  m/a <1, it is determined that the suspicious point is a misjudgment point.Therefore, this misjudgment point will be eliminated by smoothing the detail coefficients of the first layer.At the same time, the process returns to step (3) to enter the analysis of the next detection window.
(5) If  m/a ≥1 in step (4), the suspicious change point in step ( 4) is the true change point and the time position of the true change point is recorded at the same time.
(6) Return to step (3) and enter into the next detection window analysis until all the detection windows are investigated.In addition, the suspicious change points near the end point of the detection window can be ignored.
The flow chart of the sliding dislocation window method is shown in Figure 2. The dynamic signal shown in Figure 3 can be segmented and represented by the piecewise function in (6).It is an oblique envelope signal when t<0.3s, an exponential envelope signal in 0.3s≤t≤0.5s,a parabolic envelope signal in

Simulation of Dynamic Current Signal
All the envelope signals above are with 3 harmonics, the fundamental frequency is f 0 =50.0Hz, the phase  is 60 ∘ , 45 ∘ , and 30 ∘ , respectively, and the amplitude A  is 100A, 5A, and 10A, respectively.Envelope parameters are a=1.5, b=3, and c=0.2; the DC component is B 0 =0.5.The sampling frequency is  s =6400 Hz; the sampling interval time T s is 0.156ms.And according to (5), the number of wavelet decomposition layer is 5, and the frequency band range of each layer is 0∼100 Hz, 100∼200 Hz, 200∼400 Hz, 400∼800 Hz, 800∼1600 Hz, and 1600∼3200 Hz.
The simulation signal and its envelope waveform are shown in Figure 3.
The data from 0.55s to 0.75s (10 cycles) are picked artificially from the parabolic envelope signal (0.5s<t≤0.8s) in Figure 3. Then the wavelet transform is performed by using envelope signal points (i.e., 10-cycle data) when 0.55s≤t≤0.75s.And the detail coefficients of the first layer are shown in Figure 4.
According to Figure 4, for db2, Sym2, Coif 1, and bior2.2wavelet basis functions, jump phenomenon occurs at both ends of the detail coefficients of the first layer.And  m/a of the jump points at both ends are shown in Table 1.
Table 1 shows that  / of the jump points at both ends are greater than 1 for all of the four wavelet basis functions, which indicates the existence of suspicious change point at both ends.However, according to Figures 3 and 4, it is obvious that these suspicious change points are the misjudgment points due to artificial truncation in envelope signal.If the wavelet transform method is applied directly to monitor change points of actual signal, a lot of misjudgment points will be created.As a result, it will not only affect the selection of the current model of electric energy metering, but also cause greater measurement error.
In order to solve this problem, this paper presents the method of sliding dislocation window which is introduced in Section 3 of this paper.According to Table 1, the modulus   We chose the 2650 data points when 0.55s<t≤0.95sfrom the original sampled signal and add 10 cycles of dislocation window near the left and right sides of the suspicious change points at t=0.75s.Through the db2 wavelet decomposition, the detail coefficients of the first layer are shown in Figure 5.
/ at the intermediate point of the dislocation window (t=0.75s) and at t=0.8s in Figure 5 are shown in Table 2.
Table 2 shows that  / of t=0.75s is almost zero; in other words, the suspicious change points in Figure 3 are misjudgment points, which should be removed in next analysis.
In addition,  / at t=0.8s in Figure 5 is 8.483, which indicates that this point is true change point.A jump indeed occurs at t=0.8s in the simulation signal according to Figure 3.The simulation result shows that the sliding dislocation window method proposed in this paper does not affect the monitoring of change points.

Monitoring of Change Points via Wavelet Transform Modulus Maxima Method.
After eliminating the misjudgment points, this paper chooses haar, bior, rbio, db, Coif, and Sym wavelet to perform wavelet decomposition.The number of wavelet decomposition layer is 5, and the detail coefficients of the first layer is shown in Figure 6.And  / of the change points (t=0.3s,t=0.5s, t=0.8s) obtained through the performance of the wavelets above are shown in Table 3.
According to Figure 6 and Table 3, all the wavelets above are insensitive to the change point at t=0.3s because the data amplitude difference between the end point of oblique envelope signal and the initial point of exponential envelope signal is very small.Since the waveform connection of the two envelope signals in Figure 6 is smooth, the ratio is small.To be more specific, except haar, db2, and Sym2 wavelets,  /   of other wavelets are less than 1, which is not applicable for change points monitor.
In addition,  / of the haar wavelet is only 0.377 at t=0.8s, which is far less than that of other wavelets (greater than 5).It is also difficult to find the obvious waveform jump at t=0.8s in Figure 5.It demonstrates that haar wavelet is insensitive to the third change point and cannot effectively monitor the change points of dynamic signal.Moreover,  / of rbio3.1 wavelet is only 2.759 at t=0.5s, which is also far less than that of other wavelets (greater than 6).It indicates that rbio3.1 wavelet is insensitive to the second change point.
Because haar and rbio wavelets are not continuous in time domain and their regularity is very poor, they cannot position the singularity of the signal function accurately.Therefore, this paper will not discuss these two wavelets in the subsequent analysis.
In addition, according to Table 3, with the decrease of N (N represents the order of wavelet),  / of dbN, SymN, Coif N, and biorN wavelets increase, which means the monitoring of the change points is more sensitive.This is because the smaller N, the better division of the bands.However, it is easy to cause mistake-detection and missdetection when N is too small.Moreover,  / of db2 and Sym2 wavelets at the three change points are the same; that is, these two wavelets have the same detection effect.
Therefore, this paper chooses the db2, Sym2, Coif1, and bior2.2wavelets to do the next analysis, respectively.The error analysis of these four wavelets is shown in Table 4.
According to Table 4, the relative errors of the four wavelets are small, which further proves that the wavelet transform is effective and accurate for the detection of change points.Moreover, the relative errors of db2 and Sym2 wavelets are equal, and so are the Coif1 and bior2.2wavelets.In particular, the relative errors of db2 and Sym2 wavelets at the first two change points are smaller than that of the Coif1 and bior2.2wavelets (the errors are almost only 1/8 of that of the Coif1 and bior2.2wavelets), and the relative errors at the third change points are slightly larger than that of the Coif1 and bior2.2wavelets.This indicates that db2 and Sym2 wavelets have higher detection accuracy of change points, and they are suitable for the research in this paper.
In order to compare the proposed wavelet decomposition method which uses the envelope data (envelope method) and the method which uses the sampling data directly (direct method), the relative error of positioning change points and program computation time of the two methods are studied, respectively, under the same simulation condition.The results are shown in Tables 5 and 6.Table 6 demonstrates the computation time, the average of 30 sets of data, of each wavelet.
According to Table 5, the relative error of the envelope method proposed in this paper is slightly greater than that of the direct method because the data points positioned by the envelope method are not on the simulation current curve, which results in the deviation between the locations of the envelope change points and the actual signal change points.However, since the relative error of the envelope method is very small, it has little influence on the accuracy of segmented measurement of electrical energy.And in the actual engineering application, the main concern is whether the computation time can meet the requirements of online real-time measurement.And according to Table 6, the computation time of envelope method is much less than that of the direct method.When the number of simulation points is 6400, the number of wavelet decomposition points of envelope method is only 50.In other words, the number of data points that need to be processed in the envelope method is only 0.781% of that in the direct method.In addition, the program computation time of db2 and Sym2 wavelets is smaller than that of the Coif1 and bior2.2wavelets, and compared to the direct method, the program computation time of db2 wavelet is reduced by 20.734% using the envelope method.It shows that db2 wavelet has an advantage in saving program computation time.And in the actual signal processing, the number of the sampling data could be as large as hundreds of thousands or even millions; hence it is obvious that the direct method cannot satisfy the online real-time detection of signal change points.
Therefore, the envelope method proposed in this paper can be used for the online real-time detection of signal change points.

Wavelet Decomposition of Actual Electric Locomotive
Current Signal and a Forging Machine Current Signal 4.3.1.Electric Locomotive Current Signal.For a current signal of an electric locomotive, the sampling time is 152.9136s, the sampling data is 764568 points, the sampling frequency is f  =5000 Hz, and the sampling interval time is 0.2ms.The upper envelope curve is obtained from the sampling data and there are 509 points in the upper envelope curve; the number of data points that need to be processed in the envelope method is only 0.0665% of that in the direct method.The current waveform and the upper envelope curve are shown in Figure 7.The detail coefficients of the first layer by using the upper envelope curve are shown in Figure 8.And the detail coefficients of direct method are shown in Figure 9.
Combined with Figure 7, it indicates that the direct method   completely cannot be used to detect the change points of the actual electric locomotive current signal.
According to Figures 7 and 8, the analysis results of two obvious change points (at t=45.2s,t=71.99s in Figure 6) through the proposed method in this paper are shown in Table 7.In addition, the last column data in Table 7 shows the program computation time which is the average of 30 sets of data for each wavelet.
From Table 7, Figures 7 and 8 show that the envelope method is sensitive and effective for detecting change points of the actual electric locomotive current signal.And the ratio of the maximum modulus to the average modulus of four wavelets is larger than 11.Moreover, the relative error is also  very small, and the average program computation time is only about 0.2s.In particular, db2 and Sym2 wavelets have higher detection accuracy and less program computation time and are more sensitive to the change points than the other wavelets.

Forging Machine Current
Signal. Figure 10 is the signal of forging machine current and its envelope curve, the sampling time is 9.98s, the sampling data is 50001 points, and the sampling frequency is  s =5000 Hz.The upper envelope curve has 105 points, which is only 0.21% of that in the direct method.The detail coefficients of the first layer by using the upper envelope curve are shown in Figure 11.And the result of direct method is shown in Figure 12.Combined with Figure 10, it is obvious that the direct method cannot be used to detect the change points of the actual forging machine current signal.The analysis results of two obvious change points (at t=1.986s, t=2.728s in Figure 10) through the proposed method in this paper are shown in Table 8, where the last column shows the program computation time which is also the average of 30 sets of data for each wavelet.
Table 8 and Figures 10 and 11 show that the envelope method is sensitive and effective for change points detection of the actual electric locomotive current signal.And  m/a of four wavelets are larger than 1.What is more, the relative error  is very small, and the average computation time is only about 0.2s.Same as the previous example, db2 and Sym2 wavelets are faster, more precise, and more sensitive to the change points than the other wavelets.

Conclusions
(1) In this paper, a detection method for the change points in piecewise envelope signal based on DWT is presented.The envelope can greatly reduce the amount of computation data and computation time.
(2) For the problem of suspicious change points caused by the detection window, the sliding dislocation window method proposed in this paper can effectively eliminate the pseudo-change point.
(3) This paper chooses haar, bior, rbio, db, Coif, and Sym wavelets to perform wavelet decomposition.And the simulation analysis verifies that the haar and rbio wavelets cannot effectively detect the change points of dynamic signal while the other wavelets are effective and accurate for the change point detection.Among them, db2 and Sym2 wavelets are more suitable for the study of this paper because of its good antidisturbance, high sensitivity, and precise positioning ability.
This fast and accurate detection method offers possibilities for online real-time monitoring of change points in envelope current signals, which is important for the accurate measurement of electrical energy.

Figure 1 :
Figure 1: The frequency bands corresponding to the DWT signal.

4. 1 .
Monitoring of Suspicious Change Points in the Signal Truncation via Sliding Dislocation Window.The wavelet decomposition of the dynamic signal envelop can save the calculation time greatly, which can be used in online real-time monitoring of change point in dynamic signals.

Find
out the envelope and divide it into n parts Input the sampling data points Detection window i=1 End Start i=i+1 The end point is a suspicious change point Apply the sliding dislocation window Record the

Figure 2 :
Figure 2: The flow chart of the sliding dislocation window method.

Figure 3 :Figure 4 :Figure 5 :
Figure 3: The envelope diagram of the dynamic signal.

Figure 7 :
Figure 7: Electric locomotive current waveform and its upper envelope.

Figure 8 :
Figure 8: Detail coefficients of the envelope method with different wavelets.

Figure 9 :
Figure 9: Detail coefficients of the direct method with different wavelets.

Figure 10 :
Figure 10: Forging machine current waveform and its upper envelope.

Figure 11 :
Figure 11: Detail coefficients of the envelope method with different wavelets.

Figure 12 :
Figure 12: Detail coefficients of the direct method with different wavelets.

Table 1 :
m/a of the jump points at both ends of the signal.

Table 2 :
m/a at the median point of the dislocation window and at t=0.8s., modulus average, and  / of db2 and Sym2 wavelets are the same, respectively.And this paper chooses db2 and Sym2 wavelet to do the next analysis. maxima

Table 4 :
Comparison of the theoretical value and the calculated value.

Table 5 :
Comparison of relative error of the envelope method and the direct method.

Table 6 :
Comparison of program computation time of the envelope method and the direct method.

Table 7 :
Comparison of envelope method with different wavelets.

Table 8 :
Comparison of envelope method with different wavelets.