# Understanding WhenEvent option: “DiscontinuitySignature”

Trying to understand WhenEvent I modified a simple Example (Help WhenEevent)

{X, V} = NDSolveValue[{Derivative[1][x][t] == v[t], x[0] == 2
, WhenEvent[1 ==  x[t], v[t] -> "DiscontinuitySignature"]
, v[0] == 1},
{x, v}, {t, 0, 2}, DiscreteVariables -> {Element[v, {-1, 0, 1}]}];
Plot[{X[t], V[t]}, {t, 0, 2} ]


Where can I find further information concerning "DiscontinuitySignature"? Especially I would like to know how the list of discrete variables( 2 or 3 elements) are related to the shape of the discontiniuity.

Thanks!

• @ Michael E2 Thank you! I also read this document but didn't get deeper insight. So far I think that sliding mode is only possible if the signature is somthing like {a_,0,b_}. The list elements seem to define a step function depending on v. I'm still far away from understanding this relation... – Ulrich Neumann Dec 14 '18 at 9:14
• @UlrichNeumann "Sliding mode is indicated by a discontinuity signature of 0" according to the tutorial. If the discontinuity of the vector field defined by the ODE is along e == 0, then the discontinuity signature is "effectively Sign[e]", an integer, not a list {a_, 0, b_}. Also in the tutorial: "If you know that a discontinuity will not lead to sliding mode, the needed computations can be done less expensively if you exclude 0 from the range of the discontinuity signature variable." – Michael E2 Dec 14 '18 at 12:12
• @UlrichNeumann You're welcome. A question about a specific DE and the use of the discontinuity options of NDSolve might be easier to answer. Such questions might occur to you as you study the documentation. – Michael E2 Dec 14 '18 at 13:34