MATLAB Answers

Common-gear constraint with initial condition

1 view (last 30 days)
Frank
Frank on 27 Mar 2020
Answered: Steve Miller on 5 Jun 2021
Hi,
I am trying to set initial conditions to the revolute joint on one side of the common-gear constraint, and hope the same initial conditions scaled by gear ratio are transferred across the common-gear constriant to the revolute joint on the other side. However, this does not happen. I have to specify targets for both revolute joints in order to start the simulation in sync.
As an example, in smdoc_common_gear_external_start, once the gear locations are fixed and the default simulation can run, specifying position targets on one of the revolute joints don't affect the other one. You can check by turning on the position sensing, adding PS-Simulink converters and a scope.
Unless there are any obvious reasons that the motion targets can't get transferred across the common-gear constraint, I hope this can be fixed. I don't want to manually scale the initial positions and set targets on both revolute joints, which would defeat the purpose of gear constraint.

Answers (1)

Steve Miller
Steve Miller on 5 Jun 2021
Hi Frank,
Excellent observation and well captured in your question. I walked through your steps and saw the same result.
  1. The model always simulates regardless of the initial angle specified for the gears
  2. If you modify the initial rotational position of one joint (the initial angle of one gear), the initial position of the other gear is not modified.
  3. If you modify the initial rotational velocity of one joint, the initial velocity of the other joint is modified.
The reason this is done this way is that with the information in the model, Simscape Multibody does not have any information on how the gear teeth in the STEP files should mesh. They could be perfectly meshed at the start, or they could have overlap. Permitting the user to adjust the initial angle of the gears independently makes it possible to ensure the gears mesh properly, even if the STEP files have inconsistent reference frame orientations.
A mask on the subsystem could be used to ensure that the position targets are set consistently.
--Steve

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!