Dramatic braking in PosHold and loiter modes and behavior in windy conditions

Hello all,

My research group has built a large quadcopter that, after being auto tuned, performs well except for two circumstances:

  • Our most pressing concern is that in moderate to high wind gusts (15-20mph) the aircraft pitches forward dramatically and instantaneously.
  • The second and perhaps less serious issue is that after ceasing input during lateral movements in both position hold and loiter flight modes, the braking is dramatic and seems to exceed the 8 deg/s roll rate and 30 deg max angle set in the parameters. However, it quickly recovers without oscillation.

Hardware:

  • Motors: MAD M6C12 170kV
  • ESCs: T Motor Flame 60A HV
  • Propellers: 24.4" T-MOTOR MF2412
  • Frame: Custom carbon fiber frame
  • Flight controller: Hex Pixhawk 2.1 with Cube Blue H7
  • PDB: Custom PDB
  • Battery: 12s 21800 mAh
  • Battery connectors: Matek AS150
  • Comms: HereLink Blue
  • GPS: 1x Here3

Notable software configurations:

  • FFT notch filtering
  • Experimentally determined mot_thst_expo
  • Here3 GPS as primary compass with cube compass as back up
  • Altitude control uses only the cube barometer

Flight configuration:

  • 23.1 lb takeoff weight

Known issues:

  • Altitude loss during long straight movements

  • Infrequent but very consequential “EKF3 ground mag anomaly” errors. Presumed to be resolved by relocating GPS further from PDB and making it the primary compass. Motor compass test now shows less than 11% interference up to 70% throttle. The error has not reoccurred with the new configuration but continues to perform midflight yaw realignments that cause mild to moderate instability that is quickly resolved.

  • Aggressive landing behavior following the presenting issues resulting in spinning about one of the land gear legs when attempting to land and disarm. Presumed to be due to mot_spin_min being set too high, but it has not yet been changed.

High wind flight - wind behavior in PosHold mode
Bin file:

Video:

Wind issue: 0:41

Description:
Previously the drone was manually tuned per the documentation and had been flying with these manual values. The day prior to this flight, the pitch and roll axes were auto tuned in a 24 minute flight at dawn with very little to no wind. The yaw axis was then auto tuned in another 11 minute flight. During both flights periodically the “auto tune failing to level” warning appeared but the flight characteristics when these warnings occurred didn’t reflect any issues and the tuning continued and was eventually successful. However, during the yaw tuning flight, the twice the aircraft performed an inflight yaw alignment that resulted in an instability that was immediately corrected. These auto tuned PID values flew perfectly and following flights that morning had no issues or remarkable incidents despite lifting and dragging an 18.4 lb payload.

The following day (the day of the video) winds were 15 mph gusting to around 25 mph. The drone was first tested by hovering and exhibited a pseudo flyaway in that full throttle down in PosHold mode did not cause the aircraft to descend but instead it continued ascending at a slow rate. After switching to AltHold, we were able to land but the drone pitched forward dramatically on descent. When flown again the altitude and position were stable, but the aircraft exhibited the same pitching motion and had to be violently landed. This same behavior occurred in loiter mode, after the ESCs had been recalibrated, and in milder (around 6mph gusting to 15mph) conditions two weeks later.

Moderate wind flight - braking and wind behavior in loiter mode
Bin file:

Video:

Braking: 1:03
Wind issue: 2:25

Description:
When hovering or flying in low wind conditions, the aircraft flies very well. However, after gaining speed in lateral motion, ceasing input causes the drone to tilt faster and beyond the maximum values set by the parameters. I believed this issue was due to a poor tune, so I auto tuned the roll axis in albeit slightly windy conditions (~3-6 mph) and did get P and I terms approximately 30% lower, D term 20% lower, and angle P terms about 50% lower. These PID values exhibited the same behavior in addition to overall worse flight characteristics compared to the previous auto tune values.

My main hypothesis is a bad tune but other tunes we have tested have all performed worse save for this issue. Could it be a hardware issue? If so, would it be a bad motor or ESC or something else entirely? Motor 4 does seem to be commanded less than the others but it is also the motor facing into the wind in these videos. We are open to all possible resolutions, hardware or software. If any more information is required, please let me know and I can provide it as soon as possible. Thank you and I look forward to hearing what you all have to say!

Hi, welcome to the community :wave:t2:

I have good news and bad news:
The good news is that what you are experiencing is expected behavior, given your state of configuration and tuning.
The bad news is that you have quite a bid of work ahead of you until your drone flies perfect.

The first thing I noticed when I looked at your logs is that your vibrations are concerningly high. Below 10 is good, below 15 is tolerable, above 15 is bad. When you match the timeline of the plot to the videos it becomes obvious that the vibrations were exeptionally high whenever the copter had a bad twitch. The spikes where the vibes go out of bounds is where the copter got grounded and can be ignored.
vibe_first_flight
vibe_second_flight
Reducing vibrations is your highest priority right now. Everything else depends on it.

The second thing I noticed is that you didn’t set ATC_THR_MIX_MAN and your PSC_ACCZ_P and PSC_ACCZ_I don’t correspond to your MOT_THST_HOVER. Those values should have been attended to after the first test flight and mission planner tells you that explicitly after setting the initial tuning parameters.

The third problem is that you are missing vital calibrations, namely the IMU temperature calibration and the inflight MagFit calibration.
missing calibrations

So in conclusion I’d say your problem is that you started with a badly tuned drone and autotune understandably wasn’t able to fix it.

I recommend to read and follow the How to methodically tune (almost) any multicopter using ArduCopter 4.4.x guide. Download the .zip folder with the param files from the guide, edit each file to suit your copter and upload them one by one as you read along. The guide tells you what to do and which file is needed at any given time. Do not skip any steps! All steps are essential for all of the following steps. Anything that might seem like a shortcut will result in a worse tuned drone in the end.

2 Likes

Thank you so much for helping us out! Thankfully, I have already begun reinitializing our set up per the guide and will update this thread with our results. We will replace our current vibration damping setup for the Pixhawk with the recommendations in the documentation. I believe we will go with either the Kyosho Zeal gel or HolyBro foam unless you believe there is a better option for us. Thanks again.

Perfect, I’d love to hear about your results, especially when they’re good :wink:

In my experience it is best to start the fight against vibrations at the source:

  • balance your props (obvious)
  • balance your motors (only if you can, it is quite complex)
  • stiffen up your frame; the stiffer the frame is, the higher is it’s eigenfrequency (resonance frequency)
  • make sure that everything is mounted tight and nothing rattles → more mass that resists vibrations
  • the GPS mast in particular has to be stiff and shouldn’t shake easily

Apart from that the mentioned gel and foam are good options.
When the FC is mounted on gel/foam, make sure you don’t have taut or stiff wires (flexible silicone wires are best).