This paper describes a circuit designed to automatically adjust the gain and the phase of a signal processing system. This circuit uses the AD8302 component from Analog Devices for phase and gain measurement. Additional circuits are included to improve its overall stability (temperature and input power level). As a first step, the compensation system "learns" its actual gain and phase performances. Then, it drives a phase shifter and a VGA (Variable Gain Amplifier) to cancel the measured deviation between the reference and the corresponding actual value. The measurement accuracy of our compensation system for a standard commercial temperature range (0°C to +85°C) is +0.28 dB for gain and +1.150 for phase when signal frequency is 900 MHz.