Resetting a Simscape Slider-Crank Angular Position Signal to a 0 Value with a Trigger Signal.

8 Ansichten (letzte 30 Tage)
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

Antworten (1)

Yifeng Tang
Yifeng Tang am 9 Mai 2025
Verschoben: Sabin am 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?
  1 Kommentar
Patrick
Patrick am 12 Mai 2025
Verschoben: Sabin am 11 Aug. 2025
Hi Yifeng,
Thanks for getting back to me so soon.
Thats perfect, easy fix,
Many Thanks.
Patrick

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Troubleshooting finden Sie in Help Center und File Exchange

Produkte


Version

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by