Breakthrough-Energy / PowerSimData

Simulation framework
https://breakthrough-energy.github.io/docs/
MIT License
52 stars 40 forks source link

Battery cycling #684

Closed Mingze-Li128 closed 2 years ago

Mingze-Li128 commented 2 years ago

:beetle:

Bug summary

We add 4 batteries in the Texas grid. However, the battery solution looks weird, and we didn’t see the battery is doing any cycling.

We enforced the terminal SOC to be fixed at 50% of maximum SOC and expected the battery to reach to terminal SOC regardless of the economically consideration. However, we were also not seeing the desired terminal SOC.

Code for reproduction

scenario.change_table.add_storage_capacity(
    [
        {"bus_id": 3002011, "capacity": 750, "duration": 1, "terminal_max": 0.9, "terminal_min": 0.1, "OutEff": 1, "InEff": 1, "energy_value": 5},
        {"bus_id": 3003048, "capacity": 750, "duration": 1, "terminal_max": 0.9, "terminal_min": 0.1, "OutEff": 1, "InEff": 1, "energy_value": 5},
        {"bus_id": 3005055, "capacity": 750, "duration": 1, "terminal_max": 0.9, "terminal_min": 0.1, "OutEff": 1, "InEff": 1, "energy_value": 5},
        {"bus_id": 3007366, "capacity": 750, "duration": 1, "terminal_max": 0.9, "terminal_min": 0.1, "OutEff": 1, "InEff": 1, "energy_value": 5},
    ]
)

Actual outcome

The output produced by the above code, which may be a screenshot, console output, etc. image

Environment

Please specify your platform and versions of the relevant libraries you are using:

BainanXia commented 2 years ago

Hi @Mingze-Li128 , thanks for bringing this up. Learning from the inputs, I could see you are running a scenario with 1 hour interval and 4 storage devices with 1 hour duration. Given the underlying optimization is a multi-period DC OPF, i.e. a sequence of consecutive DC OPF with each of them being 1 hour length, recall the mathematical formulation here, my guess is the storage devices will be charged only if the objective function can be further minimized for the single hour, which is rarely the case. Not sure whether it's worth the effort to test it out by creating a scenario with interval length greater than 1 hour?

rouille commented 2 years ago

Hi @Mingze-Li128, did you try to increase the interval size as @BainanXia suggested?

Mingze-Li128 commented 2 years ago

Hi @Mingze-Li128, did you try to increase the interval size as @BainanXia suggested?

Yes, it seems the results become more meaningful with larger interval. We are doing more testings with gurobi solver.

BainanXia commented 2 years ago

Closing this issue as the behavior is as expected based on the current setup.