Large drone, vibrations and yaw instability

Hi, new forum poster here looking for advice.

I am in the process of building a larger drone quad (X-frame) with two main problems, vibrations and yaw instability. I’ve gotten it to the point where it is flyable but only by reducing gains (P = 0.1, I = 0.1, D = 0) and reducing maximum yawrate to 40deg/s, limiting the potential of the drone.

Drone setup: Cube Orange+ (PX4 14.4), 30", 100kv, 12S, 1.26m motor to motor diagonal, 7kg takeoff without payload. Using ~3kg dummy payload weight seems to improve flight performance, probably due to brining hover throttle closer to 50%. (37% without any payload weight)
Internals consist of two CF plates sandwiched with standoffs and aluminum motor mounts.


Drone:

Example flight log: https://review.px4.io/plot_app?log=0e580164-fee5-403e-bcfa-b9b96a4ab550

Problem 1: High vibrations
Running these low kv motors with large props means the prop passing frequency is low.
Theoretically (Chris Rosser formula), it should be around 25-35Hz depending on battery voltage and weight.
f_props = RPM_hover / 60 = V_batt * Kv * Thrusthover / 60 = 12*4.0 * 100 * 0.37 / 60 = 30 Hz
This seems to resonate with the frame causing a large spike at 25Hz.

I’ve tried to make the frame as stiff as possible with CF plate, aluminium arm mounts, CF tube arms etc. I’ve also tried various mounting solutions (Hardmount, 3M foam tape and the 3d printed bushing mount.
The 3M foam tape performed the best.

I needed to set D_gain = 0 since any non zero value (tried 0.0004 as lowest) causing more vibrations, hence ignore the IMU_DGYRO_CUTOFF = 20 Hz, it has no effect.
I’ve currently set the IMU_GYRO_CUTOFF = 30 Hz and setting it lower (e.g 20Hz) makes it fly worse.

I do not have rpm feedback from escs so only option I can think about is dynamic FFT notch filter from IMU data. I tried that but didn’t seem to make a difference.
I don’t think static notch filter would work since this is most likely related to prop speed?

My questions:

  • Any hardware changes I can make to try and reduce these low frequency vibrations?
  • Any software changed I can try?
  • Is there a way to see post-filtered IMU data to see if dynamic FFT is working?

Problem 2: Yaw instability
After some initial tuning making the drone “flyable” I experienced yaw causing instability. Almost like one motor producing less/more torque than another one.

I have measured motor rpm speed at [20, 40, 60, 80] % throttle and they are within a couple rpm (measurement error).
I could not figure out why or how to solve it so I reduced the maximum yawrate to 40deg/s which seems to mitigate the problem. However this is just a band aid for the real problem.

I even tried adding circumferential tilt of 3 and 6 degrees but that didn’t solve the issue, it just gave the drone more yaw authority. (easier to yaw since thrust now contributes to yaw and not only torque)

One idea is to swap motor 3 and 4 (X-frame) since those seem to be imbalanced from viewing the video footage but I do not have 2 extra motors lying around. The motors and props are T-motor which have had good quality previously. (Tried swapping prop placement and didn’t matter)

Below is footage with 80 deg/s maximum yaw rate, pay attention to how the drone wobbles.
Looking at the yaw rate in PID tuning it seems like the yawrate is tracked OK, even in the presence of the wobble in pitch/roll.
Here is some footage of flying at 40deg/s, 80deg/s and freeflying. (Also includes flight more logs)

My questions:

  • What could be the underlying reason for this yaw problem?
  • Any hardware / firmware changes I could do to try and figure out the problem?

EDIT:
Did not know if PX4 Autopilot or other subcategory was correct, trying here.

Best Regards
Isak

Looks like in this flight EKF0 /IMU0 is selected, while IMU2 has much lower noise.
Both IMU0, IMU1 perform worse than IMU2: https://review.px4.io/plot_app?log=0e580164-fee5-403e-bcfa-b9b96a4ab550#Nav-Vibration-Metrics

I would recommend disabling IMU0, IMU1 completely, and using only IMU2.

Alternatively, can disable multi-EKF and use sensor selection, SENS_IMU_MODE=1, this might also work.

you need to increase and tune IMU noise parameters. default values are for drones with reasonable vibration, your drone has much higher noise.
EKF2_GYR_NOISE
EKF2_ACC_NOISE
(and related paramters)
This way, magnetometer will have higher weight, and yaw estimation should get better. In current setup magnetometer is working reasonably well but is under-utilized.

Is there a way to see post-filtered IMU data to see if dynamic FFT is working?

yes, you can look at filtered IMU values, in vehicle_acceleration, vehicle_angular_velocity topics, can open ulg with plotjuggler to view them.

You’re right, I had seen that IMU2 works better as well but did not know how to change it.

I will try to using IMU2 only and adjust EKS2_GYR_NOISE and EKF2_ACC_NOISE and see if I can get better performance.

Thanks for the reply and analysis. :slight_smile:

I’m looking through official PX4 post about sensor selection and state estimators but I cannot see how I can force the IMU2 to be used. I can only see how I can disable multi EKF, not how to select which to use when running single EKF instance.

Could you provide details on how to disable IMU0/1 or how to select IMU2?

you can set CAL_ACC0_PRIO, CAL_ACC1_PRIO to 0 (“disabled”), and leave CAL_ACC2_PRIO to some value above zero (for example default 50)
Same for CAL_GYRO0_PRIO, CAL_GYRO1_PRIO

Thanks, I will go out and make some test flights later today and see if I can get some better performance.

I’ve had experience setting up drones of the same size and weight as you.

As you mention the notch filter, “I tried that but it didn’t seem to make a difference.” Can you post the flight log? The notch filter significantly contributes to the inner control loop. (I experienced using PX4 since the notch filter was not implemented, which was extremely poor for low speed motor-prop.)

By using the notch filter, I adjusted the following parameters, and the drone flew quite stable.

IMU_GYRO_FFT_MIN = 20
IMU_GYRO_CUTOFF = 30 Hz
MU_DGYRO_CUTOFF = 18 Hz
IMU_GYRO_DNF_EN = 1: FFT
IMU_GYRO_NF0_FRQ = 25
IMU_GYRO_NF0_BW = 7
All D-term = 0

I generally reduce MC_PITCH_P and raise MC_PITCHRATE_P (for roll and yaw as well) and lower MC_PITCHRATE_MAX to 90-120 deg/s.

Reducing MPC_MAN_TILT_MAX and MPC_TILTMAX_AIR to ~25 deg is also beneficial during the tuning phase.

I always fly the drone in stabilize flight mode first to experience the actual response (not interfered with by the position control loop, which may lead to lower stability if the inner loop is not well tuned, including cutoff frequency and notch filter).

The high vibration (linear acceleration) is crucial in the position hold mode. The flight behavior may deteriorate during Mission mode. The vibration appears typical because two IMUs are placed on the same damper while one is not (CubeOrange’s IMUs); nonetheless, one IMU produces better results. I have never disabled the IMU and always try to solve it at its root or add a damper balls instead.

Here is a hover test with dynamic notch filter. Since the FFT shows pre filtered data it’s hard to see if it has made a difference. I did not experience any improved behavior.
Here is another when freeflying.

A static notch filter will not work for me since operating conditions (payload weight will change).

I’ve tried rubber bushings, 3M foam tape. Yesterday I tried alpha gel silicone bushings and they seem to have reduced X/Y vibrations significantly (but Z has increased by a lot) and completely removed the gyro spike, which is very noticeable.
Here is a wiggle test flight log with alpha gel.
I am confused to why the Z vibrations increased so much while the X/Y were reduced.
It might the the alpha gel bushings being susceptible to Z vibrations while providing good X/Y dampening, I will try alpha gel bushings and 3M foam tape combo today and see if that can help.


Here is a flightlog from today of a hover test where I used double vibration dampening, first Alpha gel bushings on a carbon fibre plate and then the flight controller attached to this plate via 3M foam tape.

It can be seen that the acceleration noise is reduced but the Gyro noise is still there.

I also added some more weight (+4kg) on this hover test and it can be seen that the spike has moved up in frequency.

Seems like acceleration could be at an acceptable level now but the gyro noise with no payload scares me, I will go out tomorrow and try more with the dynamic notch filter with FFT (No esc feedback). I will also try HARD mounting the FC instead of using rubber balls just to get a comparison, don’t think that will work very well.

Perhaps adjusting IMU_GYRO_CUTOFF to 25Hz could be the sweetspot since at 20Hz it starts affecting flight performance and at 30Hz it’s too high to reduce the frame / prop resonance without payload.

I also read that some people were experiencing more vibration problems with the Cube Orange+ compared to the normal Cube Orange so I’ll have a test with an old Cube Orange I have aswell to compare.

Update @coolvision, @saengphet

Today I tried Cube Orange instead of Cube Orange+, and it did not make it better, perhaps a little bit worse. However I also tried hard mounting the Cube orange to the center of the bottom carbon fibre plate and it made a huge improvement!
Here is a comparison of a 20s hover test in the same conditions with the same flight controller, the only difference is one is soft mounted (alpha gel bushings and 3M foam tape), the other is hard mounted.


The 20Hz peak is almost completely cone, the 35Hz peak is greatly reduced and the overall noise is reduced. I am quite surprised about this and the only explanation I can think of is if the frame is very stiff it will pass higher frequencies and stop lower ones while the soft mounted version allows for the low frequencies to pass easier.

Tomorrow I will go back out and try hard mounting the Cube Orange+ to see if I can get even better performance. Might be able to increase some PID gains aswell, even though tracking seems good.

Post filitered accelerometer and gyro data is starting too look quite good now