Page 49 - Build Your Own Quadcopter_ Power Up Your Designs with the Parallax Elev-8
P. 49

28     Bu il d  Y o ur  O w n  Q u a d c o p t e r


                             Trial and Error Method
                                Do not be deterred by this method’s name because there is a definitive approach that is
                                followed in this method. The steps are:

                                1.  Set the K  and K  block gains to zero.
                                                d
                                           i
                                2.  Increase the  K  block gain until the system becomes unstable, as determined by
                                               p
                                    observing system oscillation.
                                3.  Increase the K block gain to stop the oscillation induced in step 2.
                                               i
                                4.  Increase the K block gain to improve the system time response to an acceptable
                                               d
                                    value.
                                By following the above steps, a reasonable set of block gains should be able to be set.
                             These values should be tweaked to reach acceptable performances in actual operation. For
                             instance, it may be observed that the K block gain is set too high because the system is too
                                                            d
                             reactive to noise.
                             Ziegler-Nichols Method
                             This tuning method is similar to the Trial and Error method in that the first two steps are
                             identical.

                                1.  Set the K  and K  block gains to zero.
                                                d
                                           i
                                2.  Increase the  K  block gain until the system becomes unstable as determined by
                                               p
                                    observing system oscillation.
                                3.  Note the K  block gain at which oscillation starts. This will now be called critical gain
                                            p
                                    or K . Also note the oscillation period. This will be called P. c
                                       c
                                4.  Adjust all block gains per Table 2.4.
                                As you can clearly see from Table 2.4, control systems do not always have to contain all
                             three of the PID blocks. Sometimes only the P block is needed, as we saw in our thermostat
                             example.
                                Real-world PID control systems often contain an auto tuning capability in which the
                             block gains and response times are both detected and set to optimize system operation.
                             LabVIEW (LV) discussed in the next section contains a PID module that has an auto-tune
                             capability as well as a manual tuning capability.

                             LabVIEW PID Simulation
                             I will be using the LV 2012 student edition for my simulation platform. It is the latest student
                             version available at the time of this writing. Be aware that commercial, non-educational
                             versions of LV cost about $1200. It is not a cheap program. However, a student version is



                                       System Type  Block Gain   Integral Time  Derivative Time
                                       P            0.5 K c      n/a           n/a
                                       PI           0.45 K       P /1.2        n/a
                                                         c        c
                                       PID          0.60 K       0.5 P         P /8
                                                         c           c          c
                                      Table 2.4  Ziegler-Nichols Block Gains
   44   45   46   47   48   49   50   51   52   53   54