In this paper, an algorithm that monitors the power system to detect and classify power quality events in real time is presented. The algorithm is able to detect events caused by waveform distortions and variations of the RMS values of the voltage. Detection of the RMS events is done by comparing the RMS values with certain thresholds, while detection of waveform distortions is made using an algorithm based on multiharmonic leasts-squares fitting.
The quality of the supplied power by electricity utilities is regulated and of concern to the end user. Power quality disturbances include interruptions, sags, swells, transients and harmonic distortion. The instruments used to measure these disturbances have to satisfy minimum requirements set by international standards. In this paper, an analysis of multi-harmonic least-squares fitting algorithms applied to total harmonic distortion (THD) estimation is presented. The results from the different least-squares algorithms are compared with the results from the discrete Fourier transform (DFT) algorithm. The algorithms are assessed in the different testing states required by the standards.