4
Automatic voltage disturbance detection and classification using wavelets and multiclass logistic regression Dimce Kostadinov, Dimitar Taskovski Faculty of electrical engineering and information technologies Ss Cyril and Methodius University – Skopje, Skopje, Macedonia [email protected], [email protected] Abstract— This paper proposes new method for power quality disturbances classification using multiclass logistic regression. The features for the disturbances are extracted using wavelet packet transform and the rms value is used to characterize the magnitude of the disturbances. The detection and classification is done by employing machine learning. The proposed approach utilizes multiclass logistic regression with one against all strategy. The training and testing was done on seven different classes of simulated disturbances. The presented results show that the proposed method is able to produce classification with high- accuracy. Keywords- Power quality, disturbance classification, wavelet packet transform, multiclass logistic regression I. INTRODUCTION Manual approach of analyzing and identifying power quality (PQ) disturbances such as based on visual inspection of disturbance waveforms is laborious. The conventional techniques for analyzing these problems are too simple and rigid to capture all the relevant disturbance structure. A reliable automated system for disturbance recognition and classification has many advantages over a manual one. These advantages include the speed of processing, amount of data that can be processed, ease of data collection and storage, reliability and cost. Several methods for automated detection and classification of disturbances have been proposed recently. Some frequently used artificial intelligence (AI) based classifiers are rule-based expert systems, fuzzy classification systems, artificial neural networks (ANN), kernel machines, and support vector machines (SVM). Ibrahim et al. provided an excellent survey of advanced AI techniques for PQ application [1]. All these techniques use feature vectors derived from disturbance waveforms to classify power quality events. Different digital signal processing techniques can be used in the process of extraction features that characterize PQ disturbances [2]. Among them, wavelet transform has been used extensively in the last years. In [3], a comprehensive review on using of wavelet transform approach in processing power quality data is given. Here, we will consider three wavelet based methods that are used for comparison purposes later in the paper. In [4], authors use a learning-based method in order to classify the power disturbances. A decision tree is created, using wavelet analysis in the feature extraction process. The signal, which is tested for power disturbances, is decomposed in 11 levels and the energy of each obtained component is calculated. The reported overall accuracy is 90.4%. In [5], authors use the same feature vector as [4], however they use a different learning- based method. A type of neural network, called SONAR (self- organizing learning array), is used for the classification of the power disturbances. The reported overall accuracy is 94.93%. They have also done a comparative study using SVM (Support Vector Machines), obtaining accuracy, which is in some cases very close to the accuracy obtained using SONAR. In [6], wavelet norm entropy-based effective feature extraction method for power quality disturbance classification problem is presented. The disturbance classification schema is performed with the wavelet neural network (WNN). It performs a feature extraction and a classification algorithm composed of a wavelet feature extractor based on norm entropy and a classifier based on a multi-layer perceptron. The reported overall accuracy is 95.71% This paper proposes a novel method for power quality disturbances classification. The novelty consists in the way the analyzed signal is represented and characterized and in the use of nonlinear (logistic) regression for voltage disturbance detection and classification. To better discriminate specific type of disturbance we propose two WPT (wavelet packet transform) to be applied on the analyzed signal as discussed in Section 2. Section 3 in detail explains the used regression method for the classifier. In Section 4 the performed experiments and obtained results are presented. Finally the derived conclusions are discussed in Section 5. II. FEATURE VECTOR EXTRACTION USING WPT The main objective in the process of the automatic disturbance recognition and classification is applying useful data analysis and digital signal processing tools for revealing as much as possible significant and unique pattern for particular class of disturbance. So the main focus is in derivation of feature vector that best describes and identifies given disturbance. Wavelet transform analysis approach is able to give information about frequency contents of the recorded signal and information about components time appearance. This work was supported by the EC project SEE ERA NET PLUS under grant ERA 078/01. 978-1-4577-1772-7/12/$26.00 ©2012 IEEE

[IEEE 2012 IEEE International Instrumentation and Measurement Technology Conference (I2MTC) - Graz, Austria (2012.05.13-2012.05.16)] 2012 IEEE International Instrumentation and Measurement

  • Upload
    dimitar

  • View
    216

  • Download
    3

Embed Size (px)

Citation preview

Page 1: [IEEE 2012 IEEE International Instrumentation and Measurement Technology Conference (I2MTC) - Graz, Austria (2012.05.13-2012.05.16)] 2012 IEEE International Instrumentation and Measurement

Automatic voltage disturbance detection and

classification using wavelets and multiclass logistic

regression

Dimce Kostadinov, Dimitar Taskovski

Faculty of electrical engineering and information technologies

Ss Cyril and Methodius University – Skopje,

Skopje, Macedonia

[email protected], [email protected]

Abstract— This paper proposes new method for power quality

disturbances classification using multiclass logistic regression.

The features for the disturbances are extracted using wavelet

packet transform and the rms value is used to characterize the

magnitude of the disturbances. The detection and classification is

done by employing machine learning. The proposed approach

utilizes multiclass logistic regression with one against all strategy.

The training and testing was done on seven different classes of

simulated disturbances. The presented results show that the

proposed method is able to produce classification with high-

accuracy.

Keywords- Power quality, disturbance classification, wavelet

packet transform, multiclass logistic regression

I. INTRODUCTION

Manual approach of analyzing and identifying power quality (PQ) disturbances such as based on visual inspection of disturbance waveforms is laborious. The conventional techniques for analyzing these problems are too simple and rigid to capture all the relevant disturbance structure. A reliable automated system for disturbance recognition and classification has many advantages over a manual one. These advantages include the speed of processing, amount of data that can be processed, ease of data collection and storage, reliability and cost.

Several methods for automated detection and classification of disturbances have been proposed recently. Some frequently used artificial intelligence (AI) based classifiers are rule-based expert systems, fuzzy classification systems, artificial neural networks (ANN), kernel machines, and support vector machines (SVM). Ibrahim et al. provided an excellent survey of advanced AI techniques for PQ application [1]. All these techniques use feature vectors derived from disturbance waveforms to classify power quality events. Different digital signal processing techniques can be used in the process of extraction features that characterize PQ disturbances [2]. Among them, wavelet transform has been used extensively in the last years. In [3], a comprehensive review on using of wavelet transform approach in processing power quality data is given. Here, we will consider three wavelet based methods that are used for comparison purposes later in the paper. In [4], authors use a learning-based method in order to classify the

power disturbances. A decision tree is created, using wavelet analysis in the feature extraction process. The signal, which is tested for power disturbances, is decomposed in 11 levels and the energy of each obtained component is calculated. The reported overall accuracy is 90.4%. In [5], authors use the same feature vector as [4], however they use a different learning-based method. A type of neural network, called SONAR (self-organizing learning array), is used for the classification of the power disturbances. The reported overall accuracy is 94.93%. They have also done a comparative study using SVM (Support Vector Machines), obtaining accuracy, which is in some cases very close to the accuracy obtained using SONAR. In [6], wavelet norm entropy-based effective feature extraction method for power quality disturbance classification problem is presented. The disturbance classification schema is performed with the wavelet neural network (WNN). It performs a feature extraction and a classification algorithm composed of a wavelet feature extractor based on norm entropy and a classifier based on a multi-layer perceptron. The reported overall accuracy is 95.71%

This paper proposes a novel method for power quality disturbances classification. The novelty consists in the way the analyzed signal is represented and characterized and in the use of nonlinear (logistic) regression for voltage disturbance detection and classification. To better discriminate specific type of disturbance we propose two WPT (wavelet packet transform) to be applied on the analyzed signal as discussed in Section 2. Section 3 in detail explains the used regression method for the classifier. In Section 4 the performed experiments and obtained results are presented. Finally the derived conclusions are discussed in Section 5.

II. FEATURE VECTOR EXTRACTION USING WPT

The main objective in the process of the automatic disturbance recognition and classification is applying useful data analysis and digital signal processing tools for revealing as much as possible significant and unique pattern for particular class of disturbance. So the main focus is in derivation of feature vector that best describes and identifies given disturbance. Wavelet transform analysis approach is able to give information about frequency contents of the recorded signal and information about components time appearance.

This work was supported by the EC project SEE ERA NET PLUS under grant ERA 078/01.

978-1-4577-1772-7/12/$26.00 ©2012 IEEE

Page 2: [IEEE 2012 IEEE International Instrumentation and Measurement Technology Conference (I2MTC) - Graz, Austria (2012.05.13-2012.05.16)] 2012 IEEE International Instrumentation and Measurement

Figure 1. Modified binary tree wavelet scheme up to 6th level. The numbers inside each circle indicate the node numbers which are used in the analysis. The h

and g represent the low-pass and high-pass filters, respectively.

These features make the wavelet transform well suited for the analysis of the power system transients caused by various PQ disturbances. In this work we use modified Wavelet Packet Transform (WPT) [7].

The wavelet analysis is in fact a measure of similarity between the basis function (wavelets) and the signal itself. Therefore, the selection of the most adequate wavelet mother function to be used in the analysis is one of the key factors in successful application of wavelets. As general rule, for detection of short and fast (transient) disturbances, shorter filters are proposed as better, while for slow transient disturbances long filters are presented as particularly good [7]. Furthermore when the accurate measurements are concerned for instance for harmonic analysis the filters which have good frequency selectivity are required [8]. Vaidyanathan with 24 coefficients, Daubachies with 20 coefficients and Coiflet 5 with 30 coefficients, are proposed in the literature as the most adequate for harmonic analysis [9].

In order to overcome the problem with the choice of the appropriate wavelet we use two wavelet packet transforms, one with short filters and another with long filters in the proposed automatic disturbance recognition and classification procedure. The idea is to equally treat the analyzed data by the both filters and to use representation that emphasizes the uniqueness, selectivity and characterization of every distinctive class of disturbance. Thus the feature vector is constructed by concatenating the calculated rms value for each terminal node of the binary tree-wavelet transform obtained from the both filters as shown in Fig. 2. The rms at single binary tree-wavelet node in the wavelet domain is defined as [7, 8]:

2 12

,

0

1[ ] ( [ ])

2

N i

short short jNk

F j d k

− −

=

= ∑

2 12

,

0

1[ ] ( [ ])

2

N i

long long jNk

F j d k

− −

=

= ∑ (1)

where i is level of decomposition, j is the binary tree-wavelet

node, ,short jd are the wavelet transform coefficients at node j

obtained using wavelet packet transform with short filter,

,long jd are the wavelet transform coefficients at node j obtained

Figure 2. Feature vector construction procedure

using wavelet packet transform with long filter and 2N is the

number of sampling points. At Fig. 2 we show the feature vector construction procedure.

We started with the binary tree as suggested in [7] and then continued with the decomposition further. From a number of analyzed disturbance waveforms we experienced that more than one binary-tree wavelet structures is suitable for an analysis. Fig. 1 shows one such scheme of modified 6

th-level

binary-tree structure. Nodes from 0 to 32 have the same frequency bandwidth and are important for harmonic identification, whereas nodes from 33 to 48 are used to detect and localize any other disturbance in the signal.

III. LOGISTIC REGRESSION VOLTAGE DISTURBANCE

DETECTOR AND CLASSIFIER

As explained in [10] logistic regression classifier has several useful advantages over other machine learning classifiers. This can be effectively exploited especially in the context of voltage disturbance detection and classification.

We consider several different classes of voltage disturbances, and use feature vector for voltage signal representation, extracted using the proposed method explained in Section 2. We also call the feature vector for given class

Original input waveform

compute rms value for every wavelet binary tree

node

Feature vector

compute rms value for every wavelet binary tree

node

concatenate rms values

WPT using short filter WPT using long filter

Page 3: [IEEE 2012 IEEE International Instrumentation and Measurement Technology Conference (I2MTC) - Graz, Austria (2012.05.13-2012.05.16)] 2012 IEEE International Instrumentation and Measurement

positive example for that class. Given a sets of feature vectors for different classes we use one against all strategy where the positive examples are the examples from given class; the negative examples are the examples from all others classes, and we train one binary classifier for each of the 7 classes: normal, swell, sag, harmonic, outage, sag with harmonic and swell with harmonic.

The used binary classifier is standard logistic (sigmoid) function of the form:

( ) ( )1

1

T

θ Tθ

h x = g θ x =x

+e−

(2)

where 0

1

nT

j j

j=

θ x = θ + θ x∑ , ( )1n+

θ R∈ are the model parameters

and nx R∈ is the feature vector.

The classifier has two modes, leaning and classifying. In the first mode a number of data examples are presented to the classifier to fit the parameters for it. In this mode, we use standard batch gradient descent algorithm, where we perform maximization with respect to the model parameters on the log likelihood of the sigmoid function. The algorithm starts with some initial θ, and repeatedly performs the update:

( )θ = θ+α l θθ∇ (3)

where α is the learning rate and ( )l θ is the log likelihood

defined as:

( ) ( )

1

log ( ) log ( ) (1 ) log(1 ( ))m

i i i i

i

l θ L θ y h x y h x=

= = + − −∑ (4)

where m is the number of training data.

The likelihood of the parameters is:

1

1 1

( ) ( | ; ) ( ( )) (1 ( ))i i

m mi i i y i y

i i

L θ p y x h x h xθ θθ −

= =

= = −∏ ∏ (5)

where 1( | ; ) ( ( )) (1 ( ))y yp y x h x h xθ θθ −= − is the probability for

the (output) target variable [ ]0,1y ∈ given the feature vector

x and using the parameter θ .

In the second mode the actual classification is preformed. The multiclass classification mode is simple and straightforward; the maximum value among the binary classifiers for single input data corresponds to the output class label and can be expressed as follows:

( ) ( )( )1,2... 1,2...

1

1 e

T

i= k i i= k Tθi

h x = max g θ x = maxx

+−

(6)

where k is the number of the binary classifiers corresponding to the number of classes:

IV. RESULTS AND DISCUSSION

The power disturbances are modeled in the same way as in [4, 5, 6]. All these works include the same disturbance types

and the same pattern numbers generated by parametric equations of data for training and testing of the classification stage. Seven different classes are considered, including the case with no power disturbances: normal, swell, sag, harmonic, outage, sag with harmonic and swell with harmonic, denoted with C1, C2, C3, C4, C5, C6, C7, respectively. Ten cycles are included in every signal with a sampling frequency of 256 samples/cycle i.e. every signal has 2560 samples. The frequency of the waveform is 50Hz.

The learning for single binary classifier was done using training data set with size of 1400 examples. In the training data set each training class has size of 200 data examples. The test was done using test data set with size of 1400 examples. In the test data set each test class has size of 200 data examples.

Different pair of filters on the same training and test data set was used in our experiments: Daubachies with length from 2 to 20 (Daub2, Daub 4, … , Daub20), Coiflet with length 6, 12, 18, 24, 30 (Coif1, …, Coif5), Beylkin 18, Vaidianathan 24 and two biorthogonal quadrature filter pairs (2 symmetric/symmetric and 2,6 symmetric/symmetric). Coefficients of all these filters can be found in [11]. Also, Tap24B, Tap24C, Tap24D, Tap32C, Tap32D and Tap32E, from the Johnson filters [12] were used.

Feature vector extracted with the proposed procedure (Fig. 2) and with the wavelet decomposition presented at Fig. 1, has length of 96 elements. The total time for single feature vector computation and classification is 0.025s with Matlab implementation code on UNIX machine with running 2.0GHz Intel Core Duo Processor.

Table I show results when only one wavelet packet transform is used in the process of feature vector extraction. As mentioned above, the selection of analyzing wavelets plays significant role in detection and classification of power quality disturbances. In the proposed detection and classification method, the best classification performance is achieved with 2 symm, Daub4 and TapD24 and TapD32 from Johnson family of filters.

Further improvements in the classification process are obtained when two wavelet packet transform are applied, as explained in Section 2. Some of obtained results are given in Table II. The results shown in Table II have very high classification accuracy rate. With some filters pair it reach 100%.

In order to evaluate the effectiveness of the proposed method we compared the obtained results with the results presented in [4, 5, 6]. The results are comparatively presented in Table III. As seen from Table III, the performance of the classification process with the proposed feature extraction method exceeds the performance of the classification process proposed in [4, 5, 6].

V. CONCLUSIONS

In this paper the proposed data signal analysis with the wavelet packet transform and the used machine learning approach produce classification with high-accuracy. The used feature vector, extracted using two WPT’s, and the rms value

Page 4: [IEEE 2012 IEEE International Instrumentation and Measurement Technology Conference (I2MTC) - Graz, Austria (2012.05.13-2012.05.16)] 2012 IEEE International Instrumentation and Measurement

used to characterize the magnitude of the disturbances gives fair disturbance representation. The used classification method is quite simple, straightforward and easy to perform. Further the classifier has the ability for disturbance adaptation, novel disturbance detection and classification if one uses the stochastic gradient descent. The later effectiveness still has to be proven and will be focus on future research together with experiments on real data disturbances. Future investigation and research in terms of reducing the overall computational cost can be made in finding optimal binary-tree structure with minimal length and good discrimination.

TABLE I. OVERALL AND PER DISTURBANCE CLASSIFICATION PRECISION

FOR DIFFERENT WAVELET FILTERS

C1 C2 C3 C4 C5 C6 C7 Overall Filter

type

1 1 0,915 1 0,96 0,95 1 0,975 2 symm

1 1 0,86 1 0,905 0,985 1 0,964 Coif1

1 1 0,865 1 0,865 0,935 0,94 0,944 Coif2

1 0,68 0,53 1 0,85 0,88 0,91 0,836 Coif5

1 0,98 0,885 1 0,815 0,985 1 0,952 Daub2

1 1 0,88 1 0,905 1 1 0,970 Daub4

1 1 0,845 1 0,855 0,99 1 0,956 Daub6

1 1 0,86 1 0,885 0,855 0,89 0,927 Daub8

1 0,7 0,515 1 0,815 0,86 0,885 0,825 Daub20

1 0,61 0,575 1 0,745 0,94 0,95 0,831 v24

1 0,695 0,535 1 0,94 0,865 0,86 0,842 TapB24

1 1 0,91 1 0,955 0,995 1 0,980 TapD24

1 1 0,91 1 0,94 0,99 1 0,977 TapC24

1 1 0,92 1 0,96 0,995 1 0,982 TapD32

TABLE II. OVERALL AND PER DISTURBANCE CLASSIFICATION PRECISION

FOR DIFFERENT PAIRS OF WAVELET FILTERS

C1 C2 C3 C4 C5 C6 C7 Overall Filter

type

1 1 1 1 1 1 1 1

Daub4

&&

TapC24

1 0,99 0,925 1 0,94 0,99 1 0,9779

2 symm

&&

Coif5

1 0,99 0,835 1 0,945 1 1 0,9671

Daub6&

&

Coif2

1 1 1 1 1 1 1 1

2 symm

&&

TapC24

TABLE III. PERFORMANCE COMPARISON OF CORRECT CLASSIFICATION

RESULTS (IN %)

Class One WPT

(db4)

Two

WPT

(db4 &

TapC24)

Ref. [4] Ref. [5] Ref. [6]

C1 100 100 100 100 100

C2 100 100 97 100 96.5

C3 88 100 76.5 87 88

C4 100 100 100 100 100

C5 90.5 100 90 80.5 85.5

C6 100 100 71.5 97 100

C7 100 100 98 100 100

Overall 96.93 100 90.4 94.93 95.714

REFERENCES

[1] W. R. A. Ibrahim, M. M. Morcos, Artificial intelligence and advanced mathematical tools for power quality applications: A survey, IEEE Trans. Power Deliv., 17 (2) (2002) 668–673

[2] M.H.J. Bollen, I.Y.H. Gu, Signal processing of power quality disturbances, Wiley-IEEE Press, 2006

[3] S. Chen, H. Y. Zhu, Wavelet transform for processing power quality disturbances, EURASIP J. Adv. Signal Process. 2007 (2007).

[4] T. K. A. Galil, M. Kamel, A. M. Youssef, E. F. E. Saadany, and M. M. A. Salama, Power quality disturbance classification using the inductive inference approach, IEEE Trans. Power Deliv. 19 (10) (2004) 1812-1818.

[5] H. He, and J. A. Starzyk, A self-organizing learning array system for power quality classification based on wavelet transform, IEEE Trans. Power Deliv. 21 (1) (2006) 286- 295.

[6] M. Uyara, S. Yildirima, M. T. Gencoglub, An effective wavelet-based feature extraction method for classification of power quality disturbance signals, J. Elec. Power Syst. Res. 78 (2008) 1747-1755

[7] E. Y. Hamid, Zen-I. Kawasaki, H, Yoshida, H. Doi, Wavelet analysis of voltage disturbances for power quality applications, Trans. Inst. of Electric. Eng. of Japan, 122-B (2) (2002) 323-330

[8] W.K. Yoon, M.J. Devaney, Power measurement based on the wavelet transform, IEEE Trans. Instrum. and Meas. 47 (3) (1998) 1205–1210.

[9] J. Barros, R. Diego, Application of the wavelet-packet transform to the estimation of harmonic groups in current and voltage waveforms, IEEE Trans. Power Deliv. 21 (1) (2006) 533- 535.

[10] C. Elkan, Log-linear models and conditional random fields, notes for a tutorial at CIKM’08, (2008)

[11] M. V. Wickerhauser, Adapted wavelet analysis: from theory to software, IEEE Press, New York, 1994

[12] J. D. Johnston, A filter family designed for use in quadrature mirror filter banks, Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. (1980) 291 - 294.