Next Article in Journal
Energy Consumption Forecasting in a University Office by Artificial Intelligence Techniques: An Analysis of the Exogenous Data Effect on the Modeling
Previous Article in Journal
Optimized Fractional Maximum Power Point Tracking Using Bald Eagle Search for Thermoelectric Generation System
Previous Article in Special Issue
Exploring Cyber-Physical Energy and Power System: Concepts, Applications, Challenges, and Simulation Approaches
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

CZT-Based Harmonic Analysis in Smart Grid Using Low-Cost Electronic Measurement Boards

1
Department of Engineering, Università degli Studi di Palermo, 90128 Palermo, Italy
2
Institute of Marine Engineering (INM), National Research Council (CNR), 90146 Palermo, Italy
3
COSIM Research Laboratory, SUP’COM, University of Carthage, Ariana 2083, Tunisia
4
Innovation Department, ACTIA Engineering Services, Ariana 2088, Tunisia
5
Layer Electronics s.r.l., 91016 Erice, Italy
*
Author to whom correspondence should be addressed.
Submission received: 22 March 2023 / Revised: 5 May 2023 / Accepted: 9 May 2023 / Published: 12 May 2023
(This article belongs to the Special Issue Progress in Smart Grid Management and Application)

Abstract

:
This paper validates the use of a harmonic analysis algorithm on a microcontroller to perform measurements of non-stationary signals in the context of smart grids. The increasing presence of electronic devices such as inverters of distributed generators (DG), power converters of charging stations for electric vehicles, etc. can drain non-stationary currents during their operation. A classical fast Fourier transform (FFT) algorithm may not have sufficient spectral resolution for the evaluation of harmonics and inter-harmonics. Thus, in this paper, the implementation of a chirp-Z transform (CZT) algorithm is suggested, which has a spectral resolution independent from the observation window. The CZT is implemented on a low-cost commercial microcontroller, and the absolute error is evaluated with respect to the same algorithm implemented in the LabVIEW environment. The results of the tests show that the CZT implementation on a low-cost microcontroller allows for accurate measurement results, demonstrating the feasibility of reliable harmonic analysis measurements even in non-stationary conditions on smart grids.

1. Introduction

Today’s power grid is fully automated, easy-to-access, reliable, and efficient services, thanks to the introduction of smart grids and their continuous development. Therefore, the evolution of appropriate measurement systems supported by a reliable communication infrastructure is the basis for the development of smart grids to increase remote service monitoring, such as power quality analysis, anti-islanding detection, arc fault detection, and so on. In this context, the number of devices connected to the grid has increased dramatically, and the proliferation of distributed generation (DG) from renewable sources has encouraged users to become active by installing power plants that can independently power their utilities [1,2,3,4,5,6,7]. In this context, power systems have also become more complex, exhibiting time-varying harmonic behaviour due to the increasing non-linearity of electronic loads. For example, variable speed motor drives cause increased harmonic pollution, by generating and feeding harmonics and inter-harmonics into distribution. The integration of DGs also has negative effects on the total harmonic distortion at the point of connection (POC) [8,9,10,11]. Furthermore, it is crucial to consider the rising number of electric vehicles (EV) and what this means in terms of harmonic generation during charging phases, which are sometimes concentrated in the same time slots. B. Grasel et al. [12] investigated EV chargers and their harmonic patterns, evaluating their potential impact on the grid.
Power grids have not been designed to operate with unpredictable renewable energy sources, and this is causing several issues with power systems that can no longer be ignored. For this reason, it is necessary to think of an advanced metering architecture solution that allows the distributor to know in real-time the status of the network and to take actions to avoid instability and unwanted voltage or frequency variations. The observability of the network can be obtained only by increasing both local and distributed measurement capabilities [13]. In this framework, the authors are developing a research project named SInERT (“Solutions innovantes pour l’intégration des énergies renouvelables sur le réseau électrique tunisien”), funded by the European Union in the framework of the Italy-Tunisia cross-border cooperation program 2014–2020. The project aims at developing innovative solutions for integrating distributed generator and storage systems into distribution networks. To achieve this aim, a distributed measurement architecture is proposed [14]. It allows monitoring different quantities: active and reactive power flows, voltage and frequency (also for islanding detection), harmonics, and other power quality phenomena. A demonstrator of the proposed solutions is under construction in the Elgazala Technopark (Ariana, Tunisia). A photovoltaic power plant with storage will be installed using innovative power converters. They will be remotely controlled by a supervisory control and data acquisition (SCADA) system, which will also collect monitoring quantities both from power converters and from distributed measurement systems installed at different points of the low-voltage (LV) network. A picture of the pilot site architecture is shown in Figure 1, where the presence of the metering devices is highlighted. They will be able to perform different measurement, including those related to advanced power quality and harmonic analysis. In the framework of a distributed knowledge of power quality issues, these measurements systems should have advanced functionalities with the aim of estimating harmonic pollution, detecting disturbing sources, etc. [15,16,17,18]. Thus, one of the goals of the project is to investigate the feasibility of new algorithms for harmonic analysis.
Performing power quality measurements means having the possibility to measure the spectral quantities that characterize the acquired signal. Consequently, several mathematical methods have been studied and developed to perform harmonic analysis and monitor the harmonic variation in power systems. In very brief, for these applications, they can be essentially divided into time-domain and frequency-domain methods [19]. Some of them are preferably proposed for power system measurements and related applications. DFT (Discrete Fourier Transform) or FFT (Fast Fourier Transform) methods are the most commonly used for power quality analysis [20,21], and they are specifically addressed in the Standard IEC 61000-4-7, which is devoted to harmonics and inter-harmonics measurements and instrumentation for power systems and equipment connected thereto. Apart from this, other methods have been provided, such as filter banks or digital filtering techniques [22,23], wavelet-based methods [24,25], compressive sensing [26], STFT (Short Time Fourier Transform) [27], and sliding-window recursive-discrete Fourier transform (SWR-DFT) [28,29]. Each of these methods has its own advantages and disadvantages in terms of accuracy, computational effort, and so on. For example, the SWR-DFT uses the Fourier transform and a sliding window to compute time-varying harmonics. Consecutive decompositions are carried out until all harmonics have been fully extracted in this iterative technique. This approach has a low computational cost, no phase delay, and a short transient time. On the other hand, all DFT-based methods can suffer from spectral leakage problems, poor resolution with short observation windows, and they are not suitable when dealing with nonstationary signals. In more detail, this class of methods can be used to break down a complex signal into its harmonic components until it exhibits elements of stationarity. In fact, harmonic analysis algorithms that rely on Fourier harmonic decomposition require the signal to remain stationary throughout the duration of the observation. Moreover, the frequency resolution in algorithms such as DFT, or derivatives, depends on the observation window: f R F F T = 1 / T w where Tw is the length of the temporal observation window. For example, to have a resolution of 1 Hz, an observation window of 1 s is required, but due to the variability of the loads and the unpredictability with which the signal can become non-stationary, the signal is unlikely to remain stationary for long periods. The signal’s non-stationarity makes any frequency domain transformation impossible. To face this issue, it is possible to use a different harmonic analysis technique, which can allow obtaining a resolution independent from the observation window; in this way, the observation window can be properly reduced to better cope with nonstationary conditions without losing information on the signal. In this approach, a temporal interval in which the signal remains stationary can be identified, and a frequency domain transformation can be performed. A suitable algorithm that can work with short observation windows is a particular type of Z-transform, i.e., the Chirp-Z Transform (CZT) [30,31,32]. In fact, the main advantage of the CZT algorithm is related to the possibility of reaching a better resolution (if compared with the DFT/FFT algorithms) in a specified frequency range, even with small observation windows.
In this framework, the study presented in this paper is aimed at investigating the feasibility of using the CZT algorithm for harmonic analysis, from the viewpoint of both its accuracy in harmonic measurement, its capability of operating with nonstationary signals, and the possibility of implementing the algorithm on smart metering platforms. To test the performance in a real-world case study, the algorithm has been implemented on the STMicroelectronics NUCLEO—STM32H723ZG development board [33]. This board was chosen because it is similar to that inside the electronic meters normally used in distribution power systems, such as those addressed in the SInERT project or even used in most smart metering and household applications around the world. For example, the power meters shown in Figure 1 represent the measurement nodes whose metrological features could be improved by the algorithm developed in this paper.
The paper is organized as follows: in Section 2, the CZT algorithm is presented and analysed; in Section 3, the CZT algorithm on board implementation is explained; and the experimental results are finally reported in Section 4.

2. Case Study Algorithm: CZT

Harmonic analysis aims to perform a signal transformation from the time domain to the frequency domain in order to obtain the spectrum of the input signal and evaluate the possible presence of harmonics. In power quality applications, this type of analysis is particularly important because it allows for the evaluation of significant parameters such as total harmonic distortion (THD), unwanted harmonic presence, harmonic pollution, etc. As mentioned in Section 1, signals can be stationary or not. Depending on the stationarity of the underlying signal, one spectral analysis algorithm could be preferred to another for its performance.
In fact, for FFT or DFT, the spectral resolution is inversely proportional to the observation window:
f R F F T = 1 T w
where f R F F T is the spectral resolution or the bin size, and T w is the observation window.
To improve the spectral resolution, a longer observation window is needed. For example, to obtain a spectral resolution of 5 Hz, T w must be 200 ms; if a better spectral resolution is needed, for example, equal to 1 Hz, the observation window must be enlarged to 1 s. If such spectral resolution is required, it is necessary to assume that the signal remains stationary for the entire duration of the observation window. On the other hand, if the signal is nonstationary, the DFT or FFT algorithm cannot be used unless a shorter observation window is used, in which case the assumption of signal stationarity can still be considered valid; however, the use of a DF or FFT algorithm with a short observation window may not result in a suitable frequency resolution. In this case, other spectral analysis algorithms could give better performances.
In this paper, the feasibility of the chirp Z-transform (CZT) algorithm is investigated because it does not entail the relationship of Equation (1) between the spectral resolution and the observation time. In the following, the basics of the CZT algorithm are summarized, putting into evidence its features in terms of spectral resolution improvement with respect to the DFT/FFT algorithm.

2.1. CZT Fundamentals

The Z-chirp transform, also known as the chirp Z-transform (CZT), is a transform that allows for information to be transformed from the time to frequency domains. The CZT algorithm offers a higher resolution than FFT, with flexibility in choosing the frequency bandwidth. Generally, in the field of digital signal analysis, the most commonly used algorithm is the FFT to identify tones, frequencies, harmonics, and study the frequency behaviour of a given signal. To understand the main difference between CZT and FFT, let’s consider the FFT and analyse the differences on equal terms. In the case of FFT, the frequency range goes from 0 Hz to fs/2 where fs is the sampling frequency with equally spaced samples; this involves a constant distance between two successive samples (Figure 2).
So, if a signal that has two harmonics close to each other is considered, the spectral resolution would be fundamental for their identification. If the resolution is not sufficient, a single lobe will be displayed, as shown in Figure 3a. The figure shows an input signal consisting of two ideal Dirac deltas at frequencies between two “bin sizes”, whose frequency signal is in the band of interest, so the transform approximates the two deltas in a single lobe due to poor resolution. In the FFT algorithm, the frequency resolution depends on the observation window; the greater the observation window, the better the frequency resolution, as their ratio is inversely proportional (1). If the resolution is not adequate, it may happen that the signal is not displayed correctly, and the transform shown in Figure 3a can be obtained. Indeed, the two close Dirac deltas appear inside the main lobe, so it is impossible to discriminate between them. Now if a CZT is applied to the same signal, the two Dirac deltas could be more efficiently captured, and the two lobes can be seen as shown in Figure 3b. Of course, not even with the CZT can we see two ideal deltas, but the increase in resolution permits us to identify two lobes instead of one.

2.2. CZT Algorithm

To understand how it is possible to increase the resolution using the CZT, the goniometric circle must be used. In more details, starting from a sequence x[n] of N discrete elements, the Fourier transform of the input signal can be written as X e j ω . In Figure 4, a representation of M elements among the e j ω is shown in the goniometric circle of unit radius.
The Fourier transform equally distributes the points on the goniometric circle. The distance between one point and the next represents the spectral resolution. Starting from A(1;0), it is possible to consider:
ω k = ω 0 + k Δ ω ,   k = 0 ,   1 ,   ,   M 1
where ω 0 is the starting frequency and Δ ω is the increment. For DFT and FFT, ω 0 = 0 , M = N, Δ ω = 2 π / N . The index k represents the k-th element of the output sequence. Starting from the following expression of DFT:
X e j ω k = n = 0 N 1 x n e j ω k n ,   k = 0 ,   1 ,   ,   M 1
and substituting (2) into (3), CZT is obtained in (4).
X e j ω k = n = 0 N 1 x n e j ω 0 n e j Δ ω k n ,   k = 0 ,   1 ,   ,   M 1 .
If W is defined as the following:
W = e j Δ ω
then, Equation (4) can be written as (6),
X e j ω k = n = 0 N 1 x n e j ω 0 n W n k .
Considering n k = 1 2 n 2 + k 2 k n 2 , (6) can be written as indicated in (7),
X e j ω k = n = 0 N 1 x n e j ω 0 n W n 2 / 2 W k 2 / 2 W n k 2 / 2 .
If we denote g n = x n e j ω 0 n W n 2 / 2 , (7) changes into (8).
X e j ω k = W k 2 / 2 n = 0 N 1 g n W n k 2 / 2 , k = 0 ,   1 ,   ,   M 1  
Equation (8) shows that X e j ω k elements correspond to the convolution between g[n] samples and the terms W n k 2 / 2 followed by the product with W k 2 / 2 . Starting from these considerations, (8) can be represented as shown in Figure 5.
Considering (4), the frequency band of interest can be selected by choosing Δ ω = 2 π Δ f value, so frequency resolution can be written as follows:
f R C Z T = Δ f N .

2.3. Example of Comparison between CZT and FFT

To appreciate the differences between FFT and CZT algorithms, a simple numerical example can be provided. It refers to the test case conditions of the experimental results reported in the following, i.e., the processing of signals acquired with a number of samples equal to 800, a sampling frequency f s = 10 kHz, and a frequency band of interest between 0 Hz and 500 Hz. In the case of the FFT, the resolution is given by (10); for the CZT, the resolution is given by (11), instead.
f R F F T = 1 T w = f s N = 10000 800 = 12.5   Hz
f R C Z T = Δ f N = 500 800 = 0.625   Hz
A sampling frequency of 10 kHz and 800 points correspond to an observation window of 80 ms (four cycles of the fundamental power system frequency of 50 Hz). The spectral resolution that we obtain with the FFT is 12.5 Hz. The CZT resolution does not depend on the observation window, allowing for a higher resolution of 0.625 Hz with the same number of samples.
This leads to a different capability of detecting near spectral components between the two algorithms, as shown in Figure 6. In the figure, the FFT and CZT spectra are compared for a 50 Hz signal with near spectral components (sampling conditions of the previous example, i.e., f s = 10 kHz, number of samples equal to 800, frequency band of interest between 0 Hz and 500 Hz). From the figure, it can be observed that the frequency components are distinguishable in the CZT plot while they are not in the FFT plot.

3. Architecture and Hardware Implementation

The CZT algorithm has been implemented on a microcontroller development board, the NUCLEO-STM32H723ZG. This kind of platform has been chosen, instead of others, such as FPGA, as it is similar to those typically used in electronic smart meters used in power distribution systems. In fact, FPGA boards are typically more expensive than microcontroller boards, and they are not mostly used in common commercial devices for smart metering applications, including power quality monitoring and analysis. Even if FPGA increase the computational capabilities and be very useful for many other applications, in the aim of this paper was to investigate the feasibility of implementing power quality metrics (with proper accuracy and resolution features even with nonstationary signals) on low cost existing devices, to enable the large-scale use of such devices in different smart metering applications, such as those related to distributed generation and/or storage systems, EV charging stations, and so on.

3.1. CZT Architecture

The signal is windowed to reduce scallop loss and leakage errors. Precisely, a Hanning window is chosen and thus expressed as follows:
w n = 0.5 1 c o s 2 π n N , 0 n N  
The retained sampling frequency f s is 10 kHz. The latter value is compatible with commercial devices frequencies. An observation window T w of 80 ms was chosen. Considering these parameters, the number of points N for the CZT algorithm is 800. The frequency interval Δ f was set to 500 Hz. Hence, it is possible to summarize the parameters as follows:
Δ f = 500   Hz
f s = 10     kHz
T w = 80     ms
N = f s · T w = 800
Furthermore, a number of output samples equal to the number of input samples was chosen, i.e., k = n.
Equation (6) can be written as (17):
X k = n = 0 N 1 x n A n W n k
where A = e j ω 0 n . Considering module and phase, (17) can be written as indicated in (18).
X k = n = 0 N 1 x n · A 0 n e j θ 0 n · W 0 n e j Δ ω n k .
If the starting coordinate point (1; 0) of the goniometric circle is followed by the path along the circumference, the radius will be constant and equal to 1. Furthermore, we set the terms A 0 = 1 , θ 0 = 0 , W 0 = 1 , and we obtain (19).
X k = n = 0 N 1 x n e j Δ ω n k
It is possible to write Δ ω as (20),
Δ ω = 2 π Δ f N f s
So, (19) becomes (21),
X k = n = 0 N 1 x n e j 2 π Δ f N f s n k
Consider n · k = 1 2 n 2 + k 2 k n 2 , (21) can be written as (22).
X k = n = 0 N 1 x n e j 2 π Δ f N f s · 1 2 n 2 + k 2 k n 2 .
Because π Δ f N f s is a constant, it can be defined as a parameter C = π Δ f N f s , then (22) becomes (23).
X k = e j C k 2 n = 0 N 1 { x n e j C n 2 } · e j C k n 2 .
So, the CZT implementation can be summarized in four “stages”, which can be drawn as in the block diagram shown in Figure 7. A computational cost estimation can be done by observing Figure 7. Stage 1 is composed of Hanning register multiplication, the input signal, and a complex register. This stage consists of N complex operations, meaning four multiplications and two sums. Stage 2 consists of k × n multiplications, so the total number depends on k. In our algorithm, we chose k = n, so N 2 operations will be executed. Stage 3 is composed of N sums, while Stage 4 is similar to Stage 1 in terms of the number of operations, that is N complex operations will be performed. This means that Stage 2 operates with the largest number of operations—that is N 2 . Thus, the final computational cost can be compared to the DFT one.
On the basis of the aforementioned definition relating to the CZT algorithm, the system input-output can be summarized as shown in Figure 8. Particularly, the system inputs are: the system clock (CLK), the system reset (which clears both outputs and internal registers), and two information inputs that can be used either for two real signals or for one complex signal. Finally, the system outputs are the CZT real and imaginary parts.

3.2. Implementation of CZT on Nucleo STM32H723ZG

The STM32H7 Nucleo-144 development kit is an affordable and easy-to-use board designed for rapid development and evaluation of STM32H7 microcontrollers. It features a powerful Arm Cortex-M7 processor, which offers exceptional performance while maintaining energy efficiency and user friendliness. The Cortex-M7 processor has a range of features, including a six-stage dual-issue pipeline, dynamic branch prediction, Harvard architecture with L1 caches, a 64-bit AXI interface, and two 32-bit DTCM interfaces. It also supports various memory interfaces, including separate instruction and data buses, a tightly coupled memory (TCM) interface, an AXI bus interface, and a dedicated low-latency AHB-Lite peripheral bus.
This MCU has 1 Mbyte of flash and 564 kB of RAM, and it supports a set of DSP instructions, enabling efficient signal processing and complex algorithm execution. It also supports single and double-precision floating-point units (FPU) to speed up software development.
For onboard code implementation, STM32CubeMX and STM32CubeIDE were used for pin initialization, code generation, debugging, and download. STM32CubeMX is a graphical tool for easy configuration of STM32 microcontrollers, while STM32CubeIDE is used for onboard code debugging and download. CMSIS DSP 1.9.0 libraries were employed to perform operations in FPU, and there are functions for basic mathematical calculations and operations with complex numbers. Overall, the STM32H7 Nucleo-144 development kit is an excellent choice for various application areas, including industrial automation, medical devices, high-end audio, image, and voice processing, sensor fusion, and motor control. A complex number can be written in Euler’s formula as follows:
e ± j x = c o s x ± j s i n x
Considering input numbers written as z 1 = a + j b and z 2 = c + j d , a complex multiplication becomes:
z 1 · z 2 = a c b d + j a d + b c
To perform the operations indicated in (25), there are two different possibilities: to perform multiplications using the library of complex functions or to perform the operations using basic mathematical functions (algebraic sums and multiplications). For the use of complex operations, it is necessary to arrange the vector to have the real value in the even places and the imaginary value in the odd places. The time to perform the CZT transformation has been measured by an oscilloscope for both cases (i.e., using complex functions and using basic mathematical operations). Less time was measured using the complex function library.

4. Experimental Results

4.1. CZT Validation Methodology

To validate the algorithm implemented on the STM32 Nucleo board, several experimental data sets were used as input for the on-board algorithm, and the CZT results were collected and compared with those of a reference virtual instrument implemented in a LabVIEW environment. As regards the experimental data, in [32], the authors described a test bench to acquire different signals, both stationary and non-stationary, to test the CZT algorithm’s performance. More precisely, the output signals from the transducers were sent to a NI (National Instrument) USB 9239 acquisition board that has the following characteristics: 24-bit simultaneous sampling, maximum sampling rate f s m a x = 50   kS / s per channel, built-in anti-aliasing filter with automatic adjustment of the cut-off frequency as a function of sampling frequency, input voltage range ± 10 V (peak-to-peak), isolation voltage between channels 250 V. The sampling frequency was set at 10 kS/s. The acquisition board was connected to a PC, where the virtual instrument was implemented in the LabVIEW environment to perform the spectral analysis of the acquired signals. The outputs collected at the end of the algorithm were plotted, and the measurement accuracy was also calculated. CZT in the LabVIEW environment was performed using a MATLAB script. Through LabVIEW, it is possible to set the number of points of the signal portion to be analysed, the sampling frequency, and the frequency range of interest. Before elaboration, the signal has been windowed (using a Hanning window). The front panel of the tool for calculating the CZT in the LabVIEW environment is shown in Figure 9. The front panel shows the trends of the signal and its spectrum, which are used as a reference for comparisons with the algorithm implemented on the microcontroller.
The tests were carried out under different load conditions:
  • A fluorescent lamp bench (80 W) with an additional resistive load (200 W);
  • A vacuum cleaner;
  • A dimmer;
  • A hand-held electric drill.
For each test, the acquisitions were made by connecting one load. Each single load was powered by mains voltage (230 V, 50 Hz). Voltage and current were acquired, respectively, through a Hall effect differential probe (Tektronix P5200) and a shunt (resistance 0.1 Ω, accuracy 0.001%, maximum current 22 A). To obtain a non-stationary signal, an arc generator was connected in series with the above-mentioned loads.
The results produced by the virtual instrument in LabVIEW were used as reference values for comparison with those obtained with the algorithm implemented in the STM32 Nucleo. The input data for both instruments were obtained experimentally through the above-described measurement bench by acquiring the current absorbed by the different loads. For each test case, both absolute and relative errors of STM32 Nucleo CZT and harmonic measurements were evaluated with respect to the LabVIEW instrument. In detail, for the absolute errors, the differences (absolute values) between the two spectra samples were calculated and plotted; for the measurement of each harmonic component, the relative error eh% was calculated as follows:
e h % = A h _ S T M 32 A h _ L a b V I E W A h _ L a b V I E W 100
where: A h _ L a b V I E W   is the peak value of the h-harmonic lobe of the LabVIEW CZT spectrum and A h _ S T M 32 is the peak value of the h-harmonic lobe of the STM32 Nucleo CZT spectrum.
The detailed results for each test case are reported in the following subsections.

4.1.1. Test Case 1: Fluorescent Lamps with Additional Resistive Load

Figure 10 shows the sampled signal of the fluorescent lamp bench with an additional resistive load, in the stationary case. This is a case with a stationary current waveform and only even harmonics in the current spectrum. Figure 11, Figure 12 and Figure 13 show the STM32 Nucleo CZT output and errors (absolute and relative, compared with the results obtained with the LabVIEW virtual instrument), respectively.
It is possible to observe that the absolute error is greater near values that are around zero. In any case, its maximum value is less than 0.01 A in absolute value (the maximum percentage error is lower than 0.35%).
Figure 14 shows the sampled signal of the fluorescent lamp bench with an additional resistive load in the nonstationary case. Figure 15, Figure 16 and Figure 17 show the STM32 Nucleo CZT output and errors (absolute and relative, compared with LabVIEW results), respectively.
The nonstationary behaviour can be visually recognized, as noise and spikes are clearly visible in the current waveform. In the nonstationary case, the current value reduced its amplitude by about 42 mA, while the odd harmonics increased their value, in particular the fifth harmonic increased by about 20 mA. As regards the STM32 Nucleo CZT results, the percentage errors on harmonic amplitudes are slightly higher for the nonstationary case than for the stationary one (maximum error of around 0.51%).

4.1.2. Test Case 2: Vacuum Cleaner

Figure 18 shows the sampled vacuum cleaner current signal in stationary conditions. This is a case where both even harmonics and inter-harmonics are present in the current spectrum (detected around fundamental and third, fifth, and seventh harmonic components). Figure 19, Figure 20 and Figure 21 show the STM32 Nucleo CZT output and errors (absolute and relative, compared with LabVIEW results).
Figure 22 shows the sampled signal of the current absorbed by the vacuum cleaner in nonstationary conditions. Figure 23, Figure 24 and Figure 25 show the STM32 Nucleo CZT output and errors (absolute and relative, compared with LabVIEW results), respectively. Although the input waveforms in both the stationary and non-stationary cases look very similar, the CZT looks very different. The third harmonic is greater than the others, and inter-harmonics are also detected in the current spectra. As for the previous case, the errors on harmonic amplitudes are slightly higher for the nonstationary case (maximum error of 0.68%) than for the stationary one (maximum error of 0.59%).

4.1.3. Test Case 3: Dimmer

Figure 26 shows the sampled signal of a dimmer current in the stationary case. This is a case where small noise is also present in stationary conditions and the current waveform is strongly partialized; in comparison with the test case 1, harmonics are higher (in percentage with respect to the fundamental) than those of the test case 1. Figure 27, Figure 28 and Figure 29 show the STM32 Nucleo CZT output and errors (absolute and relative, compared with LabVIEW results), respectively.
Figure 30 shows the sampled signal of the dimmer current signal in the nonstationary case. Figure 31, Figure 32 and Figure 33 show the STM32 Nucleo CZT output and errors (absolute and relative, compared with LabVIEW results), respectively. In comparison with the stationary case, the current waveform is even more partialized, and noise is more visible in the current waveform. The errors on harmonic amplitudes are higher for the nonstationary case (maximum error of 1.41%) than for the stationary one (maximum error of 0.25%).

4.1.4. Test Case 4: Hand-Held Electric Drill

Figure 34 shows the sampled signal of a hand-held electric drill in a stationary case. This is a case where the current waveform is strongly partialized and only the positive half-waves are present in the current waveforms. Both even and odd harmonics are present in the current spectrum, whose amplitudes are high if compared with the fundamental component (the first three harmonics amplitudes are higher than 50% of the fundamental one). Moreover, a DC component is visible in the current spectrum (higher than the fundamental component). Figure 35, Figure 36 and Figure 37 show the STM32 Nucleo CZT output and errors (absolute and relative, compared with LabVIEW results), respectively.
Figure 38 shows the sampled signal of a hand-held electric drill in a nonstationary case. Figure 39, Figure 40 and Figure 41 show the STM32 Nucleo CZT output and errors (absolute and relative, compared with LabVIEW results), respectively. Noise is visible in both the current waveform and the spectrum. As in previous cases, errors on harmonics are slightly higher in the nonstationary case than in the stationary one (with maximum values lower than 1% in both cases).

4.2. Time Analysis

Thanks to (23), it is possible to process one sample at a time. Samples are recorded in a vector, so they can be processed at maximum speed, i.e., there are no waiting times between the end of the processing of one sample and the arrival of the next. Considering the sampling frequency is equal to 10 kHz, the time interval between two samples is 100 μs. The following parameters were set for time measurements:
  • Sample rate: 312.5 MS/s
  • Record length: 17.1875 Mpts
  • Time division: 5.5 ms/div
Figure 42 shows the measurement of the time required for performing the CZT using the MCU. To measure time, a digital I/O pin is used: when the CZT algorithm starts, the pin is set, and when the algorithm is finished, the pin is reset. It takes approximately 52.9 ms, i.e., less than the observation window of 80 ms corresponding to 4 signal periods.

4.3. Results Discussion

The results presented in the previous subsections show the feasibility of the algorithm implementation on the microcontroller board in terms of accuracy in harmonic analysis even in nonstationary conditions. In fact, in the worst case, the maximum percentage errors are lower than 1.5%. To compare such errors with some relevant standards in the field, reference can be made to IEC 61000-4-7 [34], which gives the accuracy requirements for harmonics and inter-harmonics measurements for power systems applications. This standard provides the following maximum allowable errors for current measurements: for Class I instruments, ± 5% Im for Im ≥ 3% Inom; ± 0.15% Inom for Im < 3% Inom (being Im the measured value and Inom the nominal range of the instrument); for Class II instruments: ± 5% Im for Im ≥ 10% Inom; ± 0.5% Inom for Im < 10% Inom. For the test cases herein presented, assuming as reference Inom value the amplitude of current, the following summary table can be obtained (see Table 1), which reports the comparison between the maximum errors (for all test cases, in stationary and nonstationary conditions, respectively) and the correspondent maximum allowable error according to IEC 61000-4-7. From Table 1, it can be seen that the standard limits (Class I) are fulfilled for all test cases.
It should be noted that the maximum allowable errors of [34] are related to stationary conditions and a DFT/FFT analysis performed on N acquired samples into an observation window of Tw = 200 ms (i.e., 10/12 cycles of the power system frequency of 50/60 Hz, respectively). As shown in Section 2, this leads to a frequency resolution of 5 Hz, independently from the choice of the sampling frequency and the consequent value of N (the higher the observation window, the higher is N, being Tw = N/fs constant). The computational burden is O(N2) or O(N logN) for the DFT or FFT algorithms, respectively. If a shorter observation window is required for the analysis of a nonstationary signal, this results in a worse frequency resolution; for example, if Tw = 80 ms (as for the test cases herein presented), the DFT/FFT frequency resolution increases to 12.5 Hz. On the other hand, with the CZT algorithm and the specified frequency band of interest (for example, 500 Hz for the test cases herein presented), the frequency resolution is improved to 0.625 Hz, according to Equation (11), with the same computational burden as the DFT algorithm.
Obviously, the computational burden will have an impact on the execution time of the spectral analysis, which will depend on both the algorithm used, and the computational resources of the board used for the implementation. For example, in [35], the authors carried out a feasibility study on the power quality metrics implementation on a different smart metering platform, i.e., the STCOMET, by STMicroelectronics [36]. The STCOMET has an integrated application core ARM® 32-bit Cortex™-M4F CPU, with 96 MHz of maximum frequency, 640 kB or 1 MB of embedded flash, 128 kB of embedded SRAM, and 8 kB of embedded shared RAM. In comparison with the Nucleo board used in this paper, the STCOMET has more limited features in terms of both memory and computational capabilities. In [35] it was shown that this platform can be suitable for the implementation of FFT analysis and other power quality metrics. On the other hand, the implementation of the CZT algorithm, as well as the DFT one, would be not feasible on STCOMET in terms of computational time needed for the algorithm execution (estimated time for CZT of about 160 ms, with the same observation window of the test cases herein presented, which is longer than the observation window itself). As shown in Section 4.2, such an implementation is feasible on the STM32 Nucleo board, not only in terms of accuracy features but also in terms of processing time.

5. Conclusions

The increase in nonlinear loads within smart grids causes a significant increase in harmonic pollution. In particular, the increased penetration of DG, the increase in electronic loads, and the widespread presence of EV charging points contribute to amplifying any distorted waveforms. The non-stationarity of the distorted signal is one of the crucial elements in choosing the most appropriate harmonic analysis algorithm. In this paper, harmonic analysis algorithms have been studied, and the CZT algorithm has been chosen and implemented on the STM32 Nucleo microcontroller platform. The signals used for the tests were acquired in the LabVIEW environment using an NI-9239 data acquisition card with a sampling rate of 10 kS/s. The CZT of different loads were calculated: a fluorescent lamp with an additional resistive load, a vacuum cleaner, a dimmer, and an electric drill. All loads were tested in stationary and non-stationary conditions. Results were compared with the CZT algorithm performed in a LabVIEW environment. The normalized absolute percentage error was calculated. The maximum normalized error obtained is lower than 1.5%. The results allow concluding that the CZT algorithm, despite its high computational cost, achieves a very high spectral resolution, and can be implemented on a low-cost hardware platform. Besides reliability, the computational speed of the algorithm was also tested, measuring the MCU processing time. An elaboration time of 52.9 ms was obtained, which is lower than the acquisition time. This demonstrates the feasibility of the proposed solution. A possible improvement for follow-up studies can be related to the optimization of the algorithm implementation and the microcontroller resource use in order to enable the possibility of implementing the code even in lower cost devices with more limited resources and the integration of the spectral analysis algorithm with further signal processing tools for the development of a multifunction metering device to be used for both energy metering, power quality monitoring, fault detection and so on.

Author Contributions

Conceptualization, A.C., V.C., D.D.C. and G.T.; data curation, G.A., S.G., N.P., V.D. and G.D.M.; investigation, A.C., V.C., V.B., D.D.C. and G.T.; methodology, G.A., M.B.-R., A.B.-B.Y., N.B.O. and G.T.; software, G.A., S.G., M.F., N.P. and V.D.; supervision, A.C., V.C., D.D.C., M.B.-R., A.B.-B.Y. and G.T.; validation, G.A., S.G., N.P., M.F. and G.D.M.; writing—original draft, G.A., S.G., N.P., V.B. and V.D.; resources M.F.; writing—review and editing, A.C., V.C., D.D.C., M.B.-R., A.B.-B.Y., N.B.O., G.T., M.F. and G.D.M.; funding acquisition D.D.C., M.B.-R., V.C. and N.B.O. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the following grant: Program IEV CT Italie Tunisie 2014–2020, Project n. IS_2.1_131, Project title: “Solutions innovantes pour l’intégration des énergies renouvelables sur le réseau électrique tunisien”, Project acronym: SInERT, CUP: B74I19001040006 and B74I18014130002. The paper content is responsibility of the authors and it does not necessarily reflect the point of view of the European Union or that of the Program Managing Authority.

Data Availability Statement

Not applicable.

Acknowledgments

The authors wish to thank STEG (Société Tunisienne de l’Electricité et du Gaz), SOPES (Ustica desalination plant management company) and D’Anna e Bonaccorsi (Ustica electrical DSO) associated partners of SInERT project, and Antonino Culcasi from Layer Electronics S.r.l. for their support in project development.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Joița, D.; Panait, M.; Dobrotă, C.-E.; Diniță, A.; Neacșa, A.; Naghi, L.E. The European Dilemma—Energy Security or Green Transition. Energies 2023, 16, 3849. [Google Scholar] [CrossRef]
  2. Zhao, D.; Wang, F.; Li, S.; Zhao, W.; Chen, L.; Huang, S.; Wang, S.; Li, H. An Optimization of Least-Square Harmonic Phasor Estimators in Presence of Multi-Interference and Harmonic Frequency Variance. Energies 2023, 16, 3397. [Google Scholar] [CrossRef]
  3. Mingotti, A.; Peretto, L.; Tinarelli, R. Low-Impact Current-Based Distributed Monitoring System for Medium Voltage Networks. Energies 2021, 14, 5308. [Google Scholar] [CrossRef]
  4. Crotti, G.; D’Avanzo, G.; Giordano, D.; Letizia, P.S.; Luiso, M. Extended SINDICOMP: Characterizing MV Voltage Transformers with Sine Waves. Energies 2021, 14, 1715. [Google Scholar] [CrossRef]
  5. Pau, M.; Ponci, F.; Monti, A.; Muscas, C.; Pegoraro, P.A. Distributed State Estimation for Multi-Feeder Distribution Grids. IEEE Open J. Instrum. Meas. 2022, 1, 9000112. [Google Scholar] [CrossRef]
  6. Cataliotti, A.; Cervellera, C.; Cosentino, V.; Di Cara, D.; Gaggero, M.; Maccio, D.; Marsala, G.; Ragusa, A.; Tine, G. An Improved Load Flow Method for MV Networks Based on LV Load Measurements and Estimations. IEEE Trans. Instrum. Meas. 2019, 68, 430–438. [Google Scholar] [CrossRef]
  7. Price, T.; Parker, G.; Vaucher, G.; Jane, R.; Berman, M. Microgrid Energy Management during High-Stress Operation. Energies 2022, 15, 6589. [Google Scholar] [CrossRef]
  8. Apse-Apsitis, P.; Krievs, O.; Avotins, A. Impact of Household PV Generation on the Voltage Quality in 0.4 kV Electric Grid—Case Study. Energies 2023, 16, 2554. [Google Scholar] [CrossRef]
  9. Sardina, M.A.; Abbasy, N.H.; El-Gammal, M. A Combined Framework for Demand Side Management and Power Quality Enhancement in Smart Grid Under Different Distributed Energy Resource Penetration. In Proceedings of the Electrical and Energy Conference (CIEEC) 2021 IEEE 4th International, Wuhan, China, 28–30 May 2021; pp. 1–7. [Google Scholar]
  10. Artale, G.; Caravello, G.; Cataliotti, A.; Cosentino, V.; Di Cara, D.; Guaiana, S.; Panzavecchia, N.; Tine, G. Measurement of Simplified Single- and Three-Phase Parameters for Harmonic Emission Assessment Based on IEEE 1459–2010. IEEE Trans. Instrum. Meas. 2021, 70, 9000910. [Google Scholar] [CrossRef]
  11. Cataliotti, A.; Cipriani, G.; Cosentino, V.; Di Cara, D.; Di Dio, V.; Guaiana, S.; Panzavecchia, N.; Tine, G. A prototypal architecture of a IEEE 1451 network for smart grid applications based on power line communications. IEEE Sens. J. 2015, 15, 2460–2467. [Google Scholar] [CrossRef]
  12. Grasel, B.; Baptista, J.; Tragner, M. Supraharmonic and Harmonic Emissions of a Bi-Directional V2G Electric Vehicle Charging Station and Their Impact to the Grid Impedance. Energies 2022, 15, 2920. [Google Scholar] [CrossRef]
  13. Rind, Y.M.; Raza, M.H.; Zubair, M.; Mehmood, M.Q.; Massoud, Y. Smart Energy Meters for Smart Grids, an Internet of Things Perspective. Energies 2023, 16, 1974. [Google Scholar] [CrossRef]
  14. Artale, G.; Maalej, A.; Ben Rhouma, O.; Ben-Romdhane, M.; Ben Othman, N.; Cataliotti, A.; Cosentino, V.; Culcasi, A.; Fiorino, M.; Guaiana, S.; et al. Innovative solutions for the integration of renewable energies on Tunisian and Sicilian electrical grids. In Proceedings of the 1st Workshop on BLOckchain for Renewables Integration, Palermo, Italy, 2–3 September 2022. [Google Scholar]
  15. Balwani, M.R.; Thirumala, K.; Mohan, V.; Bu, S.; Thomas, M.S. Development of a Smart Meter for Power Quality-Based Tariff Implementation in a Smart Grid. Energies 2021, 14, 6171. [Google Scholar] [CrossRef]
  16. Iturrino Garcia, C.A.; Bindi, M.; Corti, F.; Luchetta, A.; Grasso, F.; Paolucci, L.; Piccirilli, M.C.; Aizenberg, I. Power Quality Analysis Based on Machine Learning Methods for Low-Voltage Electrical Distribution Lines. Energies 2023, 16, 3627. [Google Scholar] [CrossRef]
  17. Gianesini, B.M.; Santos, I.N.; Ribeiro, P.F. Comparison of Methods for Determining Harmonic Distortion Contributions Using the IEEE Benchmark Test System. IEEE Trans. Power Deliv. 2023. [Google Scholar] [CrossRef]
  18. Oubrahim, Z.; Amirat, Y.; Benbouzid, M.; Ouassaid, M. Power Quality Disturbances Characterization Using Signal Processing and Pattern Recognition Techniques: A Comprehensive Review. Energies 2023, 16, 2685. [Google Scholar] [CrossRef]
  19. Duc, M.L.; Bilik, P.; Martinek, R. Harmonics Signal Feature Extraction Techniques: A Review. Mathematics 2023, 11, 1877. [Google Scholar] [CrossRef]
  20. Chukkaluru, S.L.; Affijulla, S. Review of Discrete Fourier Transform during Dynamic Phasor Estimation and the Design of Synchrophasor Units. ECTI Trans. Electr. Eng. Electron. Commun. 2023, 21, 248548. [Google Scholar]
  21. Wang, K.; Wen, H.; Li, G. Accurate Frequency Estimation by Using Three-Point Interpolated Discrete Fourier Transform Based on Rectangular Window. IEEE Trans. Ind. Inform. 2021, 17, 73–81. [Google Scholar] [CrossRef]
  22. Zhang, J.; Tang, L.; Mingotti, A.; Peretto, L.; Wen, H. Analysis of White Noise on Power Frequency Estimation by DFT-Based Frequency Shifting and Filtering Algorithm. IEEE Trans. Instrum. Meas. 2020, 69, 4125–4133. [Google Scholar] [CrossRef]
  23. Hoon, Y.; Mohd Radzi, M.A.; Mohd Zainuri, M.A.A.; Zawawi, M.A.M. Shunt Active Power Filter: A Review on Phase Synchronization Control Techniques. Electronics 2019, 8, 791. [Google Scholar] [CrossRef]
  24. Carpinelli, G.; Bracale, A.; Varilone, P.; Sikorski, T.; Kostyla, P.; Leonowicz, Z. A New Advanced Method for an Accurate Assessment of Harmonic and Supraharmonic Distortion in Power System Waveforms. IEEE Access 2021, 9, 88685–88698. [Google Scholar] [CrossRef]
  25. Quanyi, G.; Ke, P.; Qun, G.; Liang, F.; Chuanliang, X. Series arc fault identification method based on wavelet transform and feature values decomposition fusion DNN. Electr. Power Syst. Res. 2023, 221, 109391. [Google Scholar]
  26. Frigo, G.; Pegoraro, P.A.; Toscani, S. Design of Compressive Sensing Adaptive Taylor-Fourier Comb Filters for Harmonic Synchrophasor Estimation. IEEE Open J. Instrum. Meas. 2022, 1, 9000210. [Google Scholar] [CrossRef]
  27. Kim, B.; Kong, S.-H.; Kim, S. Low Computational Enhancement of STFT-Based Parameter Estimation. IEEE J. Sel. Top. Signal Process. 2015, 9, 1610–1619. [Google Scholar] [CrossRef]
  28. Carvalho, T.C.O.; Duque, C.A.; Silveira, P.M.; Ribeiro, P.F. Considerations on signal processing for power systems in the context of Smart Grids. In Proceedings of the 2013 IEEE Power & Energy Society General Meeting, Vancouver, BC, Canada, 21–25 July 2013; pp. 1–5. [Google Scholar] [CrossRef]
  29. Reza, M.S.; Hossain, M.M. Recursive DFT-Based Method for Fast and Accurate Estimation of Three-Phase Grid Frequency. IEEE Trans. Power Electron. 2022, 37, 49–54. [Google Scholar] [CrossRef]
  30. Wang, K.; Wang, L.; Yan, B.; Wen, H. Efficient Frequency Estimation Algorithm Based on Chirp-Z Transform. IEEE Trans. Signal Process. 2022, 70, 5724–5737. [Google Scholar] [CrossRef]
  31. Xu, Y.; Yi, H.; Zhang, W.; Xu, H. An Improved CZT Algorithm for High-Precision Frequency Estimation. Appl. Sci. 2023, 13, 1907. [Google Scholar] [CrossRef]
  32. Artale, G.; Cataliotti, A.; Cosentino, V.; Di Cara, D.; Nuccio, S.; Tine, G. Arc Fault Detection Method Based on CZT Low-Frequency Harmonic Current Analysis. IEEE Trans. Instrum. Meas. 2017, 66, 888–896. [Google Scholar] [CrossRef]
  33. Datasheet of STM32H742xI/G S Microcontrollers. Available online: https://www.st.com/resource/en/datasheet/stm32h743vi.pdf (accessed on 21 March 2023).
  34. 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. International Electrotechnical Commission: Geneva, Switzerland, 2002.
  35. Artale, G.; Caravello, G.; Cataliotti, A.; Cosentino, V.; Di Cara, D.; Dipaola, N.; Guaiana, S.; Panzavecchia, N.; Sambataro, M.G.; Tinè, G. PQ and Harmonic Assessment Issues on Low-Cost Smart Metering Platforms: A Case Study. Sensors 2020, 20, 6361. [Google Scholar] [CrossRef]
  36. Guyard, P.; Fiorelli, R.; Houee, J. AN4732, ApplicationNote. In STCOMET Smart Meter and Power Line Communication System-on-Chip Development Kit; STMIcroelectronics: Geneva, Switzerland, 2017. [Google Scholar]
Figure 1. Architecture of the SInERT project pilot site.
Figure 1. Architecture of the SInERT project pilot site.
Energies 16 04063 g001
Figure 2. FFT frequency resolution.
Figure 2. FFT frequency resolution.
Energies 16 04063 g002
Figure 3. Signal with two lobes close to each other. Qualitative comparison between FFT (a) and CZT (b) spectra. CZT resolution is higher than FFT, so it is possible to discriminate between two lobes.
Figure 3. Signal with two lobes close to each other. Qualitative comparison between FFT (a) and CZT (b) spectra. CZT resolution is higher than FFT, so it is possible to discriminate between two lobes.
Energies 16 04063 g003
Figure 4. Complex plane representation of equally spaced elements in radians.
Figure 4. Complex plane representation of equally spaced elements in radians.
Energies 16 04063 g004
Figure 5. Block representation of (8).
Figure 5. Block representation of (8).
Energies 16 04063 g005
Figure 6. Signal with near frequency components in the signal spectrum. Comparison between the FFT (a) and CZT (b) spectra of a signal. Sampling frequency of 10 kHz, number of acquired samples equal to 800, frequency band of interest for CZT 0–500 Hz.
Figure 6. Signal with near frequency components in the signal spectrum. Comparison between the FFT (a) and CZT (b) spectra of a signal. Sampling frequency of 10 kHz, number of acquired samples equal to 800, frequency band of interest for CZT 0–500 Hz.
Energies 16 04063 g006aEnergies 16 04063 g006b
Figure 7. Implementation block scheme of CZT algorithm.
Figure 7. Implementation block scheme of CZT algorithm.
Energies 16 04063 g007
Figure 8. Black box of input-output system.
Figure 8. Black box of input-output system.
Energies 16 04063 g008
Figure 9. LabView virtual instrument front panel.
Figure 9. LabView virtual instrument front panel.
Energies 16 04063 g009
Figure 10. Stationary fluorescent lamps with resistive loads—current waveform.
Figure 10. Stationary fluorescent lamps with resistive loads—current waveform.
Energies 16 04063 g010
Figure 11. Stationary fluorescent lamps with resistive loads—STM32 Nucleo CZT.
Figure 11. Stationary fluorescent lamps with resistive loads—STM32 Nucleo CZT.
Energies 16 04063 g011
Figure 12. Stationary fluorescent lamps with resistive loads—CZT Absolute error (STM32 Nucleo vs. LabVIEW).
Figure 12. Stationary fluorescent lamps with resistive loads—CZT Absolute error (STM32 Nucleo vs. LabVIEW).
Energies 16 04063 g012
Figure 13. Stationary fluorescent lamps with resistive loads—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Figure 13. Stationary fluorescent lamps with resistive loads—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Energies 16 04063 g013
Figure 14. Nonstationary fluorescent lamp with resistive load—current waveform.
Figure 14. Nonstationary fluorescent lamp with resistive load—current waveform.
Energies 16 04063 g014
Figure 15. Nonstationary fluorescent lamps with resistive load—STM32 Nucleo CZT.
Figure 15. Nonstationary fluorescent lamps with resistive load—STM32 Nucleo CZT.
Energies 16 04063 g015
Figure 16. Nonstationary fluorescent lamps with resistive loads—CZT absolute error (STM32 Nucleo vs. LabVIEW).
Figure 16. Nonstationary fluorescent lamps with resistive loads—CZT absolute error (STM32 Nucleo vs. LabVIEW).
Energies 16 04063 g016
Figure 17. Nonstationary fluorescent lamps with resistive loads—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Figure 17. Nonstationary fluorescent lamps with resistive loads—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Energies 16 04063 g017
Figure 18. Stationary vacuum cleaner—current waveform.
Figure 18. Stationary vacuum cleaner—current waveform.
Energies 16 04063 g018
Figure 19. Stationary vacuum cleaner—STM32 Nucleo CZT.
Figure 19. Stationary vacuum cleaner—STM32 Nucleo CZT.
Energies 16 04063 g019
Figure 20. Stationary vacuum cleaner—CZT absolute error (STM32 Nucleo vs. LabVIEW).
Figure 20. Stationary vacuum cleaner—CZT absolute error (STM32 Nucleo vs. LabVIEW).
Energies 16 04063 g020
Figure 21. Stationary vacuum cleaner—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Figure 21. Stationary vacuum cleaner—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Energies 16 04063 g021
Figure 22. Nonstationary vacuum cleaner—current waveform.
Figure 22. Nonstationary vacuum cleaner—current waveform.
Energies 16 04063 g022
Figure 23. Nonstationary vacuum cleaner—STM32 Nucleo CZT.
Figure 23. Nonstationary vacuum cleaner—STM32 Nucleo CZT.
Energies 16 04063 g023
Figure 24. Nonstationary vacuum cleaner—CZT absolute error (STM32 Nucleo CZT vs. LabVIEW).
Figure 24. Nonstationary vacuum cleaner—CZT absolute error (STM32 Nucleo CZT vs. LabVIEW).
Energies 16 04063 g024
Figure 25. Nonstationary vacuum cleaner—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Figure 25. Nonstationary vacuum cleaner—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Energies 16 04063 g025
Figure 26. Stationary dimmer—current waveform.
Figure 26. Stationary dimmer—current waveform.
Energies 16 04063 g026
Figure 27. Stationary dimmer—STM32 Nucleo CZT.
Figure 27. Stationary dimmer—STM32 Nucleo CZT.
Energies 16 04063 g027
Figure 28. Stationary dimmer—CZT absolute error (STM32 Nucleo vs. LabVIEW).
Figure 28. Stationary dimmer—CZT absolute error (STM32 Nucleo vs. LabVIEW).
Energies 16 04063 g028
Figure 29. Stationary dimmer—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Figure 29. Stationary dimmer—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Energies 16 04063 g029
Figure 30. Nonstationary dimmer—current waveform.
Figure 30. Nonstationary dimmer—current waveform.
Energies 16 04063 g030
Figure 31. Nonstationary dimmer—STM32 Nucleo CZT.
Figure 31. Nonstationary dimmer—STM32 Nucleo CZT.
Energies 16 04063 g031
Figure 32. Nonstationary dimmer—CZT absolute error (STM32 Nucleo vs. LabVIEW).
Figure 32. Nonstationary dimmer—CZT absolute error (STM32 Nucleo vs. LabVIEW).
Energies 16 04063 g032
Figure 33. Nonstationary dimmer—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Figure 33. Nonstationary dimmer—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Energies 16 04063 g033
Figure 34. Stationary hand-held electric drill—current waveform.
Figure 34. Stationary hand-held electric drill—current waveform.
Energies 16 04063 g034
Figure 35. Stationary hand-held electric drill—STM32 Nucleo CZT.
Figure 35. Stationary hand-held electric drill—STM32 Nucleo CZT.
Energies 16 04063 g035
Figure 36. Stationary hand-held electric drill—CZT absolute error (STM32 Nucleo vs. LabVIEW).
Figure 36. Stationary hand-held electric drill—CZT absolute error (STM32 Nucleo vs. LabVIEW).
Energies 16 04063 g036
Figure 37. Stationary hand-held electric drill—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Figure 37. Stationary hand-held electric drill—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Energies 16 04063 g037
Figure 38. Nonstationary hand-held electric drill—current waveform.
Figure 38. Nonstationary hand-held electric drill—current waveform.
Energies 16 04063 g038
Figure 39. Nonstationary hand-held electric drill—STM32 Nucleo CZT.
Figure 39. Nonstationary hand-held electric drill—STM32 Nucleo CZT.
Energies 16 04063 g039
Figure 40. Nonstationary hand-held electric drill—CZT absolute error (STM32 Nucleo vs. LabVIEW).
Figure 40. Nonstationary hand-held electric drill—CZT absolute error (STM32 Nucleo vs. LabVIEW).
Energies 16 04063 g040
Figure 41. Nonstationary hand-held electric drill—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Figure 41. Nonstationary hand-held electric drill—Relative errors of harmonic amplitudes (STM32 Nucleo CZT vs. LabVIEW).
Energies 16 04063 g041
Figure 42. Oscilloscope screenshot for CZT algorithm elaboration time.
Figure 42. Oscilloscope screenshot for CZT algorithm elaboration time.
Energies 16 04063 g042
Table 1. Summary of results and comparison with the maximum allowable error according to IEC 61000-4-7.
Table 1. Summary of results and comparison with the maximum allowable error according to IEC 61000-4-7.
Harmonic Current AmplitudesTest Condition
(Stationary/Nonstationary)
Maximum
Obtained Error in All Test Cases
IEC 61000-4-7
Maximum
Allowable Error
(Class I)
Im ≥ 3% InomStationary0.6% Im±5% Im
Nonstationary1.1% Im
Im < 3% InomStationary0.07% Inom±0.15% Inom
Nonstationary0.09% Inom
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

Artale, G.; Panzavecchia, N.; Cosentino, V.; Cataliotti, A.; Ben-Romdhane, M.; Benazza-Ben Yahia, A.; Boscaino, V.; Ben Othman, N.; Ditta, V.; Fiorino, M.; et al. CZT-Based Harmonic Analysis in Smart Grid Using Low-Cost Electronic Measurement Boards. Energies 2023, 16, 4063. https://0-doi-org.brum.beds.ac.uk/10.3390/en16104063

AMA Style

Artale G, Panzavecchia N, Cosentino V, Cataliotti A, Ben-Romdhane M, Benazza-Ben Yahia A, Boscaino V, Ben Othman N, Ditta V, Fiorino M, et al. CZT-Based Harmonic Analysis in Smart Grid Using Low-Cost Electronic Measurement Boards. Energies. 2023; 16(10):4063. https://0-doi-org.brum.beds.ac.uk/10.3390/en16104063

Chicago/Turabian Style

Artale, Giovanni, Nicola Panzavecchia, Valentina Cosentino, Antonio Cataliotti, Manel Ben-Romdhane, Amel Benazza-Ben Yahia, Valeria Boscaino, Noureddine Ben Othman, Vito Ditta, Michele Fiorino, and et al. 2023. "CZT-Based Harmonic Analysis in Smart Grid Using Low-Cost Electronic Measurement Boards" Energies 16, no. 10: 4063. https://0-doi-org.brum.beds.ac.uk/10.3390/en16104063

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