Page 1 of 1

AttitudeController frequency vs RateController frequency

Posted: Wed Feb 12, 2020 11:32 pm
by naiveHobo
For a cascaded PID controller, the update frequency of the inner loop is generally kept as twice that of the outer loop.

Referring to the crazyflie-firmware (https://github.com/bitcraze/crazyflie-firmware), I found out that in the PID controller update loop, a single condition controls the update of both the attitude and the rate controller.

How is the rate controller running at twice the frequency of the attitude controller?

I have opened an issue regarding this in the crazyflie-firmware repository as well:
https://github.com/bitcraze/crazyflie-f ... issues/552

Re: AttitudeController frequency vs RateController frequency

Posted: Thu Feb 13, 2020 9:50 am
by tobias
Running the attitude controller at the same frequency as the rate controller will not make it worse, however there might be room to save up some CPU by lowering the attitude update rate.

Re: AttitudeController frequency vs RateController frequency

Posted: Thu Feb 13, 2020 10:27 am
by kimberly
Hi! I also answered your question on the github issue :)