Memuat
Memuat
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Class Wavelet Power Quality Disturbance Classification #4: Energy and Statistical Feature Extraction from Wavelet Coefficients”.
Other ways we can help with Python.
Learn with a mentor
Scheduled Simulation & Engineering courses with live guidance and a certificate.

Course/Training Ansys ~ Heat Transfer and Heat Flux Analysis
★ 5.0 (10)

Course/Training MATLAB — MATLAB App Design: The Ultimate Guide to MATLAB Apps
★ 5.0 (10)

Course/Training Ansys — Airflow Simulation of a Car Radiator with ANSYS
★ 5.0 (9)
Have it built for you
No time to learn Python? Our team can do the project for you.

Matlab Development Service — Complete Neural Signal Processing and Analysis Zero to Hero
★ 5.0 (59)

Ansys Maxwell Development Service
★ 5.0 (50)

Petrel Development Service
★ 5.0 (14)
Get notified about new Python classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
Here is the final result, each 640-sample signal is summarized into 32 features from the wavelet coefficients and RMS. From the feature distribution alone, we can already see the separated classes of disturbances. Let's start. Hello, welcome to episode four of the series on power quality disturbance classification using wavelet analysis. Wavelet coefficients are still too numerous and have varying lengths to be directly used in machine learning. We need to summarize them into meaningful features. Today we create 32 features and see how well they separate the classes.
Create file feature.py For each wavelet coefficient, we calculate 5 features. Relative energy compared to total energy, standard deviation, average absolute value, maximum absolute value, and Shannon entropy, which measures how spread out the energy is. Short transients have low D1 entropy because their energy is concentrated in a few coefficients. 6 coefficients x 5 features result in 30 features, plus the lowest and highest RMS per cycle for magnitude disturbances.
Feature names are automatically generated, for example, energy underscore D1 or entropy underscore A5, and the feature matrix function calculates features for multiple signals at once. Create file extraction.py
We create the dataset and calculate features for all signals, then save them to feature underscore peki.npz. Run. The feature matrix is 2700 x 32, completed in less than 1 second. Average per class shows clear patterns. D1 transient and NOP energy is the highest, D3 energy is highest on harmonics and sec plus harmonics because harmonics three to seven are present in that band. Lowest RMS separates sec, interruption, and sec plus harmonics, while highest RMS separates swell.
Let's look at the box plot of 4 features. Lowest RMS separates interruption near 0 and sec in the middle. Highest RMS highlights swell. D3 energy highlights two harmonic classes. There are still classes overlapping in one feature, for example, NOC and NORMAL But the combination of 32 features gives machine learning enough information to distinguish them.
Done. We have extracted 32 energy, statistical, and entropy features from the wavelet coefficients plus RMS, then looked at how the features separate the classes. In the next episode, we will train SVM, Random Forest, and XGBoost. Currently working on a thesis, dissertation, or research in the field of power quality and signal processing? Cerdas Inovasi Digital helps with machine learning implementation, from generating disturbance signals according to IEEE-159, wavelet transformation, feature extraction, up to classification with SVM, Random Forest, and XGBoost, as well as opening Python programming courses for electrical engineering. Want to master the entire series, from synthetic signals up to NICE testing? All 6 episodes, complete with PDF step-by-step guides and source code, are available to premium tutorial subscribers. Subscribe starting at Rp69.000 per month, save 28% with the 12-month package, or pay once Rp999.000 for lifetime access. Thank you for watching, see you in the next episode. Thank you for watching!
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →