How to understand the simulation results using basic components in Simscape->foundation library-->mechanical?
1 view (last 30 days)
Show older comments
Q1:As shown in the figure below, based on the actual physical process, the top result spring should be elongated and the bottom result should be shortened. However, the simulation results show that both springs are shortened. Why???

Q2:
As shown in the figure below, based on the actual physical process, we have F=P_A*S_A-P_B*S_B=16000-10000=6000N.

According Newton's laws, we can deduce the following figure. So the scoep2 and scope 7 will display positive 6000N.

But the simulation result is different from Newton's law. The scope2 is positive 6000N and is right. The scope7 is negative 7000N and is different from positive 6000N. So the simulation disobey Newton's law . Why???

0 Comments
Answers (1)
Yifeng Tang
on 12 Jun 2021
Hello Liqun,
The direction in Simscape is usually defined by the movement (towards/away) of R port with respect to the C port. One common beginner mistake is to confuse left/right on Simulink canvas as positive/negative. Flip a block on canvas does not imply direction change. However, switch R and C port connection can flip the sign of almost all sensor readings.
The documentation of each block defines which direction is regarded as positive. You may refer to those to make sure you are modeling what you have in mind.
Another good resource is the Simscape Onramp, available starting R2021a: https://www.mathworks.com/learn/tutorials/simscape-onramp.html
Hope this helps.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!