Uncommanded Altitude Change (Quadcopter, Position Hold)

This is my first experience with the PX4 code so I would be very grateful for some advice with a problem I have seen.

I have just built a 250 quadcopter with a Pixhawk Pro from Drotek and PX4 V1.7.3 code. After a little tuning in stabilized mode I tried flights in altitude hold and position hold successfully before moving on to a trial mission - a takeoff, triangular course at 20 metres Altitude and land. The first time it ran successfully, the second time on the first leg out the quad reached the set altitude then started to rise. I aborted the mission by switching back to stabilized mode and landied.

The today I went out to get some clear understanding of what was happening and managed to reproduce a rapid rise in position hold mode several times by rocking either from side to side (rolling) or forward and back (pitching). At around the point where the braking manoeuvre comes in at the end of the move the quad would sometimes rise rapidly. I did not see what it’s long term behaviour would be as in each case I returned to stabilized mode and landed.

I have uploaded two flight logs which demonstrate this:

The sudden switch to maximum thrust and vertical speed change is obvious. I can see some oscillation in roll but I think this is caused by the max thrust not the other way around. There is a glitch in the Altitude estimate but again this looks as though it occurs after whatever triggers the rise.

Generally the accelerometers look quite noisy and on the plus size the gyro signals look quite clean. I have no experience here to know how good/bad these signals are or whether they could cause the effect seen.

Any pointer either as to the cause or suggestions for further tests would be most welcome.

It’s possible you need better vibration isolation for your IMU. I observed similar behavior with a PixRacer hard mounted in a 450 sized quad.

Thanks for the reply.

Vibration was my first thought too. The Pixhawk Pro has an IMU which is isolated within the case, it’s quite new so maybe it has some weaknesses. Other quads I’ve built (running cleanflight/betaflight/inav) vibration has shown up in the gyros and caused unexpected attitude changes usually in yaw. If vibration was the problem I’d was expected to see something in stabilized mode behaviour too but that seems unaffected.

I’m very curious as to what is driving the full throttle ascent - apart from the throttle value nothing that preceded it in the log has jumped out at me as unusual.

It was altitude control problems that I observed (uncommanded rapid climbs), but gyros were unaffected by the vibration.