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

Authors: Haiyan Wang; Feng Zhou; Chunyang Jiang; Ling Qin; Huaiqing Zhang
Journal: Journal of Electrical and Computer Engineering
 (2018)

---

## Abstract

One of the key issues of the accurate parameters analysis for the piecewise envelope current signal is to position the change point precisely. Discrete wavelet transform (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.


---

## Body

## 1. Introduction

The wide application of semiconductor electronic devices and distributed powers has caused harmonic content in power system and serious distortion of voltage and current waveform [1, 2]. The equipment such as fluorescent lamp and rolling machine will cause harmonic current. The running machine like electric locomotive is prone to produce oblique envelope current. Besides, the operation of electric-arc furnace and cogging mill can lead to parabolic envelope current and exponential envelope current, respectively [3–5]. The four typical envelop signals are as follows:(i)
Harmonic currentf1(t)=∑m=1MAmcos⁡(2πfmt+θm).(ii)
Oblique envelope currentf2(t)=(at+b)·∑m=1MAmcos⁡(2πfmt+θm)+B0.(iii)
Parabolic envelope currentf3(t)=(at2+bt+c)·∑m=1MAmcos⁡(2πfmt+θm)+B0.(iv)
Exponential envelope currentf4(t)=aebt·∑m=1MAmcos⁡(2πfmt+θm)+B0.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 state-space 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 change point detection, and this paper uses discrete wavelet transform (DWT) to analyze the signal.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–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.


## 2. 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 signalf(t) takes this form(1)Wj,k=2-j/2∫-∞+∞ftψj,k∗t-k·2j2jdt.Furthermore, in the multiresolution analysis process, a give n signalf(t) can be completely decomposed based on scaling function φ(t) and wavelet function ψ(t). Hence theJ-level DWT representation off(t) can be defined as(2)ft=∑k=02n-j-1aj,k12jφt-k·2j2j+∑j=1J∑k=02n-j-1dj,k12jψt-k·2j2j=AJt+∑j=1JDjtwhereaj,k is the approximation coefficients at level J.dj,k is detail coefficients. The decomposition level of discrete wavelet transformn should satisfy n=log2⁡(1/8fs/fb)+0.5, where fb is the fundamental frequency of the signal and fs is the sampling frequency. The frequency bands corresponding to the DWT signal are shown in Figure 1.Figure 1
The frequency bands corresponding to the DWT signal.


### 2.2. DWT Modulus Maximum Method

Suppose the wavelet function and the signal functionf(t) are both real functions, and a point (j0,k0) in a given levelj0 satisfies (3)∂Wj0,k0∂tt=t0=0;the point j0,k0 is the local maximum point.If∀t∈(t0,δ) and(4)Wj0,t≤Wj0,t0,j0,t0 is the point of modulus maxima of detail coefficients.Therefore, at a given levelj0,a set of modulus maxima can be obtained from the detail coefficients. For a signalf(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.


## 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 signalf(t) takes this form(1)Wj,k=2-j/2∫-∞+∞ftψj,k∗t-k·2j2jdt.Furthermore, in the multiresolution analysis process, a give n signalf(t) can be completely decomposed based on scaling function φ(t) and wavelet function ψ(t). Hence theJ-level DWT representation off(t) can be defined as(2)ft=∑k=02n-j-1aj,k12jφt-k·2j2j+∑j=1J∑k=02n-j-1dj,k12jψt-k·2j2j=AJt+∑j=1JDjtwhereaj,k is the approximation coefficients at level J.dj,k is detail coefficients. The decomposition level of discrete wavelet transformn should satisfy n=log2⁡(1/8fs/fb)+0.5, where fb is the fundamental frequency of the signal and fs is the sampling frequency. The frequency bands corresponding to the DWT signal are shown in Figure 1.Figure 1
The frequency bands corresponding to the DWT signal.


## 2.2. DWT Modulus Maximum Method

Suppose the wavelet function and the signal functionf(t) are both real functions, and a point (j0,k0) in a given levelj0 satisfies (3)∂Wj0,k0∂tt=t0=0;the point j0,k0 is the local maximum point.If∀t∈(t0,δ) and(4)Wj0,t≤Wj0,t0,j0,t0 is the point of modulus maxima of detail coefficients.Therefore, at a given levelj0,a set of modulus maxima can be obtained from the detail coefficients. For a signalf(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.


## 3. 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 Rm/a in this paper, is obtained through the detail coefficients of the first layer. Rm/a is defined as(5)Rm/a=modulusmaximamodulusaverage.( 4 ) If Rm/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 Rm/a is calculated for the detail coefficients of the first layer. If Rm/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 Rm/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 Figure2.Figure 2
The flow chart of the sliding dislocation window method.


## 4. Simulation of Dynamic Current 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.The dynamic signal shown in Figure3 can be segmented and represented by the piecewise function in (6). It is an oblique envelope signal whent<0.3s, an exponential envelope signal in 0.3s≤t≤0.5s, a parabolic envelope signal in 0.5s<t≤0.8s, and a harmonic signal for the rest of the time. The total simulation time is 1s.(6)it=f2t,t<0.3f4t,0.3≤t≤0.5f3t,0.5<t≤0.8f1t,t>0.8Figure 3
The envelope diagram of the dynamic signal.All the envelope signals above are with 3 harmonics, the fundamental frequency isf0=50.0Hz, the phase θ is 60°, 45°, and 30°, respectively, and the amplitude Am is 100A, 5A, and 10A, respectively. Envelope parameters area=1.5,b=3, andc=0.2; the DC component isB0=0.5. The sampling frequency is fs=6400 Hz; the sampling interval time Ts 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 Figure3.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.Figure 4
The detail coefficients of the first layer with different wavelets (0.55s≤t≤0.75s).According to Figure4, fordb2,Sym2,Coif 1, andbior2.2 wavelet basis functions, jump phenomenon occurs at both ends of the detail coefficients of the first layer. And Rm/a of the jump points at both ends are shown in Table 1.Table 1
R m / a of the jump points at both ends of the signal.
Wavelet Modulus maxima Modulus average R m / a bior2.2 1.168 0.761 1.535 3.827 5.029 db2 4.717 0.999 4.720 1.361 1.362 Sym2 4.717 0.999 4.720 1.361 1.362 Coif1 1.850 0.979 1.891 4.809 4.914Table1 shows that Rm/a 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 Section3 of this paper. According to Table 1, the modulus maxima, modulus average, and Rm/a ofdb2 andSym2 wavelets are the same, respectively. And this paper choosesdb2andSym2 wavelet to do the next analysis.We chose the 2650 data points when 0.55s<t≤0.95s from the original sampled signal and add 10 cycles of dislocation window near the left and right sides of the suspicious change points att=0.75s. Through thedb2 wavelet decomposition, the detail coefficients of the first layer are shown in Figure 5.Figure 5
The detail coefficients of the first layer when applying db2 (0.55s≤t≤0.95s).R m / a at the intermediate point of the dislocation window (t=0.75s) and att=0.8s in Figure 5 are shown in Table 2.Table 2
R m / a at the median point of the dislocation window and at t=0.8s.
Location Modulus maxima Modulus average Rm/a t=0.75 s 0.051 12.920 0.003 t=0.8 s 109.600 8.483Table2 shows that Rm/a oft=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,Rm/a att=0.8s in Figure 5 is 8.483, which indicates that this point is true change point. A jump indeed occurs att=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.


### 4.2. Monitoring of Change Points via Wavelet Transform Modulus Maxima Method

After eliminating the misjudgment points, this paper chooseshaar,bior,rbio,db,Coif, andSymwavelet 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 Rm/a 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.Table 3
R m / a obtained through the detail coefficients of the first layer (t=0.3s, t=0.5s, t=0.8s).
Wavelet Modulus maxima Modulus average R m / a 21.832  1.565 haar 221.793 13.953 15.896 5.260  0.377 7.619  0.689 bior2.2 169.570 11.063 15.328 97.858  8.846 7.129  0.575 bior2.4 158.988 12.407 12.813 91.741  7.394 21.141  0.802 rbio3.1 72.736 26.362 2.759 181.937  6.902 16.696  1.289 db2 201.969 12.957 15.587 72.922  5.628 6.700  0.575 db4 77.883 11.652 6.684 90.211  7.742 16.696  1.289 Sym2 201.969 12.957 15.587 72.922  5.628 9.616  0.720 Sym4 170.803 13.351 12.793 74.579  5.586 7.044  0.577 Coif1 172.450 12.215 14.118 93.058  7.6184 8.531  0.631 Coif3 150.870 13.527 11.153 80.843  5.976Figure 6
The detail coefficients of the first layer (haar, db4, Coif3, Sym4, bior2.4, rbio3.1).According to Figure6 and Table 3, all the wavelets above are insensitive to the change point att=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, excepthaar,db2, andSym2 wavelets, Rm/a of other wavelets are less than 1, which is not applicable for change points monitor.In addition,Rm/a of thehaar wavelet is only 0.377 att=0.8s, which is far less than that of other wavelets (greater than 5). It is also difficult to find the obvious waveform jump att=0.8s in Figure 5. It demonstrates thathaar wavelet is insensitive to the third change point and cannot effectively monitor the change points of dynamic signal. Moreover, Rm/a ofrbio3.1 wavelet is only 2.759 att=0.5s, which is also far less than that of other wavelets (greater than 6). It indicates thatrbio3.1 wavelet is insensitive to the second change point.Becausehaarandrbio 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 Table3, with the decrease ofN (N represents the order of wavelet), Rm/a ofdbN,SymN,CoifN, andbiorN wavelets increase, which means the monitoring of the change points is more sensitive. This is because the smallerN, the better division of the bands. However, it is easy to cause mistake-detection and miss-detection whenN is too small. Moreover, Rm/a ofdb2 andSym2 wavelets at the three change points are the same; that is, these two wavelets have the same detection effect.Therefore, this paper chooses thedb2,Sym2,Coif1, andbior2.2 wavelets to do the next analysis, respectively. The error analysis of these four wavelets is shown in Table 4.Table 4
Comparison of the theoretical value and the calculated value.
Wavelet db2 Sym2 Coif1 bior2.2 change point 1 theoretical value/s 0.3 calculated value/s 0.29797 0.29797 0.31797 0.31797 relative error/% 0.6771 0.6771 5.9896 5.9896 change point 2 theoretical value/s 0.5 calculated value/s 0.49797 0.49797 0.51797 0.51797 relative error/% 0.4062 0.4062 3.5937 3.5937 change point 2 theoretical value/s 0.8 calculated value/s 0.81797 0.81797 0.79797 0.79797 relative error/% 2.2461 2.2461 0.2539 0.2539According to Table4, 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 ofdb2 andSym2 wavelets are equal, and so are theCoif1 andbior2.2 wavelets. In particular, the relative errors ofdb2 andSym2 wavelets at the first two change points are smaller than that of theCoif1 andbior2.2 wavelets (the errors are almost only 1/8 of that of theCoif1 andbior2.2 wavelets), and the relative errors at the third change points are slightly larger than that of theCoif1 andbior2.2 wavelets. This indicates thatdb2 andSym2 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.Table 5
Comparison of relative error of the envelope method and the direct method.
Relative error/% db2 Sym2 Coif1 bior2.2 change point 1 envelope method 0.6771 0.6771 5.9896 5.9896 direct method 0.1042 0.1042 0.0521 0.0521 change point 2 envelope method 0.4062 0.4062 3.5937 3.5937 direct method 0.0625 0.0625 0.0312 0.0312 change point 3 envelope method 2.2461 2.2461 0.2539 0.2539 direct method 0.0391 0.0391 0.0586 0.0586Table 6
Comparison of program computation time of the envelope method and the direct method.
Wavelet Direct method/s Envelope method /s Reduction of computation time/% db2 0.17413 0.13803 20.734 Sym2 0.16627 0.14662 11.817 Coif1 0.17442 0.15252 12.558 bior2.2 0.18728 0.14983 19.993According to Table5, 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 ofdb2 andSym2 wavelets is smaller than that of theCoif1 andbior2.2 wavelets, and compared to the direct method, the program computation time ofdb2 wavelet is reduced by 20.734% using the envelope method. It shows thatdb2 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.


### 4.3. 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 isfs=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.Figure 7
Electric locomotive current waveform and its upper envelope.Figure 8
Detail coefficients of the envelope method with different wavelets.Figure 9
Detail coefficients of the direct method with different wavelets.According to Figures7 and 8, the analysis results of two obvious change points (att=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.Table 7
Comparison of envelope method with different wavelets.
Wavelet Maximum modulus Average modulus R m / a Relative error/% Average time/s db2 0.1688 0.0101 16.6635 0.8553 0.2278 0.1322 13.0522 2.4698 Sym2 0.1688 0.0101 16.6635 0.8553 0.2326 0.1322 13.0522 2.4698 Coif1 0.1170 0.0098 11.9468 1.0310 0.2504 0.1282 13.0869 2.6637 bior2.2 0.1105 0.0089 12.3620 1.0310 0.2688 0.1195 13.3673 2.6637From Table7, 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 andSym2 wavelets have higher detection accuracy and less program computation time and are more sensitive to the change points than the other wavelets.


#### 4.3.2. Forging Machine Current Signal

Figure10 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 fs=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.Figure 10
Forging machine current waveform and its upper envelope.Figure 11
Detail coefficients of the envelope method with different wavelets.Figure 12
Detail coefficients of the direct method with different wavelets.The analysis results of two obvious change points (att=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
Comparison of envelope method with different wavelets.
Wavelet Maximum modulus Average modulus R m / a Relative error/% Average time/s db2 0.6346 0.0732 8.6733 0.0201 0.2040 0.1526 2.0849 0.0439 Sym2 0.6346 0.0732 8.6733 0.0201 0.2160 0.1526 2.0849 0.0439 Coif1 0.3149 0.0771 4.0841 0.9265 0.2169 0.1325 1.7190 1.4076 bior2.2 0.2063 0.0663 3.1064 0.9265 0.2401 0.1659 2.4985 1.4076Table8 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 Rm/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 andSym2 wavelets are faster, more precise, and more sensitive to the change points than the other wavelets.


## 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.The dynamic signal shown in Figure3 can be segmented and represented by the piecewise function in (6). It is an oblique envelope signal whent<0.3s, an exponential envelope signal in 0.3s≤t≤0.5s, a parabolic envelope signal in 0.5s<t≤0.8s, and a harmonic signal for the rest of the time. The total simulation time is 1s.(6)it=f2t,t<0.3f4t,0.3≤t≤0.5f3t,0.5<t≤0.8f1t,t>0.8Figure 3
The envelope diagram of the dynamic signal.All the envelope signals above are with 3 harmonics, the fundamental frequency isf0=50.0Hz, the phase θ is 60°, 45°, and 30°, respectively, and the amplitude Am is 100A, 5A, and 10A, respectively. Envelope parameters area=1.5,b=3, andc=0.2; the DC component isB0=0.5. The sampling frequency is fs=6400 Hz; the sampling interval time Ts 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 Figure3.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.Figure 4
The detail coefficients of the first layer with different wavelets (0.55s≤t≤0.75s).According to Figure4, fordb2,Sym2,Coif 1, andbior2.2 wavelet basis functions, jump phenomenon occurs at both ends of the detail coefficients of the first layer. And Rm/a of the jump points at both ends are shown in Table 1.Table 1
R m / a of the jump points at both ends of the signal.
Wavelet Modulus maxima Modulus average R m / a bior2.2 1.168 0.761 1.535 3.827 5.029 db2 4.717 0.999 4.720 1.361 1.362 Sym2 4.717 0.999 4.720 1.361 1.362 Coif1 1.850 0.979 1.891 4.809 4.914Table1 shows that Rm/a 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 Section3 of this paper. According to Table 1, the modulus maxima, modulus average, and Rm/a ofdb2 andSym2 wavelets are the same, respectively. And this paper choosesdb2andSym2 wavelet to do the next analysis.We chose the 2650 data points when 0.55s<t≤0.95s from the original sampled signal and add 10 cycles of dislocation window near the left and right sides of the suspicious change points att=0.75s. Through thedb2 wavelet decomposition, the detail coefficients of the first layer are shown in Figure 5.Figure 5
The detail coefficients of the first layer when applying db2 (0.55s≤t≤0.95s).R m / a at the intermediate point of the dislocation window (t=0.75s) and att=0.8s in Figure 5 are shown in Table 2.Table 2
R m / a at the median point of the dislocation window and at t=0.8s.
Location Modulus maxima Modulus average Rm/a t=0.75 s 0.051 12.920 0.003 t=0.8 s 109.600 8.483Table2 shows that Rm/a oft=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,Rm/a att=0.8s in Figure 5 is 8.483, which indicates that this point is true change point. A jump indeed occurs att=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.


## 4.2. Monitoring of Change Points via Wavelet Transform Modulus Maxima Method

After eliminating the misjudgment points, this paper chooseshaar,bior,rbio,db,Coif, andSymwavelet 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 Rm/a 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.Table 3
R m / a obtained through the detail coefficients of the first layer (t=0.3s, t=0.5s, t=0.8s).
Wavelet Modulus maxima Modulus average R m / a 21.832  1.565 haar 221.793 13.953 15.896 5.260  0.377 7.619  0.689 bior2.2 169.570 11.063 15.328 97.858  8.846 7.129  0.575 bior2.4 158.988 12.407 12.813 91.741  7.394 21.141  0.802 rbio3.1 72.736 26.362 2.759 181.937  6.902 16.696  1.289 db2 201.969 12.957 15.587 72.922  5.628 6.700  0.575 db4 77.883 11.652 6.684 90.211  7.742 16.696  1.289 Sym2 201.969 12.957 15.587 72.922  5.628 9.616  0.720 Sym4 170.803 13.351 12.793 74.579  5.586 7.044  0.577 Coif1 172.450 12.215 14.118 93.058  7.6184 8.531  0.631 Coif3 150.870 13.527 11.153 80.843  5.976Figure 6
The detail coefficients of the first layer (haar, db4, Coif3, Sym4, bior2.4, rbio3.1).According to Figure6 and Table 3, all the wavelets above are insensitive to the change point att=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, excepthaar,db2, andSym2 wavelets, Rm/a of other wavelets are less than 1, which is not applicable for change points monitor.In addition,Rm/a of thehaar wavelet is only 0.377 att=0.8s, which is far less than that of other wavelets (greater than 5). It is also difficult to find the obvious waveform jump att=0.8s in Figure 5. It demonstrates thathaar wavelet is insensitive to the third change point and cannot effectively monitor the change points of dynamic signal. Moreover, Rm/a ofrbio3.1 wavelet is only 2.759 att=0.5s, which is also far less than that of other wavelets (greater than 6). It indicates thatrbio3.1 wavelet is insensitive to the second change point.Becausehaarandrbio 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 Table3, with the decrease ofN (N represents the order of wavelet), Rm/a ofdbN,SymN,CoifN, andbiorN wavelets increase, which means the monitoring of the change points is more sensitive. This is because the smallerN, the better division of the bands. However, it is easy to cause mistake-detection and miss-detection whenN is too small. Moreover, Rm/a ofdb2 andSym2 wavelets at the three change points are the same; that is, these two wavelets have the same detection effect.Therefore, this paper chooses thedb2,Sym2,Coif1, andbior2.2 wavelets to do the next analysis, respectively. The error analysis of these four wavelets is shown in Table 4.Table 4
Comparison of the theoretical value and the calculated value.
Wavelet db2 Sym2 Coif1 bior2.2 change point 1 theoretical value/s 0.3 calculated value/s 0.29797 0.29797 0.31797 0.31797 relative error/% 0.6771 0.6771 5.9896 5.9896 change point 2 theoretical value/s 0.5 calculated value/s 0.49797 0.49797 0.51797 0.51797 relative error/% 0.4062 0.4062 3.5937 3.5937 change point 2 theoretical value/s 0.8 calculated value/s 0.81797 0.81797 0.79797 0.79797 relative error/% 2.2461 2.2461 0.2539 0.2539According to Table4, 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 ofdb2 andSym2 wavelets are equal, and so are theCoif1 andbior2.2 wavelets. In particular, the relative errors ofdb2 andSym2 wavelets at the first two change points are smaller than that of theCoif1 andbior2.2 wavelets (the errors are almost only 1/8 of that of theCoif1 andbior2.2 wavelets), and the relative errors at the third change points are slightly larger than that of theCoif1 andbior2.2 wavelets. This indicates thatdb2 andSym2 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.Table 5
Comparison of relative error of the envelope method and the direct method.
Relative error/% db2 Sym2 Coif1 bior2.2 change point 1 envelope method 0.6771 0.6771 5.9896 5.9896 direct method 0.1042 0.1042 0.0521 0.0521 change point 2 envelope method 0.4062 0.4062 3.5937 3.5937 direct method 0.0625 0.0625 0.0312 0.0312 change point 3 envelope method 2.2461 2.2461 0.2539 0.2539 direct method 0.0391 0.0391 0.0586 0.0586Table 6
Comparison of program computation time of the envelope method and the direct method.
Wavelet Direct method/s Envelope method /s Reduction of computation time/% db2 0.17413 0.13803 20.734 Sym2 0.16627 0.14662 11.817 Coif1 0.17442 0.15252 12.558 bior2.2 0.18728 0.14983 19.993According to Table5, 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 ofdb2 andSym2 wavelets is smaller than that of theCoif1 andbior2.2 wavelets, and compared to the direct method, the program computation time ofdb2 wavelet is reduced by 20.734% using the envelope method. It shows thatdb2 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.


## 4.3. 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 isfs=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.Figure 7
Electric locomotive current waveform and its upper envelope.Figure 8
Detail coefficients of the envelope method with different wavelets.Figure 9
Detail coefficients of the direct method with different wavelets.According to Figures7 and 8, the analysis results of two obvious change points (att=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.Table 7
Comparison of envelope method with different wavelets.
Wavelet Maximum modulus Average modulus R m / a Relative error/% Average time/s db2 0.1688 0.0101 16.6635 0.8553 0.2278 0.1322 13.0522 2.4698 Sym2 0.1688 0.0101 16.6635 0.8553 0.2326 0.1322 13.0522 2.4698 Coif1 0.1170 0.0098 11.9468 1.0310 0.2504 0.1282 13.0869 2.6637 bior2.2 0.1105 0.0089 12.3620 1.0310 0.2688 0.1195 13.3673 2.6637From Table7, 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 andSym2 wavelets have higher detection accuracy and less program computation time and are more sensitive to the change points than the other wavelets.


### 4.3.2. Forging Machine Current Signal

Figure10 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 fs=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.Figure 10
Forging machine current waveform and its upper envelope.Figure 11
Detail coefficients of the envelope method with different wavelets.Figure 12
Detail coefficients of the direct method with different wavelets.The analysis results of two obvious change points (att=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
Comparison of envelope method with different wavelets.
Wavelet Maximum modulus Average modulus R m / a Relative error/% Average time/s db2 0.6346 0.0732 8.6733 0.0201 0.2040 0.1526 2.0849 0.0439 Sym2 0.6346 0.0732 8.6733 0.0201 0.2160 0.1526 2.0849 0.0439 Coif1 0.3149 0.0771 4.0841 0.9265 0.2169 0.1325 1.7190 1.4076 bior2.2 0.2063 0.0663 3.1064 0.9265 0.2401 0.1659 2.4985 1.4076Table8 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 Rm/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 andSym2 wavelets are faster, more precise, and more sensitive to the change points than the other wavelets.


## 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 isfs=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.Figure 7
Electric locomotive current waveform and its upper envelope.Figure 8
Detail coefficients of the envelope method with different wavelets.Figure 9
Detail coefficients of the direct method with different wavelets.According to Figures7 and 8, the analysis results of two obvious change points (att=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.Table 7
Comparison of envelope method with different wavelets.
Wavelet Maximum modulus Average modulus R m / a Relative error/% Average time/s db2 0.1688 0.0101 16.6635 0.8553 0.2278 0.1322 13.0522 2.4698 Sym2 0.1688 0.0101 16.6635 0.8553 0.2326 0.1322 13.0522 2.4698 Coif1 0.1170 0.0098 11.9468 1.0310 0.2504 0.1282 13.0869 2.6637 bior2.2 0.1105 0.0089 12.3620 1.0310 0.2688 0.1195 13.3673 2.6637From Table7, 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 andSym2 wavelets have higher detection accuracy and less program computation time and are more sensitive to the change points than the other wavelets.


## 4.3.2. Forging Machine Current Signal

Figure10 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 fs=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.Figure 10
Forging machine current waveform and its upper envelope.Figure 11
Detail coefficients of the envelope method with different wavelets.Figure 12
Detail coefficients of the direct method with different wavelets.The analysis results of two obvious change points (att=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
Comparison of envelope method with different wavelets.
Wavelet Maximum modulus Average modulus R m / a Relative error/% Average time/s db2 0.6346 0.0732 8.6733 0.0201 0.2040 0.1526 2.0849 0.0439 Sym2 0.6346 0.0732 8.6733 0.0201 0.2160 0.1526 2.0849 0.0439 Coif1 0.3149 0.0771 4.0841 0.9265 0.2169 0.1325 1.7190 1.4076 bior2.2 0.2063 0.0663 3.1064 0.9265 0.2401 0.1659 2.4985 1.4076Table8 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 Rm/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 andSym2 wavelets are faster, more precise, and more sensitive to the change points than the other wavelets.


## 5. 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 chooseshaar,bior,rbio,db,Coif, andSymwavelets to perform wavelet decomposition. And the simulation analysis verifies that thehaarandrbio 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.



---

*Source: 9529870-2018-07-03.xml*