How to use a range of inputs in a Simulink Model

17 visualizaciones (últimos 30 días)
Sam Fennell
Sam Fennell el 9 de Mzo. de 2017
Editada: Sofia Carvalho el 14 de Mzo. de 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 comentario
Astarag Chattopadhyay
Astarag Chattopadhyay el 14 de Mzo. de 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.

Iniciar sesión para comentar.

Respuestas (1)

Sofia Carvalho
Sofia Carvalho el 14 de Mzo. de 2017
Editada: Sofia Carvalho el 14 de Mzo. de 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?

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by