Next Article in Journal
Microhooks: A Novel Framework to Streamline the Development of Microservices
Next Article in Special Issue
Enhancing Smart Home Efficiency with Heuristic-Based Energy Optimization
Previous Article in Journal
Quantum Testing of Recommender Algorithms on GPU-Based Quantum Simulators
Previous Article in Special Issue
Distributed Peer-to-Peer Optimization Based on Robust Reinforcement Learning with Demand Response: A Review
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimal Selection of Sampling Rates and Mother Wavelet for an Algorithm to Classify Power Quality Disturbances

by
Jonatan A. Medina-Molina
1,*,
Enrique Reyes-Archundia
1,*,
José A. Gutiérrez-Gnecchi
1,
Javier A. Rodríguez-Herrejón
1,
Marco V. Chávez-Báez
1,
Juan C. Olivares-Rojas
1 and
Néstor F. Guerrero-Rodríguez
2
1
Division of Graduate Studies and Research, National Technological Institute of Mexico (TecNM), Technological Institute of Morelia (ITM), Morelia 58120, Mexico
2
Engineering Sciences, Pontifical Catholic Mother and Teacher University (PUCMM), Santo Domingo 2748, Dominican Republic
*
Authors to whom correspondence should be addressed.
Computers 2025, 14(4), 138; https://doi.org/10.3390/computers14040138
Submission received: 2 March 2025 / Revised: 26 March 2025 / Accepted: 3 April 2025 / Published: 6 April 2025

Abstract

:
The introduction of renewable energy sources, distributed energy systems, and power electronics equipment has led to the emergence of the Smart Grid. However, these developments have also caused the worsening of power quality. Selecting the correct sampling frequency and feature extraction techniques are essential for appropriately analyzing power quality disturbances. This work compares the performance of an algorithm based on a Support Vector Machine and Discrete Wavelet Transform for the classification of power quality disturbances using eight sampling rates and five different mother wavelets. The algorithm was tested in noisy and noiseless scenarios to show the methodology. The results indicate that a success rate of 99.9% is obtained for the noiseless signals using a sampling rate of 9.6 kHz and 95.2% for signals with a signal-to-noise ratio of 30 dB with a sampling rate of 30 kHz.

1. Introduction

From the end of the 19th century, it was concluded that transformers and rotating machines produced changes in the waveforms of electrical energy, which is why the concept of power quality (PQ) was introduced [1]. PQ analysis focuses on identifying events that cause an impact on the operation or useful life of devices connected to the electrical grid, such as a change in the waveform, frequency, or voltage value, which is known as a power quality disturbance (PQD). The PQ study has gained relevance due to the increased use of renewable energy and power electronic equipment, which cause fluctuations in the electrical grid [2,3]. This type of algorithm has applications such as real-time detection of disturbances, which can provide information about the event’s cause and thus correct and prevent its recurrence in the future, thereby reducing the losses it causes. In Smart Grids, using these algorithms in smart meters could locate the area where a disturbance occurs and isolate it, allowing for better monitoring and control over the production and distribution of electrical energy.
Feature extraction is carried out using some signal processing techniques, such as Fast Fourier Transform (FFT), Discrete Wavelet Transform (DWT), Stockwell Transform (ST), and Time–Time Transform (TTT), among others [2,4,5,6,7,8,9,10], which are used to detect waveforms that contain PQDs, such as Sag, Swell, Interruption, Harmonics, Flicker, Notch, and some combination of them, in noiseless and noisy conditions. In the classification stage, the previous works used classifiers such as Decision Tree (DT), Support Vector Machine (SVM), Random Forest Classifier (RFC), Extreme Learning Machine (ELM), and Modular Probabilistic Neural Networks (MPNN), among others.
In the literature, works such as [6] report a success rate between 99.29% and 99.43% for noiseless signals and with white Gaussian noise (WGN), with a signal-to-noise ratio (SNR) between 20 and 40 dB, by applying ST with a sampling rate of 6.4 kHz. Using a sampling rate of 10 kHz, ref. [2] obtained a success rate between 97% and 99.59% using variational mode decomposition (VMD) and a light gradient boosting machine (LGBM), and ref. [11] obtained an accuracy rate ranging from 88.75% and 97.68% with DWT and MPNN in noiseless signals and with WGN and SNR between 20 and 40 dB. In [12], success rates from 96.05% and 98.75% were achieved in signals with WGN and SNR between 20 and 40 dB using a generative adversarial network (GAN). There are works in which signals with WGN and SNR between 20 and 50 dB are analyzed, as in [13], where tests are carried out using the wavelet transform (WT), spatial feature attention, and long short-term memory (LSTM) for PQD classification, obtaining a success rate of between 91.78% and 98.98%, and in [14], where a success rate of between 98.67% and 99.66% is obtained, using bagging–LSTM and a sampling rate of 6.4 kHz. In [15], a success rate of 99.87% is obtained in the classification of noiseless signals, using Bi-LSTM and a sampling rate of 3.2 kHz. Although the change in sampling rate could affect the performance of PQD classification algorithms, only a few works study the effects of these changes, such as [16], in which classification tests are performed by testing short-time Fourier transform (STFT) and DWT, LSTM as a classifier. The sampling rate varies from 1 to 15 kHz, where it is observed that increasing the sampling frequency increases the success rate; in the case of DWT, from 14 kHz onwards, a considerable improvement is no longer seen; using STFT, a similar behavior is presented, although a drop in the success percentage is presented between 11 and 13 kHz.
Despite the variety of works in the literature, most start from a proposed sampling rate [2,6,7,14,15,16,17,18,19], even though the fact that it is an important parameter that can affect the performance of the classification algorithms and the quality of the features obtained. On the other hand, refs. [4,5,7,9,10,12] uses MATLAB, which requires specialized hardware for possible real-time implementation, so it is essential to create algorithms that use programming languages such as P y t h o n and C that can be migrated to a wider variety of platforms, such as single-board computers.
In this work, an algorithm based on DWT and SVM is presented to classify seven PQ events, considering three noise levels. Unlike other works, eight sampling frequencies and five mother wavelets were tested. In order to compare the results, the success rate of the classification of disturbances is obtained. The sampling rates range from 3.2 kHz to 30 kHz, allowing the observation of the classification algorithm’s behavior in a wide range of sampling rates.

2. Discrete Wavelet Transform

The Wavelet Transform, proposed by Morlet and Grossman in 1984 [20], is a widely used processing technique in PQD classification, because it enables multi-resolution analysis, allowing for the extraction of time-frequency information from the waveform. It has the advantage of adjusting in the window according to the analyzed frequency, which provides good time resolution for high frequencies and poor resolution for low frequencies [11]. The signal transformation is performed using functions of limited duration and irregular shapes, known as mother wavelets, which are scaled and shifted [21]. Due to the high computational cost required to apply the continuous version of this transformation, DWT was proposed, whose form is shown in Equation (1).
D W T j , k = 1 a 0 j t x ( t ) ψ t k b 0 a 0 j a 0 j ,
where x ( t ) are sampled values, ψ denotes the mother wavelet, a 0 is the discrete scale factor and b 0 is the translation factor. Using Equation (1) to define the function would result in a loss of information, which is why a mother Wavelet ( ψ ( t ) ) is used to obtain the details, and the approximation is obtained using the father Wavelet ( ϕ ( t ) ) [22]. In Equations (2) and (3), the forms of both equations are shown.
ψ j , k ( t ) = 1 a 0 j ψ t k b 0 a 0 j a 0 j
ϕ j , k ( t ) = 1 a 0 j ϕ t k b 0 a 0 j a 0 j
In 1989, Mallat developed a more straightforward method for applying DWT using filters. The proposal consists of passing the analyzed signal through a high-pass filter, h ( k ) , to obtain the details and a low-pass filter, l ( k ) , to obtain an approximation [23]. In addition to its simplicity, this algorithm enables the decomposition of the signal into lower frequency bands. This is achieved by passing the signal through both filters, then down-sampling with a value of two is applied, and finally the output of l ( k ) must be processed through both filters again [21]. This process can be repeated until the desired level of decomposition is achieved. In Equations (4) and (5), the equations to obtain the approximation ( A i ) and detail ( D i ) coefficients are shown using values of a 0 = 2 and b 0 = 1 [24].
A i ( k ) = 2 1 2 n l ( n 2 k ) A i 1 ( n )
D i ( k ) = 2 1 2 n h ( n 2 k ) A i 1 ( n )
The multi-resolution analysis and ease of application offered by the Mallat algorithm make the DWT a suitable option for analyzing PQDs; however, it is also necessary to have a classifier capable of quickly and accurately separating events, with one of the most commonly used classifiers being the Support Vector Machine.

3. Support Vector Machine

The Support Vector Machine was proposed by Cortes and Vapnik in 1995 as an algorithm for binary classification [25]. It is a supervised learning machine that extracts information from training data to create a decision space capable of separating two classes of data [26]. The objective of the SVM algorithm is to find the best hyperplane that separates two classes of data with the least possible number of errors, achieved by maximizing the margin 1 / w , which is the distance between the hyperplane and the closest data points, which are also known as support vectors [27]. In Equation (6), the expression that must be minimized to find the best hyperplane is shown, which is subject to the following restrictions: y i w T x i + b 1 ξ i and ξ i 0 .
m i n 1 2 w 2 + C i = 1 l ξ i ,
where x i is the input vector, y i is the objective (1 or −1), l is the total number of samples for training, b is the bias, w is the weight vector, C is the regularization coefficient, and ξ i is the clearance variable.
Often, the data used in training are not linearly separable, which is why it was proposed to make a projection of the data into a higher-dimensional space and find the best hyperplane in the new space. This projection is carried out through kernel functions K ( X i , X j ) ; the most commonly used are [26]:
  • Linear: K x i , x j = x i T x j
  • Polynomial: K x i , x j = γ x i T x j + r d , γ > 0
  • Sigmoid: K x i , x j = tanh γ x i T x j + r
Once the model is trained, new data are classified using Equation (7), where λ i is a Lagrange multiplier.
f ( x ) = s i g n i l λ i y i K X i , X + b , f ( x ) 1 , 1
Although SVM was created as a binary classifier, proposals have been made to solve multiclass problems. One-Against-All (OAA) is a proposal where n classifiers are trained, each classifying one of the classes positively. One-Against-One (OAO) is another example, where n ( n 1 ) / 2 classifiers are trained, pairs of classes are compared, and the final decision is made based on the class that scored highest [28].
The SVM algorithm offers versatility due to the option of using kernels that can improve the performance of the classifier; however, it is necessary to have a good sampling rate, processing technique and features that extract the relevant information from the data since the performance of the classifier can be affected by these factors.

4. Materials and Methods

The proposed methodology can be seen in Figure 1, which consists of three parts; the first is the generation of signals in GNU Octave 9.3.0 using eight sampling frequencies and three levels of white Gaussian noise with SNR of 30, 40 and 50 dB; the second part is the processing and feature extraction using the mother wavelets dmey, bior1.1, db4, db28, and rbio3.1, applying between four and seven decomposition levels, from which different feature combinations will be extracted and used in the training and prediction stage using an SVM classifier.

4.1. Data Generation

Waveforms containing PQDs were created using mathematical models used in [7,26,29]. Between 1404 and 1521 signals were created for each of the seven PQ events, having noiseless and signals with SNR of 30, 40 and 50 dB of WGN, which are some of the SNR values used in [6,11,12,13,14], to which the following classes were assigned, Sine (C1), Sag (C2), Transient Oscillation (C3), Swell (C4), Flicker (C5), Interruption (C6) and Notch (C7), being a total of 9558 signals for each noise level. The sampling rates ( f s ) used were 3.2, 5, 6.4, 8, 9.6, 15, 20 and 30 kHz, as suggested in [6,7,16,17,18,19], the frequency of the sinusoidal signal (w) was 60 Hz, which is the one used in Mexico, and the time window used was 12 cycles or 200 ms, which is the most used according to the IEEE 1159-2009 standard [30]. Table 1 shows the mathematical models and the ranges of values used, where an amplitude (A) equal to one is used, the duration of the disturbances is controlled by a pair of step functions ( u ( t ) ) with shifts, α performs the changes in magnitude, and f n and β , are frequency values.

4.2. Processing and Feature Extraction

The second part of the methodology consists of processing and feature extraction, a very important part as it prepares the data for training. At the processing stage, decomposition levels four to seven were tested using the P y W a v e l e t s library [31], as it offers a wide variety of different wavelets and good performance. As suggested in [32], the d m e y mother wavelet was used to perform tests for the feature selection.
In feature extraction, the relevant information of the signal is obtained to reduce the input vector that will be used in the training of the classifier. In this work, seven statistical properties were selected to be calculated at each of the decomposition levels obtained by applying DWT, which were mean ( X ¯ ), Root Mean Square ( R M S ), standard deviation (s), kurtosis (K), skewness ( S k ), variance ( s 2 ) and energy (E). For each decomposition level, sampling rate and noise, all combinations were tested using between three and seven of the features shown in Table 2 in order to obtain the configurations that obtained the best performance. For noisy signals, tests were also performed by eliminating between one and four of the decomposition levels that contained the highest frequencies to minimize the noise in the waveform. This removal of the highest frequencies improves the quality of the information extracted with the features by removing the randomness of the noise and trying to reduce the amount of data that must be processed when using high sampling rates.

4.3. Training and Prediction

The SVM OAA classifier with polynomial kernel was chosen, which allows the modification of three important parameters: regularization coefficient (C), kernel coefficient ( γ ), bias (b) and polynomial degree [33]. The coefficient C controls the size of the margin, a large value of this parameter causes the margin to be smaller, and, consequently, a smaller number of errors are allowed. The γ value determines the influence on the final decision of each of the inputs during training. In this work, a value of γ equal to 0.04 was used, calculated according to the size of the input vectors; a value of b equal to zero; a degree three for the polynomial kernel, since tests using higher degrees did not present an improvement and increased the training time greatly; and a coefficient C equal to two, since tests using higher values did not improve performance and placing high values can cause the margin to be too small and overfit the data. The total data were divided into 80% for training and 20% for validation. For the implementation of the classifier, the S c i k i t L e a r n library was used since it is based on L I B S V M [34], which is the preferred option in several programming languages.

5. Results

The results shown in Figure 2 were obtained from tests carried out with all feature combinations and decomposition levels for noiseless signals, where an irregular behavior is observed at the lowest sampling rates; then, the f s of 9.6 kHz is observed to obtain the best results for any level of decomposition. After that, the increase in the sampling frequency decreases the performance of the classifiers, so the increase in the decomposition levels does not greatly improve the highest success rate obtained in noiseless conditions. Using six and seven levels of decomposition gives the best results at almost all frequencies other than 9.6 kHz, while using four and five levels of decomposition gives the worst results for sampling frequencies other than 9.6 kHz.
The best performances for each sampling frequency, noise level, and decomposition level are shown in Figure 3; the effect of eliminating the highest frequencies is also shown, which follow the next order from highest to lowest frequency: d1, d2, d3 and d4. Using four levels of decomposition, removing the higher frequencies provides an improvement in performance for frequencies greater than 6.4 kHz. For the three noise levels, the best results are obtained between 8 and 9.6 kHz; for signals with SNR of 50 and 40 dB, the best configuration results from removing d1 and d2, while for 30 dB, the best result is obtained by removing d1. Using five levels of decomposition, the best performance on signals with an SNR of 50 dB is obtained at an f s of 9.6 kHz, and the use of higher frequencies worsens the success; for 40 and 30 dB, the best successes are obtained at the highest sampling rate by eliminating d1, d2, and d3. For five, six and seven levels of decomposition, it is observed that removal beyond d2 requires a higher sampling rate to obtain good results. With six levels of decomposition, an upward trend is observed from an f s of 15 kHz, obtaining the best results at 30 kHz, eliminating up to d3 and d4. Finally, with seven levels of decomposition, it is observed that for the three noise levels, there is an increase in performance at an f s between 6.4 and 8 kHz; subsequently, a small decrease in accuracy is observed as the sampling rate increases.
Based on the results shown in Figure 3, the configurations that obtained the best percentage of success for each noise level and sampling rate were chosen. Table 3 shows the information on the level of decomposition that must be performed with the DWT, the combination of features, and up to what level of decomposition they must be eliminated to obtain the best results with the proposed algorithm.
From the configurations shown in Table 3, tests were performed by changing the mother wavelet dmey to bior4.4, rbio3.1, db4, and db28, in order to analyze whether this change in the processing stage affected the performance of the algorithm. Figure 4 shows the comparison of the success percentages for the different noise levels and sampling rates obtained using the five mother wavelets.
After performing the tests with the mother wavelets, the results shown in Table 4 were obtained, where the best configurations of sampling frequency, mother wavelet, decomposition level, and filtering are shown, obtaining success percentages between 91.9 and 99.9, taking into account all sampling frequencies and noise levels. Although the optimizations were performed using the mother wavelet d m e y , there are cases in which better results were obtained using another wavelet. The worst classified classes were C1 and C6 for all cases, while the best classified were C3 and C7. Tests were performed on a laptop with an i7-12650H processor with 16 GB of RAM to obtain execution times, where times less than 700 μ s were obtained for processing and classification. The processing phase achieved times between 53 and 583 μ s depending on the number of features, the mother wavelet, and the decomposition levels; the classification phase achieved times between 78 and 115 μ s; and the training time was between 0.34 and 8.08 s for a total of 7671 waveforms. Table 4 shows the configurations that obtained the best success for each noise level and its runtime.

6. Discussion

The success rates obtained show that the proposed algorithm is capable of classifying waveforms containing PQDs and white Gaussian noise. Removing higher frequencies after applying DWT was shown to improve the algorithm’s performance for all three noise levels; however, it requires a higher sampling rate to deliver good results.
The results shown in Figure 2 and Figure 3 demonstrate that the sampling frequency can affect the performance of algorithms for PQD classification. Unlike the results obtained in [16], the proposed algorithm does not present a tendency for a large increase at first and then maintaining a success rate without major changes as the sampling rate increases in noiseless scenarios. However, this behavior does occur when applying six levels of decomposition to noisy signals.
From the results shown in Table 4, it is obtained that the best configuration for noiseless signals is an f s of 9.6 kHz, five levels of decomposition without eliminating any, a d m e y mother wavelet, and using mean, kurtosis, and variance as features. For signals with an SNR of 50 dB, the best setting is an f s equal to 30 kHz, a d m e y mother wavelet, six levels of decomposition removing d1, and using standard deviation, kurtosis, and variance as features. For signals with SNR of 40 dB, the best configuration is an 8 kHz of sampling rate, a rbio3.1 mother wavelet, seven levels of decomposition removing d1 and d2, and using mean, standard deviation, kurtosis, and variance as features. Finally, for signals with an SNR of 30 dB; the best configuration is a sampling rate of 30 kHz; a bior4.4 mother wavelet, six levels of decomposition removing d1, d2 and d3; and using mean, RMS, standard deviation, kurtosis, symmetry, and variance as features. The execution time of less than 700 μ s achieved with the algorithm makes it a good option for implementation on single-board computers for real-time classification. Furthermore, since it is made from P y t h o n and C, it can be easily migrated between different devices.
The appearance of mother wavelets, different from d m e y in Table 3, shows that it can affect the success of the algorithm since the shape of a particular wavelet could better adapt to the analyzed data. It could extract more relevant information from the waveforms and perform better noise filtering.
The algorithm demonstrated good performance in classifying disturbances involving frequency in noisy environments. The decrease in the accuracy of events involving a change in amplitude in these environments may be because noise is not eliminated at all levels of decomposition by the processing performed. Because the difference in amplitudes between classes is minimal, different characteristics could be used. An adjustment could be made in the size of the margin to reduce errors in the decision limits, or a classification could be made based on the maximum and minimum values.
Although there are works such as Refs. [2,6] in which a better percentage of success is obtained in the classification of noisy signals, these require more complex processing and greater computational resources. So the execution times in the real-time classification of PQDs could be affected. On the other hand, the proposed algorithm obtained better performance in the classification of noiseless signals.
The proposed algorithm could be a suitable option for classifying real signals, although the tests were carried out with waveforms generated from mathematical models. This capacity to classify actual signals is because removing the highest frequencies of the signal would help eliminate most of the noise coming from the measuring devices and the electrical network. It has also shown good performance in noisy environments. However, in reality, combinations of disturbances occur, so this type of event would have to be added. Therefore, the classifier would have to be adjusted based on real signals to evaluate whether the algorithm could deliver good performance under these conditions.
In future work, a search for new sampling rates that help improve the performance of the algorithm can be carried out. The addition of more types of PQDs, tests with different mother wavelets, and the implementation of the algorithm in single-board computers for real-time classification can also be performed.

Author Contributions

Conceptualization, J.A.M.-M. and E.R.-A.; methodology, J.A.M.-M.; software, J.A.M.-M. and J.C.O.-R.; validation, J.A.R.-H. and N.F.G.-R.; formal analysis, M.V.C.-B.; resources, J.A.R.-H.; writing—original draft preparation, J.A.M.-M. and E.R.-A.; writing—revised draft preparation, E.R.-A. and J.A.M.-M.; supervision, E.R.-A. and J.A.G.-G.; project administration, E.R.-A. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National Technological Institute of Mexico under grant 22013.25-P.

Data Availability Statement

The datasets presented in this article are not readily available because the data are part of an ongoing study. Requests to access the datasets should be directed to enrique.ra@morelia.tecnm.mx.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
PQPower Quality
PQDPower Quality Disturbance
FFTFast Fourier Transform
DWTDiscrete Wavelet Transform
STStockwell Transform
TTTTime-Time Transform
DTDecision Tree
SVMSupport Vector Machine
RFCRandom Forest Classifier
ELMModular Probabilistic Neural Network
STFTShort-Time Fourier Transform
LSTMLong Short-Term Memory
OAAOne-Against-All
OAOOne-Against-One
SNRSignal-to-Noise Ratio
f s Sampling Rate
WGNWhite Gaussian Noise
GANGenerative Adversarial Network
WTWavelet Transform

References

  1. Thiyagarajan, V.; Subramaniam, N.P. Wavelet approach and support vector networks based power quality events recognition and categorisation. In Proceedings of the 2016 International Conference on Signal Processing, Communication, Power and Embedded System (SCOPES), Paralakhemundi, India, 3–5 October 2016; pp. 1667–1671. [Google Scholar] [CrossRef]
  2. Mishra, S.; Mallick, R.; Gadanayak, D.A.; Nayak, P.; Sharma, R.; Panda, G.; Al-Numay, M.; Siano, P. Real Time Intelligent Detection of PQ Disturbances With Variational Mode Energy Features and Hybrid Optimized Light GBM Classifier. IEEE Access 2024, 12, 47155–47172. [Google Scholar] [CrossRef]
  3. Suganthi, S.T.; Vinayagam, A.; Veerasamy, V.; Deepa, A.; Abouhawwash, M.; Thirumeni, M. Detection and classification of multiple power quality disturbances in Microgrid network using probabilistic based intelligent classifier. Sustain. Energy Technol. Assess. 2021, 47, 101470. [Google Scholar] [CrossRef]
  4. Mahela, O.P.; Shaik, A.G.; Khan, B.; Mahla, R.; Alhelou, H.H. Recognition of Complex Power Quality Disturbances Using S-Transform Based Ruled Decision Tree. IEEE Access 2020, 8, 173530–173547. [Google Scholar] [CrossRef]
  5. Markovska, M.; Taskovski, D.; Kokolanski, Z.; Dimchev, V.; Velkovski, B. Real-Time Implementation of Optimized Power Quality Events Classifier. IEEE Trans. Ind. Appl. 2020, 56, 3431–3442. [Google Scholar] [CrossRef]
  6. Enshaee, A.; Enshaee, P. A New S-Transform-Based Method for Identification of Power Quality Disturbances. Arab. J. Sci. Eng. 2018, 43, 2817–2832. [Google Scholar] [CrossRef]
  7. Samanta, I.S.; Rout, P.K.; Mishra, S. An optimal extreme learning-based classification method for power quality events using fractional Fourier transform. Neural Comput. Appl. 2021, 33, 4979–4995. [Google Scholar] [CrossRef]
  8. Rahul. Multiple power quality events recognition and classification based on adaptive Eigen-based type-2 fuzzy logic algorithm. Iran J. Comput. Sci. 2022, 5, 55–68. [Google Scholar] [CrossRef]
  9. Samanta, I.S.; Rout, P.K.; Mishra, S. Power Quality Events Recognition Using S-Transform and Wild Goat Optimization-Based Extreme Learning Machine. Arab. J. Sci. Eng. 2020, 45, 1855–1870. [Google Scholar] [CrossRef]
  10. Motlagh, S.; Akbari Foroud, A. Power quality disturbances recognition using adaptive chirp mode pursuit and grasshopper optimized Support Vector Machines. Measurement 2021, 168, 108461. [Google Scholar] [CrossRef]
  11. Khokhar, S.; Zin, A.M.; Mokhtar, A.; Bhayo, M.; Naderipour, A. Automatic classification of single and hybrid power quality disturbances using Wavelet Transform and Modular Probabilistic Neural Network. In Proceedings of the 2015 IEEE Conference on Energy Conversion (CENCON), Johor Bahru, Malaysia, 19–20 October 2015; pp. 457–462. [Google Scholar] [CrossRef]
  12. Jian, X.; Wang, X. A novel semi-supervised method for classification of power quality disturbance using generative adversarial network. J. Intell. Fuzzy Syst. 2021, 40, 3875–3885. [Google Scholar] [CrossRef]
  13. Chiam, D.H.; Lim, K.H.; Law, K.H. LSTM power quality disturbance classification with wavelets and attention mechanism. Electr. Eng. 2023, 105, 259–266. [Google Scholar] [CrossRef]
  14. Wang, J.; Zhang, D.; Zhou, Y. Ensemble deep learning for automated classification of power quality disturbances signals. Electr. Power Syst. Res. 2022, 213, 108695. [Google Scholar] [CrossRef]
  15. Khetarpal, P.; Nagpal, N.; Siano, P.; Al-Numay, M. Power quality disturbance signal segmentation and classification based on modified BI-LSTM with double attention mechanism. IET Gener. Transm. Distrib. 2024, 18, 50–62. [Google Scholar] [CrossRef]
  16. Eisenmann, A.; Streubel, T.; Rudion, K. PQ classification by way of parallel computing—A sensitivity analysis for a real-time LSTM approach using waveform and RMS data. In Proceedings of the 2019 IEEE Milan PowerTech, Milan, Italy, 23–27 June 2019; pp. 1–6. [Google Scholar] [CrossRef]
  17. Liu, J.; Tang, Q.; Ma, J.; Qiu, W. FFNet: An automated identification framework for complex power quality disturbances. Electr. Power Syst. Res. 2022, 208, 107866. [Google Scholar] [CrossRef]
  18. Achlerkar, P.D.; Samantaray, S.R.; Sabarimalai Manikandan, M. Variational Mode Decomposition and Decision Tree Based Detection and Classification of Power Quality Disturbances in Grid-Connected Distributed Generation System. IEEE Trans. Smart Grid 2018, 9, 3122–3132. [Google Scholar] [CrossRef]
  19. Karasu, S.; Saraç, Z. Investigation of power quality disturbances by using 2D discrete orthonormal S-transform, machine learning and multi-objective evolutionary algorithms. Swarm Evol. Comput. 2019, 44, 1060–1072. [Google Scholar] [CrossRef]
  20. Grossmann, A.; Morlet, J. Decomposition of Hardy Functions into Square Integrable Wavelets of Constant Shape. SIAM J. Math. Anal. 1984, 15, 723–736. [Google Scholar] [CrossRef]
  21. Erişti, H.; Demir, Y. Automatic classification of power quality events and disturbances using wavelet transform and Support Vector Machines. IET Gener. Transm. Distrib. 2012, 6, 968–976. [Google Scholar] [CrossRef]
  22. Nieto, N.; Orozco, D.M. El uso de la transformada Wavelet discreta en la reconstrucción de señales senosoidales. Sci. Tech. 2008, 1, 381–386. [Google Scholar]
  23. Mallat, S. A theory for multiresolution signal decomposition: The wavelet representation. IEEE Trans. Pattern Anal. Mach. Intell. 1989, 11, 674–693. [Google Scholar] [CrossRef]
  24. Lester, M. Introducción a Wavelets, Buenos Aires, Argentina, 2006. 20 February. Available online: https://users.exa.unicen.edu.ar/catedras/escuelapav/cursos/wavelets.htm (accessed on 1 February 2025).
  25. Cortes, C.; Vapnik, V. Support-vector networks. Mach. Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef]
  26. Thirumala, K.; Pal, S.; Jain, T.; Umarikar, A.C. A classification method for multiple power quality disturbances using EWT based adaptive filtering and multiclass SVM. Neurocomputing 2019, 334, 265–274. [Google Scholar] [CrossRef]
  27. Rodrigues Junior, W.L.; Borges, F.A.S.; Veloso, A.F.d.S.; Rabêlo, R.d.A.L.; Rodrigues, J.J.P.C. Low voltage smart meter for monitoring of power quality disturbances applied in Smart Grid. Measurement 2019, 147, 106890. [Google Scholar] [CrossRef]
  28. Bishop, C.M. Pattern Recognition and Machine Learning (Information Science and Statistics), 1st ed.; Springer: Berlin/Heidelberg, Germany, 2007. [Google Scholar]
  29. Panigrahi, R.R.; Mishra, M.; Nayak, J.; Shanmuganathan, V.; Naik, B.; Jung, Y.A. A power quality detection and classification algorithm based on FDST and hyper-parameter tuned light-GBM using memetic firefly algorithm. Measurement 2022, 187, 110260. [Google Scholar] [CrossRef]
  30. IEEE Std 1159-2009; IEEE Recommended Practice for Monitoring Electric Power Quality, (Revision of IEEE Std 1159-1995). Institute of Electrical and Electronics Engineers: New York, NY, USA, 2009; pp. 1–94. [CrossRef]
  31. Lee, G.R.; Gommers, R.; Waselewski, F.; Wohlfahrt, K.; Leary, A. PyWavelets: A Python package for wavelet analysis. J. Open Source Softw. 2019, 4, 1237. [Google Scholar] [CrossRef]
  32. Medina-Molina, J.A.; Arzate-Rueda, B.; Reyes-Archundia, E.; Gutiérrez-Gnecchi, J.A.; Olivares-Rojas, J.C.; Rodríguez-Herrejón, J.A.; Guerrero-Rodríguez, N.F. Execution time comparison of algorithms to classify power quality disturbances in single board computers. In Proceedings of the 2024 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC), Ixtapa, Mexico, 1–2 November 2024; Volume 8, pp. 1–6. [Google Scholar] [CrossRef]
  33. Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine Learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
  34. Chang, C.C.; Lin, C.J. LIBSVM: A library for Support Vector Machines. ACM Trans. Intell. Syst. Technol. 2011, 2, 1–27. [Google Scholar] [CrossRef]
Figure 1. Proposed methodology for PQD classification.
Figure 1. Proposed methodology for PQD classification.
Computers 14 00138 g001
Figure 2. Comparison of success rates obtained in noiseless signals applying DWT with different decomposition levels.
Figure 2. Comparison of success rates obtained in noiseless signals applying DWT with different decomposition levels.
Computers 14 00138 g002
Figure 3. Comparison of the performance of SVM classifiers when eliminating the highest frequencies by applying DWT with different levels of decomposition to noisy signals.
Figure 3. Comparison of the performance of SVM classifiers when eliminating the highest frequencies by applying DWT with different levels of decomposition to noisy signals.
Computers 14 00138 g003
Figure 4. Comparison of the success rates obtained using different mother wavelets.
Figure 4. Comparison of the success rates obtained using different mother wavelets.
Computers 14 00138 g004
Table 1. Mathematical models.
Table 1. Mathematical models.
NameClassMathematical ModelParameters
NormalC1 x ( t ) = A sin ( ω t ) [ 1 α ( u ( t t 1 ) u ( t t 2 ) ) ] 0.08 α 0.08
0.5 T t 2 t 1 12 T
SagC2 x ( t ) = A sin ( ω t ) [ 1 α ( u ( t t 1 ) u ( t t 2 ) ) ] 0.1 α 0.9
0.5 T t 2 t 1 12 T
Transient OscillationC3 x ( t ) = A sin ( ω t ) + [ α sin ( w o t ) ( exp ( 0.001 ( t t 1 τ ) ) ) ( u ( t t 1 ) u ( t t 2 ) ) ] 0.1 α 0.8
0.5 T t 2 t 1 3 T
8 ms τ 40 ms
w o = 2 π f n 300 Hz f n 900 Hz
SwellC4 x ( t ) = A sin ( ω t ) [ 1 + α ( u ( t t 1 ) u ( t t 2 ) ) ] 0.1 α 0.8
0.5 T t 2 t 1 12 T
FlickerC5 x ( t ) = A sin ( ω t ) [ 1 + α sin ( w o t ) ] 0.1 < α 0.2
w o = 2 π β 6 Hz β 25 Hz
InterruptionC6 x ( t ) = A sin ( ω t ) [ 1 α ( u ( t t 1 ) u ( t t 2 ) ) ] 0.9 < α 1
0.5 T t 2 t 1 12 T
NotchC7 x ( t ) = A sin ( ω t ) s i g n [ α sin ( ω t ) n = 0 9 u ( t ( t 1 + 0.02 n ) ) u ( t ( t 2 + 0.02 n ) ) ] 0.1 α 0.4
0.01 T t 2 t 1 0.05 T
Table 2. Equations of selected features.
Table 2. Equations of selected features.
FeatureEquationFeatureEquation
Mean (1) X ¯ = i = 1 n x i n Root Mean Square (2) R M S = i = 1 n x i 2 n
Standard Deviation (3) s = i = 1 n x i X ¯ 2 n Symmetry (4) S k = i = 1 n x i X ¯ s 3 n
Kurtosis (5) K = i = 1 n x i X ¯ s 4 n Variance (6) s 2 = i = 1 n x i X ¯ 2 n
Energy (7) E = i = 1 n x i 2
Table 3. Best algorithm settings for each noise level and sampling rate.
Table 3. Best algorithm settings for each noise level and sampling rate.
f s (kHz)DWT LevelLevels RemovedNoise Level (SNR)Comb.Success %DWT LevelLevels RemovedNoise Level (SNR)Comb.Success %
3.25--1, 3, 4, 5, 697.4471502, 4, 5, 694.02
56--1, 2, 3, 4, 5, 696.1871501, 3, 5, 693.14
6.46--3, 4, 5, 698.9571501, 2, 3, 4, 5, 695.42
87--1, 2, 3, 4, 5, 697.4942503, 5, 694.85
9.65--1, 5, 699.9052503, 5, 695.79
157--1, 3, 4, 5, 697.3951501, 3, 4, 5, 694.49
207--1, 2, 3, 5, 697.0452503, 4, 5, 695.11
307--4, 5, 697.5461503, 5, 696.00
3.27-303, 4, 5, 691.5871401, 2, 4, 5, 693.55
56-302, 4, 5, 690.027-402, 3, 4, 5, 691.89
6.47-301, 2, 3, 5, 692.567-401, 2, 3, 4, 5, 694.49
871301, 2, 3, 5, 693.6672401, 3, 5, 694.49
9.672301, 2, 4, 5, 691.7872403, 4, 5, 692.98
1573301, 4, 5, 692.8273401, 2, 4, 5, 694.23
2053301, 3, 5, 692.6773401, 3, 5, 694.02
3063301, 2, 3, 4, 5, 694.2363403, 4, 5, 695.11
Table 4. Best algorithm settings and runtimes for each noise level.
Table 4. Best algorithm settings and runtimes for each noise level.
f s (kHz)SNRMother WaveletDWT LevelLevels RemovedComb.Success RateRun-Time ( μ s)
AVGC1C2C3C4C5C6C7
3.2-dmey5-1, 3, 4, 5, 697.494.796.799.798.610091.8100239
5-db286-1, 2, 3, 4, 5, 696.293.193.910097.610088.499.7277
6.4-dmey6-3, 4, 5, 698.910097.51001001009599.7294
8-bior4.47-1, 2, 3, 4, 5, 698.395.196.599.710010096.8100212
9.6-dmey5-1, 5, 699.910010010010010099.699.7323
15-dmey7-1, 3, 4, 5, 697.493.796.299.710010091.5100445
20-dmey7-1, 2, 3, 5, 69791.697.310010099.390.8100527
30-db287-4, 5, 699.698.610010010010098.899.7661
3.250bior4.4712, 4, 5, 694.380.694.710097.910090.3100314
5rbio3.1711, 3, 5, 693.982.397.310099.397.785.799.3306
6.4dmey711, 2, 3, 4, 5, 695.484.896.710097.910090.6100544
8dmey423, 5, 694.986.99710097.296.988.3100387
9.6dmey523, 5, 695.886.797.510099.399.289.9100401
15dmey511, 3, 4, 5, 694.583.795.410097.598.888.8100477
20dmey523, 4, 5, 695.186.898.310097.996.289.1100399
30dmey613, 5, 69688.497.21009898.591.4100482
3.240dmey711, 2, 4, 5, 693.676.695.410099.698.590.7100566
5rbio3.17-2, 3, 4, 5, 693.280.197.210099.396.385.799.3435
6.4db287-1, 2, 3, 4, 5, 694.783.49510098.610088.6100698
8rbio3.1721, 3, 5, 695.486.896.610097.499.689.599.6233
9.6dmey723, 4, 5, 6938592.210091.89786.899.6477
15dmey731, 2, 4, 5, 694.281.29610098.910087.6100448
20dmey731, 3, 5, 69482.696.410098.298.586.3100449
30dmey633, 4, 5, 695.18498.710098.299.288.9100384
3.230db47-3, 4, 5, 691.976.491.210097.89786.1100443
5rbio3.16-2, 4, 5, 69379.896.410097.998.186.497.4429
6.4rbio3.17-1, 2, 3, 5, 693.779.999.510097.999.286.498.5434
8rbio3.1711, 2, 3, 5, 694.684.49510097.699.288.599.6300
9.6bior4.4721, 2, 4, 5, 693.279.891.299.697.199.289.699.3256
15dmey731, 4, 5, 692.878.392.110098.698.986.599.6439
20db4531, 3, 5, 693.986.894.110095.396.686.7100146
30bior4.4631, 2, 3, 4, 5, 695.286.497.910099.397.788.299.6208
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

Medina-Molina, J.A.; Reyes-Archundia, E.; Gutiérrez-Gnecchi, J.A.; Rodríguez-Herrejón, J.A.; Chávez-Báez, M.V.; Olivares-Rojas, J.C.; Guerrero-Rodríguez, N.F. Optimal Selection of Sampling Rates and Mother Wavelet for an Algorithm to Classify Power Quality Disturbances. Computers 2025, 14, 138. https://doi.org/10.3390/computers14040138

AMA Style

Medina-Molina JA, Reyes-Archundia E, Gutiérrez-Gnecchi JA, Rodríguez-Herrejón JA, Chávez-Báez MV, Olivares-Rojas JC, Guerrero-Rodríguez NF. Optimal Selection of Sampling Rates and Mother Wavelet for an Algorithm to Classify Power Quality Disturbances. Computers. 2025; 14(4):138. https://doi.org/10.3390/computers14040138

Chicago/Turabian Style

Medina-Molina, Jonatan A., Enrique Reyes-Archundia, José A. Gutiérrez-Gnecchi, Javier A. Rodríguez-Herrejón, Marco V. Chávez-Báez, Juan C. Olivares-Rojas, and Néstor F. Guerrero-Rodríguez. 2025. "Optimal Selection of Sampling Rates and Mother Wavelet for an Algorithm to Classify Power Quality Disturbances" Computers 14, no. 4: 138. https://doi.org/10.3390/computers14040138

APA Style

Medina-Molina, J. A., Reyes-Archundia, E., Gutiérrez-Gnecchi, J. A., Rodríguez-Herrejón, J. A., Chávez-Báez, M. V., Olivares-Rojas, J. C., & Guerrero-Rodríguez, N. F. (2025). Optimal Selection of Sampling Rates and Mother Wavelet for an Algorithm to Classify Power Quality Disturbances. Computers, 14(4), 138. https://doi.org/10.3390/computers14040138

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