4D input into simulink model

5 visualizaciones (últimos 30 días)
Ingrid
Ingrid el 10 de Ag. de 2012
Is it possible to start with input to a simulink model that has 4 dimensions (location(x), time(t), statevariable(s), value(y)), then use Demux block to split the signal based on the location so that for each location a 3d signal remains that contains for each statevariable (in my case 9) one value per timestep that I want to use as inputs to my model
anyone an idea if this is the correct way to approach this kind of problem? I thought of adding different inputs per statevariable, per location so that you have the normal vector format time(t),value(y) but this would lead to too many blocks that need to be added (think order of magnitude 9*20) which would not give a good oversight and would also not make much sense in my case as the statevariables are interlinked and should not be split from each other
any thoughts of the possibility of this approach or which documentation I should read to learn more about solving this problem are most welcome!
If this approach is feasible I would like to write a custom block that can read all the statevariables and perform calculations that involve the statevariable being dependent on its derivative and on the derivative of the other statevariables so any thoughts on how to achieve this next step with this 3D input are also appreciated.

Respuesta aceptada

Ingrid
Ingrid el 23 de Nov. de 2012
Editada: Ingrid el 23 de Nov. de 2012
the problem I was having was really 2-D since time is not considered as a dimension and the values are ofcourse also not a dimension. The From Workspace block can deal with this kind of problem when defining the variable as a structure:
*Structure format can be used for a multidimensional signal:
var.time=[TimeValues]
var.signals.values=[DataValues]
var.signals.dimensions=[DimValues]*
afterwards, the selector block is used to select the stateVariables at the location of interest

Más respuestas (1)

Kaustubha Govind
Kaustubha Govind el 10 de Ag. de 2012
I'm not sure how you deal with the time dimension, but I think you should let the Inport block (or whichever technique you use to import the data) automatically index into your data to get the location, state variable and value 3-D signal, according to the current simulation time (t). Once you have done that, you may want to consider using the For Each subsystem to iterate by location, and thus slice the 3-D signal into a 2-D signal for each iteration.

Categorías

Más información sobre Event Functions 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