  Power systems are undergoing unprecedented transformations with the
incorporation of larger amounts of renewable energy sources, distributed
generation and demand response. All these changes, while potentially making
power grids more responsive, efficient and resilient, also pose significant
implementation challenges. In particular, operating the new power grid will
require new tools and algorithms capable of predicting if the current state of
the system is operationally safe. In this paper we study and generalize the
so-called energy function as a tool to design algorithms to test if a
high-voltage power transmission system is within the allowed operational
limits. In the past the energy function technique was utilized primarily to
access the power system transient stability. In this manuscript, we take a new
look at energy functions and focus on an aspect that has previously received
little attention: Convexity. We characterize the domain of voltage magnitudes
and phases within which the energy function is convex. We show that the domain
of the energy function convexity is sufficiently large to include most
operationally relevant and practically interesting cases. We show how the
energy function convexity can be used to analyze power flow equations, e.g. to
certify solution uniqueness or non-existence within the domain of convexity.
This and other useful features of the generalized energy function are described
and illustrated on IEEE 14 and 118 bus models.
