Apparatus for controlling a gain and phase of an input signal input to a power amplifier , the apparatus comprising: gain control means for controlling the gain of the input signal; phase control means for controlling the phase of the input signal; a gain control loop configured to control the gain control means based on a power level of the input signal and a power level of an amplified signal output by the power amplifier, to obtain a predetermined gain of the amplified signal; and a phase control loop configured to obtain an error signal related to a phase difference between a first signal derived from the input signal and a second signal derived from the amplified signal, and control the phase control means based on the error signal to obtain a predetermined phase of the amplified signal, wherein the phase control loop is arranged to delay the first signal before obtaining the error signal, such that the delayed first signal and the second signal used to obtain the error signal correspond to the same part of the input signal, wherein the gain control loop is configured to receive a third signal derived from the input signal and a fourth signal derived from the amplified signal, wherein the gain control loop is configured to compare a power level of the third signal and a power level of the fourth signal and control the gain control means based on the result of the comparison, and wherein the gain control loop comprises: a first detector configured to measure a power level of the third signal; a second detector configured to measure a power level of the fourth signal; characterised in that the gain control loop comprises means for scaling an output of the first detector or an output of the second detector, so that the outputs of the first and second detectors are substantially identical when the third and fourth signals have the same power. gain control means for controlling the gain of the input signal; phase control means for controlling the phase of the input signal; a gain control loop configured to control the gain control means based on a power level of the input signal and a power level of an amplified signal output by the power amplifier, to obtain a predetermined gain of the amplified signal; and a phase control loop configured to obtain an error signal related to a phase difference between a first signal derived from the input signal and a second signal derived from the amplified signal, and control the phase control means based on the error signal to obtain a predetermined phase of the amplified signal, wherein the phase control loop is arranged to delay the first signal before obtaining the error signal, such that the delayed first signal and the second signal used to obtain the error signal correspond to the same part of the input signal, wherein the gain control loop is configured to receive a third signal derived from the input signal and a fourth signal derived from the amplified signal, wherein the gain control loop is configured to compare a power level of the third signal and a power level of the fourth signal and control the gain control means based on the result of the comparison, and wherein the gain control loop comprises: a first detector configured to measure a power level of the third signal; a second detector configured to measure a power level of the fourth signal; a first detector configured to measure a power level of the third signal; a second detector configured to measure a power level of the fourth signal; characterised in that the gain control loop comprises means for scaling an output of the first detector or an output of the second detector, so that the outputs of the first and second detectors are substantially identical when the third and fourth signals have the same power. <EOS>