AttitudeController frequency vs RateController frequency

Discussions about all things Bitcraze
Post Reply
naiveHobo
Beginner
Posts: 1
Joined: Wed Feb 12, 2020 10:58 pm

AttitudeController frequency vs RateController frequency

Post by naiveHobo » Wed Feb 12, 2020 11:32 pm

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



tobias
Bitcraze
Posts: 1969
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: AttitudeController frequency vs RateController frequency

Post by tobias » Thu Feb 13, 2020 9:50 am

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.

kimberly
Bitcraze
Posts: 255
Joined: Fri Jul 06, 2018 11:13 am

Re: AttitudeController frequency vs RateController frequency

Post by kimberly » Thu Feb 13, 2020 10:27 am

Hi! I also answered your question on the github issue :)

Post Reply