title: Relational operator/Compare to zero in continuous mode are not continuous on fast signals. In discrete mode it works as expected
body: <p>I'm trying to simulate some electronics stuff in Simulink. Current mode PWM, so I need to compare MOSFET current with constant.
  I tried to use &quot;Relational operator&quot; and &quot;Compare to zero&quot; with the same result.
  In Continuous simulation mode, it reacts all over the place, like +-5e-6 sec and it is no help when the PWM signal is 20e-6 sec period.<br />
  When I run it in Discrete mode on 5e-8 sec sample time it works all right.</p>
  <p>In tutorials, all electronics simulation runs in continuous mode, and calculating blocks seem to work right but not those blocks. Are there some settings for this?
  The system is based on Simscape / Electrical / Specialized Power Systems blocks
  Like this example: <a href="https://www.mathworks.com/help/physmod/sps/ug/boost-converter.html" rel="nofollow noreferrer">https://www.mathworks.com/help/physmod/sps/ug/boost-converter.html</a></p>