MATLAB: The Ideal Torque Sensor block causes wrong output

acrosssensorSimscapethroughtorquevelocity

Why the Ideal Torque Sensor block causes wrong output?
Adding a Torque sensor caused a wrong output and problems with the solver.

Best Answer

The issue was due to the torque sensor being connected incorrectly. In the rotational domain, angular velocity is the across variable and torque is the through variable. The velocity sensor measures the change in velocity across R and C without any torque going through the sensor. On the other hand, the torque sensor measures the torque going through the sensor without any change in velocity across R and C. In the not working model, the torque sensor connection means that the velocity at the junction is the same as the mechanical reference, which is zero velocity. That is why the results are wrong.
If the intent is to measure net torque on the hydraulic machine, then the torque sensor should be connected between the machine and the junction point (like how you would connect a hydraulic flow rate sensor).
This was the cause for a* very specific* model. If you cannot resolve your issue by going through the Simscape documentation and you have a valid license with maintenance, then please contact Technical Support.