Help - Search - Members - Calendar
Full Version: problem with DymolaBlock in Simulink
Modelica Forum > Modelica > Dymola
kdavies
Hi-

I'm a new Dymola user and I'm having trouble getting Modelica models that involve derivatives to compile within the DymolaBlock for Simulink. I've gotten the following error:

Restricted failed
Error: The model requires derivatives of some inputs as listed below.
Order of Input
derivative
1 u
Restricted failed
Error: Failed to reduce the DAE index.
Translation aborted.
ERROR: 2 errors were found

I've attached the Modelica model. It takes an input as the voltage of a SignalVoltage model, which is electrically connected to a resistor and capacitor in series.

The problem is that I can't connect the input until Dymola compiles the block, figures out how many inputs there are, and adds the input port so that I can connect the signal within Simulink. I get the same error within Dymola when I try to simulate the system itself with nothing connected to the input. But within Dymola, I'm able to connect the input, and when I do, it works fine.

What am I doing wrong? Thanks!

Kevin
footwork
If a component won't compile in Dymola on it's own, you haven't a hope in Simulink. First try to wrap you're component into a model with a defined causality, input-->model--> output, which compiles and simulates in Dymola. Even if the results are all zero, this seems to be the key, it has to simulate in Dymola. Once you're at this stage, import the model with defined causality into the simulink block and it should work.
José Díaz López
Dear Kevin,

QUOTE(kdavies @ Jul 28 2006, 02:21 AM) *

Hi-

I'm a new Dymola user and I'm having trouble getting Modelica models that involve derivatives to compile within the DymolaBlock for Simulink. I've gotten the following error:

Restricted failed
Error: The model requires derivatives of some inputs as listed below.
Order of Input
derivative
1 u
Restricted failed
Error: Failed to reduce the DAE index.
Translation aborted.
ERROR: 2 errors were found

I've attached the Modelica model. It takes an input as the voltage of a SignalVoltage model, which is electrically connected to a resistor and capacitor in series.

The problem is that I can't connect the input until Dymola compiles the block, figures out how many inputs there are, and adds the input port so that I can connect the signal within Simulink. I get the same error within Dymola when I try to simulate the system itself with nothing connected to the input. But within Dymola, I'm able to connect the input, and when I do, it works fine.

What am I doing wrong? Thanks!

Kevin


Contact Dynasim support at support@dynasim.se for further help. I think there is a workaround for your problem.

Best Regards,
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.