Tag Archives: paper

IET GTD Paper on Solving the AC Optimal Power Flow with Machine Learning

October 2022

I am elated to report the acceptance of my recent work at the IET Generation, Transmission & Distribution (GTD) open access (OA) journal of the Wiley publications! Before unpacking my paper with the (kind of long) title “Stochasticity Agnostic Solution to the AC Optimal Power Flow by Recursive Bound Tightening with Top-Down Heuristically Inducted Binary Decision Trees” (link here), let me rejoice in the fact that the IET GTD is, according to Scholar Google, the highest ranking Q1 (in Control & Systems Eng., Electrical & Electronic Eng., Energy Eng. & Power Technology) OA journal on Power Engineering. I have been an avid proponent of OA and Associate and Senior Editor in 2 such publications. Going through the process as an Author myself has reassured me that my heart is in the right place with OA! Read more about my position on OA here.

The AC Optimal Power Flow (OPF) is a non-convex optimization problem for resources or performance metrics within an electrical grid (see formulation above). The non-convexity of the AC OPF is due to the grid physics of power flows that introduce a non-convex equality constraint to the  optimization formulation. Since the AC OPF per se is – almost – never the end-problem we wish to solve, the sizes of problems encapsulating AC OPF are typically orders of magnitude larger than that and may include additional non-convexities, e.g. integer variables. The most typical approach used by several researchers in the recent years is the convex relaxation of the AC OPF to a larger dimension and – provided some conditions are met – projection of the relaxed solution back to the feasible space of the original  AC OPF problem. Much fewer approaches have considered machine learning for solving the AC OPF and even fewer of those come with guarantees of global optimality. The overall framework here described clearly means that the AC OPF cannot be solved in times that make sense for system operators and other electricity stakeholders when making decisions about how to operate and plan the electrical grid functions.

My paper introduces 2 perspectives to solving the AC OPF per se and another 1 in accounting for volatile resources, such as renewables like wind generators and photovoltaics.  But first of all, let me describe in a few words how the solver works (assuming we wish to minimize an objective function of energy cost). It starts by sampling the whole feasible space of the AC OPF instance. The samples are, essentially, random feasible dispatches for said problem. Then the method labels half of the samples as False, if the objective function is greater than the median cost of the samples, and True otherwise. Then a heuristically inducted binary decision tree (BDT) is trained with these samples and tightens/shrinks the feasible space (clearly towards the region of the feasible space with costs below the noted median). The method is recursively employed until the feasible space has tightened/shrunk around the global optimum (see “tightening” steps (a)-(e) in the the graph above).

Solving the AC OPF – Point 1
I prove that the method converges to the global optimum via Bayesian inference. Most typically, AC OPF solvers (and relaxations building upon them) pursue to solve the dual problem, relying on strong duality conditions that indicate that the solution of the primal and the dual problems are the same. I take a different path… I prove that a Bayes classifier for the global minimum in a small vicinity around it exists. This is true, due to the fact that the feasible space has non-random characteristics and I also explicitly label the global optimum (and some epsilon around it) as such, while the rest of the said vicinity as non-globally-optimum. From that point, iteratively, I can expand to the whole feasible space by properly labeling/splitting the vicinities of the feasible space as optimal/sub-optimal.

The existence of these Bayes classifiers means also the existence of the heuristically inducted top-down binary decision trees (BDTs) for the same classifications of optima/non-optima. The second part of the proof here could not have been possible if it had not been for Guy Blanc‘s, Jane Lange‘s & Li-Yang Tan‘s recent work on heuristically inducted BDTs. In 2020, Guy et al proved that if there exists a minimum (in the sense BDT-size; nothing to do with the underlying optimization problem here) classifier for a given function, then there exists a non-optimally-sized BDT for that same function. I am pointing this out, because the first time I have used a draft/reduced version of this method (back in 2010), I could not explain why/how the BDT would consistently converge to an optimum… Well, now I know – thanks Guy, Jane and Li-Yang!

Solving the AC OPF – Point 2
Even though it kind of stems from Point 1, it is a remark that I wish to separately mention here. The steps of tightening the AC OPF feasible space towards the global optimum seem unaffected by the size of the grid, but follow the number of the decision variables. In the way I have structured the solver, the decision variables are the active and reactive power set-points of the generating resources. This can be particularly valuable when larger grids with fewer resources must be optimized. Given how typical solvers descend along gradients of a feasible space, the size of the latter will affect that descent. Hence, larger grids, meaning greater numbers of voltage angles, magnitudes and flows, will be slowing down the solving descent. In the AC OPF solution I propose, the size of the grid does not matter, provided that the BDT training samples are feasible and adequate. This is particularly interesting, because we can consider how to accelerate this solution via the control intervals of generators, which are typically not continuous and cannot take any value between minimum and maximum (looking for the exact NERC rule and I will cite it here).

Effect of Volatile Resources in Solving the AC OPF
Typically, renewable energy has negligible, if not zero, operating costs, hence, gets dispatched by priority in any electricity market. However, the exact amount of available renewable energy is usually impossible to determine ahead of time and only offered within some forecasted confidence intervals (see forecasting figure below). This means that as the proposed AC OPF solver converges to the global optimum by the successive median cost of the sampled feasible space, the commitment of renewable energy within the AC OPF increases towards the global optimum at a decreasing confidence. In other words, renewable energy will be committed within the AC OPF at lower set-points corresponding to higher forecasting confidence in the first few iterations of the method (higher objective function costs) and at higher set-points of limited confidence when the process converges to global minimum.

As in my last paper, I had the joy to work with another CMU MSc student, who put in some coding work for me; Parth joined me along for the ride on the paper authorship, too! It was fun and very rewarding to substantially advance my past work on machine-learning-driven optimization of electrical grids with volatile renewables, gain better understanding of the methodology and its characteristics, test it rigorously for performance and get it published OA. Next steps are determining appropriate BDT training sizes and focusing on the stochasticity aspect of this AC OPF solver. Feel free to reach out for any ideas for extensions or collaborations; I will be glad to see more applications of this tool!

Special Issue at the Intl. Journal of Electrical Power & Energy Systems

June 2022

I am kindly inviting you all to submit your works to the Special Issue on “Novel Protection and Control Methodologies towards Electrical Grids with Net-Zero Carbon Emissions” at the International Journal of Electrical Power and Energy Systems of the Elsevier publications. Here is the link to the call for papers. You may submit your novel contributions (full manuscripts) starting July 1st and by 30 Sep, 2022, on any of the following subjects:

  • Online/real-time monitoring and situational awareness solutions (detection and location of system oscillation, fault level monitoring and quantification, inertia measurement, etc.),
  • Analyzing and characterizing fault behavior and the novel protection strategies and solutions,
  • Converter control-based solutions to support protection operation,
  • Electrical grid design and assessment for robust point of common coupling impedance behavior,
  • New coordinating control solutions,
  • Methods for assessment of resilience,
  • New protection and control solutions during extreme weather/operating conditions and
  • New ICT technologies for protection.

I am grateful to my friend Dr. Qiteng Hong (University of Strathclyde, Glasgow), as also, Dr. Botong Li (Tianjin University), who are the Guest EiCs of this special issue and kindly invited me to serve with them on the editorial board. You may contact me for any additional details for works you would like to submit.

IEEE TPWRS Paper on Digital Twin of Overhead Lines for Fire Detection

March 2022

Extending some of my previous work, I developed a digital twin for overhead conductors that detects an approaching forest fire and de-energizes the affected lines in a timely manner and not preemptively. The work has just been accepted in the IEEE Transactions on Power Systems (preprint here).

In California (CA) and elsewhere, the risk of overhead conductors igniting forest fires or adding seats to on-going ones is very real and extensive. In CA, PG&E’s overhead conductor equipment was determined to be the reason for the 2018 Camp fire, leading to law suits that caused the utility’s bankruptcy. After restructuring, the company updated its practices with preemptive disconnections of large parts of its grid during days of high risk of fire. The new practice disrupted service to thousands of customers, in most cases unnecessarily. Hundreds of new suits threatened PG&E with a second bankruptcy in 3 years.

Phasor Measurement Units (PMUs) have been widely adopted across grids. PMUs may be installed along a line in distances as close as a 1-2 miles in between. This gives rise and basis to the idea of real-time monitoring of line impedance for any reasons of variation. As resistance increases with ambient temperature (not proportionally), steep decreases in the inductance/resistance ratio (tangent of the impedance phasor – tanδ in the figure) of an overhead conductor may indicate that a forest fire burns near said conductor and it should, thus, be disconnected.

Behavior of moving average of impedance phasor as a forest fire approaches an overhead conductor and affects its resistance. Such a behavior should control the disconnection of this conductor.

The in silico testing under numerous worst case scenario conditions (no solar heating effect, broad measurement error intervals, synchronization errors, etc.), showed that the proposed method detects some cases of a forest fire approaching a conductor, in sub-second times and at extremely low false positive rates. In the next steps, I plan a collaboration with interested utilities and the US Forest Service for field testing.

I want to thank CMU ECE’s MSc student (at that time) and co-author Uday Sriram for his help in setting up the tests, Dan Dietmeyer from SDG&E for informing me about PMU deployments in CA, Farnoosh Rahmatian from NuGrid Power for lending his expertise on instrument transformers and Jeff Dagle from PNNL for his crucial comments in the earlier stages of this work.

Digital Twins of Electrical Grid Assets

January 2022

A few months ago, my work with Omid Mousavi from DEPsys SA on the Digital Twin of the Medium Voltage side of a Distribution Transformer based on Low Voltage side measurements was published in the IEEE Transactions on Power Delivery (preprint). I have been getting numerous hits on that paper plus some invitations for collaboration, so I thought I should blog a few thoughts about the subject a bit more broadly.

Let me start by describing the idea of this specific publication first. We want to monitor harmonics and system faults with adequate accuracy and, preferably, in real time throughout an electrical grid. However, medium and high voltage  measurement equipment is costly and might require network disruptions to be installed.  Using measurements on the lower voltage side of transformers (T/F) – LV for distribution T/F and MV for substation T/F – and relying on a model of its operation can answer both challenges, while serving the monitoring purposes. As you may read in the paper, the MV side behavior of a distribution T/F may be captured through LV measurements with the delay of a mere sample step (e.g. 0.2 ms at 5 kHz rate). Talk about real-time, right?

The bigger picture is that digital twins are purpose-driven. We define the needs of monitoring a phenomenon or range thereof, any challenges in the process, and engineer the infrastructure and the models required in that framework. The essence of digital twins lies in their ability to respond to real-time inputs and adjust the depiction of the asset or phenomenon in real-time, too. Some might say that they resemble a feedback control system, but for the purpose of monitoring.

The term “real-time” here though, is tricky. If the scope of the monitoring is electrical phenomena (e.g. transient faults), then the term implies sub-second detail. On the other hand, if the purpose is equipment ageing, then granularity of months might suffice. That been said, it is the subtext of real-time which is actually more important. The user or control process relying on the digital twin must be informed in-time to act upon the information. In the case of a T/F suffering an uncleared single phase fault to ground, there is a system operator or local utility that must respond and restore full operational capacity after the fault has occurred, yet fast enough. If the insulation of a breaker is nearing its replacement time, a few days (at least) of advance notice are necessary to plan maintenance actions.

At the moment, I am considering another digital twin for overhead transmission lines that are approached by a forest fire and must get disconnected in time. Unlike, the distribution T/F digital twin, the electrical model was not sufficient for the purpose and needed to be enhanced with additional details that made it ever more challenging and interesting. Still it seems to be able to detect the forest fire in sub-second times, thus meeting the monitoring purpose. I hope to be telling you more about it soon.