Advanced Quantum Support Vector Machine Algorithm for Transient Stability Assessment ()
1. Introduction
1.1. Research Background
Power systems stability studies model electrical systems, focusing on synchronous machines with dynamic models to simulate various operating conditions [1]. Machine learning algorithms recognize data patterns without explicit programming [2]. Advances in microcircuits enable real-time data collection from electrical networks, offering simple, rapid ML stability analysis. Classical systems with many degrees of freedom face dimensionality challenges, but quantum computing’s superposition principle provides speedup and parallelism advantages that could benefit quantum machine learning for power stability [3], while recent reviews have highlighted the emerging role of quantum computing in power-system applications [4].
1.2. Literature Review
The ability of a power system to remain synchronized in the face of a severe disturbance, like a transmission line short circuit, is known as transient stability [5]. The system must perform transient stability analysis (TSA) and react promptly to prevent fault expansion to withstand a long-term fault [6]. We differentiate between time-domain [6]-[8], direct [6] [9] [10], and automatic learning approaches for evaluating transient stability in the literature. Time-domains take a lot of time [11], and when detailed models are considered, direct methods get more complicated. The latest study makes use of AI and automatic learning techniques. For this problem, several AI-based TSA strategies have been put forth. ANN-Based TSA [12] [13], SVM-Based [14] [15], TSA Ensemble Learning Based [16] [17], and TSA Deep Learning-Based [18] [19] are some examples of AI-based TSA methodologies. In [20], Yifan used quantum material to construct a quantum TSA method for quantum AI-based TSA and evaluated it against SVM and DNN models on four datasets. Some authors combine various CNN and long short-term memory (LSTM) configurations [10]-[12], and CNN with Gated Recurrent Units (GRU) [21]-[23] to increase accuracy. For online stability evaluation, Weiling proposes a modified support vector machine that can expedite the training stage [24]. An online ELM that can also pick features for TSA is presented by Yang Li [25].
1.3. Motivation and Contributions
Although considerable research has been conducted on transient stability assessment using classical computing and machine learning techniques, recent advances in quantum machine learning (QML) have created new opportunities for exploring quantum-enhanced classification approaches. In this context, this study investigates the application of an Advanced Quantum Support Vector Machine (AQSVM) to transient stability assessment and compares its performance with that of a classical Support Vector Machine (SVM).
In this study, the term Advanced Quantum Support Vector Machine (AQSVM) refers to an integrated quantum-classical workflow that combines quantum feature mapping, quantum-kernel computation, and a classical SVM with a precomputed kernel. The proposed approach uses generator-speed information obtained from transient stability simulations and evaluates the ability of the AQSVM and classical SVM to distinguish stable and unstable operating conditions.
The study focuses on evaluating the performance of the two approaches using the IEEE 39-bus and IEEE 68-bus benchmark systems. The comparison is performed using standard classification metrics, including accuracy, precision, AUC, and log loss. The objective is to assess the effectiveness of the integrated AQSVM workflow for transient stability assessment and to examine its performance relative to a classical SVM.
The remainder of this paper is organized as follows. Section II introduces the fundamentals of quantum support vector machines and the quantum-classical learning framework used in this study. Section III describes the experimental methodology and presents the results and their analysis. Finally, Section IV concludes the paper and discusses the main findings.
2. Quantum Support Vector Machine (QSVM)
2.1. Generality
Quantum computing is based on the fundamental principles of quantum mechanics. A simple way to convert QSVM to standard SVM is to apply projection over a Hilbert space, where we may express the qubit state as:
(1)
where:
represents the density matrices [26] [27]. The Hilbert-Schmidt inner product gives the kernel function by:
(2)
QSVM can be used in a different quantum paradigm. One of them involves estimating the quantum kernel and applying it to conventional SVM; the other involves utilizing quantum circuits; and the third involves quantum annealing.
To create distinct hyperplanes, we employ classical SVM with quantum kernels as opposed to variational quantum circuits. Initially, the phase quantum computer runs over the whole dataset to estimate the kernel
during training. Second, we estimate the kernel using all support vectors in the test dataset. Thirdly, by combining the quantum kernel with the classical SVM, we can make predictions.
To construct QSVM with circuits, we must encode data using quantum states known as Ansatz circuits, as shown in Figure 1, using unitary or transformation functions. The circuit will then be trained using a variational quantum circuit with parameters, and we may measure the results to obtain classical bits.
To use quantum annealer (QA), the computing problem must be formulated as a non-constrained quadratic binary optimization (QUBO) [28] [29]. The question of training traditional SVM in QA can be formulated as:
Figure 1. Representation of quantum support vector machine [26].
(3)
with
, K is the kernel function of SVM, and C is a regularization parameter. For QA implementation we use an encoding in the form of:
(4)
where
, B is the base used for encoding and K is the number of binary variables used to encode
.
To transform quadratic problem given by (3)-(4) into QUBO, we use
expression and introduce a multiplier
to include last constraint
as a squared penalty term [30] and we obtain:
(5)
where:
is a matrix of size KN x KN given by:
(6)
This formulation allows us to determine the lower energy that would be the QSVM solution.
2.2. Search Optimization Algorithms
The best settings are found using this method. In this study, we employ several optimization strategies to raise the model’s effectiveness and performance. Early stopping prevents overfitting and conserves computational resources during cross-validation by terminating training when the F1 score does not increase for successive folds. Furthermore, threshold optimization is utilized to determine the appropriate classification threshold that maximizes the F1 score, guaranteeing optimal decision-making for datasets that are not balanced. To speed up processing, particularly with large datasets, joblib is used to parallelize the kernel matrix computation. To increase performance on unbalanced data, the Support Vector Classifier (SVC) is optimized with a precomputed kernel and class balancing. This allows for more accurate classification judgments by changing class weights and permitting probability outputs. All these adjustments are meant to improve the management of unbalanced data, decrease calculation time, and increase model validity.
2.3. Performance Evaluation
An effective method for comparing models is performance evaluation. Depending on the kind of problem or machine learning method, the measure is used to evaluate in the literature. Four metrics—accuracy, precision, AUC, and loss—are computed using a confusion matrix.
The structure of Table 1 is utilized to compute the fundamental metrics used to assess the performance of the QSVM and SVM algorithms. For classification issues involving two or more classes, it is employed. It evaluates the classification quality by recording samples that are properly and mistakenly recognized for each class. Table 1 shows a binary classification confusion matrix.
Table 1. Confusion matrix.
Class |
Positive: stable |
Negative: unstable |
Positive: stable |
True Positive (TP) |
False Negative (FN) |
Negative: unstable |
False Positive (FP) |
True Negative (TN) |
Accuracy in classification issues refers to how many stable and unstable cases the model correctly predicts. The mathematical expression of accuracy is:
(7)
The percentage of all positive classifications in the model that are truly positive is known as precision.
(8)
When evaluating the performance of different models, AUC (Area Under the Curve) is a useful metric—if the dataset is balanced. The model that performs the best is usually the one with the biggest area under the curve, as illustrated in Figure 2.
Figure 2. ROC curve with AUC metric.
2.4. Time Series Database for Quantum Machine Learning
There are more synchronous generators combined with each other via the power grid and act on each other, which leads to the complexity of transient stability analysis. The imbalance between the mechanical power Pm and the electromagnetic power
of the generator is associated with the variation of the rotor angles and speeds. The rotor speed signal thus influences
. When we predict transient stability, a set of elements
should be selected to describe the state of power systems. Then, a dataset
is obtained considering different load levels, network configurations, and contingencies by simulation or historical measurements. By training from massive data, the model can find a correspondence between the input characteristics
and the result of the transient stability analysis
. The transient stability directly depends on the dynamics of the generator speed. When a fault occurs, the electromagnetic power will suddenly change. After the fault is eliminated, the speed will return to normal. In this research, the speeds of all generators (IEEE 39bus and IEEE 68bus) are used as input and the corresponding stability state is considered as output. In quantum machine learning, the encoding of data
in a quantum system is a mathematical mapping of the input set X to an output set Y of the quantum state. In pratique, we use parameterized quantum circuit also call Ansatz circuit to encode our dataset.
Let
our Ansatz circuit function with three parameters. Encode x with two qubits state would consist to operate the transformation:
(9)
where
could be 00,01,10,11.
Once the data is encoded, it can be used to train our AQSVM in the next section.
2.5. Time-Series Feature Extraction and Dimensionality Reduction
The generator-speed responses obtained from the transient stability simulations are initially represented as time-series data. Since the complete trajectories may contain a large number of highly correlated temporal samples, Principal Component Analysis (PCA) is applied as a dimensionality-reduction and feature-extraction technique before quantum encoding. PCA transforms the original generator-speed observations into a set of orthogonal principal components that capture the dominant variations in the simulated system responses.
For each simulated case, the PCA-transformed data are used to construct a fixed-length input vector for the classification models. The resulting feature representation contains 11 components for the IEEE 39-bus system and 17 components for the IEEE 68-bus system. These PCA-based feature vectors, rather than the complete raw generator-speed trajectories, are subsequently used as inputs to the quantum feature map. The same feature-extraction procedure is applied to the data used by both the AQSVM and the classical SVM to ensure a consistent and fair comparison.
3. Experimental Result and Analysis
3.1. Experimental Dataset
The IEEE 39-bus and IEEE 68-bus systems are used as benchmark power networks to generate the transient stability datasets. The IEEE 39-bus system consists of 39 buses and 10 synchronous generators, whereas the IEEE 68-bus system consists of 68 buses and 16 generators. Both systems are modeled and simulated in MATLAB/Simulink using the Power Systems simulation environment.
For each test system, transient disturbances are introduced to generate different operating scenarios. Two types of disturbances are considered in this study: three-phase faults and line-to-ground faults. For each simulated scenario, the system response is recorded over a variable simulation horizon not exceeding 10 s. The resulting generator-speed trajectories are used to characterize the dynamic response of the system following each disturbance.
The stability status of each simulated case is determined from the outcome of the Power Systems solvers implemented in Simulink. Each simulation is therefore assigned a stability label according to the stability condition identified by the simulation solver. The resulting labeled simulations constitute the dataset used for the subsequent machine-learning classification task. An example of the simulated response is shown in Figure 3.
A total of 3825 samples with 11 input features were generated for the IEEE 39-bus system, while 4725 samples with 17 input features were generated for the IEEE 68-bus system. The resulting datasets are imbalanced, with the number of stable cases exceeding the number of unstable cases in both benchmark systems. This class imbalance is taken into consideration during the machine-learning stage through class-weight balancing and decision-threshold optimization.
Figure 3. Three-phase voltages in EMT mode at bus 1 in IEEE 39-bus.
3.2. Experimental Environment
For the current power system stability analysis, we use an ASUS TUF GAMING F15 11th Gen Intel(R) Core (TM) i5-11400H @ 2.70 GHz 2.69 GHz with 8Go of computer RAM to run all our programs. All programs were written in MATLAB and Python. Anaconda 2016 edition tool was used to write the Python scripts. Keras was used to write the classical SVM programs, while Qskit was used for the implementation of quantum advanced SVM algorithms. The quantum component of the proposed AQSVM workflow is executed using a classical quantum simulator rather than physical quantum hardware. The quantum stage consists of encoding the PCA-based input features into quantum states through the selected quantum feature map and evaluating the corresponding quantum kernel. These quantum computations are simulated on a classical computer using the Qiskit-based implementation. The remaining stages of the workflow, including transient-stability simulation, PCA-based feature extraction, data shuffling and stratified cross-validation, SVM training, class weighting, decision-threshold optimization, and performance evaluation, are performed using classical computing procedures. Therefore, the reported AQSVM results represent the performance of a simulated quantum-kernel approach and should not be interpreted as measurements obtained from a physical quantum processor.
3.3. Results and Analysis
Before model training, the generated samples are randomly shuffled to remove any potential ordering effects. The shuffled dataset is then partitioned using stratified cross-validation, while preserving the relative proportions of stable and unstable cases across the folds. The number of cross-validation folds (K) is determined as part of the optimization procedure according to the characteristics of the generated dataset rather than being imposed as a fixed constant. For each fold, the training and validation subsets are kept separate during model fitting and prediction. The decision threshold is optimized using the prediction probabilities obtained from the validation procedure. This protocol accounts for the imbalanced nature of the datasets while allowing the cross-validation configuration to be adapted during the optimization process.
According to the experimental results, the suggested Advanced Quantum Support Vector Machine (AQSVM) outperforms the traditional SVM on several evaluation metrics on the IEEE 39-bus and IEEE 68-bus power systems. The precision and recall results demonstrate the overall effectiveness of the proposed AQSVM approach, although the performance varies between the two classification methods. The confusion matrices for the IEEE 39-bus and IEEE 68-bus systems presented in Figure 4 and Figure 5 support this. The AQSVM achieves precision values above 99% on both benchmark systems, while the classical SVM obtains lower precision and recall values. For the IEEE 39-bus system, the SVM achieves a precision of 94.36%, whereas for the IEEE 68-bus system, its recall reaches 94.20%. These results indicate that the AQSVM provides more consistent
Figure 4. Confusion matrix (a) and SVM (b) AQSVM for IEEE 39-bus.
Figure 5. Confusion matrice: (a) SVM and (b) AQSVM for IEEE 68-bus.
classification performance than the classical SVM for the considered transient stability assessment datasets. The most notable distinction was seen in the log loss metric, where the AQSVM consistently produced well-calibrated probabilistic outputs by maintaining extremely low values (down to 0.0109). However, the log loss of the classical SVM was much larger (up to 0.1024), indicating less trustworthy prediction confidence. Together, these findings support the efficacy of quantum-based learning in managing challenging classification tasks in power system stability evaluation, providing improved performance scalability, generalization, and reliability. A quantitative comparison of the two approaches is provided in Table 2.
Table 2. Algorithms comparisons.
Test systems |
Computer |
Algorithm |
Precision |
Accuracy |
auc |
log_loss |
IEEE 39-bus |
Quantum |
AQSVM |
0.992592 |
0.997385 |
0.999858 |
0.010929 |
Classical |
SVM |
0.943661 |
0.988235 |
0.999212 |
0.028914 |
IEEE 68-bus |
Quantum |
AQSVM |
0.991304 |
0.993650 |
0.999893 |
0.013810 |
Classical |
SVM |
0.973053 |
0.969312 |
0.995028 |
0.102443 |
4. Conclusion
The IEEE 39- and 68-bus networks are two common power system datasets on which we compared the performance of a Quantum Assisted Support Vector Machine (AQSVM) and a Classical Support Vector Machine (SVM). The AQSVM continuously beat the traditional SVM for both test systems in every evaluation criterion, as summarized in Figure 6. The quantum model demonstrated more confident and dependable predictions on the IEEE 39-bus system with a higher accuracy (99.73% vs. 98.82%) and a much lower Log Loss (0.0109 vs. 0.0289).
Figure 6. IEEE 68-bus metrics diagram.
The AQSVM remained superior to the classical SVM on the bigger IEEE 68-bus system, outperforming it in probabilistic calibration (Log Loss of 0.0138 vs. 0.1024) and accuracy (99.37% vs. 96.93%). These findings unequivocally show that, even in large-scale, very complex systems, quantum-enhanced machine learning models like AQSVM are not only competitive but also capable of outperforming conventional methods. The quantum model’s improved capacity to better represent non-linear patterns via quantum feature mapping is responsible for the improved performance. The increasing promise of quantum computing as a useful and potent instrument for AI-based evaluation tasks in power system applications is supported by these discoveries, which come as quantum hardware continues to advance.
Author Contributions
Conceptualization, Junior Morel Angouah Massaga, Claudette Christiane Koupna Eko, Patrick Nounamo Dabou, and Jacques Tagoudjeu; methodology, Junior Morel Angouah Massaga, Patrick Nounamo Dabou, and Jacques Tagoudjeu; software, Junior Morel Angouah Massaga; validation, Junior Morel Angouah Massaga, Claudette Christiane Koupna Eko, Patrick Nounamo Dabou, and Jacques Tagoudjeu; formal analysis, Junior Morel Angouah Massaga and Patrick Nounamo Dabou; investigation, Junior Morel Angouah Massaga and Claudette Christiane Koupna Eko; resources, Junior Morel Angouah Massaga and Jacques Tagoudjeu; data curation, Junior Morel Angouah Massaga; writing—original draft preparation, Junior Morel Angouah Massaga; writing—review and editing, Patrick Nounamo Dabou, Jacques Tagoudjeu, and Claudette Christiane Koupna Eko; visualization, Junior Morel Angouah Massaga and Claudette Christiane Koupna Eko; supervision, Patrick Nounamo Dabou and Jacques Tagoudjeu; project administration, Jacques Tagoudjeu; funding acquisition, Claudette Christiane Koupna Eko. All authors have read and agreed to the published version of the manuscript.