In the tutorial, when white noise process is added to ordinary differential equations (ODE), the ODE becomes a stochastic process. Then the stochastic process needs to be solved using Euler Maruyama method and not ODE.
I am having a hard time understanding how to generate and add colored noise in the form of process noise to a continous system such as the Rossler system. randn()
is used to generate White Noise in Matlab and I directly added it to the equations. But I don't know if this is the correct way to add noise to a continous time system or not. This is what I did to add White Noise to the equations:
noise_x = randn(1);
noise_y = randn(1);
noise_z = randn(1);
y = [
-x(2)-x(3) + noise_x; % dx/dt
x(1)+a*x(2) + noise_y; % dy/dt
b+x(3)*(x(1)-c) + noise_z; % dz/dt
] ;
color noise process using Euler-Maruyama Method (EM) seems to be the way to solve the stochastic system after the noise is added. But I cannot understand what is the color of the noise from this method. Looking at the code, there is no way to know if there is any color. After the color noise is generated by calling the function function [W,t]= colornoise(a,b,T,N)
how to use the output W
as an additive term in the Rossler system. This is not clear to me. Can somebody please provide a small code snippet on how to add White noise and color noise such as pink, red, violet to the Rossler system.
The following are my questions:
Question 1) How to generate colored noise in general?
Question 2) How to add the colored noise in the form of process noise to the Rossler system or any continuos time system and which method to use for solving the system -- ODE or Euler Maruyama? Is the noise added Rossler system stochastic or not?
The code below is for integrating the Rossler system using ODE45 solver.
clc;
clear all
%%%% Number of variable and initial conditions:
nbvar=3;
xini=ones(1,nbvar)/10;
%%%% Time parameters:
trans=100;
tend=500;
tstep=0.01;
b=0.2; % (default value for chaos)
ttrans = [0:tstep:trans];
tspan = [0:tstep:tend];
x0=xini;
option = [];
[t x] = ode45(@dxdt,tspan,x0,option,b);
plot3(x(:,1),x(:,2),x(:,3));
xlabel('X','fontsize',18);
ylabel('Y','fontsize',18);
zlabel('Z','fontsize',18);
box on;
% ===================================================================
% dxdt
% ===================================================================
function y = dxdt(t,x,b)
%%% parameters
a=0.2;
%b=0.2;
c=5.7;
%%% equations
y = [
-x(2)-x(3); % dx/dt
x(1)+a*x(2); % dy/dt
b+x(3)*(x(1)-c); % dz/dt
] ;
randn
I will get a white colored noise. But how to generate color noise and add that color noise to a stochastic process is something which I have no clue about, hence I have posted this Questionfor help. Could you please answer the Question if possible?thank you $\endgroup$a
andb
, which are values you feed in, and since I can't possibly tell you what you use, I can't tell you the color of your noise. They are then used to weigh an autoregressive term (in thefor
loop,Xtemp = Xtemp + a*Dt*Xtemp+…
) and a moving average term (in the same term ,b*Winc
). As said, this is just a really really awkward way of filtering white noise, and you should probably avoid it. $\endgroup$