Gain (antenna)
In electromagnetics, an antenna's gain is a key performance parameter which combines the antenna's directivity and radiation efficiency. The term power gain has been deprecated by IEEE. In a transmitting antenna, the gain describes how well the antenna converts input power into radio waves headed in a specified direction. In a receiving antenna, the gain describes how well the antenna converts radio waves arriving from a specified direction into electrical power. When no direction is specified, gain is understood to refer to the peak value of the gain, the gain in the direction of the antenna's main lobe. A plot of the gain as a function of direction is called the antenna pattern or radiation pattern. It is not to be confused with directivity, which does not take an antenna's radiation efficiency into account. Gain or 'absolute gain' is defined as "The ratio of the radiation intensity in a given direction to the radiation intensity that would be produced if the power accepted by the antenna were isotropically radiated". Usually this ratio is expressed in decibels with respect to an isotropic radiator (dBi). An alternative definition compares the received power to the power received by a lossless half-wave dipole antenna, in which case the units are written as dBd. Since a lossless dipole antenna has a gain of 2.15 dBi,  the relation between these units is . For a given frequency, the antenna's effective area is proportional to the gain. An antenna's effective length is proportional to the square root of the antenna's gain for a particular frequency and radiation resistance. Due to reciprocity, the gain of any antenna when receiving is equal to its gain when transmitting. Gain

Gain is a unitless measure that combines an antenna's radiation efficiency  and directivity D:

Radiation efficiency

The radiation efficiency  of an antenna is "The ratio of the total power radiated by an antenna to the net power accepted by the antenna from the connected transmitter." A transmitting antenna is supplied power by a transmission line connecting the antenna to a radio transmitter. The power accepted by the antenna  is the power supplied to the antenna's terminals. Losses prior to the antenna terminals are accounted for by separate impedance mismatch factors which are therefore not included in the calculation of radiation efficiency. Gain in decibels
Published numbers for antenna gain are almost always expressed in decibels (dB), a logarithmic scale. From the gain factor G, one finds the gain in decibels as:

Therefore, an antenna with a peak power gain of 5 would be said to have a gain of 7 dBi. dBi is used rather than just dB to emphasize that this is the gain according to the basic definition, in which the antenna is compared to an isotropic radiator. When actual measurements of an antenna's gain are made by a laboratory, the field strength of the test antenna is measured when supplied with, say, 1 watt of transmitter power, at a certain distance. That field strength is compared to the field strength found using a so-called reference antenna at the same distance receiving the same power in order to determine the gain of the antenna under test. That ratio would be equal to G if the reference antenna were an isotropic radiator (irad). However a true isotropic radiator cannot be built, so in practice a different antenna is used. This will often be a half-wave dipole, a very well understood and repeatable antenna that can be easily built for any frequency. The directive gain of a half-wave dipole is known to be 1.64 and it can be made nearly 100% efficient. Since the gain has been measured with respect to this reference antenna, the difference in the gain of the test antenna is often compared to that of the dipole. The gain relative to a dipole is thus often quoted and is denoted using dBd instead of dBi to avoid confusion. Therefore, in terms of the true gain (relative to an isotropic radiator) G, this figure for the gain is given by:

For instance, the above antenna with a gain G = 5 would have a gain with respect to a dipole of 5/1.64 ≈ 3.05, or in decibels one would call this 10 log(3.05) ≈ 4.84 dBd. In general:

Both dBi and dBd are in common use. When an antenna's maximum gain is specified in decibels (for instance, by a manufacturer) one must be certain as to whether this means the gain relative to an isotropic radiator or with respect to a dipole. If it specifies dBi or dBd then there is no ambiguity, but if only dB is specified then the fine print must be consulted. Either figure can be easily converted into the other using the above relationship. When considering an antenna's directional pattern, gain with respect to a dipole does not imply a comparison of that antenna's gain in each direction to a dipole's gain in that direction. Rather, it is a comparison between the antenna's gain in each direction to the peak gain of the dipole (1.64). In any direction, therefore, such numbers are 2.15 dB smaller than the gain expressed in dBi. Partial gain
Partial gain is calculated as power gain, but for a particular polarization. It is defined as the part of the radiation intensity  corresponding to a given polarization, divided by the total radiation intensity of an isotropic antenna. The partial gains in the  and  components are expressed as

and

,

where  and  represent the radiation intensity in a given direction contained in their respective  field component. As a result of this definition, we can conclude that the total gain of an antenna is the sum of partial gains for any two orthogonal polarizations. Examples

First example
Suppose a lossless antenna has a radiation pattern given by:

Let us find the gain of such an antenna. First we find the peak radiation intensity of this antenna:

The total radiated power can be found by integrating over all directions:

Since the antenna is specified as being lossless the radiation efficiency is 1. The maximum gain is then equal to:

Expressed relative to the gain of a half-wave dipole we would find:

. Second example

As an example, consider an antenna that radiates an electromagnetic wave whose electrical field has an amplitude  at a distance  That amplitude is given by:
 
where:
  is the current fed to the antenna and
  is a characteristic constant of each antenna. For a large distance  The radiated wave can be considered locally as a plane wave. The intensity of an electromagnetic plane wave is:
 
where 
  is a universal constant called vacuum impedance. and
 
If the resistive part of the series impedance of the antenna is  the power fed to the antenna is  The intensity of an isotropic antenna is the power so fed divided by the surface of the sphere of radius :
 
The directive gain is:
 

For the commonly utilized half-wave dipole, the particular formulation works out to the following, including its decibel equivalency, expressed as dBi (decibels referenced to isotropic radiator):

 
 (In most cases 73.130, is adequate)

 (Likewise, 1.64 and 2.15 dBi are usually the cited values)

Sometimes, the half-wave dipole is taken as a reference instead of the isotropic radiator. The gain is then given in dBd (decibels over dipole):
 0 dBd = 2.15 dBi

Realized gain 
Realized gain differs from gain in that it is "reduced by its impedance mismatch factor." This mismatch induces losses above the dissipative losses described above; therefore, realized gain will always be less than gain. Gain may be expressed as absolute gain if further clarification is required to differentiate it from realized gain. Total radiated power
Total radiated power (TRP) is the sum of all RF power radiated by the antenna when the source power is included in the measurement. TRP is expressed in watts or the corresponding logarithmic expressions, often dBm or dBW. When testing mobile devices, TRP can be measured while in close proximity of power-absorbing losses such as the body and hand of the user. The TRP can be used to determine body loss (BoL). The body loss is considered as the ratio of TRP measured in the presence of losses and TRP measured while in free space. See also
 Antenna
 Antenna measurement
 Antenna effective area
 Cardioid

References

Bibliography
 Antenna Theory (3rd edition), by C. Balanis, Wiley, 2005, 
 Antenna for all applications (3rd edition), by John D. Kraus, Ronald J. Marhefka, 2002, 

Directive Gain
Telecommunications engineering
Engineering ratios