Workshop Overview
This comprehensive 2-hour workshop introduces optimization and Model Predictive Control (MPC) techniques applied to electric vehicles and renewable energy systems. Participants will learn how to formulate and solve real-world optimization problems using CasADi and IPOPT.
What You'll Learn
- ✓ Formulate optimization problems for energy systems
- ✓ Implement solutions using CasADi Opti framework
- ✓ Understand Model Predictive Control concepts
- ✓ Apply optimization to EV and renewable energy problems
- ✓ Handle constraints and objectives effectively
- ✓ Troubleshoot common solver issues
Workshop Content
Part 1: Introduction & Foundations (35 min)
- Why optimization for energy systems
- Optimization problem anatomy
- Mathematical formulation
- Types of optimization problems (LP, QP, NLP)
Part 2: CasADi & Basic Optimization (25 min)
- CasADi Opti stack introduction
- Basic optimization examples
- Vector variables and constraints
- Understanding solver output
- IPOPT options and debugging
Part 3: Example 1 - EV Battery Charging (20 min)
- Smart charging optimization
- Time-of-use pricing
- Battery dynamics modeling
- Cost minimization problem
Part 4: Example 2 - Solar + Storage System (25 min)
- Solar energy + battery optimization
- Self-consumption maximization
- Grid interaction modeling
- Peak shaving strategies
Part 5: MPC Fundamentals (20 min)
- Model Predictive Control concepts
- Receding horizon optimization
- MPC vs. traditional control
- Real-time implementation considerations
Part 6: Example 3 - EV Trajectory Optimization (20 min)
- Bicycle model vehicle dynamics
- Minimum-time trajectory planning
- Track boundary constraints
- Energy budget management
Part 7: Wrap-up & Resources (10 min)
- Summary and key takeaways
- Additional resources
- Q&A session
Prerequisites
- Basic Python programming knowledge
- Understanding of linear algebra and calculus
- Familiarity with numerical computing (NumPy)
Software Requirements
pip install casadi numpy matplotlib jupyter pandas
Materials Provided
Jupyter Notebooks
Three complete Jupyter notebooks with executable code examples:
-
01_ev_battery_charging.ipynb
- Smart EV charging optimization
- Time-of-use electricity pricing model
- Battery state-of-charge constraints
- Cost minimization problem formulation
-
02_solar_battery_management.ipynb
- Solar + battery energy management
- Real solar generation data
- Grid interaction and peak shaving
- Self-consumption optimization
-
03_vehicle_trajectory_tracking.ipynb
- Bicycle model vehicle dynamics
- Minimum-time trajectory optimization
- Track boundary constraints
- Energy budget management
Access: Available in the Notebooks tab or open in Google Colab
Additional Materials
- Presentation Slides covering all topics
- Sample Data Files for realistic scenarios
- Helper Functions and utilities
Learning Outcomes
By the end of this workshop, you will be able to:
- Formulate complex optimization problems for energy systems
- Implement optimization solutions using modern Python tools
- Apply MPC techniques to real-world control problems
- Understand the trade-offs in energy management
- Debug and troubleshoot optimization problems
Workshop Schedule
| Time | Duration | Topic |
|---|---|---|
| 0:00-0:35 | 35 min | Part 1: Introduction & Foundations |
| 0:35-1:00 | 25 min | Part 2: CasADi & Basic Optimization |
| 1:10-1:30 | 20 min | Part 3: EV Battery Charging |
| 1:30-1:55 | 25 min | Part 4: Solar + Storage |
| 1:55-2:15 | 20 min | Part 5: MPC Fundamentals |
| 2:15-2:35 | 20 min | Part 6: EV Trajectory Optimization (Example 3) |
| 2:35-2:45 | 10 min | Part 7: Wrap-up & Resources |
About the Instructors
Lahcen Boulbalah and Taoufik Belkebir are experienced researchers and educators in the field of optimization and control. They have extensive experience in developing and implementing advanced control algorithms for robotics, electric vehicles and renewable energy applications.
Additional Resources
- CasADi Documentation: https://web.casadi.org
- IPOPT Documentation: https://coin-or.github.io/Ipopt/
- Research Papers and References (provided in notebooks)