PID tunning for heavy drone

Hello Here I am sharing my log file of 50kg large size drone. I have done lot of experiments to tune it and I got good control over it but i am still looking for betterment and perfection.
Kindly suggest me what setting and parameters need to change.

Thanks in advance.
log files

Very high vibration. At the top of the flight review page there is a link that will illustratie plots for good/bad vibrations you should look for yourself.
You might want to work on that first.

Hello, I think I can provide some advice, based on what we are going through with our own heavy drone. First of all, the vibration is very high, as mentioned, and your cutoff frequency is beyond all of this noise, so you are most likely getting this noise introduced into your control loop. Ideally, the IMU_GYRO_CUTOFF should be lower than areas of very high noise so that you filter it out. Why did you increase the IMU_GYRO_CUTOFF in the first place?

Secondly, it looks like you are saturating the output of your actuators. Ideally, the hover thrust of your machine should be centered around 1500 us PWM frequency, so that you have equal room above and below to change speed (faster or slower) of the motors. It appears that yours is constantly clipping the upper limit, meaning that the drone is frequently trying to command a speed faster than what is physically possible/allowable. Your drone could be a bit underpowered, or you have your control gains tuned up too high and they resulting motor outputs are saturating.

Vibration is really bad in the 50 Hz range and I suspect that a lot of this is being caused because your cutoff frequency is not low enough and you are effectively amplifying vibrations with the control system. I’m not sure how the airframe looks, but it’s possible it’s not stiff enough or there is something loose as well.

I hope those tips help.

Hello, Thank you very much for your response.
I guess I over tuned my drone. About cutoff frequency I thought its should be higher maybe I am wrong.
I have another log file with same frame with less vibrations.

Kindly check it and suggest me what could be best possible way.
Thank you very much for help.

Hello @abhinav_singh_thakur

Cutoff frequency is the cutoff for a low pass filter and thus cuts off (attenuates) frequencies higher than it (with increasing effectiveness as we move farther to the right of it on the frequency axis). So, your cutoff should be below where you are seeing lots of noise ideally.

I see in the first log you posted that noise and cutoff frequency look much improved…this is good.

However, I am also noticing something weird with your actuator outputs and actuator controls plots, which indicate something weird is happening on the yaw axis. Are there any notes you can provide about the experience of flying with the drone for the first log?

If you look at the PX4 Flight Review page, you will see this on the page:

This looks a lot like yours. Are you confident that all motors are precisely level and not angled?

I see that on your flight, the yaw controls keep growing, due to the integral (which I think means either your yaw estimate is drifting or your controller can’t achieve good yaw tracking because it’s potentially being overpowered by motors that are not perfectly aligned).

That would be something to look into.

I should mention that I’m not an expert yet, and we are still trying to tune our drone successfully too (still not quite there yet). But I am fairly confident in the recommendations that I’ve given for you to look into.

Looking at your second log, it seems that vibration is also not horrible, but you have the same (if not worse) yaw command growing larger and larger. Hopefully you can figure out why that’s happening because I think that’s degrading your performance.

A final question: Why did you tune down MC_ROLLRATE_MAX and MC_PITCHRATE_MAX to 45 deg/s? At what point in the tuning process did you experiment with these, and why are they this low? Do you believe this to be the maximum speed your drone is physically capable of achieving in the roll and pitch axes?

1 Like

@Francisco_Dankorov Thank you so much for help. I am hanging the drone inside the warehouse…That maybe the main cause for YAW uncertainty. I keep Rollrate and pitchrate very low so I could not accidentally crash it…since drone size is 1500mm(motor to motor) 32inch propellers and 45kgs weight…so that’s why I put all parameters very low and hanging it to avoid fall and crash.

No problem, I hope it helps. I would be interested to see your setup if you feel like you can share it. Do you have a good way of tuning without crashing? We need to figure out something like this too.

Also, read this when you have the chance. I think you should adjust the max roll and pitch rate to be what your drone can physically do. Otherwise it will limit the bandwidth of disturbances that your drone can correct for. For example, if wind disturbs your drone very quickly, then you won’t be able to apply a correction faster than 45 deg/s. There are apparently other ways to make it feel stable, such as smoothing and filtering your manual control input, but the rate should be as high as what is physically possible by the drone, from what I understand.

1 Like

@Francisco_Dankorov Yes ofcourse I can share you my setup and videos. Kindly give me your email or whatsapp contact or any other way to connect.

Sure, I sent you a message here to give my email. Please update on how the tuning is going on this thread. Good luck

Did you ever have any progress on this?

@abhinav_singh_thakur I am interested to know what is happening with your testing.