  This paper presents a convex reformulation of a nonlinear constrained
optimization problem for Markov decision processes, and applies the technical
findings to optimal control problems for an ensemble of thermostatically
controlled loads (TCLs). The paper further explores the formulation and
solution of a (linearized) AC optimal power flow problem when one or more
ensembles of TCLs are connected to a power network. In particular, a receding
horizon controller is proposed, to simultaneously compute the optimal
set-points of distributed energy resources (DERs) in the grid and the optimal
switching signal for the TCLs. This formulation takes into account hardware
constraints of the DERs, operational constraints of the grid (e.g., voltage
limits), comfort of the TCL users, and ancillary services provision at the
substation. Numerical results are provided to verify the effectiveness of the
proposed methodology.

Systems and Control;Systems and Control