Preventing division by zero

Hi there, I believe you didn’t attach the model after all. But you could try using the Initial Condition block to set the problematic variable to a non-zero initial value. Alternatively, the Saturation block could be used to force a small but non-zero positive value to the problematic signal.