Reputation: 1
The equation has the following form:
x'' + w.^2 x=n
w=1
and n
is Gaussian noise with mean = 0
and standard deviation = 1
.
Without the Gaussian noise I can solve the equation by using ODE45
from matlab
.The problem is, how can I deal with this equation when the Gaussian noise is taken into consideration?
Upvotes: 0
Views: 3799
Reputation: 5359
it really depends on how the noise is added to the system. If you want to arbitrarily add noise to the system, in which every time the function is called, you add it to the equation representing your data:
function dydt = solve(t,y)
dydt = [y(2); -y(1)+randn(1)];
then call
[t,y] = ode45(@solve, [0 10],[1 -1]);
the problem here is that if the noise is large compared to the signal size, more iterations will be needed thus more time.
On the other hand, if the noise is predetermined, you can either sample and hold, or incorporate a first-order hold and then add that to the system
Upvotes: 1