Chaofan Lin,
Peng Zhang,
Mikhail A. Bragin,
and
Yacov A. Shamash
This work relates to Department of Navy award N00014-23-1-2124 issued by the Office of Naval Research. The U.S. Government has a royalty-free license throughout the world in all copyrightable material contained herein.C. Lin, P. Zhang and Y. A. Shamash are with the Department of Electrical and Computer Engineering, Stony Brook University, NY 11794, USA (e-mails: chaofan.lin, p.zhang, [email protected]).M. A. Bragin is with Southern California Edison, Rosemead, CA 91771, USA (e-mail: [email protected]).
Abstract
This letter introduces a novel compact and lossless quantum microgrid formation (qMGF) approach to achieve efficient operational optimization of the power system and improvement of resilience. This is achieved through lossless reformulation to ensure that the results are equivalent to those produced by the classical MGF by exploiting graph-theory-empowered quadratic unconstrained binary optimization (QUBO) that avoids the need for redundant encoding of continuous variables. Additionally, the qMGF approach utilizes a compact formulation that requires significantly fewer qubits compared to other quantum methods thereby enabling a high-accuracy and low-complexity deployment of qMGF on near-term quantum computers.
Case studies on real quantum processing units (QPUs) empirically demonstrated
that qMGF can achieve the same high accuracy as classic results with a significantly reduced number of qubits.
Microgrid formation (MGF) is an effective strategy for boosting distribution system resilience against natural disasters. Classic MGF is generally formulated as mixed integer linear programming (MILP) with continuous and integer decision variables [1]. However, integer variables result in combinatorial complexity, where the number of possible solutions increases exponentially with the size of the problem, drastically increasing the computation effort [1].
In recent years, quantum computing has demonstrated promise in accelerating the resolution of MGF [2, 3]. However, the success of quantum computing methods is contingent on the availability of the quadratic unconstrained binary optimization (QUBO) formulation, which does not account for the presence of continuous variables [2, 3].
To leverage the quantum advantage,
one common way is to encode the continuous variables with binary ones
[2, 4], which leads to the loss of accuracy as well as to the significant increase of the number of binary variables and quantum-computational requirements.
This letter addressed the above issues at the modeling stages by develo** a compact and lossless quantum MGF (qMGF)
that directly formulates the MGF as a QUBO without continuous variables by exploiting the advantages of the graph theory. Rather than resorting to a traditional approach of heuristically determining a redundant mesh of discretization to approximate continuous variables, our novel idea is to establish a new node-to-branch binary decision matrix to explicitly and precisely map the continuous variables in qMGF with existing binary ones.
In doing so, those variables are compactly discretized with a much fewer number of binary variables.
II State-of-the-Practice Quantum Optimization
The QUBO solution aims for the minimum energy state of the following Ising model [5]:
(1)
where is the Hamiltonian function; is the spin variable taking values ; and are the coefficients.
The problem in (1) is also equivalent to finding the ground state over all possible quantum states:
(2)
where is the quantum state; and are the tensor product of multiple quantum gates, where the indices indicate the positions of each Z gate.
To obtain the ground state (or optimal solution) of (2), algorithms
such as quantum annealing [2] and quantum approximate optimization algorithm (QAOA) [3] have been used. For either algorithm, a QUBO formulation is a necessity.
Existing discretization-based methods attempt to approximate such continuous variables in MGF as branch flows and nodal voltages, by a finite number of binary variables [2, 4]:
(3)
where is any continuous variable; is the binary variable for encoding; and are the numbers of binary variables to encode the fractional and integer parts, respectively.
However, the above approximation would inevitably lead to a large number of binary variables, numerical errors, accuracy loss, constraint violations, and infeasibility (See Section IV). To resolve the above issues, an encoding-free compact and lossless QUBO formulation for MGF
is discussed next.
III A Compact and Lossless QUBO Formulation for qMGF
This section uses quantum notation to denote the binary variables in qMGF111 should be performed before embedding any binary variable into actual qubits because while ..
(1) Microgrid Radial Topology Constraints
Assuming each formed microgrid (MG) holds a radial topology, the following spanning tree model can be used to partition any structure, into MGs with radial topology [1]:
(4)
(5)
(6)
where is the set of branches; is the set of nodes; is the set of root nodes with power sources; is the qubit to decide the status of the branch between nodes and , where indicates a closed status or else ; denotes the node relationship, where means node is the parent node of node or else .
Existing methods formulate the network constraints based on KCL and KVL [1, 2, 3, 4], which cannot explicitly capture the relationships between the continuous power flows/nodal voltages and discrete load/branch statuses. To explicitize the relationships, instead of KCL and KVL, we define a new node-to-branch (N2B) decision matrix from a graphical perspective:
(7)
which equals 1 if the path between node and any root node passes through branch and equals 0 if not.
For a radial MG graph, the following constraints should be satisfied:
(8)
i.e., if branch is closed, then nodes and share the same pass-through branch or not at the same time; if open, their passing statuses through branch have no relationship. The quadratic term can be linearized by the method in [2].
For nodes and their directly connected branches, we have:
(9)
i.e., only the child node passes through its connected branch.
Moreover, the root nodes should pass through no branches:
(10)
With the N2B matrix, the active and reactive power flow and voltage drop at each branch can be explicitly expressed by:
(11)
(12)
(13)
where is the qubit to decide whether to restore the load at node or not; and are the active and reactive power flows from node to ; , , , and are the voltages at nodes and , the voltage drop from node to , and the nominal voltage; and are the active and reactive powers of the load at node ; and are the resistance and reactance of branch .
(3) Security Constraints
Based on (11) to (13), the security constraints of all sources, branches, and nodes in qMGF can be formulated as:
(14)
(15)
(16)
(17)
(18)
where and ( and ) are the minimum and maximum active (reactive) power outputs of the source at node ; denotes node is connected to node ; and are the maximum active and reactive power flows of branch ; is the maximum voltage drop for node ; is a small voltage value, which relaxes the upper boundary when the load at node is not restored ().
(4) Objective of qMGF
The objective of qMGF, same as classic MGF, is to maximize the restored load amount considering priorities [1, 2, 3]:
(19)
where is the weight of the load at node .
It is worth mentioning that, although qMGF introduces a new N2B decision matrix, it usually has a sub-quadratic to linear complexity with increased system scale (number of nodes). This is because in most cases the set of possible power supply paths for a certain node does not always cover all branches of the system, and thus the N2B matrix is not full or even sparse.
To determine which elements are not decision variables, one can perform the simple path search in the graph theory for each node and all sources and find out those branches that the node would impossibly pass through.
The above formulation is a binary optimization that needs to be converted to a QUBO formulation before a QC can solve it. The conversion includes 1) Float coefficients in (14) to (18) to integer ones by multiplication by on both sides of the constraints;
2) Inequality constraints to equality ones by adding slack variables; and 3) Equality constraints to the objective by adding tuned penalty coefficients. The details of this conversion can be found in [2]. Overall algirithm is below:
Algorithm 1 qMGF Algorithm.
Input: , , , , , , , , , , , , , ,
Do qMGF formulation with (4)-(6), (8)-(10), (14)-(19)
convert the formulation to QUBO
solve the QUBO by D-Wave QPU and obtain the values of , , and corresponding to the ground state
calculate branch flows and nodal voltages by (11) to (13)
Results: , , , ,
IV Case Study
IV-AAccuracy Advantage
The accuracy of qMGF is validated on a modified IEEE 37 node test feeder [1] using Gurobi 11.0.
Table I compares the results of qMGF, classic MGF with an MILP formulation [1] (cMGF) and encoding discretization-based MGF with a QUBO formulation [2, 4] (dMGF).
TABLE I: Comparison of qMGF with Encoding Discretization-based MGF and Classic MGF
Item
qMGF
dMGF11
dMGF2
dMGF3
cMGF
No. of con. vars.
0
0
0
0
122
No. of bin. vars./qubits
4134
8409
10901
11257
141
Objective value (e6)
2.3095
2.4425
2.4181
2.3095
2.3095
Load served ratio2 (%)
52.0414
55.7005
54.4326
52.0414
52.0414
Constraint violation sum3
0
14.5397
9.2309
2.1152
/
Ave. con. vars. error (%)
0
7.5183
3.1903
0.0008
/
1
dMGF1, dMGF2, and dMGF3 denote the dMGFs in different encoding granularities (total numbers of qubits (8268, 10760, and 11116) for encoding continuous variables).
2
This means the active power ratio of the served load to the total load [1].
3
The constraint violation sum is calculated by substituting all variable values corresponding to the optimal solution into the original MILP formulation (cMGF) and summing up all constraint violations.
It shows that:
•
qMGF needs only 35%-50% of qubits that dMGF needs to achieve the same accuracy.
•
qMGF obtains the same optimal solution as cMGF does without constraint violations or variable errors.
•
dMGF inevitably introduces numerical errors that could lead to constraint violations and variable errors. These errors can be reduced at an expensive, oftentimes prohibitive, price of increasing the number of qubits.
Therefore, qMGF outperforms dMGF with higher accuracy and reduced number of qubits required.
IV-BPerformance on Real QPU
qMGF is deployed and evaluated on a D-Wave’s QPU solver Advantage_system6.4 with 5760 qubits. Six IEEE PES test feeders at different scales (4, 13, 37, 123, 342, and 906 node systems) are selected for the evaluation. The key results are:
•
Due to the scale and noise issues in real QPU, it failed to sample out the ground state or optimal solution in a limited time or sample size (e.g., 1e6 samples), even if for the smallest 4-node system that only needs 114 qubits.
•
For topology optimization, Fig. 1 shows that, as system scale increases, the energy values of samples tend to deviate from the lowest zero and the probability of successfully sampling out the ground state decreases correspondingly.
•
For restoration optimization, as shown in Fig. 2, the ground states at different topologies are all successfully sampled out in 300 samples, indicating the potential feasibility of qMGF on real QPU.
It is noted that some existing commercial solvers (e.g., CQM for D-Wave) handle continuous variables or MILP through proprietary quantum-classic hybrid schemes where the task assignments are largely invisible to users. This letter seeks to provide a reformed general qMGF method that is poised to be run on genuine QCs other than hybrid solvers; thus our approach is platform-independent, readily applicable on any available QC platforms.
Figure 1: The distributions of energy values of 300 samples and the probabilities of the ground state for topology optimization in different system scales.Figure 2: The distributions of energy values of 300 samples for restoration optimization at different topologies of the 4 node system.
V Conclusion
This letter presents a compact and lossless quantum microgrid formation (qMGF) method to accurately and efficiently solve the MGF problem on real QCs. qMGF achieves the same accuracy as that of classic MGF, whereas its new problem formulation requires fewer qubits and leads to lower computational complexity than the vanilla quantum methods. Thus it has promising potential to be deployed on the noisy-intermediate-scale quantum computers. A future direction is to further accelerate qMGF for real-scale distribution systems with inverter-based resources.
References
[1]
C. Lin, C. Chen, F. Liu, G. Li, and Z. Bie, “Dynamic MGs-based load restoration for resilient urban power distribution systems considering intermittent RESs and droop control,” Int. J. Electr. Power Energy Syst., vol. 140, pp. 107975, Sep. 2022.
[2]
N. Nikmehr, P. Zhang, H. Zheng, T. Wei, G. He, and Y. A. Shamash, “Quantum annealing-infused microgrids formation: Distribution system restoration and resilience enhancement,” IEEE Trans. Power Syst., Early Access, 2024. DOI: 10.1109/TPWRS.2024.3399122.
[3]
N. Nikmehr, P. Zhang, H. Zheng and Y. A. Shamash, ”Quantum Annealing for Distribution System Restoration via Resilient Microgrids Formation,” in 2023 IEEE Power & Energy Society General Meeting (PESGM), Orlando, FL, USA, Jul. 2023.
[4]
W. Fu, H. Xie, H. Zhu, H. Wang, L. Jiang, C. Chen, and Z. Bie, “Coordinated post-disaster restoration for resilient urban distribution systems: A hybrid quantum-classical approach,” Energy, vol. 284, pp. 129314, Dec. 2023.
[5]
S. Boixo, T.F. Rønnow, S.V. Isakov, Z. Wang, D. Wecker, D.A. Lidar, J.M. Martinis and M. Troyer, “Evidence for quantum annealing with more than one hundred qubits,” Nature physics, vol. 10, no.3, pp.218-224, Feb. 2014.