Scope data either fails to print or is inconsistent with results explorer.
Show older comments
Hello Community,
First time poster here!
In the attached, I modify a Matlab example problem by adding a few scopes. Two things I hope to get some help with:
1) Scope data is inconistent with the results explorer in one case.
2) Scopes flatline. I searched the community forum and suspect the answer might be in To Workspace, but links to the examples don't work on my 2020b install.
Thank you!
1 Comment
Michael Boddie
on 15 Dec 2023
Answers (1)
Ishu
on 27 Dec 2023
0 votes
Hi Michael,
I understand that you are trying to analyse the results by comparing the "Scope Data" and the "Simscape Result Explorer".
For the fisrt case where your scope data is inconsistent with Result Explorer. You may need to know that the direction of torque is position from port R to port C. The inconsistency in the results is only in the direction of torque, the magnitude is same in both the cases. So in "Wheel and Axle B" the direction of the torque is positive i.e. from R to C, but in the "Scope" the direction of the torque is from C to R. You have to connect the "Torque Sensor" with the R port of "Rotational Sensor" to make torque positive.
And in the second case where you are gettting flatlines. In this case you have directly connected the "Torque Sensor" with the "Gear Box A". You need to firstly add a "Rotational Spring" between "Gear Box A" and "Wheel and Axle A", then you can connect the port R with the "Torque Sonsor" to get the correct results.
For more information on ports and direction of Torque you can refer below MathWorks documentations:
Rotational Spring : https://www.mathworks.com/help/releases/R2020b/physmod/simscape/ref/rotationalspring.html?searchHighlight=rotational%20spring&s_tid=doc_srchtitle
Hope it helps.
Categories
Find more on Simscape in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!