Advanced controls on energy reliability, flexibility and occupant-centric control for smart and energy-efficient buildings