Power system inertia estimation method and device, computer equipment, readable storage medium and program product
By combining target hybrid quantum circuits with neural networks and quantum variational circuits, the accuracy and real-time problems of power system inertia estimation in traditional technology are solved, accurate and real-time estimation of power system inertia is achieved, and the reliable operation of the power system is ensured.
Patent Information
- Application Number
- CN202410643595.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-08-30
AI Technical Summary
The power system inertia estimation in traditional technology lacks accuracy and real-time performance, and the inertia of the power system cannot be determined accurately and timely, which affects the grid operator's ability to take operation and maintenance measures, resulting in reduced reliability of the power system.
The target hybrid quantum circuit is used, combined with the neural network and quantum variational circuit on the input side and output side, to achieve accurate and real-time estimation of the power system inertia through feature extraction of real-time frequency data and quantum state measurement.
This method can process real-time frequency data efficiently and accurately, provide inertia estimates of the power system, and help grid operators take timely measures to ensure reliable operation and stability of the power system.
Smart Images

Figure CN118568561A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power system inertia estimation, and in particular to a power system inertia estimation method, device, computer equipment, computer-readable storage medium and computer program product. Background Art
[0002] The inertia of the power system is a key factor in the power system's ability to resist frequency fluctuations. However, with the increasing proportion of renewable energy in the power system (the power generation equipment of renewable energy does not contain rotating elements and cannot provide rotational inertia), the gradual withdrawal of traditional fossil fuel generators (traditional fossil fuel generators usually contain rotating elements that can provide rotational inertia), the overall inertia of the power system has decreased, thus affecting the frequency stability of the power system's response capability under certain disturbances, which poses an unprecedented challenge to the stability of the power system. In the current power system operation and planning, accurately estimating the inertia of the power system has become a vital task so that grid operators can take appropriate operation and maintenance measures based on the inertia estimation results. For example, in the face of large-scale power disturbances in the power system, the frequency response of the system can be effectively predicted based on the system inertia, providing technical support for power system planning, operation and dispatching, and ensuring the reliable operation of the power system.
[0003] However, traditional technology mainly relies on empirical models and statistical data to estimate the inertia of the power system. This estimation method not only lacks sufficient accuracy, but also has difficulty adapting to the rapidly changing characteristics of the power system and is unable to determine the actual inertia of the power system in real time. In other words, traditional technology is unable to accurately and real-time determine the inertia of the power system, resulting in the inability of grid operators to accurately and timely take power system operation and maintenance measures based on the inertia estimation results, which in turn affects the reliable operation of the power system. Summary of the invention
[0004] Based on this, it is necessary to provide a power system inertia estimation method, device, computer equipment, computer readable storage medium and computer program product that can accurately and real-time determine the inertia of the power system to ensure the reliable operation of the power system in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for estimating inertia of a power system, comprising:
[0006] Acquire real-time frequency data of the target hybrid quantum circuit and the power system; the target hybrid quantum circuit includes: an input-side target neural network, a target quantum variational circuit, and an output-side target neural network;
[0007] Based on the input-side target neural network, feature extraction is performed on the real-time frequency data to obtain frequency features that match the feature processing conditions of the target quantum variational circuit;
[0008] The quantum state of the frequency characteristic is prepared through the target quantum variation circuit, and the quantum state of the frequency characteristic is measured to obtain the expected value vector;
[0009] The inertia estimation of the expected value vector is performed based on the output side target neural network to obtain the inertia estimation value of the power system.
[0010] In one embodiment, the number of frequency features is multiple; the quantum state of the frequency feature is prepared by a target quantum variational circuit, and the quantum state of the frequency feature is measured to obtain an expected value vector, including:
[0011] For each frequency feature, a quantum state of the frequency feature is prepared based on a quantum state preparation circuit in a target quantum variational circuit;
[0012] Based on the target quantum gate set in the target quantum variational circuit, the quantum state of the frequency characteristic is measured to obtain the expected value of the frequency characteristic;
[0013] Aggregate the expected values of the frequency features to generate an expected value vector.
[0014] In one embodiment, the training process of the target hybrid quantum circuit includes:
[0015] Obtain multiple historical frequency data of the initial hybrid quantum circuit and the power system in the power shortage scenario;
[0016] For each piece of historical frequency data, the inertia of the historical frequency data is estimated to obtain the historical standard inertia corresponding to the historical frequency data;
[0017] Based on the initial hybrid quantum circuit, the inertia of the historical frequency data is estimated to obtain the historical estimated inertia corresponding to the historical frequency data;
[0018] According to the inertia difference between the historical standard inertia and the historical estimated inertia corresponding to each of the multiple historical frequency data, the parameters of the initial hybrid quantum circuit are adjusted to obtain the target hybrid quantum circuit.
[0019] In one embodiment, according to the inertia difference between the historical standard inertia and the historical estimated inertia corresponding to each of the plurality of historical frequency data, the parameters of the initial hybrid quantum circuit are adjusted to obtain the target hybrid quantum circuit, including:
[0020] The inertia difference between the historical standard inertia and the historical estimated inertia corresponding to each of the multiple historical frequency data is counted to obtain the inertia variance;
[0021] Taking the inertia variance as the dependent variable of the loss function constructed for the initial hybrid quantum circuit, and taking multiple parameters in the initial hybrid quantum circuit as the independent variables of the loss function;
[0022] The values of multiple parameters in the initial hybrid quantum circuit are adjusted one by one, and the gradient of the loss function after each parameter adjustment is calculated; the gradient is used to determine whether the dependent variable of the loss function reaches the minimum value;
[0023] The values of multiple parameters when the dependent variable of the loss function reaches the minimum value are used as the parameter adjustment results of the multiple parameters to obtain the target hybrid quantum circuit.
[0024] In one embodiment, the initial hybrid quantum circuit includes: an initial neural network on the input side, an initial quantum variational circuit, and an initial neural network on the output side;
[0025] The values of multiple parameters in the initial hybrid quantum circuit are adjusted one by one, including:
[0026] The input side weight matrix and input side bias vector of the input side initial neural network, multiple circuit parameters of the initial quantum variational circuit, and the output side weight matrix and output side bias vector of the output side initial neural network are adjusted successively.
[0027] In one embodiment, the multiple circuit parameters of the initial quantum variational circuit are adjusted one by one, including:
[0028] For each circuit parameter in the initial quantum variational circuit, the circuit parameter is adjusted based on a parameter movement rule;
[0029] After each adjustment of the targeted circuit parameter, the gradient of the targeted circuit parameter with respect to the loss function is calculated, and the targeted circuit parameter is adjusted for the next time based on the adjustment direction indicated by the gradient of the targeted circuit parameter with respect to the loss function.
[0030] In a second aspect, the present application further provides a power system inertia estimation device, comprising:
[0031] An acquisition module is used to acquire real-time frequency data of a target hybrid quantum circuit and a power system; the target hybrid quantum circuit comprises: an input-side target neural network, a target quantum variational circuit, and an output-side target neural network;
[0032] A feature extraction module, used to extract features from the real-time frequency data based on the input-side target neural network, and obtain frequency features that match the feature processing conditions of the target quantum variational circuit;
[0033] A measurement module, used to prepare the quantum state of the frequency characteristic through the target quantum variation circuit, measure the quantum state of the frequency characteristic, and obtain an expected value vector;
[0034] An inertia estimation module is used to perform inertia estimation on the expected value vector based on the output-side target neural network to obtain an inertia estimation value of the power system.
[0035] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0036] Acquire real-time frequency data of the target hybrid quantum circuit and the power system; the target hybrid quantum circuit includes: an input-side target neural network, a target quantum variational circuit, and an output-side target neural network;
[0037] Based on the input-side target neural network, feature extraction is performed on the real-time frequency data to obtain frequency features that match the feature processing conditions of the target quantum variational circuit;
[0038] The quantum state of the frequency characteristic is prepared through the target quantum variation circuit, and the quantum state of the frequency characteristic is measured to obtain the expected value vector;
[0039] The inertia estimation of the expected value vector is performed based on the output side target neural network to obtain the inertia estimation value of the power system.
[0040] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0041] Acquire real-time frequency data of the target hybrid quantum circuit and the power system; the target hybrid quantum circuit includes: an input-side target neural network, a target quantum variational circuit, and an output-side target neural network;
[0042] Based on the input-side target neural network, feature extraction is performed on the real-time frequency data to obtain frequency features that match the feature processing conditions of the target quantum variational circuit;
[0043] The quantum state of the frequency characteristic is prepared through the target quantum variation circuit, and the quantum state of the frequency characteristic is measured to obtain the expected value vector;
[0044] The inertia estimation of the expected value vector is performed based on the output side target neural network to obtain the inertia estimation value of the power system.
[0045] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0046] Acquire real-time frequency data of the target hybrid quantum circuit and the power system; the target hybrid quantum circuit includes: an input-side target neural network, a target quantum variational circuit, and an output-side target neural network;
[0047] Based on the input-side target neural network, feature extraction is performed on the real-time frequency data to obtain frequency features that match the feature processing conditions of the target quantum variational circuit;
[0048] The quantum state of the frequency characteristic is prepared through the target quantum variation circuit, and the quantum state of the frequency characteristic is measured to obtain the expected value vector;
[0049] The inertia estimation of the expected value vector is performed based on the output side target neural network to obtain the inertia estimation value of the power system.
[0050] The above-mentioned power system inertia estimation method, device, computer equipment, computer-readable storage medium and computer program product first obtain the real-time frequency data of the target hybrid quantum circuit and the power system, so that the power system inertia can be accurately and real-time determined based on the real-time frequency data and the target hybrid quantum circuit, wherein the target hybrid quantum circuit includes: an input-side target neural network, a target quantum variational circuit, and an output-side target neural network, that is, the target hybrid quantum circuit combines the advantages of the neural network and the quantum variational circuit, which is conducive to the subsequent efficient and accurate processing of real-time frequency data. Further, based on the input-side target neural network, the real-time frequency data is feature extracted to obtain a frequency feature that matches the feature processing condition of the target quantum variational circuit, and then the quantum state of the frequency feature is prepared through the target quantum variational circuit, and the quantum state of the frequency feature is measured to obtain an expected value vector, thereby performing inertia estimation on the expected value vector based on the output-side target neural network to obtain an estimated inertia value of the power system. During the whole process, the power system inertia can be accurately and real-time determined based on the real-time frequency data of the power system and the target hybrid quantum circuit, which is conducive to the grid operator to take power system operation and maintenance measures accurately and timely based on the determined power system inertia to ensure the reliable operation of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0052] Figure 1 is an application environment diagram of a method for estimating inertia of a power system in an embodiment;
[0053] Figure 2 is a flow chart of a method for estimating inertia of a power system in one embodiment;
[0054] Figure 3 is a schematic diagram of a hybrid quantum circuit in one embodiment;
[0055] Figure 4 A comparison diagram of historical standard inertia and historical estimated inertia in one embodiment;
[0056] Figure 5 is a schematic diagram of the relationship between the number of iterations and the dependent variable of the loss function in one embodiment;
[0057] Figure 6 is a flow chart of a method for estimating inertia of a power system in another embodiment;
[0058] Figure 7 is a structural block diagram of a power system inertia estimation device in one embodiment;
[0059] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0061] The power system inertia estimation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal device 102 of the power system can communicate with the server 104 of the power grid operator to which the power system belongs through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Specifically, the server 104 is deployed with power system simulation software, including but not limited to: PSIM, PSCAD, MATLAB Simulink, PLECS, and DSP (AC / DC power system calculation and analysis software) developed by a domestic research institute, etc., and the server 104 is deployed with a trained target hybrid quantum circuit, wherein the target hybrid quantum circuit includes: input side target neural network, target quantum variational circuit, output side target neural network. In addition, the server 104 can also obtain real-time frequency data of the power system from the terminal device 102 through the network.
[0062] Based on this, the server 104 can obtain the real-time frequency data of the target hybrid quantum circuit and the power system, and based on the input side target neural network of the target hybrid quantum circuit, extract the features of the real-time frequency data to obtain the frequency features that match the feature processing conditions of the target quantum variational circuit, thereby preparing the quantum state of the frequency features through the target quantum variational circuit of the target hybrid quantum circuit, measuring the quantum state of the frequency features, and obtaining the expected value vector, and then based on the output side target neural network of the target hybrid quantum circuit, the expected value vector is estimated in inertia to obtain the estimated inertia value of the power system, so as to provide the power grid operator to which the power system belongs with the estimated inertia value of the power system, and take appropriate operation and maintenance measures to ensure the reliable operation of the power system. Among them, the terminal device 102 can be, but is not limited to, a device for collecting the operation data of all devices in the power system, such as collecting the real-time frequency data of all devices in the power system, and can transmit the collected data back to the server 104. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0063] In an exemplary embodiment, Figure 2 As shown, a method for estimating the inertia of a power system is provided. Figure 1 The server in the example is used to illustrate, including the following steps 202 to 208. Among them:
[0064] Step 202, obtaining real-time frequency data of a target hybrid quantum circuit and a power system; the target hybrid quantum circuit includes: an input-side target neural network, a target quantum variational circuit, and an output-side target neural network.
[0065] Among them, neural networks include but are not limited to: Convolutional Neural Networks (CNN), Recurrent Neural Networks (RNN), Long Short-Term Memory (LSTM). The target quantum variational circuit is trained based on the variational quantum classifier (VQC). The variational quantum classifier is a machine learning algorithm that uses quantum computing technology to perform classification tasks. It can encode and map input data to quantum states, and then use quantum gates and measurement operations to operate these quantum states to extract features related to classification tasks. The computing power of quantum computers can be used to improve the performance of classical machine learning methods. The real-time frequency data of the power system specifically refers to: the real-time frequency response data of the power system. The load changes or faults of the power system will affect the frequency of the power system, and the frequency response describes the degree of change of the power system when it is affected by these influences.
[0066] Among them, the real-time frequency data is the input of the target neural network on the input side, the output of the target neural network on the input side is the input of the target quantum variational circuit, the output of the target quantum variational circuit is the input of the target neural network on the output side, and the output of the target neural network on the output side is the estimated inertia value of the power system.
[0067] Optionally, a trained target hybrid quantum circuit is deployed in the server. In addition, the server can also obtain real-time frequency data of the power system from the terminal device through the network. Based on this, the server can obtain the real-time frequency data of the target hybrid quantum circuit and the power system to input the real-time frequency data into the target hybrid quantum circuit for inertia estimation.
[0068] It should be noted that the target hybrid quantum circuit in this embodiment is constructed based on neural networks and quantum variational circuits, combining the advantages of traditional neural networks and quantum computing. It can utilize the powerful capabilities of traditional neural networks in feature extraction and feature dimensionality reduction, as well as the unique advantages of quantum computing in processing dynamic modeling of complex systems. It can efficiently and accurately process high-dimensional, nonlinear, and dynamically complex power system data (such as real-time frequency data), which is conducive to realizing real-time and accurate estimation of the inertia of the power system without being restricted like traditional machine learning algorithms. It is conducive to effectively improving the operational safety and stability of the power system, and is of great significance to the development of power grid modernization and intelligence.
[0069] Step 204, based on the input-side target neural network, feature extraction is performed on the real-time frequency data to obtain frequency features that match the feature processing conditions of the target quantum variational circuit.
[0070] Optionally, the server can input the real-time frequency data into the target hybrid quantum circuit, and perform feature extraction on the real-time frequency data by calling the input-side target neural network, wherein the feature extraction includes feature dimensionality reduction processing to obtain low-dimensional frequency features that match the feature processing conditions of the target quantum variational circuit and are suitable for processing by the target quantum variational circuit. That is, in this embodiment, the high-dimensional data can be converted into low-dimensional features that are easier to process through the input-side target neural network to improve subsequent computing efficiency.
[0071] For example, the mathematical operation logic of the input-side target neural network can be specifically shown as formula (1):
[0072] (1)
[0073] in, Represents the real-time frequency data of the power system input into the target hybrid quantum circuit; Represents the weight matrix of the target neural network on the input side; Represents the bias vector of the target neural network on the input side; represents the activation function; It is the output of the target neural network on the input side after dimensionality reduction, that is, the frequency characteristics that match the characteristic processing conditions of the target quantum variational circuit, and is used as the input of the target quantum variational circuit.
[0074] Step 206, preparing a quantum state of frequency characteristics through a target quantum variational circuit, measuring the quantum state of frequency characteristics, and obtaining an expected value vector.
[0075] Optionally, the server can input the frequency characteristics output by the input side target neural network into the target quantum variation circuit, and prepare the quantum state of the frequency characteristics through the target quantum variation circuit, and then measure the quantum state of the frequency characteristics through the target quantum variation circuit to obtain the expected value of the frequency characteristics, thereby collecting all the expected values to obtain the expected value vector. The number of frequency characteristics is multiple.
[0076] Step 208 , performing inertia estimation on the expected value vector based on the output-side target neural network to obtain an estimated inertia value of the power system.
[0077] Among them, the inertia of the power system refers to: the power system's ability to resist frequency changes in the dynamic process, which reflects the system's ability to maintain frequency stability when disturbed.
[0078] Optionally, the server may use the frequency characteristics of the target quantum variational circuit output as the input of the output-side target neural network to perform inertia estimation on the expected value vector based on the output-side target neural network to obtain the inertia estimation value of the power system.
[0079] For example, the inertia estimation of the expected value vector is performed based on the output-side target neural network to obtain the mathematical logic of the inertia estimation value of the power system, which can be specifically shown in formula (2):
[0080] (2)
[0081] in, represents the expected value vector of the target quantum variational circuit output, that is, the set of all expected values, represents the weight matrix of the target neural network on the output side, represents the bias vector of the target neural network on the output side, represents the activation function, is the output of the target neural network on the output side, i.e., the estimated inertia of the power system.
[0082] For example, Figure 3 As shown, a schematic diagram of a hybrid quantum circuit based on a neural network and a quantum variational circuit is provided. On the input side, feature processing (feature extraction and feature dimension reduction) can be performed based on the input side neural network (a layer of neural network) to obtain frequency features suitable for quantum variational circuits (such as Figure 3 The frequency characteristics in ). Furthermore, the quantum state of each frequency characteristic can be prepared based on the quantum variational circuit ( Figure 3 The |0> in the preparation quantum state is represented), and then a rotating gate is applied to each quantum state. , thus obtaining Figure 3 In , and then through a series of controlled NOT gates and rotation gates in the quantum variational circuit (i.e. Figure 3 In ), realize the entanglement and further transformation of quantum states, and the quantum variation circuit outputs the expected value corresponding to each frequency feature, that is, Figure 3 In , as the input of the output-side neural network. Finally, the output-side neural network can collect all the expected values, obtain the expected value vector, and perform inertia estimation on the expected value vector to obtain the inertia estimation value of the power system. In this process, the advantages of quantum computing in processing high-dimensional data and executing complex models can be fully utilized to improve the accuracy and real-time performance of inertia estimation.
[0083] In the above-mentioned power system inertia estimation method, the real-time frequency data of the target hybrid quantum circuit and the power system are first obtained, so that the inertia of the power system can be accurately and real-time determined based on the real-time frequency data and the target hybrid quantum circuit, wherein the target hybrid quantum circuit includes: an input-side target neural network, a target quantum variational circuit, and an output-side target neural network, that is, the target hybrid quantum circuit combines the advantages of the neural network and the quantum variational circuit, which is conducive to the subsequent efficient and accurate processing of real-time frequency data. Further, based on the input-side target neural network, the real-time frequency data is feature extracted to obtain a frequency feature that matches the feature processing condition of the target quantum variational circuit, and then the quantum state of the frequency feature is prepared through the target quantum variational circuit, and the quantum state of the frequency feature is measured to obtain an expected value vector, thereby based on the output-side target neural network, the expected value vector is estimated for inertia, and the estimated inertia value of the power system is obtained. In the whole process, the inertia of the power system can be accurately and real-time determined based on the real-time frequency data of the power system and the target hybrid quantum circuit, which is conducive to the power grid operator to accurately and timely take power system operation and maintenance measures based on the determined power system inertia to ensure the reliable operation of the power system.
[0084] In an exemplary embodiment, the number of frequency features is multiple; the quantum state of the frequency feature is prepared by a target quantum variational circuit, and the quantum state of the frequency feature is measured to obtain an expected value vector, including:
[0085] For each frequency feature, a quantum state of the frequency feature is prepared based on a quantum state preparation circuit in a target quantum variational circuit;
[0086] Based on the target quantum gate set in the target quantum variational circuit, the quantum state of the frequency characteristic is measured to obtain the expected value of the frequency characteristic;
[0087] Aggregate the expected values of the frequency features to generate an expected value vector.
[0088] Among them, the prepared quantum state (quantum initial state) is a preprocessing step before all quantum algorithms begin.
[0089] Optionally, for each frequency feature, the server can call the quantum state preparation circuit in the target quantum variational circuit to prepare the quantum state of the frequency feature for processing by the target quantum variational circuit, thereby calling the target quantum gate set (including multiple target quantum gates) in the target quantum variational circuit to perform deep quantum measurement on the quantum state of the frequency feature to obtain the expected value of the frequency feature. Finally, the expected values of the frequency features can be aggregated to generate an expected value vector, which is output by the target quantum variational circuit.
[0090] For example, the mathematical logic for preparing the quantum state of frequency characteristics can be specifically shown as formula (3):
[0091] (3)
[0092] in, Indicates preparation The quantum state of is the frequency characteristic of the target neural network output on the input side, for The quantum state of express orthogonal quantum basis vectors.
[0093] Furthermore, the mathematical logic of measuring the quantum state of the frequency characteristic and obtaining the expected value of the frequency characteristic can be specifically shown in formula (4):
[0094] (4)
[0095] in, is the set of all quantum gate parameters in the target quantum variational circuit; A series of parameterized quantum gates in the target quantum variational circuit, namely, the target quantum gate set; for The conjugate transpose of ; is the first The Pauli-Z observable (also called the Pauli-Z gate observable) of qubits (each frequency feature has its own corresponding qubit); is the first The expected value of a qubit.
[0096] Furthermore, the server can collect all the expected values in the target quantum variational circuit to obtain the expected value vector .
[0097] In this embodiment, the high parallelism and quantum state superposition characteristics of the target quantum variational circuit can be used to perform a detailed analysis of the dynamic characteristics of the power system and obtain an expected value vector.
[0098] In one embodiment, the training process of the target hybrid quantum circuit includes:
[0099] Obtain multiple historical frequency data of the initial hybrid quantum circuit and the power system in the power shortage scenario;
[0100] For each piece of historical frequency data, the inertia of the historical frequency data is estimated to obtain the historical standard inertia corresponding to the historical frequency data;
[0101] Based on the initial hybrid quantum circuit, the inertia of the historical frequency data is estimated to obtain the historical estimated inertia corresponding to the historical frequency data;
[0102] According to the inertia difference between the historical standard inertia and the historical estimated inertia corresponding to each of the multiple historical frequency data, the parameters of the initial hybrid quantum circuit are adjusted to obtain the target hybrid quantum circuit.
[0103] The initial hybrid quantum circuit includes an initial neural network on the input side, an initial quantum variational circuit, and an initial neural network on the output side. The power shortage specifically refers to the fact that the active power or reactive power in the power system does not reach the rated power, which will cause an imbalance in the power of the entire power system.
[0104] Optionally, the server can simulate the operation process of the power system based on the model corresponding to the power system in the power simulation system, and simulate the operation state of the power system under different power shortage scenarios by adjusting the operation parameters, so as to obtain multiple historical frequency data of the power system under the power shortage scenario, wherein each power shortage scenario corresponds to one historical frequency data. Based on this, the server can perform inertia estimation based on multiple historical frequency data of the power system under the power shortage scenario and the initial hybrid quantum circuit pre-deployed on the server. For each piece of historical frequency data, on the one hand, the server can perform inertia estimation on the historical frequency data based on the inertia estimation method of synchronous inertia and unbalanced power, and obtain the historical standard inertia corresponding to the historical frequency data (an accurate inertia value that can be used as a reference). On the other hand, the server can perform inertia estimation on the historical frequency data based on the initial hybrid quantum circuit, and obtain the historical estimated inertia corresponding to the historical frequency data, so as to adjust the parameters of the initial hybrid quantum circuit according to the inertia difference between the historical standard inertia and the historical estimated inertia corresponding to each of the multiple pieces of historical frequency data, and obtain the target hybrid quantum circuit.
[0105] Specifically, the process of the server estimating the inertia of the historical frequency data based on the initial hybrid quantum circuit can be as follows: inputting the historical frequency data into the initial hybrid quantum circuit, extracting features of the real-time frequency data based on the input-side initial neural network in the initial hybrid quantum circuit, and obtaining historical frequency features that match the feature processing conditions of the initial quantum variational circuit. For each historical frequency feature, the quantum state of the historical frequency feature is prepared based on the quantum state preparation circuit in the initial quantum variational circuit, and then the quantum state of the historical frequency feature is measured based on the initial quantum gate set in the initial quantum variational circuit to obtain the historical expected value of the historical frequency feature, and then the historical expected value of the historical frequency feature is collected to generate a historical expected value vector. Finally, the historical expected value vector is estimated for inertia based on the output-side initial neural network to obtain the historical estimated inertia.
[0106] In this embodiment, the initial hybrid quantum circuit can be trained according to the difference between the historical standard inertia and the historical estimated inertia estimated by the initial hybrid quantum circuit to obtain a target hybrid quantum circuit that can accurately estimate inertia.
[0107] In one embodiment, according to the inertia difference between the historical standard inertia and the historical estimated inertia corresponding to each of the plurality of historical frequency data, the parameters of the initial hybrid quantum circuit are adjusted to obtain the target hybrid quantum circuit, including:
[0108] The inertia difference between the historical standard inertia and the historical estimated inertia corresponding to each of the multiple historical frequency data is counted to obtain the inertia variance;
[0109] Taking the inertia variance as the dependent variable of the loss function constructed for the initial hybrid quantum circuit, and taking multiple parameters in the initial hybrid quantum circuit as the independent variables of the loss function;
[0110] The values of multiple parameters in the initial hybrid quantum circuit are adjusted one by one, and the gradient of the loss function after each parameter adjustment is calculated; the gradient is used to determine whether the dependent variable of the loss function reaches the minimum value;
[0111] The values of multiple parameters when the dependent variable of the loss function reaches the minimum value are used as the parameter adjustment results of the multiple parameters to obtain the target hybrid quantum circuit.
[0112] Among them, the loss function is usually used as a learning criterion in the application and is associated with the optimization problem, that is, the model is solved and evaluated by minimizing the loss function. In this embodiment, when the loss function reaches the minimum value, it means that the training stop condition is reached, and the trained model (target hybrid quantum circuit) can accurately estimate the inertia, and the inertia estimation result of the target hybrid quantum circuit for the power system is infinitely close to / equal to the actual inertia value of the power system.
[0113] Optionally, the server can calculate the inertia difference between the historical standard inertia and the historical estimated inertia corresponding to each of the multiple historical frequency data based on the formula shown in formula (5) to obtain the inertia variance: :
[0114] (5)
[0115] in, is the total number of training samples, that is, the number of historical frequency data; Characterization The historical estimated inertia corresponding to the historical frequency data, and Characterization The historical standard inertia (actual associated value) corresponding to the historical frequency data. The training purpose of this embodiment is to minimize the inertia variance .
[0116] Furthermore, the server can use the inertia variance as the dependent variable of the loss function constructed for the initial hybrid quantum circuit, and use multiple parameters in the initial hybrid quantum circuit as independent variables of the loss function, and use multiple parameters in the initial hybrid quantum circuit as independent variables of the loss function. At the same time, the values of multiple parameters in the initial hybrid quantum circuit are adjusted one by one, and the gradient of the loss function after each parameter value adjustment is calculated to determine whether the dependent variable of the loss function reaches the minimum value after each parameter value adjustment, that is, whether the training stop condition is reached. When it is determined that the dependent variable has reached the minimum value, the values of multiple parameters when the dependent variable of the loss function reaches the minimum value are used as the parameter adjustment results of the multiple parameters to obtain the target hybrid quantum circuit.
[0117] For example, after multiple trainings, Figure 4 As shown, a comparison chart of historical standard inertia and historical estimated inertia under different power shortage scenarios of the circuit system is provided. Among them, the dotted line represents the historical estimated inertia, the solid line represents the historical standard inertia, the vertical axis represents the inertia level (inertia value), and the horizontal axis represents the data set used for training. If there is a point (100, 3) on the solid line and a point (100, 2.9) on the dotted line, then the point (100, 3) on the solid line can represent the historical standard inertia of the 100th sample (100th historical frequency data) as 3, and the point (100, 2.9) on the dotted line can represent the historical estimated inertia of the 100th sample (100th historical frequency data) as 2.9.
[0118] For example, Figure 5 As shown, a schematic diagram of the relationship between the number of iterations and the dependent variable of the loss function during the training process of adjusting parameters is provided, where the horizontal axis is the number of iterations and the vertical axis is the dependent variable of the loss function. Figure 5 The convergence process of using the training process in this embodiment to estimate the inertia of the power system is demonstrated. Figure 5 The decreasing trend of the dependent variable of the loss function with the number of iterations is shown in logarithmic coordinates, verifying the optimization effect of the training process in this embodiment in the power system inertia estimation. Figure 5 In the example, the loss function decreases rapidly in the early iterations and then tends to be stable, which shows that the training process in this embodiment can effectively use the collected data for training and quickly converge to a stable estimation performance.
[0119] In this embodiment, the inertia difference between the historical standard inertia and the historical estimated inertia corresponding to each of the multiple historical frequency data is used as the dependent variable of the loss function, so that during the training process, it can be determined whether the parameters in the initial hybrid quantum circuit have been adjusted to the required state to obtain a target hybrid quantum circuit that can minimize the difference between the historical standard inertia and the historical estimated inertia.
[0120] In one embodiment, the initial hybrid quantum circuit includes: an initial neural network on the input side, an initial quantum variational circuit, and an initial neural network on the output side;
[0121] The values of multiple parameters in the initial hybrid quantum circuit are adjusted one by one, including:
[0122] The input side weight matrix and input side bias vector of the input side initial neural network, multiple circuit parameters of the initial quantum variational circuit, and the output side weight matrix and output side bias vector of the output side initial neural network are adjusted successively.
[0123] Optionally, before adjusting the parameters in the initial hybrid quantum circuit each time, the server can first analyze the direction of the next adjustment based on the gradient of the loss function calculated after the previous adjustment, and then adjust the input side weight matrix and input side bias vector of the input side initial neural network, multiple circuit parameters of the initial quantum variational circuit, and output side weight matrix and output side bias vector of the output side initial neural network according to the determined adjustment direction.
[0124] In this embodiment, the input side weight matrix and input side bias vector of the input side initial neural network, multiple circuit parameters of the initial quantum variational circuit, and the output side weight matrix and output side bias vector of the output side initial neural network can be continuously adjusted through a continuous iterative training process, so that finally a target hybrid quantum circuit that can accurately estimate the inertia level of the power system can be obtained.
[0125] In one embodiment, the multiple circuit parameters of the initial quantum variational circuit are adjusted one by one, including:
[0126] For each circuit parameter in the initial quantum variational circuit, the circuit parameter is adjusted based on a parameter movement rule;
[0127] After each adjustment of the targeted circuit parameter, the gradient of the targeted circuit parameter with respect to the loss function is calculated, and the targeted circuit parameter is adjusted for the next time based on the adjustment direction indicated by the gradient of the targeted circuit parameter with respect to the loss function.
[0128] Optionally, for each circuit parameter in the initial quantum variational circuit, the server can adjust the circuit parameter based on a parameter-shift rule, and after each adjustment of the circuit parameter, calculate the gradient of the circuit parameter with respect to the loss function, and then make the next adjustment to the circuit parameter based on the adjustment direction indicated by the gradient of the circuit parameter with respect to the loss function. That is, in this example, the circuit parameters in the initial quantum variational circuit can be gradually adjusted based on the parameter-shift rule to minimize the difference between the historical estimated inertia and the historical standard inertia.
[0129] For example, for each circuit parameter in the initial quantum variational circuit The server can calculate the circuit parameters through formula (6): Its gradient relative to the loss function, i.e., the circuit parameters The partial derivative of :
[0130] (6)
[0131] in, and Respectively represent the parameters Add and subtract respectively The measured expectation value of the initial quantum variational circuit when .
[0132] In this embodiment, based on the parameter movement rule, the characteristics of the quantum variational circuit can be effectively utilized to calculate the gradient of each circuit parameter in the quantum variational circuit with respect to the loss function, and then the circuit parameters are updated through the gradient descent method or other optimization algorithms to realize model training.
[0133] In a specific example, if Figure 6 As shown, another flow chart of power system inertia estimation is provided, which mainly includes the following steps:
[0134] Step 602, obtaining multiple historical frequency data of the initial hybrid quantum circuit and the power system in a power shortage scenario; the initial hybrid quantum circuit includes: an initial neural network on the input side, an initial quantum variational circuit, and an initial neural network on the output side;
[0135] Step 604, for each piece of historical frequency data, perform inertia estimation on the historical frequency data to obtain a historical standard inertia corresponding to the historical frequency data;
[0136] Step 606, based on the initial hybrid quantum circuit, perform inertia estimation on the historical frequency data to obtain the historical estimated inertia corresponding to the historical frequency data;
[0137] Step 608, counting the inertia differences between the historical standard inertia and the historical estimated inertia corresponding to each of the plurality of historical frequency data, to obtain the inertia variance;
[0138] Step 610, using the inertia variance as the dependent variable of the loss function constructed for the initial hybrid quantum circuit, and using multiple parameters in the initial hybrid quantum circuit as independent variables of the loss function;
[0139] Step 612, successively adjusting the input side weight matrix and the input side bias vector of the input side initial neural network;
[0140] Step 614, successively adjusting the output side weight matrix and the output side bias vector of the output side initial neural network;
[0141] Step 616, adjusting each circuit parameter in the initial quantum variational circuit based on a parameter movement rule;
[0142] Step 618, after each adjustment, calculating the gradient of the targeted circuit parameter with respect to the loss function, and making the next adjustment to the targeted circuit parameter based on the adjustment direction indicated by the gradient of the targeted circuit parameter with respect to the loss function;
[0143] Step 620, calculating the gradient of the loss function after each parameter value adjustment; the gradient is used to determine whether the dependent variable of the loss function reaches a minimum value;
[0144] Step 622, taking the values of multiple parameters when the dependent variable of the loss function reaches the minimum value as the parameter adjustment result of the multiple parameters, and obtaining the target hybrid quantum circuit; the target hybrid quantum circuit includes: an input-side target neural network, a target quantum variational circuit, and an output-side target neural network;
[0145] Step 624, based on the input-side target neural network, feature extraction is performed on the real-time frequency data of the power system to obtain frequency features that match the feature processing conditions of the target quantum variational circuit;
[0146] Step 626, for each frequency feature, prepare a quantum state of the frequency feature based on a quantum state preparation circuit in a target quantum variational circuit;
[0147] Step 628, based on the target quantum gate set in the target quantum variational circuit, measure the quantum state of the frequency characteristic, obtain the expected value of the frequency characteristic, collect the expected values, and generate an expected value vector;
[0148] Step 630 , performing inertia estimation on the expected value vector based on the output-side target neural network to obtain an estimated inertia value of the power system.
[0149] In this embodiment, a method for estimating the inertia of a power system based on a hybrid quantum circuit is proposed. Combining the advantages of traditional neural networks and quantum computing, it can effectively capture the dynamic characteristics of the power system through feature extraction and dimensionality reduction of the power system frequency data, as well as in-depth analysis of quantum variational circuits, and can achieve accurate, real-time, and efficient estimation of the inertia of the power system. It can provide more accurate system stability analysis under various power disturbance conditions, which has important practical significance and application value for improving the reliability and flexibility of the power system and optimizing the access and utilization of new energy. It not only provides technical support for the stability of the power system, but also expands the application of quantum computing in power system analysis and control, which has important practical value and broad application prospects.
[0150] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0151] Based on the same inventive concept, the embodiment of the present application also provides a power system inertia estimation device for implementing the power system inertia estimation method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more power system inertia estimation device embodiments provided below can refer to the limitations of the power system inertia estimation method above, and will not be repeated here.
[0152] In an exemplary embodiment, Figure 7 As shown, a power system inertia estimation device is provided, including: an acquisition module 702, a feature extraction module 704, a measurement module 706 and an inertia estimation module 708, wherein:
[0153] An acquisition module is used to acquire real-time frequency data of a target hybrid quantum circuit and a power system; the target hybrid quantum circuit comprises: an input-side target neural network, a target quantum variational circuit, and an output-side target neural network;
[0154] A feature extraction module, used to extract features from the real-time frequency data based on the input-side target neural network, and obtain frequency features that match the feature processing conditions of the target quantum variational circuit;
[0155] A measurement module, used to prepare the quantum state of the frequency characteristic through the target quantum variation circuit, measure the quantum state of the frequency characteristic, and obtain an expected value vector;
[0156] An inertia estimation module is used to perform inertia estimation on the expected value vector based on the output-side target neural network to obtain an inertia estimation value of the power system.
[0157] The above-mentioned power system inertia estimation device first obtains the real-time frequency data of the target hybrid quantum circuit and the power system, so that the power system inertia can be accurately and real-time determined based on the real-time frequency data and the target hybrid quantum circuit, wherein the target hybrid quantum circuit includes: an input-side target neural network, a target quantum variational circuit, and an output-side target neural network, that is, the target hybrid quantum circuit combines the advantages of the neural network and the quantum variational circuit, which is conducive to the subsequent efficient and accurate processing of real-time frequency data. Further, based on the input-side target neural network, the real-time frequency data is feature extracted to obtain the frequency characteristics that match the characteristic processing conditions of the target quantum variational circuit, and then the quantum state of the frequency characteristics is prepared through the target quantum variational circuit, and the quantum state of the frequency characteristics is measured to obtain the expected value vector, thereby based on the output-side target neural network, the expected value vector is estimated for inertia, and the estimated inertia value of the power system is obtained. In the whole process, the power system inertia can be accurately and real-time determined based on the real-time frequency data of the power system and the target hybrid quantum circuit, so that the power grid operator can take power system operation and maintenance measures accurately and timely based on the determined power system inertia to ensure the reliable operation of the power system.
[0158] In one embodiment, there are multiple frequency features; the measurement module is further used to: for each frequency feature, prepare the quantum state of the frequency feature based on the quantum state preparation circuit in the target quantum variational circuit; measure the quantum state of the frequency feature based on the target quantum gate set in the target quantum variational circuit to obtain the expected value of the frequency feature; and collect the expected values of the frequency features to generate an expected value vector.
[0159] In one of the embodiments, the power system inertia estimation device also includes a model training module, which is used to: obtain multiple historical frequency data of the initial hybrid quantum circuit and the power system in a power shortage scenario; for each historical frequency data, perform inertia estimation on the historical frequency data to obtain the historical standard inertia corresponding to the historical frequency data; based on the initial hybrid quantum circuit, perform inertia estimation on the historical frequency data to obtain the historical estimated inertia corresponding to the historical frequency data; according to the inertia difference between the historical standard inertia and the historical estimated inertia corresponding to each of the multiple historical frequency data, perform parameter adjustment on the initial hybrid quantum circuit to obtain the target hybrid quantum circuit.
[0160] In one of the embodiments, the model training module is also used to: count the inertia differences between the historical standard inertia and the historical estimated inertia corresponding to each of the multiple historical frequency data to obtain the inertia variance; use the inertia variance as the dependent variable of the loss function constructed for the initial hybrid quantum circuit, and use the multiple parameters in the initial hybrid quantum circuit as the independent variables of the loss function; successively adjust the values of the multiple parameters in the initial hybrid quantum circuit, and calculate the gradient of the loss function after each parameter value adjustment; the gradient is used to determine whether the dependent variable of the loss function reaches a minimum value; use the values of the multiple parameters when the dependent variable of the loss function reaches a minimum value as the parameter adjustment results of the multiple parameters to obtain the target hybrid quantum circuit.
[0161] In one embodiment, the initial hybrid quantum circuit includes: an input-side initial neural network, an initial quantum variational circuit, and an output-side initial neural network; the model training module is also used to: successively adjust the input-side weight matrix and input-side bias vector of the input-side initial neural network, multiple circuit parameters of the initial quantum variational circuit, and the output-side weight matrix and output-side bias vector of the output-side initial neural network.
[0162] In one of the embodiments, the model training module is also used to: for each circuit parameter in the initial quantum variational circuit, adjust the targeted circuit parameter based on the parameter movement rule; after each adjustment of the targeted circuit parameter, calculate the gradient of the targeted circuit parameter with respect to the loss function, and make the next adjustment to the targeted circuit parameter based on the adjustment direction indicated by the gradient of the targeted circuit parameter with respect to the loss function.
[0163] Each module in the above-mentioned power system inertia estimation device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0164] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store power system inertia estimation data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a power system inertia estimation method is implemented.
[0165] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0166] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of each embodiment of the above-mentioned power system inertia estimation method are implemented.
[0167] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of each embodiment of the above-mentioned power system inertia estimation method are implemented.
[0168] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of each embodiment of the above-mentioned power system inertia estimation method when executed by a processor.
[0169] It should be noted that the information (including but not limited to device information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0170] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0171] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0172] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for estimating inertia of a power system, characterized in that: The method comprises: Acquire real-time frequency data of a target hybrid quantum circuit and a power system; the target hybrid quantum circuit comprises: an input-side target neural network, a target quantum variational circuit, and an output-side target neural network; Based on the input-side target neural network, feature extraction is performed on the real-time frequency data to obtain frequency features that match feature processing conditions of the target quantum variational circuit; Preparing the quantum state of the frequency characteristic through the target quantum variation circuit, measuring the quantum state of the frequency characteristic, and obtaining an expected value vector; The inertia of the expected value vector is estimated based on the output-side target neural network to obtain an estimated inertia value of the power system.
2. The method according to claim 1, characterized in that The number of the frequency characteristics is multiple; the quantum state of the frequency characteristics is prepared by the target quantum variation circuit, and the quantum state of the frequency characteristics is measured to obtain the expected value vector, including: For each of the frequency characteristics, based on the quantum state preparation circuit in the target quantum variational circuit, prepare the quantum state of the frequency characteristic; Based on a target quantum gate set in the target quantum variational circuit, the quantum state of the frequency characteristic is measured to obtain an expected value of the frequency characteristic; The expected values of the frequency features are collected to generate an expected value vector.
3. The method according to claim 1, characterized in that The training process of the target hybrid quantum circuit includes: Acquire multiple historical frequency data of the initial hybrid quantum circuit and the power system in a power shortage scenario; For each piece of the historical frequency data, estimating the inertia of the historical frequency data to obtain the historical standard inertia corresponding to the historical frequency data; Based on the initial hybrid quantum circuit, performing inertia estimation on the historical frequency data to obtain a historical estimated inertia corresponding to the historical frequency data; According to the inertia difference between the historical standard inertia and the historical estimated inertia corresponding to each of the plurality of historical frequency data, the parameters of the initial hybrid quantum circuit are adjusted to obtain a target hybrid quantum circuit.
4. The method according to claim 3, characterized in that The step of adjusting the parameters of the initial hybrid quantum circuit according to the inertia difference between the historical standard inertia and the historical estimated inertia corresponding to each of the plurality of historical frequency data to obtain a target hybrid quantum circuit comprises: Counting the inertia differences between the historical standard inertia and the historical estimated inertia corresponding to each of the plurality of historical frequency data to obtain the inertia variance; Using the inertia variance as a dependent variable of a loss function constructed for the initial hybrid quantum circuit, and using a plurality of parameters in the initial hybrid quantum circuit as independent variables of the loss function; The values of multiple parameters in the initial hybrid quantum circuit are adjusted successively, and the gradient of the loss function is calculated after each parameter value adjustment; the gradient is used to determine whether the dependent variable of the loss function reaches a minimum value; The values of the multiple parameters when the dependent variable of the loss function reaches the minimum value are used as parameter adjustment results of the multiple parameters to obtain a target hybrid quantum circuit.
5. The method according to claim 4, characterized in that The initial hybrid quantum circuit comprises: an initial neural network on the input side, an initial quantum variational circuit, and an initial neural network on the output side; The step of successively adjusting the values of multiple parameters in the initial hybrid quantum circuit comprises: The input side weight matrix and the input side bias vector of the input side initial neural network, the multiple circuit parameters of the initial quantum variational circuit, and the output side weight matrix and the output side bias vector of the output side initial neural network are adjusted successively.
6. The method according to claim 5, characterized in that The multiple circuit parameters of the initial quantum variational circuit are adjusted successively, including: For each circuit parameter in the initial quantum variational circuit, adjusting the circuit parameter based on a parameter movement rule; After each adjustment of the targeted circuit parameter, the gradient of the targeted circuit parameter with respect to the loss function is calculated, and the targeted circuit parameter is adjusted for the next time based on the adjustment direction indicated by the gradient of the targeted circuit parameter with respect to the loss function.
7. A power system inertia estimation device, characterized in that: The device comprises: An acquisition module is used to acquire real-time frequency data of a target hybrid quantum circuit and a power system; the target hybrid quantum circuit comprises: an input-side target neural network, a target quantum variational circuit, and an output-side target neural network; A feature extraction module, used to extract features from the real-time frequency data based on the input-side target neural network, and obtain frequency features that match the feature processing conditions of the target quantum variational circuit; A measurement module, used to prepare the quantum state of the frequency characteristic through the target quantum variation circuit, measure the quantum state of the frequency characteristic, and obtain an expected value vector; An inertia estimation module is used to perform inertia estimation on the expected value vector based on the output-side target neural network to obtain an inertia estimation value of the power system.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
