View Full Version : Stable Mode Hovering
01-24-2011, 05:48 PM
Just a quick clip of what I have going with Stable mode. There is a breeze coming in from my right. I can set up the quad for a bit more self leveling, but then when the wind hits it, it begins to oscillate. This is the setup that seems to work in all conditions, even high winds and fast descents. It does not sit in exactly one spot, but I have confidence it will stay upright until I land or the battery runs out.
01-24-2011, 07:24 PM
is this stock 2.1 code? or something your cooking?
01-25-2011, 12:48 AM
2.1 code with Honk's battery monitor. Changed Kp_ROLLPITCH value.. Lots of tuning. I am still trying to get it to stay in place in the wind, but I don't think its possible. Once the quad is moving in the breeze the accels see 0, and it's moving along with no tilt, so the gyros don't sense anything either.
01-25-2011, 07:13 AM
Looks really good man.
Well that is really nice I must say! Hope I get that soon :)
01-27-2011, 04:59 AM
@Scotth- Can we get your PID, Mag, Barometer and what ever other setting you are using in that video?
01-27-2011, 01:21 PM
Mega with V2 Shield. Copy of the AQ FPV frame. No Mag. Barometer installed, not yet used.
My D has been scaled by 100 in PID.h => dTerm = PIDparameters->D * (currentPosition - PIDparameters->lastPosition) / (G_Dt*100); // Thanks Honk
I have changed my KpRollpitch to .0024 in FlightAngle.h Was originally .005 in code 2.0, then went up to .01 in 2.1. Makes the quad have that spastic motor glitch. Lower number smooths this way out.
1050kv motors, on 10x4.7 props.
60cm motor to motor.
01-28-2011, 04:23 PM
One thing to add. In my juggling of code to test altitude hold, I found one more thing I had changed. Ki_rollpitch in the 2.1 code is .00005, but commented to .0000005. It should be the latter, which it was in the 2.0 code.
About the D term, I think it really should be scaled to fit the numbers now soon. Mikro told that he was thinking of adding a decimal place more on the Configurator, but I really think the precision is not the problem, but the offset/scaling.
However, I'm really really eager for us to move over to a 100% SI unit based system so we can all compare values more easily. Then all our current parameters will be FUBAR... :)
By the way, that slow and big circling you've got in Stable Mode, I've had that before, but I can't tell if that's a good or bad thing. What parameter do you find changes that circling characteristic the most?
01-28-2011, 08:37 PM
Honk, that was mostly wind. There was a breeze coming down the driveway, pushing the quad towards the camera and to my left. The circles are me bringing it back to stay in camera frame. Even if the quad is level, it can still drift in the wind.
I do, however, have a slight overshoot from level that I can't seem to get rid of. If I get it to "lock" too much harder on level, then I have a horrible oscillation that pops up in a wind gust or fast descents. After my findings about the Ki_rollpitch, I might experiment with that constant.
My findings for behavior with the different variable settings:
P=> overall gain, too much, regular oscillation or overcontrol. Too little, not enough stabilization.
D=> Thats a funny one. Too much in either direction behaves similarly. In the sweet spot, softens oscillation (and stabilization) on center. (right off perfect hover). Seems to help with overshoot.
I=> I don't like it. Seems to get stuck at a value and do funny things.
Kp_Rollpitch=> I had a nervous twitch/glitch from all motors. Lowering this number drastically got rid this behavior. I also feel like there I am more connected to the quad. Hard to explain, just feels like the quad is behaving properly. Too low, and you lose control feeling of the quad, and it starts to wander.
Ki_Rollpitch=> With it too high (by two decimal places), in stable mode, the quad would tilt and stay there. Some self leveling, but would get hung up in the wrong attitude. Now, it seems to perform pretty well. Might need additional experimentation.
Well ok. I know that wind can do strange things pretty randomly... Angle control won't help that either, it's either your eyes or GPS/camera/something that's gonna correct for that.
Thank you for your observations and experimenting!
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.