Memuat
Memuat
Watch every step above performed live, with English narration.
0 plays
Class book
Page 1 / 7
Cover: Class Microgrid Energy Management MPC #1: Microgrid Components & PV, Wind, Load, and Electricity Tariff Profiles
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 Microgrid Energy Management MPC #1: Microgrid Components & PV, Wind, Load, and Electricity Tariff Profiles”.
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 annual energy profile of a microgrid in Yogyakarta, with solar panels, wind turbines, and building load hour by hour, complete with higher electricity tariffs during peak load periods. It turns out the wind in Jogja is much weaker than expected. Let's start. Hello, welcome to the research tutorial series, hybrid microgrid energy management with PV, wind, and battery based on model predictive control. A microgrid is a small electrical network, such as a campus or factory, that has its own generation and battery, but remains connected to PLN. The main question is, when to charge the battery, when to discharge it, and when to buy electricity from PLN to minimize costs? In this 6-episode series, we build everything using Python, data, battery model, rule-based strategy, MPC formulation, annual simulation with CVXPY, up to cost comparison. In the first episode, we introduce the components and the data.
We open the terminal through the terminal menu, new terminal, then install nampai, pandas, matplotlib, and CVXPY, the convex optimization library that will be used for MPC. The data is hourly weather data for the city of Yogyakarta in 2023 from Open Meteo, Solar radiation, temperature, and wind speed, plus a synthetic load profile of an office building. The ready-to-use dataset is available in the customer's premium project file.
Create a microgrid data file named microgrid.py. The components are, 250 kW peak solar panels, two 10 kW wind turbines, and a maximum PLN connection of 250 kW. PV power is proportional to solar radiation, decreases by 0.4 percent per degree increase above 25 degrees, with a rating of 0.85 for cable and inverter losses. Wind turbines use a power curve, 0 below the cut-in speed of 2.5 meters per second, increases proportionally to the cube of speed up to rated power at 10 meters per second.
Electricity tariff uses a peak load time pattern, outside peak load at Rp 1.035 per kW hour, and from 17 to 20 o'clock, it is half as expensive. Excess electricity can be sold to PLN at a lower price. The load function reads CSV, calculates PV and wind power, price, then net load, load minus generation. Positive net means deficit, negative means surplus.
Create the underscore microgrid.py exploration file and run it. Annual load is 607 MW hours, PV generates 375 MW hours or about 62 percent of the demand, while wind only produces 5.3 MW hours. PV vector capacity is 17.1 percent, but wind is only 3 percent, because the average wind speed in Yogyakarta is only around 2.7 meters per second. Surplus only occurs 15 percent of the total hours. Let's look at the graph.
One week in August, load is high during working hours, PV peaks in the daytime, and wind is almost invisible. Weekend load is much lower so PV is surplus. Monthly energy shows PV is lowest in February, rainy season peak. Average hourly profile shows load is still high after sunset, exactly during high tariff hours. This is an opportunity for batteries.
Done. We have now learned about microgrid components, modeled solar panel and wind turbine power from weather data, Creating load profiles and tariff profiles as well as calculating net load In the next episode, we will model the battery state of charge efficiency and its limitations Currently working on a thesis dissertation or research in the field of microgrids batteries and renewable energy Cerdas Inovasi Digital helps with energy optimization implementation from solar panel modeling wind turbines and batteries rule-based strategies up to model predictive control with CVXPY as well as offering Python programming courses for electrical engineering Want to master the entire series from weather data to cost comparison? All six episodes complete with step-by-step PDF 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 just one class? Buy single class with lifetime access. Subscribe now on the premium page cerdasinovasidigital.com. Contact our 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 →