How to use a range of inputs in a Simulink Model

16 Ansichten (letzte 30 Tage)
Sam Fennell
Sam Fennell am 9 Mär. 2017
Bearbeitet: Sofia Carvalho am 14 Mär. 2017
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 Kommentar
Astarag Chattopadhyay
Astarag Chattopadhyay am 14 Mär. 2017
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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Sofia Carvalho
Sofia Carvalho am 14 Mär. 2017
Bearbeitet: Sofia Carvalho am 14 Mär. 2017
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?

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by