Possible hardware failure, or too aggressive autotune?

Hello,

Specs:
-QAV 250 frame
-5x3 props
-simonk 12a esc
-tmotor 2300kv motors
-APM 2.6 with external mag + gps runnig Arducopter 3.2rc2
-3DR power module

I’ve been toying around with a mini copter (250 size). I used autotune and it flies very locked in but randomly it seems to twitch… almost as if a motor is going out. Here’s a video:
[youtube]Minnewaska QAV250 - YouTube

I’ve checked the logs but i’m not seeing something to indicate a hardware failure… would be really helpful to have a second pair of eyes on this. just want to be sure i don’t have a looming hardware failure waiting to happen.

logs and params attached - many thanks in advanced for any input.

  • Autotune can take a really long time to complete the first time, and this means the battery runs down quite a bit before pitch is tuned. This can lead to unstable pitch gains.
  • Autotune hit the minimum D gain on the roll axis. I will talk to the autotune dev about decreasing this a little bit. Autotune’s minimum increment on D is 0.0005, which seems a little big for such small D values.
  • You had steady-state pitch error for quite a while on one of your flights. I would increase your RATE_PIT_IMAX and RATE_RLL_IMAX to something like 3000 (from 500) and also check your copter’s center of gravity.
  • STB_PIT_P and STB_RLL_P seem quite small. Given the agility of such a small quadcopter, I think at least the roll one should’ve hit its upper limit. Did you back these off manually? Otherwise, they could be small because the rate tune is bad.

I don’t see anything that looks like a hardware failure. Generally you’d get a really big, really sudden disturbance on all axes simultaneously with a hardware failure. I’d say the copter is not well-tuned.

If you want, I’ll send you a binary with appropriate limits set on autotune for you to try.

Ok, well it sounds like the Leonard (the autotune dev) is actively working on making autotune work properly with small copters (and in fact, has a QAV250 on order). Autotune could be coming up with a D value that is too small.

It may be best to try to manually tune it. There are a number of manual tuning guides available.

[quote=“jschall”]- Autotune can take a really long time to complete the first time, and this means the battery runs down quite a bit before pitch is tuned. This can lead to unstable pitch gains.

  • Autotune hit the minimum D gain on the roll axis. I will talk to the autotune dev about decreasing this a little bit. Autotune’s minimum increment on D is 0.0005, which seems a little big for such small D values.
  • You had steady-state pitch error for quite a while on one of your flights. I would increase your RATE_PIT_IMAX and RATE_RLL_IMAX to something like 3000 (from 500) and also check your copter’s center of gravity.
  • STB_PIT_P and STB_RLL_P seem quite small. Given the agility of such a small quadcopter, I think at least the roll one should’ve hit its upper limit. Did you back these off manually? Otherwise, they could be small because the rate tune is bad.

I don’t see anything that looks like a hardware failure. Generally you’d get a really big, really sudden disturbance on all axes simultaneously with a hardware failure. I’d say the copter is not well-tuned.[/quote]

Thank you so much for your time.

I had a chance to re-run autotune on a nice calm day, attached are the results/params. It definitely finished a bit faster, and battery levels were OK by the end. Log of a flight with the new params are also attached.

Yes i’d love to try your binary with the appropriate limits - i’ll run autotune again.

You are correct I did back off the P a bit from the first autotune; with my Y6 autotune I always had to lower the STB_PIT_P and STB_RLL_P to get a smooth(er) flight. I’ve left it alone on this second autotune.

I tried to change the IMAX for ROLL/PITCH to 3000 but the most it’s allowing me to do is 1800. I will fly with these values and report back. Any D values you think I should start with?

Anything I can provide to you and/or leonard on these 250 size frames? they are so much fun and seem to be all the rage now. I was told the “APM will never fly in that” - had to prove them wrong :smiley:.

Where on earth did you hear that?

As far as manually tuning goes, it is not incredibly dangerous to just crank up the D gain until it goes unstable. It will just oscillate very rapidly and won’t cause a flip. Fly over soft grass and set your THR_MID first. Increase RATE_RLL_D in 20% increments until it oscillates, then back it off. Give the copter a sudden roll change and listen for ringing (a decaying oscillation). Back it off until there is none. Do the same for pitch.

After D is tuned, P can be tuned in the same manner, but I suggest being much more careful and conservative (increase in smaller steps, back it off slightly more). I should be set to the same value as P. P is dependent on D and backing off on D can cause P to go unstable.

Afterward, set I to the same value as P.

[quote=“jschall”][quote]APM will never fly in that
Where on earth did you hear that?[/quote][/quote]

Mostly naze32/dji users - I think it was less about ardupilot/APM’s ability, but the size & weight of the APM/power module/GPS etc. Either way ardupilot is all i fly, so I will make it fit :laughing: . With it all, I have a 50%-60% hover, so I’d consider that successful.

I will try the manual tune as you suggested and report back. Are the values in my second tune out of whack completely?

No way to tell without having the same setup.

Hello,

same hardware specs but now running 3.2rc3 (vs rc2)

I had a chance to perform a manual tune as per your instructions. Attached are my logs from a flight after the manual tune, plus a video of that flight; audio was left in the video so you should be able to hear any oscillations if they occur… I couldn’t hear any, but perhaps you can. I give a good amount of throttle starting at 2:22 in the video, this may be the only time I could hear possibly some oscilation.

the (annoying) motor sound was left on in this video to hear oscillations, may want to check your volume before watching
[youtube]https://www.youtube.com/watch?v=u57ufFUdtMQ[/youtube]

Manual tune vs autotune (other than imax) did not produce a major difference in PID values, but I have to say the flight seems less wobbly and quite stable. You mentioned in a previous post my “pitch was in error the entire flight”. how did you find this out? what is the best way to graph this?

Another interesting thing is, the transition between no stick input, and giving a little input, seems to produce a “jerky” movement . So if I hover in stabilize, then give a tiny bit of forward stick input, the copter feels like it’s snapping (almost like unlocking) from the level position to the desired attitude… not smooth. Is this controlled by the stabilize roll & stabilize pitch parameters (currently set to 6)?

Would love to hear your input. Hopefully this can help others with this size multirotor…

thank you!
Raph

On your last vid, are you flying Loiter/AltHold or just stabilied?

My Altitude holding is bad on a 250.

Also like the colors on your mobius, what is your setup? :wink:

I mostly stick to althold & hybrid (i guess ‘poshold’ now). I modified the max rise/descent speeds so it’s a bit more responsive - l’ll check the settings on the mobius and post again, but i’m pretty sure it’s mostly default (just bumped up the bitrates).

If you’d like to graph pitch error, you need to graph ATT.Pitch vs ATT.DesPitch.

Your gains are a fair bit different. You almost doubled your D term on roll.

The jerk should be mitigated in 3.2 by the angular acceleration limiting (RC_FEEL parameter). We could go one more level and constrain angular jerk (rate of change of angular acceleration) but the math starts getting complicated.

Hard to tell how good it is from a video.