How to use a range of inputs in a Simulink Model
16 次查看(过去 30 天)
显示 更早的评论
Hello, I would like to use a range of inputs that change at specific time intervals in my Simulink model. I have an Excel table with solar radiation data and their corresponding times throughout the day. For example; 500W at 9am, 600W at 10am, 700W at 11am, etc. I would like to use this data as an input to my model and have it change automatically at 1 hour intervals as the simulation is running. What is the best way to do this? Any help would be much appreciated. Thank you
1 个评论
Astarag Chattopadhyay
2017-3-14
You can explore these two options:
1) Write a MATLAB function that updates a variable (may be structure or Cell array) in the base workspace after the required interval. Use this variable as the input to your Simulink model.
2) Add a storage block (may be RAM) in your model and store all your data into it. After the required time interval increment the address and give the write enable.
回答(1 个)
Sofia Carvalho
2017-3-14
编辑:Sofia Carvalho
2017-3-14
I'm doing exactly the same thing, have you come to a solution? I have 8760 radiation values correspondent to the 8760 hours in a year. I input a timeseries variable from the workspace to Simulink with 2 columns (1st one with dd-mm-yyy HH:MM:SS and the 2nd one with Wh/m2 values), however when I graph the values the time series is converted from 0 to 10 and the radiation values are not the same as in the workspace. Any ideas?
Why does the data from matlab (figure 1) turns into the data seen in figure 2 in Simulink?
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!