2
$\begingroup$

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} ]

enter image description here

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!

$\endgroup$
1
$\begingroup$

A fairly extensive discussion can be found here:

https://reference.wolfram.com/language/tutorial/NDSolveWhenEvents.html#35874936

I found it by searching for "DiscontinuitySignature" in the doc center and then searching the first hit (the above tutorial) for "DiscontinuitySignature".

$\endgroup$
  • $\begingroup$ @ 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... $\endgroup$ – Ulrich Neumann Dec 14 '18 at 9:14
  • $\begingroup$ @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." $\endgroup$ – Michael E2 Dec 14 '18 at 12:12
  • $\begingroup$ @UlrichNeumann Aside from answering your comment, at least what I thought you were asking about, I would also point out that the question is rather broad. Consider that you don't think the tutorial goes into enough examples or detail or background or whatever, but the section on discontinuous DEs is already quite long. I did not find that section easy to understand the first time I read it, and discontinuous DEs were unfamiliar to me. So I did some research and learned a little about the mathematics underlying the methods. Then the tutorial became clearer. $\endgroup$ – Michael E2 Dec 14 '18 at 12:19
  • $\begingroup$ Again thank you very much for your effort and explanation. I'll try to study the documentation in more detail... $\endgroup$ – Ulrich Neumann Dec 14 '18 at 12:48
  • $\begingroup$ @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. $\endgroup$ – Michael E2 Dec 14 '18 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.