Welcome to the TRNSYS Users Forum.

The forum is a place where people can interact and have discussions about different topics involving the use of the TRNSYS software package. Here you can post topics for discussion or questions on using TRNSYS and get advice from other users or TRNSYS experts. This forum is not intended for detailed technical support. Users should contact their distributor’s hotline for such assistance.

Some tips for success on using the forum:

  • Follow the Forum Rules posted in Forum Administration.
  • There are categories for different types of topics and questions. Post your topic or question into the proper category.
  • Before posting a topic or question search the existing topics  (and the TRNSYS Users listserv archive or Post archive) to see if a similar topic or question has already been answered.
  • Use a descriptive topic name. Don’t use attention getting subjects, they don’t get attention and only annoy people.
  • State the version of TRNSYS and which add-ons your are using.
  • Include enough specific details for your topic of question to be answered. Just posting “Why am I getting an error?” without describing the specific error and what you are trying to do when you get the error will not receive a response that fixes your issue.
  • Remember when people help you, they are doing you a favor. Be patient, help people out by posting good descriptions of what you need help with, and be polite even if a response does not solve your issue.
  • Moderators may edit your post for clarity or move your topic to a more appropriate category.

Notifications
Clear all

Semi-predictive control with future values

1 Posts
2 Users
0 Reactions
282 Views
0
Topic starter

Hey,

I am working on the control for a hybrid heating system with a heat pump and a biomass boiler.
I want to implement a cost oriented control strategy. Therefore the cost of operating the heat pump with a variable electricity price and using the biomass boiler with a fixed biomass price should be compared. As the boiler runs for several hours, I want to compare the cost for the next xxx hours at every simulation timestep.
Further, some values will be varied in a parametric study, such as the capacity/runtime of the boiler, which makes it a little more complicated.

For now, I want to use historic data for wheather data and electricity prices, further I use a input file which has the momentary heating demand. So I do have most of the values I need for the calculation.

What changes during the simulation is the following:
- the return temperature varies, as the HP is connected to a storage tank and therefore I can't predict the Temperature. With the return temperature the COP changes and therefore the cost of operating the HP.
Until now, I have no idea how to adress this issue, maybe someone has an idea.
For the moment I would try to use the results of a historic run for decision making, which could result in "wrong decisions" during the simulation.

What changes between simulations during the parametric study:
- the runtime of the boiler. Therefore it would be great if the future cost for operation would be calculated with all historic data provided at the beginng of each run, instead of providing the data with the input file, as I'd have to change this for every change of the runtime of the boiler.
I was thinking about a connection to Matlab but I haven't done it before and wanted to ask for advice before starting something that might not help in the end 😀

I hope it became clear what I want to do, otherwise please feel free to ask 🙂

Best
Jan

1 Answer
0

There isn't currently a way in standard TRNSYS to run a simulation for xxx hours, then "rewind" and make a control decision based on the results at the xxx-th hour. A colleague of mine has done some work to this end, but to date it's only been implemented in specific scenarios, with a TRNSYS kernel and Types specially written to coordinate in this manner. It is a feature in discussion for a future release of TRNSYS, but I don't yet know whether or not it will move forward. One of the challenges is that different Types store internal state information differently, and there's no universal way to reset all Types to a prior state once a time step has completed.

 

Unfortunately there's also not really a feature in standard TRNSYS to read the future xxx lines of an input file with the Type 9 data reader or Type 15 weather file reader, even though that information is known from the simulation start. If you're comfortable writing/modifying Fortran code, you could look at the source code for Type 9 and Type 84 (moving average), and write a modified version of Type 9 that returns a running total or moving average value for each output over xxx future time steps. Otherwise I think your best bet is to do external pre-processing with Excel, Matlab, or whatever you prefer to get future costs of operation based on all historical data available at the beginning of each run.  

 

Share: