State Dependent Motor as On-Off according to Joint Angle
Hey there!
I'm trying to simulate an On-Off motor but I don't seem to get it right. I managed to get an approximated behavior but It's not quite what I want.
I have a bicycle model setup in which I want a motor to turn the crank for certain positions of it.
I'm using the angle of the highlighted joint as state Independent Variable with the following angular velocity profile:
Instead of keeping 20rpm at all times and increasing it to 60 from 0-20°, 160-200° and 340-360°, I want it to only be active in these ranges.
If I change from 20 to 0rpm, the motor stops still. Is there a way to turn it on and off based on the angle of the joint?
I attached a video for the setup above, for behavior similar to what I want.
Thanks a lot!
Answers
-
Hello Paulo,
I will say I am not 100% clear which profile you are trying to achieve. You mention the video is the behavior similar to what you want. But what is it doing that you do not want it to?
Keep in mind that State Dependent Inputs do not allow you to turn another entity state on/off. With SDI, the motion of one entity is always function of another. So, it might be off until the variable entity reaches a point in its motion that causes it to be back on again.
There might be another approach to handling this but I would need some additional detail on your application.
Thanks,
Scott Z0 -
Scott Ziemba_21777 said:
Hello Paulo,
I will say I am not 100% clear which profile you are trying to achieve. You mention the video is the behavior similar to what you want. But what is it doing that you do not want it to?
Keep in mind that State Dependent Inputs do not allow you to turn another entity state on/off. With SDI, the motion of one entity is always function of another. So, it might be off until the variable entity reaches a point in its motion that causes it to be back on again.
There might be another approach to handling this but I would need some additional detail on your application.
Thanks,
Scott ZHello, Scott.
I want the motor to work only for the specified angles of the crank.
If the crank isn't in the specified range, I want it to behave as if it was turned off.
The profile would look something like this, but there would be no information where there's an X:
I suppose I might be able to do this with Torque Input, but It'd be ideal if I managed to do it with Angular Speed.
Thanks in advance!
0 -
Not sure if I understood the question either. How do you plan to rotate the pedal between 20 to 160 and 200 to 340 degrees? Would it help to install three (3) motors, each operating at different angles?
0 -
Raj Deshpande said:
Not sure if I understood the question either. How do you plan to rotate the pedal between 20 to 160 and 200 to 340 degrees? Would it help to install three (3) motors, each operating at different angles?
Momentum would keep the crank spinning. And whenever I get in those ranges, the motor would be active. I guess three motors would work.
There's another issue I'm facing. I can't seem to create a PID Motor defined by the independent variable. Is it not possible or I might be doing something wrong?
Thanks Raj!
0 -
Paulo Libório said:
Hello, Scott.
I want the motor to work only for the specified angles of the crank.
If the crank isn't in the specified range, I want it to behave as if it was turned off.
The profile would look something like this, but there would be no information where there's an X:
I suppose I might be able to do this with Torque Input, but It'd be ideal if I managed to do it with Angular Speed.
Thanks in advance!
Hi Paulo,
For now, there is no way to turn the motor off completely and then back on. As you suggested, using a torque might be a better approach in this case. Keep in mind you can use a torque/speed curve in a State Dependent Input setup. Or, you could also do as Raj suggested, three motors.
Keep in mind how controlled-based motors and actuators work when considering speed/torque behavior. See the following Community article: Difference between a controlled and non-controlled Motor or Actuator in Inspire Motion
With respect to the convergence error message, there should be no limitation with using a PID motor or actuator as the variable entity in a State Dependent Input. My feeling is that it is being caused by something else in the model. Did you try changing the "Model" (solver) units as the message suggested? Model and Display units are located under Preferences. Model units are used by the MotionSolve engine. The default is MKS, but I find most applications are better suited using MMKS. It can depend on the mass and accelerations of the components in the model as to which unit set might be best suited for the problem. Not confident it's the issue here though (what you have is a rare message).
Without seeing the model, the only other advice I can offer is to begin suppressing entities one by one until you see the error subside. Is the model over constrained in any way? Is there a setup conflict between inputs?, etc..
If you'd like, you can always submit a Customer Support ticket with the model attached to it and we can take a closer look.
Regards,
Scott Z
0