An algorithm calculates a correction value to be applied to a slot in an
adjustment period for power correction. For each slot, the algorithm
determines whether adding a correction value in a given slot would bring
the actual accumulative adjustment value closer or farther from a total
desired power correction value for the adjustment period. In one
embodiment, the correction value is added to consecutive slots in the
adjustment period to conduct the correction as fast as possible. The
algorithm also checks the total amount of adjustment applied to the slots
over a sliding adjustment window within the adjustment period to make
sure that the total amount of adjustment applied to the slots in the
adjustment window do not exceed a predetermined maximum threshold.