Memuat
Memuat
Watch every step above performed live, with English narration.
0 plays
Class book
Page 1 / 5
Cover: Class Manajemen Energi Microgrid MPC #3: Basic Rule-Based Energy Management Strategy
Click a page or use ◀ ▶ to turn · swipe on mobile · to enlarge
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Class Manajemen Energi Microgrid MPC #3: Tutorial Microgrid MPC Energy Management System (EMS) Rule-Based: Basic Strategy”.
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.
This is the final result, the simplest energy management strategy, rule-based, simulated for an entire year. Electricity costs have dropped by about 6%, but look at the battery SOC, it's almost always empty exactly when the tariff is the highest. Let's start. Hello, welcome to episode three of the microgrid energy management series based on MPC. Most commercial hybrid inverters use simple rules. Store surplus in the battery, use the battery when there's a shortage, and the rest from PLN. Today we are writing this strategy, making it a benchmark, and finding its weaknesses.
Create a file named rule-based.py The cost function calculates the total purchase from PLN multiplied by the purchase price, minus the sales multiplied by the selling price. The rule-based simulation function runs hour by hour, and the net load is directly given to the battery. If the net is positive, the battery discharges, if negative, the battery charges, of course limited by the battery model. The remaining energy that the battery cannot handle becomes import or export to PLN.
Now let's compare it with the condition without a battery. Run Without a battery, electricity costs for a year are about Rp 299.5 million. With rule-based, about Rp 281 million, saving 6.2 percent. Import from PLN is 255 MW hours, and the battery moves 60 MW hours of energy. But notice, 67 MW hours of import occurs during WBP, the most expensive hours.
Let's look at August 1 Week. The top graph, the battery discharges whenever there's a shortage, including the morning when the tariff is still low. The bottom SOC graph, with red marks as WBP hours. SOC is almost always at the lower limit of 20% when entering WBP, because the energy has already been used earlier, and the battery is only charged from rare surplus PV. This rule does not know the future and does not know the price.
Done. We have already written the rule-based strategy, simulated it for a year, calculated the cost and savings, and found its weakness during peak load hours. In the next episode, we formulate a model predictive control that considers forecasts and prices. 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 modeling solar panels, wind turbines, and batteries, rule-based strategies, up to model predictive control with CVXPY, as well as offering Python programming courses for electrical engineering students. Want to master the entire series, from weather data to cost comparison? All six episodes, complete with PDF step-by-step guides and source code, are available to premium tutorial subscribers. Subscribe starting at Rp69.000 per month, save 28% with the 12-month package, or pay once Rp999.000 for lifetime access. Want a single class? Buy the single class with lifetime access. Subscribe now at the premium page cerdasinovasidigital.com Contact us via WhatsApp, or visit cerdasinovasidigital.com 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 →