Stability: PID tuning vs Geometry changes

Firmware/software/electronics/mechanics
Post Reply
theseankelly
Expert
Posts: 153
Joined: Mon Dec 28, 2015 3:23 pm
Contact:

Stability: PID tuning vs Geometry changes

Post by theseankelly »

Hey All

I'm looking to make some stability improvements. All up, the flie is very stable and I'm quite happy with it, but there are a few edge cases -- things LIKE:
1) Fly to a high altitude, cut throttle. Reapply throttle (something close to what I'd expect for a stable hover, not max throttle) during the freefall. The flie seems to oscillate quite hard as it tries to recover, rather than smoothly leveling off
2) Fly at a high velocity pitched forward. Apply a bit of negative pitch, and the flie quickly overcompensates, inverts, and smashes into the ground.

I'm trying to understand how much of this sort of thing can be corrected by tuning the PID gains (or even re-architecting the whole PID loop(s)..but that seems extreme..) versus simple limitations due to the geometry and mass of the flie. For example, in scenario #1 it's really hard to tell if the oscillations are due to the control loop, or due to wind turbulence as it simply fights as hard as it can.

Furthermore, the simple geometry/center-of-mass change of mounting the battery under the deck with a rubber band seems to all but have eliminated problem #2. I expected to see a pretty big agility hit, but I actually didn't notice any.

Would love some thoughts on this -- I'm pretty new to control loop theory.
Thanks!
Sean
http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
theseankelly
Expert
Posts: 153
Joined: Mon Dec 28, 2015 3:23 pm
Contact:

Re: Stability: PID tuning vs Geometry changes

Post by theseankelly »

FYI via more digging I found this excellent post on PID tuning specific to the crazyflie PID design.

viewtopic.php?f=6&t=192

Still interested in some thoughts on mounting the battery on the bottom to lower gravity and increase stability (esp outdoors). It seems to work well but I also imagine I've only made the pids fight gravity harder by doing this.
http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Stability: PID tuning vs Geometry changes

Post by kristoffer »

Moving the center of gravity UP actually increases the stability and makes the system less volatile.
theseankelly
Expert
Posts: 153
Joined: Mon Dec 28, 2015 3:23 pm
Contact:

Re: Stability: PID tuning vs Geometry changes

Post by theseankelly »

Interesting! I'll have to play with that and adjust how I'm mounting other components.
http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
theseankelly
Expert
Posts: 153
Joined: Mon Dec 28, 2015 3:23 pm
Contact:

Re: Stability: PID tuning vs Geometry changes

Post by theseankelly »

Could you explain the theory behind your statement a little more? It still seems a little counterintuitive to me.

Also, consider the following scenario: I'm flying pretty fast (45deg pitch) with a light to moderate breeze blowing in the same direction. I make a banked turn 90 degrees, and when the flie levels off, the cross breeze very commonly tumbles the flie over, and it crashes to the ground. However, when flying with the battery mounted on the bottom, this rarely happens.

Thanks!
Sean
http://www.thejumperwire.com
Tips, tutorials, and science about DIY electronics, drones, and embedded software.
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Stability: PID tuning vs Geometry changes

Post by kristoffer »

I'm not sure why. I have not investigated it but have noticed that when I put a standing LEGO man (!) on top of a CF it becomes easier to fly.
Maybe it is comparable to trying to balance a standing stick in your hand? A longer stick is easier to keep balanced than a short one.
Post Reply