MULTIFUNCTION POWER QUALITY MONITORING SYSTEM V. Matz, T. Radil and P. Ramos Department of Measurement, FEE, CVUT, Prague, Czech Republic Instituto de Telecomunicacoes, IST, UTL, Lisbon, Portugal Abstract In this paper a new power quality monitoring (PQM) system for detection and classification of power quality voltage disturbances is presented. The implementation of the proposed PQM system in a graphical user interface (GUI) is also presented. The wavelet transform (WT) is used for de-noising and detection of the disturbances on power voltage line. Detected disturbances are separated using binary morphology feature extraction and classified according to the PQ disturbances definitions. The classification process is based on the disturbances knowledge base of the expert system. The considered PQ disturbances are: voltage sag, voltage swell, interruption, transient, voltage drop, noise and harmonics. The disturbances characteristics are considered according to IEEE standard 1159-1995. Also other characteristics as RMS value, frequency, time localization, duration and amplitude are considered. The proposed approach was implemented in Matlab and a GUI was created for easily controlling and automating classification of PQ disturbances. The proposed system consists of two GUI windows one for data simulation and acquisition and the second for the de-noising, detection and classification of simulated or acquired PQ disturbances. With the proposed GUI system it is possible to automatically classify simulated and measured PQ disturbances on power voltage line. 1 Introduction Power quality (PQ) monitoring is becoming an important part of utility services in recent years. Many of the PQ concerns are associated with the operation and design of customer facilities, wiring and grounding problems, switching transients, load variations and harmonic distortions of voltage and current waveforms. The PQ study involves an important step, the monitoring of the actual voltage waveform and detection of the disturbances which appear during this monitoring. Detected disturbances are subsequently classified and information describing localization, duration and type of disturbance is reported. Several automatic systems for the detection and classification of PQ disturbances have been proposed [1] - [4]. These systems are based on neural networks [1] with wavelet transform based feature extraction. Most of them are based on time - frequency representation (wavelet transform and short time Fourier transform) [2] and fuzzy expert system. The detection process is mainly based on the wavelet transform. The classification process uses methods based on pattern recognition classifiers i.e. support vector machines [3]. Present research in area of PQ monitoring is an open problem because on-line PQ monitoring system for detection and classification is still missing. In this paper graphical user interface for monitoring, detection and classification of PQ disturbances is proposed. In general, the proposed approach can be described according to Fig. 1. The first block is the data acquisition (DAQ) of the voltage power line. Measured voltage is filtered using stationary wavelet transform (SWT) and detection of disturbances based also on SWT is performed. Detected PQ disturbances are processed with binary morphology feature extraction and finally classified with expert system knowledge base proposed according to IEEE standard 1159-1995 [5]. The classification of PQ disturbances as voltage sags, voltage swells, voltage drops, interruptions and transients is considered. Full classification process was integrated to GUI in Matlab system. With the GUI, it is possible to measure and simulate almost all PQ 1
disturbances on power line and classify them to the appropriate class. In this work wavelet toolbox, signal processing toolbox and data acquisition toolbox were used. Segmentation 50 000 samples SWT Filtering SWT events detection RMS Feature extraction Binary Morphology Envelope of the signal + normalization Classification Positive part - SWELL - TRANSIENT Negative part + - - SAG - INTERRUPTION Decision making - SAG - SWELL - TRANSIENT - INTERRUPTION - duration, amplitude DAQ RMS comparison RMS estimation Frequency estimation IpDFT THD estimation RMS Harmonics Frequency Noise Localization, duration, amplitude Saving of event Sag, S well, T ransient, Interruption Fluctuation Figure 1: PQ monitoring system block diagram 2 Detection and Classification DSP Methods 2.1 Wavelet transform based filtering and event detection The wavelet transform is a multiresolution analysis technique that can be used to obtain a time-frequency representation of a signal. In addition to the discrete wavelet transform (DWT), there are many extensions of the basic wavelet transform principle, of which the stationary wavelet transform (SWT) and wavelet packets (WP) are most used for de-noising purposes. In summary, the SWT [7] method can be described as follows: at each level, when the high-pass and low-pass filters are applied to the data, the two new sequences have the same length as the original sequences. To achieve this, the original data is not decimated. For the stationary transform instead of downsampling, an upsampling procedure is carried out before performing filter convolution at each scale. The discrete approximation c j,k and discrete detail signal ω j,k at resolution 2 j at step j are obtained by c j+1,k = l h l c j,k+2 j l, ω j+1,k = l g l c j,k+2 j l (1) where h l and g l are the coefficients of the low-pass and high-pass filters applied at each level of decomposition. The redundancy of this transform facilitates the identification of salient features in a signal, especially for noise recognition. The de-noising procedure can be described as follows: decomposition of the input signal with noise into N levels of the approximations and detailed coefficients, using the stationary wavelet transform, thresholding of detailed coefficients, reconstruction of the signal using approximations and thresholded detailed coefficients by means of the inverse transform. 2
In this paper the SWT is used for de-noising of power voltage and also for the detection of the disturbances. Main difference is in the decomposition of the input signal. In the case of de-noising the signal is decomposed up to the 4 th level and all coefficients under the threshold level are suppressed (hard thresholding). In the detection process, the decomposition is only up to 1 st level and the coefficients above the threshold level are considered as features of disturbance and are marked as disturbances. 2.2 Binary morphology Mathematical morphology offers a broad set of signal processing operations that can process signals based on their shapes. Morphological operations [6] apply a structuring element to an input signal, creating an output signal of the same size. The most basic morphological operations are dilatation and erosion. In a morphological operation, the value of each sample in the output signal is based on a comparison of the corresponding sample in the input signal with its neighbors. By choosing the size and shape of the neighborhood, one can construct a morphological operation that is sensitive to specific shapes in the input signal. Dilatation is defined as: A B = (c c = a + b a ɛ A and b ɛ B) (2) where A is the input signal and B is the structuring element. The value of the output sample is the maximum value of all the samples in the input sample s neighborhood. Erosion is defined as: A B = (x x + b ɛ A b ɛ B) (3) The value of the output sample is the minimum value of all the samples in the input sample s neighborhood. A composed morphological operation closing is used. The function closing consists of dilatation followed by erosion with the same structuring element. Binary morphology is used for obtaining the maximum and minimum values of an envelope that are used as features for the decision making with an expert system. The structuring element is a unit vector that has the same length as one period of the measured voltage line signal. 2.3 Decision making based expert system By definition, an expert system is a computer program that simulates the thought process of a human expert in order to solve complex decision problems in a specific domain. In general, an expert system is a system with a knowledge base (membership function) that makes the decision. In expert systems the membership function is very important, it is a graphical representation of the magnitude of participation of each input. It associates a weighting with each of the inputs that are processed, defines functional overlaps between inputs, and ultimately determines an output response. The rules use the input membership values as weighting factors to determine their influence on the output sets of the final output conclusion. The membership function defines the rules for the decision making of the analyzed problem. 3 Multifunction GUI 3.1 Data acquisition A system for the monitoring of the power line was developed and constructed. This system (see Fig. 2) consists of a sensor box, data acquisition board (DAQ) and PC. The sensor box contains a current transducer (LA 25 - NP) and a voltage transducer (LV 25 - P). In our work only the voltage sensor was used for the measurement of disturbances on power line. The data acquisition board that was used, is a National Instruments USB - 9215 that offers 16-bit resolution and sampling frequency up to 100 ks/s. Because of data length and a memory space, the optimal sampling frequency for continuous monitoring was set to 50 ks/s. The sensor box was connected to the power line, the signal was 3
Power line DAQ NI - 9215 USB V PQM GUI PC L N I Sensor box Figure 2: GUI window for measurement and simulation of PQ disturbances sampled using DAQ and recorded in PC where the signal was de-noised and the disturbances were detected. The proposed PQ monitoring system was used for the measurement of real disturbances in the power line. 3.2 Measurement and simulation of PQ disturbances The proposed digital signal processing methods were used for the detection and classification of PQ disturbances on power voltage line. All the proposed methods were integrated in the GUI window. For the implementation, the data acquisition, signal processing, image processing and wavelet toolboxes were used. The GUI consists of the main window (Fig. 3), where user can measure and simulate PQ disturbance. In the first part, which can be called Measurement, it is possible to measure continuously or in defined time intervals. The sampling frequency of the USB board NI-9215 can be changed between 5 and 100 ks/s. In the second part called Artificial signal, the user can simulate typical PQ disturbances. First of all, the basic parameters of a pure sine wave can be set: frequency of the signal f, sampling rate f s, length of signal (samples), harmonic amplitude A i, noise level and phase ϕ i. The basic equation that generates signals with three harmonics is defined by x(t) = A 1 cos(ωt + ϕ 1 ) + A 2 cos(nωt + ϕ 2 ) + A 3 cos(mωt + ϕ 3 ) + noise. (4) The first harmonic is preset while the two others (M,N) can be set. Two basic types of noise can be simulated: uniform noise or noise with Gaussian distribution (white noise). IEEE standard 1159-1995 defines that 1% level of noise is not considered as disturbance. The main PQ disturbances defined in IEEE standard 1159-1995 are voltage sags, voltage swells, interruptions, transients (momentary and oscillatory - capacitor switching) - all can be simulated. In all PQ disturbances their position can be chacked. Both sudden and gradual (with both rising and falling edge) voltage sags and swells can be simulated and the parameters as duration and amplitude level can be set according to IEEE standard. If the parameters such as duration are out of the IEEE standard definition the error message will appear and user will be alerted to make changes in the parameters. This is strictly considered by reason of standard definitions. The interruptions offer the same settings as voltage sags and swells excluding of gradual voltage drop. Other PQ disturbances as transients, capacitor switching and notching offer typical settings that are important for disturbance simulation. The main advantage of the simulation, is that more PQ disturbances can be simulated in one signal. It means that one signal can contain more disturbances and these can be overlapped. For both simulated and measured signals, basic characteristics such as frequency and root mean square (RMS) are also estimated. For the frequency estimation, two methods: interpolated discrete Fourier transform (IpDFT) and sine fitting [8] are used. These are the most accurate and should be used in power line monitoring. The average RMS and average frequency is calculated and a number of periods, samples for RMS and frequency estimation can be set. Both measured 4
Figure 3: GUI window for measurement and simulation of PQ disturbances and simulated signals with the estimated parameters can be saved on the PC hard drive. 3.3 Detection and classification of PQ disturbances Both measured and simulated PQ disturbances are classified to the appropriate class according to the IEEE standard. This is accomplished in the second GUI window that appears by clicking on panel button Classification. In this GUI window (Fig. 4), methods for the detection and classification are performed. First, the signal has to be loaded. After loading, all information such as frequency, sampling frequency, RMS value and the length of the signal are displayed. This GUI window can be divided to the two main parts. The first part is the manual classification where the de-noising, detection and classification processes are manually performed step by step. Another part is the automated classification where by clicking one button all results are displayed. The following procedure describes the manual classification. In the first process, called SWT FILTERING, the signal is de-noised. This is done because the signal can contain an undesirable level of noise that can mask events. For the de-noising, SWT up to N th decomposition level can be used. The main problem in SWT de-noising is choosing the proper mother wavelet and thresholding rule. The user can choose the following mother wavelets: Haar (haar), Deubechie (db), discrete Meyer (dmey) and Coiflet (coif). The threshold rule can be derived or the exact value can be set. For automatical classification, the threshold level based on standard deviation at each level of decomposition was used: thr = k 1 N (Dc i Dc) N 1 2 (5) where k is a coefficient related to the crest factor (ratio of the peak value to the RMS value) of filtered signal, Dc are detail coefficients at each level and N is the length of each set of i=1 5
detailed coefficients. Wavelet toolbox offers two kinds of thresholding: hard or soft. In hard thresholding, coefficients with absolute values lower than the threshold are set to zero, while soft thresholding substracts the threshold level from the coefficients above threshold level. Soft thresholding avoids spurious oscillations, while hard thresholding typically yields a smaller mean square error. In the developed GUI, both threshold rules can be used. By applying the SWT filtering the signal can be successfully de-noised. The de-noised signal is shown in the top-right plot. Another part called SWT DETECTION is the disturbance detection. The detection process uses only one level decomposition. The detailed coefficients above the threshold level indicate the presence of the disturbance. The same mother wavelet and the same threshold level as in the case of SWT filtering are used. If the signal contains disturbances, they are indicated and up to three disturbances can be classified. Then, the user can choose which one to classify. The results (detailed coefficients) with the threshold level after the SWT detection are displayed in left-middle plot. Figure 4: GUI window for detection and classification of PQ disturbances The next part, called FEATURE EXTRACTION is the binary morphology based feature extraction. The function closing is used and envelope of the signal is estimated. The binary morphology indicates the disturbances in the following manner: First, the envelope is normalized to zero level and the minimum and maximum levels of the envelope are derived. If the maximum level is positive, this characterizes the disturbance as voltage swells or transients. On the other hand when the minimum level is negative, the disturbances are voltage sags or interruptions. The features are the corresponding positive and negative values. The minimum, maximum and envelope are used for the decision making in the CLASSIFICA- TION based on the knowledge base of the expert system. The knowledge base is constructed according to the definitions of the IEEE standard. The maximum and minimum value corresponds to the percentage level of disturbances and according to the percentage value these are classified. The envelope is used to estimate the duration of the disturbance the number of positive or negative samples indicate duration. The amplitude, duration, harmonics and noise presence are reported in this part. The noise presence is derived by comparing of the RMS values of the measured/simulated and filtered signal. The noise presence can be considered as the difference between the RMS values of the measured and filtered signal. The harmonics are 6
derived based on the total harmonic distortion (THD) where the THD of the measured signal is calculated. If the THD is higher than zero, it characterize the harmonics presence. The detail of the disturbance is displayed in the figure and the mentioned basic characteristics are reported in this part. Another part of this GUI window is the AUTOMATED DETECTION & CLASSIFICA- TION. It consists of the same signal processing methods (SWT de-noising, SWT detection, binary morphology feature extraction and expert system classification) but the final information about the detected and classified disturbance are directly reported. Here the user can not set any parameters. These are set based on the numerical simulations of each method. In the SWT de-noising the Deubechie s mother wavelet and threshold based on standard deviation are used. The decomposition level was experimentally set to 4. In the case of SWT detection the decomposition up to the 1 st level with the same Deubechie s mother wavelet is used. The binary morphology function closing uses as structuring element an unit vector with the length of one period of the signal (1000 samples). The knowledge base of expert system is proposed according to the IEEE standard definitions. Pressing the Detect and classify button all informations about the signal are displayed. These are: average RMS value, average frrequency, noise and harmonic presence and status about event detection. If the disturbance is detected, the type of disturbance, amplitude and duration is reported. In this window user can see the basic parameters of the measured or simulated signal. The GUI is used as the stand-alone application and is useful for the automated detection and classification of power quality voltage disturbances on power line. 4 Conclusion This paper presents a new robust automated graphical user interface for detection and classification of power voltage line disturbances. The system consists of two GUI windows, one for measurement and simulation and another one for the detection and classification of of PQ disturbances. The system consists of de-noising of the power voltage based on the SWT, detection of PQ disturbances based on the SWT and classification based on the binary morphology and expert system. All PQ disturbances are classified according to IEEE standard 1159-1995. The classified disturbances are displayed and basic characteristics as localization, duration and amplitude level are reported. In the monitored power voltage line, the average RMS, average frequency, harmonics and noise are considered and also reported. Because the system performance is very fast (the SWT decomposition only to 1st level is used) and accurate it will be implemented in DSP prototype in the future. 5 Acknowledgement Work sponsored by the Portuguese national research project reference POSC/EEA-ESE/57708/2004 entitled Fast and accurate power quality measurements using analog to digital converters and digital signal processing techniques. The work developed by Vaclav Matz in Portugal was sponsored by a ERASMUS scholarship. References [1] Zwe-Lee Gaing: Wavelet-based neural network for power quality disturbance recognition and classification. IEEE Trans. on Power Delivery,19(4):1560 1568, October 2004. [2] M. Wang, G. I. Rowe, and A. V. Manishev: Classifcation of power quality events using optimal time-frequency representations, theory and application. IEEE Trans. on Power Delivery,19(3):1496 1503, July 2004. 7
[3] Feng-Feng Zhu, Guo-Sheng Hu, Jing Xie: Classification of power quality disturbances using wavelet and fuzzy support vector machines. Proceedings of Fourth International Conference on Machine Learning and Cybernetics, Guangzhou, p. 3981 3984, August 2005. [4] E. Styvaktakis, Math H. J. Bollen, and Irene Y. H. Gu: Expert System for Classification and Analysis of Power System Events. IEEE Trans. on Power Delivery, 16(3):423 428, July 2001. [5] IEEE Std. 1159-1995, IEEE Recommended Practice for Monitoring Electric Power Quality. The Institute of Electrical and electronics Engineers, Inc., December 1995. [6] J.-G. Postaire, R.D. Zhang, C. Lecocq-Botte: Cluster analysis by binary morphology. IEEE Transactions on Pattern Analysis and Machine Intelligence, 15(2):170-180, February 1993. [7] G. P. Nason and B. W. Silverman: The stationary wavelet transform and some statistical applications. Department of Mathematics, University of Bristol, University Walk, Bristol, 1995. [8] V. Matz, P. M. Ramos, N. B. Bras and A. C. Serra: A Comparative Evaluation Between Frequency Estimation Algorithms for Power Quality Assesment in DSP Implementation. XVIII IMEKO World Congress, Metrology for a Sustainable Development, September 2006. V. Matz CTU, FEE, Department of Measurement, Technicka 2, 166 27, Prague 6,Czech Republic. Phone: +420-22435 2346, e-mail: matzv@fel.cvut.cz T. Radil Instituto de Telecomunicacoes, Av. Rovisco Pais 1, 1049-001 Lisbon, Portugal. e-mail: tomas.radil@lx.it.pt P. Ramos Instituto de Telecomunicacoes and Department of Electrical and Computer Engineering, Instituto Superior Tcnico, Technical University of Lisbon, IST, Av. Rovisco Pais 1, 1049-001 Lisbon, Portugal. Phone: +351-218418485, e-mail: Pedro.Ramos@Lx.it.pt 8