Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circuit sharing and pausing for Panels project TEA #119

Draft
wants to merge 53 commits into
base: dev
Choose a base branch
from

Conversation

JingWang-CUB
Copy link
Collaborator

@JingWang-CUB JingWang-CUB commented Apr 26, 2024

@JingWang-CUB JingWang-CUB linked an issue Apr 26, 2024 that may be closed by this pull request
@jmaguire1 jmaguire1 self-requested a review April 26, 2024 21:20
@jmaguire1 jmaguire1 added enhancement New feature or request Medium Priority labels Apr 26, 2024
# weather_path = os.path.join('path', 'to', 'weather_files')
weather_path = os.path.join(os.getcwd(), 'ResStockFiles', 'Weather')

end_use_names=['HVAC Heating Electric Power (kW)', 'HVAC Cooling Electric Power (kW)', 'Water Heating Electric Power (kW)',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need pool/spa pumps/heaters on this list? I was leaning towards not including those because our model isn't up to snuff, let me confirm with LBNL next time we talk.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only place this is used is to calculate the whole home amperage, where I think it deserves a discussion whether to monitor whole home power or whole home current. I think we might have discussed this last year but it's worth revisiting.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, don't we need to include all the uncommon electrical loads? Things like well pumps and freezers are only in a small % of homes but definitely affect whole home power.

If you don't already have it I can get you a list of all the ones that'd come up in ResStock.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should include all loads to make this general. I included these based on what loads there were for the Vermont homes that we simulated last year, but it's not an exhaustive list.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's everything that can show up but is in a small # of homes:

Extra Refrigerator
Freezer
Hot Tub Spa
Pool Heater
Pool Pump
Well Pump

If it's helpful I can also generate a .xml file for a home with all of these for testing through BEopt.

There's a few uncommon gas loads as well, like gas lighting. Not relevant here but just FYI.

Copy link
Collaborator

@jmaguire1 jmaguire1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Have we tested this at all? I'd be curious to see the results from a few test cases:

  • Circuit pausing where we had multiple pauses/year
  • Circuit sharing where CD is being paused.

# run_battery_controlled()
# run_water_heater()
# run_hvac()
# run_ev()
for i in range(1,2):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mnblonsky: Do you think it's useful to have an example of running level 1 and level 2 charging, or should we revert/comment this out if we're eventually going to merge this? Along with some other EV changes above.

with Pool(n_parallel) as p:
p.starmap(run_single_building, map_args)

my_print('All processes finished, exiting.')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mnblonsky: It might be useful to at least have examples of running multiple OCHRE runs locally? I know Andrew P was having to figure this out on his own too. Not like it's super hard but it's a common enough use case I'd like to package this into an example file (maybe not so project specific, we might have to modify this slightly and split it into it's own file for example purposes).

from multiprocessing import Pool
import pandas as pd

from ochre import Dwelling, Analysis, ElectricVehicle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I think we should split this across multiple files, especially if we want to merge this into OCHRE development. I'll call out specifically how I'd refactor this below, but: none of those reorg changes are required before we start running, it's a longer term change.

my_print('All processes finished, exiting.')


def run_multiple_local(main_folder, overwrite='False', n_parallel=1, n_max=None, *args):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be super useful to include as an example file, setting up multiple local runs. External people can't rely on HPC like we can.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function was written by Michael and I also find it very useful. I use this to test the controllers locally.



# create OCHRE building based on der type
if der_type == 'ev':
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be loading existing EV runs to save time, rather than regenerating EV load profiles on the fly?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also worry we might add/drop buildings from the analysis at some point and that'll mess up which home gets which EV across multiple runs. My preference would be to pregenerate EV load profiles and assign different buildings different EV profiles in a .csv so we can be sure it stays consistent across any runs we do for this project.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we could use pregenerated EV profiles. This work was delayed/canceled due to lack of budget. We can re-open it if needed.

return dwelling


def circuit_sharing_control(sim_type, dwelling, tech1, tech2, output_path):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd love to split circuit sharing and circuit pausing into their own separate file in bin. (or @mnblonsky might have a better suggestions for where it should live). But this is absolutely something that's going to be useful for other projects and I'd like to get it into develop.


control_signal = None

if tech2 == 'Clothes Dryer':
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all we need for this project, but: theoretically could we generalize this to other appliance end uses? I guess if it uses water as well as power that might get more complicated, but longer term it'd be nice to have this work for as many devices as possible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they are all cycle-based and follow the same control algorithm then we can expand this to more devices.

house_status = dwelling.update(control_signal=control_signal)

# get primary load power
if tech1 in ['Strip Heat']:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We excluded this, but good to have this capability. I think it's much harder to do in practice than it is to do in simulation.

@jmaguire1
Copy link
Collaborator

One more thought @JingWang-CUB: Do we have all the metrics we need for unmet EV load? For water heater and HVAC we track unmet loads, and can look at the difference between baseline and our run. I'm not sure we have something similar for EVs though? Have you looked for this/done any test runs to check?

@JingWang-CUB
Copy link
Collaborator Author

JingWang-CUB commented Jul 17, 2024

One more thought @JingWang-CUB: Do we have all the metrics we need for unmet EV load? For water heater and HVAC we track unmet loads, and can look at the difference between baseline and our run. I'm not sure we have something similar for EVs though? Have you looked for this/done any test runs to check?

I have looked at EV SOC at departure as a discomfort metric. This can be done as part of the post-processing. Is this something you're thinking of?

@mnblonsky
Copy link
Collaborator

One more thought @JingWang-CUB: Do we have all the metrics we need for unmet EV load? For water heater and HVAC we track unmet loads, and can look at the difference between baseline and our run. I'm not sure we have something similar for EVs though? Have you looked for this/done any test runs to check?

We have EV unmet load already. It's based on the departure SOC being lower than it would have been given immediate charging.

@@ -187,6 +187,8 @@ def __init__(self, envelope_model=None, use_ideal_capacity=None, **kwargs):
if use_ideal_capacity is None:
use_ideal_capacity = self.time_res >= dt.timedelta(minutes=5) or self.n_speeds >= 4
self.use_ideal_capacity = use_ideal_capacity
if self.n_speeds >= 4:
self.use_ideal_capacity = True
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmaguire1 , should we take out this here as well or is it ok to keep it?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we should keep this as is. All variable speed equipment actually is capable of modulating like "use_ideal_capacity" works.

JingWang-CUB and others added 28 commits August 13, 2024 16:03
This reverts commit f099d2a.

We need the tempering valve for the time being. We can more formally integrate this later, but since in our test cases WH setpoint is 140F with a tempering valve set to 125 F this is necessary for the current runs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Medium Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Circuit sharing and pausing control for panels project TEA
3 participants