Temperature varying input for reservoir in refrigeration cycle

3 次查看(过去 30 天)
I am trying to change a part of a model of an air-conditioning system, and I need to know if it's possible to implement some sort of a temperature and RH varying input to simulate real-life outdoor temperature and humidity scenarios.
I am working on the pre-made model by MathWorks, the Refrigeration Cycle for air conditioning, inside the External Environment subsystem, I was thinking if I can replace parameters in reservoirs (MA) 'Air Outlet' and 'Air Inlet' with some sort of post-processed interpolated temperature series in excel format, in the seconds denomination, and let SimuLink run through those temperatures.
Currently for parameters reservoir_temperature and reservoir_RH they have taken values T_env and RH_env respectively, which are set in the preloadfcn callback to be constants. I was wondering if there is a way to dynamically change the values of the parameters during simulation, through my own dataset. I have loaded the dataset into my workspace, where my own T_env and RH_env are matrices 601201x2 in size (First column is time vector in seconds so it starts from 0, and second column of the data).
I have tried a MATLAB function block but whenever I tried to load my dataset into the function block, there always seem to be some sort of an index error where I cannot access the 2nd column of my data, and somehow my data becomes a 1x1. Are there any solutions? Due to the fact that it's a pre-made model there are way too many intricacies which kind of hinder my progress so any form of help is appreciated!
  1 个评论
Ravi Beniwal
Ravi Beniwal 2024-4-10
编辑:Ravi Beniwal 2024-4-10
Hi Key,
I'm reaching out to check if you managed to find a solution to the above problem. If you have, could you please assist me? I've encountered a similar issue while working with the actual environmental conditions. Your help would be greatly appreciated.

请先登录,再进行评论。

回答(1 个)

Yifeng Tang
Yifeng Tang 2024-1-26
Use a Controlled Reservoir (MA) block.
The data you have need be read into Simulink as a timeseries or timetable, and you can use the Simulink-PS Converter to assign units to your data and then send to the Controlled Reservoir block. Pay extra attention to the temperature, as you may need to do the affinity conversion (check out this Doc page).

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by