A home battery might be called “smart” because it connects to an app that allows the home owner to track their usage. But wait, what if there’s more? Let’s take a look at how you can make a battery smarter by connecting it to external inputs such as daily energy prices and weather. This can lower the pressure on the grid by reducing the peak usage, and when switching to a dynamic pricing contract this can also save you money. In this blogpost we demonstrate a system that can save up to 35% on electricity costs.
The simulation tool described in this blogpost can be used by everyone. Go to https://smartenergy.ml6.eu/ to test out our tool by running a simulation on your own data.
A typical home battery will be charged when a household produces more energy than it consumes, e.g. when solar panels are producing electricity. The battery will then be used when there is enough load available to replace the direct consumption from the grid. We will demonstrate that if you switch to a dynamic pricing contract, you can save money by proactively charging a battery from the grid at a time of low energy cost instead of consuming directly from the grid when energy prices are high.
This article will explain what dynamic pricing is, it will show an overview of how you can build a smart controller to communicate with the inverter of a battery and steer its behaviour and it will demonstrate with a simulation how this technology can save money.
In different countries in Europe energy providers are now making available dynamic prices on the private market. For this blogpost we are focussing on the Belgium market. As of October 2022, the largest electricity providers in Belgium are by law obligated to offer a dynamic pricing contract. Dynamic contracts are contracts where the price is determined per hour. Prices are set on the previous day and are determined based on the prediction for the next day for the electricity production and consumption. The reason that this contract exists is because of the green transition and the intermittency of renewable energy sources. This way individuals or companies can adapt their energy usage based on the price, which corresponds to matching their consumption to when there is high production of electricity from the sun and the wind and/or low consumption. This will lower the pressure on the grid by reducing the peak usage.
Do you consume electricity during a certain time of the day? Then you pay the price of that hour. A dynamic contract is only possible if you have a digital meter. This type of contract is mostly interesting if you are able to adapt your electricity consumption based on these prices. A classic example is to charge an electric car when prices are low or to charge a home battery (as explained here). In this article a dynamic pricing contract of Engie will be used to run our calculations and simulation.
Some key observations from analysing the day ahead prices from 2022 are:
The most essential parts of the architecture are:
The inverter client and the controller will be explained in more detail to understand further how the whole setup works.
Inverters are a part of any modern solar setup. Their main function is to convert the direct current (DC) coming from the solar cells into alternating current (AC) which can be used by most household appliances. When a battery is part of the system the inverter is able to store the energy that is not being consumed in the battery. Inversely it can use the energy stored in the battery to help power the household grid.
This system makes decisions based on the current production and consumption of energy but this can be improved by making it smarter. For this we needed to be able to do 2 things:
Our test setup has a Sofar inverter with a battery and solar panels. We needed a way to communicate with this system and came across this guide to build a small piece of hardware.
In essence it is a microcontroller that is wired to the inverter and uses the modbus protocol to communicate with the inverter. The microcontroller is also connected to a message bus (MQTT) where it can publish the metrics and listen for commands. This part of the setup is dependent on what kind of inverter you have and what communication methods it supports (some have wifi for example which makes this easier).
We then wrote a piece of code that was responsible for communicating with the microcontroller (and by extension the inverter). This inverter client was able to read the data published by the microcontroller and make it available to the controller while also listening for instructions coming from the microcontroller and passing those along to the microcontroller/inverter.
Important to note is that we don’t disrupt the way the inverter works since this can be very dangerous (like overcharging a battery). We only read data and give higher level commands that override the default decisions the inverter makes like “charge the battery for 15 minutes”.
The controller is responsible to process all the input and make a charging decision for the battery. Two controllers were implemented: one baseline controller with a simple charging strategy and one smart controller that applies a more dynamic cost saving strategy.
The baseline controller only has one rule: to charge the battery between 1:00 and 6:00 in the morning because this is historically the cheapest moment of the day to charge the battery. This is used as a baseline to compare with the smart controller.
The smart controller on the other hand will look at two data inputs to decide the charging strategy: the current percentage of the battery and the cheapest moments for charging in the next hours. If the battery level is low, it will charge in the cheapest moment of the next hours. The higher the battery level the more patience it has to pick the most ideal charging moment.
In order to calculate the impact of our setup, we built a simulator because the setup didn’t gather enough data yet.
To test how well the setup works, a simulator was included that can simulate different scenarios based on extracted consumption data per 15min from a smart meter from Fluvius. The following scenarios are supported:
The simulator works with the exact same controller and entso-e client used in our real-time architecture. There is a simulated inverter implemented to simulate the energy usage based on the consumption and the actions decided by the controller.
A dashboard was created to show the different results from the simulations to allow a user to compare the energy consumption as is today with a scenario where the user has a smart battery. We tested our simulation for 5 different households with a battery of 10 kWh and the average cost saving is around 35%. This is a very nice first result, but of course this should be further validated by testing the real-time solution and by actually switching to a dynamic pricing contract.
Do you want to try it out yourself? Go to https://smartenergy.ml6.eu/ to test out our tool on your own data.
One challenge in this project was to find out all the details about the dynamic pricing and to make an accurate estimation of which costs there are. This is quite hidden and not a lot of energy providers offer this kind of contract. We learned a lot about the current offerings and limitations. With Engie, they offer information about it on their website, but up until recently it was not so easy to switch to this contract. De Standaard mentions that Engie had less than 200 clients using this contract in 2022. In the end we have a good understanding of how the market works today.
One challenge for the future is that we cannot predict how the dynamic pricing contract will evolve, especially when the prices are fixed a day beforehand on the day ahead market. If more households switch to this contract it can be very beneficial because then the consumption will be more adapted to the capacity of the grid. So in the coming years it is expected that this will remain interesting. But if too many households would switch contracts and adapt their consumption then it might become a lot less interesting because the price would be more averaged out. So the biggest uncertainty for the future is whether the price fluctuations on the day ahead market will stay as interesting as they are now. It is however expected that flexibility on the production side is going to keep increasing and that it will probably outpace consumption-side flexibility in the coming years.
ML6 does research into new emerging technologies to investigate how AI can bring value to the market. This research project was part of our Xmas projects. Thanks to Matthias Feys, Georges Lorré, Julien Schuermans, James Branigan, Jules Van Reempts and Robbe Sneyders for contributing to this project and blogpost.
Xmas Projects are hackathon-like projects in which people lay down their day-to-day job for some time and get together out of common interest to explore new tools, learn tech and make an impact! Read more about it in this blogpost about Xmas projects.
‍