claudiodeviaje
Mechanical
- Jun 19, 2005
- 45
Hello Everyone!!!
I'm simulating a control strategie for an hydraulic system using Symulink. The control strategy uses the values of a variable in t-1 and compares it with the value on t. Until now I've been using the MEMORY block in order to get the value of t-1, whick works well if I test the control strategy alone (no with the hydraulic system). When I combine the control strategy and the hydraulic system Simulink cannot handle this loop and I get the error:
Embedded MATLAB Interface Error: 'modell3_129/Konrollstrategie Skyhook/Embedded MATLAB Function/ SFunction ' cannot use 'set default dimension function'
Thats why I need to find another way to do this.
I thought I could export the value of "t" to the workspace and then just call it in the next time step. I tried using the block "TO WORKSPACE" to export it and "FROM WORKSPACE" to import the results.
The problem is that the values are exported as array (or matrix) just at the end of the simulation. That means that in t+1 I cant import the values and compare.
Does any one know a way to export the values of a variable in "t" and then import them in t+1 ?
I'm working also with embeded matlab functions in SImlulink, so a solution via Matlab fcn or Simulink blocks would be perfect.
Thank you very much!
Claudio
I'm simulating a control strategie for an hydraulic system using Symulink. The control strategy uses the values of a variable in t-1 and compares it with the value on t. Until now I've been using the MEMORY block in order to get the value of t-1, whick works well if I test the control strategy alone (no with the hydraulic system). When I combine the control strategy and the hydraulic system Simulink cannot handle this loop and I get the error:
Embedded MATLAB Interface Error: 'modell3_129/Konrollstrategie Skyhook/Embedded MATLAB Function/ SFunction ' cannot use 'set default dimension function'
Thats why I need to find another way to do this.
I thought I could export the value of "t" to the workspace and then just call it in the next time step. I tried using the block "TO WORKSPACE" to export it and "FROM WORKSPACE" to import the results.
The problem is that the values are exported as array (or matrix) just at the end of the simulation. That means that in t+1 I cant import the values and compare.
Does any one know a way to export the values of a variable in "t" and then import them in t+1 ?
I'm working also with embeded matlab functions in SImlulink, so a solution via Matlab fcn or Simulink blocks would be perfect.
Thank you very much!
Claudio