ON THE USE OF MULTI-HARMONIC LEAST-SQUARES FITTING FOR THD ESTIMATION IN POWER QUALITY ANALYSIS

Similar documents
We are IntechOpen, the world s leading publisher of Open Access books Built by scientists, for scientists. International authors and editors

Power Quality Analysis Using An Adaptive Decomposition Structure

A REVIEW OF THE NEW AUSTRALIAN HARMONICS STANDARD AS/NZS

Lecture-3 Amplitude Modulation: Single Side Band (SSB) Modulation

COMPUTATION OF THE NETWORK HARMONIC IMPEDANCE WITH CHIRP-Z TRANSFORM

Calculation of Antenna Pattern Influence on Radiated Emission Measurement Uncertainty

Loading transformers with non sinusoidal currents

ON THE IMPACT OF RESIDUAL CFO IN UL MU-MIMO

Power Quality Issues, Problems and Related Standards Avinash Panwar1,ASSISTANT PROFESSOR, MADHAV UNIVERSITY ABU ROAD INDIA

Application of two-stage ADALINE for estimation of synchrophasor

PQ Monitoring Standards

Design of Electrical Parameter Measurement System for Three Phase AC Motor Based on STM32

MULTIFUNCTION POWER QUALITY MONITORING SYSTEM

DSP Based Power Quality Analyzer

On the relation between radiated and conducted RF emission tests

ENGINEERING RECOMMENDATION G5/5

ON TWO-PLANE BALANCING OF SYMMETRIC ROTORS

Abstract 1. INTRODUCTION

ANALYSIS OF HARMONIC DISTORTION LEVELS ON A DISTRIBUTION NETWORK

Effects of Harmonic Pollution on Three-Phase Electrical Motors

5.3 Sum and Difference Identities

POWER QUALITY (PQ) monitoring has become an important

Research on harmonic analysis and Simulation of grid connected synchronous motor Jian Huang1,a, Bingyang Luo2,b

Published in: Proceedings of 8th Annual IEEE Energy Conversion Congress & Exposition (ECCE 2016)

DWT ANALYSIS OF SELECTED TRANSIENT AND NOTCHING DISTURBANCES

Energy Savings with an Energy Star Compliant Harmonic Mitigating Transformer

Measurement Time Optimization of Impedance Spectroscopy Techniques Applied to a Vibrating Wire Viscosity Sensor

ON THE BIAS OF TERMINAL BASED GAIN AND OFFSET ESTIMATION USING THE ADC HISTOGRAM TEST METHOD

DYNAMIC BEAM FORMING USING CHIRP SIGNALS

Unit 5 Waveguides P a g e 1

Punctured Binary Turbo-Codes with Optimized Performance

A POWER QUALITY INSTRUMENT FOR HARMONICS INTERHARMONICS AND AMPLITUDE DISTURBANCES MEASUREMENTS

Damping Algorithm based on Phasor Estimation

Analysis of High Neutral Currents and Harmonic Impacts on Losses and Capacities of Distribution Transformers

Spectrum Sharing with Multi-hop Relaying

Cooperative Request-answer Schemes for Mobile Receivers in OFDM Systems

SIGNAL PROCESSING OF POWER QUALITY DISTURBANCES

Image Feature Extraction and Recognition of Abstractionism and Realism Style of Indonesian Paintings

Modelling Capture Behaviour in IEEE Radio Modems

Machine Vision System for Automatic Weeding Strategy in Oil Palm Plantation using Image Filtering Technique

Estimation of Dielectric Constant for Various Standard Materials using Microstrip Ring Resonator

CAPACITY OF MULTIPLE ACCESS CHANNELS WITH CORRELATED JAMMING

ELEC 546 Lecture #9. Orthogonal Frequency Division Multiplexing (OFDM): Basic OFDM System

HIGHLY ACCURATE CALIBRATION SYSTEM FOR ELECTRONIC INSTRUMENT TRANSFORMERS

Power quality as a reliability problem for electronic equipment

A Filtering Scheme for Reducing Harmonics Penetration into Transmission Systems (V1.0)

Channel Estimation Filter Using Sinc-Interpolation for UTRA FDD Downlink

Overview of MIMO Radio Channels

Research on Three-level Rectifier Neutral-Point Voltage Balance. Control in Traction Power Supply System of High. Speed Train

VARIABLE-FREQUENCY PRONY METHOD IN THE ANALYSIS OF ELECTRICAL POWER QUALITY

Grid Filter Design for a Multi-Megawatt Medium-Voltage Voltage Source Inverter

Modelling and Control of Gene Regulatory Networks for Perturbation Mitigation

Optimal DG Placement and Sizing in Distribution System for Loss and THD Reduction

IMAGE ILLUMINATION (4F 2 OR 4F 2 +1?)

Image Reconstruction Based On Bayer And Implementation On FPGA Sun Chen 1, a, Duan Xiaofeng 2, b and Wu Qijing 3, c

Performance analysis and comparison of m x n zero forcing and MMSE equalizer based receiver for mimo wireless channel

School of Electrical and Computer Engineering, Cornell University. ECE 303: Electromagnetic Fields and Waves. Fall 2007

A Guide for the Assessment and Mitigation of Bleed, Gloss Change, and Mold in Inkjet Prints During High-humidity Conditions

Detection and Identification of PQ Disturbances Using S-Transform and Artificial Intelligent Technique

Polyphase Filter Approach for High Performance, FPGA-Based Quadrature Demodulation

This study concerns the use of machine learning based

Fundamentals of Power Quality

Distribution Transformer Losses Evaluation under Non-Linear Load

Modeling and Characterization of Leakage Inductances for Transformer Winding Fault Studies

Aalborg Universitet. Published in: IET Power Electronics. DOI (link to publication from Publisher): /iet-pel Publication date: 2018

Compatibility and Safety Volume for Electromagnetic Exposure Limits in Shared Sites for 2G and 3G Wireless Communications

LOADING OF TRANSFORMERS BEYOND NAMEPLATE RATING

Complex-valued restricted Boltzmann machine for direct learning of frequency spectra

Optimal Multiobjective Design of Hybrid Active Power Filters Considering a Distorted Environment

Indirect Measurement

Development of Mathematical Models for Various PQ Signals and Its Validation for Power Quality Analysis

Jurnal Teknologi HYBRID ACTIVE POWER FILTER METHOD IN FREQUENCY DOMAIN FOR QUALITY IMPROVEMENT IN VARIABLE FREQUENCY DRIVE APPLICATIONS.

Closed-Form Optimality Characterization of Network-Assisted Device-to-Device Communications

Analog to Digital Converters Testing

ON THE VALIDITY OF THE NOISE MODEL OF QUANTIZATION FOR THE FREQUENCY-DOMAIN AMPLITUDE ESTIMATION OF LOW-LEVEL SINE WAVES

Enhanced HARQ Technique Using Self-Interference Cancellation Coding (SICC)

Roadmap For Power Quality Standards Development

POWER QUALITY REPORT

GENERALLY, the power loss in the winding of an

An Experimental Downlink Multiuser MIMO System with Distributed and Coherently-Coordinated Transmit Antennas

A Visible Light Localization Aided Optical Wireless System

Effect of Harmonics on Distribution Transformer Losses and Capacity

OPTI-502 Optical Design and Instrumentation I John E. Greivenkamp Homework Set 5 Fall, 2018

Virtual FFT Analyser for identification of harmonics and inter-harmonics metrological aspects

POWER QUALITY AND SAFETY

FOURIER ANALYSIS OF A SINGLE-PHASE FULL BRIDGE RECTIFIER USING MATLAB

On the Downlink Capacity of WCDMA Systems with Transmit Diversity

MEASUREMENT METHODS OF THE CHARACTERISTICS AND TARGET VALUES OF THE VOLTAGE QUALITY SUPPLIED BY HYDRO-QUEBEC SYSTEM

Low distortion signal generator based on direct digital synthesis for ADC characterization

Performance Analysis for LTE Wireless Communication

On the Sum Capacity of Multiaccess Block-Fading Channels with Individual Side Information

The deterministic EPQ with partial backordering: A new approach

Application of Hilbert-Huang Transform in the Field of Power Quality Events Analysis Manish Kumar Saini 1 and Komal Dhamija 2 1,2

Multi-agent coordination via a shared wireless spectrum

ENGINEERING FOR RURAL DEVELOPMENT Jelgava, EDUCATION METHODS OF ANALOGUE TO DIGITAL CONVERTERS TESTING AT FE CULS

Combined Noise Tools. i Development i Innovation i Cooperation i Responsibility XI AN WELL-SUN ELECTRONIC TECHNOLOGY PLC.

A Study of Grounding Grid Characteristics with Conductive Concrete

Measurement of RMS values of non-coherently sampled signals. Martin Novotny 1, Milos Sedlacek 2

A STATISTICALLY VALID METHOD FOR USING FIA PLOTS TO GUIDE SPECTRAL CLASS REJECTION IN PRODUCING STRATIFICATION MAPS

DESIGN AND ANALYSIS OF MIMO SYSTEM FOR UWB COMMUNICATION

Transcription:

Metrol. Meas. Syst., Vol. XIX (2012), No. 2, pp. 295-306. METROLOGY AND MEASUREMENT SYSTEMS Index 330930, ISSN 0860-8229 www.metrology.pg.gda.pl ON THE USE OF MULTI-HARMONIC LEAST-SQUARES FITTING FOR THD ESTIMATION IN POWER QUALITY ANALYSIS Pedro M. Ramos 1), Fernando M. Janeiro 2), Tomáš Radil 3) 1) Instituto de Telecomunicações, DEEC, Instituto Superior Técnico, Tecnical University of Lisbon, Av. Rovisco Pais 1,1049-001 Lisbon, Portugal ( pedro.m.ramos@ist.utl.pt, +351 21 841 8485) 2) Instituto de Telecomunicações, Universidade de Évora, Departamento de Física, Rua Romão Ramalo, nº. 59, 7000-671 Évora, Portugal (fmtj@uevora.pt) 3) Instituto de Telecomunicações, Av. Rovisco Pais 1, 1049-001 Lisbon, Portugal (tomas.radil@lx.it.pt) Abstract Te quality of te supplied power by electricity utilities is regulated and of concern to te end user. Power quality disturbances include interruptions, sags, swells, transients and armonic distortion. Te instruments used to measure tese disturbances ave to satisfy minimum requirements set by international standards. In tis paper, an analysis of multi-armonic least-squares fitting algoritms applied to total armonic distortion (THD) estimation is presented. Te results from te different least-squares algoritms are compared wit te results from te discrete Fourier transform (DFT) algoritm. Te algoritms are assessed in te different testing states required by te standards. Keywords: Harmonic analysis, Power quality, Signal reconstruction, Spectral analysis, Harmonic distortion. 2012 Polis Academy of Sciences. All rigts reserved 1. Introduction Power quality issues are of major concern to power producers, distributors and consumers [1]. Due to te increase in use of nonlinear loads, armonic distortions are an ever increasing important issue in power quality analysis. Wile many of te typical disturbances tat directly affect consumers are related wit power outages (i.e., interruptions), armonic distortions can also cause major damages wile not perceived by end users except wen equipment fails. Traditionally, in measurements of power quality disturbances, te main strain on te measurement system is caused by te detection and classification of transients due to te required ig sampling rate [2]. However, regulatory bodies are usually not concerned wit transients, as Quality of Service (QoS) is mainly associated wit RMS variations (e.g., sags, swells, interruptions), frequency sifts, flicker, voltage unbalance and armonic distortion. Terefore, a measurement device used for te assessment of quality of service must measure tese parameters in real-time [3] and generate aggregate values according to te regulatory norms in effect in eac country [4-6]. From te list of disturbances tat must be assessed in quality of service related wit power quality, te estimation of te armonic component amplitudes and te total armonic distortion (THD) is te most complex measurement [7]. For example, in IEC 61000-4-7 [4] for te Class I (equivalent to Class A in IEC 61000-4-30 [5]) te suggested metod to determine te armonic components is to estimate te FFT of te acquired signal and ten estimate te individual amplitudes of te armonic components to determine te THD. However, te estimation of te FFT requires a furter strain on te acquisition system because it requires syncronous acquisition to ensure tat any frequency variations do not cause spectral leakage and errors in te estimation of te armonic amplitudes and on te final THD Article istory: received on Feb. 3, 2012; received in revised form on Apr. 16, 2012; accepted on Apr. 17, 2012; available online on May 18, 2012.

P.M. Ramos, F.M. Janeiro, T. Radil: ON THE USE OF MULTI-HARMONIC LEAST-SQUARES FITTING value [8]. In [9] an efficient alternative to te use of coerent sampling was proposed for active power estimation, based on windowing. Time-frequency algoritms suc as te Gabor- Wigner Transform (GWT) ave also been proposed for power quality assessment [10]. Tis paper describes te DSP implementation of an alternative metod for te estimation of te armonic amplitudes and THD value tat does not require syncronous acquisition. Te metod is based on least-squares fitting of te acquired samples [11]. Te outputs of tis metod are te armonic amplitudes, te armonic pases (not directly relevant for te assessment of power quality armonic distortions) and te THD. As a by-product, te use of tis algoritm enables te estimation of a new parameter called total interarmonic distortion (TIHD) wic accounts for te distortion present in te signal tat does not correspond to armonic distortion. Tis new parameter is estimated by removing, from te initially acquired signal, te signal reconstructed from te estimated armonics (using te amplitudes and pases of eac armonic) and ten estimating te RMS value of tese residuals. Tis parameter enables te detection of events caused by non-armonics of te fundamental signal. Tis paper includes a detailed description of te algoritm and also of te details required for implementation in a DSP-based standalone QoS measurement system. Extensive tests of te proposed algoritm will demonstrate its compliance wit te uncertainty limits set in IEC 61000-4-30 in te tree testing states wic include oter disturbances besides armonic distortions (namely frequency variations, flicker, voltage amplitude variations and presence of interarmonics). Te standard IEC 61000-4-30 requires tat, in tese tree test states and wit te presence of te oter disturbances, te armonic evaluation must remain witin certain boundaries for eac specific armonic. Te accuracy requirements depend on te Class of instrument: Class I of te IEC 61000 4 7 corresponds to Class A of IEC 61000 4 30, wile Class II of te IEC 61000 4 7 corresponds to Class S of IEC 61000 4 30. Te requirements are based on te relation between te magnitudes of te measured armonics and te nominal voltage range. In te end, te decision to implement a specific algoritm in a standalone DSP-based measurement system [12, 13] depends on te suitability of te algoritm to estimate te desired parameter (in tis case te armonic amplitudes and te THD), on te speed wit wic te algoritm can be executed (of particular importance for real-time systems suc as power quality QoS assessment) and te amount of memory te algoritm requires (crucial in standalone measurement systems were memory is scarce and an expensive add-on tat can also slow down algoritm execution). 2. Power quality standard and armonic estimation In tis section, an overview of te standards tat specify te conditions for power metering instrument testing is presented. Te IEEE 1159 standard [6] classifies armonics in an electric power system as te steady-state waveform distortions tat are in te range 0 Hz to 9 khz wit a magnitude up to 20% of te fundamental. Te general instrument used to measure armonic distortion is described in standard IEC 61000-4-7 [4]. Altoug te standard proposes a DFT-based instrument, it allows te use of different algoritms. Measurement metods in power quality parameters are defined in IEC 61000-4-30 [5] wic requires tat at least 50 armonics are estimated. Te accuracy requirements for armonic estimation are defined in standard 61000-4-7 and are divided into two classes: Class I and Class II. Te classes correspond to different accuracy requirements in te relation between te magnitude of te measured armonics u and te nominal voltage range u nom. A tird class of instruments, (Class B in IEC 61000-4-30), is also defined for instruments wose performance is defined by te manufacturer. Te accuracy requirements for Class I and Class II are sown in Table 1. 296

Metrol. Meas. Syst., Vol. XIX (2012), No. 2, pp. 295-306. Standard IEC 61000-4-30 specifies te measuring range using te compatibility levels defined in standard IEC 61000-2-4 [14] for low-frequency disturbances in industrial environments. Te compatibility levels depend on te maximum disturbance levels tat a device may be subjected to. For Class A devices te measuring range sould be from 10% to 200% of te Class 3 compatibility levels defined in IEC 61000-2-4, wile for te lessaccurate Class S it sould be from 10% to 100% of te same Class 3 levels. Tese Class 3 compatibility levels are sown in Table 2. Te compatibility levels for odd armonics are iger tan tose for te even armonics, as it is usual in power systems to ave dominant odd armonics. Tis standard also defines tat, for class 3, te maximum total armonic distortion is 10%. Table 1. Accuracy requirements for Class I and Class II voltage armonics measurement. Class Condition Maximum Error I u 1% unom ± 5% u u < 1% unom ± 0.05% u nom II u 3% unom ± 5% u u < 3% unom ± 0.15% u nom Table 2. Voltage armonics compatibility levels defined in IEC 61000-2-4 for Class 3. Harmonic order Class 3 compatibility level % of fundamental Harmonic order Class 3 compatibility level % of fundamental 2 3 11 5 3 6 13 4.5 4 1.5 15 2 5 8 17 4 6 1 21 1.75 7 7 10 < 50 ( even) 1 8 1 21 < 45 9 2.5 ( odd multiples of tree) 1 10 1 17 < 49 ( odd) 4.5 (17/) 0.5 Te test signals used in te classification of te measurement instruments sould include oter disturbances besides te armonic content. Tree testing states are defined in IEC 61000-4-30 corresponding to different levels of disturbances. Te conditions for eac testing state are described in Table 3. Te nominal power frequency is f nom and P st is te sort-term flicker severity. Table 3. IEC 61000-4-30 testing state conditions for Class A and Class S instruments. Quantity Testing State 1 Testing State 2 Testing State 3 Frequency f ± 0.5 Hz f 1 Hz ± 0.5 Hz f + 1 Hz ± 0.5 Hz nom Flicker P st < 0.1 P st = 1± 0.1 P st = 4 ± 0.1 Determined by flicker and Determined by flicker and Voltage u nom ± 1% interamonics interamonics Inter-armonics 0% to 0.5% of u nom 1% ± 0.5% of unom at 7.5f nom 1% ± 0.5% of unom at 3.5f nom 3. Least-squares fitting algoritms In tis section, te least-squares fitting algoritms are described and teir use for te estimation of te total armonic distortion is detailed. In [15] and [16], two basic sine-fitting nom nom 297

P.M. Ramos, F.M. Janeiro, T. Radil: ON THE USE OF MULTI-HARMONIC LEAST-SQUARES FITTING algoritms were standardized for ADC and waveform records testing. Tese algoritms are not multi-armonic in te sense tat tey only estimate te parameters of te fundamental. Multi-armonic versions of te sine-fitting algoritms were developed in [11] and improved in [17]. Tese algoritms were successfully used in impedance measurements [18, 19]. Modern power quality analyzers are based on acquisition systems were an analog-todigital converter (ADC) is used to sample te voltage sensor output at a given sampling rate (for 3-pase systems tere is one ADC for eac pase). Typically a digital signal processor (DSP) retrieves te digital output of te ADC samples and algoritms implemented in te DSP are ten used to estimate te desired parameters of te acquired signal (for example, frequency, RMS value, average value, armonic amplitudes and total armonic distortion). Specifically for te estimation of te armonic distortion, it is usual to consider tat te distortion is of a steady-state nature in te sense tat te causes of armonic distortion are not completely random in nature and tat te duration of suc distortions largely exceeds te period of te acquired signal. Terefore, te acquired signal is modeled by H ( ) = + cos( 2π ) + sin ( 2π ) + ε ( ) = + cos( 2π + ϕ ) + ε ( ) (1) u t C A ft B ft u t C D ft u t = 1 = 1 were C is te DC component, f is te signal frequency, H is te number of armonics considered in te model, A is te in-pase amplitude of armonic, B is te in-quadrature amplitude of armonic, D is te amplitude of armonic, ϕ is te pase of armonic and u ( t) ε accounts for te residuals of te model (wic will include iger armonics, interarmonics, noise and oter disturbances suc as transients). Te signal fundamental corresponds to = 1 wile te armonics correspond to > 1. Ideally, all te armonics sould ave zero amplitude. Note tat bot representations in (1) are equivalent and related by H ( ) D = A + B ϕ = atan 2 B, A (2) 2 2 or reciprocally by A = D cos( ϕ ) and B D sin ( ) = ϕ. Te Total Harmonic Distortion (THD) is an indicator used to express te total amount of armonic components. It is defined as te ratio between te RMS of te armonics and te RMS of te fundamental THD 2 H D = = 2 D1. (3) Te THD is usually expressed in relative units or in percentage. Te use of logaritmic units (db) is usually limited to te analysis of distortion in linear systems were distortion is muc smaller tan in power systems. For stationary signals wose lengt is exactly 10 cycles for 50 Hz power systems or 12 in case of 60 Hz power systems, te wole energy of a armonic component is concentrated in one frequency bin of te FFT (i.e., tere is no spectral leakage). However, if te signal s parameters cange suc as its fundamental frequency, te energy will leak into nearby frequency bins due to spectral leakage. To take into account tis effect, standard IEC 61000-4-7 defines two more indicators: te group total armonic distortion (THDG) and te subgroup total armonic distortion (THDS). Te group total armonic distortion is defined as 298

Metrol. Meas. Syst., Vol. XIX (2012), No. 2, pp. 295-306. THDG 2 H U g, = = 2 U g,1 2 2, were U g, U [ P k] 2 P P 2 P U P 1 U P 2 2 + 2 = + +, (4) 2 2 P k = + 1 2 were P is te number of periods in te acquisition segment and U [ k ] is te amplitude of eac individual frequency component obtained from te FFT. Te subgroup total armonic distortion is defined as THDS 2 H U sg, = = 2 U sg,1 2 2, were U sg, = U [ P + k] 1, (5) meaning tat te RMS value of eac armonic is obtained from te tree FFT elements closer to te ideal armonic frequency. Note tat tese two parameters are solely defined and of relevance to enable te use of te FFT under spectral leakage conditions. Te use of leastsquares fitting directly estimates te armonic amplitudes and is immune to spectral leakage since it does not require te use of te FFT. Te Total InterHarmonic Distortion (TIHD) is an indicator used to express te total value of RMS not associated wit te fundamental or te armonics in te acquired signal 1 N 2 TIHD uε n N n= 1 [ ] k = 1 =, (6) were N is te number of samples in te acquisition segment and u [ n] ε is te residual associated wit sample n. In te following subsections te four basic least-squares algoritms are presented. Teir use to estimate te THD will be addressed in Section 4. 3.1. Tree-parameter sine-fitting Te tree-parameter sine-fitting estimates tree parameters of te signal model: te inpase amplitude, te in-quadrature amplitude and te DC component. It requires te knowledge of te signal frequency and it is a multiple linear regression. Te estimated parameters x are obtained from T T 1 T x [ C A B ] D D D u wit = [ ] = 1 1 = D 1 c s, (7) 1 1 were u is te vector wit te N samples and 1 is a vector wit N rows all equal to 1, = cos 2πf s = sin 2πft and t is te N rows vector wit te timestamps c ( t ), ( ) corresponding to eac sample. Tis algoritm is not iterative and terefore it is quite straigtforward to be used. However, due to te fact tat te frequency is not estimated and tat te frequency in power systems can cange, it is not actually suited for direct use in te assessment of te armonic amplitudes. To also estimate te signal frequency, te four-parameter sine-fitting sould be used. If te DC component is not required, te algoritm can be adapted by removing te first element of vector x and te first column of matrix D. Tis modification does not cange te estimation results. 299

P.M. Ramos, F.M. Janeiro, T. Radil: ON THE USE OF MULTI-HARMONIC LEAST-SQUARES FITTING 3.2. Four-parameter sine-fitting Te four-parameter sine-fitting is iterative (due to te fact tat te frequency must also be estimated, it is no longer a multiple linear regression) and te estimated parameters in ( i) ( i) T = C A1 B 1 ω iteration i are x were ( i) ω is te angular frequency correction in iteration i wic is used to update te estimated angular frequency correction of te previous ( i) ( i) ( i 1) ( i) iteration wit ω = 2π f = ω + ω. Te estimated parameters are obtained wit [ ] D = 1 c s α were 1 1 1 ( i 1) ( i 1) ( ) ( ) α = A t os + B t o c ( o is te Hadamard product or entrywise product). Note tat D must be recalculated in eac iteration because te frequency canges and te amplitudes estimated in te previous iteration are used to determine α. Te criterion to detect convergence is to stop te iterations wen te absolute relative frequency correction is below a tresold, i.e., wen ω ω <ε = 10. ( i) ( i) 7 ω In tis algoritm it is crucial to begin wit te best estimated values for te frequency and amplitudes. If improper estimations are used, te algoritm may require many iterations to converge or even fail to converge. To ensure a reduced number of iterations, te initial frequency estimation is usually obtained from te IpDFT [20] and te in-pase and inquadrature amplitudes are obtained from te tree-parameter sine-fitting algoritm (using te IpDFT estimated signal frequency). By complying wit tese basic rules, te number of iterations is typically below 5. 3.3. Non-iterative multi-armonic fitting Te non-iterative multi-armonic fitting can estimate te amplitudes of te armonics for a given frequency. Te 2H+1 estimated parameters are x = [ C A1 B1 A2 B2 L AH BH ] T 1 T wic are obtained from x D D D u wit D = [ 1 c s c s L c s ] T. Note tat D = 1 1 2 2 H H as N rows and 2H+1 columns. Te elements of x can be used to estimate te THD using (2) and (3). If te DC component is not required, te algoritm can also be adapted by removing te first element of x and te first column of D witout canging te THD estimation results. 3.4. Iterative multi-armonic fitting Te iterative multi-armonic fitting also estimates te signal frequency muc like te fourparameter sine-fitting algoritm. Te 2H+2 estimated parameters are H x ( i) T = C A1 B1 A2 B L 2 AH B H ω and D = 1 c s c s L c 1 1 2 2 H sh α. = 1 Obviously, tis is te most direct algoritm to estimate te THD but it comes wit a cost bot memory-wise and computationally. 4. Use of least-squares fitting algoritms for THD estimation Tree different options to use te least-squares fitting algoritms for THD estimation are presented in tis section. In all situations, te outcome is te armonic amplitudes, teir pases, te fundamental frequency and te DC component. Ten, te THD is directly obtained from (3) wile TIHD can be obtained from (6) using te residuals of te fit. 300

Metrol. Meas. Syst., Vol. XIX (2012), No. 2, pp. 295-306. Te first option is to use te four-parameter sine-fitting on te acquired signal to estimate te signal frequency, te DC component and te fundamental parameters. Te residuals of tis fit are ten applied to te tree-parameter sine-fitting (witout DC component) to estimate te parameters of te second armonic (=2) and so on until all te armonics are estimated. Te main drawbacks of tis metod are tat te errors of te signal frequency are propagated into te armonics and te need to estimate te residuals is an added computational burden. Te second option is to apply te four-parameter sine-fitting to obtain te frequency and parameters of te fundamental and ten apply te non-iterative multi-armonic fitting to its residuals. Tis estimates, in one step, te parameters of all armonics and reduces te computational burden of estimating te residuals of te tree-parameter sine-fitting for eac armonic. Te drawback is caused by te fact tat te frequency is estimated in te first step and its errors are accumulated in te multi-armonic fit. Anoter disadvantage is te fact tat te burden of te multi-armonic fit is considerably iger tan tat of te tree-parameter sine-fitting. However, since te multi-armonic is applied only once and te tree-parameter fitting must be applied to eac armonic, te overall computational burden must be assessed. Te tird option is to use solely te iterative multi-armonic fitting. Tis option is straigtforward but it is te most demanding, computationally and memory-wise. 5. Developed power quality analyzer In tis section, te developed power quality analyzer is described. Different sensor modules are available using a wide selection of ranges (namely for te current). Eac of tese modules can be used to interface te power system and te acquisition and processing module. In addition tere is one module responsible for power management wic includes a backup recargeable Li-Ion battery to power te system in case of sags and interruptions. Wen power is restored te battery is recarged. If te battery is totally drained during a longer interruption, te system suts down and restarts wen power is restored. Te acquisition and processing module includes some analog signal conditioning for eac cannel (from te current and voltage sensors), one 16-bit analog to digital converter (ADC) per cannel, a memory module to add storage capacity during processing and one digital signal processor were te samples are processed and te algoritms are implemented. Te system block diagram is presented in Fig. 1. V I Signal conditioning ADC ADC Data A CLK CS Data B RAM DSP Tx SD Memory card Rx USB USB Power management Li-Ion DC/DC DC/DC 1.2V 3.3V 5V -5V 15V -15V 5V L N Power System Load PQ Analyzer Fig. 1. Basic block diagram of te implemented PQ analyzer. Te system can be interfaced by a SD memory card or a USB connection. Basically tese interfaces are used to store te detected events and monitor in real time te operation of te PQ analyzer. Te acquisition itself is controlled by te DSP wic sets te sampling rate of te ADCs to 50 ks/s. Eac acquisition segment lasts 3 s wic corresponds to 150 000 301

P.M. Ramos, F.M. Janeiro, T. Radil: ON THE USE OF MULTI-HARMONIC LEAST-SQUARES FITTING samples. DMA is used to transfer te acquired samples, during te segment acquisition, into te external memory. Wile one segment is being acquired, te previous segment must be completely processed by te DSP. Altoug tis paper is focused on te estimation of te total armonic distortion, in DSP all te algoritms for detection of events are implemented. In Fig. 2, te complete block diagram of te algoritms is presented. After a pre-processing stage, te algoritms are divided into two sections. In te lower section of Fig. 2, te RMS values are estimated and tresolds are used to determine if an event was detected and if so, te classification stage determines its amplitude, duration and type (sag, swell, overvoltage, undervoltage or interruption) from te RMS values [21]. c la s si fi ca t i o n c la s si f ic a t io n Fig. 2. Block diagram of te algoritms implemented in te PQ analyzer. Te second section deals wit te detection of transients and waveform distortions. Here, te first algoritm to be applied is te four-parameter sine-fitting to separate te fundamental from te rest of te signal (te residuals include armonics, interarmonics, transients and noise). To estimate if an event is present in te current segment, te morpological operation closing [22, 23] is used wit a structuring element of lengt equivalent to 50 ms. Wit tis operation, tresolding is ten a straigtforward operation to detect if an event is present since it groups multiple crossings of te tresold for a single event. Te duration of te event, as estimated from te closing operation, is ten used to assess wic class of event occurred. If te event duration is above 50 ms or if it is above 20 ms and te THD exceeds te THD tresold, ten it is a waveform distortion (eiter caused by THD armonic distortion or TIHD interarmonic waveform distortion). If tis condition is not verified, ten te event is a transient and anoter morpological closing operation is applied wit a smaller structuring element (equivalent to 4 ms) to separate transients tat migt be close to eac oter in te residuals and also to estimate wit better accuracy te duration of te transient. Te evaluation of te THD and TIHD is done using one of te algoritms defined in section IV in te gray block of Fig. 2. Notice, owever, tat te 4-parameter sine-fitting as already been applied and terefore te burden is reduced in te first two cases, wile in te tird case te full algoritm of te iterative multi-armonic sine-fitting must neverteless be applied. 6. Results Fig. 3 depicts an acquired waveform (50 Hz nominal frequency) wit some clear armonic distortion near te zero crossings of te rising edge of te sine signal. Also visible but less 302

Metrol. Meas. Syst., Vol. XIX (2012), No. 2, pp. 295-306. discernable are some armonic distortions near te signal peaks. Tis is a clear example of a power voltage distorted by te presence of non-linear loads. In Fig. 3, te amplitude units (pu) correspond to te traditional normalization wit respect to te nominal RMS value of te distribution voltage. Tis normalization is useful wen comparing systems wit different nominal RMS voltages and is widely used in PQ. 1.5 1 0.5 u (pu) u 0-0.5-1 -1.5 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 Time (s) Fig. 3. Example of distorted voltage signal in a power system. Since for Class A instruments, te measuring range is up to 200%, te armonic amplitudes can reac twice te values of te armonic levels of Table 2. Neverteless, te maximum total armonic distortion is 20% and if all te armonics ave teir maximum value, te THD would exceed tis limit value. Terefore, te signal used for testing can ave armonic amplitudes up to twice tose of Table 2 but making sure tat te THD does not exceed 20%. In Table 4, te armonic amplitudes of te test signals are presented. Tey represent a compromise between te maximum amplitude of te armonics and te desired THD value. Wit tese values, te THD is 20%. Table 4. Harmonic content of te test signal. For te armonic amplitudes presented in Table 4, te maximum allowed error for eac armonic for Class I and Class II (from Table 1) is presented in Fig. 4. Notice tat, for te iger order armonics, teir amplitude is muc lower and terefore, te maximum error is a percentage of te nominal system voltage and does not depend on te armonic amplitudes temselves. For all te testing states, te signals contained wite Gaussian noise wit 75 db SNR. For eac state, 10 000 signals were tested and te maximum error of individual armonics amplitudes were registered. Maximum allowed error (%) Maximum allowed error (%) 0.6 0.5 0.4 0.3 0.2 0.1 0 1 10 20 30 40 50 a) Harmonic a) Maximum allowed error (%) Maximum allowed error (%) 0.6 0.5 0.4 0.3 0.2 0.1 0 1 10 20 30 40 50 b) Harmonic Fig. 4. Maximum allowed error in te estimation of eac armonic for te test signal wit te armonic content sown in Table 4 for: a) Class I instruments; b) Class II instruments. b) 6.1. Testing State 1 In tis testing state, relatively low flicker is applied, as well as low amplitude interarmonics, te frequency is centered on te nominal value and te nominal voltage can 303

P.M. Ramos, F.M. Janeiro, T. Radil: ON THE USE OF MULTI-HARMONIC LEAST-SQUARES FITTING cange by 1%. Te results obtained wit te four algoritms are presented in Fig. 5 te DFT results are also included for comparison. It can be seen tat almost all algoritms comply wit te requirements for Class A. Te combined four-parameter and tree-parameter sine-fitting algoritm only complies wit Class S. 6.2. Testing State 2 Fig. 5. Accuracy in te armonic amplitude estimation in testing state 1. In testing state 2 te frequency is centered 1 Hz below te nominal value wit some small variation and a moderate amount of flicker is included. A moderate-valued interarmonic is added at frequency 7.5f nom. Te results in tis testing state are presented in Fig. 6 and it can be seen tat bot iterative and noniterative multi-armonic algoritms satisfy te minimum requirements for instruments of bot Class A and Class S. Te combined four-parameter and tree-parameter sine-fitting algoritm only complies wit te requirements for Class S instruments as its maximum error at iger order armonics is just below 0.3% and well above 0.1%. Notice tat te results obtained in tis testing state are similar to te ones obtained in testing state 1. 6.3. Testing State 3 Fig. 6. Accuracy in te armonic amplitude estimation in testing state 2. In te tird testing state, te frequency is centered 1 Hz above its nominal value wit some small variation and a severe amount of flicker is included in te signal. Te included interarmonic as a moderate amplitude and is located at 3.5 f nom. Fig. 7 sows te results for tis testing state wit all te algoritms, including te DFT for comparison. Once again bot multi-armonic algoritms are fully compliant wit te requirements for bot instrument classes and perform better tan te DFT algoritm. Te combined four-parameter and treeparameter sine-fitting algoritm again only complies wit Class S instruments. Te maximum error results for all te tested algoritms are similar in all testing states. Fig. 7. Accuracy in te armonic amplitude estimation in testing state 3. 304

Metrol. Meas. Syst., Vol. XIX (2012), No. 2, pp. 295-306. 6.4. THD estimation comparison In Fig. 8, a comparison of te maximum error obtained wen estimating te THD value wit te different algoritms an as a function of te applied THD is presented for testing state 3. It can be seen tat te worst results are obtained for te THDG metod for THD values below 5% (caused by te interarmonics influencing te computation of THDG according to (4)) and tat for iger distortions, te worst algoritm is again te combined four-parameter and tree-parameter sine-fitting algoritm. 10 0 Max. error of THD estimation (%) Maximum error of THD estimation (%) 10-1 10-2 DFT (THD) DFT (THDG) DFT (THDS) 4- and 3-par. sine fitting Non-iterative multiarmonic Multiarmonic 0 5 10 15 20 THD (%) 7. Conclusions Fig. 8. Comparison of te THD accuracy for te tested algoritms in testing state 3. In tis paper a detailed comparison of least-squares fitting algoritms for THD estimation for power quality analyzers is presented. Tere are tree options tat can be used wit te main difference being te computational complexity and burden of te algoritms. One of te presented solutions (te combined four-parameter and tree-parameter sine-fitting algoritm) is only viable for Class S instruments wic correspond to instruments used for statistical applications suc as surveys or power quality assessment. For Class A instruments (used wen precise measurements are required) eiter multi-armonic algoritm may be used. It sould be noted tat te computational burden of tese algoritms puts added pressure on DSP-based systems. To reduce te computational burden of te least-squares fitting algoritms, decimation can be applied to te complete set of acquired samples. Tis is a valid approac because te maximum armonic to be assessed sould be near 9 khz and te sampling rate is muc iger (50 ks/s). Terefore if only one sample in eac 2 is used, te sampling rate would be reduced to 25 ks/s wic would still be enoug to estimate armonics up to 9 khz. If only 50 armonics are needed, te decimation factor can be increased and te computational burden furter reduced. Note tat te decimation sould be applied only before te Least Squares fitting block of Fig. 2 but tat te complete acquired signal must be used for te four-parameter sine-fitting to estimate transients. Te developed system (described in Fig. 1 and Fig. 2) is capable of monitoring, in realtime, te power quality of a single-pase power system. It includes data logging capabilities and an internal backup power source to sustain operation during interruptions and sags. Te system as been used to generate a database of real recorded power quality events wic is available online for te use of te scientific community working in power quality. References [1] Dugan, R.C., McGranagan, M.F., Santoso, S., Beaty, H.W.(2003). Electrical Power Systems Quality. NY: McGraw-Hill, 2 nd edition. 305

P.M. Ramos, F.M. Janeiro, T. Radil: ON THE USE OF MULTI-HARMONIC LEAST-SQUARES FITTING [2] Radil, T., Ramos, P.M., Janeiro, F.M., Serra, A.C. (2008). PQ monitoring system for real-time detection and classification of disturbances in a single-pase power system. IEEE Trans. Instrum. Meas., 57(8), 1725-1733. [3] Ardeleanu, A.S., Ramos, P.M. (2011). Real time PC implementation of power quality monitoring system based on multiarmonic least-squares fitting. Metrol. Meas. Syst., 18(4), 543-554. [4] IEC 61000-4-7 Electromagnetic compatibility (EMC) Part 4-7: Testing and measurement tecniques General guide on armonics and interarmonics measurements and instrumentation, for power supply systems and equipment connected tereto, Edition 2.1, IEC, 2009. [5] IEC 61000-4-30 Electromagnetic compatibility (EMC) Part 4-30: Testing and measurement tecniques Power quality measurement metods, Edition 2.0, 2008. [6] IEEE Std. 1159-2009. IEEE Recommended Practice for Monitoring Electric Power Quality. IEEE Power & Energy Society, 2009. [7] Tarasiuk, T., Mindykowski, J. (2012). An extended interpretation of THD concept in te wake of sip electric power systems researc. Measurement, 45(2), 207-212. [8] Bollen, M.H.J., Gu, I.Y.H.(2006). Signal Processing of Power Quality Disturbances. NJ: Wiley. [9] Sedlacek, M., Stoudek, Z. (2011). Active power measurements - an overview and comparison of DSP algoritms by noncoerent sampling. Metrol. Meas. Syst., 18(2), 173-184. [10] Szmajda, M., Górecki, K., Mroczka, J. (2010). Gabor Transform, SPWVD, Gabor-Wigner Transform and Wavelet Transform - Tools for Power Quality monitoring. Metrol. Meas. Syst., 17(3), 383-396. [11] Ramos, P.M., Silva, M.F., Martins, R.C., Serra, A.C. (2006). Simulation and experimental results of multiarmonic least-squares fitting algoritms applied to periodic signals. IEEE Trans. Instrum. Meas., 55(2), 646-651. [12] Radil, T., Janeiro, F.M., Ramos, P.M., Serra, A.C. (2008). An efficient approac to detect and classify power quality disturbances. International Journal for Computation and Matematics in Electrical and Electronic Engineering (COMPEL), 27(5), 1178-1191. [13] Radil, T., Ramos, P.M., Serra, A.C. (2009). Single-pase power quality analyzer based on a new detection and classification algoritm. In Procedings of IMEKO World Congress. Lisbon, Portugal, 917-922. [14] IEC 61000-2-4 Electromagnetic compatibility (EMC) Part 2-4: Environment Compatibility levels in industrial plants for low-frequency conducted disturbances, Edition 2, IEC, 2002. [15] IEEE Std. 1057-2007, IEEE Standard for Digitizing Waveform Recorders, New York, April 2008. [16] IEEE Std. 1241-2011, IEEE Standard for Terminology and Test Metods for Analog-to-Digital Converters, New York, 2011. [17] Ramos, P.R., Serra, A.C. (2007). Least Squares Multiarmonic fitting: Convergence improvements. IEEE Trans. Instrum. Meas., 56(4), 1412-1418. [18] Ramos, P.R., Serra, A.C. (2008). Impedance measurement using multiarmonic least-squares waveform fitting algoritm. Computer Standards and Interfaces, Elsevier, 30(5), 323-328. [19] Janeiro, F.M., Ramos, P.M. (2009). Impedance measurements using genetic algoritms and multiarmonic signals. IEEE Trans. Instrum. Meas., 58(2), 383-388. [20] Renders, H., Scoukens, J., Vilain, G. (1984). Hig-accuracy spectrum analysis of sampled discrete frequency signals by analytical leakage compensation. IEEE Trans. Instrum. Meas., 33(4), 287-292. [21] Styvaktakis, E., Bollen, M.H.J., Gu, I.Y.H. (2002). Automatic classification of power system events using RMS voltage measurements. IEEE Power Engineering Society Summer Meeting, 824-829. [22] Serra, J. (1982). Image Analysis and Matematical Morpology, 1. Academic Press. [23] Radil, T., Ramos, P.M., Janeiro, F.M., Serra, A.C. (2007). DSP Based Power Quality Analyzer for Detection and Classification of Disturbances in a Single-pase Power System. Metrol. Meas. Syst., 14(4), 483-494. 306