
Resetting a Simscape Slider-Crank Angular Position Signal to a 0 Value with a Trigger Signal.
8 views (last 30 days)
Show older comments
Hi All,
Forgive me if this topic of signal resetting in Simscape has been ask and solved countless times before. However, I am struggling to what seems a basic bit of logic in my Simscape model, and the solutons in the MATHWORKS examples I can find, seem to not reset the angular position signal by way of my trigger signal (I also have a rising edge signal).
Simply need to reset the angular position output from the Ideal Rotational Motion Sensor (converted to degrees) when my piston reaches its TDC position.
Using triggered subsystems to pass the signal through, or an integrator with a reset and manual swiches, are not permit the signal value to increase at each time-step once reset to 0.
Any pointer would be great on what should be a 5 minute task.
Thanks again.
Patrick

TDC Switch

Rising Edge Signal

0 Comments
Answers (1)
Yifeng Tang
on 9 May 2025
Moved: Sabin
on 11 Aug 2025
There is an option in the rotational sensor to wrap around at 360 degrees. Will that be sufficient?

You may set up the initial angle such that it's at 360 when you hit TDC.
This of course assumes a 360 cycle. If you have a 720 cycle, as some engine application does, you may custom the sensor by modifying the Simscape code underneath.
Do you think this will work?
See Also
Categories
Find more on Troubleshooting 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!
