Buliding an integrator with wrapped state

Hello,
I want to create a system in Xcos where the output integrates until it reaches an upper limit, at which point it resets to a lower limit and continues integration.

Could someone help me with my problem?

Thank you.

Best regards,
Neo1

Hello,

Where does your screenshot comes from? To me, the easiest way should be to use a modulo block on the output of the integrator:


Untitled.zcos (3.0 KB)

S.

1 Like