Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
1

EnergyPlus/Matlab Co-Simulation through BCVTB

asked 2023-03-14 04:55:54 -0500

Zakaria's avatar

updated 2023-03-17 09:08:00 -0500

Hello community,

I am currently working on a project to model a product's thermal load using EnergyPlus and Matlab, and I would like to use the co-simulation approach through the BCVTB to exchange data between the two programs.

The approach I am using is to model the product as an internal load using OtherEquipment instead of calculating the load separately and adding it as a schedule. I have used Matlab to calculate the heat load of the product and send it to E+ using BCVTB. E+ will then calculate the temperature inside the freezer and send it back to Matlab to calculate the new heat load for the next step, and so on.

However, I have encountered some errors while trying to perform this simulation, and I have no idea how to solve them. I would be grateful if someone with experience in co-simulation and the BCVTB could help me with this issue. I have attached the necessary files for anyone who wants to check on the model.

Thank you in advance for your help.

The Link to the model files: https://drive.google.com/drive/folders

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-03-14 06:03:14 -0500

I have not run your model (since I do not have Matlab installed) but looking at your variables.cfg

I see the following

<BCVTB-variables><!--INPUT--><variable source="Ptolemy">
      <EnergyPlus schedule="OtherEqTest"/>
   </variable>

This indicates that EnergyPlus will receive values from outside (in your case from Matlab) that will be fed into an EnergyPlus schedule. However, when I look at your IDF I see the following:

ExternalInterface:Actuator,
    OtherEqTest,             !- Name
    OthEq,                   !- Actuated Component Unique Name
    Other Equipment,         !- Actuated Component Type
    Design Level;            !- Actuated Component Control Type

where OtherEqTest is defined as an Actuator as opposed to a Schedule.

This mismatch is most likely causing your system not to run properly.

edit flag offensive delete link more

Comments

Thank you for your answer I did not notice the mismatch. I changed it to Actuator since I want fed the calculate values to EnergyPlus as Design Level of the OtherEquipment object and I get error below

- Component Type not found Component

- Unique key name not found Control

- Type not found

How can I defin Design Level as an Actuator ?

Here is the Error File

Zakaria's avatar Zakaria  ( 2023-03-14 06:28:40 -0500 )edit

I suggest removing all external interface objects from your model and first adding a native EnergyPlus EMS actuator that should mimic what the BCVTB will do. This way, you will be able to test your EnergyPlus model without the BCVTB in the loop. If you manage to successfully run the program with the native EnergyPlus EMS Actuator then you could later replace it with the ExternalInterface:Actuator

Thierry Nouidui's avatar Thierry Nouidui  ( 2023-03-14 07:08:18 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Question Tools

1 follower

Stats

Asked: 2023-03-14 04:55:54 -0500

Seen: 24 times

Last updated: Mar 14