- Index
- » Programming
- » Modelica Language
- » How to map a motor angle between...
Page Start Prev 1 Next End
How to map a motor angle between 0-360 degrees
How to map a motor angle between 0-360 degrees
Jul-25-19 07:43:54
I have a motor model which is running continously and I want to create a variable based on the rotational angle (theta_r) which stays between 0-360 degrees.
In Matlab i solved it like this:
Code:
theta = theta_r - old_theta_r;
if theta >= 360
old_theta_r = theta_r
else
old_theta_r = old_theta_r;
end;
The result is:
But modelica seems to execute the code differently.
Any tips on how I can create this in Modelica?
Edited by: didrif14 - Jul-25-19 07:48:16
Page Start Prev 1 Next End
- Index
- » Programming
- » Modelica Language
- » How to map a motor angle between...
There are 0 guests and 0 other users also viewing this topic