Page 86 - Designing Autonomous Mobile Robots : Inside the Mindo f an Intellegent Machine
P. 86

Closed Loop Controls, Rabbits and Hounds


                     ‘Limit the output accumulator and flag the integrator
                     ‘if the output goes out of range. (In a properly tuned
                     ‘control, this should never happen).
                     If OutputAccum > 9999 Then
                       OutputAccum = 9999
                       IntegralHold = -1 ‘Allow only down integration
                     ElseIf OutputAccum < 0 Then
                       OutputAccum = 0
                       IntegralHold = 1 ‘Allow only upward integration
                     Else
                       IntegralHold = 0 ‘Allow both directions.
                     End If

                     DoPIDs = CInt(OutputAccum)

                   End Function
                   ‘------------------------------------------------------------------------------------------
                   ‘Prevent Terms from exceeding integer range for logging.
                   Private Function LimitTerm(Term As Single)
                     If Term > 9999 Then
                       LimitTerm = 9999
                     ElseIf Term < -9999 Then
                       LimitTerm = -9999
                     Else
                       LimitTerm = Term
                     End If
                   End Function


                        Figure 5.5. A band-limited hybrid control with integral hold-off

               Robot drive controls

               The drive system of a mobile robot is subject to widely varying conditions, and thus
               it presents several challenges not found in the simpler control systems already dis-
               cussed. These include:

                   1. Drive/brake asymmetry
                   2. Quadrant crossing nonlinearity due to gear backlash

                   3. Variable acceleration profiles due to unexpected obstacle detection

                   4. Variable drag due to surface variations
                   5. Variable inertia and drag due to payload variations.






                                                        69
   81   82   83   84   85   86   87   88   89   90   91