Showing posts with label pid tuning. Show all posts
Showing posts with label pid tuning. Show all posts

Friday, February 28, 2014

East Bay Guide to Understanding PID Loops, Part 2

Building on the intuitive model presented in part 1, we take a look at the mathematical model and write a PID control loop based on that model.  Hang in there if you're unfamiliar with the math... it turns out to be pretty straight-forward code in the end!

Like part 1, this is a first take.  I was going to make a second take, but I discovered I had scribbled all over my only nice-looking copy of the PID math.  Your comments are welcome!

The printed formula is from wikipedia.  I tried doing this Khan Academy style with a tablet... wow that's hard to write with, that man is a genius if for no other reason being able to use one of those things!



blogodex = {"toc" : "PID Loops", "idx" : ["tutorials"]};

Wednesday, March 7, 2012

Notes for KapteinKUK PI Tuning Guide




How to recognize different gain settings.

Too low P-gain: @0:01
- hard to control
- easy to over correct

Correct P-gain: @0:45
- easy to control and fly

Too high P-gain: @1:22
- oscillates rapidly
- gains height easily
- hard to control height
- oscillating sound from the motors

Too high I-gain: @1:49
- same as with too high P-gain, but oscillates with a lower frequency

Single axis tuning on a string @2:08

Setup: @2:08
- set yaw PI-gain to zero
- set Roll/Pitch I-gain to zero

P-gain too low: @ 2:19
- slow and imprecise stick response
- easy to turn by hand

Increased P-gain: @3:09
- sharper stick response
- harder to turn by hand

Good P-gain: @4:08
- sharp stick response
- slight oscillations when releasing the stick
- hard to turn by hand

Too high P-gain: @5:05
- scillates rapidly
- oscillating sound from the motors

Good P-gain, too low I-gain: @5:38
- moves back to center when stick is releaseddue to gravity
- easy to move by hand over long time

Good P-gain, good I-gain: @6:17
- stays in position when stick is released
- very hard to move by hand over long time

Good P-gain, too high I-gain: @6:57
- oscillates, but with a lower frequency than with a too high P-gain