I am trying to model random walk of a gyro, given some manufacturer specifications of maximum random walk in units of degrees per root-hour.
My first step was to generate white noise with a standard deviation derived from the specifications, like so.
imu_rate = 200 # hz
stop_time = 3600 # sec
n_samples = imu_rate * stop_time
time = np.arange(n_samples) / imu_rate
# monte carlo
runs = 5
arw = 0.05 # deg/rt-hour (MAX
arw /= 60 # deg/rt-sec
sigma = arw * np.sqrt(imu_rate) / 3 # deg - standard deviation of noise
white_noise = np.random.normal(0, sigma, size=(n_samples, runs))
random_walk = white_noise.cumsum(0) / imu_rate
plt.plot(time, random_walk);
Now, to the point of the question, I want to verify that that this method of modelling the sensor noise required to generate random walk within these bounds is correct. I want to do so by generating random walk and plotting it against some sort of bounds.
My first inclination was just to take the square root of time do a cumulative sum at each time step. However, that gives me really large bounds, completely dwarfing the scale of the random walk.
bounds = arw * np.sqrt(t)
plt.plot(time, random_walk);
plt.plot(time, bounds.cumsum())
So as the title says, how do I compute the bounds of random walk vs time?