  Hierarchical microgrid control levels range from distributed device level
controllers that run at a high frequency to centralized controllers optimizing
market integration that run much less frequently. Centralized controllers are
often subdivided into operational planning controllers that optimize decisions
over a time horizon of one or several days, and real-time optimization
controllers that deal with actions in the current market period. The
coordination of these levels is of paramount importance. In this paper, we
propose a value function-based approach as a way to propagate information from
operational planning to real-time optimization. We apply this method to an
environment where operational planning, using day-ahead forecasts, optimizes at
a market period resolution the decisions to minimize the total energy cost and
revenues, the peak consumption and injection-related costs, and plans for
reserve requirements. While real-time optimization copes with the forecast
errors and yields implementable actions based on real-time measurements. The
approach is compared to a rule-based controller on three use cases, and its
sensitivity to forecast error is assessed.
