Tuning a fleet of large quadrotors

I would position the battery at the CG for tuning. Yes those filters. In some cases the tuning guide suggests these values too low for larger prop craft. The gyro filter at 20Hz is fine.

Ok, I’ll give this a go tomorrow morning and let you know how it goes.

Thanks for your help on this @dkemxr!

And I’m not seeing the same post filter FFT as you posted. Update Mission Planner to latest Beta.

Maybe before running Autune , but after making the suggested parameter changes, simply do a ~1min hover flight in Althold with INS_LOG_BAT_OPT at 0 and post that log. You have so many graphs and logs posted in this thread perhaps it’s best to start from the beginning.

What you posted is what I see too, just scaled (notice Amplitude axis):

On that note, I set the INS_HNTCH_FREQ = 48 to match the peak I see. Do you happen to suggest another frequency?

I can run another pre-filter log. Do you want me to keep the filter enabled for the autotune?

I don’t know, you can’t base the filter settings on post filter data.

Absolutely you need the filter enabled for Auto Tune.

Ok, started with default PIDs this morning. Did a compass calibration and an acceleration calibration (both were asked for). I had to lower the P and I gains for pitch and roll because I saw some unwanted oscilations. Now Stabilize and AltHold are reasonably solid. Here are the baseline pids:

I also measured out the motor distance from the center. Come to find out C1 and C4 were farther out than C2 and C3. I moved them to be exactly the same distance from the center.

And the pre-filter fft analysis:

Looks like the motor peak is at 41hz. Im setting the filter to accomodate this frequency and running a post-filter analysis.

Here’s the log for the baseline flight: https://drive.google.com/file/d/1GUiEbV43EiP_UFYPSIPXOvolGqI_O0o5/view?usp=sharing

Yea, looks about right.

Here’s the post-filter fft analysis:

And log for the flight: https://drive.google.com/file/d/1_aTGFvSgrYN_NrIMxnBLvsBqoZd-ORBV/view?usp=sharing

Anecdotally, she feels solid already. About to go into autotune…

If AutoTune softens everything back up you may have to revert back to this and manual tune. Worth trying though.

Ok, bad news. I crashed two of the quads during the pitch autotune. :anguished: I believe the first crash was due to a desync on a motor I repaired from my last tuning outing. The second crash, though, was from excessive oscillation and it just couldn’t recover. Note, I performed the same parameter reset on 3 as I did on 4

First autotune (on 4): https://drive.google.com/file/d/1e0RxIp2RR-orD-0g8NF7vh3PR6ohd6fa/view?usp=sharing
Second autotune (on 3): https://drive.google.com/file/d/1lu291X56Ye5i0yJOc0Kxln4HYjBUA2o7/view?usp=sharing

I’m done tuning for the day as I need to repair the quads. Luckily only some 3d printed parts broke.

I’d appreciate your analysis of this @dkemxr and advice. Thanks again!

Mulling the flight over on the way home, perhaps I set the initial pitch tune P too low. I really only saw oscillations in the roll direction, but set the P to 0.085 for both roll and pitch.

Sorry to hear that. Yes, perhaps P was too low. I would set these back to default for now:
MOT_SLEW_DN_TIME,0.025
MOT_SLEW_UP_TIME,0.025

And set these to 6S (right?) recommended values:
MOT_BAT_VOLT_MAX
MOT_BAT_VOLT_MIN

Also check out PM Nlon and Load in the 2nd tune log. Both are pretty high, something is bogging it down (for lack of a better term). Try turning fast sample off for the 3rd IMU3. Dynamic notch only runs on the 1st one anyway.

These values are set to 0.025 as they were during today’s flights:
MOT_SLEW_DN_TIME = 0.025
MOT_SLEW_UP_TIME = 0.025

I’ve setup the 6S parameters following the docs:
MOT_BAT_VOLT_MAX = 26
MOT_BAT_VOLT_MIN = 18

We added some weights to the flight controller to help dampen vibration, along with some vibration dampening gel, could the be the culprit that is “bogging it down”?

Yes I know. Suggesting set them to default.

Recommended for 6S is
MOT_BAT_VOLT_MAX = 25.2
MOT_BAT_VOLT_MIN = 19.8

No, I’m talking about the processor load and the Long Running Main Loops being high.

The defaults for MOT_SLEW_DN_TIME and MOT_SLEW_UP_TIME
are both 0 right?

I’ve updated the MOT_BAT_VOT_* parameters.

I may have left the INS_LOG_BAT_MASK set to 1, would that cause the processor load you see?

Ok, I’m going to tune again tomorrow morning. It seems the big thing to change is the initial pitch P. Anything else I should pay attention to @dkemxr?

Your X and Z axis vibrations need a bit of improving. Y axis is good and indicates damping in that axis is different to damping in the X and Z axis. Look for wires pulling tight or something bumping against the FC. Try to get the wiring so it’s flexible but not waving around loose where they plug into the flight controller. Check for anything else loose too.

If you can improve the vibration levels you will improve stability right away.
Then try these:
ATC_INPUT_TC,0.2
INS_GYRO_FILTER,22
ATC_ANG_RLL_P,5.5
ATC_ANG_PIT_P,5.5
ATC_RAT_RLL_P,0.1
ATC_RAT_RLL_I,0.1
ATC_RAT_RLL_D,0.00625
ATC_RAT_PIT_P,0.1
ATC_RAT_PIT_I,0.1
ATC_RAT_PIT_D,0.00625
Do a take-off and look for oscillations, if all is going well then do some hovering and gentle fly around. Land and check for hot motors or anything unusual.
Send us a link to that log file.

Thanks for the guidance @xfacta, I noticed that the Y vibration was low, but this points at exactly what you’re talking about. This gives me hope.

For the PID parameters, can you give me some details about how you chose these numbers?

I’m just kind of rounding those PID values to something safe, and D term (roughly) is about P/15 to P/20 in most cases. I wouldn’t say that is a rule though.
I’m hoping the INS_GYRO_FILTER value has a noticeable effect.

I’ve been curious about this for some time… why are the P and I values always the same?

Ok, I further isolated the controller and it seems to have an effect. I haven’t tried isolating the #4 quad yet (where these last logs were from) but I’ll try that shortly. I also tried these PID parameters out on our #3 quad and it seems very responsive in the air. I do like the way this feels. Unfortunately, I was getting pretty bold towards the end of the flight and while trying out RTL it went into a severe oscillation and crashed. Nothing a little 3D print can’t fix though.

Here’s the log with those parameters: https://drive.google.com/file/d/1NFceSFd_AXjPNd8ATmLump9kgWP5lJS-/view?usp=sharing

Note that INS_GYRO_FILTER was set to 20 previously - I updated it to 22 for this flight