Search code examples
inputmodelicaderivativedymolaopenmodelica

export of dymola model requires the derivative of its input


I would like to export a Dymola model to Simulink. The model consists of a derivative block (der), a RealInput, a RealOutput and there connections.

When I translate this model, the following error appears:

"The model requires derivatives of some inputs as listed below: 1 u"

It is logical to me why the derivative is needed, but why is it important for an export to get the derivative and why does it cause an error? I can´t continue the export with this error. I know that there are derivative blocks in simulink, however, the actual model is more complex and the same type of error appears. Is there a possibility to avoid it? My dymola version is 2014 (64-Bit). I use "Visual Studio 2010/ Visual C++ 2010 Express" as compiler.


Solution

  • Typically, this happens when the input signal feeds directly into a quantity that must be continuous (e.g., where a discontinuity would cause an impulse).

    The way I deal with this situations is to put a high gain first order filter on the input. This ensures that the actual signal is continuous but it means that is responds very quickly to any changes of inputs. This input is then allowed to be discontinuous.

    Of course, a high-gain value could cause some performance issues by making the time constant of the system very small. But in practice, I don't think they need to be that high.