Althold - copter shoots to the skies

I set up a small 160mm 4" prop quad with Pixracer,
It is a very light build around 200g with battery, probably very over powered for hovering :wink:

It flies ok after PID tuning but when I switch to althold it just shoots up with what seems like full throttle.
I saw the learned hover mot_hover was at about 0.34, i tried changing it to 0.13 and it didnā€™t help, it hovers for me at about 40% throttle.I also have problems with the compass, I disabled it (i saw there is a bug that you should not disable but just donā€™t use the compasses)
I had a second pixracer and its the same on it, i tried version 3.3.3 which was my base in the past but it still shoots up.
I looked at the logs, the baro altitude looks ok, when i switch to althold it shows the altitude raisingā€¦

Please help.

Here is the log file:
https://drive.google.com/file/d/0B7AG0gbAXCeGbElPTmxNdlRiaEk/view?usp=sharing

Wow this looks strange

Iā€™m actually remember someone had reported the same problem here some time ago

No, I was wrong, it was another problem (EKF3 - Uncommanded periodic high throttle out in PosHold - #21 by Thorsten)

Your vibration levels and IMU clipping is high.

1 Like

I looked at the log, and DAlt is going NEGATIVE when BAlt goes Positive, so Iā€™m thinking you have the board orientation rolled 180 degrees, but you have AHRS_Orientation set to 0ā€¦

AHRS_ORIENTATION: Board Orientation
Note: This parameter is for advanced users
Overall board orientation relative to the standard orientation for the board type. This rotates the IMU and compass readings to allow the board to be oriented in your vehicle at any 90 or 45 degree angle. This option takes affect on next boot. After changing you will need to re-level your vehicle.

http://ardupilot.org/copter/docs/parameters.html

I understand what you say but it is weird,
The pixracer (from banggood) has a an arrow pointing the orientation, with the SD down and the wifi connector up, I used that arrow to orientate it, and even if the arrow is wrong, how would my board be able to hover stabilized with roll at 180? and why does it affect althold?

I will try it as it makes more sense than the behavior being the result of the vibration noise, I didnā€™t know it uses accellorometer data for althold, i wanted to deal with vibrations when i added GPS.

BTW: could bad orientation also explain the problems i have with the compass? for now i just disabled it.

I donā€™t have access to a pc at the moment, so canā€™t look at your log, but if you graph your Z axis vibrations it might give a clue. Could be aliasing.

What Iā€™m getting at is your board behaves as thought it is mounted upside down. Think about itā€¦ You switch to Altitude Hold, DAlt (Desired Altitude) is below BAlt (Barometer altitude), and the flight controller ā€œthinksā€ the aircraft is too low so it tells the motors to spin faster and aircraft goes up. At this Point DAlt become more negative, so the keeps climbingā€¦

If you can, post some pictures of how you have the flight controller mounted. Maybe then we can figure out what is going onā€¦

Seriously, this behaviour is typical of z-axis vibration causing sample aliasing. You need to reduce vibrations and/or soft mount the flight controller.

I can concur with @james_pattison.
Have a couple of 250 quads with Pixracers.
Was test flying in Stab and all was good.
Switched to Alt Hold and everything was sort of OK, although it was not ā€˜locked inā€™

But when I punched the throttle and elevator for speed the quad shot skyward like a bullet.

Since suspending the flight controller all has been well and smooth.

Also, raise your filter values (advanced tuning page) to 40 (perhaps even higher).

Hi, Thanks for all the help.
I tried changing AHRS_ORIENTATION to ROLL180 and then recalibrating.
In mission planner flight data I see the craft as rolled 180 so it doesnā€™t seem like the problem.
These are the vibe graphs:
https://drive.google.com/file/d/0B7AG0gbAXCeGdjB1RGNWOHF1SEk/view?usp=sharing

Although they are not very good they are not very bad, can they explain the issue? what does it mean (and how does it look) that the graph is aliasing?
The copter immediately shoots up, without adding more throttle, seems like a better explanation (than vibration) would be the up/down mix upā€¦

Wouldnā€™t raising the filter low pass filter increase the vibration problem? which value (bigger than 40) should i put?

That is a very odd looking log.

The estimated climb rate is not only negative but actually accelerating downards. By the end of the log the EKF is estimating that the vehicle is falling at 150m/s which is very fast!

Maybe try re-doing the accel calibration and, as others have suggested, improve the vibration dampening.

I reconfigured everythin from scratch, put the board on better vibration dampening, put different props and now the althold is much better, there is still drift in height but it doesnā€™t shoot straight up :slight_smile:

I raised the gyro filter to 40, should i raise it more? what is a safe value? should i also raise the accel filter? which value?

I want to connect indoor fake gps from here:

Will it work without the onboard compass or should I install an external compass?
I have a pixracer from banggood (ordered 1 now from mrobotics), how do i check why the GPS fail to calibrate? could it be it is in different oriantation from the board? how do i check what is the compass actual orientation?