I have the following 2D dynamical system that I solve with NDSolve:

q[v_,x_]:=-v+c Tanh[3*v]-Sign[x];
sol = NDSolve[{x'[t] == v[t], 
   v'[t] == q[x[t],v[t]], x[0] == 0.01, 
   v[0] == 0.01}, {x[t], v[t]}, {t, 0, 100}];

The plot of the solution:

Plot[{Evaluate[x[t] /. sol], Evaluate[v[t] /. sol]}, {t, 0, 100}]

Now I wish to add uncorrelated Noise to the second equation, this is what I have so far:

proc = ItoProcess[{\[DifferentialD]x[t] == -v[t]\[DifferentialD]t, \[DifferentialD]v[
          t] == -q[x[t], v[t]] \[DifferentialD]t + 
         A[v[t]] \[DifferentialD]w[t]}, {x[t], v[t]}, {{x, v}, {0.01, 0.01}}, 
      t, w \[Distributed] WienerProcess[]]

and for the plot:

RandomFunction[proc, {0., 100., 0.01}]

I get the message:

"The specification "description" is not a random process recognizedby the system"

what is the source of the error and what is the proper way to write the 2d SDE to obtain both trajectories of x[t] and v[t]?

  • $\begingroup$ You have two typos: 1. = should be ==. 2 missing a dt. $\endgroup$ May 8, 2016 at 17:29
  • $\begingroup$ @xslittlegrass, corrected, still won't go $\endgroup$
    – jarhead
    May 9, 2016 at 11:06

1 Answer 1


I am not an expert in dynamical systems, but in this way I have no error:

A[v_] := 1/Cosh[3*v];
q[v_, x_] := -v + c Tanh[3*v] - Sign[x];
c = 10^-4;
sol = NDSolveValue[{x'[t] == v[t], v'[t] == q[x[t], v[t]], 
    x[0] == 0.01, v[0] == 0.01}, {x[t], v[t]}, {t, 0, 100}];

Plot[{sol[[1]], sol[[2]]}, {t, 0, 100}]

As you can see, I substituted your NDsolve with NDSolveValue and changed the Plot consistently.

proc = ItoProcess[{\[DifferentialD]x[
       t] == -v[t] \[DifferentialD]t, \[DifferentialD]v[
       t] == -q[x[t], v[t]] \[DifferentialD]t + 
      A[v[t]] \[DifferentialD]w[t]}, {x[t], 
    v[t]}, {{x, v}, {0.01, 0.01}}, t, 
   w \[Distributed] WienerProcess[]];
RandomFunction[proc, {0., 100., 0.01}];

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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