In loiter quad suddeny climbs then flies away

The log files are attached. I would appreciate any help in determining what caused this.

Doesn’t look like the file attachment took, so here is the link to the log:
digital-mapping.net/forums/3 … 015-16.log

Two thing I notice starting at line 3275. You can see the CRate (CTUN), the Climbrate drop suddenly (negative values). The copter tries to correct this immediately by giving full throttle. The copter goes skyhigh because the copter was not really dropping.
Also the GPS relative height drops to below zero.

I don’t have an explainationfor this behaviour. It could be an APM mounting problem or heavy vibration.
Perhaps activating the IMU logs and check the acceleration sensors can shine a light on this.

Greetings from Holland,
Geert

Hi Geert,
Thanks for checking the log. Do you think it could be a faulty GPS? I have suspected it of having issues on other occasions.

When I switched from loiter to stabilize the quad shot to the ground. It took some pretty serious damage, so it will be a little while before I can test again.

Greetings from Missouri,
Bill

I can answer part of your question, I think. The part I can’t answer is why your quad started climbing. For most of your flight the barometric altitude matched the GPS altitude perfectly. Then, for no obvious reason the quad thought your GPS altitude started dropping. The divergence from the baro altitude is just amazing. So it started adding power to the motors (throttle out). The baro altitude shows the result was that quad started to climb, but the GPS altitude showed it dropping. What’s strange is this doesn’t match with any substantial GPS glitching as your HDOP and number of satellites were OK at that time. Possibly GPS interference I suppose.

Now as to why it fell out of the sky, that’s obvious in the attached plot. Your throttle in is in blue and what the APM actually sent to the motors is in pink. When you were in loiter mode and the quad was climbing you lowered the throttle all the way to zero in an attempt to get it to stop climbing. And you know the throttle works differently in Alt Hold and Loiter modes. I like to think of it as merely a desired climb rate. But when you switched back to Stabilize your throttle in was at zero which shut off your motors. Just after this happened large pitch and roll attitudes were recorded. AKA, the falling leaf effect.

When switching out of Alt Hold or Loiter modes you almost always want to return your throttle to mid position just before making the changeover. We all make that mistake at least once, with varying consequences. After that, it’s burned into our brains. You were probably more unfortunate than most, but I doubt you’ll make that same mistake again.

Thanks for the breakdown OtherHand. I did freak when the quad sped away. Judging by your and Geert’s analysis, along with past incidents, I think I have a defective GPS. I have ordered replacement parts including the GPS. I will post the results when I have the bird patched back up.

Is this OtherHand from FPVLabs?

That’s a pretty reasonable analysis, but there is one important thing:

The value “RelAlt” is actually not the GPS altitude at all. This is the output from the Baro-Inertial fusion algorithm. So what happened here is probably a standard vibration-induced flyaway. The vibration aliases onto accelerometer signal and drives down the estimated altitude, then the throttle controller responds by increasing throttle.

The solution is to do a better job reducing vibration on the board.

There is a data line in the GPS logging, I think it’s “GPS Alt” or something. This is the actual GPS reported altitude, but the program does not use this in any way, it’s purely for information in the logs.

Thanks for the information Rob. Can the vibration be checked from the log? When I patch things up I’ll put better padding under the APM.

This is what the APM was attached with when the problem occured:

Yes, you should enable IMU logging, and then do a quick test flight in Stabilize mode. Then turn off IMU logging. Don’t leave it running on APM for no reason as it uses a lot of resources.

Then we can analyse the vibration data and see where we’re at.

The exact type of anti-vibration materials required depends on how bad the machine shakes to start with.

Thanks Rob. When I get it put back together I’ll do the test flight with IMU logging enabled and upload the log file. It looks like some of the parts won’t get here until after Christmas, so it will be a little while. I appreciate your help at getting to the bottom of this.

Bill, when you are up and running again, perhaps my experience about fighting then vibrations, can be of interest to you.
See http://diydrones.ning.com/forum/topics/how-i-overcame-the-apm-vibration-huge-stability-improvement?xg_source=activity

Search the APM website for Log analysis and you find some more interesting articles.
As Rob stated, there is not real suspect of a bad GPS because the reported GPS height is okay.
GPS glitches often cause a sudden change in GPS height is my experience and this did not happen.
Geert

Hi Geert. Interesting test.
When I put my rig back together I’ll to try using this (cut to size of course):


It also comes in 1/2" thickness.

I’d just like to add that the GPS is not used in the altitude estimate. It’s just the baro and accelerometer that are blended together.

Some people have mentioned it already but the climbing away while in loiter or alt hold is nearly always a vibration problem so I’d focus on that. There’s also a wiki page here about how to measure the vibration.

Thanks for the link rmackay9. I’ll definitely focus on getting the vibration down. Wish I had all the parts so I could piece my quad back together and start testing and tweaking.

[quote=“Rob_Lefebvre”]Is this OtherHand from FPVLabs?

That’s a pretty reasonable analysis, but there is one important thing:

The value “RelAlt” is actually not the GPS altitude at all. This is the output from the Baro-Inertial fusion algorithm. So what happened here is probably a standard vibration-induced flyaway. The vibration aliases onto accelerometer signal and drives down the estimated altitude, then the throttle controller responds by increasing throttle.

[/quote]
Yep, tis I Rob. And thanks for pointing this out. I was totally confused about RelAlt not being GPS connected. It was, as they say, a teachable moment for me. I have too many of those. But knowing this, you are obviously correct that it’s clearly a vibration related and Bisenberger gets to save the expense of buying a new GPS!

Hmm… If I don’t need the GPS I might have enough spare parts to piece this thing together and try reducing the vibration. Hopefully I can do that this weekend and weather will be decent enough to fly.

What is the frame like?

I have a F450 that required pretty significant vibration mitigation setup to get the vibes down. These frames really are pretty horrible for vibration.

It’s a Hobbyking SK450. The arms are way softer than a DJI F450. I’m putting this together as a testing machine.

I’ve got it put back together and everything has been calibrated. The last thing I did was hook up the GPS. I was getting the message bad GPS pos, not unusual sinse I am inside. After a short time I got a message something to the affect of bad magnetic field. I looked at the compass at the top of the HUD and it was spinning pretty wildly. It stopped after a few seconds. What could cause this?

OK, was able to get it put back together. It was raining so I had to fly inside (a large shed). I have attached the log file with IMU enabled. This time the APM was mounted on quarter inch DU-BRO Foam Rubber.

In case the file upload doesn’t work, here is the link:
http://www.digital-mapping.net/forums/3DRobitics/IMU_log.zip

Get your vibration sorted out to within the tolerances as in the Arducopter wiki. Get your vibes within the “acceptable” range before you use any of the auto modes.

I learned the hard way when 2.9 came out with the accelerometers used for inertial stability. The result was a total loss fly away in the dark of night (another story). When I re-built I balanced the props and their hubs, the vibration dropped to better than the chart on the wiki and not had a problem since!

My advice to all is get those vibes sorted before anything else.