Smart and agile power systems