Page 1 of 1

Update frequencies of sensor signals/states

Posted: Sun Feb 16, 2020 9:42 am
by joyner
Hello,

as I can see in https://github.com/bitcraze/crazyflie-f ... tary.c#L44,
the attitude update rate is 250 Hz (angle Pitch/Roll/Yaw) and position update rate is 100 Hz (X,Y,Z). But what are the update frequencies of the sensor signals, e.g. angular velocities of Pitch/Roll/Yaw and translational acceleration/speed (e.g. stateEstimateZ az, vz)? I'd be glad if anybody knows where to find the frequencies.

Joyner

Re: Update frequencies of sensor signals/states

Posted: Mon Feb 17, 2020 1:34 pm
by tobias
The sensor readings of Acc and Gyro run at 1000Hz and the PID rate controller is coupled to that. The different estimators might then run attitude and higher level of estimation at lower frequencies.

Re: Update frequencies of sensor signals/states

Posted: Wed Feb 19, 2020 4:33 pm
by joyner
Thanks! Do you know where I can find the definition (1 kHz) in the code?

Re: Update frequencies of sensor signals/states

Posted: Thu Feb 20, 2020 7:54 am
by kimberly
You can find those in the IMU driver: https://github.com/bitcraze/crazyflie-f ... .c#L57-L62

Re: Update frequencies of sensor signals/states

Posted: Sun Mar 01, 2020 6:29 pm
by joyner
Thank you for your help! But another question occured to me recently...

I am using the flow-deck and I noticed that frequencies of acceleration, speed and position (stateEstimateZ az, vz, z) are different than without flow-deck. Where can I find these frequencies? That would help me a lot. I already searched in Flow-Deck driver "flowdeck_v1v2.c" but couldn't find anything.

Re: Update frequencies of sensor signals/states

Posted: Mon Mar 02, 2020 3:34 pm
by kimberly
Hi! That might be due to that the flowdeck driver is forcing the kalman filter to be initialized (estimator_kalman.c), but without the flowdeck, the complementary filter is initialized (estimator_complementary.c), which is the default. Since that is a smaller and simpler estimator, I would assume that the estimation goes much faster on that one.

Re: Update frequencies of sensor signals/states

Posted: Mon Mar 02, 2020 9:13 pm
by joyner
Ok, but I think the update frequencies of stateEstimateZ az, vz and z differ among each another. So it's probably not the same frequency as the estimator_kalman is running at, I guess? I want to simulate signal-noise, so I need the exact update rates of stateEstimateZ az, vz and z when using flow-deck. I tried to find out the frequencies by logging them with increased logging-rate (1khz), but the results were not usefull because update rates were irregular.
If anybody knows in which file the update frequencies are defined, please let me know.

Re: Update frequencies of sensor signals/states

Posted: Tue Mar 03, 2020 8:45 am
by kimberly
All the update frequencies are all defined in modules/scr/estimator_complementary.c in the crazyflie firmware. The stateEstimate.Z is estimated at a 100 hz with the zranger, but the accelerometers are being integrated at the speed of the attitude rate, which is 250 hz. This might explain the difference.