Closed fremk closed 8 months ago
Hi Karim,
We have a very similar issue to this one here: #72.
That being said, depending on what device you want to control, the "Load Fraction" option you've found might be sufficient. The direct load control is really important for heat pumps because performance is very dependent on outdoor (and to a lesser degree indoor) temperature. So for a HP, limiting things to 30% of the load won't necessarily limit it to 30% of the capacity because the efficiency isn't constant. If you have a furnace, electric resistance, or baseboards, Load fraction could work.
Another potential option here, if what you really want is to just force equipment off, is to use the thermostat schedule to get your desired behavior. You could set the heating setpoint to a very low temperature (say 50F) during periods when you want to force the equipment to be off. This approach is also currently supported in BEopt: you can use the hourly setpoint schedule feature to create an 8760 hourly schedule of setpoint temperatures for the full year. If on/off behavior is what you're looking for, you would use the normal setpoint when you want it on and something arbitrarily low enough to never turn on heating like 50F when you want it to be off.
Hope this helps! If not let me know and we'll try to either figure out an appropriate workaround or add this into our development queue.
Thank you for your quick reply :smile: To be honest, ideally, I would like to test with equipment having constant power: so either they're on (at a constant power, could be their maximum) or off. So instead of having this figure for the HVAC electric heating power: It would look like something like this (hand drawn approximation just for explanation purposes :sweat_smile:):
Just to give you a quick overview of what I'm trying to accomplish, I basically want to experiment with Neural Networks in HVAC control. Having said that, I need to train and test them on accurate data hence my need for your simulator. The NNs would take a number of parameters including set point temperature and outside temperature and generate the controls which would be either ON or OFF without varying the power of the equipment.
Briefly said, not only I want to manually control the heating equipment in an on/off manner but also I'd like the initial simulation to be conducted with this constraint in mind, in order to have the ON/OFF control ground truth generated by the simulator. (By initial simulation I mean setting a temperature set point and letting the simulator generate the ON/OFF signals to reach that setpoint)
Another potential option here, if what you really want is to just force equipment off, is to use the thermostat schedule to get your desired behavior.
Concerning this part, forcing the equipment off is easily done using the 'Load Fraction' control. For example, in this image, in the 'Control' plots, I forced the boiler off between 12h and 21h compared to the baseline where it is always on. But on the other hand, what I would like to address is the fact the the power is not constant when the equipment is on.
I hope everything I said is understandable, if something is not clear please let me know
Thank you again for your time!
Edit: Maybe managing the Duty Cycle can lead to the desired behavior?
You will get On/Off behavior (which is much more realistic) in OCHRE by default with shorter timesteps (pretty sure the threshold is 5 minutes or less). At larger timesteps, you start having multiple cycles per timestep so we go to the EnergyPlus default approach of perfectly maintaining setpoint and having HVAC modulate to meet the load rather than discrete cycles.
What type of HVAC equipment are you using in your example? Not all HVAC has constant power consumption when it runs. Any heat pump will have it's performance be affected by outdoor and indoor temperatures, so while I'd expect discrete cycles (so long as your timestep is small enough) I wouldn't expect it to look exactly like a square wave. If this is an electric boiler, maybe you're using larger timesteps? If not there's a few other things we can look at, but that's my first guess at what's happening here.
Thank you Jeff, you're right. I was using a timestep of 10 minutes but once I dropped it to below 5, the simulator started using hysteresis and controlling the temperature using on/off signals only. I think that's all for me, I should be able to experiment freely and manipulate your simulator as I intend to. Might I add that I was able to control the input power of the electric boiler as I'd like by using the duty cycle as outside controller. And one last small question, do you know of any efficient way to generate multiple .xml files (each for a distinct building)? It wouldn't really be practical to mass generate using BEopt software interface. I apologize if my questions are basic or have straightforward answers but I'm quite new to the HVAC domain so I'm not really familiar with everything yet :sweat_smile:
Thank you so much for your time!
Great, glad that's what it was! We should probably have this behavior be better documented, so it doesn't confuse others. In most of our big production level runs, we use 1 minute timesteps, especially if we're actually doing cosimulation with the grid model or layering on a more advanced HEMS controller. I'll take a look at the documentation and see where we can make this more prominent.
As far as generating multiple HPXML files: it depends a lot on what you want to vary between them. There's two paths to generating HPXML files for OCHRE, you can either use ResStock or BEopt. If you want to get a representative sample of a certain region, ResStock is the way to go. If you want to model a specific building, I'd use BEopt, which sounds like the path you took. BEopt does have the capability to do parametric runs, so if you want to look at a building with say 3 different levels of wall insulation I'd set up a parametric in BEopt and use those resulting HPXML files.
If you have BEopt questions, Unmet Hours is the place to ask (use the "beopt" tag and it'll be easier/faster for us and others to find any questions). Depending on the question it might be me answering it, but putting it there will make it easier for other BEopt users to find it.
Hello @jmaguire1, I hope you're doing well! I have a small question regarding the simulated temperature; although I have experimented with multiple dwelling types, different heater capacities, heater types, insulation etc. and different weather settings as well as time resolutions, it doesn't seem like there is inertia in the system. What I mean by inertia is that when, for example, we turn the heating on till the inside temp reaches the setpoint temperature + deadband/2, and then turn it off, the temperature should still go up a bit or at least stagnate for a small period of time before starting to decrease again. I noticed that the simulator doesn't reproduce this inertia, at least with the current parameters I am using: when we turn the heating off, the temperature directly starts to decrease instead of stagnating or increasing a bit more. So my question is, is there any way I can reproduce such behavior, so that the simulated temperature is as accurate as possible? Or am I doing something wrong? Regards, Karim
Current behavior: Desired, more logical, behavior:
Hi Karim @fremk ,
I am well, hope you are too!
In the future it'd be nice if you could make a new issue, it's just easier for us to find in the repo than if you comment on something that's already closed.
The short answer is: there isn't an easy way to do this.
The longer answer: There's a lot of modeling simplifications we make that make this really hard to do. One is that this is a single zone model, where the whole building is at a uniform temperature. The other, and maybe more important here, is that we're not explicitly modeling ducts (and therefore ducts have 0 volume). In real HVAC systems, when the heat (I'll use heating with a heat pump as an example here), it takes a few minutes for that heat to reach the space. When it does, it slowly diffuses throughout the space, until it's eventually felt (or seen by a thermostat or temperature probe). At start up, it takes a few minutes for everything to come up to temperature, so the heat delivered in the first few minutes isn't at the desired supply temperature. Eventually it does reach a steady state, and you get heat being delivered at the normal rate. When the heating cycle ends, generally the air handler runs for a few more minutes, which flushed out the ducts, so lower temperature air is being delivered until the ducts are fully flushed at which point the space temperature starts dropping.
These aren't easy things to model, and it'd require at least an explicit duct model. We don't have any plans to do this kind of work anytime soon, this is more suited to a much more detailed modeling tool like EnergyPlus using Airflow Network or Contam or something along those lines.
Real field data is also a lot messier, you generally but don't always see this. Here's an example from a home where we had room by room temperature measurements for a single day:
You see this behavior some cycles, but it's hard to say EVERY cycle acts like you're describing. This is a pretty small impact that's hard to pick up. Out of curiosity, what do you need or want this feature for? It's a whole bunch of extra detail and modeling effort for not that much benefit in my opinion.
Hi Jeff @jmaguire1 , I'm good too thanks :smile:
In the future it'd be nice if you could make a new issue, it's just easier for us to find in the repo than if you comment on something that's already closed.
I'll keep that in mind, sorry about that.
Thank you for your clarification, I can imagine how much complexity that would add for not alot of gain. Personally I am looking for the best possible temperature simulation for two main reasons:
Interesting use case! It might be worth looking into OCHRE Gym too. @pemami4911, see above for another ML based building control set up.
@fremk: No worries on where this got posted! It'll also make it easer for anyone else to see if they have a similar question, but we get notifications even if it's a comment on a closed issue, so no big deal.
If you haven't already, you might want to look at ResStock , open source on GitHub, as a way to generate the thousands of models you're considering. It's US specific but somewhat integrated with OCHRE (we can take hpxml and schedule files generated by ResStock as direct inputs in OCHRE), so it's a relatively easy way to generate a whole bunch of realistic models if you don't already have a plan for that.
Someday I would like to improve our duct models, but it's not an urgent need and would require a lot of work (not just changing the ducts but duct leakage also affects infiltration in the zone where the duct is). Not a high priority but if it ever happens I'll let you know.
Hi @fremk, I've started working on systematically generating residential buildings for OCHRE Gym with precisely specified attributes with buildstockbatch's precomputed_sampler. This way, you aren't limited to what's in ResStock. The buildings I've generated this way so far are available here: https://github.com/NREL/ochre_gym/tree/main/ochre_gym/buildings and I can provide more details if interested.
I think what @pemami4911 is suggesting is more in line with what you're looking to do @fremk, wanted to mention ResStock in case it's relevant later but the OCHRE Gym is much more similar to your use case.
Hello @pemami4911 @mnblonsky, thank you for your responses! Although generating a very large number of buildings with different parameters was a challenge, I managed to kind of solve it (at least with OCHRE) by using the 'modify_hpxml_dict' argument when initializing the dwelling. I created a custom function that:
I know it is very limited in terms of building geometry and architecture since it is dependent on the initial hpxml file that I use and then modify but for now I think it gets the job done, at least for my initial experiments. Though, I think It's better to generate new .hpxml for each case so I'm definitely interested in your solution @pemami4911, I'll look into it but I could definitely use the hints.
Hello, I was wondering if there is any way to control the HVAC heating equipment (Boiler, furnace etc.) directly by their power? My goal is to test control algorithms that give on/off signals to the boiler (when set to on the boiler should operate at a constant power) and I'd like to see how the temperature would evolve following that. Although I saw that you have the 'Load Fraction' control, but this only controls the state of the boiler, but not the power it consumes: if i set it to on, the power consumed by the boiler is dependent on the heating setpoint and varies continuously between 0 and 40kW.
This is all based on tests i conducted on your user_tutorial.ipynb and .xml file that you have provided, I don't know if there are types of boilers that I could use that would allow this, so any help would be appreciated! Best, Karim