I'm having trouble modeling with Simscape Multibody
5 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165324/image.png)
(With Open in New Tab, you can see a bigger picture)
I would like to make the system shown in Figure 1 and Figure 2 using Multibody.
Figure 3 is the complete block diagram and Figure 4 and Figure 5 show the interior of the red square and blue square, respectively, in Figure 3.
However, when I run this, the following error occurs.
-----------------------------------------------------------------------------------------------------------------------
An error occurred while running the simulation and the simulation was terminated
Caused by:
Simulink cannot solve the algebraic loop containing 'temp_2/Viscous' at time 0.00025 using the TrustRegion-based algorithm due to one of the following reasons: the model is ill-defined i.e., the system equations do not have a solution; or the nonlinear equation solver failed to converge due to numerical issues.
To rule out solver convergence as the cause of this error, either
a) switch to LineSearch-based algorithm using
set_param('temp_2','AlgebraicLoopSolver','LineSearch')
b) reducing the ode15s solver RelTol parameter so that the solver takes smaller time steps.
If the error persists in spite of the above changes, then the model is likely ill-defined and requires modification.
-----------------------------------------------------------------------------------------------------------------------
I have tried changing the step time of the solver, but I keep getting errors.
Could you help me find out what's wrong?
0 个评论
采纳的回答
Sebastian Castro
2017-6-19
This algebraic loop is happening because your Simscape Multibody interface is being done using Simulink signals. Since you're applying a load torque and then supplying a voltage in return to the electrical system, this circular relationship can cause such numerical solver errors.
I'd strongly recommend replacing the interface with the Simscape Multibody Multiphysics Library on the File Exchange: https://www.mathworks.com/matlabcentral/fileexchange/37636-simscape-multibody-multiphysics-library
Here, you can use the Simscape "Rotational Electromechanical Converter" block to create the speed-torque relationship, as well as the multiphysics interface block to have the 1-D Simscape mechanical domain talk to the 3-D Multibody domain.
- Sebastian
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!