Micro-grid carbon full life cycle operation and maintenance control method and system
By encoding multi-source uncertainties in microgrids using quantum heuristic solvers and constructing parallel risk hedging strategies, the problems of difficulty in quantifying carbon over-emission risks and optimizing hedging strategies in microgrid energy carbon operation and maintenance are solved, achieving efficient and accurate carbon emission risk management and cost minimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU YOUKE SMART ENERGY TECH CO LTD
- Filing Date
- 2026-03-25
- Publication Date
- 2026-07-10
AI Technical Summary
Existing industrial control systems cannot efficiently quantify carbon over-emission risks in the full life cycle operation and maintenance of microgrid carbon, and their hedging strategies are too simplistic, making it difficult to achieve precise control and optimal risk hedging.
A quantum-inspired solver is used to encode the multi-source uncertainties in microgrid operation into a superposition vector of qubits. The probability power flow distribution in the full state space is solved through parallel evolution. A risk hedging portfolio containing physical assets and financial instruments is constructed, the optimal hedging strategy is generated, and it is output to the physical execution layer for control.
It enables intelligent and refined management and control of the entire life cycle of microgrid carbon emissions, accurately assesses carbon emission-related risks, and controls carbon emissions within a predetermined range while minimizing management and control costs.
Smart Images

Figure CN122362933A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system management and control technology, and in particular to a method and system for the full life-cycle operation and maintenance control of microgrid energy carbon emissions. Background Technology
[0002] Industrial control systems are widely used in the operation and maintenance (O&M) of microgrids throughout their entire energy and carbon lifecycle. Their effectiveness directly impacts the energy utilization efficiency and carbon emission risk control level of the microgrid. Achieving precise O&M that coordinates energy and carbon emissions is a core requirement for this system in the microgrid field. Existing industrial control systems mostly employ traditional serial algorithms to handle the multi-source uncertainties in microgrid operation, relying solely on the scheduling of a single physical asset for carbon risk management. This approach has played a certain role in steady-state power operation scenarios. However, with the increasing demands for energy and carbon control under dual-carbon objectives, its application to the entire lifecycle O&M of microgrids has revealed significant limitations. It cannot efficiently quantify carbon over-emission risks, and its hedging methods are simplistic, resulting in a lack of scientific management strategies and failing to meet the needs of precise energy and carbon control and optimal risk hedging in microgrids. Summary of the Invention
[0003] This application provides a method and system for the full life-cycle operation and maintenance control of microgrid energy carbon, which solves the technical problems of difficulty in accurately quantifying carbon over-emission risk and optimally configuring hedging strategies due to multi-source uncertainties in the operation and maintenance of microgrid energy carbon.
[0004] The first aspect of this application provides a method for the full life-cycle operation and maintenance control of carbon emissions in microgrids. The method includes: a carbon over-emission event calculation module, used to encode multi-source uncertainties in microgrid operation into a superposition vector of qubits, perform parallel evolution of the superposition vector using a quantum heuristic solver, solve the probability power flow distribution in the full state space in one go, and calculate the conditional value of risk and over-emission probability of carbon over-emission events; an optimal hedging strategy acquisition module, based on the conditional value of risk and over-emission probability, constructing a risk hedging portfolio including physical assets and financial instruments, aiming to minimize hedging costs, and constraining carbon risk exposure within a preset threshold, solving the configuration strategy of the portfolio to generate an optimal hedging strategy; and a physical execution layer control module, used to output the optimal hedging strategy to the physical execution layer for control.
[0005] The second aspect of this application provides a full life-cycle operation and maintenance control system for microgrid carbon emissions. The system includes: a carbon over-emission event calculation module, used to encode multi-source uncertainties in microgrid operation into a superposition vector of qubits, perform parallel evolution of the superposition vector using a quantum heuristic solver, solve the probability power flow distribution in the full state space in one go, and calculate the conditional value of risk and over-emission probability of carbon over-emission events; an optimal hedging strategy acquisition module, based on the conditional value of risk and over-emission probability, constructing a risk hedging portfolio including physical assets and financial instruments, aiming to minimize hedging costs, and constraining carbon risk exposure within a preset threshold, solving for the configuration strategy of the portfolio to generate an optimal hedging strategy; and a physical execution layer control module, used to output the optimal hedging strategy to the physical execution layer for control.
[0006] One or more technical solutions provided in this application have at least the following technical effects or advantages: This application quantizes and encodes the multi-source uncertainties in microgrid operation, uses a quantum-inspired solver to solve the full-state-space probability power flow distribution and quantifies carbon over-emission risks through parallel evolution. It then constructs a risk hedging portfolio integrating physical assets and financial instruments, generating an optimal hedging strategy with the goal of minimizing carbon risk constraints and hedging costs, and implementing it at the physical execution layer. Furthermore, it combines historical risk events to build a classifier for identifying new risk patterns and adapting strategies, thereby comprehensively and accurately managing microgrid carbon over-emission risks and achieving optimal hedging cost allocation. This enables intelligent, refined, and efficient management of microgrid carbon lifecycle operation and maintenance, effectively handling multi-source uncertainties in microgrid operation and maintenance and accurately assessing carbon emission-related risks, minimizing management costs while keeping carbon emission-related risks within a predetermined range. Attached Figure Description
[0007] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0008] Figure 1 This is a flowchart illustrating the microgrid energy carbon full life cycle operation and maintenance control method provided in the embodiments of this application.
[0009] Figure 2 This is a schematic diagram of the microgrid energy carbon full life cycle operation and maintenance control system provided in the embodiments of this application.
[0010] Figure labeling: Carbon over-emission event calculation module 1, optimal hedging strategy acquisition module 2, physical execution layer control module 3. Detailed Implementation
[0011] This application provides a method and system for the full life-cycle operation and maintenance control of microgrid energy carbon, which solves the technical problems of difficulty in accurately quantifying carbon over-emission risk and optimally configuring hedging strategies due to multi-source uncertainties in the operation and maintenance of microgrid energy carbon.
[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0013] It should be noted that the terms "first," "second," etc., in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or devices.
[0014] Example 1, as Figure 1 As shown, a full life-cycle operation and maintenance control method for microgrid energy carbon emissions is described, wherein the method includes: The multi-source uncertainties in microgrid operation are encoded as superposition vectors of qubits. The superposition vectors are then evolved in parallel using a quantum heuristic solver to solve the probability power flow distribution in the entire state space in one go, and to calculate the conditional risk value and the probability of carbon over-emission events.
[0015] In this embodiment, a qubit is the smallest basic unit carrying information in a quantum computing system, that is, a numerical complex data structure that simulates the characteristics of quantum states on a computer. A quantum heuristic solver is a dedicated algorithm program and computing tool designed based on the core characteristics of quantum superposition and parallel evolution, capable of efficiently handling high-dimensional complex optimization and probabilistic computation problems.
[0016] Specifically, firstly, the uncertainties arising from multiple sources of power output, such as photovoltaic and wind power output, in the operation of the microgrid are collected, and their value ranges are discretized and mapped to quantum ground states and amplitude encoding to construct a superposition vector of qubits. Next, this superposition vector is input into a quantum heuristic solver. By encoding the microgrid node admittance matrix and carbon flow correlation matrix into quantum gate sequences and using a tensor network shrinking algorithm for parallel computation, the probabilistic power flow distribution in the entire state space is output in one go. Then, based on the defined carbon over-emission events, the carbon emissions of the over-emission state are extracted from the probabilistic power flow distribution and sorted to calculate the cumulative probability distribution, thereby obtaining the conditional risk value and over-emission probability of the carbon over-emission event. The corresponding steps will be explained in detail later.
[0017] Based on the conditional value at risk and the probability of over-emission, a risk hedging portfolio consisting of physical assets and financial instruments is constructed. With the goal of minimizing hedging costs and the condition of confining carbon risk exposure within a preset threshold, the allocation strategy of the portfolio is solved to generate the optimal hedging strategy.
[0018] Optionally, based on the conditional value of risk and probability of carbon over-emission, a risk hedging portfolio integrating physical assets and financial instruments is formed by constructing energy storage scheduling units, flexible load units, and carbon trading units. Then, with the objective of minimizing hedging costs and the constraint that carbon risk exposure does not exceed a preset threshold, the portfolio configuration parameters are encoded into a quantum bit string, and a corresponding loss function is constructed. The optimal hedging strategy is obtained through iterative solving using a variable quantum eigenvalue solver. These steps will be explained in detail later.
[0019] The optimal hedging strategy is output to the physical execution layer for control.
[0020] In one embodiment of this application, the optimal hedging strategy obtained from the aforementioned steps is output to the physical execution layer for execution control. The physical execution layer is a collection of hardware devices and execution systems within the microgrid that can directly receive scheduling commands and execute corresponding operations. Specifically, it includes energy storage converters, load switches, user-side demand response terminals, and carbon trading market execution terminals within the microgrid. The optimal hedging strategy is broken down according to the executing entity and time segment. Energy storage charging and discharging power control commands and interruptible load shedding control commands are sent to the corresponding energy storage converters and load switches for execution via the communication bus of the microgrid energy management system. Carbon futures and carbon options trading commands are sent to the trading execution terminal through the standardized data interface of the carbon trading market to complete the order placement operation, thus achieving end-to-end implementation of the optimal hedging strategy.
[0021] Furthermore, the method provided in this application embodiment includes: Historical data is collected to construct an uncertainty parameter set for photovoltaic power output, wind power output, load demand, real-time electricity price, and carbon quota price; the possible value ranges of each uncertainty parameter set are discretized into a finite number of states, which are then combined and mapped to each quantum ground state; and each quantum ground state is assigned a complex probability amplitude through amplitude encoding to construct a superposition state vector.
[0022] In this embodiment of the application, the quantum ground state is the basic unit that characterizes the deterministic state of a qubit in quantum computing. In other words, it is the binary numerical unit used to characterize the discrete state of various parameters of a microgrid when a computer simulates quantum operations.
[0023] Specifically, the process begins by collecting historical time-series data on the microgrid's local operation and external markets. Using a power system-wide SCADA system and energy management system, nearly 12 months of data on photovoltaic (PV) output, wind power output, load demand, and real-time electricity prices are collected. Simultaneously, historical carbon quota price data for the corresponding time range is collected from the national carbon trading market's public database. Data collection covers the entire four-season cycle, weekdays and weekends, and four typical operating conditions: full PV power generation, full wind power generation, peak electricity consumption, and off-peak electricity consumption. All data uses a fixed 15-minute sampling step size matched to the microgrid's day-ahead dispatch cycle to ensure data consistency. For the collected raw data, the mean and standard deviation of each data series are calculated using the 3σ criterion. Outliers exceeding three times the standard deviation of the mean are removed. Linear interpolation is then used to fill in missing values in the data series for periods with no more than three consecutive missing sampling points. For periods with more than three consecutive missing sampling points, historical mean values for the same type of operating condition during the same period are used to fill in the missing values, ensuring the integrity of the data series. Next, for the five types of data that have been cleaned, the probability distribution function of each type of parameter is fitted by the kernel density estimation method. The kernel function is Gaussian kernel function, and the bandwidth is automatically determined by Scott rule. The upper and lower limits of the values and probability distribution characteristics of each type of parameter are clearly defined, and finally a standardized multi-source uncertainty parameter set is constructed.
[0024] For the constructed sets of multiple uncertain parameters, an equal-probability discretization method is adopted to divide the probability distribution function of each type of uncertain parameter into intervals. The number of discrete intervals can be adjusted according to the computational accuracy and complexity. For example, it can be reduced to 3 intervals in real-time control scenarios and increased to 7 intervals in offline optimization scenarios. For example, the continuous value interval of a single type of parameter is divided into 5 discrete intervals with equal probability. This number of intervals matches the conventional accuracy requirements of day-ahead dispatching of microgrids and can cover more than 95% of the fluctuation range of a single type of parameter, while taking into account the computational accuracy and computational load of subsequent quantum operations. The extreme values of a single type of parameter that exceed the upper and lower limits of the fitted distribution are respectively assigned to the first and last discrete intervals. If a single type of parameter exhibits multi-peak distribution characteristics, the quantile discretization method is used to ensure that the number of samples in each discrete interval is uniform. Subsequently, using the binary encoding method commonly used in quantum computing, each discrete interval of a single parameter is mapped to a set of fixed-length binary quantum ground states. Five discrete intervals correspond to three-bit binary codes, and these three bits can cover eight states, perfectly matching the encoding requirements of the five discrete intervals and achieving a one-to-one correspondence between the discrete states of a single parameter and the quantum ground state. Next, using the tensor product operation method fundamental to quantum computing, the three-bit quantum ground states corresponding to the five types of uncertain parameters are combined in a fixed order to obtain 15-bit composite quantum ground states. Each composite quantum ground state uniquely corresponds to a set of discrete values of the five types of uncertain parameters, thus completing the complete mapping from all parameter discrete states to quantum ground states.
[0025] For all mapped composite quantum ground states, an amplitude encoding method commonly used in quantum computing is employed to assign a corresponding complex probability amplitude to each composite quantum ground state. Specifically: First, the joint probability of the parameter value combinations corresponding to each composite quantum ground state is calculated using probabilistic statistical methods. The marginal probabilities of individual parameters within their corresponding discrete intervals are calculated first, then the Pearson correlation coefficients between each pair of the five types of parameters are calculated, constructing a correlation coefficient matrix. The joint probability under the independence assumption, i.e., the product of the marginal probabilities of each individual parameter, is multiplied by a correlation coefficient correction factor. The correction factor is a normalized value of the absolute value of the correlation coefficient of the corresponding parameter combination, thereby correcting the influence of the coupling characteristics between parameters on the joint probability and ensuring the accuracy of the probability calculation.
[0026] Subsequently, the magnitude of the complex probability amplitude is set to the square root of the joint occurrence probability of the corresponding composite quantum ground state, so that the square of the magnitude of the complex probability amplitude directly corresponds to the actual occurrence probability of the set of parameter states. At the same time, a linear phase encoding method is used to set the phase value of the complex probability amplitude. The phase value is determined by a linear mapping rule, specifically, the phase value is equal to pi. The product of the correlation coefficient and the Pearson correlation coefficient, which is the parameter combination corresponding to the composite quantum ground state and the parameter combination of the reference state, is used to encode the interference information between different states.
[0027] After assigning complex probability amplitudes to all composite quantum ground states, a linear superposition of all composite quantum ground states is performed. Then, a quantum state normalization method is applied to calculate the sum of squared moduli of all complex probability amplitudes. The square root of this sum is used as a normalization factor, and each complex probability amplitude is divided by this normalization factor to ensure that the sum of squared moduli of all elements in the final superposition vector is 1, with the normalization error controlled within 1e-6. After normalization, a quantum bit superposition vector conforming to quantum operation rules is finally constructed, where each element of the superposition vector corresponds one-to-one with a set of complex probability amplitudes of composite quantum ground states.
[0028] By standardizing time-series data, performing equal-probability discretization mapping, and using standard quantum amplitude encoding methods, the multi-dimensional uncertainties in microgrid operation are completely and accurately transformed into standardized qubit superposition state vectors that can be directly processed by quantum heuristic solvers. This provides compliant and accurate computational input for subsequent parallel probabilistic power flow calculations and carbon risk quantification in the full state space.
[0029] Furthermore, the method provided in this application embodiment includes: The square of the modulus of the complex probability amplitude represents the probability of occurrence of the state combination, and the phase encodes the interference information between states.
[0030] Optionally, the square of the modulus of the complex probability amplitude directly represents the probability of occurrence of the combination of multi-source uncertain parameter states of the microgrid corresponding to the quantum ground state to which the complex probability amplitude belongs. This probability of occurrence is completely consistent with the joint probability of occurrence of the corresponding parameter state combination calculated in the above steps. The sum of the squares of the modulus of the complex probability amplitudes corresponding to all quantum ground states is 1, which conforms to the normalization rule of probability statistics.
[0031] The phase of the complex probability amplitude is used to encode the interference information between the state combinations of multi-source uncertainty parameters of the microgrid corresponding to different quantum ground states. The phase difference directly determines the coherent superposition or cancellation effect of different state combinations in the subsequent parallel operation of the quantum heuristic solver, thereby characterizing the coupling correlation characteristics between multi-source uncertainty parameters and supporting synchronous parallel solution of the entire state space.
[0032] Furthermore, the method provided in this application embodiment includes: The node admittance matrix and carbon flow correlation matrix of the microgrid are constructed and encoded as a quantum gate operation sequence to establish the computational basis of the quantum heuristic solver. The superposition state vector is input into the quantum heuristic solver, and the power flow calculation of all states is performed in parallel through the tensor network shrinking algorithm. During one evolution process, the node voltage magnitude, branch power distribution and node carbon intensity of each state are solved simultaneously, and the probabilistic power flow distribution in the full state space is output, with the dimension being the number of states multiplied by the number of nodes multiplied by the number of time sections.
[0033] Specifically, the quantum heuristic solver is implemented based on Qiskit, a general-purpose quantum simulation framework that can run on classical computers. It is adapted to the conventional computing power requirements of day-ahead scheduling of microgrids and can complete the calculation without dedicated quantum hardware. The scheduling cycle adopts the 24-hour day-ahead scheduling cycle commonly used in the power industry by default, corresponding to 96 time segments with 15-minute intervals. First, the node admittance matrix of the microgrid is constructed using the nodal analysis method of power flow calculation. Specifically, the target microgrid is first divided and numbered into nodes. The photovoltaic grid-connected nodes, wind power grid-connected nodes, load nodes, and grid-connected points in the microgrid are numbered from 1 to N, where N is the total number of nodes in the microgrid. Then, based on the impedance parameters of each branch in the microgrid, the self-admittance of each node and the mutual admittance between nodes are calculated. The self-admittance is the sum of the admittances of all branches connected to the corresponding node, and the mutual admittance is the negative value of the branch admittance between two connected nodes. For the load and power output prediction values of each time segment, the node admittance matrix corresponding to the time segment is constructed. Finally, 96 sets of node admittance matrices with a dimension of N×N matching the number of time segments are obtained.
[0034] A carbon flow correlation matrix is constructed by simultaneously employing the branch carbon flow allocation method for calculating carbon flow in the power system. Specifically, the carbon intensity per unit output of each power node is determined based on the measured carbon emission factors of each distributed power source in the microgrid and the real-time carbon emission factors of the upper-level power grid. Then, the carbon flow allocation coefficient of each branch is calculated based on the power flow direction of the branch. The carbon flow allocation coefficient is positively correlated with the transmission ratio of active power in the branch. Corresponding to the power distribution characteristics of each time segment, carbon flow correlation matrices are constructed for each time segment. Finally, 96 sets of N×N carbon flow correlation matrices with the same dimension as the node admittance matrix are obtained. Each element in the matrix corresponds one-to-one with the carbon flow transmission characteristics of the microgrid branch.
[0035] Next, an amplitude-phase separation encoding method is used to encode the nodal admittance matrix and carbon flow correlation matrix corresponding to each time segment into a quantum gate operation sequence, establishing the computational basis of the quantum heuristic solver. This solver uses two types of quantum registers: a 15-bit uncertain state quantum register, used to load the quantum bit superposition state vector of the corresponding time segment constructed in the previous steps; and an N-bit nodal state quantum register, used to map the electrical state and carbon intensity characteristics of each node in the microgrid. The two types of registers adopt a control-target coupling mode, with the bits of the uncertain state quantum register serving as the control bits of the quantum gate, and the bits of the nodal state quantum register serving as the target bits of the quantum gate, thereby achieving full-state parallel control of the power flow calculation results by the uncertain parameters. The specific steps are as follows: Step a: Take the absolute value of the largest element in a single set of nodal admittance matrices as the amplitude normalization reference value, and linearly map each element in the nodal admittance matrix to the rotation angle of the RY rotating gate. The value of π is pi. With matrix elements Half of the product of the ratios of the amplitude normalized reference values, i.e. ,in Let represent the RY rotation angle corresponding to the element in the i-th row and j-th column of the node admittance matrix. The element value in the i-th row and j-th column of the microgrid node admittance matrix is used to encode the physical topology and power flow characteristics of the microgrid through the RY rotating gate.
[0036] Step b: Take the absolute value of the largest element in the carbon flow correlation matrix of the same group as the phase normalization reference value, and linearly map each element in the carbon flow correlation matrix to the phase value of the controlled phase gate. The value of π is pi. With matrix elements Divide by the product of the ratios of the phase-normalized reference values, ,in It is the controlled phase gate phase value corresponding to the element in the i-th row and j-th column of the carbon flow correlation matrix. It is the element value in the i-th row and j-th column of the microgrid carbon flow correlation matrix, which is used to encode the carbon flow distribution characteristics of the microgrid through controlled phase gates.
[0037] Step c: Following the order of node numbers from smallest to largest, first perform an RY rotation gate operation with the corresponding self-admittance as the control bit of the uncertain state quantum register for each node's corresponding node-state qubit. Then, for each group of connected nodes' corresponding node-state qubits, perform an RY rotation gate operation with the corresponding mutual admittance as the control bit of the uncertain state quantum register and a controlled phase gate operation with the corresponding carbon flow distribution coefficient, forming a fixed sequence of quantum gate operations. This completes the construction of the quantum heuristic solver computational basis for a single time segment, and sequentially completes the construction of the computational basis for 96 time segments.
[0038] Next, the normalized qubit superposition state vectors for each time segment are sequentially input into the quantum heuristic solver that completes the computational basis construction for the corresponding time segment through the state initialization function of the quantum simulation framework. The superposition state vectors are then fully loaded into the 15-bit uncertain state quantum register for the corresponding time segment. A matrix multiplication state shrinking algorithm is used to perform parallel evolution calculations on the quantum circuits formed by the quantum gate operation sequences and the input superposition states for each time segment. First, each quantum gate in the quantum circuit is mapped to a third-order tensor, with the three indices corresponding to the input qubit index, the output qubit index, and the uncertain state dimension index, respectively. Then, the input superposition state vector is mapped to a second-order tensor, with the two indices corresponding to the uncertain state dimension index and the qubit initial state index, respectively.
[0039] Next, following the execution order of the quantum gate operation sequence, adjacent tensors are merging operations sequentially from left to right. During merging, the input-output indices with matching dimensions in the two tensors are merged and summed, retaining the uncertainty state dimension index and the node state qubit index as open indices. The key dimension used in the merging process is set according to the microgrid node scale. When the total number of nodes N in the microgrid does not exceed 20, the key dimension is 64; when N exceeds 20, the key dimension is 128. The truncation error of the merging process is controlled within 1e-5. When the merging operation of the tensors corresponding to all quantum gates in the quantum circuit is completed, and only the two types of open indices corresponding to uncertainty states and node states remain, it is determined that a complete evolution process is completed. The entire merging process synchronously covers all parameter combinations in the full state space contained in the superposition state vector, without the need for separate serial calculations for each parameter state.
[0040] After completing the tensor shrinking evolution of a single time segment, the quantum state results after the full state space evolution of that time segment are obtained. Using the Pauli Z-basis measurement method from the field of quantum computing, quantum state measurements are performed on each qubit of the node-state quantum register. The number of measurement samples is fixed at 1024, thus obtaining the expected value of the Pauli Z operator corresponding to each qubit. The statistical error of the measurement results is controlled within 1e-4, matching the general accuracy requirements of power system power flow calculation. Using a linear mapping formula corresponding to the aforementioned encoding rule, the measured expected value of the Pauli Z operator is converted into the node voltage amplitude in the corresponding state. The specific conversion formula is as follows: Where U is the node voltage amplitude, This is the rated voltage of the microgrid node. The expected value of the Pauli Z operator is used to obtain the voltage amplitude of each node corresponding to each state in the full state space. Based on the node voltage amplitude and the node admittance matrix of the corresponding time segment, the branch power calculation formula is used to calculate the power distribution of each branch in the corresponding state. Then, combined with the carbon flow correlation matrix of the corresponding time segment and the branch power distribution, the carbon intensity of each node in the corresponding state is calculated. After completing the evolution, measurement and physical quantity conversion of 96 time segments in sequence, all calculation results are sorted in the order of uncertain state, microgrid node, and time segment. The output dimension is the full state space probabilistic power flow distribution multiplied by the number of states, the number of nodes, and the number of time segments. The number of states is the total number of combinations of multi-source uncertain parameters after discretization in the aforementioned step of constructing superposition state vectors, the number of nodes is the total number of nodes in the microgrid, and the number of time segments is the 96 15-minute interval time segments corresponding to the day-ahead scheduling cycle of the microgrid.
[0041] Finally, the output full-state space probabilistic power flow distribution is verified for compliance. There are three verification criteria: the first is that the deviation of the node voltage amplitude does not exceed ±5% of the rated voltage of the corresponding node, which meets the general requirements for safe operation of the power system; the second is that the relative error between the branch power calculation result and the classical power flow calculation result during the same period does not exceed 3%; and the third is that the normalization error of the probability distribution in the full-state space does not exceed 1e-3. The above verification criteria can be adjusted by those skilled in the art according to actual needs. The probabilistic power flow distribution that passes all three verifications is judged as a qualified result and can be used for subsequent quantitative calculation of carbon over-emission risk.
[0042] By constructing a dual-register coupled computational basis deeply bound to the multi-time-section scheduling characteristics of microgrids, and a parallel evolution process of tensor network condensation with clearly defined parameters and execution rules, the full-scenario power flow and carbon flow calculations under multi-source uncertainties in microgrids are merged into a single quantum evolution process. Compared with the traditional probabilistic power flow calculation method based on Monte Carlo sampling, which requires independent simulation calculations for each uncertain state, this step, through a quantum-inspired parallel evolution mechanism, simultaneously completes the power flow and carbon flow calculations in the full state space during a single tensor network condensation process, realizing multi-state parallel solution.
[0043] Furthermore, the method provided in this application embodiment includes: A carbon over-emission event is defined as a set of over-emission states in which the cumulative carbon emissions of a microgrid exceed its carbon allowance holdings within a preset time window. Based on the set of over-emission states, the carbon emissions corresponding to each state are extracted from the probability power flow distribution, and the states are arranged in descending order of carbon over-emission amount to calculate the cumulative probability distribution. Based on the cumulative probability distribution, the over-emission amount when the cumulative probability reaches a preset confidence level is taken as the conditional risk value, and the probabilities of states with over-emission amounts greater than zero are summed to obtain the over-emission probability.
[0044] Specifically, the time-series cumulative rules commonly used in the power industry for carbon emission accounting are first adopted to determine the preset time window for microgrid carbon emission accounting. This time window adopts the 24-hour cycle commonly used in the day-ahead dispatching of the power industry, which is consistent with the microgrid dispatching cycle. The carbon intensity and corresponding output data of microgrid nodes at all time sections within this time window are statistically analyzed. The cumulative carbon emissions of the microgrid over the entire cycle under each uncertain parameter state are calculated. At the same time, the carbon quota holding amount approved by the ecological and environmental authorities for the microgrid within this time window is determined. Uncertain parameter states in which the cumulative carbon emissions exceed the carbon quota holding amount are defined as carbon over-emission states. All carbon over-emission states that meet this definition together form the state set corresponding to the carbon over-emission event.
[0045] Next, based on the determined set of over-emission states, the cumulative carbon emissions and the probability of occurrence of each state are extracted from the probabilistic power flow distribution in the full state space output in the preceding steps. The carbon emissions are derived from the calculated results of the node carbon intensity and branch power distribution corresponding to each state in the probabilistic power flow distribution, and obtained through cross-sectional integration over time. Then, the over-emission amount corresponding to each over-emission state is calculated. The over-emission amount is the difference between the cumulative carbon emissions and the carbon allowance holding for that state. Using a descending order method, all over-emission states are arranged in descending order of over-emission amount. Based on the sorted over-emission state sequence, the probability of occurrence of each state is accumulated sequentially to calculate the cumulative probability distribution of the over-emission states.
[0046] Subsequently, a confidence level for carbon risk assessment is pre-set, using the 95% standard value commonly used in the field of power carbon management. Based on the calculated cumulative probability distribution of over-emission states, the over-emission state corresponding to the cumulative probability reaching the pre-set confidence level is located. The over-emission amount corresponding to this state is taken as the conditional risk value of carbon over-emission events in this assessment. At the same time, all uncertain parameter states in the full state space are traversed, and the occurrence probabilities corresponding to all states with over-emission amounts greater than zero are summed to calculate the over-emission probability of the microgrid within this time window.
[0047] Furthermore, the method provided in this application embodiment includes: Identify energy storage devices within the microgrid that can participate in dispatch, extract their state of charge, charge / discharge efficiency, and cycle life parameters, and construct an energy storage dispatch unit; identify interruptible load devices, extract their interruptible capacity, interruption duration limits, and compensation unit prices, and construct a flexible load unit; establish an interface with the carbon trading market, obtain the contract specifications, price series, and transaction fees of carbon quota futures, and construct a carbon trading unit; encode the energy storage dispatch unit, the flexible load unit, and the carbon trading unit into the risk hedging portfolio.
[0048] Specifically, the process begins by reading the equipment ledger of the microgrid energy management system to identify all electrochemical energy storage devices within the microgrid that can participate in day-ahead dispatch. Through the real-time data acquisition channel of the energy storage converter, the system extracts parameters for each energy storage device, including real-time state of charge, rated charge / discharge power, charge / discharge efficiency, maximum cycle life, and current number of cycles, thus constructing a basic parameter library for each device. Next, based on the state-space modeling method for power system energy storage dispatch, state variables and constraint variables are defined for the energy storage dispatch unit. State variables include the energy storage state of charge and charge / discharge power at each time point. Constraint variables include upper and lower limits for state of charge (set to 20% to 80% of rated capacity), upper and lower limits for charge / discharge power (not exceeding rated charge / discharge power), single charge / discharge duration (not less than 15 minutes), and cycle life constraint (no more than 2 charge / discharge cycles per day). Based on charge and discharge efficiency parameters, a time-series recursive formula for the state of charge of energy storage is constructed, the correlation between the states of charge of adjacent time sections is clarified, the standardized construction of the energy storage scheduling unit is completed, and a cost interface for the energy storage scheduling unit is established. The cost items include the energy storage cycle life loss cost, and the unit charge and discharge cost is calculated according to the life loss corresponding to a single charge and discharge.
[0049] Next, the interruptible load ledger screening method of power demand-side management is adopted to identify industrial and commercial interruptible load equipment within the microgrid that have signed interruptible load agreements. The rated interruptible capacity, maximum continuous interruption duration, maximum number of interruptions per day, minimum interruption interval duration, and interruption compensation unit price parameters for each type of interruptible load are extracted through the user-side energy management system to construct a basic parameter library for interruptible loads. Based on the demand response interruptible load modeling method, interruptible rules, recovery rules, and compensation models for flexible load units are defined. The interruptible rules stipulate that the single interruption capacity of an interruptible load should not be less than 10% of the rated capacity and should not exceed the rated interruptible capacity; the single interruption duration should not be less than 15 minutes and should not exceed the maximum continuous interruption duration; and the number of interruptions per day should not exceed the maximum number agreed upon in the agreement. The recovery rules stipulate that after the load interruption ends, it must be restored to the operating power before the interruption in one go, and the interval between two interruptions should not be less than the minimum interruption interval duration to avoid damage to equipment caused by frequent start-stop operations. The compensation model adopts a capacity compensation method. The interruption compensation cost is the product of the actual interruption capacity, interruption duration and compensation unit price. This is used to construct the cost interface of the flexible load unit. At the same time, the state variables of the flexible load unit are defined as the load shedding capacity of each time segment, and the constraint variables are the boundary conditions of interruption capacity, interruption duration and interruption interval, thus completing the standardized construction of the flexible load unit.
[0050] Then, using the RESTful interface communication method of financial market data interfaces, a standardized data interface is established with the national carbon trading market's public data platform to obtain in real time the specifications of the main carbon quota futures contract, historical and real-time price sequences, single transaction fee rates, margin ratios, and daily price limits, thus constructing a basic parameter library for carbon trading. Based on the carbon market trading futures trading modeling method, the contract parameters, trading time, fee rules, and position boundaries of the carbon trading unit are defined. The contract parameters are explicitly defined as the main carbon quota futures contract listed on the national carbon trading market, with the contract unit being one ton of carbon dioxide equivalent. The trading time matches the microgrid's day-ahead dispatch cycle, and opening and closing operations are only completed within the trading session of the trading day preceding the dispatch date, without intraday high-frequency trading. The fee rules are that both opening and closing positions are calculated by multiplying the transaction amount by a fixed fee rate, with no additional slippage costs. The position boundaries include upper and lower limits on the position size, with the absolute value of the position not exceeding twice the expected carbon emissions within the microgrid dispatch cycle, and the margin requirement not exceeding the microgrid's preset carbon trading fund limit. Simultaneously, an interface for the cost and revenue of the carbon trading unit is constructed. The revenue is the price difference between closing and opening futures contracts, while the cost includes transaction fees and the capital cost of margin, thus completing the standardized construction of the carbon trading unit.
[0051] Finally, the state variables of the energy storage dispatch unit, flexible load unit, and carbon trading unit are uniformly mapped to decision vectors with the same time-series dimension, which perfectly matches the 96 15-minute time segments of the microgrid's day-ahead dispatch. The decision variable for the energy storage dispatch unit is the charging and discharging power at each time segment, with charging power being positive and discharging power negative. The decision variable for the flexible load unit is the load shedding capacity at each time segment. The decision variable for the carbon trading unit is the opening and closing volume of carbon futures contracts on the trading day before the dispatch date. These three types of decision variables are concatenated in a fixed order to form a dimension-matched standardized risk hedging portfolio decision vector. Simultaneously, the constraint variables of the three types of units are uniformly integrated into the portfolio's constraint set, and the cost and revenue interfaces of the three types of units are uniformly integrated into the portfolio's total cost calculation model. This achieves the standardized integration of physical assets and financial instruments, completing the final construction of the risk hedging portfolio. The conditional risk value and probability of carbon over-emission are mapped to the portfolio's risk exposure factor and tail risk factor, respectively, serving as the core constraint input for subsequent hedging strategy optimization.
[0052] The standardized modeling method was used to complete the construction of energy storage scheduling unit, flexible load unit and carbon trading unit. The three types of units were uniformly mapped into standardized decision vectors with time matching. This enabled the standardized construction of risk hedging portfolio that integrates microgrid physical assets and carbon market financial instruments. This provides a clear and complete decision variable basis for the subsequent quantitative hedging of carbon over-emission risk and the solution of optimal strategies.
[0053] Furthermore, the method provided in this application embodiment includes: Based on the aforementioned risk hedging portfolio, the energy storage charging and discharging power sequence, interruptible load shedding sequence, carbon futures open interest, and carbon option open interest are encoded into a quantum bit string; an objective function is constructed as a weighted sum of hedging costs, and the carbon risk exposure constraint is encoded as a penalty term, constructing a loss function for a quantum heuristic optimizer; based on the loss function, the quantum bit string is iteratively updated through a variable quantum eigenvalue solver, and the optimal hedging strategy is output upon convergence.
[0054] In one embodiment, the entire optimal hedging strategy solution process is implemented based on Qiskit, a general-purpose quantum simulation framework that can run on classical computers. This eliminates the need for dedicated quantum hardware and adapts to the conventional computing power requirements of microgrid day-ahead scheduling. First, based on the risk hedging portfolio constructed in the preceding steps, the set of decision variables to be encoded is determined. Specifically, this includes the energy storage charging and discharging power sequence, the interruptible load shedding sequence, and the carbon futures and carbon option open interest for the trading day prior to the scheduling period (96 15-minute time segments). Next, a fixed-length binary encoding method is used to standardize the encoding of each decision variable. Each decision variable uniformly uses an 8-bit unsigned binary code, with the encoding range fully covering the upper and lower limits of the corresponding decision variable's constraints. The encoded value of the energy storage charging and discharging power is linearly mapped to the range of -100% to 100% of the rated charging and discharging power, with negative values representing discharging and positive values representing charging. The encoded value of the interruptible load shedding capacity is linearly mapped to the range from 0 to the rated interruptible capacity. The encoded values of the carbon futures and carbon option open interest are linearly mapped to the range from the minimum to the maximum value of the open interest boundary constraints. All binary code segments corresponding to decision variables are spliced together in a fixed order, namely, energy storage charging and discharging power sequence, interruptible load shedding sequence, carbon futures open interest, and carbon option open interest, to form a complete quantum bit string. Each binary code segment of the bit string forms a unique one-to-one mapping relationship with the corresponding physical quantity and financial quantity, thus completing the encoding conversion from decision variables to quantum bit string.
[0055] Next, a loss function construction method with a constraint penalty term is adopted. First, an objective function is constructed with minimizing hedging costs as its core. The objective function is calculated as a weighted sum of hedging costs, with each cost item having a weight of 1. These hedging costs specifically include four items: energy storage cycle loss costs, interruptible load compensation costs, carbon futures margin costs, and carbon option premiums. The output value of the objective function is the sum of these four hedging costs, while simultaneously deducting the closing price difference gains generated by carbon futures and carbon option hedging operations. Then, a penalty term corresponding to the carbon risk exposure constraint is constructed. Carbon risk exposure is represented by the product of the conditional risk value of the carbon over-emission event calculated in the previous steps and the over-emission probability. The preset carbon risk exposure threshold is 5% of the microgrid's approved carbon quota holdings within the dispatch cycle. The penalty term is constructed using the external penalty function method. When the carbon risk exposure exceeds the preset threshold, the penalty term is the product of the excess amount and the penalty coefficient, with the penalty coefficient being 1. When the carbon risk exposure does not exceed a preset threshold, the penalty term is set to 0. Finally, the objective function and the penalty term are added together to construct the loss function of the quantum heuristic optimizer. The minimum value of the loss function corresponds to the minimum hedging cost that satisfies the carbon risk constraint.
[0056] Subsequently, a variable quantum eigenvalue solver is employed to iteratively optimize the solution based on the constructed loss function. This variable quantum eigenvalue solver approximates the solution of high-dimensional non-convex optimization problems through parameterized quantum circuits. Compared to traditional gradient optimization methods, it exhibits superior global search capabilities when handling multi-constraint coupling and discrete-continuous mixed decision variable problems, making it suitable for the complex optimization needs of risk-hedging portfolios. First, a parameterized quantum circuit adapted to the decision variable dimension of this scheme is constructed. The quantum circuit adopts a hardware-efficient ansatz structure with strong adaptability to classical simulations, determining a conventional adaptation layer number of 2-4 layers. The number of qubits is completely consistent with the length of the encoded qubit string. The trainable parameters of the quantum circuit are the rotation angles of each quantum rotation gate, initialized using uniformly distributed random numbers in the range of 0 to 2π. Next, a general-purpose L-BFGS optimizer is used as the iterative updater. In each iteration, the output quantum state of the quantum circuit corresponding to the current parameters is coupled with the encoded qubit string, and the expected value of the loss function is calculated. The optimizer updates the trainable parameters of the quantum circuit based on the gradient information of the expected value, synchronously updating the corresponding qubit string. Set clear iterative convergence criteria. When the expected change of the loss function after 10 consecutive iterations is less than 1e-4, or when the number of iterations reaches the preset maximum number of iterations of 200, iterative convergence is determined, the iteration process is stopped, and the optimal quantum bit string corresponding to the convergence is output.
[0057] Finally, a binary decoding method, the inverse of the encoding process, is employed to decode and convert the converged optimal qubit string. Following the fixed order of encoding, the qubit string is split into binary encoded segments corresponding to each decision variable. Each 8-bit binary segment is converted into a decimal value. Then, using the linear mapping rule from the encoding process, the decimal values are converted into the actual physical and financial quantities of the corresponding decision variables. This yields the energy storage charging and discharging power control values, interruptible load shedding capacity control values, and optimal open positions for carbon futures and carbon options at each time segment within the scheduling cycle. The energy storage charging and discharging power control values and interruptible load shedding capacity control values are converted into day-ahead scheduling control commands that can be directly executed by the microgrid energy management system. The optimal open positions for carbon futures and carbon options are converted into trading order commands that can be directly executed by the carbon trading market, ultimately forming a complete optimal hedging strategy.
[0058] By standardizing the decision variable qubit encoding, constructing the loss function with a constraint penalty term, and iteratively solving and inverse mapping decoding using a variable quantum eigenvalue solver that can be directly implemented on a classical computing platform, the optimal hedging strategy for microgrid carbon risk with minimal hedging cost is efficiently obtained under the premise of satisfying carbon risk exposure constraints. This provides a directly implementable solution for the operation and maintenance management of microgrid carbon throughout its entire life cycle.
[0059] Furthermore, the method provided in this application embodiment includes: The hedging costs include energy storage cycle loss costs, interruptible load compensation costs, carbon futures margin costs, and carbon option premiums.
[0060] Optionally, the energy storage cycle loss cost is the converted cost corresponding to the lifespan reduction caused by charge-discharge cycles during the participation of energy storage equipment in risk hedging scheduling. The calculation first uses the total life-cycle purchase investment cost of the energy storage equipment as a basis, combined with the rated maximum number of charge-discharge cycles specified by the equipment at the factory, to calculate the unit cycle loss cost corresponding to a single complete charge-discharge cycle. Then, the total charge-discharge capacity corresponding to all charge-discharge operations performed by the energy storage equipment during the scheduling cycle is calculated and converted into an equivalent number of complete charge-discharge cycles. Finally, the energy storage cycle loss cost for this scheduling cycle is obtained by multiplying the equivalent number of cycles by the unit cycle loss cost.
[0061] Interruptible load compensation costs are the demand response compensation fees that a microgrid must pay to load users when it performs risk-hedging dispatch by cutting off agreed-upon interruptible loads. The calculation is based on the unit capacity and unit duration interruption compensation price stipulated in the agreement between the microgrid and the interruptible load users. It involves statistically analyzing the actual load shedding capacity executed at each time segment within the dispatch cycle, and the corresponding duration of the interruption. The compensation cost for a single time segment is calculated by multiplying the single-segment shedding capacity, the corresponding interruption duration, and the compensation price. Finally, the compensation costs for all time segments that experienced interruptions within the dispatch cycle are summed to obtain the total interruptible load compensation cost.
[0062] The cost of carbon futures margin is the opportunity cost of funds incurred due to the freezing of trading margin when participating in carbon futures trading to hedge against carbon over-emission risks. The calculation begins by determining the contract margin ratio according to the trading rules of the corresponding carbon futures contract in the national carbon trading market. Then, combining the opening price and the number of contracts held, the total amount of trading margin to be frozen after opening a position is calculated. Next, using the annualized opportunity cost rate of funds, preset by the microgrid and determined with reference to the risk-free rate of return in the same period, the daily opportunity cost rate for the corresponding holding period is calculated based on the actual number of days the futures position is held. Finally, the total frozen margin is multiplied by the opportunity cost rate for the corresponding period to obtain the cost of carbon futures margin.
[0063] Carbon option premiums are fixed transaction costs paid to the option seller when purchasing a carbon option contract to hedge against the risk of excessive emissions caused by rising carbon prices. The calculation is based on the transaction price per unit of the corresponding carbon option contract, i.e., the premium price per ton of carbon dioxide equivalent quota. This is combined with the total quota tons corresponding to the actual purchased option contracts. The total carbon option premium payable is obtained by multiplying the unit premium price by the total quota tons of the purchased contracts. This cost is the full cost incurred at the time of purchasing the option and is directly included in the hedging cost.
[0064] Furthermore, the method provided in this application embodiment includes: Historical risk events are collected, each containing an uncertainty parameter vector before the event, a hedging strategy vector executed, and the actual carbon over-emission after the event. A risk pattern classifier is constructed based on these risk events, using the uncertainty parameter vector as input and risk type labels as output, and trained using a deep learning network. When the risk pattern classifier is running online and identifies a new risk pattern, it retrieves the strategy template with the highest similarity from the historical case library and generates a new hedging strategy by adapting it to the current scenario through transfer learning.
[0065] In this embodiment, the risk pattern classifier is an intelligent classification algorithm program deployed in the microgrid energy management system and built based on a long short-term memory deep learning network. It can automatically identify and classify carbon over-emission risk types by inputting microgrid operation and carbon market time series data.
[0066] In one embodiment, historical data is first archived in the microgrid energy management system and carbon trading system, collecting all carbon over-emission risk events that occurred during the historical operation within the scheduling cycle. Each risk event contains three types of core data: the first type is the multi-source uncertainty parameter vector of all time sections in the 72 hours before the event, specifically including time-series data of distributed power output, load power, and carbon market price; the second type is the hedging strategy vector executed during the risk event, specifically including complete time-series data of energy storage charging and discharging sequences, interruptible load shedding sequences, and carbon market trading operations; and the third type is the actual carbon over-emission amount after the risk event ends, as well as the corresponding over-emission penalty cost. All collected risk event data are processed by min-max normalization and then stored in the microgrid carbon risk historical case library.
[0067] Then, a risk pattern classifier is constructed based on the collected historical risk events. A long short-term memory network, which is suitable for time series data classification, is used as the core model of the classifier. First, the input and output of the model are defined. The input of the model is the time series uncertainty parameter vector corresponding to the risk event. The time series length of the input data is 72 hours, corresponding to 288 15-minute time segments. The feature dimensions of each time segment are three core features: distributed power output, load power, and carbon market price. The output of the model is the risk type label. The risk type label is divided into four categories according to the risk driving factors: power fluctuation risk, load change risk, carbon price rise risk, and composite driving risk. Each type of label corresponds to a fixed risk pattern.
[0068] Long Short-Term Memory (LSTM) networks serve as the core model for risk pattern classifiers. This model uses cell states as its core carrier, storing risk-dependent information from long-term operational data of microgrids. It filters historical fluctuation data irrelevant to the current risk pattern through a forgetting gate, updates the uncertainty parameter features at the current moment through an input gate, and extracts the hidden risk feature states through an output gate. This effectively captures the risk evolution patterns in long-term time-series data and is adapted to the temporal characteristics of carbon over-emission risk in microgrids. The specific construction and training process is described below: The overall structure of the Long Short-Term Memory (LSTM) network consists of five layers. The first layer is the input layer, with 3 units, matching the dimension of the input features, and uses a linear activation function. The second layer is the first LSM hidden layer, with 64 units, using the tanh activation function and a dropout rate of 0.2 to suppress overfitting. The third layer is the second LSM hidden layer, with 32 units, also using the tanh activation function and a dropout rate of 0.2. The fourth layer is a fully connected layer with 16 units, using the ReLU activation function. The fifth layer is the output layer, with 4 units, matching the number of risk type labels, and uses the softmax activation function to output the predicted probabilities of various risk patterns.
[0069] Before model training, the risk event dataset from the microgrid carbon risk historical case library is randomly divided into training, validation, and test sets in a 7:2:1 ratio. The training set is used for iterative updates of model parameters, the validation set is used to monitor overfitting, and the test set is used to verify the final classification accuracy of the model. The training process uses the cross-entropy loss function, common to multi-class classification tasks, as the objective function for model optimization. The optimizer is the Adam optimizer, common to temporal deep learning tasks, with an initial learning rate of 0.001, a batch size of 32, and a maximum training epoch of 100. An early stopping mechanism is also implemented: training is terminated early if the loss value on the validation set does not decrease for 10 consecutive training epochs to prevent overfitting. Within each training epoch, the training set data is input into the network in batches according to the batch size. Forward propagation is used to calculate the prediction results and loss values, and then backpropagation is used to iteratively update the weight parameters of each layer in the network, completing one full training iteration. After training, the test set data is used to verify the model's classification accuracy. When the classification accuracy reaches 95% or higher, the model is considered successfully trained and ready for online operation.
[0070] Next, the trained risk pattern classifier is deployed online in the microgrid energy management system. The classifier collects the temporal uncertainty parameter vector within the current scheduling cycle in real time and inputs it into the classifier. The classifier outputs the risk pattern type and predicted probability corresponding to the current operating state. When the predicted probabilities of all risk types output by the classifier are lower than the preset 80% confidence threshold, a new risk pattern not found in historical data is identified. After identifying the new risk pattern, a dynamic time warping algorithm is used to retrieve the three historical risk events with the highest similarity to the uncertainty parameter vector of the current new risk pattern from the microgrid carbon risk historical case library. Verified effective hedging strategies from these historical events are extracted as strategy templates. Using a common deep learning transfer learning method, the parameters of the first two long short-term memory hidden layers of the pre-trained risk pattern classifier are frozen, and only the parameters of the subsequent fully connected layers and output layer are updated. Based on the real-time data of the new risk pattern and the retrieved strategy templates, fine-tuning training is performed using a small number of samples to adapt the strategy templates to the current new risk pattern scenario. Finally, a new hedging strategy adapted to the current scenario is generated, thereby achieving real-time hedging and control of carbon over-emission risks.
[0071] By implementing hedging strategies, collecting historical risk events, training risk pattern classifiers using long short-term memory networks, identifying new risk patterns, and adapting them through transfer learning, the system achieves closed-loop management of microgrid carbon over-emission risks and adaptive responses to unknown risks, providing a complete adaptive optimization solution for the full lifecycle operation and maintenance control of microgrid energy and carbon emissions.
[0072] In summary, the microgrid energy carbon full life cycle operation and maintenance control method provided in this application has the following technical effects: This application constructs a risk hedging portfolio that includes physical assets and financial instruments, solves for the optimal hedging strategy and implements it, collects historical risk events to train a risk pattern classifier, identifies new risk patterns and generates new strategies through transfer learning, thereby achieving closed-loop management of microgrid carbon over-emission risks. This makes the operation and maintenance of microgrids throughout their entire carbon lifecycle more efficient and reliable, achieving the technical effect of efficiently handling multi-source uncertainties in microgrid operation and maintenance and accurately assessing carbon emission-related risks. It also minimizes management and control costs while keeping carbon emission-related risks within a predetermined range.
[0073] Example 2, as Figure 2 As shown, based on the same inventive concept as in Embodiment 1 above, this application provides a full life-cycle operation and maintenance control system for microgrid energy carbon emissions, the system comprising: Carbon over-emission event calculation module 1 is used to encode the multi-source uncertainties in the operation of the microgrid into the superposition state vector of qubits, perform parallel evolution of the superposition state vector through a quantum heuristic solver, solve the probability power flow distribution in the full state space at one time, and calculate the conditional risk value and over-emission probability of carbon over-emission events.
[0074] The optimal hedging strategy acquisition module 2 constructs a risk hedging portfolio containing physical assets and financial instruments based on the conditional value at risk and the over-emission probability. With the goal of minimizing hedging costs and the condition of confining carbon risk exposure within a preset threshold, the module solves the allocation strategy of the portfolio to generate the optimal hedging strategy.
[0075] The physical execution layer control module 3 is used to output the optimal hedging strategy to the physical execution layer for control.
[0076] Furthermore, the carbon over-emission event calculation module 1 is used to perform the following steps: Historical data is collected to construct an uncertainty parameter set for photovoltaic power output, wind power output, load demand, real-time electricity price, and carbon quota price; the possible value ranges of each uncertainty parameter set are discretized into a finite number of states, which are then combined and mapped to each quantum ground state; and each quantum ground state is assigned a complex probability amplitude through amplitude encoding to construct a superposition state vector.
[0077] Furthermore, the carbon over-emission event calculation module 1 is used to perform the following steps: The square of the modulus of the complex probability amplitude represents the probability of occurrence of the state combination, and the phase encodes the interference information between states.
[0078] Furthermore, the carbon over-emission event calculation module 1 is used to perform the following steps: The node admittance matrix and carbon flow correlation matrix of the microgrid are constructed and encoded as a quantum gate operation sequence to establish the computational basis of the quantum heuristic solver. The superposition state vector is input into the quantum heuristic solver, and the power flow calculation of all states is performed in parallel through the tensor network shrinking algorithm. During one evolution process, the node voltage magnitude, branch power distribution and node carbon intensity of each state are solved simultaneously, and the probabilistic power flow distribution in the full state space is output, with the dimension being the number of states multiplied by the number of nodes multiplied by the number of time sections.
[0079] Furthermore, the carbon over-emission event calculation module 1 is used to perform the following steps: A carbon over-emission event is defined as a set of over-emission states in which the cumulative carbon emissions of a microgrid exceed its carbon allowance holdings within a preset time window. Based on the set of over-emission states, the carbon emissions corresponding to each state are extracted from the probability power flow distribution, and the states are arranged in descending order of carbon over-emission amount to calculate the cumulative probability distribution. Based on the cumulative probability distribution, the over-emission amount when the cumulative probability reaches a preset confidence level is taken as the conditional risk value, and the probabilities of states with over-emission amounts greater than zero are summed to obtain the over-emission probability.
[0080] Furthermore, the optimal hedging strategy acquisition module 2 is used to perform the following steps: Identify energy storage devices within the microgrid that can participate in dispatch, extract their state of charge, charge / discharge efficiency, and cycle life parameters, and construct an energy storage dispatch unit; identify interruptible load devices, extract their interruptible capacity, interruption duration limits, and compensation unit prices, and construct a flexible load unit; establish an interface with the carbon trading market, obtain the contract specifications, price series, and transaction fees of carbon quota futures, and construct a carbon trading unit; encode the energy storage dispatch unit, the flexible load unit, and the carbon trading unit into the risk hedging portfolio.
[0081] Furthermore, the optimal hedging strategy acquisition module 2 is used to perform the following steps: Based on the aforementioned risk hedging portfolio, the energy storage charging and discharging power sequence, interruptible load shedding sequence, carbon futures open interest, and carbon option open interest are encoded into a quantum bit string; an objective function is constructed as a weighted sum of hedging costs, and the carbon risk exposure constraint is encoded as a penalty term, constructing a loss function for a quantum heuristic optimizer; based on the loss function, the quantum bit string is iteratively updated through a variable quantum eigenvalue solver, and the optimal hedging strategy is output upon convergence.
[0082] Furthermore, the optimal hedging strategy acquisition module 2 is used to perform the following steps: The hedging costs include energy storage cycle loss costs, interruptible load compensation costs, carbon futures margin costs, and carbon option premiums.
[0083] Furthermore, the physical execution layer control module 3 is used to perform the following steps: Historical risk events are collected, each containing an uncertainty parameter vector before the event, a hedging strategy vector executed, and the actual carbon over-emission after the event. A risk pattern classifier is constructed based on these risk events, using the uncertainty parameter vector as input and risk type labels as output, and trained using a deep learning network. When the risk pattern classifier is running online and identifies a new risk pattern, it retrieves the strategy template with the highest similarity from the historical case library and generates a new hedging strategy by adapting it to the current scenario through transfer learning.
[0084] The microgrid energy carbon full life cycle operation and maintenance control system provided in the embodiments of the present invention can execute the microgrid energy carbon full life cycle operation and maintenance control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0085] Although this application makes various references to certain modules in the system according to the embodiments of this application, any number of different modules can be used and run on user terminals and / or servers. The various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy distinction between each other and are not used to limit the scope of protection of this invention.
[0086] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application. In some cases, the actions or steps described in this application can be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A method for the full life-cycle operation and maintenance control of microgrid energy carbon emissions, characterized in that, include: The multi-source uncertainties in microgrid operation are encoded as superposition vectors of qubits. The superposition vectors are then evolved in parallel using a quantum heuristic solver to solve the probability power flow distribution in the full state space in one go, and to calculate the conditional risk value and probability of carbon over-emission events. Based on the conditional value at risk and the probability of over-emission, a risk hedging portfolio consisting of physical assets and financial instruments is constructed. With the goal of minimizing hedging costs and the condition of confining carbon risk exposure within a preset threshold, the allocation strategy of the portfolio is solved to generate the optimal hedging strategy. The optimal hedging strategy is output to the physical execution layer for control.
2. The microgrid energy carbon full life cycle operation and maintenance control method as described in claim 1, characterized in that, Encoding the multi-source uncertainties in microgrid operation as a superposition vector of qubits includes: Historical data was collected to construct a set of uncertain parameters for photovoltaic power output, wind power output, load demand, real-time electricity price, and carbon quota price; Discretize the possible value ranges of each set of uncertainty parameters into a finite number of states, and combine and map them into each quantum ground state; By assigning complex probability amplitudes to each quantum ground state using an amplitude encoding method, a superposition state vector is constructed.
3. The microgrid energy carbon full life cycle operation and maintenance control method as described in claim 2, characterized in that, The square of the modulus of the complex probability amplitude represents the probability of occurrence of the state combination, and the phase encodes the interference information between states.
4. The microgrid energy carbon full life cycle operation and maintenance control method as described in claim 2, characterized in that, The superposition state vector is evolved in parallel using a quantum heuristic solver to solve the probabilistic power flow distribution across the entire state space in a single operation, including: The node admittance matrix and carbon flow correlation matrix of the microgrid are constructed and encoded into a quantum gate operation sequence to establish the computational basis of the quantum heuristic solver. The superposition state vector is input into the quantum heuristic solver, and the power flow calculations for all states are performed in parallel through the tensor network shrinking algorithm. During one evolution process, the node voltage magnitude, branch power distribution and node carbon intensity of each state are solved simultaneously, and the probabilistic power flow distribution in the full state space is output, with the dimension being the number of states multiplied by the number of nodes multiplied by the number of time sections.
5. The microgrid energy carbon full life cycle operation and maintenance control method as described in claim 4, characterized in that, Calculate the conditional value of risk and the probability of carbon over-emission events, including: Carbon over-emission events are defined as the set of over-emission states in which the cumulative carbon emissions of a microgrid exceed its carbon allowance holdings within a preset time window. Based on the set of over-emission states, the carbon emissions corresponding to each state are extracted from the probability power flow distribution, the states are arranged in descending order of carbon over-emission amount, and the cumulative probability distribution is calculated. Based on the cumulative probability distribution, the excess emissions when the cumulative probability reaches a preset confidence level are taken as the conditional risk value. The excess emissions are summed to obtain the excess emission probability.
6. The microgrid energy carbon full life cycle operation and maintenance control method as described in claim 4, characterized in that, Based on the aforementioned conditional value at risk and oversubscription probability, a risk-hedging portfolio comprising physical assets and financial instruments is constructed, including: Identify energy storage devices that can participate in scheduling within the microgrid, extract their state of charge, charge / discharge efficiency, and cycle life parameters, and construct an energy storage scheduling unit; Identify interruptible load equipment, extract interruptible capacity, interruption duration limit and compensation unit price, and construct flexible load units; Establish an interface with the carbon trading market to obtain the contract specifications, price series, and transaction fees for carbon quota futures, and construct a carbon trading unit; The energy storage dispatch unit, the flexible load unit, and the carbon trading unit are encoded as the risk hedging portfolio.
7. The microgrid energy carbon full life cycle operation and maintenance control method as described in claim 6, characterized in that, With the objective of minimizing hedging costs and the condition of confining carbon risk exposure within a preset threshold, the allocation strategy of the portfolio is solved to generate the optimal hedging strategy, including: Based on the aforementioned risk hedging portfolio, the energy storage charging and discharging power sequence, interruptible load shedding sequence, carbon futures open interest, and carbon option open interest are encoded into quantum bit strings; The objective function is constructed as a weighted sum of hedging costs, and the carbon risk exposure constraint is encoded as a penalty term to construct the loss function of a quantum heuristic optimizer; Based on the loss function, the qubit string is iteratively updated through a variable quantum eigenvalue solver, and the optimal hedging strategy is output upon convergence.
8. The microgrid energy carbon full life cycle operation and maintenance control method as described in claim 7, characterized in that, The hedging costs include energy storage cycle loss costs, interruptible load compensation costs, carbon futures margin costs, and carbon option premiums.
9. The microgrid energy carbon full life cycle operation and maintenance control method as described in claim 1, characterized in that, After outputting the optimal hedging strategy to the physical execution layer for control, the system further includes: Collect risk events from historical operations. Each risk event includes an uncertainty parameter vector before the event, a hedging strategy vector executed, and the actual carbon over-emissions after the event. A risk pattern classifier is constructed based on the aforementioned risk events, taking the uncertainty parameter vector as input and the risk type label as output, and is trained using a deep learning network. When the risk pattern classifier identifies a new risk pattern while running online, it retrieves the strategy template with the highest similarity from the historical case library and generates a new hedging strategy by adapting it to the current scenario through transfer learning.
10. A full life-cycle operation and maintenance control system for microgrid energy carbon emissions, characterized in that, The system is used to implement the full life-cycle operation and maintenance control method for microgrid energy carbon emissions according to any one of claims 1-9, the system comprising: The carbon over-emission event calculation module is used to encode the multi-source uncertainties in the operation of the microgrid into the superposition state vector of qubits. The superposition state vector is then evolved in parallel by a quantum heuristic solver to solve the probability power flow distribution in the full state space in one go, and to calculate the conditional risk value and over-emission probability of the carbon over-emission event. The optimal hedging strategy acquisition module constructs a risk hedging portfolio containing physical assets and financial instruments based on the conditional value at risk and the probability of over-emission. With the goal of minimizing hedging costs and the condition of keeping carbon risk exposure within a preset threshold, the module solves the allocation strategy of the portfolio to generate the optimal hedging strategy. The physical execution layer control module is used to output the optimal hedging strategy to the physical execution layer for control.