QAUTOTUNE - VTOL autotune for quadplanes

Here is the final suspected desync:

This shows one of the earlier twitches in contrast to a normal twitch:

See what I mean?

Thank you. Looks pretty nasty.

I tried to incorporate all of your suggestions above to prevent this from happening. Is there a particular brand or type of ESC that limits the possibility of desyncs. This build used HW X-Rotor 60 AMP ESC.

Again, I really appreciate your time and expertise. While I am frustrated, this community keeps me going.

Dave

BLHeli esc’s tend to give you the most flexibility when dealing with these issues and HobbyWing tend to be good quality.

I do a bunch of testing to work out BLHeli ESC settings when I see issues but in general there are a few directions you can go:

  • Set Demag compensation to High
  • Increase motor timing to 20 to 25 degrees

And increase your minimum throttle in the autopilot parameters a little.

Hey, we’re trying to autotune the yaw axis and we’re doing 12 minute flights without completing the tune. What would you suggest could help? A higher aggressiveness? A mechanical issue? We have a bit of play in the linkage between the tilt arm and the servo, possibly one or two degrees of rotation. Could that be enough to ruin the tune?

Pitch and roll tuned nicely.

Thanks Leonard!

It’s maddening my post must be at least 20 characters. Why can’t I just say thanks.

Bin from our flight

Ping @tridge @iampete - sorry to bother you but if you find time could you take a look at these? We did a twelve minute tuning flight but did not manage to complete it. Is there any way to get the values from the bin file? We’re thinking of plugging those values into the parameters and manually tuning from there.

If you look at the ATUN message you can track the progress of the autotune. See the description for parts of the log messages. (they are a little out of date but still correct, improvements to longing documentation coming soon) This gives the rate P and D, auto-tune just sets I = P. So you can fill out your Q_A_RATE_YAW P, I and D to where you got to. It also gives the angle P gain.

I would fill out these four values and carry on your autotune on a fresh battery, yaw always takes the longest, it will get there in the end.

edit: a few corrections, I = P is only for roll and pitch, for yaw use I = 0.1 * P. Again as this is yaw the rate D is always set to 0.

1 Like

Thank you so much Pete, I’m going to try this tomorrow. Will report back with results!

@Kungsfiskare Please do not copy those parameters in and attempt to continue to tune. This is extreemly dangerous.

@iampete Please do not instruct people to do this.

The reason this is so dangerous is that Autotune conducts very short tests and then switches back to the original tuning values to recover control of the aircraft. This lets Autotune run tests using parameter values that are unstable and would cause the aircraft to crash immediately. By design Autotune runs through a range of values, some of which are too large and on the verge of oscillation and some are too small to effectively control the aircraft.

By changing to some random part of the tune you do not know what you will get. This may also slow down the following tune if you get lucky and the parameters are still flyable.

@Kungsfiskare Unfortunately I don’t think Autotune will give you good results for yaw on this aircraft. Looking at the tune I think you will get values that are too low to fly safely. I would encourage you to do a manual tune on yaw.

1 Like

Interesting… Thanks for the heads up!

The tune it gets throughout the tuning process oscillates much less than what we could achieve manually. Perhaps we could try to use the rule of thumb for P, I and D which @iampete gave and go for a manual tune.

Thank you both for the continuous help and support you’re giving to the community - you guys are champs!

@Leonardthall,

Are there any issues with running different motor/prop combinations in the front and back.

On my build I have 3520 kv500 motors with 1510 props. On the back I am running 4112 kv 450 with 1755 props.

Just wondering if mixed motor/prop combinations lead to any problems during the autotune.

Thank you,
Dave

i see some guys building VTOL based tricopter and tiltrotor using different motor setup for front and back.

so i think it is not a problems, FC will compensate it. for me, as long as front and back didn’t have a big difference thrust performance.

@Habitat_Serea is correct. If there is a thrust difference then you may see some yaw coupling that can be felt by the pilot and “may” cause problems with autotune.

Should be super fine

Hey!

We’re trying to autotune a Skywalker x8 with bad results. We’ve tried it 3 or so times now with the plane aggressively rolls/pitches every time, and crashes.

We’ve read through and basically changed all the parameters listed in the thread, set the max lim angle to like 10 degrees, etc. On stick movements if i jam the sticks back and forth it handles it like a champ, but the moment i throw it in autotune it starts over as if nothing changed.

We took a different quadcopter today and tried changing the acceleration values, and that didn’t change anything on the autotune aggressiveness/speed at which it rolls/ptiches.

We’ve also taken a look at the logs and seen that QAutotune sets the rates as a step input in the first command, and not a smooth, or at least a sloped input. This is in line with what we’re seeing as a really aggressive first input.

We believe that the planes mass is too big for movements this fast, but other people have done it so it should be possible

Here’s an example autotune video:

Things we’ve changed:
Max roll/pitch angles
Autotune aggressiveness
tuned PIDs (looks pretty good on logs, just a tiny bit of overshoot to a couple degrees. Pretty snappy but handles it just fine)
stick limits
stick accelerations

Things we’ve also changed on quadcopter (copter firmware, not Qplane)
autopilot accelerations (atc_accel)

we’re kind of lost at this point, @Leonardthall, or anybody else if you have any pointers/direction from here we’d love to hear it.

1 Like

Can you provide the log for the video?

1 Like

Hi @Leonardthall here is the log, I am @ohitstarik partner. Thank you for the quick reply

Assuming you have followed the tuning guide properly I suspect you have set the acceleration parameters too high.
I would suggest something like:
Q_A_ACCEL_R_MAX 20000
Q_A_ACCEL_P_MAX 20000

But looking at your Q_M_XXXXX parameters, the equivalent to the MOT_ parameters in copter I can see that you have skipped some steps.

Have a read through this page:
https://ardupilot.org/copter/docs/tuning-process-instructions.html

2 Likes

I would suggest something like:
Q_A_ACCEL_R_MAX 20000
Q_A_ACCEL_P_MAX 20000

Yesterday we actually tried a flight with these values at 15000 and ended up with a similar result to the video above.

I think youre suggesting that we look at this more closely.

I would agree it seems that we skipped this step.Would the critical parameters here be MOT_PWM_MIN/MAX. We have been transitioning to Qautotune from Qstabilize mode, would the MOT_THST_HOVER values still have any role when never engaging in a hover mode? I can tell that our value is 2x the suggested value for this parameter, we have q_m_hover_learn=2 which would allow the controller to learn the correct value, but we have never engaged this mode as we thought this value would have no role in auto tuning.

1 Like

When in auto tune you are using hover so you should make sure QHover is flying well before using auto tune.

We set MOT_THST_HOVER low for safety reasons. Hover learn will increase it.

Just to be clear here. Autotune is not causing the problem you see here. Autotune does a twitch test that takes the aircraft to 20 degrees and no further. It then switches to QHover and recovers using your tune. The aircraft is loosing control in QHover. This means that your manual tune is not stable.

What manual tuning process have you done?

2 Likes