Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Control Function With NDsolve

  • To: mathgroup at
  • Subject: [mg19438] Re: Control Function With NDsolve
  • From: Eckhard Hennig <hennig at>
  • Date: Wed, 25 Aug 1999 01:25:11 -0400
  • Organization: ITWM
  • References: <7p5dm5$> <7pl53k$> <7pt5n3$n3l$>
  • Sender: owner-wri-mathgroup at

Allan Hayes schrieb in Nachricht <7pt5n3$n3l$2 at>...
>A version ot your solution. I have added two print commands to show where
>the switching occurs. One problem is that the accuracy of the switching is
>dependent on the step sizes.
>f[y_Real] := Which[
>    y >= ymax && fval == 1, Print[y]; fval = 0,
>    y <= ymin && fval == 0, Print[y]; fval = 1,
>    True, fval
>    ]
>ymax = 0.9; ymin = 0.1; a = 1; b = 1;
>eqs = {y'[t] == a*f[y[t]] - b*y[t], y[0] == 0};
>fval = 1; NDSolve[eqs, y[t], {t, 0, 15}];


indeed, I quietly ignored this problem because solving it efficiently would
require an analog/digital event synchronization mechanism as used in
mixed-mode system simulators such as Saber by Analogy, Inc. Event
synchronization requires support for time rollback, which is not possible
with built-in Mathematica functionality.

Newsgroup readers with a deeper interest in this subject should take a look
at US Patent No. 4,985,860. This document describes in detail a class of
algorithms for solving the synchronization problem in mixed-mode simulators
efficiently. For convenience, a direct link to the abstract of the patent is
given below. To read the full text, click on the button "Full Text" in the
header of the web page.

Best regards,


Dipl.-Ing. Eckhard Hennig      mailto:hennig at
Institut fuer Techno- und Wirtschaftsmathematik e.V. (ITWM)
Erwin-Schroedinger-Strasse,  67663 Kaiserslautern,  Germany
  Voice: +49-(0)631-205-3126    Fax: +49-(0)631-205-4139

     ITWM - Makers of Analog Insydes for Mathematica

  • Prev by Date: Re: AxesLabel with greek letter
  • Next by Date: Re: Mathematica on linux help and Mathematica returns wrong integral result
  • Previous by thread: Re: Control Function With NDsolve
  • Next by thread: vector derivation of quadratic forms