Quad Flyaway - need analysis

This AM, I was testing a big (16" props) quad and although it was "twitchy’ in STABILIZE mode, I thought I had parameters set close (I didn’t use AutoTune). I switched to LOITER and took off again. It seemed to do OK, when it started a fast diagonal climb. I pulled the throttle to MIN and it still climbed. I switched to STABILIZE, and it immediately started falling. I ran the throttle to full, but it was too late. It crashed. I looked at the DataFlash log and the biggest error that I see is
Test: NaNs = FAIL - Found NaN in CTUN.TAlt Found NaN in CTUN.DSAlt
Here is a link to the log. I would really appreciate someone telling me what went wrong.

you have high levels of vibrations and clipping… that’s probably the first thing I’d try to fix.
your compass also looks like its picking up interference.

I think you you are a mile off the parameters being close and the Tune looks terrible as a result. The biggest problem is with the Rate Roll/Pitch P&I. You have I at a fraction of P. This won’t work.
Example:
ATC_RAT_PIT_P,0.105
ATC_RAT_PIT_I,0.01502
These values need to be equal in most cases. In some cases a slight reduction in I from P.

Your Rate Filters are too low for a 16" propped craft.
Your ATC_ACCEL_P/R_Max values are too high for a 16" propped craft.

This came from the Auto Analysis function in MP? Don’t bother with that.

Here are your Pitch and Roll tune results. I’ll assume you realize they should mostly overlay even with a mediocre tune.

@jeff567 points out your Vibes are high. Sky high on that 1st Stabilize section. Hard to say if it’s a basic vibration problem or it’s just tuned so badly that it’s all over the place (a ~20° uncommanded Roll)

There is something off about your voltage and current logging also.

Thanks for the help. I started with stock values, but it wouldn’t fly at all, so I started with “I” near zero and reduced the P values until it quit shaking. I tried to get it good enough for an autotune, but it crashed before I could attempt that.

Does someone have some values they think will work well enough to put it in the air?

if you open mission planner and hit Alt+A, it will open a parameter calculator where you give it some info and it creates some parameters that should be a good starting point.

Reset to default, then re-do the mandatory calibrations, and start with the parameters from the Plug-in as @jeff567 outlined. From there, follow the now normal process for tuning:
Configure to log parameters for the Notch Filter:
Make a Hover Flight in AltHold for ~1 minute.
Review log and set Notch filter parameters.
Make another AltHold hover flight.
Review that log and confirm the filter is working.
Perform Auto Tune.

All these steps are in the Wiki.

All this is predicated on the fact the Vibration levels are within guidelines.

Note: Update Mission Planner to latest Beta before running the Plug-in and read the message when you start it.

It’s possible you did not have the right amount of sat when engaging GPS this will make a fly away always, for me the lack of sats the Bird goes to the right but does not climb. Switching to Stabilize should ALWAYS correct this. What i do not like is the sticks once back to Stab did not allow you to adjust to save the craft. I would think we need to look into this as a possible bug.

Size (kb) 3060.1728515625
No of lines 36666
Duration 0:01:45
Vehicletype ArduCopter
Firmware Version V4.0.5
Firmware Hash 3f6b43e3
Hardware Type
Free Mem 0
Skipped Lines 0
Test: Autotune = UNKNOWN - No ATUN log data
Test: Brownout = GOOD -
Test: Compass = WARN - Moderate change in mag_field (30.08%)
Max mag field length (594.20) > recommended (550.00)

Test: Dupe Log Data = GOOD -
Test: Empty = GOOD -
Test: Event/Failsafe = GOOD -
Test: GPS = FAIL - Min satellites: 4, Max HDop: 9.23
Test: IMU Mismatch = GOOD - (Mismatch: 0.70, WARN: 0.75, FAIL: 1.50)
Test: Motor Balance = WARN - Motor channel averages = [1412, 1394, 1298, 1313]
Average motor output = 1354
Difference between min and max motor averages = 114
Test: NaNs = FAIL - Found NaN in CTUN.TAlt
Found NaN in CTUN.DSAlt

Test: OpticalFlow = FAIL - FAIL: no optical flow data

Test: Parameters = FAIL - ‘MAG_ENABLE’ not found
Test: PM = GOOD -
Test: Pitch/Roll = GOOD -
Test: Thrust = GOOD -
Test: VCC = UNKNOWN - No CURR log data

This is what caused the crash. The proper thing to do was leave throttle alone and switch back to Stabilize.

As a personal rule I NEVER take off in any mode other than Stabilize.

2 Likes

I always takeoff in loiter personally, because that’s the only way I know that gps works and its locked in case that I need RTL, if you takeoff in stabilize, the copter will be almost in manual, and if barometer, gps or compass is not working properly it will crash during rtl or land.

But that’s only my decision, I don’t want to tell anybody to do the same, just saying how I think it’s good for me.

1 Like

But the cause of your crash is vibrations probably, that happens when vibrations are too high. Make sure your frame is not wobbling and the motors and propellers are balanced.

If you were using a radio that ran OpenTx you could run Yaapu Telemetry and the radio will display and audibly announe the GPS status. The main LED and the buzzer will do the same timgs…

Also, when the FC is in Loiter it is also in Altitude Hold. In this configuration there is a “dead band” around throttle. This causes some lag which will cause over and under control. This is NOT GOOD IN AN EMERGENCY.

When I am taking off or landing I want complete and accurate control, and you don’t get that in Loiter and/or AltHold.

1 Like

Your allowed to move the stick and not crash I would think he would have the time to make an adjustment. I agree having the stick in the middle is best but this could be or could not be the reason. I also always use Stabilize before engaging into GPS flight mode.

I don’t see full throttle before it crashed. Full throttle for the 2nd take-off then mid throttle until you dropped it. Is this the right log for the event you are describing?

1 Like

This aircraft could not have gone into ANY GPS assisted flight mode. The HDOP was 9.23, and the GPS receiver had only 4 satellites.

Agreed this wound invoke a flyaway all day long why i posted the same info. My point is Stabilize will 99% of the time make a recovery if the pilot had experience regardless where the stick was. He states he adjusted the throttle in flight.

Well that not 100 % true. it will engage GPS into a flyaway back to the mothership. Switching to Stabilize and hitting the stick would be the normal thing to do regardless. Very simple to test. I’m more worried why this did not help and is there a glitch.

I have the minimum number of satellites set to 6, and HDOP maximum to 1.5 (I think). I normally take off in STABILIZE mode, but this one time I did not. The propellers were balanced with a magnetic balancer, and the FC is mounted on very flexible rubber balls. It was in LOITER mode, so when it started climbing, I put the throttle at minimum, but that didn’t stop the climb, so I switched to STABILIZE and raised the throttle. But since it was off the ground by 15’ at most, it didn’t have any chance to recover.

How about taking a look at the graph posted above? You armed and took-off in Stabilize mode. At this time you had 4 satellites. ~20s into the flight you achieve GPS lock (origin set message). Now this is the home point. You can look at the kmz file and see it’s not where you took off.

Summary:
You have an extremely bad tune on this craft.
You took off before IMU Origin was set.
During the Stabilize section of this flight it experienced a crazy high Z-vibe and cranked up ~1000 accel clip events.
The 2nd take off in Loiter you raised the throttle to max to climb, then it’s at mid throttle until you dropped it.

This is what the log you posted presents. If there is another log that fit’s your description then post it.

What I said is most definitely 100% fact.

If the GPS does not have a lock on the minimum # of sats and/or of the HDOP ( Horizontal Dillution of Precision) is too high, the FC WILL NOT go into any GPS assisted flight mode.

And, as an FYI, if you switch to a GPS assisted flight mode and the aircraft takes off into the wild blue yonder, 99.9999999999999999999999% of the time the COMPASS is the culprit.

Here’s another clue for you: Gravity Sucks. The aircraft was at ~15’ AGL. The throttle was at minimum. Motors were no doubt stopped. The aircraft began to accelerate at 32 feet/sec/sec. The pilot alleged he went to full throttle. The aircraft crashed. You can beat physics…

Set these:
FENCE_ALT_MAX 50 Adjust for safety or local laws
FENCE_ENABLE 1
FENCE_RADIUS 100 Adjust for safety or local laws
FENCE_TYPE 3
and then you can not arm until there’s a GPS 3D fix and Home can be set - regardless of flight mode.