Open fumer100 opened 1 month ago
You should use:
epsilon = np.random.normal(0, sigma, size=nj-1)
.
epsilon
is then a vector of random values.
with $n_j$ the length of vector f
($n_j-1$ is because next_f
is actually next_f_trunc
)
Then,
next_f = f_trunc + (GCC_f + epsilon)*dt
I am not completely sure of the faisability of this algorithm. Let me know ;)
I will try it out! Thank you!
Be especially careful of the value sigma. It should be small enough
Could the noise be negative?
Yes, there is no constraint on the sign of GCC_f. Which makes me realize that your stop criterium is false. You must test if the absolute value of GCC_f is close to zero, not GCC_f directly.
However, I would simply remove this test, and simply keep your stop criterium on mu.
Ok, I thought I had tested the absolute of Gcc_f.... But I deleted it. It doesn't impact the result, so it's not necessary as you said. Thank you for the hint!
And I think the noisy trajectory is working now.
I am really curious to see what kind of trajectory you obtain
You can test it now :)
Should every element of the noise vector have the same noise? Or should I draw a different noise for each element like this?: