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 an
accumulative adjustment target value. The accumulative adjustment target
value has a linear relationship with the slot number and is calculated
for each slot to ensure that any corrections are evenly distributed over
the adjustment period for a smooth correction. In one embodiment, the
algorithm also checks the total amount of adjustment applied to the slots
over a sliding adjustment window to make sure that the total amount of
adjustment applied to the slots in the adjustment window do not exceed a
predetermined maximum threshold.