Understanding TimeofUseTariffDischarge

Dear all,

I am trying to understand the TimeofUseTariffDischarge controller. However, I struggle a bit with understanding the ‘flow’ and terminology.

First of all a the bufferminutes are set in delaydischargerisklevel. This is used to set the risk of running out of juice before the end of the boundary space.

at a moment in time (14.00), DA price is fetched as well as predictions on production of consumption.
It is assumed that during the day consumption is equal to generation. Leaving the hours between sunset and sunrise as to be bridged.

So far so good (i hope)…
I want to understand the BoundarySpace class, if I understand correctly, this is the period where consumption>production .
subsequently targetperiods are calculated. What are ‘target periods’? all 15 min intervals within the boundary?

For every 15 minute period, the available capacity of the battery is calculated (in getAvailableEnergy) and the consumtion from grid (getRemainingCapacity) . However is this ran EVERY 15 minutes, for the entire prediction. or just for the coming 15 minutes?

I intend to improve the documentation with some flowcharts & class diagrams. However, these will be included in my report for university. if I make a pull request before my report is graded, the automated fraud checker will detect it and I can get in trouble for self-plagiarism :stuck_out_tongue:

Hi @Byonnem ,

First of all a the bufferminutes are set in delaydischargerisklevel. This is used to set the risk of running out of juice before the end of the boundary space.

Yes, relying solely on predictions can lead to potential issues such as battery drain when the actual energy consumption exceeds the predicted consumption, or conversely, a substantial amount of unused energy remaining in the battery. This situation poses a risk of being unable to fully utilize the self-consumption from the PV system.

at a moment in time (14.00), DA price is fetched as well as predictions on production of consumption.
It is assumed that during the day consumption is equal to generation. Leaving the hours between sunset and sunrise as to be bridged.

Yes, Exactly.

What are ‘target periods’? all 15 min intervals within the boundary?

In essence, target periods refer to high-price periods. These periods are determined based on the battery’s energy availability and the user’s predicted consumption. The primary objective of the controller is to economically utilize the energy stored in the battery for consumption in boundary space. Therefore, during these high-price periods, we depend solely on the battery for consumption, while relying on the grid for the remaining periods.

However is this ran EVERY 15 minutes, for the entire prediction. or just for the coming 15 minutes?

The controller operates in 15-minute intervals, meaning that every 15 minutes, it retrieves predictions from the prediction service, considers the current battery capacity, and recalculates the battery schedule. This frequent update helps prevent deviations caused by inaccurate predictions. For instance, if the battery was over-discharged or under-discharged in the previous period, it adjusts the target periods for the upcoming hours accordingly, increasing or decreasing them as necessary. By regularly updating the battery schedule, the controller ensures optimal utilization and avoids any negative impact from past deviations.

Thank you,
Sagar

2 Likes

Wow, thank you for the eleborate and quick response @venu-sagar . Tomorrow morning I will take a look at the code, with this note besides it. If no further unclearities remain, i’ll mark it as solution :slight_smile: otherwise, you’'ll hear me again tomorrow :slight_smile:

Kind regards,

Menno