I updated a new version which has a fix for Alt hold and some new tuning capabilities.
The older alt hold had a typo that was found by randy that seriously degraded performance (the rate PID loop was skipped entirely). You should see much better results now.
Tunning with a Channel 6 proportional control is now done at runtime and doesn't need to be compiled in. To use, go to the CLI and setup menu. tune # is how you select the tuning option.
tune 0 = no tuning.
tune 1 = STABILIZE_KP
tune 2 = STABILIZE_KI
tune 3 = Yaw_KP
tune 4 = RATE_KP
tune 5 = RATE_KI
tune 6 = YAW_RATE_KP
tune 7 = THROTTLE_KP
tune 8 = TOP_BOTTOM_RATIO (for Y6)
tune 9 = Manual control of the relay
tune 10 = Waypoint traversing speed (0m/s to 10m/s)
So pick your variable from the list and type "tune 4"
Now, go to the CLI test menu and enter "tune". You will see the output value of the tuning function so you can adjust your proportional control and see the changes. I would dial in the best guess before you fly it. Then in flight, adjust it as you like. The return to test::tune to see what value was the best.
Good luck.
Replies
Any Plans to implement Nav_roll and Nav_pitch and other Arduplane parameters in the Tune section? this would greatly help with in-flight tuning
I think that the magetometer (compass) offsets need to be either manualy put in with each update or the self adjusting offsets needs a trigger to re learn. With my build the area to true North is 13 Deg. while pointing toward true North and rolling 45 Deg the compass gives up to a 20 Deg variance after being calibrated. However the pitch does not move the true north.
There is also an issue with the Altitude hold mode being Stable with .42
It acts more like Simple mode.
I made one flight today with 2.0.41 and default pids. Loiter was first time usable for me so great work!. Version 2.0.37 and 39b overshooted like crazy even after pid changes. Basically i always had the same problem as "Helldesk" in his posts(I also live in Finland if it's related with location). Mostly oscillation in Longitude direction. With this latest version I still have oscillations, but much less and difference between longitude and latitude error seems to be smaller. I hope i can it better now with some tuning.
Stabilize seems to be ok. Alt_hold is much more precise. Without sonar quad kept altitude in 0.5-1m.
Simple was not 100% ok for me. I tried it and at first it seems to be ok. First after yawing guad left about 90degrees control directions was ok(if i remember right :)), but then after about 160-180 degree total yawing to the left (guad front almost facing to me) ,pitch and roll seems to be about 45degree wrong? I try to look log and understand what happend.
-Jani-
Finally the weather was good enough to test 2.0.41 on my standard frame.
Tested:
stabilize: Excellent - very smooth, yaw very good
simple mode: No problems, flew well
alt hold (sonar altitude): The best ever - set multiple heights 1.5 feet to 6 feet and hold was smooth, no pulsing - excellent.
alt hold (baro height > 15 feet): Again - best ever - set mutiple heights up to 30 feet and very smooth, motors were working in a fair bit of wind, but the baro was as good as I've ever seen - with just a bit of motor pulsing.
loiter: The best I've seen on my quad, at sonar alt flew for about a minute and held to within 3 meters or so. The wind was blocked by the house and trees, but very nice. Flying the loiter on the right stick was awesome - helped to avoid an ocassional tree limb.
At 25 feet altitude or so, there was a 8 to 10 mph wind and loiter was hard for me to test, but it was drifting a bit, but still seemed pretty good. I need to get into an open field to really test this well - but again best ever on my frame.
Nice job Jason and the team.
I've had another go with adjust PIDs and my reliable frame X4 but had 2 interesting observation. NO Loiter and RTL was tested due to weird circumstance.
X4:
it took off well, triggered alt hold about 2-3ft and it really stayed well, I enjoyed too much that you can see on the graph that 60% of the flight was on this height. I was really surprised. Then went back to stab mode and climb to baro levels and triggered ALT_hold, no surprise it stay well about a 1ft drop here and there but was pretty good so I fly around then suddenly it dropped from about 20-25ft dropped to about 3ft lucky it save itself and started climbing so I was able to switch to stab and return the quad close enough then land
Interesting observation:
- curious why it drop fast, baro reading recorded it
- the sonar reading was perfect when flying 2-3ft off the ground but why was it recording noisy during baro altitude (seems to experience what helldesk saw). It might be noisy line/power/too close to motor but it doesnt explain why it was not noisy during 60% of the flight.
Smallspy:
Unfortunately, I raised the P too much for the alt_hold which made it too agressive I can hear the motors compensate 25ft down. BUT (big one) I flew really stable on STAB mode and even a good quality video proves its (not perfect specially the tilt servo over compensates on small movement while hovering). It was really a smooth flight that almost didnt need ALT_HOLD. Sonar readings were not like the other X4
OnBoard video
Everything was good except the decent, i decent to fast. blaming the throttle finger :D
loaded v41but to windy at the moment.
What I noticed is that selecting "Tune 9" in CLI doesn't work. I wanted to use the Relay but I can't.
Very interesting result, I have good results on both v40 and v41 and sonar was ok on both. Could the cold weather be affecting the readings?
The only change i saw that can affect the ALT behave was on the alt_error
from
to
I could be wrong but hope things gets sorted out, i dont think your cable would go bad unless somehow condensation happened inside the wires or in the sonar itself. Highly unlike i guess. Hope you get it sorted out.
Well, didn't get anything done on the first flight. Altitude hold didn't work - and nothing apparent has changed from the flights with 2.0.40. I wonder what's wrong... sonar logging is suddenly terrible like with the worst unshielded cable but it was great with 2.0.40! It's a new cable I had only tested a couple of times with 2.0.40 but it had apparently worked well. It is also very foggy this morning, GPS had a couple satellites less than usual too due to that -- not that I got around to tuning NAV_P much. I haven't flown at 10 °C temperatures before, not to mention in condensing conditions. Ugh.
The instructions are for plane but this is pretty much the same just use the copter version.
How do I get 2.0.41, the mission planner only gets 2.0.40