Energy management systems and direct digital control