Closed Ziaeemehr closed 7 months ago
Thanks for the report. You don't have to follow the convention used in the README, so your dfun could just be
def f(x, p):
return p.omega + p.G*jnp.mean(weights*jnp.sin(x-x[:,None]),axis=1)
using mean
instead of sum
scales the afferent coupling by 1/N
per Kuramoto equations, which is missing in your code.
However, I'm not familiar enough with the Kuramoto model to know what the expected behavior is with noise scaling. My experience using Kuramoto to test solvers is mainly related to coherence of the population as a function of parameters, e.g. https://github.com/SciML/StochasticDelayDiffEq.jl/issues/24
If I had to guess, the effect is correct and a result of noise moving the system past "ghost" attractors more quickly. In any case, we don't need to guess: Kuramoto is implemented in TVB proper, we can perhaps take that as a reference solution and then check here.
I added a script with the above. Once we have a clear idea what the solution is we can convert to a unit test to ensure the problem does not appear again. It would probably be nice to have the test reported in the Julia repository also.
just noticed that this example uses vb.rand
to generate the noise: this is allowed of course, but then the noise samples are distributed uniformly between 0 and 1, which explains why the frequency increases. when you switch to vb.randn
the noise is normally distributed and then frequency does not increase
reopen if you have further problems
This is Kuramoto model on a complete network, I am passing sigma (noise amplitude) and G (global coupling strength) as input and producing time series. I am getting strange behavior by changing
sigma
, seems it is changing the frequency! Where am I wrong?Cheers