Next Article in Journal
Educational Workshop on STM32 Digital Control in Buck Converters: Design, Development, and Online Resources
Previous Article in Journal
Optimizing Unmanned Aerial Vehicle Electronics: Advanced Charging Systems and Data Transmission Solutions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Calibration of a Class A Power Quality Analyser Connected to the Cloud in Real Time

1
Department of Electrical Engineering, University of Jaen, Campus Lagunillas s/n, Edificio, 23071 Jaen, Spain
2
Department of Electrical Engineering, University of Talca, Camino los Niches Km. 1, Curicó 3344158, Chile
*
Author to whom correspondence should be addressed.
Electronics 2024, 13(16), 3209; https://doi.org/10.3390/electronics13163209
Submission received: 28 June 2024 / Revised: 9 August 2024 / Accepted: 12 August 2024 / Published: 13 August 2024

Abstract

:
Power quality measurements are essential to monitor, analyse and control the operation of smart grids within power systems. This work aims to develop and calibrate a PQ network analyser. As the penetration of non-linear loads connected to power systems is increasing every day, it is essential to measure power quality. In this sense, a power quality (PQ) analyser is based on the high-speed sampling of electrical signals in single-phase and three-phase electrical installations, which are available in real time for analysis using wireless Wi-Fi (Wireless-Fidelity) networks. The PQAE (Power Quality Analyser Embedded) power quality analyser has met the calibration standards for Class A devices from IEC 61000-4-30, IEC 61000-4-7 and IEC 62586-2. In this paper, a complete guide to the tests included in this standard has been provided. The Fast Fourier Transform (FFT) obtains the harmonic components from the measured signals and the window functions used reduce spectral leakage. The window size depends on the fundamental frequency of, intensity of and changes in the signal. Harmonic measurements from the 2nd to 50th harmonics for each phase of the voltage and each phase and neutral of the current have been performed, using the Fast Fourier transform algorithm with various window functions and their comparisons. PQAE is developed on an open-source platform that allows you to adapt its programming to the measurement needs of the users.

1. Introduction

The development of electronics over the last decades has led to a change in the loads connected to the grid; in addition to personal equipment, such as mobile phones, computers and electric vehicles, more and more electrical systems are making use of power electronics for grid control. The use of this equipment in real time will make it possible to optimise smart grids and reduce greenhouse gas emissions to mitigate climate change. To this end, electricity generation through renewable energies, such as distributed generation, is being promoted. There are also plans to increase the installed capacity for charging electric vehicles.
Non-linear loads are becoming increasingly important in grids. In this sense, smart grids use real-time monitoring and control to improve their operation, which would lead to including smart meters capable of measuring the quality of the electrical signal as intended in this research.
These new exposed aspects are becoming more and more common and causing changes in the network. These new loads lead to distortions in the voltage and current signals of the grid, which generate harmonic components of multiple frequencies of the main frequency, reducing the quality of the power supply [1]. The harmonic content of electrical signals in installations should be as low as possible. Otherwise, a high harmonic content can cause effects such as untimely tripping protections, increased losses and heating of conductors due to the increase in current produced by harmonics, etc. [2].
In the measurement of power quality parameters, devices called power quality analysers are often used. These devices are capable of measuring different quantities, and it should be noted that they are based on signal-processing algorithms. The measurement of fundamental electrical variables of harmonic voltage and current are described in the standard [3]. In this investigation, tests up to 2.5 kHz were performed.
The discrete Fourier transform is usually the most commonly applied for harmonic spectrum analysis, in particular, the Fast Fourier transform (FFT) is established by current standards [4]. In this sense, the use of the FFT on signals must take into account an appropriate window width and set the sample to a multiple of 2. The window must be synchronised with the frequency of the measured signals to obtain the data acquisition times, by [3].
To perform the calibration process, the Power Quality Analyser Embedded (PQAE) uses the microcontroller [5] with an ARM Cortex-M7 at 600 MHz with direct memory access (DMA). One will be used to perform the measurements continuously and the other to perform the FFT calculations and store them in the microSD memory. Another important feature of this microcontroller is the availability of flash memory for storing and RAM for storing program variables with DMA, which increases the speed for accessing memory and data.
The obtained data are sent to the cloud via Wi-Fi, using the Wemos d1 mini microcontroller [6] with ESP8266 connected to the microcontroller [5] via the serial port, which allows the data to be uploaded over a Wi-Fi network. The Google Firebase service is used to store the measurements made in the cloud.
The measurement and processing of the signals are a fundamental part of obtaining accurate data by PQ analysers. Therefore, the process of sampling, measurement and calibration of a PQ analyser is analysed, as well as the uploading and storage of the data in the cloud. The sampling of the signals is an essential part of the PQAE, and it is based on the standard [3,4].
Numerous authors have used the FFT to obtain the harmonic components of sampled signals. Tarasiuk et al. [7,8] developed methods and algorithms to develop a new device to improve overcoming the sensitivity and measuring the power quality parameters, with applications of the discrete wavelet transform (DWT). Arranz-Gimon et al. [1] proposed a new interpolated discrete Fourier transform (DFT), applying the Chebyshev best approximation theory for the harmonic frequency.
Different authors have analysed the window functions in the FFT. Shao et al. [9] proposed an algorithm that combines the advantages of the FFT and the all phase difference method (apFFT). Henry et al. [10] developed the calculation of the Fast Fourier transform using two windowing functions, and Rakshit et el. [11] presented some window functions for low-pass filter design both in time and frequency domains. Moreover, Al Fajar et al. [12] developed an algorithm of the FFT using the Hamming window technique in LabVIEW. And finally, Gen et al. [13] analysed processed signals through the windowed interpolation FFT operation, via Fast Fourier transform in signal transformation.
On the other hand, the calibration process of the PQ analyses based on current standards is fundamental. Löper et al. [14] described the different tests carried out on a PQ electricity meter. Real-Calvo et al. [15,16] studied calibration tests and developed a PQ analyser with application in smart grids based on standards [3].
Wireless technologies are implemented in various measurement equipment, which makes it possible to install them in domestic and industrial installations. Wireless Fidelity (Wi-Fi) networks are available in many places where electrical measurements are made, which is why it has been developed in numerous devices. Thongkhao et al. [17] implemented a device with Wi-Fi connection to function as a Smart plug to measure and control consumption in homes. Hlaing et al. [18] developed a single-phase metering device using the Wi-Fi network for IoT access applied to the reduction of electricity consumption. Medeiros et al. [19] studied a metering device for residential and small business use with Wi-Fi technology and three-phase power grids. Muralidhara et al. [20] developed a Wi-Fi device for IoT access that monitors electricity consumption. Cano et al. [21] implemented a measurement device with a web portal and real-time Wi-Fi data upload to the cloud. Serrano et al. [22] developed a low-cost smart plug with power quality analyser functions, with Wi-Fi networks. Budhavarapu et al. [23] designed a meter of low voltage grids to electrical consumption using ESP32 and Wi-Fi networks. Cabrera et al. [24] built a PQ analyser for photovoltaic plants using Wi-Fi communication.
Among other examples of smart meters developed, Viciana et al. [25] implemented a single-phase smart meter with a low-cost ARM processor. Karthick et al. [26] developed a smart meter for power and energy quality measurements in commercial buildings. Abate et al. [27] built a smart meter using an ADE7913 that can record different electrical variables connected to IoT. Shreenidhi et al. [28] implemented a model for integrating smart grids connected to IoT through a 2-stage convolution model. Salor et al. [29] developed a power quality meter directly connected to a computer.
PQ analyser equipment has been addressed by several authors; Chan et el. [30] designed a small-scale PQ analyser using a General Packet Radio Service (GPRS) module. Viciana et al. [31] implemented a power quality in three-phase power grids in real time and autonomous. Artale et al. [32] designed a PQ analyser with electrical power line communication. Lara Cardoso et al. [33] implemented a field programmable gate array (FPGA)-based power quality analysis device. Matheus et al. [34] implemented a concept of scalable architecture of real-time PQ. Alberto et al. [35] developed a PQ device with local measurement and data transmission via a server for a transmission 4.0 substation.
The literature review on PQ analysers indicates the following conclusions:
  • The description of the sampling and window functions used in the FFT for PQ analyser implementation is not described, except for articles focusing on signal processing [9,10].
  • Most of the equipment does not describe the calibration process based on the standards [3], except [14,15,16,32].
  • Data are sent with different wireless communication protocols, such as Wi-Fi [22,31,34], Modbus [24] and GSM [30].
  • Due to the large amount of data measured by PQ analysers, only some of the developed devices allow information to be sent to the cloud in real time [30,31,34].
The following weaknesses were found in the papers analysed.
  • The data are not fully available in the cloud.
  • The systems are not open source and cannot be modified to suit the needs of each user.
  • The calibration process is not described.
Based on the weaknesses analysed in the reviewed literature, this research includes the following developments in the PQAE:
  • Analysis of data sampling and window functions in the FFT to improve the accuracy of the PQAE. High-resolution measurements with a 10.24 kHz (97.65 µs) sampling rate for the FFT calculation.
  • Continuous adjustment of 10/12-cycle windows as a function of the fundamental frequency.
  • Perform and describe the calibration tests of the device according to the standard [3].
  • Study the quality of measures in real time in the cloud and access with mobile devices and computers.
The main contribution of this paper is the development of a guide to describe the tests defined in IEC 61000-4-7 and IEC 61000-4-30. This document serves as a calibration and evaluation process for PQ analysers. An additional contribution is the availability of the data generated in real time. This data availability means that it is not necessary to wait until the end of the measurement campaign to analyse the data. With an early analysis, solutions can be proposed for the problems that exist in the electrical installations being analysed.
A comparison has been made among the most significant PQ analysers on the market. Table 1 shows the comparison between the PQAE and commercial PQ analysers. Only Qualistar CA 8345, Circutor MYeBOX-150 and PQ-BOX 300 (optional) have an app for mobile devices. As for remote monitoring, only Fluke 1770 within the same Wi-Fi network and PQ-BOX 300 (harmonics excluded) can perform it. For uncertainty values, it is worth noting that PQAE is in line with the reviewed analysers. Finally, PQAE has an app for mobile devices and remote monitoring.

2. Description of the Power Quality Analyser

To measure power quality, a large number of measurements per second are required, with high measurement rates of several ns. This requires a microcontroller with a high clock speed and high computational power. In this research, a Teensy 4.1, ARM Cortex-M7 microcontroller with a speed of 600 MHz has been used. The harmonic content analysis of voltage and current signals, three voltages and four currents, is based on the application of FFT. The frequency measurement at each phase will determine the time interval between two consecutive voltage and current samples.
Due to the large data of voltage, current and frequency measurements to be stored in the memory, a microcontroller with a large and fast memory capacity is required. Figure 1 shows the complete circuit for the harmonic meter integrating the voltage, current and frequency measurement circuits. In this circuit, the Wemos d1 mini microcontroller has been added for Wi-Fi communication to allow data to be uploaded to the cloud and commands to be downloaded to configure the meter. A DS3231 real-time clock has also been included to add the date and time of measurement to the measured data.

2.1. Voltage Measurement Circuit

The circuit is powered by two resistors, one of the 3.3 MΩ series and the other of the 1.33 kΩ parallel and a 1 nF ceramic capacitor to convert the grid voltage to an alternating voltage of ±200 mV amplitude that feeds the TLP720 optocoupler and the isolation amplifier.

2.2. Current Measurement Circuit

The current circuit uses Rogowski coils of the YHDC brand, model RFSY-50-50 [35], with an accuracy of 0.5% and a measuring range of 50 A. Rogowski coils do not have the same saturation problem as Hall-effect current sensors and can be adapted to different measuring ranges with excellent results over the full measuring range. In addition, an integrator has been included to obtain an output voltage within the range measured by the microcontroller.

2.3. Frequency Measurement Circuit

The optocoupler determines the zero crossing of the sampled signals for 200 ms. By applying what is described in Section 3 (Frequency), the frequency of the signal is obtained. In this investigation, a Vishay Semiconductors H11AA1 optocoupler was used [36]. Using the FFT, the harmonic content of each input signal is obtained, and it is essential to obtain the frequency and calculate the sampling times of the voltage and current signals.

2.4. Power Supply Circuit

The 230 VAC/9 VDC, 15 W power supply unit powers the device and is protected by a 3.15 A fuse and a varistor, model PSK-15D-9 [37]. The designed PQ needs different voltage levels, which have been implemented with power supplies and voltage regulators to adapt the voltages to the required values.
A DC/DC supply model PRM3W-E12-S15-S [38] has been included to power the integrators. These YHDC TRV01-033AC-1 [39] integrators together with the RFSY-50-50 [35] clamp meters operate at 12 VDC. And a power supply IHA0109S05 [40] supplies 5 VDC and 1 W to the different devices operating at 5 VDC.

2.5. Communications

The ESP8266 controller is used for wireless access via Wi-Fi, as it is less complex to use and program. Within the Arduino product family, there are different compatible models.
Communication between Wemos d1 [6] mini and Teensy is bidirectional via the serial port and serial port 1, respectively. Measured data are sent from Teensy to the Wemos d1 mini for uploading to the cloud. In the cloud, they are stored and processed. On the other hand, messages from the cloud to the Wemos d1 mini via configuration commands are sent to Teensy for execution.

3. Standard Framework for the Measurement of Spectral Components in the Low-Frequency Range

All aspects related to measurement methods, test conditions and accuracy requirements are given by the International Electrotechnical Commission (IEC). In [3], the measurement methods and the accuracy and measurement range requirements for the different parameters that characterise the quality of the power supply are indicated. In the case of voltage and current harmonics, this information is supplemented with [4,41]. On the other hand, the standards [42,43] contain all the information relating to the tests that must be carried out on the measuring instrument to check that it performs in conformity with the requirements specified in [3]. The calibration process has different phases, Figure 2 shows the flow chart for measurements by PQAE based on the IEC standard [3,4].

3.1. Measurement PQAE

The main steps for measurements with PQ analysers are as follows:
  • Frequency
The literature on the estimation of the instantaneous frequency has been reviewed in order to estimate the frequency in PQAE. Xu et al. [44] studied the transformation, estimation and reconstruction of the signal, using the weight extraction transform. Goswami et al. [45] worked with Hilbert, wavelet and generalised pencil function algorithms. Stankovic et al. [46] performed a real-time frequency estimation with an instantaneous frequency estimator called S-method, which is derived from the STFT. Want et al. [47] performed the study of the instantaneous frequency estimation in environments with high noise contents. For this purpose, they developed the IFsESPL algorithm.
On the other hand, the standard 61000-4-30 [3] in Section 5.1.1 allows for the calculation of the frequency using equipment measuring the zero crossing of the signal at frequencies below 9 kHz. The frequency measurement must be performed every 10 s using 10 measurement periods. For this reason, optocouplers that measure the zero crossing of the signal have been used in this research. In this sense, to detect the zero crossing two options are possible: (i) reading the voltage signal directly and establishing a certain tolerance to detect when it has a value close to zero; (ii) transforming the voltage signal into a pulsed voltage signal, so that it has a valley during the cycle and a peak value in the zero crossings. The second option is the most suitable, as it is more accurate and works well for small and large voltages.
The frequency is obtained as the relationship between the number of zero crossings NZC and the time interval of 200 ms. The zero crossings are measured for each phase using the frequency measurement circuit shown in Figure 1. It consists of three Vishay Semiconductor model H11AA1 optocouplers. The frequency is obtained with the following equation:
f = N zc 1 t 2 t 1
  • Sampling
To perform the sampling, it is essential to calculate the sampling time Ts. The zero crossing in each sampled signal is performed by the optocoupler, NZC, and allows the sampling frequency and sampling time for a sample N to be obtained, as shown in the Figure 3.
N samples are taken of the fundamental component ( T 1 ) at a sampling frequency f s (period T s ). Applying DFT yields the amplitude of each spectral component c k at a given frequency resolution f C , 1 . The variable ck, defined in Equation (2), takes values from zero to N − 1 and represents the relationship between the frequency of the spectral component f C , k and the frequency resolution by DFT, which is calculated according to Equation (10).
c k = f C , k f C , 1
f C , 1 = 1 T N
These coefficients form a symmetrical distribution with respect to half the sampling frequency, and hence, to know the amplitude of each harmonic, it is sufficient to take N / 2 1 values and multiply them by two.
According to the Nyquist–Shannon theorem [48,49], it is only possible to reconstruct a continuous signal from sampled data if the sampling frequency is equal to or greater than twice the maximum frequency of the signal. By adding low-pass filters to the input of the PQAE, the gain of the filters will be lower for frequencies that do not satisfy the Nyquist–Shannon theorem, thus further attenuating these high-frequency components and reducing the error.
f s > 2 f max
In this research, a sampling frequency 4 times higher than the maximum sampling frequency has been taken for more reliability. To obtain the root means square (RMS) values of the voltages and currents, their amplitude must be divided by the root of two.
X RMS , k = 2 · c k 2 = 2 · c k
Figure 4 shows the process of the voltage and current values by aggregating the sampled values. The average VAVG value of each sample N is calculated, and then, the RMS voltage and current value is obtained.

3.2. Calculation of Harmonics

The calculation of the harmonic content is based on the following steps:
  • Windowing
The windowing technique is a mathematical function, used in signal processing, that assigns a value of zero to measurements outside the specified value. Window functions are used to obtain the temporal part of the data and to reduce the effects of the frequency spectrum. Window functions applied in the FFT improved results when using a limited data set with a continuous spectrum. In the harmonics analysis, windows are used to mitigate non-desirable effects associated with spectral leakage.
The rectangular window is commonly used to analyse transient signals for the presence of continuous sinusoidal-type events. The rectangular window of length N is described by the following equation:
w n = 1 ;   0 n N 1
It allows us to measure the amplitude of a signal, and Flat windows are calculated as the summation of cosines. The coefficients of a flat window are calculated as follows:
w n = a 0 a 1 cos 2 π n L 1 + a 2 cos 4 π n L 1 a 3 cos 6 π n L 1 + a 4 cos 8 π n L 1 ;   0 n L 1
where
a0 = 0.21557895, a1 = 0.41663158, a2 = 0.277263158, a3 = 0.083578947, a4 = 0.006947368
To analyse the spectral content of a signal, one can also use the Hann. The following equation generates the coefficients of a Hann window:
w n = 0.5 1 cos 2 π n N ;   0 n N
The window length is L = N + 1.
The Hamming window separates the frequency components of widely different levels, and the following equation generates the coefficients:
w n = 0.54   0.46 cos 2 π n N ;   0 n N
The window length L = N + 1.
The width of the measurement window must be 10 periods of the fundamental component, with a maximum permissible error of 0.03%.
  • Fast Fourier Transform FFT
When the periodic voltage and current functions are not sinusoidal, they can be decomposed as the sum of a frequency component equal to the periodic signal (fundamental frequency) and infinite sinusoidal functions of a frequency integer multiple of the fundamental. The Fourier transform is given by the following:
X k = n = 0 N 1 c k ( n ) = n = 0 N 1 x ( n ) W N kn       k = 0 , 1 , ,   N 1         DFT   coefficients  
Being,
W N nk = exp j 2 π N kn ;
where c k is the spectral component, x(n), n = 0, 1, …, N−1 is a uniform sample sequence and T is the sampling interval. W N n k is the N-th root of the unit, and X(k) k = 0, 1, …, N − 1 is the k-th DFT coefficients.
The FFT is based on the DFT, with the difference that the FFT takes advantage of the properties of the phasors when calculating the term W N n k [50]. This is because this phasor takes equal values with a certain periodicity, which is used by this algorithm. It is necessary to use a number of samples that is a power of two, 2k, where k is a positive integer.
This section specifies the steps applied to the FFT results to obtain the voltage and current harmonics according to [4].
  • Grouping
Harmonic regrouping consists of combining the spectral components for which the frequency is close to that of a harmonic in the network. It can be performed in groups or subgroups, which are established in the standard [4]. The harmonic groups are calculated according to the Equation (12).
X g , h 2 = 1 2 · X C , N × h N / 2 2 + k = N / 2 + 1 N / 2 1 X C , N × h + k 2 + 1 2 · X C , N × h + N / 2 2
The RMS value of a group of harmonics h, is the square root of the sum of the squares of the rms value of a harmonic and of the spectral components adjacent to it within the time window, thus adding the energy content of the neighbouring spectral bars to those of the harmonic itself.
When the signal fluctuates, i.e., is not stationary, it is more accurate to measure the harmonic components from the subgroups, which are evaluated according to Equation (13):
X H , h 2 = k =   1 1 X C , N × h + k 2
where XH,h is the RMS value of the harmonic h and XC,(N×h)+k is the RMS value of the spectral component.
  • Smoothing
The RMS values obtained by applying Equation (13) are calculated from the last 10 measured cycles. The standard [4] states that smoothing must be applied to the signal with the help of a first order low-pass filter. It can also be expressed in the form of an equation according to Equation (14):
X oH , h i + 1 = X H , h + β · X oH , h i α
where XoH,h is the smoothed RMS value, and α and β are defined by [4]. According to Table 2 of [4], the α and β values are 8.012 and 7.012, respectively. Figure 5 shows harmonic smoothing with digital low-pass filtering.
  • Aggregation
As the data-acquisition rate is very high, data are aggregated in time intervals specified in [3] to reduce the volume. The values obtained in this measurement interval are then aggregated in two additional intervals: 150/180 periods and 10 min.
X T = i = 1 T X o H , h 2 n T
where XT is the added value.
The equipment developed must withstand an AC voltage equal to 4 times the nominal input voltage for 1 s. For voltage measurements, a crest factor of at least 2 is required in industrial networks, and for input current signals, a crest factor of up to 2.5 for ranges above 10 A. Also, it should withstand an overload of 10 times the Inom for 1 s [4].
According to the Nyquist–Shannon theorem [48,49], it is only possible to reconstruct a continuous signal from sampled data if the sampling frequency is equal to or greater than twice the maximum frequency contained in the signal. By adding low-pass filters to the input of the meter, the gain of the filters will be lower for frequencies that do not satisfy the Nyquist–Shannon theorem, thus further attenuating these high-frequency components and reducing the error.
f s > 2 f max

4. Standard Guidelines on Calibration and Uncertainty Assessment for Power Quality Analyser

The standards specify a measurement window width of 10/12 cycles depending on the frequency of 50/60 Hz. In this research, FFT with a rectangular window is used. A total of 2048 measurements shall be taken in each window, resulting in a sampling frequency of 10.24 kHz for a fundamental frequency of 50 Hz. PQAE has to measure 2048 samples in 200 ms (main frequency 50 Hz), which results of 97.65 µs (200 ms/2048), corresponding to a sampling frequency of 10.24 kHz.
The FFT is made every 200 ms. After 2048 measurements have been performed, the data are sent to the cloud and stored on the PQAE microSD card. The app performs the statistics and uncertainty calculation. The data can be downloaded from the cloud or from the microSD card to perform all the necessary post-processing of the data.
The tests were performed with a duration of 1 min, but PQAE allows for long data-collection campaigns due to its cloud storage. If there is no Internet connection, PQAE can work in local mode with the 32 GB microSD card, which is about a month of storage space.

4.1. Standard Calibration Tests

To test the PQ devices, the functionality of the devices must conform to the requirements of the IEC 61000-4-30 standard [3]. This standard defines the methodology for measuring power quality parameters for 50/60 Hz systems, describing all the information related to the tests to be performed on the measuring instrument in order to verify the performance according to the requirements described in the standard, as well as the time intervals and aggregations required for each type of measurement [4]. On the other hand, the standards [4,43] contain all the information related to the tests to be performed on the measuring instrument to verify the performance according to the requirements described in the standard [3].
The system architecture is based on the acquisition of frequency, voltage and current values of three-phase electrical systems. Ten data channels are implemented: three for frequency, three for voltage and four for current (three phases and neutral current). In addition, all stationary power quality parameters are associated with the 10/12 cycles window, obtaining longer aggregations of 3 s and 10 min. Figure 6 shows a summary of the calibration tests performed.

4.1.1. Frequency Tests

The frequency indication must be obtained every 10 s according to [3]. The frequency tests are performed for the frequency range 42.5–57.5 Hz. In addition, tests are conducted to study the influence of voltage on the frequency measurement with 10% Vnom and the influence of harmonics on the frequency measurement, H3rd–H15th (H3 10% Vnom, H7 10% Vnom, H11 10% Vnom, H15 4% Vnom). All measured test values shall have an uncertainty of less than ±10 mHz [43]. The duration of the test, according to standards, is at least 1 min. In this research, the tests have been carried out for 10 min with the conditions of each one of the tests.

4.1.2. Voltage Tests

The RMS voltage shall be measured over a time interval of 10 periods. For voltage tests performed to calibrate the prototype, the maximum uncertainty shall not exceed the levels specified in Class I of the standard [4]. When testing equipment according to the standard [4], the uncertainty values are similar to the allowable ranges.
Voltage tests are performed for a range between 10–150% of Vnom. The influence of frequency on the voltage measurements is also studied with frequencies of 42.5 and 57.5 Hz for a voltage of 80% Vnom. And finally, tests will be carried out to see the influence of harmonics on the measured voltage, H3rd-H15th (H3 10% Vnom, H7 10% Vnom, H11 10% Vnom, H15 4% Vnom). For all tests, the uncertainty must be below ±0.1% Vnom [43]. The duration of the test according to standards is at least 1 s. In this research, the tests have been carried out for 1 min with the conditions of each test.

4.1.3. Current Tests

The basic measurement should be the RMS value of the current amplitude over a time interval of 10 periods. Current tests performed on PQ analysers are performed according to the standard [4]; the terms giving the uncertainty are related to the rated current of the tested equipment, with the higher value being taken. This should be considered when choosing the appropriate range of the input current of the measuring instrument.
Current tests are performed for a range between 10 and 100% of Inom. In addition, the influence of frequency on current measurements is studied at frequencies of 42.5 and 57.5 Hz for a current of 80% of Inom. Tests will be performed to analyse the influence of harmonics on the measurement, H3rd-H15th (H3 10% Inom, H7 10% Inom, H11 10% Inom, H15 4% Inom). All tests shall have an uncertainty of less than ±1% Imed [43]. As for the voltage test, the regulations indicate a minimum test duration of 1 s. In this research, the tests have been carried out for 1 min with the conditions of each of test.

4.1.4. Harmonics Voltage Tests

The measurement method consists of measuring in 10-period windows at least up to the 50th harmonic [4]. The measurement range used for voltage harmonics tests is from 0 to 200% [4] class 3 for harmonics between 2nd–50th harmonics. The influence of frequency on the harmonic tests for the different voltage values is performed for frequency values of 42.5 and 57.5 Hz. Furthermore, the influence of the voltage magnitude on the harmonic tests is given by the values of 10% and 130% of Vnom. The uncertainty has to be below ±5% Vmed for measured voltages Vmed >1% Vnom and below ±0.05% Vnom for measured voltages Vmed <1% Vnom [43]. In voltage tests with harmonics, the standard requires a duration of at least 10 s. The calibration performed has been extended to a 10 min test.

4.1.5. Harmonics Current Tests

The measurement of current harmonics is defined [4]. Current harmonics tests are performed in the range from 0 to 200% IEC 61000-2-4, class 3 for harmonics between the 2nd and 50th harmonics. The influence of frequency on harmonics is performed for values of 42.5 and 57.5 Hz, for different values of current. The influence of the current magnitude on the harmonic is given by 10% and 100% of Inom. The uncertainty has to be below ±5% Imed for measured currents Imed > 3% Inom and below ±0.15% Imed for measured voltages Imed < 3% Inom. For current harmonics tests, the standard requires a duration of at least 10 s. The calibration performed has been extended to a 10 min test.

4.2. Uncertainty Evaluation Process

The purpose of performing a measurement is to obtain the estimate of the measured value, in other words, to obtain with a procedure or a method, the final value of the quantity to be measured. For this to be true, it will be necessary to add to the measured value the uncertainty of the measurement made. Uncertainty includes the random and systematic phenomena to which measurements are exposed. As a consequence, the uncertainty associated with the measurement shows a lack of obtaining the exact value of the measurement.

4.2.1. Uncertainty of Fundamental Variables. Standard Uncertainty

The value of the uncertainty associated with the measurement of a fundamental variable is given by the standard uncertainty. For a series of ns observations of the variable x j = x j 1 , x j 2 , , x j n s , the standard uncertainty is defined by the estimated variance:
σ x j s = σ x j s ( μ x j ) = n = 1 n s x j n μ x j 2 n s 1
σ x j s is the estimated variance, μ x j is the estimated mean and x j n is the nth measurement performed on observation j.
μ x j = n = 1 n s x j n n s

4.2.2. Confidence Level of the Uncertainty Evaluation

The confidence level of a sample ns determines the value of the uncertainty. The number of samples required can be determined so that the uncertainty is within a confidence level. The confidence interval [51] can be determined for the mean μ x j of a measurement set ns of variable x j and is given by the following:
μ x j Z α 2 · σ x j s n s ,   μ x j + Z α 2 · σ x j s n s
The probability that the mean value is within the confidence interval is as follows:
P μ x j   Z α 2 · σ x j s n s < μ x j <   μ x j + Z α 2 · σ x j s n s = 1 α
The confidence level is usually set between 95 and 99%; this allows the uncertainty described in [51] to be evaluated. Therefore, the probability that the mean is within the interval is given by the confidence level (1−α), where α equals 0.01 for a confidence level of 99% in Equation (20).

5. Results

The electrical engineering laboratory of the University of Jaén (Spain) was used to perform the tests. During the tests, the prototype was connected to the Wi-Fi network, and the data were sent to the Firebase platform to store all the tests. The necessary conditions for each test were designed by means of a network emulator and a programmable electronic load. The regulation possibilities of these devices allow the tests for the calibration of the developed prototype to be carried out. The test equipment is described in the following subsections.

5.1. Test Device

The nominal voltage of the equipment may be 230 V or 400 V for single-phase or three-phase supplies, respectively. The tests have the voltage in a range of ±2.0% and in a frequency of ±0.5% of the nominal value [4].

5.1.1. Grid Emulator and Electronic Load

Cinergia GE+15 was used to simulate the low-voltage network. The tests necessary for the PQAE calibration were conducted with this equipment. This equipment allows for the modification of different parameters necessary for the tests, such as the frequency, phase angle, voltage and harmonics of the main voltage.
Figure 7 shows the equipment used in the PQAE tests. On the left side is the Cinergia EL+15 electronic load, and on the right side is the Cinergia GE+15 grid emulator.

5.1.2. Instrumentation for Calibration

A PQ-Box 300 power quality analyser from a-eberle was used to calibrate the PQAE. It works according to the IEC 6100-4-7 standard based on the measurement and instrumentation of harmonics and interharmonics. The PQ-Box 300 is connected to the PC for real-time display, and the measurements are stored on a 32 GB microSD card. Subsequently, the information is downloaded and compared with the data obtained with the PQAE.

5.1.3. Test Configuration

Figure 8 shows the wiring diagram for the PQAE tests. The EL+15 electronic load and the GE+15 network emulator are connected at their outputs. Subsequently, the test conditions defined in Section 4 are reproduced with Cinergia software. The Rogoskwi coils of the PQAE and PQ-Box 300 are connected to the connection cables between EL+15 and GE+15. Voltage connections are made at the output of EL+15.

5.2. Windows Functions

In the time domain, the FFT of the signal extracts the signal with an appropriate window. If it is not truncated at regular intervals, spectrum leakage will pass. To reduce leakage error and spectrum leakage, it is necessary to use a window function that agrees with the signal characteristics. In this research, several window functions are studied, such as the Rectangular, the Hamming, the Hann and the Flat-Top windows. Figure 9a,c represent the voltage and current for the different window functions with the FFT for a frequency of 50 Hz. And Figure 9,d show frequencies from 100 Hz to 2500 Hz. The rectangular window with the FFT is optimally adjusted for voltage and current signals in the determination of harmonics.
(a)
The rectangular window is optimal, since the peaks of each signal are researched at the exact frequency, and the signal has the adequate length and avoids discontinuities.
(b)
The spectral properties of Flat-Top produce larger errors, are the poorest and the leakage is especially long-range.
(c)
The rate of attenuation is slower in the Hamming window, and errors and accuracy are relatively lower.
(d)
In the case of the Han window, the accumulated rounding error in the process of solving the polynomial coefficients can be large.

5.3. Calibration Standard Tests

To develop the calibration tests for PQAE, measurements of the electrical parameters were made following the methodology of the standard [3]. At different operating points, the calculated uncertainty of measurements was below the limits. The influence of certain quantities on the uncertainty was also observed.
In this context, as the purpose is to measure up to the 50th order harmonic, which has a frequency of 2.5 kHz, it is necessary to sample at 10 kHz according to the Nyquist–Shannon theorem [48,49]. Taking this into account, for each of 10 cycles (2 ms), 2048 samples are taken to perform the FFT corresponding to a sampling frequency of 10.24 kHz, taking the time window length every 97.65 ms.
Graphical tools, such as histograms, probability density functions and boxplots, were studied for the statistical analysis. A gaussian normal distribution, with a k = 2.58 coverage factor and p = 99% confidence level, has been used in the tests.

5.3.1. Frequency Tests

Table 2 shows a summary of the uncertainties obtained in the frequency tests. The test point for the measurement and the supplementary test conditions, mainly associated with the tests with influence on quantities, are indicated. The expanded uncertainty values (k = 2.58, p = 99%) associated with these series are also indicated. A high quality of the measurements with very low measurement uncertainties are observed to be related to low levels of dispersion, with values below 0.305 mHz, far from the 10 mHz limit required by the standard [43]. It can be observed in Table 2 that the variation of the voltage magnitude (test F2-1) has the greatest influence on the measurement results; in the case of phase L1 with a voltage magnitude of 10%, Vnom grows approximately thirty percent, being within the limit.
Figure 10 shows the statistical behaviour of the measurements made in these tests, represented graphically by histograms, probability density functions (PDFs) and box plots of the measured data. The histograms show that the distribution is skewed to the right in the different tests. Furthermore, it is shown that the three phases have similar behaviour, and this is corroborated in the box plots, where most of the frequency tests for each of the phases are centred as can be seen, with most of the data obtained being between the 1st and 3rd quartiles.

5.3.2. Voltage Tests

Table 3 shows a summary of the uncertainties obtained in the voltage tests. The tests used for the voltage measurements also obtained good uncertainty results with the expanded uncertainty values (k = 2.58, p = 99%) associated with these series. As can be seen in Table 3, in all cases, the uncertainty values are less than 44 mV, well below the 0.1% of the nominal voltage specified by the standard [43].
It can be seen that for a voltage magnitude of 10% of the nominal value, the uncertainty is six times higher than at 80% of the nominal value, indicating a higher error for values far away from the nominal value. And the uncertainty decreases to approximately 0.06% to 150% of the nominal value.
Figure 11 shows that it is almost symmetrical in each phase, with the L1 phase being the most centred. It can also be seen that the influence of other magnitudes causes a modification of the phases L2 and L3, grouping the data in the left part. The box plots in Figure 11 also depict that the central values of the voltage in the three phases are grouped together and have little dispersion; clearly, phase L1 has a greater grouping of the values around the central value.

5.3.3. Current Tests

Table 4 shows a summary of the current tests carried out with the prototype to observe the uncertainty magnitudes. The expanded uncertainty values (k = 2.58, p = 99%) associated with these series are also indicated. As can be seen in all cases, the uncertainty values are less than 70 mA, well below the 0.1% of the nominal current specified by the standard [43]. If we look at the uncertainties of the current measurements shown in Figure 12 and Table 4, for a current magnitude of 10% of the nominal value, the uncertainty is higher than 80% and 150% Inom tests, respectively.
The histogram together with PDFs of the statistical distributions show a multi-modal behaviour. This characteristic is clearly seen when the points move far away from the nominal current and also, when factors, such as the frequency and harmonics are introduced. The second clearly visible characteristic is a deviation of the central values of the current in all three phases. The neutral current has an asymmetrical behaviour towards the right, with values little grouped, which would be a multimodal distribution, with values in the order of 10−3.

5.3.4. Harmonics Voltage Tests

As for the tests conducted on the voltage harmonics measurement, Table 5 shows a summary of the harmonics voltage tests. In general, all the uncertainty measurements showed values lower than 17 mV, complying with the values of the standard [43]. This standard refers to [4] to cover a wide harmonic spectrum, specifically HV1-4 and HV1-5, which require 10% and 200% of the levels described in Class 3 of this standard.
The analysis shows that HV1-1, the value of the 2nd harmonic, has the greatest influence on the results obtained for uncertainty. The measurement uncertainty of the voltage magnitude in all three phases is the highest as shown by the results of the voltage tests.
Figure 13 shows the histogram, and the PDFs show a uniform behaviour. The box plots show that the central values of the voltage in the three phases are practically centred.
As for the data represented in the histogram and the probability density, it can be seen that the three phases have an almost symmetrical behaviour, with phase L1 being the most centred, while phases L2 and L3 are grouped on the left side. In the box plots, it can be seen that the central voltage values of the three phases are clustered together with little dispersion. Clearly phase L2 and L3 have a higher clustering of the values around the central value.

5.3.5. Harmonics Current Tests

The results of the current harmonics tests are shown in Table 6. As can be seen, the results obtained for the different tests are very similar in each of the three phases. The highest uncertainty is for test HI2-2, which evaluates the impact of frequency, f = 57.5 Hz and 1% of the rated current on the 50th harmonic. The measurements performed exceed the requirements set by the standard [43].
Figure 14 shows that the uncertainty is met in each test for Class A precision equipment. The histogram and PDFs show right-skewed behaviour in most of the tests performed. The second clearly visible characteristic is a deviation from the central value for each of the three phases. Both characteristics may also be noticed in measurements on other instruments used. It can therefore be concluded that the cause of this behaviour is due to the source used.
On the other hand, the values of the neutral current N are below 0.1 A; in most of the tests performed, it is asymmetrical towards the right with a multimodal behaviour. These values are represented in the boxes.

5.4. Uncertainty Evaluation

Different tests have been conducted for the calibration of the PQAE equipment. A set of ten values shown in Table 7, representing the most unfavourable conditions, has been chosen for each of the measured quantities f, v, i. Table 7 shows the values obtained for a set of ten samples of a calibration test performed with the recommendations and requirements of the JCGM 100:2008 guide [51].
Table 8 summarises the standard uncertainty results for the key variables f, v, i and the correlation coefficients between the variables. As shown, the correlation coefficients are below 0.665 for any given test, indicating that they are related to each other. Positive correlation values indicate that the variables tend to increase the two variables together, and in the negative case, one variable tends to increase and the other variable decreases. The two variables shown were measured simultaneously, so their values were correlated.
Consequently, Table 9 indicates the absolute accuracy of the frequency, voltage and current based in JCGM 100:2008 [51]. The values obtained are within those allowed by the standard.

5.5. Data Visualisation

The measured data were uploaded to the cloud in real time. For this purpose, Google’s Firebase service was used, which allowed upload times of less than 200 ms, thus ensuring data upload within the measurement time, all with a medium-level Internet connection. Bandwidths of more than 30 MB were not necessary. In addition to the electrical data, the date and time of the measurement were stored. This information was organised by day and device. Every day at 2 am the information was downloaded, and the data were backed up.
An app was developed for mobile devices to control PQAE and visualise the measurement in real time from any location. MIT App Inventor (https://appinventor.mit.edu/ (accessed on 11 August 2024)), which is free software for creating apps for Android, was used to create the app. MIT App Inventor has a component that connects directly to Firebase, and as soon as the data are uploaded, it sends an event to the mobile device that displays the data. Figure 15 shows the PQAE data screen for the voltage and current.

6. Conclusions and Discussion

A new PQAE has been developed and calibrated for measuring the quality of electrical signals with high time resolution in smart grids. Different window functions have been used for application in the FFT; the rectangular window improves the results of the FFT and allows to the most accurate harmonics (2nd to 50th) of the processed signals of both voltage and current to be obtained.
This prototype PQAE determines the fundamental electrical variables and their harmonics up to the 50th harmonic according to IEC 61000-4-30 and IEC 61000-4-7 standards. The stationary analysis has an analysis window of 10 cycles with a sampling frequency of 10.24 kHz, taking data every 97.65 ms, and is adjusted as the frequency varies. The sampling frequency is obtained with the ARM Cortex-M7 microprocessor, clocked at 600 MHz, which is implemented in Teensy. As a consequence, the real-time processing and calculation capacity of the microprocessor, along with cloud computing through big-data, offer possibilities of great interest for smart grids.
The standards development guide is a comprehensive reference framework for the calibration of power quality analysers. This guide provides researchers in the sector a document specifying all the tests to be carried out, ensuring full compliance with the spectrum of standards.
The tests carried out have shown a maximum uncertainty for the frequency test F1-1, F1-3 and F2-1 of 0.031, for the voltage test a maximum value V3-1 of 0.017 and for current I1-1 of 0.062. As for the harmonic tests, the voltage HV1-1 has an uncertainty of 0.092, and the current HI1-1, HI1-2, HI1-3 and HI2-2 has an uncertainty of 0.081. In this sense, all values are below those specified in the standard. The validation and monitoring of PQAE is fundamental for the design of smart grid applications.

Author Contributions

Methodology, A.C.-O. and F.S.-S.; Software, C.G.-T.; Validation, A.C.-O. and C.G.-T.; Formal analysis, A.C.-O., J.C.H. and C.R.B.; Investigation, A.C.-O.; Resources, F.S.-S., J.C.H. and C.R.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Council of Andalucía (Junta de Andalucía. Consejería de Transformación Económica, Industria, Conocimiento y Universidades, Secretaría General de Universidades, Investigación y Tecnología) through project ProyExcel 00381.

Data Availability Statement

The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.

Acknowledgments

The authors acknowledge the support provided by the Thematic Network 723RT0150 ‘‘Red para la integración a gran escala de energías renovables en sistemas eléctricos (RIBIERSE-CYTED)’’ financed by the call for Thematic Networks of the CYTED (Ibero-American Program of Science and Technology for Development) for 2022.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations have been used in this paper.
DFTDiscrete Fourier transform
ETSIEuropean Telecommunications Standards Institute
FFTFast Fourier transform
FPGAField Programmable Gate Arrays
GSMGlobal System for Mobile Communications
GPRSGeneral Packet Radio Service
I2CInter-Integrated Circuit
IoTInternet of Things
LPWANLow-Power Wide Area Network
PCBPrinted Circuit Board
PDFProbability Density Functions
PQPower Quality
PQAEPower Quality Analyser Embedded
PZEMPZEM-004t V3.0
RMSRoot Mean Square
Wi-FiWireless Fidelity

References

  1. Arranz-Gimon, A.; Zorita-Lamadrid, A.; Morinigo-Sotelo, D.; Duque-Perez, O. Analysis of the use of the Hanning Window for the measurement of interharmonic distortion caused by close tones in IEC standard framework. Electr. Power Syst. Res. 2022, 206, 107833. [Google Scholar] [CrossRef]
  2. Kalair, A.; Abas, N.; Kalair, A.R.; Saleem, Z.; Khan, N. Review of harmonic analysis, modeling and mitigation techniques. Renew. Sustain. Energy Rev. 2017, 78, 1152–1187. [Google Scholar] [CrossRef]
  3. IEC 61000-4-30; Electromagnetic Compatibility (EMC)—Part 4–30: Testing and Measurement Techniques-Power Quality Measurement Methods 4. IEC: Geneva, Switzerland, 2015.
  4. IEC 61000 4-7; Electromagnetic Compatibility (EMC)—Part 4–7: Testing and Measurement Techniques—General Guide on Harmonics and Interharmonics Measurements and Instrumentation, for Power Supply Systems and Equipment Connected Thereto. IEC: Geneva, Switzerland, 2002.
  5. Teensy 4.1. Available online: https://www.pjrc.com/store/teensy41.html (accessed on 17 September 2023).
  6. Wemos d1 Mini. Available online: https://www.wemos.cc/en/latest/d1/d1_mini.html (accessed on 17 September 2023).
  7. Tarasiuk, T. Estimator-analyser of power quality: Part I—Methods and algorithms. Measurement 2011, 44, 238–247. [Google Scholar] [CrossRef]
  8. Tarasiuk, T.; Szweda, M.; Tarasiuk, M. Estimator–analyser of power quality: Part II—Hardware and research results. Measurement 2011, 44, 248–258. [Google Scholar] [CrossRef]
  9. Shao, Y.; Yao, Y.; Liu, H.; Lv, R.; Zan, P. Power Harmonic Detection Method Based on Dual HSMW Window FFT/apFFT Comprehensive Phase Difference. In Proceedings of the 2021 40th Chinese Control Conference (CCC), Shanghai, China, 26–28 July 2021. [Google Scholar]
  10. Henry, M. An ultra-precise Fast Fourier Transform. Measurement 2023, 220, 113372. [Google Scholar] [CrossRef]
  11. Rakshit, H.; Ullah, M.A. A Comparative Study on Window Functions for Designing Efficient FIR Filter. In Proceedings of the 2014 9th International Forum on Strategic Technology (IFOST), Cox’s Bazar, Bangladesh, 21–23 October 2014. [Google Scholar] [CrossRef]
  12. Al Fajar, M.C.; Fatmawati, M.; Wulandari, P.; Astharini, D. Analysis of DFT and FFT Signal Transformation with Hamming Window in LabVIEW. In Proceedings of the 2020 2nd International Conference on Broadband Communications, Wireless Sensors and Powering (BCWSP), Yogyakarta, Indonesia, 28–30 September 2020. [Google Scholar] [CrossRef]
  13. Geng, M.; Wang, L.; Ren, Y.; Zhao, H. Analysis method of MSCSG rotor deflection signal based on windowed interpolation FFT. In Proceedings of the 2019 IEEE 2nd International Conference on Information Systems and Computer Aided Education (ICISCAE), Dalian, China, 28–30 September 2019. [Google Scholar]
  14. Loper, M.; Kilter, J.; Stiegler, R.; Meyer, J. Compliance Assessment of a Phasor Measurement Unit to IEC 61000-4-30 Class A for Power Quality Measurements in Transmission Systems. In Proceedings of the 2019 Electric Power Quality and Supply Reliability Conference (PQ) & 2019, Kärdla, Estonia, 12–15 June 2019; pp. 1–6. [Google Scholar] [CrossRef]
  15. Real-Calvo, R.; Moreno-Munoz, A.; Gonzalez-De-La-Rosa, J.J.; Pallares-Lopez, V.; Gonzalez-Redondo, M.J.; Moreno-Garcia, I.M. An Embedded System in Smart Inverters for Power Quality and Safety Functionality. Energies 2016, 9, 219. [Google Scholar] [CrossRef]
  16. Real-Calvo, R.; Moreno-Munoz, A.; Pallares-Lopez, V.; Gonzalez-Redondo, M.J.; Moreno-Garcia, I.M.; Palacios-Garcia, E.J. Sistema Electrónico Inteligente para el Control de la Interconexión entre Equipamiento de Generación Distribuida y la Red Eléctrica. Rev. Iberoam. Autom. Inform. Ind. 2017, 14, 56–69. [Google Scholar] [CrossRef]
  17. Thongkhao, Y.; Pora, W. A Low-Cost Wi-Fi Smart Plug with On-Off and Energy Metering Functions. In Proceedings of the 2016 13th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology, Chiang Mai, Thailand, 28 June–1 July 2016. [Google Scholar] [CrossRef]
  18. Hlaing, W.; Thepphaeng, S.; Nontaboot, V.; Tangsunantham, N.; Sangsuwan, T.; Pira, C. Implementation of WiFi-Based Single phase Smart Meter for Internet of Things (IoT). In Proceedings of the 2017 International Electrical Engineering Congress, Pattaya, Thailand, 8–10 March 2017. [Google Scholar] [CrossRef]
  19. Medeiros, E.L.; Costa, E.G.; Lira, G.R.S.; Alves, A.C.R.; Diniz, C.V.A. A low cost power quality meter over the internet. In Proceedings of the 2016 17th International Conference on Harmonics and Quality of Power, Belo Horizonte, Brazil, 16–19 October 2016. [Google Scholar] [CrossRef]
  20. Muralidhara, S.; Hegde, N.; Pm, R. An internet of things-based smart energy meter for monitoring device-level consumption of energy. Comput. Electr. Eng. 2020, 87, 106772. [Google Scholar] [CrossRef]
  21. Cano-Ortega, A.; García-Cumbreras, M.A.; Sánchez-Sutil, F.; Hernández, J.C. A Platform for Analysing Huge Amounts of Data from Households, Photovoltaics, and Electrical Vehicles: From Data to Information. Electronics 2022, 11, 3991. [Google Scholar] [CrossRef]
  22. Serrano, T.M.; da Silva, L.C.P.; Pereira, L.; Andreoli, F.; Ji, T.; Fruett, F. A Low-cost Smart Plug with Power Quality and Energy Analyzer Features. In Proceedings of the 2019 International Conference on Smart Energy Systems and Technologies, Porto, Portugal, 9–11 September 2019. [Google Scholar] [CrossRef]
  23. Budhavarapu, J.; Singh, H.K.; Thirumala, K.; Sahoo, M. Design and implementation of smart meter for PQ-based tariff computation for LV distribution network consumers. Measurement 2023, 216, 112959. [Google Scholar] [CrossRef]
  24. Hans Cabrera, M.; Britam Gómez, A.; Jorge Torres, C.; Anibal, S.M.; Guillermo Ramírez, A. Integration of Industrial Power Quality Analyser and Open Source Hardware and Software Solution for Microgrids Monitoring. In Proceedings of the 2019 IEEE CHILEAN Conference on Electrical, Electronics Engineering, Information and Communication Technologies, Valparaiso, Chile, 13–27 November 2019. [Google Scholar] [CrossRef]
  25. Viciana, E.; Alcayde, A.M.; Baños, R.; Arrabal-Campos, F.M.; Zapata-Sierra, A.; Manzano-Agugliaro, F. OpenZmeter: An Efficient Low-Cost Energy Smart Meter and Power Quality Analyser. Sustainability 2018, 10, 4038. [Google Scholar] [CrossRef]
  26. Karthick, T.; Charles Raja, S.; Jeslin Drusila Nesamalar, J.; Chandrasekaran, K. Design of IoT based smart compact energy meter for monitoring and controlling the usage of energy and power quality issues with demand side management for a commercial building. Sustain. Energy Grids Netw. 2021, 26, 100454. [Google Scholar] [CrossRef]
  27. Abate, F.; Carratu', M.; Liguori, C.; Paciello, V. A low cost smart power meter for IoT. Measurement 2019, 136, 59–66. [Google Scholar] [CrossRef]
  28. Shreenidhi, H.S.; Ramaiah, N.S. A two-stage deep convolutional model for demand response energy management system in IoT-enabled smart grid. Sustain. Energy Grids Netw. 2022, 30, 100630. [Google Scholar] [CrossRef]
  29. Salor, Ö.; Buhan, S.; Ünsar, Ö.; Boyrazoğlu, B.; Altıntaş, E.; Atalık, T.; Haliloğlu, B.; İnan, T.; Kalaycıoğlu, A.; Terciyanlı, A.; et al. Mobile monitoring system to take nationwide PQ measurements on electricity transmission systems. Measurement 2009, 42, 501–515. [Google Scholar] [CrossRef]
  30. Chan, S.-Y.; Teng, J.-H.; Chen, C.-Y.; Chang, D. Multi-functional power quality monitoring and report-back system. Int. J. Electr. Power Energy Syst. 2010, 32, 728–735. [Google Scholar] [CrossRef]
  31. Viciana, E.; Arrabal-Campos, F.M.; Alcayde, A.; Baños, R.; Montoya, F.G. All-in-one three-phase smart meter and power quality analyzer with extended IoT capabilities. Measurement 2023, 206, 112309. [Google Scholar] [CrossRef]
  32. Artale, G.; Cataliotti, A.; Cosentino, V.; Guaiana, S.; Di Cara, D.; Panzavecchia, N.; Tine, G.; Dipaola, N.; Sambataro, M.G. PQ metrics implementation on low cost smart metering platforms. A case study analysis. In Proceedings of the 2018 IEEE 9th International Workshop on Applied Measurements for Power Systems, Bologna, Italy, 26–28 September 2018; pp. 26–28. [Google Scholar] [CrossRef]
  33. Lara-Cardoso, J.; Romero-Troncoso, R.D.J. Low-Cost Power Harmonics Analyzer of Nonlinear Loads Based on FPGA. In Proceedings of the 2008 IEEE Instrumentation and Measurement Technology Conference, Victoria, BC, Canada, 12–15 May 2008. [Google Scholar] [CrossRef]
  34. Alberto, M.; Soares, G.M.; Silva, L.R.; Duque, C.A.; Decker, I.C.; Ribeiro, P.F.; Junio, E.L.; Fvaro, A.D.; Passos, L.F. Newly Implemented Real-Time PQ Monitoring for Transmission 4.0 Substations. Electr. Power Syst. Res. 2022, 204, 107709. [Google Scholar] [CrossRef]
  35. YHDC. Available online: https://www.poweruc.pl/collections/rogowski-coil/products/rogowski-coil-rfsy-16-50-24-50-36-50-50-50-70-50?variant=33176656347222 (accessed on 28 July 2024).
  36. Vishay. Available online: https://www.vishay.com/docs/83608/h11aa1.pdf (accessed on 28 July 2024).
  37. Digikey. Available online: https://www.digikey.es/es/products/detail/cui-inc/PSK-15D-9-T/13922486 (accessed on 28 July 2024).
  38. Mouser. Available online: https://www.mouser.es/ProductDetail/CUI-Inc/PRM3W-E12-S5-S?qs=81r%252BiQLm7BTmTTUoPWt%252BTg%3D%3D (accessed on 28 July 2024).
  39. YHDC. Available online: https://www.poweruc.pl/collections/rogowski-coil/products/rogowski-coil-integrator-trv01-001ac-1-rated-input-100a-600a-1000a-3000a-6000a-rated-output-1v?variant=33184312262742 (accessed on 28 July 2024).
  40. Farnell. Available online: https://es.farnell.com/xp-power/iha0109s05/convertidor-dc-dc-5v-0-2a/dp/2708161 (accessed on 28 July 2024).
  41. IEC 62586-1:2017; Power Quality Measurement in Power Supply Systems—Part 1: Power Quality Instruments (PQI). IEC: Geneva, Switzerland, 2017.
  42. IEC 61000-2-4:2002; Electromagnetic Compatibility (EMC)—Part 2–4: Environment-Compatibility Levels in Industrial Plants for Low-Frequency Conducted Disturbances. IEC: Geneva, Switzerland, 2002.
  43. IEC 62586-2:2017; Power Quality Measurement in Power Supply Systems—Part 2: Functional Tests and Uncertainty Require-ments. IEC: Geneva, Switzerland, 2017.
  44. Xu, C.; Liao, Y. Weight extracting transform for instantaneous frequency estimation and signal reconstruction. Mech. Syst. Signal Process. 2024, 216, 111475. [Google Scholar] [CrossRef]
  45. Goswami, J.C.; Hoefel, A.E. Algorithms for estimating instantaneous frequency. Signal Process. 2004, 84, 1423–1427. [Google Scholar] [CrossRef]
  46. Stanković, L.; Daković, M.; Thayaparan, T. A real-time time-frequency based instantaneous frequency estimator. Signal Process. 2013, 93, 1392–1397. [Google Scholar] [CrossRef]
  47. Wang, J.; Wang, X.; Yin, J. Self-paced learning for instantaneous frequencies estimation in heavy noise environments. Signal Process. 2022, 196, 108507. [Google Scholar] [CrossRef]
  48. Nyquist, H. Certain topics in telegraph transmission theory. Trans. Am. Inst. Electr. Eng. 1928, 47, 617–644. [Google Scholar] [CrossRef]
  49. Shannon, C.E. A Mathematical theory of communication. Bell Syst. Tech. J. 1948, 27, 379–423. [Google Scholar] [CrossRef]
  50. Rao, K.; Kim, D.; Hwang, J.-J. Fast Fourier Transform: Algorithms and Applications. En Signals and Communication Technology; Springer: Dordrecht, The Netherlands; New York, NY, USA, 2010. [Google Scholar]
  51. JCGM/WG 1; Evaluation of Measurement Data—Guide to the Expression of Uncertainty in Measurement, GUM 50. JCGM: Sèvres, France, 2008; 134p.
Figure 1. Diagram circuit PQAE.
Figure 1. Diagram circuit PQAE.
Electronics 13 03209 g001
Figure 2. Power quality measurement flowchart based on IEC standards.
Figure 2. Power quality measurement flowchart based on IEC standards.
Electronics 13 03209 g002
Figure 3. Sampling time to read the magnitudes.
Figure 3. Sampling time to read the magnitudes.
Electronics 13 03209 g003
Figure 4. Signal sampling flowchart.
Figure 4. Signal sampling flowchart.
Electronics 13 03209 g004
Figure 5. Harmonic smoothing with digital low-pass filtering.
Figure 5. Harmonic smoothing with digital low-pass filtering.
Electronics 13 03209 g005
Figure 6. Summary of calibration tests.
Figure 6. Summary of calibration tests.
Electronics 13 03209 g006
Figure 7. Test equipment in the laboratory at the University of Jaen.
Figure 7. Test equipment in the laboratory at the University of Jaen.
Electronics 13 03209 g007
Figure 8. Wiring diagram for the test.
Figure 8. Wiring diagram for the test.
Electronics 13 03209 g008
Figure 9. Window functions to current and voltage (Rectangular, FlatTop, Hann, Hamming). (a) Voltage 50 Hz. (b) Voltage 100-2500 Hz. (c) Current 50 Hz. (d) Current 0.1–2.5 kHz.
Figure 9. Window functions to current and voltage (Rectangular, FlatTop, Hann, Hamming). (a) Voltage 50 Hz. (b) Voltage 100-2500 Hz. (c) Current 50 Hz. (d) Current 0.1–2.5 kHz.
Electronics 13 03209 g009
Figure 10. Frequency tests. (a) Test point F1-1 (42.5 Hz); (b) Test point F1-2 (50.05 Hz); (c) Test point F1-3 (57.5 Hz); (d) Test point F2-1 (10% Vnom); and (e) Test point F2-2 (Harmonics).
Figure 10. Frequency tests. (a) Test point F1-1 (42.5 Hz); (b) Test point F1-2 (50.05 Hz); (c) Test point F1-3 (57.5 Hz); (d) Test point F2-1 (10% Vnom); and (e) Test point F2-2 (Harmonics).
Electronics 13 03209 g010aElectronics 13 03209 g010b
Figure 11. Voltage tests. (a) Test point V1-1 (10% Vnom); (b) Test point V1-2 (80% Vnom) (c) Test point V1-3 (150% Vnom); (d) Test point V2-1 (42.5 Hz); (e) Test point V2-1 (50 Hz); (e) Test point V2-2 (57.5 Hz); (f) Test point V3-1 (Harmonics).
Figure 11. Voltage tests. (a) Test point V1-1 (10% Vnom); (b) Test point V1-2 (80% Vnom) (c) Test point V1-3 (150% Vnom); (d) Test point V2-1 (42.5 Hz); (e) Test point V2-1 (50 Hz); (e) Test point V2-2 (57.5 Hz); (f) Test point V3-1 (Harmonics).
Electronics 13 03209 g011
Figure 12. Current tests. (a) Test point I1-1 (10% Inom); (b) Test point I1-2 (80% Inom) (c) Test point I1-3 (100% Inom; (d) Test point I2-1 (42.5 Hz); (e) Test point I2-2 (57.5 Hz); (f) Test point I3-1 (Harmonics).
Figure 12. Current tests. (a) Test point I1-1 (10% Inom); (b) Test point I1-2 (80% Inom) (c) Test point I1-3 (100% Inom; (d) Test point I2-1 (42.5 Hz); (e) Test point I2-2 (57.5 Hz); (f) Test point I3-1 (Harmonics).
Electronics 13 03209 g012aElectronics 13 03209 g012b
Figure 13. Harmonics voltage tests. (a) Test point HV1-1 (2nd H 5% Vnom); (b) Test point HV1-2 (3rd H 10% Vnom); (c) Test point HV1-3 (50th H 1% Vnom); (d) Test point HV1-4 ((2–50th) H 10% of class 3 levels); (e) Test point HV1-5 ((2–50th) H 10% of class 3 levels); (f) Test point HV2-1 (42.5 Hz); (g) Test point HV2-2 (57.5 Hz); (h) Test point HV3-1 (10% Vnom); (i) Test point HV3-2 (100% Vnom).
Figure 13. Harmonics voltage tests. (a) Test point HV1-1 (2nd H 5% Vnom); (b) Test point HV1-2 (3rd H 10% Vnom); (c) Test point HV1-3 (50th H 1% Vnom); (d) Test point HV1-4 ((2–50th) H 10% of class 3 levels); (e) Test point HV1-5 ((2–50th) H 10% of class 3 levels); (f) Test point HV2-1 (42.5 Hz); (g) Test point HV2-2 (57.5 Hz); (h) Test point HV3-1 (10% Vnom); (i) Test point HV3-2 (100% Vnom).
Electronics 13 03209 g013aElectronics 13 03209 g013b
Figure 14. Harmonics current tests. (a) Test point HI1-1 (2nd H 5% Inom); (b) Test point HI1-2 (3rd H 10% Inom); (c) Test point HI1-3 (50th H 1% Inom); (d) Test point HI1-4 ((2–50th) H 10% of class 3 levels from IEC 61000-2-4); (e) Test point HI1-5 ((2–50th) H 10% of class 3 levels from IEC 61000-2-4); (f) Test point HI2-1 (42.5 Hz); (g) Test point HI2-2 (57.5 Hz); (h) Test point HI3-1 (10% Inom); (i) Test point HI3-2 (100% Inom).
Figure 14. Harmonics current tests. (a) Test point HI1-1 (2nd H 5% Inom); (b) Test point HI1-2 (3rd H 10% Inom); (c) Test point HI1-3 (50th H 1% Inom); (d) Test point HI1-4 ((2–50th) H 10% of class 3 levels from IEC 61000-2-4); (e) Test point HI1-5 ((2–50th) H 10% of class 3 levels from IEC 61000-2-4); (f) Test point HI2-1 (42.5 Hz); (g) Test point HI2-2 (57.5 Hz); (h) Test point HI3-1 (10% Inom); (i) Test point HI3-2 (100% Inom).
Electronics 13 03209 g014aElectronics 13 03209 g014b
Figure 15. Data visualisation in the PQAE app.
Figure 15. Data visualisation in the PQAE app.
Electronics 13 03209 g015
Table 1. Comparison between the PQAE and commercial PQ analysers.
Table 1. Comparison between the PQAE and commercial PQ analysers.
ModelRemote MonitoringMobile AppRemote Data
Access
Uncertainty (%)
FVIHVHI
Fluke 1736 & 1738Inside of the same Wi-Fi networkNoNo0.10.010.030.010.01
Fluke 1770Inside of the same Wi-Fi networkNoInside of the same Wi-Fi network0.010.0040.030.010.01
Fluke 1760NoNoNoClass A
PQ-Box 300Yes (optional)Yes (optional)Yes (Harmonics excluded)0.0010.10.010.050.01
Qualistar CA 8345YesYesNot specifiedClass A
Circutor MYeBOX-150YesYesNoClass A
PQAEYesYesYes0.0060.50.040.060.03
Table 2. Frequency tests.
Table 2. Frequency tests.
TestNameTest PointsSupplementary Test RequirementsUncertainty (%) (k = 2.58, p = 99%)
L1L2L3
To evaluate the uncertainty for frequency testsF1-1P1: 42.5 HzN.A.0.02150.02210.0241
F1-2P2: 50.05 Hz0.02370.03020.0223
F1-3P3: 57.5 Hz0.03050.03040.0303
To evaluate the impact of voltageF2-1P2: 50.05 HzS1:10% Vnom0.03110.03020.0312
To evaluate the impact of the voltage harmonicsF2-2S1Harmonics:
H3rd–H15th
0.02230.02110.0213
Table 3. Voltage tests.
Table 3. Voltage tests.
TestNameTest PointsSupplementary
Test Requirements
Uncertainty (%) (k = 2.58, p = 99%)
L1L2L3
To evaluate the uncertainty for voltage measurementsV1-1P1: 10% VnomN.A.0.04410.00370.0033
V1-2P3: 80% Vnom0.06110.05020.0511
V1-3P5:150% Vnom0.07240.06160.0605
To evaluate the impact of the frequencyV2-1P3: 80% VnomS1: 42.5 Hz0.05120.05040.0412
V2-2S3: 57.5 Hz0.05010.05140.0517
To evaluate the impact of the voltage harmonicsV3-1S1 Harmonics:
H3rd–H15th
0.09110.09050.0921
Table 4. Current tests.
Table 4. Current tests.
TestNameTest PointsSupplementary
Test Requirements
Uncertainty (%) (k = 2.58, p = 99%)
L1L2L3N
To evaluate the uncertainty for current testsI1-1P1: 10% InomN.A.0.06210.04960.04510.0110
I1-2P2: 80% Inom0.02730.02340.01920.0063
I1-3P3: 100% Inom0.02020.01350.01310.0050
To evaluate the impact of the frequencyI2-1P2: 80% InomS1: 42.5 Hz0.01070.02420.02680.0118
I2-2S3: 57.5 Hz0.01050.01730.01940.0113
To evaluate the impact of the current harmonicsI3-1S1 Harmonics:
H3rd–H15th
0.03210.02150.02010.0132
Table 5. Harmonics voltage tests.
Table 5. Harmonics voltage tests.
TestNameTest PointsSupplementary Test RequirementsUncertainty (%) (k = 2.58, p = 99%)
L1L2L3
Single even harmonicHV1-1P1: 2nd H 5% VnomN.A.0.01710.01660.0151
Single odd harmonicHV1-2P2: 3rd H 10% Vnom0.01250.001040.0102
Single high harmonicHV1-3P3: 50th H 1% Vnom0.01340.01110.0112
All harmonics at low levelsHV1-4P4: (2–50th) H 10% of IEC 61000-2-4 0.01520.01340.0137
All harmonics at high levelsHV1-5P5: (2–50th) H 200% of IEC 61000-2-40.01380.01150.0112
Impact of the frequencyHV2-1P1: 2nd H 5% VnomS1: 42.5 Hz0.01420.01330.0134
HV2-2P3: 50th H 1% VnomS3: 57.5 Hz0.01570.01310.0135
Impact of the voltage HV3-1P2: 3rd H 10% VnomS1: 10% Vnom0.09210.07230.0621
HV3-2S3: 150% Vnom0.01320.01140.0112
Table 6. Harmonics current tests.
Table 6. Harmonics current tests.
TestNameTest PointsSupplementary Tests RequirementsUncertainty (%) (k = 2.58, p = 99%)
L1L2L3N
Single even harmonicHI1-1H1+2nd H 5% InomN.A.0.03210.02780.03110.0431
Single odd harmonicHI1-2H1+3rd H 10% Inom0.02570.02450.03210.0642
Single high harmonicHI1-3H1+50th H 1% Inom0.02410.03210.03370.0811
All harmonics at low levelsHI1-4H1+(2–50th) H 10% IEC 61000-2-4 0.02320.02670.02240.0102
All harmonics at high levelsHI1-5H1+(2–50th) H 200% IEC 61000-2-40.02170.02430.02430.0105
Impact of the frequencyHI2-1P1: 2nd H 5% InomS1: 42.5 Hz0.02540.02120.02310.0123
HI2-2P3: 50th H 1% InomS3: 57.5 Hz0.02340.03220.03650.0181
Impact of the voltage HI3-1P2: 3rd H 10% InomS1:10% Inom0.01210.01430.01270.0221
HI3-2S3: 100% Inom0.01340.01650.01560.0121
Table 7. Set of measurements of fundamental variables.
Table 7. Set of measurements of fundamental variables.
Measure kFrequency (Hz)Voltage (V)Current (A)
L1L2L3L1L2L3L1L2L3N
149.98450.00049.99122.99723.01123.0270.99221.01381.01050.0201
249.99250.00049.99523.00923.01623.0150.99261.01481.01010.0202
349.99749.98749.99922.98723.04922.9990.99231.01481.01090.0207
449.99949.98150.00023.04523.01322.9880.99221.01501.01180.0213
550.00149.99150.00122.98923.04022.9890.99261.01441.01260.0209
650.00349.98450.00323.00922.99922.9840.99221.01361.01300.0211
749.99049.99449.99023.01423.02323.0170.99241.01311.01230.0203
849.99549.99749.98123.00223.04522.9910.99251.01271.01170.0196
949.99750.01149.99022.98323.01123.0190.99311.01261.01110.0188
1050.00250.00949.98522.98223.02723.0180.99251.01351.01060.0197
Table 8. Fundamental variables and standard uncertainty.
Table 8. Fundamental variables and standard uncertainty.
Fundamental VariablesMeanStandard UncertaintyStandard Uncertainty (%)Correlation Coefficients
Frequency (Hz)L149.9960.00190.0038ρ (μfv) = −0.5842
L249.9950.00310.0063ρ (μfv) = 0.1241
L349.9930.00230.0046ρ (μfv) = −0.3081
Voltage (V)L123.0020.00600.0261ρ (μvf) = 0.6575
L223.0230.00520.0226ρ (μvf) = 0.3427
L323.0050.00500.0221ρ (μvf) = −0.0108
Current (A)L10.992510.00080.0090ρ (μif) = 0.6644
L21.013870.00020.0276ρ (μif) = −0.0295
L31.011510.00030.0302ρ (μif) = 0.2461
N0.020300.00021.2202ρ (μif) = −0.3433
Table 9. Absolute accuracy of fundamental variables.
Table 9. Absolute accuracy of fundamental variables.
Fundamental VariablesAbsolute Accuracy
Frequency (Hz)L1InputReading Frequency ± 0.0019
L2InputReading Frequency ± 0.0032
L3InputReading Frequency ± 0.0023
Voltage (V)L1InputReadingVoltage ± 0.0060
L2InputReadingVoltage ± 0.0052
L3InputReadingVoltage ± 0.0051
Current (A)L1InputReading Current ± 0.0001
L2InputReading Current ± 0.0002
L3InputReading Current ± 0.0003
NInputReading Current ± 0.0002
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Cano-Ortega, A.; Sanchez-Sutil, F.; Hernandez, J.C.; Gilabert-Torres, C.; Baier, C.R. Calibration of a Class A Power Quality Analyser Connected to the Cloud in Real Time. Electronics 2024, 13, 3209. https://doi.org/10.3390/electronics13163209

AMA Style

Cano-Ortega A, Sanchez-Sutil F, Hernandez JC, Gilabert-Torres C, Baier CR. Calibration of a Class A Power Quality Analyser Connected to the Cloud in Real Time. Electronics. 2024; 13(16):3209. https://doi.org/10.3390/electronics13163209

Chicago/Turabian Style

Cano-Ortega, A., F. Sanchez-Sutil, J. C. Hernandez, C. Gilabert-Torres, and C. R. Baier. 2024. "Calibration of a Class A Power Quality Analyser Connected to the Cloud in Real Time" Electronics 13, no. 16: 3209. https://doi.org/10.3390/electronics13163209

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop