Copter suddenly increased altitude while in autotune

Please help me find out cause of the sudden altitude increase while tuning.

The roll tuning went fine but during the pitch tuning the copter suddenly went up. Luckily i was able to switch to stabilize mode and put the copter back down.

copter was in altitude hold while doing the autotune.
Flight controller: px4FMU + IO with arducopter 3.2.1
external GPS + compass (quanum GPS from hobbyking)
radio: taranis + frsky x4r
telemetry radio: 3dr radio
frame: rd290 hexa
esc: afro 12 amp opto esc
motor: tmotor 1806-14
props: hqprop 5045

I have attached the logs.

In the logs at the part when the copter suddenly went up, the BarAlt seems to suddenly went up while Dalt and alt both went down. could this be the problem? what could have caused it?

Classic Z axis vibration issue. From the graph you can see the positive spikes that need to be fixed. It may have been pitching into the wind when this happened.

[attachment=0]FlyAway.png[/attachment]

Need to check the mounting of your Flight Controller.

Mike

I looked at that log and thought Z vibrations too, but when I added throttle output the Z vibrations don’t increase until the UAV goes to full throttle.

Makes me think that as ALT went down inversely to Baro Alt going up, the apm cranked up the throttle as it thought it was falling which in turn caused the vibrations.

i attached a picture of how the FC was mounted. vibration in X and Y seems to be good the entire flight. vibration in Z became erratic only on some parts of the flight.

I tried graphing Throut in relation to baralt, alt and dalt. Im not sure if the values of those are logged at the same time but if it is then maybe something went wrong with throut value as it suddenly went in to maximum. in effect the baralt (barrometer reading? ) also went up as the copter started flying away. the FC noticed it then tried to lower it down shown in values of Dalt (desired altitude?) but was not able to control throut. the throut values only lowered when i switched back to stabilize.

thrin values remains the same until i changed to stabilize and tried to bring it down.

I attached another log from previous flight where the copter also tried to fly away. I was surprised that time and panicked and started switching mode from stabilize to loiter until the copter went down.

Hard to tell what’s what in the picture but the Z axis vibration are bad. When the copter goes up the Z axis should go down. G force is in the opposite direction.

So the copter thinks its falling so it increase the throttle to compensate.

I did a test with the flight controller mounted right on the base plate. normal flying around went well.
As soon as I would fly into the wind the copter would takeoff flying 20 to 30 meters into the air before I regained control. Very scary.
I then added some foam tape to the bottom of the flight controller and did the same test and now the copter loses altitude as it flies into the wind. Large Z axis spikes are gone.

Mike

thanks Mike Ill mount the Flight controller with a foam.

“When the copter goes up the Z axis should go down. G force is in the opposite direction.” - reminds me that the flight controller is mounted upside down, i set the AHRS_Orientation to 8 for this. but in the logs it seems to show that the copter is going down since Z axis spikes are going up.

I used single sided foam tape that can be purchased at the hardware store. You only need two strips, one on the front and one on the back. You can use Hot Glue to secure it to the base.

I would not place the entire unit on foam.

There are several discussion about what type of foam to use and what works best.

Mike