Page 1 of 1

Altitude hold please help

PostPosted: Sun Mar 26, 2017 11:44 am
by Jazon
Hi everybody, i have a big problem with multiwii, i want to do a altitde hold.
the quadcopter try to stabilize the altitude and suddenly the quadcopter shot up to the air:(, i let teh default value p 6.4 i 0.0025 d 24.
Can anyone help me please

Re: Altitude hold please help

PostPosted: Mon Mar 27, 2017 8:58 am
by synersignart
I used to have those from time to time, first thing is is there a foam or a cover that protects your board from direct light and wind. also some boards like the HK pro 'hopefully your not using one' . are sensitive to heat. behaves differently on different weather beside the PIDs I would also check for the throttle curve set 20% to as far as 50% on the GUI that way it minimize sudden jumps and allows the throttle to gradually spool

Re: Altitude hold please help

PostPosted: Tue Mar 28, 2017 9:17 am
by Jazon
So the crazy jumping due to no protected barometer ?.

Re: Altitude hold please help

PostPosted: Tue Mar 28, 2017 3:06 pm
by synersignart
it does, prop wash and wind can alter the pressure the barometer reads. its best to protect it. to prevent sudden pressure changes
also you can review this again to tune your settings http://www.multiwii.com/wiki/?title=Altitude_PID

P - Is how much the multirotor should rely on the barometer sensor. The higher the value is the stronger the multirotor relys on the Barometer reading.
I - Is used to compensate for drift caused by battery voltage drop during the flight. The higher the value is more the multirotor will react to voltage drops ( or other varying factors over time).
D - Is how strong the multirotor should react to data from the accelerometer Z axis. It is used to react to small up and down movements that the barometer cannot accurately sense. The higher the value is the stronger the multirotor will react to small altitude changes.

Tuning:

We need to start from settings the Accelerometer.

1. So set the P and I to 0

2. Start to play with D value only. To high D may cause yoyo effect (up and down oscillations). With to low D copter will be not able to react strong/fast enough to hold altitude. Your goal here is to set D to the value when copter don't oscillate up and down and also holds altitude quite well for a not very long period of time. Copter will not hold altitude perfectly at this point during long periods. It will slowly drift up or down, but altitude should be quite stable in short periods.

3. Start to increase P to the point where copter holds altitude over long time period. If the value is to small the copter will drift slowly up and down. If the value is to high yoyo effect may appear. Goal here is to set it to the point where copter holds altitude for quite some time. Copter will still go slowly down due to battery voltage drop over time.

4. "I" is used to compensate the voltage drop. So start to increase the "I" value slowly until you get a perfect position hold during a very long time.
Now your altitude hold should be good enough.

Re: Altitude hold please help

PostPosted: Wed Mar 29, 2017 12:53 pm
by Jazon
Thanks a lot :)

Re: Altitude hold please help

PostPosted: Sat Apr 01, 2017 6:17 pm
by Jazon
And how about the GPS position hold; have you a technique how to tune thePID??
Thanks

Re: Altitude hold please help

PostPosted: Sat Apr 01, 2017 6:42 pm
by synersignart
http://www.multiwii.com/wiki/index.php? ... controller
http://www.multiwii.com/wiki/index.php? ... controller

Tuning the Pos PI controller

The Pos PI controller is used to determine how fast the multirotor must go to reach it's position hold location.

P is the error between the current location and the hold location together
I is the Pos controller determine how fast the multirotor will try to fly to reach it's position hold location.

It is suggested that you start with the default PI parameters and set up Pos Rate first in order to achieve smooth attitude control based on the Pos PI controller commanded speed.

With larger P values, the flight controller will command a higher speed towards the desired location.

Pos I is used to overcome any wind pushing the multirotor away from the target hold location. The longer the error persists, the more the I term will 'wind up' the output to compensate for the prolonged error. Setting I too high will cause oscillations or overshoot possibly leading to loss of control.

Re: Altitude hold please help

PostPosted: Sat Apr 01, 2017 7:15 pm
by Jazon
Thanks i want to know if you are a programmer ?

Re: Altitude hold please help

PostPosted: Mon Apr 03, 2017 5:14 am
by synersignart
whats your definition for a programmer anyhow? . personally I dont think I qualified as a true programmer but I've learn enough to know how it works both in arduino and C++ and enough to get a Multiwii to fly around waypoints and several basic GPS functions

my
HK MW Pro board has a nasty tendency to malfunction at high temperature like flying out in a hot summer day . the baro than to fluctuate greatly no matter whats my PID settings

while the Crius AIO handles rock solid and a reasonable performance from my ardu 2560 board with baro and gyro sensors on it

funny fact multiwii seems to behave differently depending the model and make of the sensors on the board.

Re: Altitude hold please help

PostPosted: Tue May 09, 2017 7:56 pm
by Jazon
Ok, i have other question, when we engage position hold GPS. the quadcopter should be in angle mode or acro mode ?

Re: Altitude hold please help

PostPosted: Mon Aug 20, 2018 12:37 pm
by synersignart
must be in horizon mode for GPS function. , too scare to try Acro on GPS mode. might be unsafe to do so