Introduction

The swift growth of industrialization, the opening up of electricity markets, and worries about the greenhouse effect, along with the possibility that fossil fuels will run out for traditional power generation, have all made it necessary to look into other ways to generate power from renewable sources1,2,3. To make alternative energy sources like wind, photovoltaic (PV), and fuel cells more widely available and easier to use, there has been a tremendous increase in research and technology development. Adding distributed generation (DG) from these renewable sources to the current electrical grid could make power management, reliability, and environmental deterioration all better. But whether the electric supply is connected to the grid or not, wind speed and solar radiation can change without warning, which can make wind energy conversion systems and PV systems work poorly. To solve these problems, hybrid systems often include energy storage parts such batteries, flywheel energy systems, and ultra-capacitors4. These energy storage elements are very important for keeping the power supply stable and reliable. DG is gaining popularity due to its nature, network characteristics and functionality. This has given rise to the problems that may affect power quality (PQ) within the distribution networks. There are a number of issues with DG, but it can also contribute to the rise and fall of PQ levels5,6,7. An example is, when DG units are connected or disconnection of DG, it may cause large voltage spikes. Also, the cyclical oscillation of the DG power output may cause voltage changes. Changes in the active and reactive power of DG can also cause voltage to change over a longer period of time. In addition, DG can cause power to flow in both directions and increase fault current levels, which can influence the levels of waveform distortion and the characteristics of voltage sag. Power electronics8,9,10 are very important for adding renewable energy sources to the current power grid. You can’t live without these devices, which include inverters, converters, and controllers, if you want to change and control electrical energy. Power electronics make it easier to connect renewable energy sources like wind turbines and PV arrays to the grid by changing their output into a format that the grid can use. They make renewable energy more reliable by making it easier to use as a power source. Some built-in characteristics of DG inverters, like those seen in photovoltaic systems, could cause PQ problems. The integration of wind and solar PV resources into the electric system has raised concerns about PQ issues11. Some of the things that could be causing these PQ problems are changes in solar irradiation, partial cloud cover, and the addition of inverters, filters, and control systems. Installing massive PV-DG units in medium voltage networks or lots of small PV-DG units in low voltage networks can cause PQ problems that are similar to those caused by disruptive loads. Moreover, PQ disturbances can lead to operational problems like equipment failures and malfunctioning protection devices. These disturbances include voltage sags, swells, notches, and sudden interruptions. Large non-linear loads that are started or stopped frequently cause voltage sags and swells, and power electronic devices cause harmonic distortion and notches in voltage and current signals. At the point of common coupling, abrupt changes in the power supply and linear or non-linear loads may cause brief disruptions (PCC). For DG-based hybrid systems, islanding events pose a serious problem in addition to PQ issues. When a portion of the electrical grid is cut off, islanding happens because independent DGs keep the local load in the cutoff area powered. Because there is no control over voltage or frequency and there is a power mismatch between the generation and the load, islanding events are difficult to handle. Disconnecting DG units from islanded circuits before reconnecting is required by current grid standards and practices. To resolve these problems and ensure the power system operates, controls, and is protected reliably, PQ disturbances and islanding occurrences must be effectively detected and classified. Protection coordination in DG systems with bidirectional fault current flow is still hard, unlike typical over-current protection for radial systems. It’s important to tell the difference between PQ disruptions and islanding occurrences since they need distinct ways to fix them. Detection and classification approaches, such as signal preprocessing, feature extraction, and classification techniques like pattern recognition12,13, are used to automatically tell the difference between and sort these disturbances.

This study is significant because it has an impact on society and the environment. Proper identification of PQDs of hybrid wind-solar photovoltaic plants will guarantee constant continuous electricity. It reduces equipment breakdown, idle industrial time, and dissatisfied customers. Large scale, higher quality power results in more renewable energy sources being able to get into the grid. This reduces the consumption of fossil fuels and it assists the world reduce greenhouse gas emissions. The suggested hybrid method utilizes Continuous Wavelet Transform scalograms based on more advanced deep learning models (ResNet and VGG-Net), NCA and SVM. This is superior to traditional algorithms such as Fourier transform, short-time Fourier transform, hilbert-huan transform, and discrete wavelet transform that have issues such as fixed resolution, poor non-stationary signal adaptability, or excessive computational complexity. Such a combination strengthens PQD classification, increases its speed and accuracy, corrects issues with existing methods and eases the process of integrating renewable energy systems. The primary objective of this paper is to develop and experiment with a hybrid intelligence system based on CWT, DNN, NCA, and SVM to properly classify PQDs in a hybrid wind-spv plant that is connected to power system networks.

The paper is distinctive because it integrates multiple approaches into one hybrid system of PQD classification, unlike the previous papers. Past research mostly employed the traditional transforms (FT, STFT, DWT, HHT), or single deep learning models. By contrast, the research is innovative in that it combines Continuous Wavelet Transform (CWT)-based scalograms with two DNN architectures (ResNet and VGG-Net) to boost the feature extraction process, applies the Neighborhood Component Analysis (NCA) as a dimensionality reduction and feature selection technique, and uses the Support Vector Machine (SVM) as a resilient classification tool. The proposed algorithm improves the generalization in addition to the classification accuracy in different PQD contexts compared to the earlier CNN-only or transform-based design. Furthermore, the validation of modified IEEE 9 and 13-bus hybrid Wind-SPV systems makes it stand out against the earlier approaches, which mostly employed simplified datasets, demonstrating its suitability in the actual renewable energy network with a significant portion of the network.

This paper presents a new hybrid deep learning methodology in PQDs categorization. It is a useful approach to categorize PQDs that occur in both normal power systems and hybrid solar-wind power systems. There are many crucial pieces to our plan. We employ CWT to break down PQD signals and make scalogram images that show their time-frequency properties in the integrated SPV plant power system. Second, our method uses two Deep Neural Networks (DNNs): ResNet and VGG-Net. These DNN architectures use the scaledograms that were obtained in the preprocessing stage as input. This allows them to drain features. Another significant aspect of the process is that we take the features of the DNN output of the dropout layers. Another aspect on which we do NCA is between the features produced in both deep learning architectures. It leads to the minimization of the amount of data and the assignment of unique properties that can be only obtained using PQDs. These features are selected and fed to an SVM classifier to assist in DP classification in PQD. We observe the performance of our proposed solution by using PQDs produced using MATLAB/Simulink. The results of our tests suggest that the automatic PQD categorization system can accurately analyze and sort PQDs. This paper’s main contributions are as follows:

  1. (i)

    The paper introduces a novel hybrid deep learning approach specifically designed for the classification of PQDs. This approach combines the strengths of different deep learning architectures to effectively categorize PQDs.

  2. (ii)

    The proposed algorithm is versatile and can classify PQDs in a range of power systems, including both hybrid solar-wind integrated power systems and conventional power systems. This adaptability is a valuable contribution as it addresses PQD classification needs in diverse energy contexts.

  3. (iii)

    The paper employs CWT for feature extraction from PQD signals. By generating scalogram images representing time-frequency information, it enhances the quality of feature extraction and, consequently, classification accuracy.

  4. (iv)

    The integration of two DNN – ResNet and VGG-Net for feature extraction is a key contribution. These DNNs aid in capturing essential features from the PQD data, improving the overall classification process.

  5. (v)

    The paper employs NCA to reduce data size while retaining distinctive features of PQDs. This not only streamlines the process but also helps in improving the efficiency of classification.

  6. (vi)

    The SVM classifier is utilized to perform the PQD classification, which enhances the robustness and accuracy of the classification process.

  7. (vii)

    The paper utilizes PQDs generated by MATLAB/Simulink for evaluation, providing empirical evidence of the effectiveness of the proposed algorithm. This practical validation demonstrates the algorithm’s real-world applicability.

There are six more parts to the paper construction. Section 2 looks at current research on PQDs in renewable energy systems, finds gaps in the knowledge, and sets research goals. Part 3 explains what PQDs are, lists the power quality parameters, and stresses how important it is to meet customer needs and make sure the power system is reliable. The study talks about how to apply CWT and the hybrid deep learning approach in Sect. 4. This includes DNNs, NCA, and SVM for feature extraction and classification. Section 5 talks about the materials, datasets, data collection, preprocessing, deep learning models, and the setup for the experiment. Section 6 talks about where the data comes from, how it was tested and validated, how it was analyzed, and what to think about when there might be power quality problems. In Sect. 7, the report comes to an end by summarizing the most important findings and suggesting areas for future research, with a focus on solving the problems of anti-islanding in distributed generation systems.

Related works

This part of the research is based on a thorough evaluation of earlier studies on power quality in renewable energy systems. It offers insights into prior methodologies for identifying PQDs and delivers a comparative study of various techniques. This review delineates research deficiencies and articulates the issue statement, culminating in the establishment of explicit objectives that direct the investigation. Feature extraction approaches are very important for quickly finding and sorting PQDs14. There are several ways to look at and sort PQDs. The Fourier Transform (FT) works well for analyzing stationary signals and extracting features from the frequency domain, however it doesn’t work for non-stationary signals. The Discrete Fourier Transform (DFT) and Short-Time Fourier Transform (STFT) were suggested to get around this problem15. STFT enhances transient localization via time-frequency windows; nevertheless, its static window size constrains adaptation. The S-Transform (ST)16,17,18,19 provides a changing window, which makes it easier to analyze non-stationary signals, but it also makes them less accurate. The Hilbert–Huang Transform (HHT)20,21,22 can find one or more PQDs, but it has trouble picking up low-energy frequency components. Many people use Discrete Wavelet Transform (DWT) methods23,24,25,26,27,28,29 because they can work with several resolutions, but you need to be careful when choosing mother wavelets and sampling rates. These traditional methods are computationally demanding and susceptible to noise, underscoring the necessity for more efficient PQD detection techniques. Deep learning (DL) has become a strong alternative since it can automatically extract features without the need for manual processing. DL directly extracts spatial and temporal patterns from input data, which makes classification more accurate and speeds up workflows. Since 2017, there has been a substantial increase in publications that focus specifically on DL in PQD research. This is because AI is being used more quickly in this area. As Solar Photovoltaic (SPV) systems become more common, PQD research has become even more important. For instance, the poll in30 pointed out problems with SPV integration and stressed that AI-based solutions are better than traditional ones at being responsive and controllable. The article1 talked about a method that used S-Transform and fuzzy c-means clustering in power systems that used SPV30. Proposed an S-Transform–based technique for identifying islanding, interruptions, and grid synchronization, while31 combined Wavelet Transform, Independent Component Analysis, and SVM for PQD detection in solar PV microgrids32. Analyzed wavelet-based features under noisy conditions, showing performance degradation with dimensional complexity33. Implemented a LabVIEW®-based real-time WT–SVM strategy, confirming hardware feasibility. Transfer learning with VGG-Net16 and scalograms was applied in34, while35 improved PQD classification through Hilbert and Wavelet transforms with PCA-optimized SVMs. More recently36, applied wavelet transforms with neural networks to hybrid-electric ferries, demonstrating PQD detection for operational reliability and energy management.

Recent studies have advanced PQD detection using state-of-the-art architectures37. Integrated the S-Transform with a channel attention–enhanced ResNet, improving robustness in noisy conditions38. applied Recurrent Neural Networks (RNNs) for PQD segmentation and classification39. Combined Fast S-Transform with CNN–LSTM, reporting over 97% accuracy for single and mixed disturbances40. Adopted Vision Transformers (ViTs), achieving 98.94% accuracy41. Developed PowerMobileNet, a lightweight MobileNetV3 + CBAM model with physics-inspired features42. Used Markov Transition Field encoding with DenseNet for compact yet accurate PQD recognition. A Measurement study43 introduced 3D-Visualized Spiral Curves (3D-VSC) to enhance interpretability. Alternative approaches include an Extreme Learning Machine (ELM) with Identity Feature Vectors44, Vision Transformer models applied to PQ signal spectrograms45, and a Quantum Neural Network (QNN) framework showing robustness to noise but requiring hardware validation46. Although these contributions show significant progress, several gaps remain. Many studies are confined to single-source renewable systems (either wind or solar) and rarely address hybrid Wind–SPV configurations. While advanced models such as ViT, DenseNet, and CNN–LSTM achieve high accuracy, they often exclude dimensionality reduction and feature selection, increasing computational complexity. Furthermore, few approaches are tested for real-time adaptability in practical hybrid networks. Building on these gaps, the present study introduces a hybrid deep learning framework integrating Continuous Wavelet Transform (CWT)-derived scalograms with ResNet and VGG-Net for feature extraction, Neighborhood Component Analysis (NCA) for feature selection, and Support Vector Machine (SVM) for classification. Unlike conventional FT, STFT, ST, HHT, or DWT methods, this approach ensures adaptability to non-stationary signals with reduced computational burden. Compared to earlier CNN-only approaches, the dual-network architecture combined with NCA improves generalization across diverse PQD scenarios. Validated on IEEE 9-bus and 13-bus hybrid Wind–SPV systems, the proposed method offers a scalable and efficient solution for PQD classification in renewable energy grids.

Table 1 Comparative analysis.

While the studies summarized in Table 1 address various aspects of PQD detection and classification, several research gaps remain. First, most methods rely on a single technique, whereas combining time–frequency analysis (e.g., Wavelet Transform) with deep learning could further improve accuracy. Second, hybrid approaches are still in their early stages and require systematic development. Third, with the increasing penetration of renewable energy sources such as wind and solar, PQDs are becoming more dynamic and diverse, demanding adaptable detection frameworks. Finally, limited attention has been given to the real-world impacts of PQDs on grid stability and consumer equipment, underscoring the need for methods that not only classify disturbances but also evaluate their consequences and support effective mitigation strategies.

The novelty of this research lies in addressing these identified gaps by introducing a hybrid deep learning framework that integrates CWT-derived scalograms with dual deep neural networks (ResNet and VGG-Net) for comprehensive feature extraction. The addition of Neighborhood Component Analysis (NCA) further enhances feature selection by reducing dimensionality while retaining discriminative power, and the Support Vector Machine (SVM) classifier provides robust classification capability. Unlike conventional techniques such as FT, STFT, ST, HHT, or DWT, which either lack adaptability to non-stationary PQDs or require high computational resources, the proposed method achieves superior accuracy and efficiency. Similarly, compared with earlier CNN-only approaches, the dual-network design combined with NCA improves generalization across diverse PQD scenarios. This comparative advantage, supported by empirical validation on IEEE 9 and 13-bus hybrid Wind–SPV systems, highlights the unique contribution of this study in bridging the gap between traditional signal processing methods and emerging deep learning approaches for power quality analysis.

Our proposed method overcomes these research gaps by applying deep learning, utilizing CWT for improved signal analysis, adopting a hybrid approach for enhanced accuracy, and evaluating its performance on real-world data. This approach has the potential to advance the state of the art in PQD detection and classification in renewable energy systems. The following are the objectives of the proposed system.

  • To develop a deep learning-based system for accurate identification and classification of PQDs in a hybrid wind-solar photovoltaic plant integrated with power system networks.

  • To utilize CWT to analyze PQDs and generate image files from CWT scalograms, providing valuable time-frequency representations for effective PQD recognition.

  • To implement a hybrid deep learning approach, incorporating deep neural networks (DNN), neighbour component analysis (NCA), and SVM techniques to enhance the accuracy of PQD identification based on extracted image features.

  • To evaluate the proposed hybrid deep learning approach using PQD data from a modified IEEE 9 and IEEE 13-bus test system, encompassing the hybrid wind-solar photovoltaic setup, and conduct comprehensive analyses and comparisons to validate its effectiveness in accurately recognizing PQDs and contributing to stable and efficient renewable energy-based power systems.

Power quality disturbances

Power quality disturbances (PQDs) are voltage, current, or frequency variations that cause electrical equipment to interfere with the functionality of the equipment. Typical nuisances are voltage sags, swells, interruptions, harmonics, flicker, and transients, which are caused by differences in the grid, equipment operation, or external causes. PQDs impair the reliability of the systems used, destroy delicate equipment, and impose industrial downtime which results in financial losses. In homes, they can destroy domestic appliances and in areas where it is important like in healthcare and data centres, they can disrupt service delivery. The importance of PQ is heightened by several factors:

  • Modern devices are increasingly sensitive to voltage and frequency deviations.

  • Non-linear loads (e.g., drives, computers, LED lighting) introduce harmonics that distort waveforms.

  • Renewable energy sources such as wind and solar add variability and create PQ challenges.

  • Poor PQ reduces efficiency and incurs significant economic losses.

  • Compliance with international PQ standards is mandatory for utilities and industries.

  • Advances in PQ monitoring tools support proactive management.

  • Improved PQ contributes to energy savings and reduced environmental impact.

Mathematical background for power quality indices

To ensure scope of this work, standard mathematical formulations for power quality (PQ) indices in wind–solar integrated systems are introduced. These indices quantify disturbances such as voltage sags, swells, harmonic distortion, and unbalance, which form the basis for subsequent feature extraction and classification.

The root mean square (RMS) voltage of a signal (v(t)) over a time window (T) is defined as

$$\:{V}_{rms}=\sqrt{\frac{1}{T}{\int\:}_{0}^{T}\:\:{v}^{2}\left(t\right)dt}$$
(1)

Voltage sags occur when ( Vrms < 0.9Vnominal ), while swells occur when ( Vrms > 1.1Vnominal).

Harmonics are among the most critical PQ disturbances in renewable energy systems. THD is expressed as

$$\:THD=\frac{\sqrt{\sum\:_{h=2}^{{\infty\:}}\:\:{V}_{h}^{2}}}{{V}_{1}}\times\:100\text{\%}$$
(2)

where V1 is the RMS value of the fundamental component and Vh are the RMS values of harmonic components.

Unbalanced loading conditions in hybrid grids are quantified using the voltage unbalance index:

$$\:VU=\frac{{V}_{\text{m}\text{a}\text{x}}-{V}_{\text{m}\text{i}\text{n}}}{{V}_{\text{avg\:}}}\times\:100\text{\%}$$
(3)

Where (Vmax,Vmin and Vavg represent the maximum, minimum, and average phase voltages, respectively.

For a three-phase system with voltage (v(t)) and current (i(t)), the instantaneous active power is given by

$$\:P=\frac{1}{T}{\int\:}_{0}^{T}\:v\left(t\right)i\left(t\right)dt$$
(4)

The reactive power is then obtained as

$$\:Q=\sqrt{{S}^{2}-{P}^{2}}$$
(5)

where (S) is the apparent power.

The power factor, which reflects efficiency of power utilization, is defined as

$$\:PF=\frac{P}{S}=\text{c}\text{o}\text{s}\varphi\:$$
(6)

Where φ is the phase angle between voltage and current.

These indices provide a mathematical foundation for evaluating PQ in hybrid wind–solar systems. They complement the proposed CWT–DNN–NCA–SVM framework by establishing the context in which disturbances are generated and subsequently classified. Tying theoretical definitions of PQ to current data-driven detection, the research makes sure that the given methodology is based on the existing PQ metrics and that they are applicable to renewable-integrated environments.

Theoretical background

In recent years there has been an increasing interest in the development of electrical power quality monitoring systems. The principal aspects of the proposed system of surveillance, study, and classification as it currently appears in this paper are described in this section.

Use of CWT for PQD analysis

Continuous Wavelet Transform (CWT) is a common method of signal analysis in time varying signals such as frequency content. The Fourier Transform decomposes a signal into sine waves that have constant frequencies, the CWT is done on a large number of scales simultaneously, providing time and frequency information. This feature contributes to its particularly good ability to locate and classify PQDs, which are not only temporary, but undergo change with time. CWT creates a time-frequency representation of a signal that is two dimensional by applying scaled and shifted copies of a mother wavelet function to the signal. The two major types of wavelet transform include the Discrete Wavelet Transform (DWT) and the Continuous Wavelet Transform (CWT)47,48,49. DWT is a good way to store a signal because it is small and fast, but it only works at discrete scales. CWT, on the other hand, gives a complete, continuous-time image of how frequency changes, which makes it better for looking at PQDs.

.

The CWT of a signal x(t) is mathematically defined as:

(7)

Where:

  • CWT (a, b) represents the CWT coefficient at scale a and time b.

  • X (t) is the continuous signal under analysis.

  • Ψ is the mother wavelet function.

The CWT gives you a time-frequency map. Smaller scale values a correlate to high-frequency components (fine details) with high frequency resolution but poor time resolution. Larger scale values provide you low-frequency information with high time precision. The selection of the mother wavelet is essential: The Morlet and Mexican Hat wavelets are two prominent choices for evaluating PQDs since they may be used to find them in both time and frequency. CWT scalograms show disturbances such voltage sags, swells, harmonics, and transients in a clear and structured way when looking at PQD data. These scalograms not only indicate when the disturbance occurred but also what frequencies it consisted of, and this is excellent in deep learning models that classify things.

CWT was chosen as the signal preprocessing stage for PQD analysis because it can show transient interruptions accurately. The Morlet wavelet was chosen as the parent wavelet for this project because it has strong time-frequency localization, which makes it easier to accurately show PQDs. We took samples of the voltage and current signals at 10 kHz, which made sure that we got both low- and high-frequency parts with outstanding detail. The CWT was estimated over a range of frequencies and scales from 0 to 500 Hz, which is the standard range for PQDs. We turned each CWT output into a 224 × 224 RGB scalogram, which let it work with the input demands of the ResNet and VGG architectures right away. This choice of settings made sure that the scalograms had enough detail for deep feature extraction to work well and were yet quick to compute.

Generation of image files from CWT scalograms

To turn CWT scalograms into image files, the CWT results need to be turned into a visual form, which is commonly photographs. This stage is highly critical for producing a signal that deep learning methods can utilize to process and analyze. This is a full description of how this works:

Step 1: continuous wavelet transform (CWT)

The signal of interest is first processed using the Continuous Wavelet Transform. The CWT generates a time–frequency representation of the signal by convolving it with wavelets at multiple scales and time locations. This results in a two-dimensional coefficient matrix, where one axis represents time and the other represents scale. The magnitude of the coefficients at each matrix element indicates the energy content of the signal at the corresponding time and scale.

Step 2: scalogram generation

The output of the CWT is visualized through a scalogram, which provides an intuitive representation of how the signal’s frequency characteristics evolve over time. In a scalogram, the horizontal axis denotes time, the vertical axis denotes scale (or frequency), and the color intensity reflects the magnitude of the CWT coefficients. This visualization effectively highlights variations in the signal’s frequency components across time.

Step 3: image formation

The two-dimensional CWT coefficient matrix is then converted into an image format such as PNG or JPEG. Each element in the matrix corresponds to a pixel in the image, with pixel intensity or color determined by the magnitude of the corresponding CWT coefficient. Brighter colors or higher intensities typically indicate regions with greater signal energy at specific time–scale points.

Step 4: resolution adjustment and color mapping

The resolution of the generated images can be adjusted to meet the input requirements of deep learning models. Resolution defines the number and arrangement of pixels in the image. Additionally, appropriate color mapping is applied to visually encode different intensity levels, enhancing the clarity and interpretability of the CWT representation.

Step 5: file formatting

The processed scalograms are saved in widely supported image formats such as PNG or JPEG, enabling efficient storage and subsequent use in deep learning pipelines. Each image inherently preserves the time–frequency characteristics of a specific segment of the original signal.

Step 6: data labeling

For supervised learning applications, each image is assigned a label corresponding to the type or presence of a specific Power Quality Disturbance (PQD). These labels are essential for training and evaluating deep learning models, ensuring that the models learn to associate image features with the correct disturbance classes.

The generated image files serve as input data for deep learning models, enabling them to automatically learn relevant features and patterns essential for accurate detection and classification of Power Quality Disturbances (PQDs). By utilizing scalogram-based images, the models gain access to a structured and visually rich representation of the signal’s time–frequency characteristics, which significantly enhances the effectiveness of machine learning algorithms in identifying and categorizing different disturbance types. Figure 1 illustrates the generation of CWT scalogram images from raw PQD signals.

Fig. 1
figure 1

Generation of image files from CWT scalograms.

Hybrid deep learning approach using DNN, NCA, and SVM

A hybrid deep learning approach integrating Deep Neural Networks (DNN), Neighborhood Component Analysis (NCA), and Support Vector Machine (SVM) algorithms is employed to enhance the accuracy and effectiveness of PQD detection and classification. In this framework, DNNs are utilized for automatic feature extraction and representation learning, capturing complex time–frequency patterns from the input scalogram images. The extracted features are then refined using NCA, which enhances their discriminative power by selecting the most relevant components for distinguishing between different disturbance types. Finally, SVM serves as the classifier, leveraging the enriched feature set to accurately identify and categorize various PQDs. By combining the strengths of these three techniques, the proposed system provides a robust and comprehensive solution for the efficient analysis and classification of PQDs in renewable energy systems.

Deep neural network

A deep neural network (DNN) is a form of artificial neural network that has several layers between the input and output layers. Deep learning is a type of machine learning that studies neural networks with many hidden layers. They are very important for deep learning50,51,52. A neural network is based on how the human brain works. There are networked nodes in it, which are sometimes called artificial neurons or perceptrons. There is a weight on each link between these nodes. Usually, a DNN has three types of layers: The input layer gets the initial set of data. Each node in this layer stands for a feature in the supplied data. Intermediate Hidden Layers do a variety of math operations on the data that comes in. “Deep” DNNs are DNNs that have more than one hidden layer. These layers are responsible for figuring out complex data representations and patterns. The output layer, positioned at the end of the network, produces the final result, which may represent a classification, prediction, or other relevant outcome depending on the task. To introduce non-linearity into the model, each neuron in the network applies an activation function. Common activation functions include Tanh, Sigmoid, and Rectified Linear Unit (ReLU), with ReLU being widely favored in deep neural networks due to its computational efficiency and effectiveness in mitigating vanishing gradient issues. During forward propagation, data flows through the network, and each layer computes weighted sums of its inputs, applies the activation function, and passes the transformed output to the subsequent layer. The learning process, or training, involves adjusting the connection weights to minimize the difference between the network’s predictions and the target outputs. This is typically achieved using backpropagation, a gradient descent-based optimization method that efficiently computes gradients and updates weights throughout the network.

A simplified equation for a single artificial neuron (node) in a Deep Neural Network (DNN) can be represented in Eq. (2),

$${\text{Z = W}}{\text{.X + b}}$$
(8)

Where.

  • Z is the weighted sum of inputs, which is computed by multiplying the input vector X by the weight vector W and adding a bias term b.

  • W represents the weights associated with each input in the layer.

  • X is the input vector, which contains the values from the previous layer or the initial input data.

  • b is the bias term, which allows the neuron to shift its activation function.

After computing Z, it’s passed through an activation function, such as the Rectified Linear Unit (ReLU), which introduces non-linearity and determines the output of the neuron.

$${\text{A = f}}\left( {\text{z}} \right)$$
(9)

Where:

  • A is the output (activation) of the neuron.

  • f(Z) represents the activation function applied to the weighted sum Z.

Deep learning models rely heavily on DNNs53,54. Deep learning extends the concept of Deep Neural Networks (DNNs) by incorporating multiple hidden layers, enabling the automatic extraction of hierarchical feature representations from data. In a DNN, the output of each layer serves as the input for the subsequent layer, allowing the network to progressively learn increasingly abstract and complex features. This layered architecture, combined with appropriate activation functions, allows each neuron to model non-linear relationships, making DNNs highly flexible and capable of capturing intricate patterns in data.

DNNs have achieved remarkable success across a wide range of domains. In computer vision, they excel at object recognition, image segmentation, and facial recognition, enabling machines to perceive and interpret visual information effectively. In natural language processing, DNNs power applications such as machine translation, sentiment analysis, and conversational agents, facilitating seamless communication across languages. They also play a significant role in reinforcement learning, where they guide agents in performing complex tasks such as gameplay and autonomous navigation, contributing to advancements in robotics and self-driving systems. In the healthcare sector, DNNs support disease diagnosis and medical image analysis, providing clinicians with more accurate and timely insights. In finance, they are employed for fraud detection and stock market prediction, enhancing security and decision-making in investments.

The ability of DNNs to identify complex patterns and make data-driven decisions is transforming numerous fields. In the context of the proposed study, DNNs are integral to feature extraction and representation learning for PQD analysis. By automatically discovering intricate structures within PQD data, DNNs significantly enhance the performance and accuracy of the proposed hybrid deep learning approach.

Two pre-trained convolutional neural network architectures, ResNet-50 and VGG-16, were utilized for feature extraction. The input CWT scalograms were resized to 224 × 224 × 3 dimensions to match the input layer requirements of both networks. Transfer learning was adopted, where the final fully connected layers of the networks were fine-tuned on the PQD dataset while retaining the convolutional layers trained on ImageNet.

For model training, the following parameters were used: learning rate = 0.001, batch size = 32, optimizer = Adam, and activation functions = ReLU for hidden layers and Softmax for classification layers. A dropout rate of 0.5 was applied to the fully connected layers to reduce overfitting and improve generalization. The networks were trained for 300 epochs, and the model achieving the highest validation accuracy was selected and retained for subsequent feature extraction.

Role of ResNet and VGG-Net in feature extraction

ResNet (Residual Networks) and VGG-Net (Visual Geometry Group) are popular deep neural Network architectures that have made significant contributions to various computer vision tasks, including image classification. In the context of the paper’s approach to power quality disturbance recognition in hybrid Wind-SPV plants, these Networks play a crucial role in feature extraction from the CWT scalograms of PQDs.

ResNet (residual networks)

ResNet is a type of deep neural network that is noted for being able to train very deep networks well. It came up with the idea of residual blocks, which are the main new thing in ResNet. A residual block has skip connections, which are also known as shortcut connections. These connections let information go through the Network without losing much of it. This approach effectively addresses the vanishing gradient problem, thereby enabling the successful training of very deep networks. Within the framework of feature extraction for Power Quality Disturbance (PQD) recognition, this capability ensures that the network can learn meaningful hierarchical representations from the input data, leading to improved accuracy and robustness in disturbance identification.

Fig. 2
figure 2

Skip connection.

The ResNet architecture has many levels and residual blocks. Each layer captures multiple levels of abstraction, starting with simple features and moving on to more complicated ones. This hierarchy of features is very important for figuring out how CWT scalograms work. ResNet is especially good at capturing and showing little features in the input images. You need these details to see small changes in PQDs that could mean there are problems with the hybrid Wind-SPV system. Figure 2 illustrates the skip-connection mechanism used in the ResNet architecture, which enables deeper feature extraction without gradient loss. The skip connections let gradients move freely through the Network, which lets the Network capture both high-frequency and low-frequency features at the same time. This is significant because PQDs can show up in different ways, such as noise at high frequencies or changes at low frequencies. A lot of the time, researchers start with pre-trained ResNet models on big image datasets like ImageNet. They adjust these models to work better for their individual goal, which can help them generalize and find features that are useful for the challenge at hand.

VGG-Net (visual geometry group)

The VGG-Net architecture is widely recognized for its simplicity and structural uniformity. It employs a sequence of convolutional layers with small 3 × 33 \times 33 × 3 filters, interspersed with max-pooling layers. Although VGG-Net is not as deep as some more recent architectures, it has demonstrated high effectiveness in image classification tasks. Its uniform layer structure, as illustrated in Fig. 3, facilitates systematic and consistent feature extraction. Each layer applies a set of filters, enabling the network to progressively learn both general and specific features from input images, which is particularly beneficial for capturing various characteristics associated with Power Quality Disturbances (PQDs).

Fig. 3
figure 3

Architecture of VGG-Net.

Similar to ResNet, VGG-Net captures hierarchical representations, with each layer responsible for learning distinct levels of abstraction. This property is crucial, as PQDs exhibit features across multiple scales and resolutions. Furthermore, VGG-Net models pre-trained on large-scale image datasets can be effectively leveraged for transfer learning. By fine-tuning these models on CWT scalograms, pre-learned representations can be adapted to enhance feature extraction for PQD recognition. The proposed hybrid deep learning framework integrates both ResNet and VGG-Net architectures to exploit their complementary strengths. By inputting CWT scalograms into these networks, hierarchical, detailed, and structured information is efficiently extracted and fused. This integration enables the model to handle a diverse range of features present in the scalograms, resulting in a robust and accurate solution for PQD identification in hybrid Wind–SPV systems.

Neighborhood component analysis

Neighborhood Component Analysis (NCA) is a technique used for dimensionality reduction and feature selection in machine learning and pattern recognition. Its primary goals are to enhance data interpretability and improve the performance of classification algorithms. NCA was introduced by Ruslan Salakhutdinov, Geoffrey Hinton, Sam Roweis, and John Goldberger. It is particularly beneficial for classification tasks, as it seeks to learn a linear transformation of the data that enhances the discriminability between data points. The central objective of NCA is to identify a linear transformation that maximizes classification accuracy. To do this, the degree of separation between the classes is maintained while mapping the data points onto a lower-dimensional space. Stated differently, its goal is to identify a feature space transformation that places data points belonging to the same class close to one another and data points from different classes far apart. Data with labels is used by NCA. It is quite adaptable because it doesn’t rely on any particular presumptions regarding the distribution of the data. To optimize the chance of proper classification, the fundamental idea is to compute a linear transformation matrix that rotates and scales the data points in the original feature space55,56,57.

The transformation matrix in NCA is learned through optimization. The goal is to maximize a performance metric that depends on the pairwise relationships between data points. The objective function in NCA is typically a measure of the likelihood that a point is correctly classified. This measure depends on the pairwise distances between data points, which are transformed by the learned matrix. NCA often employs the Mahalanobis distance as the measure of dissimilarity between data points after transformation. The Mahalanobis distance considers the covariance between features, making it more robust to different feature scales. NCA optimization involves finding the transformation matrix that maximizes the likelihood or classification accuracy. This is usually done using techniques like gradient descent.

NCA relies on a concept of neighborhoods for data points. Each data point has a neighborhood consisting of its closest neighbors. The size of the neighborhood and how neighbors are defined can affect the learning process. In some versions of NCA, the neighborhood size may be adaptive, changing during training. NCA can handle data with complex class structures and doesn’t require strong assumptions about data distributions. It can be used as a feature selection technique, as the learned transformation provides insights into which features are most relevant for classification. One unique feature of NCA is that it can produce human-interpretable results. The learned transformation matrix can help identify the most discriminative features for classification, shedding light on the factors that influence the decision boundaries. NCA requires labeled data, which can be a limitation when labeled data is scarce or costly to obtain. It’s a supervised method, which means it’s focused on classification tasks and may not be suitable for unsupervised learning or other tasks. NCA has been used in various applications, including image classification, text classification, and dimensionality reduction in high-dimensional feature spaces.

The deep features extracted from ResNet-50 (2048 dimensions) and VGG-16 (4096 dimensions) were concatenated to form a high-dimensional feature vector. To reduce redundancy and improve computational efficiency, Neighborhood Component Analysis (NCA) was applied. The NCA was configured to reduce the dimensionality to 300 discriminative features, while preserving class separability. The Mahalanobis distance metric was used to evaluate feature similarity. This feature reduction not only accelerated training but also improved the robustness of the subsequent classification process.

Application of SVM for PQD classification

For classification, regression, and outlier detection, a strong and adaptable supervised machine learning approach is the SVM. While SVMs are particularly well-known for their ability to perform multi-class classification, they are also highly excellent in binary classification tasks.

SVM’s primary objective is to find an optimal decision boundary (or hyper plane) that best separates data points belonging to different classes. The decision boundary should maximize the margin between the classes, making it a robust and generalized separator. In its simplest form, SVM is used for linear classification. In a feature space, it locates the hyper plane that best divides data points. The hyper plane is oriented to optimize the margin—the distance—between the closest data points belonging to various classifications. Support vectors are the closest data points. The shortest path between the closest support vectors and the hyperplane is known as the margin. This margin should be maximized by SVM. Greater separation between classes and hence improved generalization to new, untested data are indicated by wider margins. The data points that are closest to the decision border are known as support vectors. They are important because they establish the hyper plane’s position. SVM ignores other data points in favor of concentrating on the support vectors and the margin surrounding them. Because of this, SVM can withstand noise and outliers. Real-world situations frequently involve data that is not perfectly separate. In order to address this, SVM permits a “soft margin.” This implies that in order to create a more comprehensive model, some misclassification is accepted. A hyperparameter C governs the trade-off between tolerating misclassification and optimizing the margin. A bigger C permits a narrower margin with fewer misclassifications, whereas a smaller C yields a larger margin with more misclassification tolerance. When data is not linearly separable in the original feature space, SVM can use kernel functions (polynomial and radial basis function) to transfer the data into a higher-dimensional space where it becomes separable linearly. One strong aspect of SVM that makes it capable of handling non-linear data is the kernel technique. Although SVM is inherently a binary classifier, it can be expanded to multi-class classification by the use of several strategies, including one-vs-one and one-vs-all. These methods integrate the outputs of numerous binary SVMs that have been trained to produce multi-class predictions. Regression tasks can also be performed with SVM. It is known as Support Vector Regression (SVR) in this situation. SVR fits a hyperplane instead of putting data points into categories. This helps to lower prediction error while keeping a set margin of error. To get the best performance from a model, you need to change SVM hyperparameters such C (for soft margin), kernel type, and kernel parameters. People often use methods like grid search and cross-validation to find the best hyperparameter values.

Accuracy, precision, recall, and the confusion matrix are commonly employed to evaluate the performance of an SVM model, while cross-validation techniques are used to assess its generalization capability. SVM models are often considered interpretable, as their decision boundaries are defined by linear combinations of support vectors, providing insights into how specific features influence classification decisions.

In this study, a Support Vector Machine (SVM) classifier was applied to the reduced feature set obtained through Neighborhood Component Analysis (NCA). An RBF (Radial Basis Function) kernel was selected due to its effectiveness in handling non-linear decision boundaries. Grid search combined with cross-validation was utilized to optimize the SVM hyperparameters, resulting in the selection of C = 10 C = 10 C = 10 and γ = 0.01\gamma = 0.01γ = 0.01. To extend SVM to multi-class classification, a one-vs-one strategy was employed, enabling accurate discrimination between various types of Power Quality Disturbances (PQDs).

Materials and methods

The materials and methods employed in this study are specifically designed to address the challenging task of identifying and classifying Power Quality Disturbances (PQDs) within the complex context of hybrid wind–solar photovoltaic (Wind–SPV) systems integrated into power networks. The increasing adoption of renewable energy sources such as solar and wind, aligned with the global transition toward cleaner and more sustainable energy solutions, guided the selection of the power system framework The overall workflow of the proposed methodology is presented in Fig. 4 demonstrating the sequential stages from signal acquisition to classification.

A dataset was generated using modified IEEE 9-bus and IEEE 13-bus test systems, simulated in MATLAB/Simulink to model hybrid Wind–SPV configurations. Six types of PQDs were considered: voltage sag, voltage swell, harmonics, transients, interruptions, and normal (no fault) conditions. The dataset comprised 12,000 signal samples, with 2,000 samples for each class to maintain balanced categories. Continuous Wavelet Transform (CWT) was applied to each signal sample to produce scalogram images, which were then stored as 224 × 224 RGB images. The dataset was divided equally, with 50% allocated for training and 50% for testing, ensuring an unbiased evaluation of model performance. To improve generalization, data augmentation techniques such as flipping and scaling were applied. This dataset was subsequently used for training and evaluating the proposed hybrid deep learning framework.

To demonstrate the efficacy of the suggested approach, the research conducts a comprehensive evaluation using real-world power system failure data derived from modified IEEE 9 and IEEE 13-bus test systems illustrated in Figs. 5 and 6. These test systems are deliberately designed to closely imitate the complexities of the hybrid Wind-SPV arrangement. This makes sure that the technique is thoroughly tested in conditions that are very similar to real-world situations. Using MATLAB/Simulink to do simulations creates a regulated and accurate testing environment, which makes the tests more realistic.

Fig. 4
figure 4

Proposed methodology.

This work utilized a dataset derived from altered IEEE 9-bus and IEEE 13-bus test systems, simulated in MATLAB/Simulink to replicate hybrid wind-solar photovoltaic (Wind-SPV) combinations. There were six types of PQDs modeled: voltage sag, voltage swell, harmonics, transients, interruptions, and normal (no fault) situations. There were 12,000 signal samples in all, with 2,000 examples in each class to keep the categories balanced. We used CWT on each sample to make scalogram images, which we subsequently saved as 224 × 224 RGB images. The dataset was split in half, with 50% used for training and 50% for testing. This made sure that the model’s performance was fairly judged. To improve generalization, data augmentation methods including image scaling and flipping were used. This dataset was used to train and test the hybrid deep learning system.

Fig. 5
figure 5

Simulink model of proposed IEEE 9 bus system.

These test systems are deliberately designed to closely imitate the complexities of the hybrid Wind-SPV arrangement. This makes sure that the method is thoroughly tested in settings that are very similar to those in the real world. Using MATLAB/Simulink to do simulations creates a regulated and accurate testing environment that makes the tests feel more real.

Fig. 6
figure 6

Simulink model of proposed IEEE 13 bus system.

The Continuous Wavelet Transform (CWT) serves as a powerful analytical tool in this study, enabling a detailed examination of power system disturbances. A rigorous application of CWT is employed to extract critical time–frequency features from fault data, providing a comprehensive understanding of various disturbance phenomena. To enhance interpretability, the fault signals are transformed into CWT scalogram images, which visually represent the intricate time–frequency characteristics embedded within the data.

The core of the proposed methodology is a hybrid deep learning architecture that integrates Deep Neural Networks (DNN), Neighborhood Component Analysis (NCA), and Support Vector Machine (SVM) algorithms. This integrated framework is strategically designed to ensure accurate and reliable detection of faults and PQDs in hybrid Wind–SPV systems. Feature extraction is enhanced through the use of ResNet and VGG-Net architectures, with salient features obtained from the final dropout layers of each network, reflecting the depth and precision of the feature selection process. The SVM classifier plays a crucial role in efficiently categorizing faults and PQDs, significantly improving the overall classification accuracy and robustness of the system.

A comprehensive set of evaluations and comparative analyses is conducted to validate the effectiveness of the proposed approach. These experiments are particularly meaningful in the context of integrating Wind–SPV systems into existing power networks, demonstrating the adaptability and efficiency of the methodology in addressing the evolving challenges of modern energy systems.

Results and analysis

This section provides a comprehensive overview and discussion of the results obtained using the proposed hybrid deep learning approach. Two datasets, referred to as Dataset-1 and Dataset-2, were employed to evaluate the system’s performance. Dataset-1 consists of simulated PQDs derived from a modified IEEE 9-bus system integrated with a hybrid solar–wind power plant, whereas Dataset-2 comprises PQDs generated from a modified IEEE 13-bus system. The evaluation primarily focuses on the classification capabilities of the proposed system in both fault and no-fault scenarios.

A series of structured experiments were designed to rigorously assess the effectiveness of the proposed method. In the first experiment, each PQD dataset was divided equally into training and testing subsets, with 50% of the data allocated to each. The evaluation process began with Dataset-1, applying the proposed technique to both fault and no-fault conditions. An optimization phase was then conducted to determine the optimal hyperparameters for the SVM classifier, which play a crucial role in achieving high classification performance. Subsequently, Dataset-2 was used to further validate the method, encompassing both fault and no-fault scenarios to ensure a thorough performance assessment. The results of these experiments are presented in the following figures, illustrating the accuracy and robustness of the proposed approach across diverse operating conditions.

Figure 7 displays voltage and current waveforms alongside corresponding CWT scalograms for Bus 1 in the IEEE 9-bus system under “No Fault” conditions. This figure depicts the normal electrical behavior and frequency characteristics of Bus 1, serving as a reference for identifying deviations during disturbance events.

. In the no-fault case, the waveforms at Bus 1 stay almost sinusoidal, with no noticeable distortions or transients. The CWT scalogram that goes with it indicates low-intensity energy distribution across frequencies, which confirms that there are no PQDs. This means that the hybrid system is working well, with no voltage sag, swell, or harmonic distortion. The clear, disturbance-free scalogram offers a baseline for comparing fault states. This shows that the CWT preprocessing correctly captures the system’s typical behavior. This baseline is very important because, as shown in later figures, errors that deviate from it let the deep learning model find and classify PQDs with a high level of accuracy.

The voltage and current waveforms for Bus 2 stay smooth and sinusoidal, with no spikes or distortion. The CWT scalogram shows this stability by having very little high-frequency activity and mostly homogeneous low-frequency content. This proves that the system keeps running in steady state even when there are no faults, and the CWT accurately shows that there are no PQDs. The finding makes the baseline reference for the deep learning classifier even stronger, making sure that deviations due to faults can be found precisely. Figure 8 shows the voltage and current waveforms and corresponding CWT scalograms for Bus 2 under no-fault conditions in the IEEE 9-bus system.

Fig. 7
figure 7

Bus 1 Voltage and Current Waveforms with CWT Scalograms - IEEE 9 Bus system- (No Fault).

Fig. 8
figure 8

Bus 2 Voltage and Current Waveforms with CWT Scalograms - IEEE 9 Bus System- (No Fault).

Figure 9 represents the electrical characteristics, including voltage and current waveforms, along with CWT scalograms for Bus 3 in the IEEE 9 Bus System under the condition of a fault. The visualizations aim to capture the dynamic response and frequency components of Bus 3 in the presence of a fault. During the fault event, the waveforms at Bus 3 deviate significantly from their sinusoidal shape, showing clear distortion and abrupt changes in amplitude. The CWT scalogram effectively highlights these disruptions by displaying sharp, high-energy regions at specific time instants, corresponding to the occurrence of the fault. This means that the CWT not only finds the disturbance, but it also gives exact locations in both the temporal and frequency domains. This level of information is important for telling the difference between normal operating conditions and fault events. Also, these scalogram characteristics are what the hybrid ResNet–VGG–NCA–SVM model uses to learn patterns that are specific to faults and do a good job of classifying them. So, Fig. 9 shows that the system can reliably capture and categorize PQDs, which is important for keeping an eye on hybrid renewable grids.

Figures 10 and 11 show the voltage and current waveforms for Bus 3 in the IEEE 13 Bus System, as well as the CWT scalograms.

Figure 10 shows what happens when there are no defects, which helps us understand how the electrical system works when it is working normally. In the no-fault case, the waveforms at Bus 3 are almost sinusoidal and don’t have any distortion. This shows that the system is stable when it is working normally. The CWT scalogram also reveals that energy is spread out evenly and without any sudden spikes, which means there are no PQDs.This provides a clear reference baseline for the classifier and demonstrates that the proposed method reliably recognizes steady-state operation, reducing false alarms.

In contrast, Fig. 11 depicts the same parameters under the presence of a fault, offering a visual representation of Bus 3’s behavior in the IEEE 13 Bus System during a fault condition. Under fault conditions, Bus 3 shows pronounced waveform distortions, with amplitude fluctuations and deviations from the sinusoidal shape. The CWT scalogram highlights this disturbance with localized high-energy bursts, capturing both the timing and the frequency range of the fault event. This proves the effectiveness of CWT in detecting non-stationary PQDs in complex multi-bus systems. The distinct fault signatures identified in the scalogram are crucial for the hybrid deep learning framework, enabling the ResNet–VGG–NCA–SVM model to accurately classify disturbances even in larger, more complex systems like the IEEE 13 bus. Hence, Figs. 10 and 11 confirm that the proposed method generalizes well across different grid configurations while maintaining high fault-detection accuracy.

Fig. 9
figure 9

Bus 3 Voltage and Current Waveforms with CWT Scalograms - IEEE 9 Bus System- (with Fault).

Fig. 10
figure 10

Bus 3 Voltage and Current Waveforms with CWT Scalograms - IEEE 13 Bus Systems- (without Fault Case).

Fig. 11
figure 11

Bus 3 Voltage and Current Waveforms with CWT Scalograms - IEEE 13 Bus System- (with Fault Case).

In this study, a dataset was carefully constructed to encompass both fault and no-fault scenarios, forming a critical foundation for the subsequent analysis. The dataset comprises diverse samples that capture the operational characteristics of the system under different conditions. For each data instance, relevant features or parameters are extracted to accurately represent the system’s state in the presence or absence of disturbances. These features vary depending on the specific attributes of the system being analyzed.

The constructed dataset is then utilized to train a deep learning model designed to identify and classify faults. During training, the model is exposed to both fault and no-fault samples, enabling it to learn discriminative patterns that distinguish between these two scenarios. Depending on the complexity of the data and the desired level of detection accuracy, the model may take the form of a neural network or a more sophisticated architecture. The training process involves iterative optimization, during which the model’s internal parameters are continuously updated to improve its predictive performance on unseen data.

The primary objective of this training is to develop a robust and reliable system capable of accurately identifying faulty and non-faulty instances. As outlined in subsequent sections, the model’s performance is evaluated using standard metrics such as confusion matrices, accuracy, precision, and recall, which provide a comprehensive assessment of its classification effectiveness.

The phrase “training and loss curves” indicates that Fig. 11 shows a very important step in the process of making a deep learning model. When you train a deep learning model, it goes through a process of iterative optimization to discover patterns from the data set you provide it. Training curves usually show how some measurements change throughout the course of training. An epoch is one whole pass through the whole training dataset. Figure 12 shows the accuracy and loss curves of the proposed hybrid model during training.

Fig. 12
figure 12

Accuracy and loss curves.

Training Accuracy Curve illustrates how well the model is performing on the training dataset over epochs. It shows the percentage of correctly classified instances during each training iteration. A rising curve indicates improving model accuracy. The Training Loss Curve shows how the model’s error or loss evolves as it learns. The loss tells you how well the model’s predictions match up with the real values. A loss curve that goes down means that the model is learning and getting better at making correct predictions. There are sometimes validation curves in addition to training curves that show how well the model does on a different dataset that was not utilized during training. Analyzing training and validation curves provides valuable insights into the model’s ability to generalize to unseen data. The validation accuracy curve reflects the model’s performance on a separate validation dataset, offering an indication of how well it handles new samples compared to the training data. Similarly, the validation loss curve complements the training loss curve by illustrating how effectively the model adapts to data it has not encountered during training. An increase in validation loss may indicate overfitting, where the model becomes too specialized to the training data and fails to generalize.

Examining these curves together enables a deeper understanding of the model’s learning behavior. The convergence patterns of training and validation curves serve as important indicators of training effectiveness, generalization capability, and potential areas for further optimization. After the model has been trained for over 300 epochs, the next important step is to test it on a different dataset to see how well it works. This test dataset is a good example of what happens in the real world, thus it can be used to objectively evaluate the model’s ability to generalize. During this assessment phase, the model is tested on the test dataset, and predictions are made for each occurrence. This shows how well the model works on data it hasn’t seen before.

Figure 13 presents the confusion matrix for the model applied to the IEEE 9-bus system, providing a detailed evaluation of its classification performance between the “no fault” and “fault” categories. The model correctly identified 56 instances of the “no fault” class and 54 instances of the “fault” class, representing true negatives and true positives, respectively. However, it also produced 4 false positives (normal cases incorrectly classified as faults) and 6 false negatives (fault cases incorrectly classified as normal). This analysis highlights both the strengths and limitations of the model in distinguishing between different operational states.

Similarly, Fig. 13 also illustrates the confusion matrix for the IEEE 13-bus system. In this case, the model accurately classified 53 samples as “no fault” and 51 samples as “fault.” Nonetheless, it generated 7 false positives and 9 false negatives, indicating some misclassifications in differentiating between the two classes. These confusion matrices provide valuable insight into the model’s predictive capabilities and areas where further refinement may enhance fault detection accuracy. This thorough review using the confusion matrix helps find performance differences and places where improvements could be made. Figures 12 and 13 show confusion matrices that are useful for diagnosing the model’s strengths and flaws in categorization. The matrix’s separation of true positives, true negatives, false positives, and false negatives gives a more detailed image of how well the model works at telling the difference between fault and no-fault situations in both the IEEE 9 and 13 bus systems. The confusion matrix results for the IEEE 13-bus system are shown in Fig. 14 highlighting the classification performance of the proposed model.

Fig. 13
figure 13

Confusion matrix (IEEE 9 bus)

Fig. 14
figure 14

Confusion matrix (IEEE 13 bus).

Precision, recall (sensitivity), and accuracy are basic numbers that come from the confusion matrix. They give you a quantitative look at how well the model is working. Precision, which is the ratio of accurately predicted positive observations to the total anticipated positives, is a way to check how accurate positive predictions are. On the other hand, recall looks at the ratio of correctly predicted positive observations to all actual positives to see how well the model can find all positive cases. Overall accuracy, which includes both true positive and true negative rates, is a good way to determine how correct the model is.

Fig. 15
figure 15

Performance metrics (IEEE 9).

Fig. 16
figure 16

Performance metrics (IEEE 13).

Figure 15 presents the key performance metrics for the IEEE 9-bus system, demonstrating the strong effectiveness of the proposed model. The model achieves an accuracy of 98.54%, indicating its high capability to correctly classify both fault and no-fault cases. A precision of 97.57% reflects the model’s ability to minimize false positive errors, which is particularly important in scenarios where misclassifying normal conditions as faults can lead to unnecessary interventions. Additionally, the model attains a recall of 95.21%, signifying its effectiveness in correctly identifying fault cases and reducing false negatives. This comprehensive evaluation underscores the model’s robustness and suitability for real-world fault detection and classification tasks.

Similarly, Fig. 16 shows the performance metrics for the IEEE 13-bus system. The model achieves a high accuracy of 97.17%, confirming its reliability in producing correct predictions under various conditions. A precision of 96.42% indicates a low incidence of false positives, ensuring trustworthy positive predictions. The recall value of 94.08% demonstrates the model’s strong ability to detect fault cases accurately, further supporting its overall classification reliability.

Conclusion and future work

This study presented a hybrid deep learning framework for the identification of Power Quality Disturbances (PQDs) in hybrid Wind–SPV systems, integrating Continuous Wavelet Transform (CWT), ResNet, VGG-Net, Neighborhood Component Analysis (NCA), and Support Vector Machine (SVM). The effectiveness of the proposed method is demonstrated through extensive simulations, achieving 98.54% accuracy on the IEEE 9-bus system and 97.17% accuracy on the IEEE 13-bus system. Precision and recall values exceeding 94% indicate the model’s strong capability to minimize false positives and accurately detect disturbances. Compared to conventional approaches such as Short-Time Fourier Transform (STFT), Hilbert–Huang Transform (HHT), and Discrete Wavelet Transform (DWT), the proposed system exhibits superior adaptability to non-stationary signals and improved generalization across diverse operating conditions. These advancements contribute to more efficient and cost-effective PQD monitoring in renewable energy grids, enhancing power supply stability and reducing equipment failures. Future work will focus on real-time implementation, integration with smart grid technologies, and enhancement through Flexible AC Transmission Systems (FACTS) devices such as DSTATCOM, thereby strengthening the resilience of renewable power systems.