3.2.1 and APM2.6 not holding altitude

I'm using this on a cinetank quad and normally fly in stable mode with FPV. Never have a problem or reason to use RTL but thought I would give it a try today. What I found out is it doesn't hold it's altitude. So I switched to stable to gain control and then tried Alt Hold and had the same problem. It sinks and if you give it throttle it rises but then when you center the stick it sinks and requires more and more throttle to rise. Got to the point that it wouldn't rise even with full throttle so I switched to stable.

I use to use alt-hold and loiter modes a lot when i was learning how to FPV but now I just fly in stable. When I used it, it was very solid. The scary part is, once I realized this problem of it not holding the altitude, I tried a RTL and that failed also. It would just gradually descend. My throttle when hovering is exactly at 50% and I have the throttle mid point set to 500.


I thought my Throttle Midpoint was set wrong and it was. My hover is at 50% on my controller and it was set to 600 so I changed it to 500, took another flight and saw no change.


I'm sure this is something simple but I'm at a loss on what parameter to look at. Otherwise it has no other problems.

69-12-31_21-00-00_10.bin

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer

    I had a quick look at the logs and it seems the THR_RATE_P term has been set to zero some how.  I think the default is 5.

    By the way THR_MID is perhaps just a touch low (unrelated to this problem).  Looks like the vehicle hovers at about 450 so maybe increase it from 400 to 450.

    • Thanks Randy! That was the problem :-) I must have ticked that parameter inadvertantly.

  • MR60

    3702147596?profile=originalReading your last log, you do have a problem with Alt Hold as shown in the graph below that shows the desired altitude, the altitude : they should track each other closely which is not the case on your copter. This might be either a bad alt hold parameters tuning and/or vibrations issues (but i believe more in your alt hold PID that are not correctly tuned)

    You have to tune the following parameters, as said in the wiki:

    The Altitude Hold P is used to convert the altitude error (the difference between the desired altitude and the actual altitude) to a desired climb or descent rate.  A higher rate will make it more aggressively attempt to maintain it’s altitude but if set too high leads to a jerky throttle response.

    The Throttle Rate (which normally requires no tuning) converts the desired climb or descent rate into a desired acceleration up or down.

    The Throttle Accel PID gains convert the acceleration error (i.e the difference between the desired acceleration and the actual acceleration) into a motor output.  The 1:2 ratio of P to I (i.e. I is twice the size of P) should be maintained if you modify these parameters.  These values should never be increased but for very powerful copters you may get better response by reducing both by 50% (i.e P to 0.5, I to 1.0).

    In your case I see you have set a high value of 0,9 (more than default 0,75) THR_ACCEL_P. Since you have a rather powerful copter (you hover at less than 50%), you should not have increased it above the default value of 0,75, but on the contrary, you should reduce it a bit. Try 0.5 for P and 1.0 for I (I should always be double of P)

    • In the log I posted today it shows the same problem when comparing Alt with D-Alt. It seems like it's not even trying to maintain altitude. Not sure if it's entering some auto land command or what? I use to fly this in alt-hold all the time and test loiter as well and it was always solid. Can't figure out what is causing this.

      3702608783?profile=original

    • In case it helps, here is my full parameter file.

      cinetank dec 21 2015.param

      https://storage.ning.com/topology/rest/1.0/file/get/3702608872?profile=original
    • I have AHRS_GPS_GAIN set to 1.0

      Is that correct?

      "AHRS GPS gain - This controls how how much to use the GPS to correct the attitude. This should never be set to zero for a plane as it would result in the plane losing control in turns. For a plane please use the default value of 1.0."

    • OK made those changes and took another flight but the problem is still the same. This time I took it up to about 5 meters. Engaged Loiter and didn't touch the throttle. I was hovering at about 45% before engaging Loiter. What happened was it slowly descended like it entered a LAND command so I just let it go and it landed with motors at low speed. I dropped the throttle and the motors stopped. So it seems it's wanting to land when put in one of these modes. I'm not getting any bad GPS reporting as far as I can tell. Do you see what I'm describing in the logs? I can upload this data flash also but I think the problem would show the same

  • MR60

    Hello,

    looking at your log, i do not see any apparent issues (looked at the copter alt hold report). The auto analysis shows a "fail" on possible brownout, but looking at voltage data, everything looks ok.

    Do you loose altitude in alt hold when moving forward or does it loose altitude also when remaining on the spot ? The fact that you'd loose altitude when moving is a known issue with arducopter; it has to do with air pressure dynamics around the barometer.

    • Not sure what to look for in the logs. See anything that could indicate the problem? I graphed throttle and gps altitude.

      3702608699?profile=original

    • Here is a flight I just did. Tested Loiter and alt-hold and they both did the same thing in regards to holding altitude. What would happen is I would get it to manual hover. With a fresh battery that seemed about 40% throttle. Then switched to Loiter and you could hear the motors slow down a bit and it would slowly lose altitude. I would give it throttle and it would climb but then want to descend again. If I kept this up by giving it full throttle I would eventually have to switch back to stable and bring the throttle down quickly as it would shoot up at full throttle. It's almost like it's entering a landing mode but I don't know why that would be. I have good GPS signals where I'm at. Here are the logs.

      2015-12-21 12-18-54.tlog

      69-12-31_21-00-00_11.bin

This reply was deleted.

Activity