I have imported a gearbox into Simscape Multibody and have tried to add a gear constraint but recieve a solver and/or kinematic constraint

11 views (last 30 days)
I have ensured that the two revolut joints are perfectly aligned and have measured this to make sure. In the CAD file the gearbox's amnimation illustrates all relations and constraints are possible.
However, when I add the common gear constrain I get the following error in the diagnostics tab. I have tried to soimplify the simscape model by first only focusing on the first two gears, shafts and bearings. I would be very grateful for assistance on the matter and have double checked the constraints beforehand. The only thing I am not sure of is all the z axis need to be aligned (of the bearings and shaft) as these were 'grouped' in the cad model. This is a snapshot of my issue.

Answers (1)

Umeshraja
Umeshraja on 16 Jun 2025
Edited: Umeshraja on 16 Jun 2025
The issue you encounter may be related to the solver type or tolerance settings. In particular, check the "Consistency Tolerance" in the Solver Configuration block, as well as the "Relative tolerance" and "Absolute tolerance" in the Simulink Solver settings.
If the solver tolerance is too loose (i.e., the tolerance value is too large), the simulation may overlook small discrepancies, allowing the system to extend beyond physical limits. This can result in larger cumulative errors and ultimately cause a constraint violation.
On the other hand, if the solver tolerance is too tight (i.e., the tolerance value is too small), the solver may need to take extremely small time steps to maintain accuracy. This can also lead to a constraint violation due to the solver being unable to progress effectively.
To troubleshoot the issue, follow these steps:
Use the Solver Profiler to determine what the solver is doing just before the error occurs during simulation
  • In the Step Size tab, investigate the graph showing the simulation step size with respect to overall simulation time.
  • When running the Solver Profiler, there may be large downward spikes in the step size, especially at the moment the "singularity" (time of error message) is reached. The downward spike in step size shows the solver attempting to keep the simulation accuracy within the specified tolerance.
  • Zoom in on the spike for more information, such as indication that there is a zero crossing.
  • For more information on the Solver Profiler, refer to the documentation page Examine Solver Behavior Using Solver Profiler.
Adjust the solver tolerances
  • For example, decrease the "Relative tolerance" parameter from 1e-3 to 1e-4.
  • Alternatively, increase the "Relative tolerance" parameter from 1e-4 to 1e-3 while keeping in mind the overall target simulation accuracy.
  • For more information on solver parameters refer to the documentation page Solver Pane.
Switch your solver
  • For example, changing the solver from 'Variable Step Auto', to 'ode23t'.
  • Refer to the documentation page Choose a Solver for more information.
I hope this helps

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!