Modeling, Optimization and Control of Hybrid Powertrains