Hello!
I am working with an LSM6DS33 gyroscope+ accelerometer sensor onboard Balboa32U4 robot. I referred Pololu’s arduino library and was able to balance the robot at control loop frequency of 100 Hz, and sensor update frequency of 208 Hz, 1000 dps scale.
To understand the feedback control further, I tried and tested different loop frequencies and sensor output data rates:
Control loop frequency(Hz) | Sensor output data rate(Hz) | Performance mode | Observations |
---|---|---|---|
100 | 208 | Default (high) | smooth balance of robot with no tuning of parameters required |
100 | 104 | Default (high) | wild back-and-forth oscillations, even after tuning of parameters |
100 | 104 | Normal mode | smooth balance of robot; no parameter tuning required |
50 | 104 | Normal mode | smooth balance of robot, after tuning parameters |
50 | 52 | Low performance mode | robot balances, albeit not very smoothy, after tuning parameters |
The performance mode of the sensor is configured through CTRL7_G
register. I faced these questions after the above observations-
- How exactly is the performance mode of the sensor related to the tuning of parameters in calculation of
motorSpeed
, responsible for balance of the robot? - How does the LSM6DS33 sample the data? Does the balboa control board take the most recent value from the register to which the sensor writes the data, or does it consider some computed value of the new and previous sensor samples?
- Why is parameter tuning necessary when changing the sensor’s output data rate, keeping the control loop frequency constant?
I could not find any definite answers to these questions in the sensor’s datasheet, as well as the robot’s user guide, and pololu’s lsm6-arduino library. I may have missed something simple, but would appreciate a lot for any help. Thanks!
-Som