The following circuit is applicable for the Closed-Loop automatic power control for RF applications. It uses a log detector (AD8318) and a VGA (ADL5330). The AD8318 has a property to stabilize the high temperature. The IC also ensures the same level of temperature stability at the output of the ADL5330 VGA. The log amp detector converts the ADL5330 from an open-loop variable gain amplifier into a closed-loop output power control circuit. The POUT vs. setpoint transfer function of AD8318 follows a linear-in-dB characteristic because the AD8318 has a linear-in-dB transfer function. Here is the schematic :
Take note that a sample of output RF must be fed back to the detector using additional attenuation and a directional coupler to operate the ADL5330 VGA in an AGC loop. A DAC is used to apply A setpoint voltage to the VSET input of the detector. The VOUT is connected to the GAIN pin of the ADL5330. The GAIN voltage is adjusted by the detector until the level at the RF input corresponds to the applied setpoint voltage. The correct balance between the setpoint voltage and the input signal level at the detector is set by the GAIN.
(Source : Analog Devices Application Notes)