Toward an intelligent community microgrid energy management system based on optimal control schemes