0
votes

I'm making the interface package which can input the parameters of the models in the simulation loop. To connect between the interface package and the simulation model, I used the Controlbus from the Standard Modelica Library Ver. 3.2.2.

Checking model was Okay, but if i simulate the model, the error like the picture below popped up.

Error message

And here's the equation related to this model

Omega_e = Omega_d * N_t[N]; Alpha_d = der(Omega_d);

To solve the differential equation, i think the solver need a specific parameter of N_t. So i put the parameters from the interface model and sent the parameters using the Controlbus component in the Standard Modelica Library.

enter image description here

enter image description here

As in the picture above, i definitely put the parameters. (Specific values of the parameters are deleted because it's a confidential)

I can't find what is the problem of this error. Please help me guys.

Thank you very much.

1

1 Answers

6
votes

Based on the incomplete model it's a bit tricky to say what happened, but:

Sending parameters through the control-bus (or a connector in general) is a bit complicated and not that encouraged.

It should be possible by declaring the "computed parameter" as parameter Integer N(fixed=false); initial equation N=myBus.N;, and don't have it as parameter in the connector.

If you don't declare it as parameter Dymola will try (and fail) to differentiate it. If you declare it as parameter in the connector it will not be propagated (as connecting two parameters lead to an assertion).