Bolt Tuning

Post here to get support
Post Reply
Posts: 10
Joined: Thu Feb 18, 2021 6:34 pm

Bolt Tuning

Post by relame »

I am a total beginner when it comes to drones and Crazyflie but I have been trying to tune my Crazyflie bolt with a brushless build and it is turning out to be a difficult task. I know how to adjust parameters on the firmware and upload the firmware properly and I have been testing the parameters with cfclient. I have a few questions that I believe will help me get on track.

1) I have been focusing on changing the values in "pid.h", is there anything else I need to change?

a) I have seen people talk about changing the weight and thrust parameters but where do I go to do that? I know there exists a "Thrust_base" viewtopic.php?f=2&t=4210&hilit=tuning but what about a weight parameters?

b) What about ESC tuning? Specifically in this post viewtopic.php?f=3&t=4545&p=20856&hilit=bolt#p20856 They talk about "motorPowerSet"

c) Finally, do I need to adjust the Kalman filter settings? I have seen one post that does something to the kalman filter ... man.c#L183

2) Question 1.a leads me to the question of what is the difference between "pid.h" and "position_controller_pid.c". Do I need to change the PID values in both and why are there PID values in two places?

I appreciate any advice anyone can give me
Posts: 2165
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Bolt Tuning

Post by tobias »

Tuning can be challenging and something we want to improve. Hopefully soon!

1. You started in the right end. Start with the rate PID values as these has the biggest effect. The attitude PID values often doesn't have to change that much.

2. The kalman filter tuning is a bit easier now and you just have to define the weight, CF_MASS. I define this in my file:

Code: Select all

# Bolt compile flags
With 1 and 2 the drone should fly decently on autonomous mode (with some positioning system). The START_DISARMED requires one to set the parameter system.forceArm to 1 to be able to take of which is a good safety feature.

1b) This is generally not needed

1c) Only weight as described in 2

2) The position PID is for the position and default values should work quite well, especially if you have a more powerful setup which is most often the case with the bolt.
Post Reply