Matlab R2018b. Gyroscope signal simulation

조회 수: 2(최근 30일)
Maxim Ivanov
Maxim Ivanov 2018년 11월 27일
답변: Ryan Salvo 2018년 12월 5일
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:
  1. Do I specify Bias Instability correctly?
  2. Is it Ok if I specify only bias instability or I should set other parameters too (arw, rate random walk, etc.)
  3. How can I estimate simulated gyroscope signal? Is method I'm using appropriate or I should use Allan Variance?

채택된 답변

Ryan Salvo
Ryan Salvo 2018년 12월 5일
Hi Maxim,
Glad to see that you are using the imuSensor and gyroparams. Let me address each of your questions:
  1. Yes, you are specifying the bias instability correctly.
  2. It is okay if only the bias instability is specified. However, it is less straightforward to measure from the generated gyroscope signal if it is the only parameter specified.
  3. I recommend using the Allan variance to measure the bias instability. There is an example of that shown in this Sensor Fusion and Tracking Toolbox Example.
More details on the gyroscope model can be found on the imuSensor reference page.
Thanks,
Ryan

추가 답변(0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by