I'm developing a project consists of an IMU controlled by Arduino through which you can send via a radio module, the data to the PC of the three Euler angles and raw data from the sensors. For filtering I used the code made available by SparkFun: Razor AHRS 9 dof
The code does not provide radio transmissions and is tuned for 50 Hz sampling rate, in fact its parameters are:
// DCM parameters #define Kp_ROLLPITCH (0.02f) #define Ki_ROLLPITCH (0.00002f) #define Kp_YAW (1.2f) #define Ki_YAW (0.00002f)
in this project data is read every 20ms (50Hz) and records of the sensors are set to the accelerometer odr 50hz and 25 bandwidth. with the gyroscope 50 Hz odr.
In my project I used a gyroscope different, namely that I used L3G4200D frequency odr starting at 100Hz, I set then registers with the 100Hz. My global data rate is 33Hz max, beacouse the use of a radio, i read the complete date with a frequency of 33Hz.
How can i tune the
Kp of my setup? the
Kp is the period, I have to consider the frequency odr that I set to register in the individual sensors or i have to set the global system sample rate limited to 33Hz by the radio transmission?