How does Alt Hold really work?

Post Reply
Rusty105
Posts: 13
Joined: Thu Oct 31, 2013 4:09 pm

How does Alt Hold really work?

Post by Rusty105 »

Ok, was having issues getting Alt Hold to work , and have a quick question of how it is supposed to work. I read somewhere that once you have switched on Alt Hold that the throttle stick works more to control direction of height than motor control. SO... that if the throttle stick is centered the copter maintains altitude, if you move the stick up, the copter climbs, and if you move stick down the copter sinks.

Is this the way it works?
I am running WM 2.3

Jimbo385
Posts: 55
Joined: Sun Apr 21, 2013 8:00 am

Re: How does Alt Hold really work?

Post by Jimbo385 »

That's basically it!

However, tuning it is different to tuning other PIDs! It has taken me quite a while to get used to it.

There is a guide here. http://www.multi-rotor.co.uk/index.php?topic=5090.0

First I made sure that ACRO & Level were dialled in and working as I liked.

I set a 2 pos switch to
Pos1 ACRO
Pos2 Horizon

I then set a 3 pos switch to

Pos1 Nothing
Pos2 baro
Pos3 Nothing

I have found that the key is to start everything set to 0.

Then I did the following;
Fly in ACRO mode only and ensure that all feels well
Fly in Horizon mode only and ensure that all feels well

In Horizon mode, climb to about 4-6 metres, hover and switch baro on! cover the switch to that you can knock it out easily though! This is what the Baro does with no board input. You will find that sometimes it will climb and sometimes it will sink.
Now, starting with 'D' increase the value to 1 then fly and see if it gets better. Then increase to 2 and do the same. Continue doing this and it will get better an then start to get worse! Back the value of D until it's the best it can be.

THAT's 'D' DIALLED IN!

Next, do the same to 'P'. This time, increase the value by 0.2 from a zero start. As with 'D' it will get better and better and then begin to get worse. Back it off until it's the best it can be!

THAT's 'P' DIALLED IN!

Now with 'I' this can be left at zero or changed to compensate for drift caused by the drop in battery capacity. However, this is a bit trickier to test as the battery needs to be getting low to have an affect.

This is how I have today tuned my Baro to give a nice solid altitude hold and I tested in a steady wind!

By the way, my settings are as follows;

P I D
1.2 0.0 2

Yours will be different!

Give it a go and post your results/findings and frustrations!

Rusty105
Posts: 13
Joined: Thu Oct 31, 2013 4:09 pm

Re: How does Alt Hold really work?

Post by Rusty105 »

Jimbo385 wrote:That's basically it!

However, tuning it is different to tuning other PIDs! It has taken me quite a while to get used to it.

There is a guide here. http://www.multi-rotor.co.uk/index.php?topic=5090.0

First I made sure that ACRO & Level were dialled in and working as I liked.

I set a 2 pos switch to
Pos1 ACRO
Pos2 Horizon

I then set a 3 pos switch to

Pos1 Nothing
Pos2 baro
Pos3 Nothing

I have found that the key is to start everything set to 0.

Then I did the following;
Fly in ACRO mode only and ensure that all feels well
Fly in Horizon mode only and ensure that all feels well

In Horizon mode, climb to about 4-6 metres, hover and switch baro on! cover the switch to that you can knock it out easily though! This is what the Baro does with no board input. You will find that sometimes it will climb and sometimes it will sink.
Now, starting with 'D' increase the value to 1 then fly and see if it gets better. Then increase to 2 and do the same. Continue doing this and it will get better an then start to get worse! Back the value of D until it's the best it can be.

THAT's 'D' DIALLED IN!

Next, do the same to 'P'. This time, increase the value by 0.2 from a zero start. As with 'D' it will get better and better and then begin to get worse. Back it off until it's the best it can be!

THAT's 'P' DIALLED IN!

Now with 'I' this can be left at zero or changed to compensate for drift caused by the drop in battery capacity. However, this is a bit trickier to test as the battery needs to be getting low to have an affect.

This is how I have today tuned my Baro to give a nice solid altitude hold and I tested in a steady wind!

By the way, my settings are as follows;

P I D
1.2 0.0 2

Yours will be different!

Give it a go and post your results/findings and frustrations!




Yeah I found that guide, but somehow missed the throttle control while in Alt Hold. I only found it when I was going through config.h and found "#define ALT_HOLD_THROTTLE_NEUTRAL_ZONE 50" I wanted to confirm that is how it works. I am still working on the PIDs, but it is cold out with snow on the ground. Not fun out there right now.

Jimbo385
Posts: 55
Joined: Sun Apr 21, 2013 8:00 am

Re: How does Alt Hold really work?

Post by Jimbo385 »

I didn't know about that! My quad hovers at around 60% not 50% but I don't think it matters!

tavis
Posts: 2
Joined: Thu May 01, 2014 7:37 pm

Re: How does Alt Hold really work?

Post by tavis »

Nice write up. Maybe somebody can fix the multiwii wiki entry on this topic because it's confusing.

I've seen that most PID values are much lower then the defaults. My dfaults are 6.4,.025,24. How come the defaults are so high ?

Ddpemberton
Posts: 19
Joined: Fri May 02, 2014 8:40 pm

Re: How does Alt Hold really work?

Post by Ddpemberton »

After you flip into BARO, do you need to center your throttle stick? Or do you leave it where it is when you flick to BARO?

pjman
Posts: 34
Joined: Thu Jun 12, 2014 8:55 am

Re: How does Alt Hold really work?

Post by pjman »

I'm just starting out with Multiwii (version 2.3) and so far I've got hovering okish and am trying to get the Alt hold working next. Pretty much anything above 2 on the D value and the hex climbs fairly fast when I hit baro. Seems a bit low but I see others have low figures as well so probably ok. The funny thing I have is that when in alt hold I can't use throttle to change altitude at all. I can drop the stick to zero or up to full and it doesn't effect the altitude at all. Is that correct? Maybe it just effects it slowly so I am not recognizing it as I don't use baro for long?

Also - Is the tuning - D for acc, P for baro and I for voltage? There is so much info out there and a lot of people don't quote which version the guide they are writing is for.


Thanks

PJ

Post Reply