corymosiman12 / dragg

Distributed Resource AGGregation (DRAGG) implements centralized MPC for residential buildings using an aggregator and residential building owner (RBO) model
MIT License
5 stars 5 forks source link

battery_only houses aren't prioritizing self-consumption #2

Open apigott opened 4 years ago

apigott commented 4 years ago

At some points (ts = [17,18]) the battery_only houses sell electricity back to the grid directly from their battery. This conflicts with the Equation 20 which claims that the power discharged by the battery is consumed behind the meter.

P{load}^{t-1} + P{ch}^{t-1} - P_{dis}^{t-1} >= 0 (Eq. 20)

Screen Shot 2020-05-15 at 1 52 05 PM

apigott commented 4 years ago

Equation 20 should be revised to the following, given that P_{dis} is restricted to be negative:

P{load} + P{ch} + P_{dis} >= 0 (NEW Eq. 20)

Rewritten to show that the magnitude of battery discharge is less than or equal to the load of all other systems:

P{load} + P{ch} >= |P{dis}|, where |P{dis}| = -P_{dis}

This can also be thought of as constraining P_{grid} to be positive which is anecdotally demonstrated in the revised optimal control strategy for Jason-INS3S

Screen Shot 2020-05-18 at 12 31 19 PM

Note that the time index t vs t-1 is irrelevant.