Memuat
Memuat
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Class Microgrid Energy Management MPC #6: Cost Comparison, Battery Life, and Grid Usage”.
Other ways we can help with Python.
Learn with a mentor
Scheduled Simulation & Engineering courses with live guidance and a certificate.

Course/Training Ansys ~ Heat Transfer and Heat Flux Analysis
★ 5.0 (10)

Course/Training MATLAB — MATLAB App Design: The Ultimate Guide to MATLAB Apps
★ 5.0 (10)

Course/Training Ansys — Airflow Simulation of a Car Radiator with ANSYS
★ 5.0 (9)
Have it built for you
No time to learn Python? Our team can do the project for you.

Matlab Development Service — Complete Neural Signal Processing and Analysis Zero to Hero
★ 5.0 (59)

Ansys Maxwell Development Service
★ 5.0 (50)

Petrel Development Service
★ 5.0 (14)
Get notified about new Python classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
Here is the final result, the comparison of 4 strategies over a year. MPC saves about 13% of electricity costs, more than twice the rule-based approach, or about 20 million rupiah per year. But there is a cost to the battery. Let's start. Hello, welcome to the final episode of the MPC-based microgrid energy management series. Energy management research is not enough to just report costs. We also need to look at PLN electricity usage during peak load, and how quickly the battery degrades. Today, we are comparing the 4 strategies in detail.
Create a comparison .py file We load the MPC results from episode 5 and re-run the rule-based strategy on the same period. Battery life is estimated from the number of full cycles equivalent, energy passed divided by twice the usable capacity. Lithium batteries are assumed to last 4,000 cycles, with a maximum calendar life of 15 years. The table prints the cost, savings, total import, import during peak load, cycles per year, and estimated battery life. Run
Without battery, annual cost is Rp. 299 million Rule-based Rp. 280,6 million, saving 6.1 percent Perfect MPC Forecast Rp. 258,9 million, saving 13.4 percent And MPC with Noise Rp. 260,2 million, saving 13 percent, saving Rp. 20,5 million per year compared to rule-based. Import during peak load drops from 87 to only 14 MW hours. What is the price? MPC battery works about 340 cycles per year, so its life is about 11.7 years, whereas rule-based only 132 cycles and lasts up to the calendar limit of 15 years. Let's look at the graphs. Top left annual cost of the four strategies Top right SOC 5 days, MPC fills up fully before the red line and discharges exactly at the expensive hour, whereas rule-based stays below. Bottom left stable monthly savings throughout the year, MPC about twice the rule-based. Average import rate per hour on the bottom right, MPC intentionally buys more during the cheap daytime hours, then imports almost zero during WBP hours. With higher degradation cost in the cost function, MPC can be adjusted to be more cycle-efficient.
Done, and the series is complete. We have built a comprehensive research on microgrid energy management, including weather data and PV and wind turbine models, battery models, rule-based strategies, MPC formulation with CVXPY, simulation with a yearly rolling horizon and trending forecasts, up to cost comparison and battery lifespan. For further research, try PV forecasting with LSTM, peak load or demand charge costs, island mode when PLN is out, or stochastic MPC. Thank you for following this series. Currently working on a thesis, dissertation, or research in the field of microgrids, batteries, and renewable energy? Cerdas Inovasi Digital helps implement energy optimization, from solar panel, wind turbine, and battery modeling, rule-based strategies, up to model predictive control with CVXPY, and also opens Python programming courses for electrical engineering. Want to master the entire series, from weather data to operational cost comparison? All six episodes, complete with PDF step-by-step guides and source code, are available for premium tutorial subscribers. Subscribe starting at Rp69.000 per month, save 28% with the 12-month package, or one-time payment of Rp999.000 for lifetime access. Thank you for watching, see you in the next episode.
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →