Model Predictive Control for Energy Optimization in Generators/Motors as Well as Converters and Inverters for Futuristic Integrated Power Networks