The present invention is generally related to the calibration of electronic circuitry.
A mixer is a device that is designed to receive two frequency signals and combines the signals to generate mixing products at frequencies that are the sum and difference of the received frequencies. In many cases, only one of the mixing products is desired. The other product is referred to as the “image.” Image reject mixers are devices that ideally produce only the sum or difference product, but not both. The implementation of an image reject mixer involves two discrete mixers. The phase of the signals applied to the two mixers is controlled such that, when the two mixer outputs are combined, the desired products of the mixers add constructively and the image products add destructively. In the ideal case, the image is completely cancelled leaving only the desired product.
For image reject mixers, two factors contribute to the degree of image rejection. The first factor is the gain balance between the two discrete mixers within the device. Specifically, if one of the two discrete mixers generates products of greater magnitude than the other mixer, the image products of the two mixers will not completely cancel each other. The second factor is the phase relationship associated with the mixing. Specifically, if there is a phase error in the quadrature phase relationship between the signals driving the mixers, the image output products of the two mixers will not be exactly 180 degrees out of phase and hence will not completely cancel each other.
To achieve a relatively high degree of image rejection, the gain of the discrete mixers and the quadrature angle relationships in an image reject mixer can be calibrated. Typically, an iterative approach is applied in which the gain and the phase relationship are repetitively adjusted and the magnitude of the image is measured. Eventually, operating values defining the gain and phase relationship can be located that substantially null the image product. Additionally, a number of mathematical techniques can be employed to cause the operating values to converge more quickly. These techniques are generally related to “Newton's Method” of root finding in which the derivative of the image product magnitude versus the gain and phase are used to find the null.
Representative embodiments are directed to systems and methods for calibrating electronic circuitry. In one representative embodiment, each operating parameter of the electronic circuitry is adjusted over a plurality of values. The signal component to be nulled is measured during the adjustment over the plurality of values. The selection occurs such that the signal component is not nulled during the measurement process for at least some of the plurality of values. The measurement values and the plurality of values used for the adjustment are provided to a curve fitting algorithm. The curve fitting algorithm is characterized by the response of the electronic equipment to the operating parameters. The curve fitting algorithm calculates optimal operating parameters for the electronic circuitry. By calibrating the electronic circuitry according to the calculated parameters, the signal component will be substantially nulled. Although one embodiment employs a curve fitting algorithm to calibrate an image reject mixer, any suitable electronic circuitry that operates according to a plurality of parameters can be calibrated by embodiments of the invention.
To facilitate the discussion of one representative embodiment, reference is made to image reject mixer 100 of
Image reject mixer 100 receives local oscillator input signal 101 to be mixed with a digitally synthesized signal. Digital frequency synthesizer 102 digitally synthesizes this signal and converts the digital signal into analog form. Digital frequency synthesizer 102 outputs a first version of the signal via line 103-1 and a second version of the signal via line 103-2 (i.e., I and Q channels). The two versions of the signal are out of phase by 90°. The first version of the signal can be either amplified or attenuated by variable gain amplifier (VGA) 105. As shown in
In practice, several adjustments are typically needed. Specifically, the two versions of the LO signal may not be precisely 90° out of phase. QuadDAC 108 provides an analog signal which controls the phase shifter 108-1 in the LO signal path to mixer 104-1. This allows the phase relationship between the LO signals in the two mixers to be adjusted. Also, the gain associated with mixers 104-1 and 104-2 may be unequal. VGA 105 may be used to equalize the gain between mixers 104-1 and 104-2.
As previously discussed, known techniques iteratively vary the gain and phase relationship to converge to a precise calibration. The iterative approach is problematic. Specifically, because the iterative techniques cause the measurement of the image product to converge to a null, multiple measurements are made very close to the null. Accordingly, a requirement of a wide dynamic range is imposed by known techniques upon the measurement mechanism. Furthermore, noise may cause errors in the measurements and lengthen the amount of time to converge to the null. Moreover, if the dynamic range is not sufficiently wide, noise may prevent the algorithm from converging to the null.
In contrast to known techniques, controller 109 does not attempt to converge to a null in an iterative manner. Instead, controller 109 operates mixer 100 according to a plurality of values for the setting of QuadDAC 108 and the gain of VGA 105. Controller 109 measures the resulting signal characteristics (image product and desired product amplitudes) using receiver 112. Based upon the measurements, controller 109 employs a curve fitting algorithm to calculate appropriate phase and gain settings. Only a relatively few number of measurements are taken. Also, the measurements need not be made very close to the null. Accordingly, a wide dynamic range for the measurement mechanism is not required.
To apply a curve fitting algorithm to image reject mixer 100 as shown in
(Image Product Magnitude)2=KRF(1+G2−2G cos(Φ)), (Equation 1)
(Desired Product Magnitude)2=KRF(1+G2+2G cos(Φ)), (Equation 2)
where KRF is a gain constant, G is the gain imbalance (where zero imbalance is represented by G=1), and Φ is the phase error between the I and Q channels.
The values of G and Φ are determined in the calibration process. To compensate for gain imbalance, it is relatively straight forward to determine the proper hardware setting. Specifically, the gain of VGA 105 is set to the reciprocal of G. Compensation for the phase imbalance (Φ) is more complicated. The phase imbalance can be modeled as:
Φ=ΦERROR+KQUAD*QuadDAC Setting,
where ΦERROR and KQUAD are unknown and LO frequency dependent. KQUAD is the sensitivity of the LO phase adjustment means 108-1. For perfect cancellation, Φ must be zero so:
QuadDAC Setting=−ΦERROR/KQUAD.
KQUAD can vary for wide ranges of the QuadDAC setting. Accordingly, the measurements are made by limiting the range of variation in QuadDAC values to values “close” to the correct calibration value to avoid the complication presented by this variation. Measurements are made by setting the gain of VGA 105 and the QuadDAC setting to devitate around the correct calibration parameter. By taking the measurements in this manner, the measurements can be made away from the image product null, lowering the required dynamic range of the measurement mechanism. As a result, noise will have a lesser effect on the calibration process.
It is possible to dispense with KRF because it is common to both the desired product and the image product. Accordingly, the calibration process estimates three unknowns (G, ΦERROR, and KQUAD).
According to one representative embodiment, five measurements are made with different values of QuadDAC. A minimum squared error algorithm is used to determine the values of the unknowns that produce the minimum squared error as characterized by equations (1) and (2). The appropriate value for QuadDAC is determined from KQUAD and ΦERROR. The gain imbalance (G) is not uniquely determined by only varying the QuadDAC setting. Either G or 1/G will be the correct value. Additional measurements using these two values can be made to resolve the ambiguity.
Due to measurement limitations associated with some receiver mechanisms, the gain value generated by the proceeding operations may not be as completely accurate as possible. A gain refinement algorithm may be employed after the proceeding operations to achieve a greater degree of accuracy if appropriate for a particular application. Specifically, the following “residual” gain error can be computed from the suppression generated by the proceeding operations: gRESIDUAL=1±sqrt(image product magnitude/desired product magnitude). One of the values may be selected to further adjust the gain of VGA 105. If the selected value does not improve the image rejection, the other value is known to accurately represent the residual gain error.
In one embodiment, the calibration process is performed for a number of LO frequencies. The calibration parameters determined for the LO frequencies are stored in calibration parameters 111. When a user subsequently selects a LO frequency suitable for a particular application, controller 109 retrieves the corresponding calibration parameters and sets the hardware of mixer 100 accordingly. If calibration parameters are not found for a particular LO frequency, interpolated parameter values may be used.
In step 201, a digital synthesizer is set for continuous wave (CW) operation and the level of the synthesizer is set. In step 202, the IF frequency (fIF) is set equal to 10 MHz. In step 203, the receiver is set for loopback operation and appropriate gain ranging so that it is measuring the output of the mixer.
As previously discussed, it is advantageous to cause the setting of the QuadDAC register to be “close” to the calibration value during the measurement process. Accordingly, each iteration of the flowchart uses the previously calculated calibration value as the “center” value for the next set of measurements. However, during the first iteration, a previous value of QuadDAC is not available. Multiple iterations are performed for the first fLO value to address the unavailability of a prior value of QuadDAC.
To provide the multiple iterations, a logical comparison is made (step 204) to determine whether the iteration of the process flow is the first pass at the first value of fLO. If true, the process flow proceeds to step 205 where the value of QuadDAC is set to 2048 (its midrange value). This initial setting is dependent upon the particular hardware used to implement the digital to analog converstion signal which drives the phase adjustment. If the logical comparison of step 204 is false, the process flow proceeds to step 206 where the value of QuadDAC is set to the value of QuadDACCal associated with the previous iteration of the process flow. QuadDACCal is a variable that holds the value calculated by the curve fitting process for the correct hardware setting of QuadDAC.
In step 207, the LO frequency synthesizer 101 is set to achieve a LO signal frequency of fLO. The variable fLO, the local oscillator frequency, is set to an initial value. The variable fLO is stepped over a range of frequencies to cause the calibration process to be repeated to address the frequency-dependent nature of the image reject mixer. In step 208, multiple measurements of the image rejection are made by setting QuadDAC to the following values: the center value (see steps 205 and 206), the center value±100, and the center value±200. These settings of the phase adjustment parameters depend upon the implementation of the quadrature adjustment means. By varying the settings in this manner, a number of measurements will be made that are not substantially nulled. Accordingly, the calibration will be relatively robust against noise and does not require wide dynamic range.
In step 209, a curve fitting algorithm is performed to calculate ΦERROR, KQUAD, and G. For example, a minimum squared error algorithm may be applied to calculate the respective values. In step 210, the variable QuadDACCal is calculated from: the center value−ΦERROR/KQUAD. The variable ΔLOcal is set to equal G.
In step 211, the image rejection values are measured in association with setting the register QuadDAC to equal QuadDACCal and the gain value ΔLO to equal ΔLOcal and 1/ΔLOcal. In step 212, a logical comparison is made to determine whether ΔLOcal produces a greater amount of image rejection than 1/ΔLOcal. If not, the process flow proceeds to step 213 where the variable ΔLOcal is set to equal the reciprocal. If so, the process proceeds to step 214.
In step 214, the image rejection ratio (r1) is measured by setting QuadDAC to QuadDACCal and ΔLO to ΔLOcal. In step 215, a gain residual variable (gRESIDUAL) is set to equal 1+sqrt(rR1). In step 216, ΔLO is set to equal ΔLOcal*gRESIDUAL. In step 217, the resulting image rejection ratio (r2) is measured.
In step 218, a logical comparison is made to determine which image rejection ratio (r1 or r2) is greater. If rR1 is greater, the process flow proceeds to step 219. In step 219, the variable gRESIDUAL is set to equal 1−sqrt (r1). In step 220, the variable ΔLOcal is set to equal ΔLOcal*gRESIDUAL.
In step 221, a logical comparison is made to determine whether the last frequency of the desired range of LO signal frequencies has been examined. If not, the process flow proceeds to step 222. If the last frequency has been examined, the parameters for the last iteration are stored (step 225) and the process ends (step 226).
In step 222, a logical comparison is made to determine whether the process flow is associated with the first past for the first value of fLO. If so, the process flow returns to step 203 to perform another pass for the first value of fLO to further refine the value of QuadDACcal. If not, the process flow proceeds to step 223. In step 223, the values of QuadDACcal and ΔLOcal are stored as the appropriate calibration parameters for the current value of fLO. In step 224, the value of fLO is incremented by 25 MHz. From step 224, the process flow returns to step 203.
In an alternative embodiment, LO leakage may be addressed in a manner similar to the calibration described in
Although some embodiments have been described in terms of calibrating an image reject mixer, the present invention is not so limited. Other representative embodiments can be used to calibrate any suitable type of electronic circuitry where the mathematical relationship between the calibration adjustment parameters and circuit performance is known, but where coefficients in the relationship (such as gains and offsets) are not. For example,
In step 301 of
By employing a curve fitting algorithm, some representative embodiments enable calibration of electronic circuitry to occur in a relatively efficient manner. Numerous iterations are not required to converge to “optimal” settings. Furthermore, some representative embodiments do not require a relatively large dynamic range on the measurement mechanism used to calibrate the electronic circuitry. Additionally, some representative embodiments perform the calibration process in a manner that is relatively robust to noise in the measurement data.