Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Error by creating an FMU with delay in model

Error by creating an FMU with delay in model

I tried to create a FMU of a running model.

Doing this caused error (translatet, see attachment for original):

Code:


[C:/dev/OM64bit/OMCompiler/Compiler/BackEnd/Differentiate.mo:265:5-265:157:writable] Error: Derivation of expression "active_pll1.active_pll2.rms.i_sq_f = active_pll1.active_pll2.rms.i_sq - delay(2, active_pll1.active_pll2.rms.i_sq, active_pll1.active_pll2.rms.dt, 10000.0)" according "dummyVarFMIDER" does not exist.
Error: Internal error SymbolicJacobian.deriveAll failed
[C:/dev/OM64bit/OMCompiler/Compiler/BackEnd/SymbolicJacobian.mo:2261:7-2261:87:writable] Error: Interner Fehler function generateSymbolicJacobian failed
[C:/dev/OM64bit/OMCompiler/Compiler/BackEnd/SymbolicJacobian.mo:2053:9-2053:79:writable] Error: Interner Fehler function createJacobian failed
[C:/dev/OM64bit/OMCompiler/Compiler/BackEnd/SymbolicJacobian.mo:1766:3-1766:84:writable] Error: Interner Fehler function createFMIModelDerivatives failed

The model itself is pretty big, around 500 equations. The error only occurs when i include my RMS measurement, which include the critical line.

Code:

model RMS

  constant Real f_max = 10000;
  Modelica.Blocks.Interfaces.RealInput f annotation(
    Placement(visible = true, transformation(origin = {0, 106}, extent = {{-20, -20}, {20, 20}}, rotation = -90), iconTransformation(origin = {0, 106}, extent = {{-20, -20}, {20, 20}}, rotation = -90)));
  Modelica.Blocks.Interfaces.RealInput signal annotation(
    Placement(visible = true, transformation(origin = {-108, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-108, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
  Real dt = 1 / f;
  Real rms = if time < dt then if time < 1e-6 then signal else sqrt(i_sq / time) else sqrt(i_sq_f / dt);
  Real i_sq(start = 0, fixed = true);
  Real i_sq_f = i_sq - delay(i_sq, dt, f_max);
  Modelica.Blocks.Interfaces.RealOutput y annotation(
    Placement(visible = true, transformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  der(i_sq) = signal ^ 2;
  y = rms;
end RMS;

Creating an FMU of only this block does not seem to be problematical, but including it in networks causes errors. Anyone any idea what the reason is, or even how to solve it?

Thanks!


Edit: Trying to upload the error messages returns: This page can not be found

Edited by: Mota - Jun-26-20 07:47:10
There are 0 guests and 0 other users also viewing this topic
You are here: