Hi,
I was wondering if anyone could help with this counter problem for an energy storage project. I have 1 months worth of power outputs at 10 minute intervals, and a corresponding average for this period. The aim is produce a constant power supply at this average. Ie, anything above average can be stored and used to compensate for when the energy falls below average.
Some example data is:
Capture.PNG
Time ~ Energy surplus/deficiency ~ Cumulative energy
1 / 150 / 150
2 / 100 / 250
3 / 50 / 300
4 / -50 / 250
5 / -100 / 150
6 / -200 / -50
7 /-100 / -150
8 /50 / -100
9 / 150 / 50
10 /100 / 150
I have plotted the cumulative energy over time to show how much energy I have in storage during that time period. However, it is not possible to have -ve storage. Therefore, when this occurs, I would like to reset the cumulative counter to zero and base the following summations on this starting point. As I have so much data it is not practical to do this manually and I was wondering if there is a way of doing this quickly?
Any help would be greatly appreciated.
Thanks.
Bookmarks