AN-1040 APPLICATION NOTE One Technology Way • P.O. Box 9106 • Norwood, MA 02062-9106, U.S.A. • Tel: 781.329.4700 • Fax: 781.461.3113 • www.analog.com RF Power Calibration Improves Performance of Wireless Transmitters by Eamon Nash INTRODUCTION power in this manner results in some power loss in the transmit path. This directional coupler insertion loss is usually a few tenths of a decibel. Measurement and control of RF power is a critical consideration when designing a wireless transmitter. High power RF amplifiers (PAs) rarely operate in open-loop mode, that is, when the power to the antenna is not in some way monitored. External factors such as regulatory requirements on the amount of power transmitted, network robustness, and the need to coexist with other wireless networks, demand that there be tight control of transmitted power. In addition to these external requirements, precise RF power control can result in improved spectral performance and can save cost and energy in the transmitter’s power amplifier. In wireless infrastructure applications where maximum transmitted power typically ranges from 30 dBm to 50 dBm (1 W to 100 W), the signal coming from the directional coupler is still too strong for the RF detector that will measure it. As a result, some additional attenuation is required between the coupler and the RF detector. Modern rms and non-rms responding RF detectors have a power detection range of anywhere from 30 dB to 100 dB and provide a temperature and frequency stable output. In most applications, the detector output is applied to an analog-to-digital converter (ADC) to be digitized. Using calibration coefficients stored in nonvolatile memory (EEPROM), the code from the ADC is converted into a transmitted power reading. This power reading is compared to a setpoint power level. If there is a discrepancy between the setpoint and the measured power, a power adjustment is made. This power adjustment can be made at any one of a number of points in the signal chain. The amplitude of the baseband data driving the radio can be adjusted, a variable gain amplifier (at IF or RF) can be adjusted, or the gain of the PA can be changed. In this way, the gain control loop regulates itself and keeps the transmitted power within desired limits. It is important to note that the gain control transfer functions of VVAs and PAs are often quite nonlinear. As a result, the actual gain change resulting from a given gain adjustment is uncertain. This reinforces the need for a control loop that provides feedback on changes made and further guidance for subsequent iterations. To regulate its transmitted power, some form of factory calibration of the PA output power may be necessary. Calibration algorithms vary vastly in terms of their complexity and effectiveness. This application note describes how a typical RF power control scheme is implemented and compares the effectiveness and efficiency of various factory calibration algorithms. TYPICAL WIRELESS TRANSMITTER WITH INTEGRATED POWER CONTROL Figure 1 shows a block diagram of a typical wireless transmitter that incorporates measurement and control of transmitted power. Using a directional coupler, a small portion of the signal from the PA is coupled off and fed to an RF detector. In this case, the coupler is located close to the antenna, but after the duplexer and isolator. Their associated power loss is thus factored in during calibration. Directional couplers typically have a coupling factor of 20 dB to 30 dB; therefore, the signal coming from the coupler is 20 dB to 30 dB lower than the signal going to the antenna. Coupling off TO RECEIVER PIN VGA/ VVA HPA DUPL ATTN DAC MICROCONTROLLER OR DSP ADC RF POWER METER RF DETECTOR 08385-001 EEPROM POUT Figure 1. Typical RF Power Amplifier with Integrated Transmit Power Control (An integrated RF power detector provides continuous feedback on the current level of power being transmitted. An external RF power meter can be used along with the RF power detector to calibrate the transmitter.) Rev. 0 | Page 1 of 8 AN-1040 Application Note TABLE OF CONTENTS Introduction ...................................................................................... 1 Calibrating an RF Power Control Loop..........................................5 Typical Wireless Transmitter with Integrated Power Control .... 1 Field Operation of an RF Power Control Loop .............................6 The Need for Factory Calibration .................................................. 3 Postcalibration Errors .......................................................................7 RF Detector Transfer Function ....................................................... 3 Conclusions ........................................................................................8 Rev. 0 | Page 2 of 8 Application Note AN-1040 THE NEED FOR FACTORY CALIBRATION level change, the calibrated on-board RF detector acts like a built-in power meter with an absolute accuracy that ensures that the transmitter is always emitting the desired power within a defined tolerance. In the typical wireless transmitter system previously described, almost none of the components provide very good absolute gain accuracy specifications. Consider the case of a transmit power error target of ±1 dB. The absolute gain of devices such as PAs, voltage variable attenuators (VVAs), RF gain blocks, and other components in the signal chain can vary from device to device to such an extent that the resulting output power uncertainty is significantly greater than ±1 dB. In addition, signal chain gain varies further as the temperature and frequency change. As a result, it is necessary to continually monitor and control the power being transmitted. A factory calibration procedure is described in the Calibrating an RF Power Control Loop section. First, the characteristics of a typical RF power detector should be examined. The linearity and stability over temperature and frequency of the system’s RF detector strongly influence the complexity of the calibration routine and the achievable postcalibration accuracy. RF DETECTOR TRANSFER FUNCTION Figure 2 shows the transfer function of a log-responding RF detector (log amp) vs. temperature exaggerated for illustrative purposes. The log amp transfer function can be modeled using a simple first-order equation within its linear operating range. Three curves are shown: output voltage vs. input power at +25°C, +85°C, and −40°C. At 25°C, the output voltage of the detector ranges from around 1.8 V at −60 dBm input power to 0.4 V at 0 dBm. The transfer function closely follows an imaginary straight line, which has been laid over the trace. Although the transfer function deviates from this straight line at the extremities, note that there are also signs of nonlinearity at power levels between −10 dBm and −5 dBm. Output power calibration can be defined as the transfer of the precision of an external reference into the system being calibrated. A calibration procedure involves disconnecting the antenna and replacing it with an external measurement reference such as an RF power meter, as shown in Figure 1. In this way, the accuracy of a precise external power meter is transferred into the transmitter’s integrated power detector. The calibration procedure involves setting one or more power levels, taking the reading from the power meter and the voltage from the RF detector, and storing all of this information in nonvolatile memory (EEPROM). Then, with the power meter removed and the antenna reconnected, the transmitter is able to precisely regulate its own power. As parameters such as amplifier gain vs. temperature, transmit frequency, and desired output power DETECTOR OPERATING RANGE 2.2 VOUT AT –40°C VOUT AT +25°C VOUT AT +85°C 2.0 1.8 1.6 VOUT (V) 1.4 DETECTOR SLOPE = Y/X X 1.2 Y 1.0 DETECTOR NONLINEARITY 0.8 0.6 0.4 INTERCEPT 0 –65 –60 –55 –50 –45 –40 –35 –30 –25 –20 –15 –10 –5 PIN (dBm) 0 5 10 15 20 08385-002 0.2 Figure 2. Transfer Function (VOUT vs. PIN) of a Log-Responding RF Power Detector with Temperature Drift Exaggerated for Illustrative Purposes Rev. 0 | Page 3 of 8 AN-1040 Application Note A quick calculation suggests that this detector has a slope of approximately −25 mV/dB; that is, a 1 dB change in input power results in a 25 mV change in output voltage. This slope is constant over the linear portion of the dynamic range. Thus, notwithstanding the slightly degraded nonlinearity that was identified at around −10 dBm, the behavior of the transfer function at 25°C can be modeled using the following equation: VOUT = Slope × (PIN − Intercept) where Intercept is the point at which the extrapolated straight line fit crosses the x-axis of the plot (see Figure 2). Therefore, the transfer function of the detector can be modeled using this simple first-order equation. From a calibration perspective, this is useful because it allows the transfer function of the detector to be established by applying and measuring as few as two different power levels during the calibration procedure. Next, consider the behavior of this imaginary detector over temperature. At an input power of –10 dBm, note that the output voltage changes by approximately 100 mV from ambient temperature to either −40°C or +85°C. From the previous calculation of the slope (−25 mV/dB), this equates to a deviation in measured power of ±4 dB, unacceptable in most practical systems. In practice, a detector whose transfer function has minimal drift vs. temperature is needed. This ensures that a calibration procedure performed at ambient temperature is also valid over temperature, allowing the transmitter to be factory calibrated at ambient temperature and avoiding expensive and time-consuming calibration cycles at hot and cold temperatures. If the transmitter is frequency-agile and needs to transmit at multiple frequencies within a defined frequency band, the user must pay attention to the behavior of the detector vs. frequency. Ideally, an RF detector whose response does not change significantly within a defined frequency band should be used. This allows calibration of the transmitter at a single frequency (generally at mid-band) and ensures that there is little or no loss of accuracy as the frequency changes. Table 1 shows the detection ranges and temperature stability of various rms and non-rms responding detectors from Analog Devices, Inc. Table 1. RMS and Non-RMS Responding RF Power Detectors Device AD8317 AD8318 AD8319 ADL5513 ADL5519 AD8361 ADL5501 AD8362 AD8363 AD8364 Max Input Frequency (GHz) 10 8 10 4 10 2.5 6 3.8 6 2.7 Dynamic Range (dB) 55 70 45 80 62 30 30 65 50 60 Temperature Drift (dB) ±0.5 ±0.5 ±0.5 ±0.5 ±0.5 ±0.25 ±0.1 ±1.0 ±0.5 ±0.5 Package 2 mm × 3 mm 8-lead LFCSP 4 mm × 4 mm 16-lead LFCSP 2 mm × 3 mm 8-lead LFCSP 3 mm × 3 mm 16-lead LFCSP 5 mm × 5 mm 32-lead LFCSP 6-lead SOT-23, 8-lead MSOP 2.1 mm × 2 mm 6-lead SC-70 6.4 mm × 5 mm 16-lead TSSOP 4 mm × 4 mm 16-lead LFCSP 5 mm × 5 mm 32-lead LFCSP Rev. 0 | Page 4 of 8 Comments Non-rms log detector Non-rms log detector Non-rms log detector Non-rms log detector Dual non-rms log detector Linear in V/V rms detector Linear in V/V rms detector RMS log detector RMS log detector Dual rms log detector Application Note AN-1040 SET RF POWER TO MAX POWER (APPROXIMATELY) MEASURE CODE FROM RF LOG DETECTOR ADC (CODEHIGH) USE RF POWER METER TO MEASURE POWER AT ANTENNA CONNECTOR (PWRHIGH) (UNIT = dBm) SET RF POWER TO MIN POWER (APPROXIMATELY) MEASURE CODE FROM RF LOG DETECTOR ADC (CODELOW) USE RF POWER METER TO MEASURE POWER AT ANTENNA CONNECTOR (PWRLOW) SLOPE = (CODEHIGH – CODELOW)/(PWRHIGH – PWRLOW) (UNIT = CODES/dB) STORE SLOPE AND INTERCEPT IN NONVOLATILE RAM 08385-003 INTERCEPT = PHIGH – (CODEHIGH/SLOPE) Figure 3. Simple Two-Point Calibration Procedure to Calibrate a Transmitter with an Integrated Log Detector CALIBRATING AN RF POWER CONTROL LOOP Figure 3 shows the flowchart that can be used to calibrate a transmitter similar to the one shown in Figure 1. This simple and quick two-point calibration is useful where power levels need to be set only approximately (but must be measured precisely). For this calibration to be effective, the integrated RF detector must be stable vs. temperature and frequency and must have a predictable response that can be modeled using a simple equation. Ensure that the operating power range of the transmitter maps comfortably into the RF detector’s linear operating range. To begin, remove the antenna and connect the power meter to the antenna connector. Next, set an output power level close to maximum power. The power at the antenna connector is measured by the power meter and is sent to the transmitter’s onboard microcontroller or digital signal processor (DSP). At the same time, the RF detector ADC is sampled and its reading is provided to the transmitter’s processor. Next, reduce the output power of the transmitter to a level that is close to minimum power and repeat the procedure (measure power at the antenna connector and the sample RF detector ADC). With these four readings (low and high power level, low and high ADC code), the slope and intercept can be calculated (see Figure 3) and stored in nonvolatile memory. Rev. 0 | Page 5 of 8 AN-1040 Application Note DETERMINE DESIRED OUTPUT POWER (PSET) SET OUTPUT POWER-BASED ON BEST FIRST GUESS ENSURING THAT (POUT < PSET) MEASURE CODE FROM RF LOG DETECTOR ADC (CODEOUT) CALCULATE TRANSMITTED POWER POUT = INTERCEPT + CODEOUT/SLOPE IS ABS |PSET – POUT| ≤0.5dB YES NO POUT < PSET DECREMENT VGA GAIN BY APPROXIMATELY 0.5dB 08385-004 POUT > PSET IS POUT > PSET OR IS POUT < PSET INCREMENT VGA GAIN BY APPROXIMATELY 0.5dB Figure 4. Operation of Transmitter After Calibration FIELD OPERATION OF AN RF POWER CONTROL LOOP Figure 4 shows the flowchart that can be used to precisely set power in a transmitter after calibration. In this example, the goal is to have a transmit power error that is less than or equal to ±0.5 dB. Initially, an output power level is set based on a best first guess. Next, the detector ADC is sampled. The slope and intercept are retrieved from memory and the transmitted output power level is calculated. If the output power is not within ±0.5 dB of PSET, the output power is incremented or decremented by approximately 0.5 dB using a voltage variable attenuator (VVA). The term approximately is used because the VVA may have a nonlinear transfer function. The transmitted power is again measured and further power increments are applied until the transmitted power error is less than ±0.5 dB. When the power level is within tolerance, it is continually monitored and adjusted if necessary. For example, if the gain of a component in the signal chain drifts with changing temperature, the loop is activated when the measured power goes outside its ±0.5 dB setpoint range. Other variations on this algorithm exist. For example, if it is desirable to keep the output power as low as possible but still no more than 0.5 dB from the setpoint, a different approach must be taken. In this case, the first power setting is at a level that is below the desired power level (and outside the tolerance). The loop then measures the power but setpoint increments are much smaller, for example, +0.1 dB. In this way, the output power always approaches the setpoint from a value that is less than the setpoint. As soon as it enters the −0.5 dB band, power increments stop. This ensures that the actual level is always below the setpoint level while still being within tolerance. Rev. 0 | Page 6 of 8 Application Note AN-1040 2.2 2.5 2.2 2.0 2.0 1.8 1.5 1.8 1.5 1.6 1.0 1.6 1.0 1.4 0.5 1.4 0.5 1.2 0 1.0 –0.5 0.8 –1.0 –1.5 –2.0 2.0 VOUT AT –40°C VOUT AT +25°C VOUT AT +85°C ERROR AT –40°C ERROR AT +25°C ERROR AT +85°C 2.5 VOUT AT –40°C VOUT AT +25°C VOUT AT +85°C ERROR AT –40°C ERROR AT +25°C ERROR AT +85°C 2.0 VOUT1 0.6 –1.5 0.6 0.4 –2.0 0.4 0.2 –65 –60 –55 –50 –45 –40 –35 –30 –25 –20 –15 –10 –5 PIN2 PIN (dBm) 0 5 INTERCEPT PIN1 0.2 –65 –60 –55 –50 –45 –40 –35 –30 –25 –20 –15 –10 –5 PIN1 Figure 7. Two-Point Calibration with Calibration Points Close Together Provides Improved Accuracy over a Narrow Range 2.2 2.0 2.0 1.8 1.5 1.8 1.5 1.6 1.0 1.6 1.0 1.4 0.5 1.4 0.5 1.2 0 1.2 0 1.0 –0.5 1.0 –0.5 0.8 –1.0 0.8 –1.0 ERROR AT –40°C ERROR AT +25°C ERROR AT +85°C VOUT (V) 2.0 VOUT (V) 5 2.5 VOUT AT –40°C VOUT AT +25°C VOUT AT +85°C ERROR (dB) 2.2 –2.5 0 PIN (dBm) PIN2 Figure 5. Two-Point Calibration with Calibration Points in Linear Operating Range of Detector Provides Good Overall Performance 2.5 VOUT AT –40°C VOUT AT +25°C VOUT AT +85°C ERROR AT –40°C ERROR AT +25°C ERROR AT +85°C 2.0 –1.5 0.6 –1.5 0.4 –2.0 0.4 –2.0 0.2 –65 –60 –55 –50 –45 –40 –35 –30 –25 –20 –15 –10 –5 –2.5 0.2 –65 –60 –55 –50 –45 –40 –35 –30 –25 –20 –15 –10 –5 0.6 ERROR (dB) –1.0 08385-007 –0.5 0.8 VOUT2 ERROR (dB) 1.0 VOUT (V) 0 08385-005 VOUT1 1.2 ERROR (dB) VOUT (V) VOUT2 58dB DYNAMIC RANGE PIN (dBm) Figure 6. Moving Calibration Points Apart and into Less Linear Operating Range Extends Operating Range but at the Cost of Degraded Accuracy –2.5 0 5 PIN (dBm) 08385-008 5 08385-006 0 Figure 8. Multipoint Calibration Extends Detector Range and Can Improve Linearity but at the Cost of a More Complex Calibration Procedure POSTCALIBRATION ERRORS Figure 5 to Figure 8 show data from the same RF detector but use a different choice and number of calibration points. Figure 5 shows the detector transfer function at 2.2 GHz for the AD8318, a wide dynamic range RF log detector that operates up to 8 GHz. In this case, the detector has been calibrated using a two-point calibration (at −12 dBm and −52 dBm). When calibration is complete, the residual measurement error can be plotted. Note that the error is not zero, even at the ambient temperature at which calibration was performed. This is because the log amp does not perfectly follow the ideal VOUT vs. PIN equation (VOUT = Slope × (PIN − Intercept)), even within its operating region. The error at the −12 dBm and −52 dBm calibration points is, however, equal to zero by definition. Figure 5 also includes error plots for the output voltage at −40°C and +85°C. These error plots are calculated using the 25°C slope and intercept calibration coefficients. Unless a temperature-based calibration routine is implemented, the 25°C calibration coefficients with slight residual temperature drift must be used. In many applications, it is desirable to have higher accuracy when the PA is transmitting at its maximum power. This makes sense from a number of perspectives. First, there may be regulatory requirements that demand this higher level of accuracy at full or rated power. However, from a system design perspective, there is also value in increased accuracy at rated power. Consider a transmitter that is designed to transmit 45 dBm (approximately 30 W). If calibration can at best provide accuracy of ±2 dB, then the PA circuitry (power transistors and heat sinks) must be designed to safely transmit as much as 47 dBm or 50 W. This constitutes a waste of money and space. Instead, a system where the postcalibration accuracy is ±0.5 dB can be designed so that the PA must be overdimensioned only to safely transmit 45.5 dBm or approximately 36 W. By changing the points at which calibration is performed, the achievable accuracy can in some cases be greatly influenced. Figure 7 shows the same measured data as Figure 5 but using different calibration points. Notice how the accuracy is very high (about ±0.25 dB) from −10 dBm to −30 dBm in Figure 7. Rev. 0 | Page 7 of 8 AN-1040 Application Note However, accuracy falls off at lower power levels further away from the calibration points. Figure 6 shows how calibration points can be moved to increase dynamic range at the expense of linearity. In this case, the calibration points are −4 dBm and −60 dBm. These points are at the end of the device’s linear range. Once again, an error of 0 dB at the calibration points at 25°C can be seen, and the range over which the AD8318 maintains an error of <±1 dB is extended to 60 dB at 25°C and 58 dB over temperature. The disadvantage of this approach is that the overall measurement error increases, especially in this case at the top end of the detector’s range. Figure 8 shows the postcalibration error using a more elaborate multipoint algorithm. In this case, multiple output power levels (separated by 6 dB in this example) are applied to the transmitter and the detector’s output voltage at each power level is measured. These measurements are used to break the transfer function down into segments, with each segment having its own slope and intercept. This algorithm tends to greatly reduce errors due to detector nonlinearity and leaves temperature drift as the main source of errors. The disadvantage of this approach is that the calibration procedure takes longer and more memory is required to store the multiple slope and intercept calibration coefficients. Figure 8 illustrates an interesting difference between the behavior of the power detector at the low and high ends of its dynamic range. Although multipoint calibration extends the high end dynamic range, this range extension is not very useful because of the increased temperature drift. Notice how the ambient, hot, and cold traces diverge above −10 dBm. At low power levels, the result is more useful. Again, the multipoint calibration helps to extend the low end dynamic range. However, in this case, the hot and cold traces closely track the ambient trace, even as it becomes nonlinear. So when this nonlinearity has been removed using multipoint calibration, this calibration holds up very well over temperature. This usefully extends the transfer function of the AD8318 down to −65 dBm. CONCLUSIONS In applications where accurate RF power transmission is required, some form of system calibration is necessary. Modern IC-based RF power detectors have linear responses and are temperature and frequency stable. This can significantly simplify system calibration and can provide a system accuracy of ±0.5 dB or better. The placement and number of calibration points can have a significant effect on the achievable postcalibration accuracy. ©2009 Analog Devices, Inc. All rights reserved. Trademarks and registered trademarks are the property of their respective owners. AN08385-0-12/09(0) Rev. 0 | Page 8 of 8