I have a IMU sensor breakoutboard using ITG3701, LSM303D LinkProduct. This involves accelerometer, gyroscope and magnetometer. I have connected the sensors to a Arduino and sending the datas to another computer over Xbee. My sensor is placed on a wheel along its radius. The controller sends data at every 100 ms delay.
The frequency parameters for sensors , i have chosen to be
// Specify sensor full scale
uint8_t OSR = ADC_8192; // set pressure amd temperature oversample rate
uint8_t Gscale = GFS_4000DPS; // gyro full scale
uint8_t Godr = GODR_190Hz; // gyro data sample rate
uint8_t Gbw = GBW_low; // gyro data bandwidth
uint8_t Ascale = AFS_16G; // accel full scale
uint8_t Aodr = AODR_200Hz; // accel data sample rate
uint8_t Abw = ABW_50Hz; // accel data bandwidth
uint8_t Mscale = MFS_2G; // mag full scale
uint8_t Modr = MODR_25Hz; // mag data sample rate
uint8_t Mres = MRES_HighResolution; // magnetometer operation mode
It can be changed to several other allowable limits given here
I want to process the sensor datas through two filters, first HPF (to remove DC components noise) and then LPF (to remove high frequency noise)
I want to do the following
Accelerometer_Raw -> /HPF/ -> Accelerometer_HPF_datas -> /LPF/ -> Accelerometer_LPF_datas
Similarly
Gyroscope_Raw -> /HPF/ -> Gyroscope_HPF_datas -> /LPF/ -> Gyroscope_LPF_datas
On the receiver side, i did the following on the sensor datas
FSa=200; % accelerometer sampling
FSg=190; %gyroscope sampling
d = fdesign.highpass('N,F3dB',2,3/(FSa/2));
H_a1 = design(d,'butter');
H_a1.PersistentMemory=true;
H_a2 = design(d,'butter');
H_a2.PersistentMemory=true;
H_a3 = design(d,'butter');
H_a3.PersistentMemory=true;
d = fdesign.lowpass('N,F3dB',2,30/(FSa/2));
L_a1 = design(d,'butter');
L_a1.PersistentMemory=true;
L_a2 = design(d,'butter');
L_a2.PersistentMemory=true;
L_a3 = design(d,'butter');
L_a3.PersistentMemory=true;
d = fdesign.highpass('N,F3dB',2,3/(FSg/2));
H_g1 = design(d,'butter');
H_g1.PersistentMemory=true;
H_g2 = design(d,'butter');
H_g2.PersistentMemory=true;
H_g3 = design(d,'butter');
H_g3.PersistentMemory=true;
d = fdesign.lowpass('N,F3dB',2,30/(FSg/2));
L_g1 = design(d,'butter');
L_g1.PersistentMemory=true;
L_g2 = design(d,'butter');
L_g2.PersistentMemory=true;
L_g3 = design(d,'butter');
L_g3.PersistentMemory=true;
Gyroscope_Z axis in degrees per second
Accelerometer_X axis in g
I chosed the cutoff frequncy to be HPF to be 3Hz and for LPF to be 30 Hz. I found there is a very big difference with the gyroscope datas after filtering when the wheel rotates. The output datas are significantly reduced for gyroscope.There are also difference at the peaks of accelerometer datas measured. Hence, when i input this to Kalman, I am getting lower velocty and the lower angle rotated. I have also verified that the output is wrong, as rotating a complete rotation gives me less than 2Pi radians after using filtering.
My questions
If my method is correct for filtering and choosing the sampling rate, cutoff frequency, order of filter etc.
If not, what filter parameters should I chose instead to get better results?
If HPF for gyroscope is necessary?
Additional:
After suggested the lower frequency limit should be much lower: I did the following High pass filtering at 0.05 Hz, The accelerometer datas are good, however i am somehow filtering out the content from Gyroscope datas
The lowpass filter at 3 HZ gave me much better result.
PS: I found the these 3 and 0.05 HZ from the FFT analysis