Sample time settings to read data correctly from Spreadsheet

I've created a model in Simulink and Simscape physical system (thermal, thermal liquid). This model needs to be simulated for a duration of a year (365 days). It is important to have a sample time of 3600sec or less. The model includes a set of data inside a spreadsheet (From Spreadsheet block), which has data on an hourly basis (24*365=8760 data sets). When simulating, it is clear that the data read from the spreadsheet are collected as if they include data at a sample rate of 1sec rather than 1 hour. As a result, within 8760 samples the data run out, which is actually after a simulation duration of 8760/60=146min=2.4hours.
No matter how I set up the solver, variable step, fixed step, the sampling rate is the same. I have even experimented with all possible settings in the "From Spreadsheet" block (sample time) but still the same results.
Any ideas on how to set this up so I can simulate for this yearly duration but utilize spreadsheet data every 3600 samples (1hr)?

 채택된 답변

Steve Miller
Steve Miller 2020년 8월 10일

1 개 추천

I suspect the easiest way is to multiply your time vector by 3600.
If you upload the Excel spreadsheet, we can test further.

댓글 수: 1

Thanks Steve, I figured that out. I probably should have updated my comments then.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Thermal Liquid Library에 대해 자세히 알아보기

질문:

2019년 8월 12일

댓글:

2020년 8월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by