How to understand the simulation results using basic components in Simscape->foundation library-->mechanical?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Yifeng Tang
2021-6-12
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.
3 个评论
Yifeng Tang
2021-6-14
Hey Liqun,
Maybe it helps for you to consider this example I just made up:
The mass in the middle is in equilibrium when the two forces applied are in the same direction (C-R connection) but opposite sign (PS constant values). You may try to use 100 N for both sources, and the total force on the mass will be 200N and the mass will accelerate.
If you still feel confused, look at the model below, which is identical to the one above, except that some blocks are flipped. It's exactly the same model, but may change your thought process on the signs and directions.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Upgrading Hydraulic Models to Use Isothermal Liquid Blocks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!