I am still trying to get my head around the whole launching in ALT HOLD or LOITER. My Quads have had battery upgrades (Larger batteries) and it now takes about 60% throttle to get off the ground to hover, i have adjusted the THR_MID to 600.
In Stabilize mode, once at 60% if i click into ALT HOLD or LOITER, i start to ascend. my vibrations are well within limits (0-1 on X & Y, 7-8 on Z Axis)
what i dont understand is when launching in ALT HOLD OR LOITER the props dont spin until i get to 50% (because my MOT_SPIN_ARM is set to 0) and it appears it will jump at any moment. I know most of the instructions say when you go into ALT HOLD or LOITER from stabilize your stick should be at 50%. but with a THR_MID at 600, that seems difficult.
so what am i missing here, what do i need to change to get both THR_MID and ALT HOLD/LOITER to be in tune with each other?
I would prefer to launch in ALT HOLD and fly or in LOITER for certain times. the Craft is nicely balanced and they flt great in stabilize mode. any suggestions are greatly appreciated.
When taking off in alt hold modes like alt hold and loiter, the copter spins the motors at MOT_SPIN_ARMED until a positive rate of climb rate is demanded. The throttle stick sets the climb rate, therefore the copter will be disarmed until you hit 50% throttle.
THR_MID curves your throttle stick in manual modes. It should be set so that you get a hover with a centered throttle stick in stabilize.
[quote=“jschall”][quote=“themightythor”]I am still trying to get my head around the whole launching in ALT HOLD or LOITER. My Quads have had battery upgrades (Larger batteries) and it now takes about 60% throttle to get off the ground to hover, i have adjusted the THR_MID to 600.
In Stabilize mode, once at 60% if i click into ALT HOLD or LOITER, i start to ascend. my vibrations are well within limits (0-1 on X & Y, 7-8 on Z Axis)
what i dont understand is when launching in ALT HOLD OR LOITER the props dont spin until i get to 50% (because my MOT_SPIN_ARM is set to 0) and it appears it will jump at any moment. I know most of the instructions say when you go into ALT HOLD or LOITER from stabilize your stick should be at 50%. but with a THR_MID at 600, that seems difficult.
so what am i missing here, what do i need to change to get both THR_MID and ALT HOLD/LOITER to be in tune with each other?
I would prefer to launch in ALT HOLD and fly or in LOITER for certain times. the Craft is nicely balanced and they flt great in stabilize mode. any suggestions are greatly appreciated.[/quote]
When taking off in alt hold modes like alt hold and loiter, the copter spins the motors at MOT_SPIN_ARMED until a positive rate of climb rate is demanded. The throttle stick sets the climb rate, therefore the copter will be disarmed until you hit 50% throttle.
THR_MID should be set to your hover throttle.[/quote]
I will post logs from tomorrows flights, i have the THR_MID set to the amount of throttle i have to give the quad to hover at about 6 feet.
are you referring to another parameter i should be looking at?
all i am trying to accomplish is to get these drones rock solid on ALT HOLD and LOITER, they will never fly fast, they are solely for camera work. thanks for your answer
I think this is your problem: you’re expecting THR_MID to adjust ALT_HOLD and LOITER. It does not, it adjusts STABILIZE.
ALT_HOLD and LOITER will hover when the stick is 50%, regardless of what THR_MID is set to. THR_MID curves your throttle when in stabilize, allowing you to hover with the stick at 50% in stabilize as well.
I think this is your problem: you’re expecting THR_MID to adjust ALT_HOLD and LOITER. It does not, it adjusts STABILIZE.
ALT_HOLD and LOITER will hover when the stick is 50%, regardless of what THR_MID is set to. THR_MID curves your throttle when in stabilize, allowing you to hover with the stick at 50% in stabilize as well.[/quote]
you are absolutely right, i thought it also curved ALT HOLD and LOITER. How to i get things in Line so when i Go into ALT HOLD or LOITER from Stabilize it stays put?
This is My XAircraft X650 with Log attached. it performed pretty well but still have some drift in Loiter. i am looking to fine tune this so that Loiter stays put. i have been trying on my own for weeks and by reading this forum, i have gotten close but not good enough. My THR_MID on this aircraft is usually 550 or 600. in this case it was 550. i have done all ESC calibration (XAIRCRAFT 30A ESC) and auto trim. the Log File for this one is 2014-30-31 10-24.log http://diydrones.com/forum/attachment/download?id=705844%3AUploadedFile%3A1609760
This is my F450 also with Xaircraft 30A ESCs. this one is the one i have the most trouble with.With Log File Attached, This one i can never seem to tune to get a nice steady LOITER or ALT HOLD, it always Rises. any help would be appreciated and thank you in advance. the Log File name is 2014-30-30 10-10.log http://diydrones.com/forum/attachment/download?id=705844%3AUploadedFile%3A1609761
With ALT_HOLD and LOITER we have to remember that we can change the altitude of the copter by use of the throttle. Once we are at the altitude we desire we can bring the throttle near center and the copter should hold that altitude. As for Loiter remember that it depends on GPS lock and the accuracy will vary from times to times so it will not be perfect and wind also plays a significant part in stability. Try and find the sweetspot with the Throttle and it should hold. I used to have that same problem as well until I realised how it should work.
[quote=“elpipe”]With ALT_HOLD and LOITER we have to remember that we can change the altitude of the copter by use of the throttle. Once we are at the altitude we desire we can bring the throttle near center and the copter should hold that altitude. As for Loiter remember that it depends on GPS lock and the accuracy will vary from times to times so it will not be perfect and wind also plays a significant part in stability. Try and find the sweetspot with the Throttle and it should hold. I used to have that same problem as well until I realised how it should work.
Maurice[/quote]
Thanks for your answer, i just thought it would make more sense that is my THR_MID is 650 or 65% then ALT HOLD or Loiter would be aware of that. there seems to be a disconnect as far as i can tell.
What did you change or modify to get all your Flight modes in line with one another?
Your F450 hovers at around 82% throttle, suggesting a THR_MID value of 820. This will curve your throttle stick during stabilize mode such that mid throttle is 82%. I would caution you to reduce weight or increase power to get margin.
Your X650 hovers at probably 65-66% throttle. I suggest you set THR_MID to 650.
Note that differing flight conditions (battery voltage, air density, etc) will cause the ideal value of this parameter to change over time. Ballpark it. The transitions from loiter to stabilize will never be perfect. You need to center your throttle during loiter if you want it to maintain altitude. If you’re off-center and out of the (10%, I think?) deadzone, you will climb or descend.
By the way, no need to post screenshots, only logs.
[quote=“jschall”]Your F450 hovers at around 82% throttle, suggesting a THR_MID value of 820. This will curve your throttle stick during stabilize mode such that mid throttle is 82%. I would caution you to reduce weight or increase power to get margin.
Your X650 hovers at probably 65-66% throttle. I suggest you set THR_MID to 650.
Note that differing flight conditions (battery voltage, air density, etc) will cause the ideal value of this parameter to change over time. Ballpark it. The transitions from loiter to stabilize will never be perfect. You need to center your throttle during loiter if you want it to maintain altitude. If you’re off-center and out of the (10%, I think?) deadzone, you will climb or descend.
By the way, no need to post screenshots, only logs.[/quote]
Thanks for your help, i was afraid the Motors on the F450 were a little weak, they are DJI 2212/920KV. i think its time to look into a lower KV for motors. My X650s i have cleared up their problem by changing some parameters, now they fly better than before, LOITER being much Better. ALT HOLD is better but i do have to move the stick to correct altitude. but thats fine.
On my F450 & X650, i lowered Throttle Accel P from 0.75 to 0.6 and Throttle I from 1.5 to 1.2.set Loiter PID P to 0.2, and Rate Loiter D to 0.15.
Regarding loiter, there are a few sensors that have to be spot-on to have good loiter:
Accelerometers. These measure acceleration and are used to provide high-frequency motion data. They can be wrecked by vibration.
GPS. This measures absolute position. If you’re getting drift over longer periods, this is the problem. Not a lot we can do here, the UBLOX is the best GPS we can get, but it isn’t perfect. Keep sources of RFI away from it.
Compass. The measurement of heading from the compass is used twice:
to rotate the accelerometer data into the same frame as the GPS, so that it may be used to provide data at higher rates than the 5hz that the GPS gives us.
to rotate the demanded tilt angle from the earth frame into the body frame so that the copter moves in the right direction
Compass is interfered with by:
High-current DC wires nearby. ESC wires, power distribution boards, etc. You should keep the compass as clear as possible from these sources of interference, and you should also run the CompassMot procedure (which you haven’t done on either copter), during which APM computes a linear relationship between current draw or throttle and compass offsets.
Magnetic material on-board the copter. This is corrected for by your offsets.
Non-magnetic materials with high magnetic permeability on-board the copter. A piece of nickel or steel. These distort magnetic fields and we don’t correct for them because they’re a small source of error. Just make sure there aren’t any big hunks of steel near the compass.
Roll and pitch tracking. If the roll and pitch aren’t tracking the command well, then the thing won’t be able to hold a good position. The best way to solve this is to do autotune. Do the autotune with the copter loaded lighter than normal and with no stabilizing gimbals present.
Loiter parameters need not be modified. They are set to sane defaults and they have known units on the input and output side (they are not copter-dependent) and thus are pre-tuned.
That said, if a bit of D term doesn’t cause any twitching, you’re probably ok with it.
[quote=“jschall”]Loiter parameters need not be modified. They are set to sane defaults and they have known units on the input and output side (they are not copter-dependent) and thus are pre-tuned.
That said, if a bit of D term doesn’t cause any twitching, you’re probably ok with it.[/quote]
Both X650s responded well to the changes, so far i am happy with their flight. i will test more tomorrow as i can get to a field and fly for a longer period of time.
The F450 i have resigned my self to the fact i need better motors since the DJIs have a limit on the blades they can spin (10 inch). i’ll probably switch over to some Sunny Sky motors and put 11 inch blades on those.
the LOITER PID changes i made seem to have done the trick as far as stable loiter.