A control word generator comprised of circuitry to generate a control word to control an attenuator. The control word generator includes a counter that increments at a
clock rate much higher than the
refresh rate at which the
error signal is recalculated. The counter is controlled by a
comparator which compares the
error signal to a reference value, which, starting from a programmable upper limited is decremented in the counter's incrementation rate by a programmable step size. When the reference value equals the
error signal, the
comparator changes state and the counter stops incrementing. The count at that time is the control word, which if everything operated instantaneously, would be the control word that would alter the attenuation sufficiently to achieve nominal power. Also disclosed is a method to use this apparatus to generate a table of control words comprising: first establish an input
power level and attenuate the
signal with an analog variable attenuator /
amplifier; second, measuring the output power of the
signal output by said variable attenuator /
amplifier; third, use a control word generator to iteratively derive a control word, which will cause the input
signal power to be altered to the nominal
power level; fourth,
record that control word; fifth, increment the input signal power and repeat the process to derive a new control word and
record that word; and, sixth, repeat the entire process for each level of expected input signal power.