In SimMechanics is it possible to change the Actuation input?

1 Ansicht (letzte 30 Tage)
Daniel Stuewe
Daniel Stuewe am 7 Mär. 2016
Kommentiert: Daniel Stuewe am 15 Mär. 2016
I have a SimMechanics model where one of the inputs is at a Revolute Joint. In some cases I'd like to prescribe the motion at the joint and in others I'd like to prescribe the torque. Since I can't specify both on a joint block, is it possible to change which actuation method is used based on workspace variables, or is there a way to switch from using one Joint block or another based on the workspace?

Antworten (1)

Vineeth Kartha
Vineeth Kartha am 15 Mär. 2016
Hi
Could you please try adding 'Revolute Joint' with Torque as an input in an 'If Action Subsystem' and Similarly another 'Revolute Joint' with Motion as input in another if action subsystem. The If action subsystems should be enabled based on when you want torque input or motion input. Please try this approach and share your observations.
Regards Vineeth
  2 Kommentare
Daniel Stuewe
Daniel Stuewe am 15 Mär. 2016
Vineeth,
Thank you for your answer. As you recommended, I've added two 'If Action Subsystem' blocks and replaced the connected Inport and Outport blocks with ports.
When I run the system I get the results expected with the prescribed angle input no matter what constant value is passed into the 'if' block. I think I'm missing something obvious, but I can't find it.
Dan
Daniel Stuewe
Daniel Stuewe am 15 Mär. 2016
I've got the if blocks working correctly now (I don't know how I fixed it since all I did was switch the blocks - pointed the torque joint to the 'if' block and the angle joint to the 'else' block - and when that worked correctly, I switched them back) but the results from the torque joint are different than expected. If I comment out the angle joint as well as all of the if blocks and tie the torque joint directly to the output the mechanism behaves as expected. When I hook up the if blocks and run with the applied torque joint, the mechanism is locked. The input torque is the correct value, but nothing moves.
Note: when I run using the angle joint I set the input to the torque joint to 0 and when I run using the torque joint I set the input to the angle joint to 0. Also I defined the position target in the angle joint block. When I tried to define it in the torque joint block (with the same value) the model wouldn't compile due to a kinematic loop. Is this because the model is over constrained?

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by