Hello!
I'm trying to simulate gyroscope signal using imuSensor and gyroparams. And I've got some issues with that.
Here's what i'm trying to do:
% Frequency = 100Hz
F = 100;dT = 1/F;% 1 hour of data
N = 3600*F;% VG103LN
bias_instability = 1.0; % deg/h
bias = 0.0; % deg/s
B = degtorad(bias); % rad/s
BI = degtorad(bias_instability/3600.0); % convert to rad/s
VG103LN_params = gyroparams;acc = zeros(N, 3);angvel = zeros(N, 3);VG103LN_params.ConstantBias(1) = B;VG103LN_params.ConstantBias(2) = B;VG103LN_params.ConstantBias(3) = B;VG103LN_params.BiasInstability(1) = BI;VG103LN_params.BiasInstability(2) = BI;VG103LN_params.BiasInstability(3) = BI;imu = imuSensor('SampleRate', F, 'Gyroscope', VG103LN_params);[~, gyroData] = imu(acc, angvel);Wx = radtodeg(gyroData(:, 1));Wy = radtodeg(gyroData(:, 2));Wz = radtodeg(gyroData(:, 3));
After I get the signal, I'm trying to estimate Bias Instability via calcluating standard deviation (std function).
% Bias Instability Estimation
% Fizoptika Method
% 20 minutes of data
Wx_20min = Wx(1:120000);Wy_20min = Wy(1:120000);Wz_20min = Wz(1:120000);N = 1000;% Calc mean of every 10 sec interval
WxSamples = accumarray(ceil((1:numel(Wx_20min))/N)',Wx_20min(:),[],@mean);WySamples = accumarray(ceil((1:numel(Wy_20min))/N)',Wy_20min(:),[],@mean);WzSamples = accumarray(ceil((1:numel(Wz_20min))/N)',Wz_20min(:),[],@mean);WxBIEstimated = std(WxSamples)*3600.0;WyBIEstimated = std(WySamples)*3600.0;WzBIEstimated = std(WzSamples)*3600.0;
I expect to see something like 1 deg/hour. But I have Bias Instability = 0.06 deg/hour. What am I doing wrong? I know that it's just model of a gyro but the result way too far from I expected.
So I got some questions:
- Do I specify Bias Instability correctly?
- Is it Ok if I specify only bias instability or I should set other parameters too (arw, rate random walk, etc.)
- How can I estimate simulated gyroscope signal? Is method I'm using appropriate or I should use Allan Variance?
Best Answer