1 Introduction

The electric power system (EPS) and its loads are susceptible to failures and disturbances that can affect their operating conditions. The power quality (PQ) concept emerges in this context, assessing voltage and current deviations from a pure sinusoidal waveform with constant frequency and magnitude (Dugan et al. 2004). Thus, the analysis of the frequency content of signals is a fundamental task for PQ monitoring.

In this scenario, considering waveform distortions, the traditional power calculation presented in Steinmetz (1897) is not suitable (de Almeida Coelho and Brito 2020). One of the primary properties of the traditional power theory is power calculation assuming the root mean square (RMS) values of signals in its integrity, i.e., not considering separately the RMS values of each frequency component. On the other hand, in non-sinusoidal conditions, it is important to distinguish the RMS values of each frequency component. Thus, to improve the power measurement under non-sinusoidal conditions, some methods defined on frequency-domain have been proposed (Budeanu 1927; Shepherd and Zakikhani 1972; Sharon 1973; Czarnecki 1983), which are based on Fourier analysis.

Besides the approaches based on the Fourier Transform, some methods employ the Wavelet Transform (WT) and its variants to power measurement (Yoon and Devaney 1998, 2000; Hamid et al. 2002; Driesen and Belmans 2003; Morsi and El-Hawary 2007, 2008; Vatansever and Ozdemir 2008; Morsi and El-Hawary 2009; Alves et al. 2014, 2017), in which the estimation of power components usually does not consider individual frequency components of voltage and current signals.

In a preliminary paper (de Almeida Coelho and Brito 2020), the authors have presented an analysis of the accuracy of RMS values estimated using the Stationary Discrete Wavelet Packet Transform (SDWPT). This work extends the previous study, comprehensively addressing the estimation of RMS values in frequency bands according to the Stationary Discrete Wavelet Transform (SDWT) and the SDWPT. Furthermore, the RMS values estimated via SDWT and SDWPT were compared to the ones calculated using the Discrete Fourier Transform (DFT). Thus, the main contributions of the present paper include the following three aspects:

  • From the frequency response of filters based on Daubechies and Coiflets families (Daubechies 1992), an analysis of the effects of mother wavelet choice on RMS values estimation is addressed, indicating which wavelets of these families are more susceptible to a magnitude damping and spectrum leakage;

  • An analysis of the accuracy of RMS values estimated via SDWT and SDWPT is performed, evincing the specific conditions of signals which can cause misrepresentation of this parameter. The results consistently demonstrate that the SDWT and SDWPT have some limitations to the estimation of RMS values of fundamental and non-fundamental components defined in IEEE Std. 1459-2010;

  • The effects of different aspects on the estimation of RMS values are also investigated, namely noisy conditions, magnitude variation, and sampling frequency.

The remainder of this paper is organized as follows. In Sect. 2, the WT is briefly introduced. The methodology adopted in this work is presented in Sect. 3. In Sect. 4, the obtained results are presented, as well the related analysis and discussions. Finally, in Sect. 5, the conclusions extracted from the obtained results are presented.

2 Wavelet Transform

The Wavelet analysis is based on the decomposition of a signal using a prototype function with adaptable scaling properties (Littler and Morrow 1999), called the mother wavelet. The wavelets are generated in the form of translations and dilations of the mother wavelet, providing a local representation in both time and frequency domains of a given signal. Both the SDWT and SDWPT use low- and high-pass filters associated with a mother wavelet to divide the frequency band of the input signal. The features of these two wavelet-related transforms are described below.

2.1 Stationary Discrete Wavelet Transform (SDWT)

The multiresolution algorithm proposed in Mallat (1989) allows the Discrete Wavelet Transform (DWT) to decompose a discrete signal in scaling and wavelet coefficients in different decomposition levels. The scaling coefficients are related to low-frequency components, whereas the wavelet coefficients are associated with high-frequency components. However, in each decomposition level, the DWT performs a down-sampling process by a factor of two; hence, a subsequent coefficient is represented by only half the amount of samples. That is, the DWT is a time-variant transform and its application is restricted to signals in which the number of samples is a power of two.

On the other hand, the SDWT is a time-invariant transform, which allows its application to a discrete signal regardless of the number of samples. At the m decomposition level, the scaling, \(s_m[n]\), and wavelet, \(w_m[n]\), coefficients of the SDWT are defined by

$$\begin{aligned} s_m[n]= & {} \frac{1}{\sqrt{2}}\sum _{k=-\infty }^{\infty }h_\varphi [k-n]s_{m-1}[k], \end{aligned}$$
(1)
$$\begin{aligned} w_m[n]= & {} \frac{1}{\sqrt{2}}\sum _{k=-\infty }^{\infty }h_\psi [k-n]s_{m-1}[k], \end{aligned}$$
(2)

where \(h_\varphi [n]\) and \(h_\psi [n]\) are the low- (scaling) and high-pass (wavelet) filters, respectively.

The scaling and wavelet filters are associated with a mother wavelet and satisfy the following properties (Percival and Walden 2000):

$$\begin{aligned} \sum _{l=1}^{L}h_\varphi [l]= & {} \sqrt{2}, \quad \sum _{l=1}^{L}h^2_\varphi [l] = 1,\quad \sum _{l=1}^{L}h_\varphi [l]h_\psi [l] = 0, \end{aligned}$$
(3)
$$\begin{aligned} \sum _{l=1}^{L}h_\psi [l]= & {} 0, \quad \sum _{l=1}^{L}h^2_\psi [l] = 1,\quad \sum _{l=1}^{L}h_\psi [l]h_\varphi [l] = 0, \end{aligned}$$
(4)

where L denotes the length of the filter. Furthermore, the scaling and wavelet filters satisfy a quadrature mirror filter (QMF) relationship, namely

$$\begin{aligned} h_\varphi [l]= & {} {(-1)}^{l+1}h_\psi [L-l-1], \end{aligned}$$
(5)
$$\begin{aligned} h_\psi [l]= & {} {(-1)}^{l}h_\varphi [L-l-1]. \end{aligned}$$
(6)

Figure 1 depicts the three-level SDWT decomposition tree of a signal \(s_0[n]\), sampled at a rate of \(f_s\). According to Fig. 1, the SDWT presents a drawback associated with the non-uniform frequency bandwidth of scaling and wavelet coefficients. Consequently, the resulting RMS value with respect to individual bands contains a different number of harmonic components (Hamid et al. 2002), hindering harmonic identification and power calculation.

Fig. 1
figure 1

Three-level SDWT decomposition tree

2.2 Stationary Discrete Wavelet Packet Transform (SDWPT)

The wavelet packets represent a generalization of the WT (Jensen and la Cour-Harbo 2001) in which both scaling and wavelet coefficients are decomposed. Therefore, the SDWPT corresponds to an extension of the SDWT algorithm, as presented in Fig. 2. Thus, the SDWPT presents uniform frequency bandwidths, overcoming this limitation from SDWT.

Fig. 2
figure 2

Three-level SDWPT decomposition tree

The SDWPT coefficients, at the m decomposition level, are defined as (Mallat 2008):

$$\begin{aligned} s_m^{2p}[n]= & {} \frac{1}{\sqrt{2}}\sum _{k=-\infty }^{\infty }h_\varphi [k]s_{m-1}^{p}[n-k], \end{aligned}$$
(7)
$$\begin{aligned} s_m^{2p+1}[n]= & {} \frac{1}{\sqrt{2}}\sum _{k=-\infty }^{\infty }h_\psi [k]s_{m-1}^{p}[n-k], \end{aligned}$$
(8)

where p is the node number (\(0 \le p \le 2^{m-1} - 1\), \(p \in {\mathbb {N}}\)).

Therefore, the SDWPT decomposition allows to properly isolate frequency ranges within the spectrum analyzed (Branco et al. 2013). Further, this property is appropriate to evaluate frequency components separately, as related in Barros and Diego (2006), Barros and Diego (2008).

3 Methodology

The overview of the methodology adopted in this work is depicted in Fig. 3. The frequency response of wavelet filters was computed in order to assess the effects of mother wavelet choice for SDWT and SDWPT decompositions. Furthermore, synthetic signals were generated to evaluate the estimation of RMS values via SDWT and SDWPT decompositions. Then, the accuracy of RMS values estimated via SDWT and SDWPT for the synthetic signals was analyzed. Additionally, the effect of a magnitude variation of a signal, the effect of sampling frequency choice, and the noise effect in the RMS estimation were also assessed.

Fig. 3
figure 3

Methodology

3.1 Frequency Response of Wavelet Filters

The first step of this study dwells in determining the frequency response of wavelet filters. This is important because the wavelet-related transforms have an inherent energy leakage in their decompositions (Peng et al. 2009), i.e., depending on the mother wavelet, the energy of a particular frequency may leak into neighboring frequencies and can affect various coefficients (Qiu et al. 1995). The wavelet families adopted in this work were Daubechies and Coiflets (Daubechies 1992), which are appropriated to analyze the power system waveforms (Morsi and El-Hawary 2008). Five mother wavelets from each family were applied in the SDWT and SDWPT decompositions: db2 (Haar), db4, db20, db40, db90, coif1, coif2, coif3, coif4, and coif5 (dbN refers to a wavelet for the Daubechies family with \(L = N\) coefficients, whereas coifN is related to a function from the Coiflet family with \(L = 6N\) coefficients).

Besides determining the frequency response of QMFs associated with each wavelet, the subband frequency response of wavelet filters for three-level SDWT and SDWPT decompositions was computed. Thus, the effects of mother wavelet choice are assessed.

3.2 Synthetic Signals

Electrical signals may include harmonics and DC offset. The harmonic distortion is the most significant power quality problem (Dugan et al. 2004), where odd-frequency components are typically dominant in supply voltage and load current (Bollen and Gu 2006). Besides, especially on a transient state, as from faulty events, the current waveforms have exponentially decaying DC offsets (Benmouyal 1995; Gu and Yu 2000; Argüelles et al. 2006; Al-Tallaq et al. 2011). Likewise, DC level can occur in the output signals from power converters (Lin et al. 2012; Li et al. 2015; Chang et al. 2019). DC offset and harmonic distortion can influence the accuracy of frequency components estimation according to WT, motivating the incorporation of these characteristics in test signals adopted in this study.

As commonly used in the literature (Morsi and El-Hawary 2007; Vatansever and Ozdemir 2009; Alves et al. 2017), the synthetic signals were arbitrarily defined. However, its parameters were adopted considering the features of EPS, namely prevalence of odd-frequency components and an eventuality of DC offset occurrence. Hence, four synthetic signals were considered, including a sinusoidal signal, a(t), a sinusoidal signal with DC offset, b(t), a signal containing multiple odd-frequency components and a DC offset, c(t), and a signal with multiple odd-frequency components, d(t). Each signal is defined as follows:

$$\begin{aligned} a(t)= & {} \sqrt{2}\left\{ 100\sin {(\omega t)}\right\} \ \mathrm {V}, \end{aligned}$$
(9)
$$\begin{aligned} b(t)= & {} \sqrt{2}\Big \{5/\sqrt{2} + 100\sin {(\omega t)}\Big \} \ \mathrm {V}, \end{aligned}$$
(10)
$$\begin{aligned} c(t)= & {} \sqrt{2} \Big \{5/\sqrt{2} + 100\sin {(\omega t)} + 1\sin {(3\omega t)} \nonumber \\&+ 5\sin {(5\omega t)} + 3\sin {(7\omega t)} + 2\sin {(9\omega t)}\nonumber \\&+ 1\sin {(11\omega t)} + 0.50\sin {(13\omega t)} \nonumber \\&+ 0.25\sin {(15\omega t)} \Big \} \ \mathrm {V}, \end{aligned}$$
(11)
$$\begin{aligned} d(t)= & {} \sqrt{2} \left\{ 25\sin {(\omega t + 70^\circ )} + 2\sin {(3\omega t - 160^\circ )}\right. \nonumber \\&+ 1.7\sin {(5\omega t + 150^\circ )} + 0.1\sin {(7\omega t - 105^\circ )}\nonumber \\&+ 0.2\sin {(9\omega t + 180^\circ )} + 0.1\sin {(11\omega t - 110^\circ )} \nonumber \\&+\left. 0.1\sin {(15\omega t + 160^\circ )} \right\} \ \mathrm {A}, \end{aligned}$$
(12)

where \(\omega = 2 \pi f\) and \(f = 60\) Hz. The sampling frequency is \(f_s = 1920\) Hz, which corresponds to 32 samples per cycle of 60 Hz. Then, the discrete signals were decomposed according to SDWT and SDWPT approaches.

3.3 SDWT and SDWPT Decompositions

The extraction of the desired harmonic components correlates to both sampling rate and maximum wavelet decomposition level (Alves et al. 2017). As the sampling frequency adopted is 1920 Hz, three decomposition levels (\(m = 3\)) are required to extract the fundamental component of signals using both SDWT and SDWPT. Table 1 presents the odd-frequency components associated with each coefficient considering three-level SDWT and SDWPT decompositions.

Table 1 Odd-frequency components associated with three-level SDWT and SDWPT decompositions

As presented in Table 1, whereas the odd-frequency components are centered in the bandwidth associated with SDWT and SDWPT coefficients, the even-harmonics are situated in the edges of the frequency bands where the spectral leakage is higher. For this reason, the synthetic signals adopted in this work do not contain even-frequency components.

The mother wavelets adopted are the same as described in Sect. 3.1. After the decomposition of the signals via SDWT and SDWPT, the next step is the estimation of RMS values.

3.4 Estimation of RMS Values

The estimation of RMS values via wavelet decomposition can be performed according to Yoon and Devaney (1998), Barros and Diego (2006), Morsi and El-Hawary (2007), Vatansever and Ozdemir (2008), Alves et al. (2017). Therefore, considering SDWT and SDWPT decompositions, the total RMS values of a given signal are obtained by

$$\begin{aligned} S^\mathrm {SDWT}= & {} \sqrt{\frac{1}{2N}\left[ \sum _{k}{s_m[k]}^2 + \sum _{q=1}^{m}\sum _{k}{w_q[k]}^2\right] }, \end{aligned}$$
(13)
$$\begin{aligned} S^\mathrm {SDWPT}= & {} \sqrt{\frac{1}{2N}\left[ \sum _{p=0}^{2^m-1}\sum _{k}{s_m^p[k]}^2\right] }, \end{aligned}$$
(14)

where \(S^\mathrm {SDWT}\) and \(S^\mathrm {SDWPT}\) are the RMS values estimated via SDWT and SDWPT, respectively.

The RMS value of a given coefficient represents the RMS value of the frequency components contained in its frequency range. Thereby, the RMS values of the odd-frequency components presented in Table 1 can be obtained via SDWT and SDWPT as follows:

$$\begin{aligned} S_1^\mathrm {SDWT}= & {} \sqrt{\frac{1}{2N}\sum _{k}{s_3[k]}^2},\ S_3^\mathrm {SDWT} = \sqrt{\frac{1}{2N}\sum _{k}{w_3[k]}^2} \nonumber \\\end{aligned}$$
(15)
$$\begin{aligned} S_{5;7}^\mathrm {SDWT}= & {} \sqrt{\frac{1}{2N}\sum _{k}{w_2[k]}^2},\ S_{9;15}^\mathrm {SDWT} = \sqrt{\frac{1}{2N}\sum _{k}{w_1[k]}^2}, \nonumber \\\end{aligned}$$
(16)
$$\begin{aligned} S_h^\mathrm {SDWPT}= & {} \sqrt{\frac{1}{2N}\sum _{k}{s_3^p[k]}^2},\quad (h = 2p+1), \end{aligned}$$
(17)

where: \(S_h^\gamma \) denotes the RMS value for h-th odd-frequency component obtained via \(\gamma \) (\(\gamma = \mathrm {SDWT}\) or \(\gamma = \mathrm {SDWPT}\)); and \(S_{h;i}^\mathrm {SDWT}\) represents the RMS value for odd-frequency components contained in the frequency range of [\((h-1) f\); \((i+1) f\)] Hz.

It is important to emphasize that the RMS values of even-frequency components cannot separately be computed, once they are located on the edges of each bandwidth associated with SDWT and SDWPT coefficients (Figs. 1 and 2 , and Table 1). Thereby, the RMS values of even-harmonics are partially included in the RMS values of the neighboring odd-harmonic components (Barros and Diego 2008).

According to, the RMS value of the non-fundamental components quantifies the overall amount of harmonics on a given signal. This quantity can be estimated from SDWT and SDWPT (Morsi and El-Hawary 2008; Alves et al. 2017), namely

$$\begin{aligned} S_H^\mathrm {SDWT}= & {} \sqrt{{S_3^\mathrm {SDWT}}^2+{S_{5;7}^\mathrm {SDWT}}^2+{S_{9;15}^\mathrm {SDWT}}^2}, \end{aligned}$$
(18)
$$\begin{aligned} S_H^\mathrm {SDWPT}= & {} \sqrt{\sum _{h>1}{S_h^\mathrm {SDWT}}^2}. \end{aligned}$$
(19)

Note that, regardless of the signal, the values of \(S^\gamma \), \(S_1^\gamma \), \(S_3^\gamma \), and \(S_H^\gamma \) will converge for both \(\gamma = \mathrm {SDWT}\) and \(\gamma = \mathrm {SDWPT}\). For this reason, these quantities were presented grouped for SDWT and SDWPT.

For comparison purposes, the previously mentioned quantities estimated via SDWT and SDWPT were compared to the ones calculated using DFT. The DFT is the classical technique to analyze harmonics and is adopted by some PQ meters, as the Nexus® 1500+. The DFT of a given signal s[n] is defined as Bollen and Gu (2006):

$$\begin{aligned} S[g] = \sum _{n=0}^{N-1}s[n] e^{-\frac{\mathrm {j}2\pi g n}{N}},\qquad g = 0, 1, \cdots , N-1, \end{aligned}$$
(20)

thus, for a s[n] signal, the RMS value of a given multiple of the fundamental frequency, \(S_q\), the RMS value, S, the RMS value of the non-fundamental components, \(S_H\), and the RMS value of a set of frequency components, \(S_{x;y}\), are obtained as:

$$\begin{aligned} S_q= & {} |S[q f]|,\qquad S = \sqrt{\sum _{q}{S_q^2}}, \end{aligned}$$
(21)
$$\begin{aligned} S_H= & {} \sqrt{\sum _{q\ne 1}{S_q^2}},\qquad S_{x;y} = \sqrt{\sum _{q=x}^{y}{S_q^2}}. \end{aligned}$$
(22)

3.5 Sensitivity to a Magnitude Variation

A sensitivity test was performed to evaluate the influence of the magnitude of the frequency components in RMS estimation from SDWT and SDWPT. For that, the c(t) signal was multiplied by a factor, \(\alpha \),

$$\begin{aligned} e(\alpha ,t) = \alpha c(t),\qquad \alpha = 1, 2, 4, 6, 8, 10. \end{aligned}$$
(23)

Then, the percent error of each quantity was calculated as:

$$\begin{aligned} \epsilon \left( \xi ^{\gamma (\alpha )}\right) = \left| \frac{\xi ^{\gamma (\alpha )} - \xi ^{(\alpha ,\mathrm {True})}}{\xi ^{(\alpha ,\mathrm {True})}}\right| \times 100 (\%), \end{aligned}$$
(24)

where \(\xi ^{\gamma (\alpha )}\) is the quantity estimated for \(e(\alpha ,t)\) and \(\xi ^{(\alpha ,\mathrm {True})}\) is its respective true value. As it is expected that the results obtained using mother wavelets with the highest length are more accurate (Morsi and El-Hawary 2008), this test was performed using the longer wavelets of each family adopted in this work, namely db90 and coif5.

3.6 Noise Effect on Estimation of RMS Values

Noise corresponds to any unwanted electrical signals which produce undesirable effects in the circuits and represents one of the main factors limiting the accuracy in signal measurement systems (Vaseghi 2006). As the noise is random, it must stay evenly distributed over all levels of the wavelet decomposition (Jensen and la Cour-Harbo 2001), contaminating all coefficients equally (Donoho and Johnstone 1994).

To assess the influence of noise on SDWT and SDWPT decompositions, an additive white Gaussian noise (AWGN) was superimposed to signal d(t). Different values of signal-to-noise ratio, SNR, varying from 20 to 50 dB by 10 dB step have been considered. After the superimposition of AWGN into d(t), the signal was again decomposed using SDWT and SDWPT, then the quantities defined in Sect. 3.4 were recalculated. This process was performed 10 times and the mean of the values was considered for analysis. Next, the percentage difference has been determined as

$$\begin{aligned} \varDelta \left( \xi ^{\gamma (SNR)}\right) = \left| \frac{\xi ^{\gamma (SNR)} - \xi ^\gamma }{\xi ^\gamma }\right| \times 100 (\%), \end{aligned}$$
(25)

where \(\xi ^\gamma \) is the quantity calculated without noise and \(\xi ^{\gamma (SNR)}\) is the mean of the quantity estimated with a noise level indicated by SNR.

3.7 Effect of Sampling Frequency Choice

Although the sampling frequency for synthetic signals adopted in this work satisfies the Nyquist criterion (Bollen and Gu 2006), a test was performed to assess the influence of this parameter in the results. It is important to notice that any change in the sampling frequency implies a different decomposition tree than introduced in Figs. 1 and 2 to obtain the same output bandwidths. To preserve the bandwidths presented in Table 1, the value of \(f_s\) was increased by a factor of two. Thereby, the following set of sampling frequencies was adopted:

$$\begin{aligned} F_s = [1920, 3840, 7680, 15360, 30720] \ \mathrm {Hz}. \end{aligned}$$
(26)

Then, the synthetic signals were sampled using \(f_s \in F_s\) and the RMS values were calculated. Thereafter, the percent error of each quantity was calculated:

$$\begin{aligned} \epsilon \left( \xi ^{\gamma (f_s)}\right) = \left| \frac{\xi ^{\gamma (f_s)} - \xi ^\mathrm {True}}{\xi ^\mathrm {True}}\right| \times 100 (\%), \end{aligned}$$
(27)

where \(\xi ^{\gamma (f_s)}\) is the quantity estimated using the sampling frequency indicated by \(f_s\) and \(\xi ^\mathrm {True}\) is its respective true value. Similar to the sensitivity test, Sect. 3.5, this test was fulfilled using only db90 and coif5 mother wavelets.

4 Results Analysis

This section presents the results obtained from the methodology presented in Sect. 3.

4.1 Frequency Response of Wavelet Filters

Figures 4 and 5 depict the frequency response of the QMFs associated with the Daubechies (from db2 to db90) and Coiflets (from coif1 to coif5) wavelet families, respectively. According to Figs. 4 and 5 , the frequency response of QMFs tends to an ideal filter when L increases. That is, a long mother wavelet provides a better frequency representation of a given signal.

Although long mother wavelets provide filters with a frequency response closer to the ideal filters, they present a high computational burden, notably for a higher number of decomposition levels. Hence, for real-time analysis, the wavelet answer is slower for long wavelets (Costa and Driesen 2013; Costa et al. 2017; Leal et al. 2019), which may represent a limitation for its application. That is, from a computational burden point of view, the choice of long mother wavelets is appropriate only for offline analysis purposes.

Fig. 4
figure 4

Frequency response of Daubechies QMFs

Fig. 5
figure 5

Frequency response of Coiflets QMFs

Figures 6 and 7 show the subband frequency response of filters for a three-level decomposition of the SDWT and SDWPT, respectively. As shown in Figs. 6 and 7 , there is an inter-band spectrum leakage between coefficients. That is, the coefficients contain information of the frequencies located near the outskirts of the ideal frequency range of the filters. This effect is more intense for short mother wavelets, whereas long wavelets present a more appropriate frequency separation.

Fig. 6
figure 6

Subband frequency response of filters of the SDWT for three-level decomposition: a db2; b db4; c db20; d db40; e db90; f coif1; g coif2; h coif3; i coif4; j coif5

Fig. 7
figure 7

Subband frequency response of filters of the SDWPT for three-level decomposition: a db2; b db4; c db20; d db40; e db90; f coif1; g coif2; h coif3; i coif4; j coif5

Furthermore, according to Figs 6a–c, 7a–c, the mother wavelets db2, db4, db20, coif1, coif2, and coif3 present an accented magnitude damping on frequency response for both SDWT and SDWPT. This outcome can be reduced with the choice of longer wavelet functions, which provides a more accurate representation of the input signal in the frequency domain.

4.2 Estimation of RMS Values

Table 2 shows the RMS values calculated for the signal a(t) according to the equations presented in Sect. 3.3 as the true values, derived from the analytical calculation according to definitions of IEEE Std. 1459-2010. The values that correspond exactly to the true values, i.e., with a null error, are highlighted in Table 2.

According to Table 2, the total RMS values of the signal a(t), \(A^\gamma \), exactly match their true values, except the value estimated using the mother wavelet db90. This is because the adoption of a mother wavelet from the Daubechies family with a too-large L may lead to instability in the algorithm used for computation of QMFs (Morsi and El-Hawary 2009), which affect the filter’s frequency response. On the other hand, the mother wavelet db90 was the only one that provided an estimate with a zero error of \(A_H^\gamma \). Moreover, in general, the choice of a long mother wavelet reverberates in a more accurate estimation of \(A_H^\gamma \) and \(A_1^\gamma \) for both SDWT and SDWPT decompositions. The obtained results using DFT exactly match the true values.

Table 3 presents the estimated quantities considering the signal b(t), which corresponds to a DC offset superimposed to the signal a(t). As shown in Table 3, the estimation of the RMS values of the signal b(t), \(B^\gamma \), was similar to the performed for the signal a(t), where only the mother wavelet db90 does not provide an RMS value exactly equal to the true value. However, neither mother wavelet used in this work accurately estimated the values of \(B_H^\gamma \), and \(B_1^\gamma \). This occurs because DC offset is located on the frequency range of the coefficients that represent the fundamental frequency ([0; 120] Hz), \(s_3[n]\) for SDWT and \(s_3^0[n]\) for SDWPT. On the other hand, the performance of DFT was superior, since the estimated quantities are the same as true values.

Thereby, the fundamental component representation based on the SDWT and SDWPT is affected for any DC offset present in the input signal. This inconsistency affects the RMS value of the non-fundamental components and can represent a limitation for the application of wavelet-related transforms to the estimation of RMS values defined according to the IEEE Std. 1459-2010.

Table 2 RMS values of a(t) signal
Table 3 RMS values of b(t) signal
Table 4 RMS values of c(t) signal

Comparing the results of a(t) and b(t), Tables 2 and 3 , it can be inferred that the differences were caused only by the DC offset of the b(t) signal. Thus, if the DC component would be removed before the SDWT and SDWPT decompositions, the fundamental frequency RMS value of b(t) signal would be properly represented.

Nevertheless, considering other types of signals, an accurate representation of the fundamental frequency RMS value via SDWT and SDWPT can be obtained if only the fundamental component (60 Hz) is located in the frequency range of [0; 120] Hz. That is, this frequency range cannot contain DC offset, subharmonics, or interharmonics.

Table 4 summarizes the obtained results for the signal c(t), which contains multiple odd-frequency components and a DC offset. The effects observed for signals a(t) and b(t) (Tables 2 and 3 ) remain for the signal c(t). Furthermore, for SDWT decomposition, the estimation of the RMS value corresponding to an individual frequency band was the same as the true value only for \(C_3^\mathrm {SDWT}\) considering the mother wavelet db90. This is due to the non-ideal characteristics of the QMFs that cause spectral leakage and lead to errors in the estimation of RMS values.

Moreover, according to Table 4, the SDWPT provides a more accurate representation of RMS values, since their decomposition separately isolates the odd-frequency components on the frequency bands associated with each coefficient. Even so, an exact estimation is still related to the choice of long mother wavelets. Considering the signal c(t), \(C_3^\mathrm {SDWPT}\), \(C_5^\mathrm {SDWPT}\), \(C_{11}^\mathrm {SDWPT}\), \(C_{13}^\mathrm {SDWPT}\), and \(C_{15}^\mathrm {SDWPT}\) were estimated accurately by the mother wavelet db90. However, for both SDWT and SDWPT decompositions, the fundamental RMS value (\(C_1^\gamma \)) estimated contains errors due to DC offset in the signal c(t), leading to a poor representation of the non-fundamental RMS value. Furthermore, as previously observed for a(t) and b(t), the results obtained by DFT estimation for c(t) signal have a null error.

Table 5 lists the results for the signal d(t), which contains multiple odd-frequency components. This signal does not have a DC offset, which allows an accurate representation of all quantities according to SDWT decomposition with the mother wavelet db40. On the other hand, for SDWPT, the most accurate calculation was provided by the mother wavelet db90.

Nevertheless, some errors still occur in the calculation results of RMS values in some frequency bands. As shown in Sect. 4.1, the QMFs associated with short mother wavelets can cause spectrum leakage and magnitude damping on some frequency bands. This explains the better performance of db40 and db90 mother wavelets concerning the other wavelet functions analyzed in this work. Even so, the performance of SDWT and SDWPT was inferior to that of DFT, which results are the same as the true values.

Further, in general, the Coiflets family has not provided an appropriate representation of RMS values considering the frequency bands individually. Thus, for this purpose, the Daubechies family performs a more accurate representation of frequency components of a given signal.

Table 5 RMS values of d(t) signal

4.3 Sensitivity to a Magnitude Variation

Figures 8 and 9 present the percent error of RMS values estimated for \(e(\alpha ,t)\) signal using the SDWT and SDWPT, respectively.

Fig. 8
figure 8

Percent error as a function of \(\alpha \) for \(\gamma = \mathrm {SDWT}\): a db90; b coif5

Fig. 9
figure 9

Percent error as a function of \(\alpha \) for \(\gamma = \mathrm {SDWPT}\): a db90; b coif5

As presented in Figs. 8 and 9 , independently of \(\alpha \), the percent error does not vary. This shows that the errors on the RMS estimation via SDWT and SDWPT are not a result of the small magnitudes of the frequency components of a signal. Thus, the errors on the RMS estimation are associated with the mother wavelet choice, not with the signal parameters.

4.4 Noise Effect on Estimation of RMS Values

Figure 10 depicts the percentage difference for several SNR values for the common quantities estimated via SDWT and SDWPT: \(D^\gamma \), \(D_H^\gamma \), \(D_1^\gamma \), and \(D_3^\gamma \). According to Fig. 10a and c, the errors in the estimation of \(D^\gamma \) and \(D_1^\gamma \) are affected only for the SNR values, i.e., are independent of the mother wavelet choice. Moreover, still considering \(D^\gamma \) and \(D_1^\gamma \), even for \(SNR = 20\) dB, the errors are small. On the other hand, as shown in Fig. 10b and d, the errors associated with \(D_H^\gamma \) and \(D_3^\gamma \) estimation are more significant. Furthermore, still considering \(D_H^\gamma \) and \(D_3^\gamma \), the longer mother wavelets have more pronounced errors. This occurs because the values of \(D_H^\gamma \) and \(D_3^\gamma \) are small in magnitude, mainly for the longer mother wavelets (Table 5), so that a small variation in magnitude can represent a large percentage variation.

Fig. 10
figure 10

Percentage difference as a function of SNR for SDWT and SDWPT: a \(D^\gamma \); b \(D_H^\gamma \); c \(D_1^\gamma \); d \(D_3^\gamma \)

Figure 11 presents the percentage difference as a function of SNR for \(D_{5;7}^\mathrm {SDWT}\) and \(D_{9;15}^\mathrm {SDWT}\). The behavior of the errors for different SNR values was similar to the ones shown in Fig. 10c and d, in which the differences are greater for longer mother wavelets. As presented in Table 5, the values of \(D_{5;7}^\mathrm {SDWT}\) and \(D_{9;15}^\mathrm {SDWT}\) are higher when estimated from short mother wavelets. Thus, considering short wavelets, the difference between the values estimated for a noiseless signal and a noisy signal tends to a small value when compared to its respective values estimated from long mother wavelets. This explains the reason for \(\varDelta \left( \xi ^{\gamma (SNR)}\right) \) is higher for \(\xi \) estimated using long mother wavelets.

Fig. 11
figure 11

Percentage difference as a function of SNR for \(\gamma = \mathrm {SDWT}\): a \(D_{5;7}^\gamma \); b \(D_{9;15}^\gamma \)

Figure 12 shows the percentage difference calculated for \(D_5^\mathrm {SDWPT}\), \(D_7^\mathrm {SDWPT}\), \(D_9^\mathrm {SDWPT}\), \(D_{11}^\mathrm {SDWPT}\), and \(D_{15}^\mathrm {SDWPT}\). As the value of \(D_5^\mathrm {SDWPT}\) is more significant than \(D_7^\mathrm {SDWPT}\), \(D_9^\mathrm {SDWPT}\), \(D_{11}^\mathrm {SDWPT}\), and \(D_{15}^\mathrm {SDWPT}\) (Table 5), the differences calculated for \(D_5^\mathrm {SDWPT}\) were similar to each other, regardless of the mother wavelet, as shown in Fig 12a. On the other hand, considering \(D_7^\mathrm {SDWPT}\), \(D_9^\mathrm {SDWPT}\), \(D_{11}^\mathrm {SDWPT}\), and \(D_{15}^\mathrm {SDWPT}\) (Fig. 12b–e), the values of \(\varDelta \left( \xi ^{\gamma (SNR)}\right) \) were lower for short mother wavelets, presenting a similar behavior to the ones observed in Figs. 10b, d, 11a and b.

Fig. 12
figure 12

Percentage difference as a function of SNR for \(\gamma = \mathrm {SDWPT}\): a \(D_5^\gamma \); b \(D_7^\gamma \); c \(D_9^\gamma \); d \(D_{11}^\gamma \); e \(D_{15}^\gamma \)

It was demonstrated that the noise affected the estimation of RMS values in all frequency ranges. Considering both total and fundamental RMS values, the noise effect was independent of the mother wavelet choice. On the other hand, the RMS values in some frequency ranges were affected in different ways by the noise, depending on the adopted mother wavelet. Then, the RMS values estimated using both SDWT and SDWPT can present errors due to the noise, affecting the confidence level of results. To avoid this issue, de-noising strategies must be applied to a more accurate estimation. For instance, simple thresholding and shrinkage schemes for signal decomposition can be performed to eliminate noise in the wavelet domain, as presented in Donoho and Johnstone (1994), Santoso et al. (1997), Littler and Morrow (1999), Huang and Cressie (2000).

4.5 Effect of Sampling Frequency Choice

Figures 13 and 14 show the percent error of RMS values of c(t) signal (sampled according to \(F_s\) set) estimated via SDWT and SDWPT, respectively.

Fig. 13
figure 13

Percent error as a function of \(f_s\) for \(\gamma = \mathrm {SDWT}\): a db90; b coif5

Fig. 14
figure 14

Percent error as a function of \(f_s\) for \(\gamma = \mathrm {SDWPT}\): a db90; b coif5

According to Fig. 13, the percent error of the RMS values calculated via SDWT from different sampling frequencies does not vary significantly. As shown in Fig. 13a, \(\epsilon \left( C^{\mathrm {SDWT}(f_s)}\right) \) presents a slight increase between 1920 and 3840 Hz, being constant for others sampling frequencies. Considering the RMS values calculated using the mother wavelet db90, Fig. 13a, the percent error of \(C_1^{\mathrm {SDWT}}\) and \(C_3^{\mathrm {SDWT}}\) presents a small variation for the different values of \(f_s\). This occurs because an increase in sampling frequency implies a higher number of decomposition levels, which leads to a more significant spectral leakage. As the percent errors of RMS values of odd-frequency components calculated using SDWT and the coif5 mother wavelet are higher than the ones obtained using the db90 wavelet (Fig 13b), the increase of \(\epsilon \left( \xi ^{\mathrm {SDWT}(f_s)}\right) \) due to the enhance on \(f_s\) is less meaningful.

As shown in Fig. 14, the percent errors associated with the RMS values calculated via SDWPT present a slight variation with an increase in sampling frequency, except for the values related to \(C_{15}^\mathrm {SDWPT}\). According to Fig. 7e and j, the filters associated with the coefficients on the edge of the decomposition tree (Fig. 2) present good flat pass-band characteristics and a lower inter-band spectrum leakage. Considering \(f_s = 1920 \ \mathrm {Hz}\), the frequency band associated with \(C_{15}^\mathrm {SDWPT}\) is located on the edge of the decomposition tree (\(s_3^7[n]\) in Fig. 2). With an increase in \(f_s\), the coefficient related to \(C_{15}^\mathrm {SDWPT}\) will be situated closer to the center of the decomposition tree, where the spectral leakage is more accentuated. Thus, an increase in \(f_s\) implies a higher value of \(\epsilon \left( C_{15}^{\mathrm {SDWPT}(f_s)}\right) \).

Therefore, as regards the estimation of RMS values, is sufficient that the sampling frequency adopted complies with the Nyquist frequency since higher values of \(f_s\) do not provide a significant improvement in results accuracy.

5 Conclusions

This paper presented a study to evaluate the RMS measurement based on SDWT and SDWPT. From simulated signals, the accuracy of estimation of RMS values was analyzed. The RMS values estimated using SDWT and SDWPT were compared to the ones obtained via DFT. The outcome of mother wavelet choice was also addressed in this work. Furthermore, the effects of the sampling frequency choice, magnitude variation, and noisy conditions on the estimation of RMS values were assessed.

The analysis of the frequency response of wavelet filters evinced that an inter-band spectrum leakage can occur between coefficients. This fact can represent a frequency misrepresentation of a given coefficient since it contains information about the frequencies located near the outskirts of the ideal frequency range. Moreover, depending on the mother wavelet adopted, the frequency response of filters can present magnitude damping for both SDWT and SDWPT. Although these two effects can be minimized by adopting longer wavelets, they cannot be completely mitigated.

Furthermore, when the signal has a DC offset, the fundamental RMS value estimated via SDWT and SDWPT contains errors. In this condition, DC offset will be located in the frequency range used to estimate the fundamental RMS, which leads to errors in its representation. Thus, the SDWT and SDWPT may not be appropriate to analyze frequency components individually. On the other hand, as the DFT specifically analyzes each frequency component, its performance was superior to that of the SDWT and SDWPT to estimate RMS values.

As wavelet-related transforms analyze a given signal in frequency bands, different effects associated with specific frequency components cannot be properly evaluated using SDWT and SDWPT. This characteristic reverberates in an incorrect value of the non-fundamental RMS value, evincing a limitation of the application of wavelet-related transforms to the estimation of quantities defined in IEEE Std. 1459-2010.

This study also demonstrated that an increase in sampling frequency does not imply an improvement in results. Moreover, the test of sensitivity to a magnitude variation revealed that the accuracy of the results is related to the mother wavelet choice, despite the signal parameters.

In summary, although the frequency bands of SDWT and SDWPT decompositions can represent frequency components in some cases, the RMS values estimated using these transforms may not represent appropriately the characteristics of certain signals, such as those that have harmonics and DC offset. Moreover, the reliability of the values estimated is also affected by noisy conditions. Therefore, the assumption that the frequency bands of wavelet-related transforms correspond to individual harmonics is valid only in specific conditions and can cause misinterpretation on the analysis of power system signals.