Extreme Gyro Noise in Yaw

So I’ve been getting some terrible noise in yaw(around 24Hz), and I can’t seem to figure out the issue. The confusing part is that, with yaw noise this bad, I would hardly expect to able to fly at all. However, it does seems to fly somewhat okay, though, and you don’t visually see it behaving extremely erratically.

The platform is a custom build with 15" props, using a Pixhawk 4 mounted with four foam pads. I’ve tried running it on the bench without props thinking that they may be ridiculously out of balance, but I still seem to get massive amounts of noise. I’ve tried covering the ESCs and PDB with aluminum foil in case it was some EMI issue. Finally, I tried switching the flight controller because I was thinking it could simpy be a bad IMU, but no dice. In addition, I seem to get frequent errors with inconsistent compass orientations (w/ external GPS) and occasionally with accelerometer bias. Could it simply be that my frame simple has this vibrational mode at this frequency? I’ve made more than one of this frame, and I’ve seen this vibration before, but the other quads no longer seem to have this issue.

Below are some of the logs I’ve recorded. The flights are basically at hover:

Flight (old Pixhawk): https://logs.px4.io/plot_app?log=f5d94da4-0c10-4b7b-83b1-8b5a5bbaaed6
Bench (replaced Pixhawk): https://logs.px4.io/plot_app?log=a7891051-8e80-4b1c-88ee-bd31c41a7346
Flight (replaced Pixhawk): https://logs.px4.io/plot_app?log=45aeee7a-731b-48c1-bed2-591013ce40b7

Hi,
You can try one thing is setting up a notch filter at 25hz which seems to be the blade pass frequency of your props. Most likely that is the cause for the noise and may lead to some abnormal behaviour in future. Better to filter that spike and test to see if there is still noise in the signals.

That’s what I was originally thinking, which is why I tried it on the bench without propellers on as I mentioned. The noise was still there, though.

Interesting log! You can see that the controller is actively trying to control yaw very aggressively.

So, it’s likely that you need to tune your yaw control loop, probably just make it a bit less aggressive.

There are some docs here: Multicopter PID Tuning Guide (Manual/Advanced) | PX4 User Guide

You can use the tuning tab in QGroundControl, or the params would be MC_YAWRATE_K as well as the respective P, I, D, and FF.

1 Like

So I decreased the yaw rate K gain (1.0->0.5), and it seems to have mostly eliminated that 24Hz peak in the controller, although there does still seem to some gyro noise in the angular acceration FFT graph.
I can try to play around more with the K and/or I gains, but the yaw tracking really seems to be quite bad, and I’m still concerned that the vibrations according to the vibration plot are quite bad, although maybe some prop balancing would help with that?

Log: https://logs.px4.io/plot_app?log=bf8fde17-5aa8-41a8-8146-ec4b3759fe68

Check the orientation of the motors. Any chance they are tilted a little bit against yaw, or completely horizontal?

Generally you see much better yaw tracking if the motors are slightly tilted towards the yaw the respective motor is trying to achieve.

If I’m not being clear describing this, check https://oscarliang.com/tilted-angle-motor-mounts-racing-quadcopter/.

So I tried my best to balance the props properly in addition to the decreased K gain on the yaw rate, and this is the resulting log:

https://logs.px4.io/plot_app?log=50013ccc-0c9a-41d5-9567-e7565a2b9119

The Actuator Controls FFT chart looks great, and both the Angular Acceleration FFT and Raw Acceleration charts look very good compared to the previous (decreased yaw rate gain) log here:

https://logs.px4.io/plot_app?log=bf8fde17-5aa8-41a8-8146-ec4b3759fe68

My only concern is that the “Vibration” still shows that it’s in the red. I’m not sure there’s much else I can try, and I’m thinking it might just be some tolerance issues with the frame, as I have a duplicate frame with excellent(green) vibration.

Keep an eye out for clipping. If you get vibrations but no clipping you should be ok for now.

Thanks for all the help!
I just looked at the log again, and it appears that the “red” and “green” has been rescaled so that the vibration is all in the “green”. I was beginning to have a feeling that there was something wrong in how the vibration numbers were either calculated or interpreted by the tool due to firmware versions, and it appears that this may have been the case?

The log “looks pretty good to me” :).