ALT HOLD - Quad feels like flying on the end of a spring

Hi,

Flight log: 7-inch quad alt-hold soft

I’m looking for a more aggressive altitude control for my 7" quad. I have tuned the alt-hold mode following the documentation, but the result is too soft. Ardupilot - Alt hold mode

I am looking for a snappy throttle/altitude response, but i’m unsure which parameters are limiting me.

Any ideas?

Thanks!

Start with these, I think you’ve got a Li-Ion battery and these should be the correct values.
ARMING_CHECK ← select every check box except “All” and GPS

ATC_THR_MIX_MAN,0.5
BATT_ARM_VOLT,12.70
BATT_CRT_VOLT,12.00
BATT_LOW_VOLT,12.40
BATT_FS_CRT_ACT,1
INS_HNTCH_FM_RAT,0.7
INS_HNTCH_REF,0.21

and let’s see if that makes any difference.

Hi Shawn,

Flight log: Flight log
I completed a short flight with your values, except the battery parameters (i’ll be flying on a different battery soon)…

The values you gave me should help with the general attitude control etc. of the quad, but does not change the tune of the altitude control ( i assume?)

What i’m looking for is something that looks like the example of the A3 flight controller, seen here:

The throttle response from the video is much more snappy, and in real life operations where precise placement of the drone is needed, this type of response works very well. :slight_smile:

That’s not a .bin log
I only specified a few voltage related parameters and a couple to adjust the harmonic notch filter.
I believe you should set all I specified even if you are going to change the battery soon - it’s easy enough to calculate and change values for a new battery at that point in time.

I anonymized the flight log through mission planner - you can open the flight log even though it isnt marked correctly :slight_smile: I just checked.

The link is to a 1k jpeg

Sorry - i updated the link now :slight_smile:

Why MOT_SPIN_MAX,0.55 ?
Set

MOT_SPIN_MAX,0.95
MOT_THST_EXPO,0.6

even though it’s a bit over-powered (I assume) and you should be able to control it in Stabilise mode if all else fails.

ARMING_CHECK,1
BATT_FS_CRT_ACT,1
INS_HNTCH_REF,0.18
INS_HNTCH_OPTS,0
INS_LOG_BAT_MASK,1

Set the voltage-related parameters correctly for the battery fitted, then run Autotune with
AUTOTUNE_AXES,3
for pitch and roll
and
AUTOTUNE_AXES,4
for Yaw - dont use the Yaw D Autotune yet.

You can use the MissionPlanner Initial Parameter section to set the correct voltages - you dont need to accept unrelated parameters that you already have correct, and keep in mind the Initial Parameters calculator does NOT read your existing settings.

The GPS altitude never matches the baro altitude which may be affecting the altitude performance. You may want to set the Fence to ensure GPS has a good 3D fix and Home can be set before you can arm in any mode.
FENCE_ENABLE,1
and check the fence altitude and radius. This could take some time as you had a poor HDOP and low number of satellites.
You might want to try
GPS_GNSS_MODE,5 or 65
to see which gives a lower HDOP in your area.

After that’s all done we can see what else is holding back the “snappiness”

The MOT_SPIN_MAX is 0.55 to limit the maximum current draw from the battery. Since the battery is Li-ion, the battery can’t discharge the amount of current needed over 0.55. I calculated the MOT_THST_EXPO using test data.

The quad feels super “locked in” in the attitude control, however my only trouble is the altitude control in alt-hold modes.

I will do as you say, and upload a flight log later today. :slight_smile:

I recommend setting the following parameter instead of limiting motor throttle to 55%.

image

1 Like

I agree with Manav
The best way is to limit the motor current and use the standard values for the other params
BUT you need the current measurement working properly first.

MOT_SPIN_MAX,0.95
MOT_THST_EXPO,0.6

and the hover thrust will need time to relearn after these changes, then re-assess

PSC_ACCZ_I
PSC_ACCZ_P

Those parameters won’t change the behavior you have. Start tuning these:
PSC_JERK_Z,15 (start here or the next 2 won’t do much)
PSC_POSZ_P,1.5
PSC_VELZ_P,7

These are from a 4" on 4S that could still use some work but it’s fairly Z-axis responsive in AltHold/Loiter. Definitely not your Grandpa’s Quad flying in the chuch parking lot on Sunday :slight_smile: Which is what defaults will give you.
Graph these parameters and tune until they are where you like them:

You may have to increase these a bit from the standard MOT_THST_HOVER and 2X that but try w/o changing it 1st.
PSC_ACCZ_I
PSC_ACCZ_P

1 Like

Thanks for the input and experience Dave - I dont have a small quad to test with.

I’ll add these PSC params into my general multirotor tuning spreadsheet from the logs I’ve been gathering.

1 Like

I have found it to be trial and error as they all interact and the Pilot speed and Pilot Z accel parameters play a role too although not really with tuning. 2 parameters I noted above are available for in-flight tuning which can speed things along but I still end up doing a lot of flights and adjustments.

I think some want Loiter to perform like a safe Stabilize. That’s not going to happen but you can definitely make it very responsive.

Thanks Dave! - This is exactly the altitude/throttle response i was looking for.

I’m sure many of the other parameters on the copter have room for improvement, but i’m happy to have discovered the three parameters you mentioned:

PSC_JERK_Z,15
PSC_POSZ_P,1.5
PSC_VELZ_P,7

Thanks also @xfacta & @manavgandhi17 for your inputs. I have been making many changes on this copter and your points will be added to my setup-recipe. Unfortunantly this copter does not have a current sensor, so i decided to limit the mot_spin_max instead. I guess this is the price i pay for using a battery with low discharge rate and no current sensor :smiley: