Development of a smart wavelet-based power quality monitoring system
Abstract
This paper presents the development of a Iow-cost smart digital meter for power quality assessment. The analysis of power quality (PQ) is done by means of the instantaneous disturbance index (ITD). It permits to detect and quantify nonstationary disturbances with high resolution and accuracy. This wavelet-based index is achieved by a specific algorithm programmed into a micro PC in Python. The effectiveness of the proposed prototype for PQ monitoring is validated using experimental tests that include events generated according to both Standards, the European EN-50160 and the IEEE 1159-2009.
Full text
Development of a smart wavelet-based power quality monitoring system Juan Carlos Bravo Electric engineering dept. University of Sevilla Sevilla, Spain [email protected] Maria Dolores Borrás Electric engineering dept. University of Sevilla Sevilla, Spain [email protected] Francisco Javier Torres Electric engineering dept. University of Sevilla Sevilla, Spain [email protected] Abstract— This paper presents the development of a lowcost smart digital meter for power quality assessment. The analysis of power quality (PQ) is done by means of the instantaneous disturbance index (ITD). It permits to detect and quantify nonstationary disturbances with high resolution and accuracy. This wavelet-based index is achieved by a specific algorithm programmed into a micro PC in Python. The effectiveness of the proposed prototype for PQ monitoring is validated using experimental tests that include events generated according to both Standards, the European EN- 50160 and the IEEE 1159-2009. Keywords—Smart metering, power quality monitoring, wavelet transform, digital signal processing. I. INTRODUCTION The massive use of electronic devices, both in domestic and industrial environments, has a direct and immediate impact on the electrical network in which they are connected. This fact generates the need for a power quality analysis (PQA) in the grid and facilities affected. Smart network sensors proposals are increasing rapidly trying to respond to these new requirements [1-11]. Their initial application limited to billing includes actually new features related to power quality detection (PQD). The detection of electrical disturbances with greater incidence in the grid can be made in different ways. In this paper, the use of a powerful mathematical tool such as the wavelet multi-resolution analysis (WMRA), with a proven applicability in this field, is proposed [12-23]. The aim of WMRA is to develop the representations of a complicated signal in terms of scaling and wavelet functions. This basis functions correspond to quadrature mirror filters [22-23]. The translation of the WMRA to the programming level is made through a complex algorithm [23] implemented in a low cost microcontroller. From this algorithm, it is possible to detect, analyze and classify different electrical disturbances in a more intuitive way. The proposed algorithm is defined in terms of a waveletbased power quality index (PQI), named instantaneous transient disturbance index (ITD). The present paper constitutes the practical implementation of a previous work in which this PQI was defined [14] [20-21]. The ITD integrally assesses the power transfer quality in steady-state as well as in transient situations. It has the advantage of evaluating the power quality (PQ) in real-time situations under whatever conditions, for any load in the grid and extracting the disturbance characteristics. PQ monitoring requires not only dedicated instruments and assessment algorithms but also standards fulfilling [24- 27]. Although most of commercial measurement equipment accomplish these standards, they are expensive and have not been designed to communicate or interact to each other. The exponential evolution of microcontrollers and micro PC'S and their application to signal processing, makes these devices exceptional candidates to cover the aforementioned PQD and PQA. Their communication features, data flux and storage capabilities can be used for smart metering purposes. The main contribution of this work is the development of a single-phase open architecture smart meter based on the Raspberry-Pi. This device is a credit-card-sized computer platform that permits the implementation of the WMRA algorithm, providing a high capability level for PQD and PQA. It also solves the important issue in smart metering of the graphical user interface (GUI), since it allows exchange of information with the user. In particular, the instrument has been designed to satisfy some exigencies that are not usually easy to find in a single instrument available on the market: PQ monitoring. Offline PQ evaluation. High sampling rate in the acquisition of voltage signal. Reasonable accuracy measurements (less than 2.5%). Processing and fully recording of voltage signals for a long span. Capacity to process advanced algorithms from WMRA. Significant PQ indexes and data storage capacity. Detection of single as well as multiplecombined disturbances. Connection to the Internet. Intercommunication between each other device available. Multiple graphical user interface options. To verify the correct operation of the developed smart meter, the fundamental component of the grid voltage presented in all the used test signals is distorted with harmonics and/or nonstationary events by a programmable power supply, in accordance with both, the IEEE Standard 1159-2009 and the European Standard EN-50160 [24-25]. The PQI have been obtained from a variety of these singlephase test signals.
II. THEORETICAL FOUNDATION A. Instantaneous Transient Disturbance Index (ITD) The main objective of this work is the analysis of PQ through wavelet transform (WT). For this task, as well as to detect and classify the disturbances that may exist in the electrical grid, it’s useful to introduce power quality indexes. The single-phase voltage signal is represented in terms of wavelet functions. In this work, Daubechies 4 mother function have been selected to expand the signal. The discrete version of the WT (DWT) is implemented using a Multiresolution Signal Analysis algorithm (WMRA) [20-21]. It decompose the given voltage signal into its constituent wavelet sub bands or levels (scales) with different time and frequency resolution, 1 ( ) ( ) ( ) Ka Ka k k v n a n d n (1) where j,Ka j,Ka 1 ( ) ( ) N Ka j a n a n and j, j, 1 ( ) ( ) N k k k j d n d n (2) Each of the signal scales represents that part of the original signal occurring at that particular time and in that particular frequency band. The WMRA is an adequate and reliable tool to detect signal sharp changes and clearly display high frequency transients. This method is suitable for quantifying power quality when detecting and measuring voltage sags, swells, transient overvoltage or flicker. The Instantaneous Transient Disturbance index (ITD) [14] [20-21] is defined as follows in terms of the time-scale distribution of the MRA components: 2 j, 2 k ITD( ) k k Kd k Ka d nA (3) 22 j, 1 1N kk j Aa N (4) where: N is the number of samples considered in Wavelet analysis. In this case, WMRA works with 2560 samples. j,k denote a time domain shift, and a frequency domain shift, respectively Kd designates the set of scale numbers corresponding to transient disturbance. In this case 1,2…6. Ka is the max scale number in Kd. Here, Ka = 6. dj,k symbolize the components of the Wavelet detail coefficients in each of the 6 levels considered: d1,d2… d6. Ak represents the RMS value of fundamental component. It corresponds to the RMS value of the coefficients in the a6 WMRA level. Thus, the RMS value of the complete voltage signal is calculated from: 6 22 j,6 , 1 11 j ms j k j rk NN V a d (5) The definition of the ITD can be seen as a “time-varying” power quality assessment determined by the time-frequency localized energy ratio of the disturbance events to the fundamental frequency energy. In this sense the definition of the ITD index plays the same role to the non-stationary events than the THD index to the stationary ones. It is important to note that when stationary events exist, the ITD index is only able to detect it, but cannot determine exactly which harmonic or group of harmonics are present. However, it is possible to identify the band of frequency in which harmonics are present. This is a direct result of using the wavelet time-frequency representation instead of the classical frequency spectrum. Note that in ITD, the energy of the disturbance is calculated not just from the harmonics but from all continuous frequencies. Transient disturbance parameters ITD can be used as individual transient quality expression given in percent values. A large amplitude transient disturbance may result in a large value of ITD. It can provide useful information about the time-varying signature of the transient disturbance for assessment purposes. The time-varying signature can be quantified as a single number, as in the case of steady state disturbances. Consequently, this quality index ITD can be interpreted as an evaluation of quality of electrical signal over time. It is determined by the quotient between energy of electrical disturbance and energy of the fundamental component in the time-frequency domain, when both energies are defined in terms of WT. III. DEVELOPED POWER QUALITY METER Figure 1 shows the final hardware prototype of the developed low cost smart meter (DLCSM). It includes the signal conditioning board, the acquisition board and ADC (Analog to Digital Converter) integrated into an Arduino DUE, and the processing stage corresponding to the micro PC Raspberry Pi 3. Fig. 1. Developed smart PQ monitoring system
The prototype is used to test PQ of single-phase signals with level voltage similar to the grid. The flowchart of the developed prototype, DLCSM, is shown in Figure 2. Programmable voltage source (Pacific Power Source Model 320) Signal conditioner A/D (Arduino Microcontroller) Processing system (Raspberry Pi 3) Personal Computer Fig. 2. Functional diagram of the developed smart meter A. Signal conditioning board The signal conditioning board (Figure 3) is designed to guarantee the adaptation of the acquired signal from the sensor to the input of the ADC. Thus, the standard 230 V RMS input AC voltage signal is taken to the required ADC input range of 0-3.3 V DC. Fig. 3. Signal conditioner board In a more specific way, the measured voltage signal must be positive valued in all cycles because ADC don’t read negative signal. For this reason an operational amplifier, type UA741CP, is introduced. This circuit component configures a non-inverting summing amplifier providing the proper offset of 1.7 V. In the software stage, this offset value must be taken into account to adjust the gain of the voltage signal recovery block. This operational amplifier introduces a ±15 V extra direct current (DC) supply requirement satisfied with a voltage transform, type Block 230 V AC/ 2x 15 V AC 2.3 VA, a diode bridge rectifier, type W08G-04 800V, two lineal voltage regulators of +15 V and -15 V, type L7815CV and L7915CV respectively, and suitable filter capacitors. Of this form, in this work it obtains a DC supply for hardware elements. In order to prevent damages to the ADC, the output of the operational amplifier is protected with a fuse of 32 mA and a Zener diode of 3,3 V. An RC low pass filter constitutes the antialiasing filter with a cut-off frequency of 6400 Hz. B. Hardware Implementation The microcontroller selected is Arduino DUE. This device is used for signal acquisition by using an analog-to- digital converter (ADC) capable to send these data by serial port. Their main requirements are the ability to sample rightly the adapted voltage signal and also the facility to send these data by serial port to another processing small-single- board computer. Microcontroller used in this prototype has 12 analog inputs with a resolution of 12 bits and a measurement range of 0-3.3 V. According to Nyquist-Shannon theorem, the minimum sample rate to obtain up to the 50th harmonic (2500 Hz) is 5 kHz. However, in this work it is necessary a higher sample rate in order to describe correctly signals with oscillatory transients up to 6400 Hz. Moreover, it is needed to obtain 10 cycles of voltage signal and 256 samples per cycle. For this reason, the sample rate used is 12.8 kHz. Digital data from the ADC output are sent to the inexpensive computer Raspberry Pi 3. This sending is carried out through serial port as well as USB port with a bit rate of 2400 bits per seconds (bps). The microcomputer has to receive and process the data. This reception is carried out with same bps rate that the sending of data. After that, the software in Raspberry Pi 3 is used for processing and monitoring the signal to detect electrical disturbances with WT. C. Software Implementation Software stage has two steps: The first in Arduino microcontroller and the second in Raspberry Pi 3 microcomputer. The Arduino microcontroller software configures the ADC and serial communication, read data from ADC with the desirable bit sample rate, and send this data by serial communication port. Figure 4 shows the flowchart of Arduino microcontroller software. START Setup of ADC and Serial Communication Acquire voltage signal. Sample rate: 12800 Hz 2560 samples (10 period) ? Send data for serial port NO YES Fig. 4. Flowchart of Arduino software
The software developed on the Raspberry Pi 3 deals with most of the hard work of data computing. Figure 5 shows the corresponding software flowchart working on this low cost device. It processes the data and calculates RMS voltage value, ITD index and WT by using a recursive wavelet analysis [23]. Algorithms are programed in Python 3. In addition, using the facilities of the graphical user interface, the device permits to show waveform graphs of disturbances, levels of transform, ITD index and RMS voltage value. These graphs are depicted in PC with the help of the virtual desktop of Raspberry Pi via SSH connection. START Serial communication configuration Delay All data in serial port ? Read data NO YES Processing data (Wavelet transform and ITD index) Show ITD index Fig. 5. Flowchart of Raspberry Pi software IV. EXPERIMENTAL RESULTS In order to evaluate the proposed meter (DLCSM) in different voltage disturbed conditions, some test experiments are introduced. Thus, the experimental results are based on the creation of several distorted electrical voltage signals. They add to the fundamental component of the grid voltage certain electrical events generated according to the UNE-EN 50160 standard. All of them have been designed with the programmable voltage source Pacific Power Source, Model 320. This source can emulate sinusoidal grid voltages added with single or multiple disturbances. The test electrical disturbances considered are: Oscillatory transients. Voltage sags. Temporary swells. Transients swells. Voltage interruptions. Notches. To validate the measurements obtained by DLCSM, they are compared with those from PowerXplorerTM PX5, a wellestablished power quality meter/monitor manufactured by Dranetz-BMI. This comercial device is designed to meet both the IEEE 1159 [24] and IEC 61000-4-30 [25] Class A standards for accuracy and measurement requirements. By this way, the ability for detecting electrical events offered by the proposed ITD index is checked. Next, some of the most illustrative experiments are presented. A. Test 1: Transients swells In the electrical networks, there are different single PQ disturbances applied to linear and nonlinear loads. One of the most relevant are short duration voltage transients, due to their economic impact in the equipment connected to the mains network in both, domestic and industrial environment. Thus, in this first experimental test, the voltage signal only adds a transient swell (Figure 6). This single event has a peak value of 58 V and a duration of 2 ms. This signal attends to determine the device's capability to detect fast disturbances. Fig. 6. Transient swell event The corresponding ITD index representation is depicted in Figure 7. It can be seen how the ITD(t) shows precisely the instantaneous character of the detected disturbance, noting suddenly the relevance of any quick change introduced. Fig. 7. ITD index of transient swell event B. Test 2: Voltage sag and oscillatory transient. In the electrical networks, there are different single and multiple-combined PQ disturbances applied to linear and nonlinear loads. Due to this, it is necessary to verify if the
designed device can detect various disturbances acting together. For this purpose, two electrical disturbances joined in the same sampled observation window are considered. In this test, the relevant disturbances considered are a voltage sag and an oscillatory transient. This case is depicted in Figure 8. Fig. 8. Voltage sag and oscillatory transient event The voltage signal has 2560 samples (200 ms) in the window. The voltage sag and oscillatory transient of 1 kHz time duration are 60 ms and 20 ms, respectively. Once the ITD index is obtained it is possible to measure and to detect the added events. The ITD index graph of this mix-event voltage signal is shown in Figure 9. It can be seen that ITD assessment is consistent with the energy distribution into the signal. Fig. 9. ITD index of voltage sag and oscillatory transient event Moreover, this quality index is capable to determine the beginning and end of a disturbance, consequently, the ITD permits to detect the event and quantify its duration with high accuracy. The determination of such time interval is fundamental for classification purposes [20-21], and can be simply obtained by subtracting the time location between contiguous maximum peak values of the ITD(n). Table I summarizes a comparison between the designed system (DLCSM) and the commercial meter PX5. This is done based on both the true-rms and event duration measurement. Observe that only single events are shown in this table because the results are similar when multiple events are considered. As it can be seen, the relative error is less than 2% for voltage rms measurements, and less than 2.5% for event duration readings. TABLE I. COMPARATIVE RESULTS DLCSM PX5 Ꜫr (%) Vrms (V) t (ms) Vrms (V) t (ms) Vrms t Sag 102.17 61.33 104.21 60.26 1.96% 1.78% Oscillatory transient 116.34 20.52 118.16 20.04 1.54% 2.40% Transient swell 115.67 2.04 116.31 2.01 0.55% 1.49% V. CONCLUSIONS The developed PQ smart meter based on wavelet techniques is an effective device to verify the behavior of the instantaneous index ITD used. This wavelet-based PQ index permits to consider two quality aspects of the electrical signal: steady-state power quality relative to harmonic level, and the non-stationary index relative to oscillatory transients or sudden amplitude changes in the signal. The WMRA-based algorithms that conform the ITD index are translated into an inexpensive microcomputer, the Raspberry Pi-3, in the programming language Python 3. The selected single-board computer guarantees data communication with wireless LAN and Bluetooth connectivity, and provides a suitable graphical user interface (GUI) for monitoring purposes. The effectiveness of the smart meter is checked with relevant and typical disturbed single-phase voltage signal adding single events as well as multiple-combined disturbance signals. The resultant measurements are evaluated by comparison with a commercial meter. REFERENCES [1] A. Moreno-Munoz, J. A. Sanchez, J. J. G. de la Rosa and J. J. Luna, "Application of smart sensors to the measurement of power quality," 2008 IEEE Instrumentation and Measurement Technology Conference, Victoria, BC, 2008, pp. 218-222. [2] M. M. Albu, M. Sănduleac and C. Stănescu, "Syncretic Use of Smart Meters for Power Quality Monitoring in Emerging Networks," in IEEE Transactions on Smart Grid, vol. 8, no. 1, pp. 485-492, Jan. 2017. [3] G. Aurilio, D. Gallo, C. Landi, M. Luiso and G. Graditi, "A low cost smart meter network for a smart utility," 2014 IEEE International Instrumentation and Measurement Technology Conference (I2MTC) Proceedings, Montevideo, 2014, pp. 380-385. [4] E. J. Palacios-García et al., "Smart metering system for microgrids," IECON 2015 - 41st Annual Conference of the IEEE Industrial Electronics Society, Yokohama, 2015, pp. 003289-003294. [5] E. Kabalci, "Emerging smart metering trends and integration at MVLV level," 2016 International Smart Grid Workshop and Certificate Program (ISGWCP), Istanbul, 2016, pp. 1-9. [6] L. Tomesc, P. Dobra, M. Abrudean, “Low-cost Power Quality analyzer”, 2007 IFAC Proceedings Volumes, , vol. 40, no. 8, Cluj- Napoca (Romania)2007, pp. 157-162. [7] M. Music, N. Hasanspahic, A. Bosovic, D. Aganovic and S. Avdakovic, "Upgrading smart meters as key components of integated power quality monitoring system," 2016 IEEE 16th International Conference on Environment and Electrical Engineering (EEEIC), Florence, 2016, pp. 1-6. [8] F. G. Montoya, A. Alcayde, P. Sánchez, J. Gómez and F. Martín, "zEnergy: An open source project for power quality assessment and monitoring," 2011 International Conference on Power Engineering, Energy and Electrical Drives, Malaga, 2011, pp. 1-6. [9] S. Yaemprayoon, V. Boonplian and J. Srinonchat, "Developing an innovation smart meter based on CS5490," 2016 13th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON), Chiang Mai, 2016, pp. 1-4.
[10] Y. Thongkhao and W. Pora, "A low-cost Wi-Fi smart plug with onoff and Energy Metering functions," 2016 13th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON), Chiang Mai, 2016, pp. 1-5. [11] Q. Sun et al., "A Comprehensive Review of Smart Energy Meters in Intelligent Energy Networks," in IEEE Internet of Things Journal, vol. 3, no. 4, pp. 464-479, Aug. 2016. [12] S. Santoso, E. J. Powers, W. M. Grady and P. Hofmann, "Power quality assessment via wavelet transform analysis," in IEEE Transactions on Power Delivery, vol. 11, no. 2, pp. 924-930, Apr 1996. [13] D. Borras, M. Castilla, N. Moreno, and J. C. Montano, “Wavelet and neural structure: A new tool for diagnostic of power system disturbances,” IEEE Trans. Ind. Appl., vol. 37, no. 1, pp. 184–190, Jan./Feb. 2001. [14] J. C. Montaño, D. Borrás, J. C. Bravo, "Power-quality factor for electrical networks" in Power Quality: Mitigation Technologies in a Distributed Environment, New York, NY, USA: Springer, pp. 353- 377, 2007. [15] M. D. Borrás, J. C. Montaño, M. Castilla, A. López, J. Gutiérrez, J. C. Bravo, "Voltage index for stationary and transient states," Melecon 2010 - 2010 15th IEEE Mediterranean Electrotechnical Conference, Valletta, 2010, pp. 679-684. [16] T. Zafar and W.G. Morsi, “Power quality and the un-decimated wavelet transform: An analytic approach for time-varying disturbances,” Elect.Power Syst. Res., vol. 96, pp. 201–210, Mar. 2013. [17] S. M. A. Bhuiyan, J. Khan and G. Murphy, "WPD for Detecting Disturbances in Presence of Noise in Smart Grid for PQ Monitoring," in IEEE Transactions on Industry Applications, vol. 54, no. 1, pp. 702-711, Jan.-Feb. 2018. [18] F. Ucar, O.F. Alcin, B. Dandil, F. Ata, “Power Quality Event Detection Using a Fast Extreme Learning Machine.” Energies, vol. 11, no. 145, pp. 1-14, Jan. 2018. [19] K. Thirumala, M. S. Prasad, T. Jain and A. C. Umarikar, "Tunable-Q Wavelet Transform and Dual Multiclass SVM for Online Automatic Detection of Power Quality Disturbances," in IEEE Transactions on Smart Grid, vol. 9, no. 4, pp. 3018-3028, July 2018. [20] M. D. Borrás, J. C. Bravo and J. C. Montaño, "Disturbance Ratio for Optimal Multi-Event Classification in Power Distribution Networks," in IEEE Transactions on Industrial Electronics, vol. 63, no. 5, pp. 3117-3124, May 2016. [21] M. D. Borrás, “Contribuciones a la calidad de la señal eléctrica basadas en wavelets e inteligencia artificial”. PhD thesis, University of Sevilla, Sevilla, 2016. [22] F. B. Costa, "Fault-Induced Transient Detection Based on Real-Time Analysis of the Wavelet Coefficient Energy," in IEEE Transactions on Power Delivery, vol. 29, no. 1, pp. 140-153, Feb. 2014. [23] F. B. Costa, “Uma técnica de diagnóstico em tempo real de distúrbios transitórios baseada na Transformada Wavelet para uso em registradores digitais de perturbação”, Ph. D. dissertation, Federal University of Campina Grande, Campina Grande, Brazil, 2010. [24] IEEE Recommended Practice for Monitoring Electric Power Quality, IEEE Standard 1159–2009, Jun. 2009. [25] Voltage Characteristics of Electricity Supplied by Public Distribution Networks, Eur. Standard EN-50160, 2011. [26] IEEE Trial-Use Standard Definitions for the Measurement of Electric Power Quantities Under Sinusoidal, Non-Sinusoidal, Balanced or Unbalanced Conditions, IEEE Standard 1459-2010, 2010. [27] Testing and Measurement Techniques—Power Quality Measurement Methods, IEC Standard 61000-4-30, 2008.