Synchronous phasor measurement data anomaly detection method based on quantum generative adversarial network

By constructing a quantum-classical hybrid generative adversarial network model and utilizing parameterized quantum circuits and Wasserstein distance, the training complexity of PMU data anomaly detection is reduced, and the detection efficiency and reliability are improved. This solves the problems of large number of parameters and high training cost in existing technologies, and achieves efficient anomaly detection of synchronous phasor measurement data.

CN121935784APending Publication Date: 2026-04-28SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTHEAST UNIV
Filing Date
2026-01-12
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing PMU data anomaly detection methods suffer from a large number of model parameters and high training costs, making it difficult to meet the needs of efficient online detection. Furthermore, traditional methods have limited detection accuracy.

Method used

A quantum-classical hybrid generative adversarial network model is constructed, which uses a quantum neural network with parameterized quantum circuits as the generator and combines it with Wasserstein distance for adversarial training, thereby reducing the number of trainable parameters of the model and improving training stability.

Benefits of technology

It significantly reduces model training complexity while ensuring detection performance, improves detection efficiency and reliability, and is suitable for anomaly detection of synchronous phasor measurement data in power systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121935784A_ABST
    Figure CN121935784A_ABST
Patent Text Reader

Abstract

The invention discloses a synchronous phasor measurement data anomaly detection method based on a quantum generative adversarial network, and the method comprises the steps: constructing a quantum-classical hybrid generative adversarial network model, introducing a quantum neural network based on a parameterized quantum circuit as a generator, and carrying out the adversarial training through combining with a Wasserstein distance, thereby achieving the anomaly detection of synchronous phasor measurement data. Therefore, while the number of trainable parameters of the model is reduced and the training stability is improved, the abnormality caused by the equipment fault or the power system operation event in the synchronous phasor measurement data is efficiently and reliably detected. According to the method, the training cost is reduced while the anomaly detection performance is ensured, the model training stability is enhanced in combination with the Wasserstein distance, and an efficient and reliable technical means is provided for operation monitoring and data quality control of a power system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of power system data analysis and quantum computing, and mainly relates to a method for detecting anomalies in synchronous phasor measurement data based on quantum generative adversarial networks. Background Technology

[0002] With the widespread deployment of synchronous phasor measurement units (PMUs) in power systems, the high-temporal-resolution measurement data they provide has become a crucial foundation for power system state estimation, parameter identification, wide-area control, and operational analysis. However, in actual operation, PMU data is inevitably affected by factors such as equipment failures, communication anomalies, and system disturbances, resulting in outliers or abnormal segments in the data, which seriously affects the reliability of subsequent analysis and decision-making.

[0003] Existing PMU data anomaly detection methods mainly include model-based methods and data-driven methods. Model-based methods typically rely on system topology and parameter information, making it difficult to obtain complete and accurate prior information in practical engineering, thus limiting their applicability. While data-driven methods can reduce reliance on system priors, traditional methods often use a single detector, resulting in limited detection accuracy.

[0004] In recent years, Generative Adversarial Networks (GANs) have been introduced into the field of anomaly detection due to their unsupervised learning capabilities. However, classic GANs are usually built on deep neural networks, resulting in a large number of model parameters and high training costs, making it difficult to meet the requirements for efficient online detection.

[0005] Quantum computing technology, with its properties such as superposition and entanglement, shows potential advantages in function representation capabilities and parameter efficiency. Quantum neural networks (QNNs) are believed to achieve strong expressive power with fewer parameters, providing a new approach for constructing low-parameter, high-performance generative models.

[0006] Therefore, there is an urgent need for a PMU data anomaly detection method that can significantly reduce model training complexity while ensuring detection performance. Summary of the Invention

[0007] This invention addresses the problems existing in current technologies by providing a method for anomaly detection in synchronous phasor measurement data based on quantum generative adversarial networks (GANs). By constructing a quantum-classical hybrid GAN model, it introduces a quantum neural network based on parameterized quantum circuits as the generator and incorporates Wasserstein distance for adversarial training. This reduces the number of trainable parameters and improves training stability while achieving efficient and reliable detection of anomalies in synchronous phasor measurement data caused by equipment failures or power system operational events. This invention reduces training costs while maintaining anomaly detection performance and enhances model training stability through Wasserstein distance, providing an efficient and reliable technical means for power system operation monitoring and data quality control.

[0008] To achieve the above objectives, the technical solution adopted by this invention is: a method for detecting anomalies in synchronous phasor measurement data based on quantum generative adversarial networks, comprising the following steps:

[0009] S1. Data Modeling: Collect raw measurement data from the synchronous phasor measurement device, model the measurement data, and represent it as multidimensional time series data. After normalization preprocessing, standardized data is obtained.

[0010] S2. Network Model Construction: Construct a quantum-classical hybrid generative adversarial network model, which includes a quantum generator and a classical discriminator. Through the adversarial learning mechanism between the quantum generator and the classical discriminator, the joint modeling of the characteristic distribution of normal synchronous phasor measurement data is achieved.

[0011] S3. Quantum Generator Construction: A quantum generator is constructed based on parameterized quantum circuits. The quantum generator includes an initial quantum state preparation module, a quantum unitary transformation module, and a quantum measurement module to generate samples with a distribution consistent with normal synchronous phasor measurement data.

[0012] S4. Network Model Training: The Wasserstein distance is introduced to train the quantum-classical hybrid generative adversarial network model, enabling the learning of the distribution characteristics of normal synchronous phasor measurement data.

[0013] S5. Result Optimization: In the anomaly detection stage, an anomaly scoring function is constructed by combining the input space residual loss and the discriminator feature space loss, and the noise variables are optimized to obtain the optimal reconstruction result.

[0014] S6. Anomaly Detection and Judgment: The anomaly score calculated in step S6 is compared with a preset threshold to determine the abnormal data in the synchronous phasor measurement data.

[0015] As an improvement of the present invention, the raw measurement data in step S1 includes at least one measurement feature among voltage amplitude, voltage phase angle, current amplitude, or current phase angle; the measurement data is constructed into a multidimensional time series data set. Its data dimensions are represented as ,in, Indicates the number of sampling time steps. Indicates the number of synchronous phasor measurement devices. This represents the feature dimension acquired by each synchronous phasor measurement device at a single time step.

[0016] As another improvement of the present invention, in step S2, the quantum generator is used to receive random noise input and generate a synthetic sample that is consistent with the statistical characteristics of normal synchronous phasor measurement data through a quantum neural network; the classical discriminator is used to judge the authenticity of the input sample and output a discrimination result that measures the similarity between the sample and the real synchronous phasor measurement data.

[0017] As another improvement to the present invention, in the quantum generator of step S3,

[0018] Initial quantum state preparation module: The quantum generator will generate the quantum state. As input, where This represents the number of qubits, and a Pauli-X rotation gate is applied to this quantum state. Then, the initial quantum state is obtained. Given rotation angle , The unitary matrix is ​​represented as:

[0019]

[0020] Quantum unitary transformation module: The initial quantum state passes through the quantum unitary transformation module, which is essentially a multi-layered quantum circuit with the same structure. Each layer consists of a single-qubit rotation gate and a two-qubit control rotation gate; the single-qubit rotation gate includes the Pauli-X rotation. And Pauli-Z rotation Given parameters , The unitary matrix is ​​represented as:

[0021]

[0022] Two-qubit control of the X-axis rotating gate The unitary matrix is ​​represented as:

[0023]

[0024] After unitary transformation, the initial quantum state Generate output quantum state , represented as:

[0025]

[0026] in, Indicates the first Unitary operation of layer parameters Indicates the first Layer parameters, , ..., This refers to the trainable parameters of a quantum generator;

[0027] Quantum measurement module: for output quantum state Measure each qubit and select , As a computational basis, state collapse to The specific results are as follows:

[0028]

[0029] in, Indicates the first The result of one qubit Indicates the first The output quantum state of each qubit Represents the measurement operator. , This indicates the conjugate transpose operation.

[0030] As another improvement of the present invention, the game function in step S4, the training process of the quantum-classical hybrid generative adversarial network model, is as follows:

[0031]

[0032] in, It is a game function. These are the training parameters of the quantum generator. These are the training parameters of the discriminator. It is the expectation operator. It is a discriminator. It is the discriminator function. It is a quantum generator. It is a quantum generator function. These are training samples. It is the rotation angle parameter in the initial quantum state preparation module;

[0033] An adversarial training objective function is constructed based on the Wasserstein distance. By alternately optimizing the trainable parameters of the quantum generator and the trainable parameters of the classical discriminator, the distribution of quantum generated samples gradually approximates the distribution of normal synchronous phasor measurement data. The specific expression for the Wasserstein distance is as follows:

[0034]

[0035] in and They represent and The distribution, express and Wasserstein distance between them Indicates the supremacy. It is the Lipschitz norm of the discriminator function. These are samples generated by the generator.

[0036] As another improvement of the present invention, the method for detecting anomalies in synchronous phasor measurement data based on quantum generative adversarial networks is characterized in that: in step S5, the anomaly scoring function includes input space residual loss and discriminator feature space loss, wherein...

[0037] The input space residual loss is used to characterize the numerical difference between the synchronous phasor measurement data to be detected and the reconstructed sample, and is expressed as:

[0038]

[0039] The discriminator feature space loss is used to characterize the difference between the detected synchronous phasor measurement data and the reconstructed sample in the discriminator's intermediate feature space, and is expressed as:

[0040]

[0041] in This represents the output features of the intermediate layer in the discriminator;

[0042] The anomaly scoring function is as follows:

[0043]

[0044] in, The parameter has a value range of 0-1.

[0045] As a further improvement of the present invention, in step S6, the abnormal score corresponding to the synchronous phasor measurement data to be detected is compared with a preset abnormal judgment threshold. When the abnormal score is greater than the preset abnormal judgment threshold, the corresponding synchronous phasor measurement data is determined to be abnormal data; when the abnormal score is less than or equal to the preset abnormal judgment threshold, the corresponding synchronous phasor measurement data is determined to be normal data.

[0046] Compared with existing technologies, this invention offers the following advantages: By introducing a quantum neural network to construct a generator for a quantum generative adversarial network (GAN), this invention proposes a method for detecting anomalies in synchronous phasor measurement data based on GANs. This method leverages the advantages of parameterized quantum circuits in terms of expressive power and parameter efficiency, effectively reducing the size of trainable parameters in the generator of the GAN, thereby alleviating the computational complexity and resource consumption during model training. Furthermore, by introducing Wasserstein distance during adversarial training, the stability of model training is further improved, enhancing the ability of generated samples to approximate the distribution of normal synchronous phasor measurement data, thus achieving efficient and reliable detection of anomalies in synchronous phasor measurement data. Attached Figure Description

[0047] Figure 1 This is a flowchart of the steps of the synchronous phasor measurement data anomaly detection method based on quantum generative adversarial networks of the present invention;

[0048] Figure 2 This is a schematic diagram of the Wasserstein distance between the generated samples and the training samples during the training process of Embodiment 2 of the present invention;

[0049] Figure 3 This is a schematic diagram of the anomaly scores of the test dataset with PMU fault-related anomalies in Embodiment 2 of the present invention, wherein,

[0050] Figure 3 (a) is a schematic diagram of the abnormal scores of the test dataset;

[0051] Figure 3 (b) is a schematic diagram of the abnormal scores obtained by Q-AnoGANs;

[0052] Figure 3 (c) is a schematic diagram of the abnormal scores obtained by classic AnoGANs;

[0053] Figure 4 This is a schematic diagram of the anomaly scores of the test dataset with system event-related anomalies in Embodiment 3 of the present invention, wherein,

[0054] Figure 4 (a) is a schematic diagram of the abnormal scores of the test dataset;

[0055] Figure 4 (b) is a schematic diagram of the abnormal scores obtained by Q-AnoGANs;

[0056] Figure 4 (c) is a schematic diagram of the abnormal scores obtained by classic AnoGANs. Detailed Implementation

[0057] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are for illustrative purposes only and are not intended to limit the scope of the invention.

[0058] Example 1

[0059] A method for detecting anomalies in synchronized phasor measurement data based on quantum generative adversarial networks, such as... Figure 1 As shown, it includes the following steps:

[0060] Step S1: Model the synchronous phasor measurement data, represent it as multidimensional time series data, and perform normalization preprocessing.

[0061] Raw measurement data from multiple synchronous phasor measurement devices in the power system are acquired. This synchronous phasor measurement data is collected in time-series format and includes at least one measurement feature among voltage amplitude, voltage phase angle, current amplitude, and current phase angle. The synchronous phasor measurement data is then constructed into a multi-dimensional time-series dataset, denoted as dataset. Its data dimensions are represented as ,in, Indicates the number of sampling time steps. Indicates the number of synchronous phasor measurement devices. This represents the feature dimension acquired by each synchronous phasor measurement device at a single time step.

[0062] Based on the aforementioned multidimensional time series data set, the characteristics of abnormal data in the synchronous phasor measurement data caused by faults in the synchronous phasor measurement device or changes in the operating state of the power system are characterized. Among them, the abnormal data differs significantly from the normal data in terms of numerical distribution, temporal correlation, or spatial correlation. Then, the synchronous phasor measurement data is normalized to eliminate the influence of different dimensions and numerical scales on the subsequent model training and anomaly detection process, thereby obtaining standardized data suitable for input to quantum generative adversarial networks.

[0063] Step S2: Construct a quantum-classical hybrid generative adversarial network model, in which the generator is implemented using a quantum neural network and the discriminator is implemented using a classical neural network.

[0064] After completing the modeling and preprocessing of the synchronous phasor measurement data, a quantum generative adversarial network (GAN) model is constructed to characterize the distribution characteristics of normal synchronous phasor measurement data. The GAN is a quantum-classical hybrid structure, including a quantum generator and a classical discriminator. The quantum generator receives random noise input and generates synthetic samples that are statistically consistent with the normal synchronous phasor measurement data through a quantum neural network. The classical discriminator judges the authenticity of the input samples and outputs a discrimination result that measures the similarity between the sample and the real synchronous phasor measurement data.

[0065] By constructing an adversarial learning mechanism between the quantum generator and the classical discriminator, the quantum generator continuously improves its ability to approximate the distribution of normal synchronous phasor measurement data with the generated samples, while the classical discriminator continuously enhances its ability to distinguish between real data and generated data, thereby achieving joint modeling of the characteristic distribution of normal synchronous phasor measurement data.

[0066] Step S3: Construct a quantum generator based on parameterized quantum circuits, and generate samples with the same distribution as normal PMU data through initial quantum state preparation, quantum unitary transformation and quantum measurement.

[0067] A quantum generator is constructed as the generation module in a quantum generative adversarial network. This quantum generator, implemented based on parameterized quantum circuits, is used to map random noise into generated samples consistent with the distribution of normal synchronous phasor measurement data. The quantum generator includes an initial quantum state preparation module, a parameterized quantum unitary transformation module, and a quantum measurement module, wherein:

[0068] Initial quantum state preparation module: The quantum generator will generate the quantum state. As input, where This represents the number of qubits. In the application of the Pauli-X rotating gate... Then, the initial quantum state is obtained. Given a rotation angle , The unitary matrix is ​​represented as:

[0069]

[0070] In fact, the angular parameters are modeled as noise following a uniform distribution, and these parameters are expressed as... .

[0071] Parameterized quantum unitary transform module: Typically, it is a multilayer quantum circuit with identical structure, each layer consisting of single-qubit rotation gates and two-qubit control rotation gates. Single-qubit rotation gates include Pauli-X rotations. And Pauli-Z rotation Given parameters , The unitary matrix is ​​represented as:

[0072]

[0073] In addition, a two-qubit controlled X-axis rotating gate is introduced. This helps to establish entanglement between qubits, and its unitary matrix representation is as follows:

[0074]

[0075] The aforementioned quantum circuit can capture the correlation between changes in a single sample and PMU data points. After the unitary transformation, the initial quantum state... Generate output quantum state , can be represented as:

[0076]

[0077] in, Indicates the first Unitary operation of layer parameters Indicates the first Layer parameters. , ..., This refers to the trainable parameters of a quantum generator, uniformly expressed as... .

[0078] Quantum Measurement Module: To extract meaningful information from the output quantum state, each qubit is measured computationally. , As a foundation, the state collapses to The specific results are as follows:

[0079]

[0080] in, Indicates the first The result of one qubit Indicates the first The output quantum state of each qubit Represents the measurement operator. , This indicates the conjugate transpose operation.

[0081] By measuring each qubit, a series of results can be obtained. The generated samples are recovered by applying inverse normalization, denoted as . .set up The mapping function of the quantum generator is such that the generated sample can be represented as .

[0082] Step S4: Introduce Wasserstein distance to train the quantum generative adversarial network to improve the stability of the model training process and achieve effective learning of the distribution characteristics of normal PMU data.

[0083] After the quantum generator and classical discriminator are constructed, the quantum generative adversarial network is trained using training samples containing only normal synchronous phasor measurement data to learn the statistical distribution characteristics of the normal synchronous phasor measurement data.

[0084] During training, samples generated by the quantum generator and real synchronous phasor measurement data are used as inputs to the discriminator. By constructing an adversarial optimization objective between the generator and the discriminator, the quantum generator continuously improves its ability to approximate the real data distribution by updating its trainable parameters, while the classical discriminator continuously enhances its ability to distinguish between real samples and generated samples.

[0085] The game function is:

[0086]

[0087] In the early stages of training, the generated samples With training samples Significantly different, resulting in low As training progressed, Continuously update to maximize Meanwhile, the discriminator is optimized. To enhance its recognition capabilities. During convergence, the discriminator cannot distinguish between generated samples and training samples, which means... and Highly similar. The number of trainable parameters used in the quantum generator is only... This is significantly less than the number required by classic generators.

[0088] To further improve training stability, the Wasserstein distance is introduced as an indicator to measure the difference between the distribution of quantum generated samples and the distribution of real synchronous phasor measurement data. Its expression is as follows:

[0089]

[0090] in and They represent and The distribution, express and The Wasserstein distance between them. It must be 1-Lipschitz continuous. Typically, a limiting parameter is introduced to implement this property. This constrains the trainable parameters of the discriminator within a specified range.

[0091] Based on the Wasserstein distance, an adversarial training objective function is constructed. By alternately optimizing the trainable parameters of the quantum generator and the classical discriminator, the distribution of quantum generated samples gradually approximates the distribution of normal synchronous phasor measurement data. When the Wasserstein distance converges to a preset threshold range, the training process ends, and the parameters of the quantum generator and the classical discriminator are fixed.

[0092] Step S5: In the anomaly detection stage, an anomaly scoring function is constructed by combining the input space residual loss and the discriminator feature space loss, and the noise variables are optimized to obtain the optimal reconstruction result.

[0093] After completing the training of the quantum generative adversarial network and fixing the parameters of the quantum generator and the classical discriminator, the synchronous phasor measurement data to be detected is used as input data to evaluate whether it deviates from the normal synchronous phasor measurement data distribution.

[0094] Using the synchronous phasor measurement data to be detected as the target sample, by optimizing the random noise variable, the quantum generator generates a reconstructed sample that is closest to the target sample while keeping the parameters unchanged, thereby achieving the reconstruction of the data to be detected. Based on the difference between the synchronous phasor measurement data to be detected and the reconstructed sample, an anomaly scoring function is constructed. The anomaly scoring function includes input space residual loss and discriminator feature space loss, wherein...

[0095] The input space residual loss is used to characterize the numerical difference between the synchronous phasor measurement data to be detected and the reconstructed sample, and is expressed as:

[0096]

[0097] The discriminator feature space loss is used to characterize the difference between the detected synchronous phasor measurement data and the reconstructed sample in the discriminator's intermediate feature space, and is expressed as:

[0098]

[0099] in This represents the output features of the intermediate layer in the discriminator.

[0100] By weighted summing of the input space residual loss and the discriminator feature space loss, an anomaly score corresponding to the synchronous phasor measurement data to be detected is obtained, which quantifies the degree of deviation of the data from the distribution of normal synchronous phasor measurement data. The weighted anomaly score is expressed as:

[0101]

[0102] in, The parameter has a value range of 0 to 1.

[0103] Step S6: Compare the calculated anomaly score with a preset threshold to determine abnormal data in the synchronous phasor measurement data.

[0104] Based on the anomaly score obtained in step S5, a preset anomaly judgment threshold is set for the synchronous phasor measurement data to distinguish between normal data and abnormal data.

[0105] Essentially, It's noise. The function, during training. Iteratively optimized to minimize This allows the quantum generator to generate samples that are as close as possible to the training samples. After multiple iterations, the optimized noise vector is obtained. This will be used for subsequent analysis. Input into Q-AnoGANs to recalculate the outlier scores. .

[0106] Introduce a parameter As a threshold, the anomaly score corresponding to the synchronous phasor measurement data to be detected is compared with the preset anomaly judgment threshold. When the anomaly score is greater than the preset anomaly judgment threshold, the corresponding synchronous phasor measurement data is determined to be abnormal data; when the anomaly score is less than or equal to the preset anomaly judgment threshold, the corresponding synchronous phasor measurement data is determined to be normal data.

[0107] Example 2

[0108] This embodiment uses abnormal data caused by a fault in the synchronous phasor measurement device as an example to illustrate the specific implementation process of the synchronous phasor measurement data anomaly detection method based on quantum generative adversarial networks described in this invention. In this embodiment, the synchronous phasor measurement data comes from a simulation model of the IEEE 39-node power system, and the sampling time step is set to 0.02 seconds.

[0109] The voltage amplitude at bus 14 was selected as the synchronous phasor measurement data to be analyzed. The quantum generator adopts a two-layer circuit architecture containing 10 qubits, with a total of 80 trainable parameters. These parameters are initialized to zero. Noise vector. Samples are taken from a uniform distribution within the interval [0, 0.5]. The number of measurements per qubit is set to 1000. The quantum generator is implemented on the IBM Qiskit simulator. The discriminator employs a classic neural network structure, consisting of a one-dimensional convolutional layer with 32 filters of size 10, followed by two fully connected layers with 32 and 1 neurons respectively. All layers except the output layer use the ReLU activation function. Following the steps of the synchronous phasor measurement data anomaly detection method based on quantum generative adversarial networks according to the present invention, Q-AnoGANs are trained using normal simulation data lasting 240 seconds, i.e., training samples of size (1200, 10, 1). The Wasserstein distance during training is as follows... Figure 2 As shown, the Wasserstein distance has converged, indicating that the generated samples are very similar to normal PMU data.

[0110] A 30-second test dataset, such as Figure 3 As shown in (a). To evaluate the effectiveness of the proposed method against anomalies caused by system events, peak values ​​during 2s–2.3s and spurious data injections during 14s–14.8s were introduced into the dataset. During detection, a sliding window method was employed with a window size of 10 and a step size of 10, ensuring that consecutive windows did not contain overlapping data. Parameters Set it to 0.9.

[0111] The anomaly scores calculated for this dataset are as follows: Figure 3 As shown in (b), the anomaly scores corresponding to the abnormal windows obtained by Q-AnoGANs show a significant bias compared to the normal windows, validating the effectiveness of the proposed method. This is achieved by using a threshold... Setting it to 0.1 will identify all windows containing anomalies.

[0112] The anomaly scores obtained using this method are compared with those obtained using classic AnoGANs. Figure 3 As shown in (c), the performance of Q-AnoGANs is comparable to that of the classic AnoGANs, while Q-AnoGANs uses significantly fewer trainable parameters compared to the classic AnoGANs.

[0113] Example 3

[0114] This embodiment focuses on abnormal data caused by system events. The voltage amplitudes of nodes 14 and 4 are selected to form the dataset. The quantum generator employs a two-layer circuit structure containing 20 qubits. The quantum generator is implemented on a TensorCircuit simulator. The first layer of the discriminator uses a two-dimensional convolutional network with 32 filters of size 10×2. All other settings remain unchanged. Following the steps of the synchronous phasor measurement data anomaly detection method based on quantum generative adversarial networks according to the present invention, Q-AnoGANs are trained using normal simulation data of size (1200, 10, 2, 1).

[0115] The test dataset is 10 seconds long, such as Figure 4 As shown in (a), the transmission line between nodes 15 and 16 was removed after 8 seconds. The calculated anomaly score is as follows. Figure 4 As shown in (b), the anomaly score corresponding to the anomaly window is relatively high, confirming that the proposed method can effectively detect outliers caused by system events. We compare it with... Figure 4 (c) compares the anomaly scores obtained with those obtained by the classic AnoGANs, and concludes that Q-AnoGANs achieves comparable performance to the classic method with a lower training cost.

[0116] In summary, the method proposed in this invention significantly reduces model training complexity while maintaining anomaly detection accuracy comparable to classical methods, thus validating the effectiveness of the quantum-classical hybrid architecture in improving power system data quality.

[0117] Feasibility assessment.

[0118] Therefore, this invention proposes for the first time a method for detecting anomalies in synchronous phasor data based on quantum generative adversarial networks (GANs). It utilizes the strong expressive power and low parameter count of quantum neural networks to construct a generator, significantly reducing the number of trainable parameters in the model. By introducing Wasserstein distance as a loss metric, the stability of adversarial training is effectively improved. Furthermore, an anomaly scoring mechanism is constructed by integrating residual loss and discriminator loss, achieving unsupervised and accurate detection of PMU fault anomalies and system event anomalies. The method proposed in this invention provides a novel quantum-enhanced solution for addressing the computational challenges posed by large amounts of synchronous phasor data in power systems, and also expands valuable practical pathways for the application of quantum machine learning in critical tasks in the energy field.

[0119] It should be noted that the above content merely illustrates the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. For those skilled in the art, various improvements and modifications can be made without departing from the principle of the present invention, and all such improvements and modifications fall within the scope of protection of the claims of the present invention.

Claims

1. A method for detecting anomalies in synchronous phasor measurement data based on quantum generative adversarial networks, characterized in that... It includes the following steps: S1. Data Modeling: Collect raw measurement data from the synchronous phasor measurement device, model the measurement data, and represent it as multidimensional time series data. After normalization preprocessing, standardized data is obtained. S2. Network Model Construction: Construct a quantum-classical hybrid generative adversarial network model, which includes a quantum generator and a classical discriminator. Through the adversarial learning mechanism between the quantum generator and the classical discriminator, the joint modeling of the characteristic distribution of normal synchronous phasor measurement data is achieved. S3. Quantum Generator Construction: A quantum generator is constructed based on parameterized quantum circuits. The quantum generator includes an initial quantum state preparation module, a quantum unitary transformation module, and a quantum measurement module to generate samples with a distribution consistent with normal synchronous phasor measurement data. S4. Network Model Training: The Wasserstein distance is introduced to train the quantum-classical hybrid generative adversarial network model, enabling the learning of the distribution characteristics of normal synchronous phasor measurement data. S5. Result Optimization: In the anomaly detection stage, an anomaly scoring function is constructed by combining the input space residual loss and the discriminator feature space loss, and the noise variables are optimized to obtain the optimal reconstruction result. S6. Anomaly Detection and Judgment: The anomaly score calculated in step S6 is compared with a preset threshold to determine the abnormal data in the synchronous phasor measurement data.

2. The method for detecting anomalies in synchronous phasor measurement data based on quantum generative adversarial networks as described in claim 1, characterized in that: The raw measurement data in step S1 includes at least one measurement feature among voltage amplitude, voltage phase angle, current amplitude, or current phase angle; The measurement data was constructed into a multidimensional time series dataset. Its data dimensions are represented as ,in, Indicates the number of sampling time steps. Indicates the number of synchronous phasor measurement devices. This represents the feature dimension acquired by each synchronous phasor measurement device at a single time step.

3. The method for detecting anomalies in synchronous phasor measurement data based on quantum generative adversarial networks as described in claim 1, characterized in that: In step S2, the quantum generator is used to receive random noise input and generate a synthetic sample that is consistent with the statistical characteristics of normal synchronous phasor measurement data through a quantum neural network; the classical discriminator is used to judge the authenticity of the input sample and output a discrimination result that measures the similarity between the sample and the real synchronous phasor measurement data.

4. The method for detecting anomalies in synchronous phasor measurement data based on quantum generative adversarial networks as described in claim 3, characterized in that: In the quantum generator of step S3, Initial quantum state preparation module: The quantum generator will generate the quantum state. As input, where Represents the number of qubits, applying a Pauli-X rotation gate to the quantum state. Then, the initial quantum state is obtained. Given rotation angle , The unitary matrix is ​​represented as: ; Quantum unitary transformation module: The initial quantum state input quantum unitary transformation module is a multi-layered quantum circuit with the same structure. Each layer consists of a single-qubit rotation gate and a two-qubit control rotation gate. The single-qubit rotation gate includes Pauli-X rotation. And Pauli-Z rotation Given parameters , The unitary matrix is ​​represented as: ; Two-qubit control of the X-axis rotating gate The unitary matrix is ​​represented as: ; After the quantum unitary transformation module, the initial quantum state Generate output quantum state , is represented as: ; in, Indicates the first Unitary operation of layer parameters Indicates the first Layer parameters, , ..., This refers to the trainable parameters of a quantum generator; Quantum measurement module: based on output quantum state Measure each qubit and select , As a computational basis, the state collapses to The result is expressed as: ; in, Indicates the first The result of one qubit Indicates the first The output quantum state of each qubit Represents the measurement operator. , This indicates the conjugate transpose operation.

5. The method for detecting anomalies in synchronous phasor measurement data based on quantum generative adversarial networks as described in claim 1, characterized in that: The game function in step S4, the training process of the quantum-classical hybrid generative adversarial network model, is as follows: ; in, It is a game function. These are the training parameters of the quantum generator. These are the training parameters of the discriminator. It is the expectation operator. It is a discriminator. It is the discriminator function. It is a quantum generator. It is a quantum generator function. These are training samples. It is the rotation angle parameter in the initial quantum state preparation module; An adversarial training objective function is constructed based on the Wasserstein distance. By alternately optimizing the trainable parameters of the quantum generator and the classical discriminator, the distribution of quantum generated samples gradually approximates the distribution of normal synchronous phasor measurement data. The specific expression for the Wasserstein distance is as follows: ; in and They represent and The distribution, express and Wasserstein distance between them Indicates the supremacy. It is the Lipschitz norm of the discriminator function. These are samples generated by the generator.

6. The method for detecting anomalies in synchronous phasor measurement data based on quantum generative adversarial networks as described in claim 1, characterized in that: In step S5, the anomaly scoring function includes the input space residual loss and the discriminator feature space loss, wherein, The input space residual loss is used to characterize the numerical difference between the synchronous phasor measurement data to be detected and the reconstructed sample, and is expressed as: ; The discriminator feature space loss is used to characterize the difference between the detected synchronous phasor measurement data and the reconstructed sample in the discriminator's intermediate feature space, and is expressed as: ; in This represents the output features of the intermediate layer in the discriminator; The anomaly scoring function is as follows: ; in, The parameter has a value range of 0-1.

7. The method for detecting anomalies in synchronous phasor measurement data based on quantum generative adversarial networks as described in claim 6, characterized in that: In step S6, the abnormal score corresponding to the synchronous phasor measurement data to be detected is compared with a preset abnormal judgment threshold. When the abnormal score is greater than the preset abnormal judgment threshold, the corresponding synchronous phasor measurement data is determined to be abnormal data; when the abnormal score is less than or equal to the preset abnormal judgment threshold, the corresponding synchronous phasor measurement data is determined to be normal data.