Perhaps the most difficult control problem for a drive servo is that of going down a ramp. Any back drivable drive servo will exhibit a freewheeling velocity on a given ramp.
This is the speed at which the robot will roll down the ramp in an unpowered state. At this speed, the surface drag and internal drag of the servo are equal to the gravitational force multiplied by the sine of the slope. The freewheeling speed is thus load dependent.
If a robot attempts to go down a ramp at a speed that is greater than its natural free-wheeling speed for the given slope, then the servo will remain in the forward driving quadrant. If the robot attempts to go slower than the freewheeling speed, then the servo will remain in the braking quadrant.
The problem comes when the speed goes between these two conditions. This condition usually occurs as soon as the robot moves over the crest of the ramp and needs to brake.
Under such transitions, both the quadrant discontinuity and drive/brake nonlinearity will act on the servo. This combination will make it very difficult to achieve smooth control, and the robot will lurch.
Since lurching will throw the robot back and forth between driving and braking, the instability will often persist. The result roughly simulates an amphetamine junkie after enjoying a double espresso. If the gain ramping trick described above is not adequate, then it may be necessary to brake.
My dearly departed mother endeared herself to her auto mechanic by driving with one foot on the gas and the other on the brake. When she wished to go faster or slower she simply let up on the one while pushing harder on the other. This method of control, however ill-advised for an automobile, is one way of a robot maintaining smooth control while driving down ramps.
One sure-fire method of achieving smooth control on down ramps is to intentionally decrease the freewheeling velocity so that the servo remains in the drive quadrant.
To accomplish this, one can use a mechanical brake or an electrical brake. The simplest electrical brake for a permanent magnet motor is to simply place a low value braking resistor across the armature. While a braking resistor or other form of braking will reduce the freewheeling speed of the robot, it will waste power. For this reason, brakes of any sort must be applied only when needed.
The ideal way to reduce the freewheeling velocity of a drive servo is through the use of circuitry that directs the back EMF of the motor into the battery. In this way, the battery recovers some energy while the robot is braking. The common way of doing this is through the use of a freewheeling diode in the motor control bridge.
I have not found simple freewheeling diodes to provide an adequate amount of braking in most downhill situations. This is because the back EMF must be greater than the battery voltage and the effective braking resistance includes both the battery internal resistance and the motor resistance. Thus, voltage-multiplying circuits are usually required if this type of braking is to actually be accomplished.