  Hierarchical architectures stacking primary, secondary, and tertiary layers
are widely employed for the operation and control of islanded DC microgrids
(DCmGs), composed of Distribution Generation Units (DGUs), loads, and power
lines. However, a comprehensive analysis of all the layers put together is
often missing. In this work, we remedy this limitation by setting out a
top-to-bottom hierarchical control architecture. Decentralized voltage
controllers attached to DGUs form our primary layer. Governed by an MPC--based
Energy Management System (EMS), our tertiary layer generates optimal power
references and decision variables for DGUs. In particular, decision variables
can turn DGUs ON/OFF and select their operation modes. An intermediary
secondary layer translates EMS power references into appropriate voltage
signals required by the primary layer. More specifically, to provide a voltage
solution, the secondary layer solves an optimization problem embedding
power-flow equations shown to be always solvable. Since load voltages are not
directly enforced, their uniqueness is necessary for DGUs to produce reference
powers handed down by the EMS. To this aim, we deduce a novel uniqueness
condition based only on local load parameters. Our control framework, besides
being applicable for generic DCmG topologies, can accommodate topological
changes caused by EMS commands. Its functioning is validated via simulations on
a modified 16-bus DC system.
