Reputation: 11
I'm trying to simulate a SMPM with a VoltageController and a PWM in OpenModelica. After looking for old threads on the subject I found this one: PI-Controller doesn't reach reference value with inverter and PMSM in Modelica
Basically, that's exactly what I'm looking for. However, after copying @marco 's code and pasting it into Modelica, I have an error as seen in the attached image.
The PWM block is not displayed here. and the VoltageToDutyCycle block is missing a connection.
Can someone help me what's going on there, or even send me an executable version?
Maybe I'm doing something wrong, since I'm still a beginner at Modelica I don't want to rule that out ;)
Upvotes: 1
Views: 371
Reputation: 6655
I corrected the answer, it should work now. Keep in mind, that this code was written with Modelica Standard Library (MSL) 3.2.3. The current version is 4.0.0. Either use the old MSL or convert to the new version.
The missing MySignalPWM
block was just the original block from the MSL. The class path is fixed now.
Regarding the connection: there is nothing missing. The third boolean input is disabled, but OpenModelica still displays it. Other Modelica tools are smarter and do not show disabled connectors. The thermal port in the center of this component should also not be visible.
Upvotes: 1