-
Notifications
You must be signed in to change notification settings - Fork 194
Hello,
I am new to Modelica and I have been reading and practicing the tutorials for a while. I wanted to create a model and a part of that model contained a feedback loop. So, I used the basic one from the standard library in the math section.
However, I can't run the model. Simply because it always says that the unit of the feedback.u1 and u2 and different than feedback.y. I tried to look at the code but can't locate where the unit is mentioned nor how to change it to make all of them u1, u2, and y to be consistent. Is there a way to sort through that to find it? or an efficient way to change it up?
here is what I did. I looked at the code of the model and couldn't locate it. I opened the class feedback block and still couldn't find it. I even opened the class of the output itself "feedback. y" and still couldn't find where this unit 'J' was located as the Modelica warning said.
All reactions
Replies: 1 comment 1 reply
This is a tool issue and not an issue with this library.
The message indicates a problem in propagating units in that example, and exactly how to propagate them is not yet specified in the Modelica Language.
If you can include your model (and which tool you use) it may be possible to resolve it, but preferably at e.g., stackoverflow - not here.
All reactions
Hi, Thank you for your quick response.
I am using open Modelica.
Here is the model I am attempting.
I am attempting this example I found in a research paper. I am just using a position and then a position sensor. Then using a PID controller, I am trying to have the location change to go to reach a destination after a time. I had to introduce a feedback loop to update the pid about the position change. Then a torque and a motor. Everything seemed okay until ran it and got that I am missing 2 equations for the model to run.
And then in the message browser, I found that "feedback input called 'u1' and feedback input2 called 'u2' have different units than the output. So, I wanted to see if I could change the units. But now, I noticed that if I removed the feedback loop, this error disappears. I am just left with 2 hard to find variables that require equations to solve. Which is something I have no idea how to do