Origins and minimization of intermodulation distortion in a pseudo-differential CMOS beamforming receiver

This paper studies how nonlinear distortion is generated in the combination of an inverter-based low-noise amplifier and a passive mixer. The dominant nonlinearity appears to be the quadratic VgsVds\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$V_{gs}V_{ds}$$\end{document} mixing term in the passive mixer that first causes low-frequency IM2 and then upconverts it to IM3. Adding a common-mode feedback (CMFB) cancels the IM2 in a pseudo-differential structure, and hence also reduces the IM3 caused by the cascaded second order nonlinearities significantly. The effect of CMFB gain, bandwidth and linearity were analyzed, and it is concluded that from the linearity point of view, the feedback circuit does not have to be very wideband since the dominant distortion products originate from baseband. Finally, the paper takes a look at the spurious tones rising in the mixing, and how to extend the analysis to include the actual frequency translation effect.


Introduction
The current trend of ever-increasing data rates has imposed the need for millimeter-wave range communication systems, which in turn require parallelism as a means of providing filtering, beam-steering, and most importantly keeping up with the data rate speed and improving the overall throughput. Much interest has been devoted to analyzing the linear properties (gain, noise, beam pattern) of highly parallel systems, but studying their nonlinearity has been less frequent [1,2]. This paper focuses on the nonlinearity analysis of the circuit blocks in the 3 GHz IF section of a beamforming receiver architecture proposed in [2,3].
Inverter-based LNAs are quite common in literature. Applying the Cherry-Hooper structure [4] and splittingload inductive peaking [5] are popular methods for extending the bandwidth of the LNA stage. Some distortion cancellation methodologies have also been reported, e.g. the use of active [6] or passive [7] feedback to reduce IM2 and hence IM3. Also, envelope-dependent adaptive biasing has been used to minimize power dissipation in ISM applications [8].
This work studies the linearity properties of a 3 GHz receiver IC shown in Fig. 1. The implementation is inductorless due to the multitude of channels and consists of basic inverter-based LNAs, passive mixers, phase control switches, and eventually a summing point in a baseband transimpedance amplifier. The LNA structure is chosen to be as simple as possible to keep the circuit compact and still give sufficient bandwidth. The circuit structures for analysis have been taken from [3], but due to limitations in technology access, the device characteristics and comparisons to simulations have been performed using a different IC process. Hence, the performance is not an exact match to [3].
The linearization of receiver front-ends, particularly LNAs, has been the focus of several papers, from calculative approaches to minimize distortion [9] to newer distortion analysis methodologies [10][11][12][13] and circuit-based techniques [14][15][16][17][18]. Chen et al. [9] utilizes the calculation of Volterra kernels to achieve the criteria for IM2 cancellation and prevent it from mixing into IM3 in a broadband inductorless LNA. Deriving the Volterra expressions by hand analysis is still popular, but unfortunately very complicated and time-consuming. Solving the higher-order derivatives needed in the series expansion is also difficult, unless the device models are simplified. Simpler Volterrabased approaches have been proposed, such as splitting the nonlinear transistors to a linear component with a nonlinear drain current source, namely per-distortion nonlinearity analysis [10], combining Volterra and multisine analyses [11], and harmonic distortion analysis in feedback amplifiers [12]. Li and Pileggi [10] manages to decrease complexity by lumping all the contributions from one device together, but cannot separately identify their causes. Borremans et al. [11] gives better insight on the distortion contributions and is able to deal with strong nonlinearities unlike [10] but is still somewhat complex. Palumbo and Pennisi [12] is a block-diagram analysis based on transfer functions, providing analytical insight into the frequency behavior of the related closed-loop distortion factors, but no formulation of P 1ÀdB and intermodulation distortions [13]. In [13], a general weak nonlinearity model is proposed for LNAs as an effort to facilitate design automation and avoid repeating the analysis for each topology. The model is still specific to LNAs and yields closed-form expressions for the circuit IM2 and IM3 without much discussion on their originating mechanisms. There are also many papers that have come up with circuit innovations to cancel distortion with less emphasis on the analytical part. The most widespread of these include optimizing the overdrive voltage [14], using pre-distortion [15] or postdistortion networks [16,17], and derivative superposition methods [18]. As for the mixer part, since passive mixers are more linear, fewer studies have been devoted to linearizing them. However, general linearity analysis of passive mixers has been investigated in studies such as [19,20].
In this paper, the nonlinear current injection method introduced by [21, 22] and extended in [23] is used. To handle the complexity, the results are calculated numerically and visualized as vector contributions. The approach used in this paper differs from the above in a few ways. First, the products of both capacitive and conductive nonlinear effects are included, and nonlinearities can be separated by origin. Moreover, band-to-band mixing mechanisms are accounted for, specifically the mixing from the second order nonlinearities to cubic terms which is of interest here. Finally, instead of analytical high order derivatives, numerical fitting is used to build the polynomial models. To the authors' knowledge, an analysis like this (building the distortion contributions systematically using a software tool based on an interpretation of Volterra analysis) on a receiver branch has been done for the first time in literature. The same approach has been employed previously on simpler circuits with a smaller number of weakly nonlinear components [23][24][25]. We are taking it a step further by utilizing it in an LNA-feedback-mixer combination, tackling different levels of nonlinearity at the same time.
The paper is organized as follows: Sect. 2 gives an overview of the analysis technique. Sections 3 and 4 introduce the modeling and analysis of a single transconductance stage respectively, and Sect. 5 includes the passive mixer in the analysis. The effects of the commonmode feedback are studied in parallel in Sects. 4 and 5. CMFB gain and bandwidth considerations are investigated in Sect. 6. Including the frequency translation effects is discussed in Sect. 7, and finally, a discussion is given in Sect. 8.

Distortion contribution analysis
The use of polynomial models for calculating frequency translations and employing nonlinear current injection to model the nonlinear effects are well known [21]. In our previous research, we have extended it so that not only the total nonlinearity is given, but any tone phasor can also be plotted as a sum of contributions per device, per device's nonlinear source, and per mixing between the harmonic bands. In this study, we used the MATLAB tool NLSim [24]. To show all the contributions listed above, it needs the device polynomial modeling to be fitted offline based on the DC sweeps of currents and capacitance values.
The nonlinear current sources need to have several controlling ac voltages. For example, the drain current model of a MOS device is written as (1): where i and j are the degree of the nonlinearity taken into account. The coefficients K ij can be found in several ways.
Here, a simple least-square error fit has been used over a  Internally, the calculation progresses so that the linear parts are used to calculate the first order node voltages. Using them, the second order distortion currents are calculated, and the node voltages are again obtained from those. This procedure is repeated until the fifth order.
Results can be interpreted by keeping in mind that the total distortion in a given node is first plotted as contributions from different devices, and then the results are further plotted as functions of nonlinearity order and harmonic-to-harmonic mixing per device. For example, IM3 may be generated due to the cubic nonlinearity K 30 , or the quadratic mixing in K 20 between the fundamental and IM2 in baseband and the second harmonic band [25]. This will be further elaborated in the following sections.

Nonlinear model of the transconductance amplifier
The overall structure under analysis is shown in Fig. 2. M1-M4 form the transconductance stage, M5-M8 are passive mixer transistors, and M9-M10 provide the common-mode feedback. We will start the analysis with the transconductance (gm) stage, and add the subsequent stages step by step. A CMOS inverter with shunt feedback and rather low-ohmic load is used as a transconductance amplifier to transform input voltage into current. Working in current mode improves linearity by reducing the voltage swings and makes it possible to perform gain control by summing up parallel branches. The circuit is dimensioned for a 1.5 V supply and 3 GHz center frequency.
As an example, Fig. 3 shows the input voltage related coefficients K 10 , K 20 , K 30 of a CMOS inverter-based gm element in terms of the operating point. Curves are calculated for similar-shaped nMOS and pMOSes and at several input amplitude values (increasing the amplitude makes the peaks flatter). It is seen that the nonlinearity is highest around the MOS threshold voltages and minimized in the center. K 10 (the linear gain) doubles when both devices are on. Summing up the two transistors' currents causes several minima to appear (zero-crossings are marked with o's in the figure), which keeps K 20 and K 30 small in the mid-bias range. Therefore, the bias can be chosen anywhere in the range Vin = 0.4...0.6, where either a distortion minimum or possible cancellations between two similar but differently biased branches can be achieved.

Transconductance stage nonlinearity analysis
The simulations illustrate that the amplifier itself is very linear. A 10 mV input was given in the two-tone test simulation setup, and the signal magnitudes at the gate and drain were -49 dBV and -32 dBV (all spectral measurements are from a two-sided spectra, so the values should be multiplied by two to get the amplitudes). The IM3 voltage in the output node was -124.2 dBV. The use of common-mode feedback (CMFB) did not affect IM3, but it did reduce the IM2 from -80 to -89.8 dBV. This is due to the fact that even order nonlinearities appear as a common mode signal in differential structures, so the CMFB senses and attenuates them proportionally to the loop gain. In the case of the standalone gm, both IM3 and IM2 are already very low, and the effect of the CMFB will be clearer in the combination of a gm and mixer. The improvements in nonlinearity are also easily seen by traditional numerical harmonic balance or pss simulation. However, the advantage of polynomial modeling is that it enables us to see which nonlinearity contribution is dominant, and how the inherent cancellation mechanisms are formed. This is illustrated by a vector plot where any higher order IM tone can be plotted, as shown in Fig. 4. Reading the vector plots requires following some notations: The vector ''Total'' illustrates the magnitude and phase of the chosen IM tone similar to what we see in e.g. harmonic balance simulation, while the other vectors demonstrate how it is built from contributions of different nonlinearities. The contributions are labeled with their source (e.g. gmm3 is the drain current response of transistor M3) and the degree of nonlinearity [K ij refers to term Finally, the last label indicates from which harmonic band the mixing is happening, such as baseband or second harmonic. For better visibility, the contributions smaller than a certain value are not plotted.
According to Fig. 4, the cubic vgs-related nonlinearities (the K 30 terms) of transistors M3 and M4 clearly dominate IM3 in the output node. There are also some cascaded second-order mixing results (resulting from baseband (BB) or second harmonic (H2) band signals mixing to IM3). Although they are small in value, an interesting conclusion can be derived from the fact that the effects of nMOS and pMOS (gmm3k11O2BB and gm4k11O2BB) are cancelling each other. Since Early voltage is modeled with the K 11 v gs v ds term, this cancellation suggests that a low Early voltage does not degrade the linearity of an inverter stage, i.e. the inverter linearity is not very sensitive to Early voltage variations.
For comparison, Fig. 5 shows the results from pss analysis in Cadence Spectre corresponding to Fig. 4. It gives an input-referred third-order intercept point (IIP3) of -5.09 dB, which agrees with the value from the MATLAB simulations.

Mixer stage nonlinearity analysis
The next stage to be studied is the mixer block. A passive mixer structure is commonly used due to its high linearity, high voltage headroom, low power consumption and good  Vector plots for IM3 voltage in the standalone differential gm stage 1/f noise performance. We start the nonlinearity analysis at its simplest with a single transistor biased in the triode region and acting as a pass switch, which is continuously on during the analysis. The procedure here resembles the one in [20], but is done numerically using the nonlinear current injection technique instead of closed-form kernel derivations. Also, we are including the effect of the common-mode feedback.
The DC fitting is done through the same procedure as described in Sect. 2, but now the device is in the triode region. Thus, the dominant nonlinearity in the nMOS switch is the fact that the voltage v in directly modulates the gate-source voltage and on resistance. Expanding the classical second order I-V equation we obtain an ac model of the form (2): where the last K 11 term is usually dominant. The device also produces another second order mixing (K 02 ), which is not the desired RF mixing but a nonlinear effect that appears while the switch is conducting. The actual mixing effect is studied later in Sect. 7. The first analysis case consists of a single gm and mixer pass-transistor without the common-mode feedback. As seen in Fig. 2, the simple single-transistor mixer has been extended to a balanced structure now. The input is again a 10 mV two-tone, giving -32 dBV in the output of the gm stage. Now, the IM3 tones are some 40 dB higher than the case of a standalone gm element. To see what causes this, we need to look at the details of Fig. 6, which shows the IM3 contributions in the output of the gm element at node A in Fig. 2.
The vector plot shows all contributions from all the eight nonlinear devices M1-M8, and the dominant contribution seems to be the mixer transistor M8, where both the Ids curvature (K 02 v 2 ds ) and the modulation of the on-resistance (K 11 v gs v ds ) show strong but partially compensating contributions. These effects are again cascaded effects, generating IM2 voltages in the nodes around the mixer, and then mixing it further to IM3. Hence, these contributions can be reduced by filtering away the generated IM2 tones (baseband and second harmonic bands) at the drain and source terminals of the mixer transistor. Alternatively, as filtering consumes too much area, one can reduce the switch on resistance to minimize the v ds magnitude. For instance, Akbar et al. [3] achieves this by employing LO bootstrapping to increase the gate drive.
The effect of the common-mode feedback is illustrated in Fig. 7, neglecting the nonlinearity of the CMFB transistors. Now, the feedback loop senses the generated IM2 and reduces its level from -55 to -79 dBV. Now that there is less signal to mix with the fundamental tones, the IM3 reduces from -80 to -120 dBV. The quadratic   Fig. 7. Yet, the overall IM3 is still dominated by second-order mixing in M8 (terms gmm8k11OBB and gm8k11OH2), which is harvesting IM2 tones from both the baseband and second harmonic band. Figure 8 demonstrates the IIP3 result of the pss simulation corresponding to the gm-mixer combination with the common-mode feedback, which is again consistent with the MATLAB results.

The effects of CMFB bandwidth and linearity
The choice of gain and bandwidth of the common-mode feedback circuit is the next thing to be considered. The CM-correcting pMOS devices function as parallel loads for the CM signal, and to be effective, the total common mode impedance they introduce should be noticeably smaller than the existing common-mode output impedance between the two transconductance and mixer stages. Hence, we can either make the pMOSes smaller and compensate that by increasing the gain or vice versa. There is not much difference between these two choices considering the linear signal only, although big devices change the biasing and loading of the inverter stage (which is why keeping them small is preferred). However, the situation is more complex from distortion point of view. In addition to the linear common mode signal, any second order distortion in the amplifier and mixer is also seen as a common mode signal, and attenuating them is beneficial as seen above. Yet, there are two second order bands: the rectified signal near DC, and the second harmonic band. This is where the bandwidth of the CMFB circuit comes into play. From the linear signal point of view, the most narrowband solution is to correct just the dc offsets. However, if we aim at correcting amplitude mismatches e.g. due to a driving balun, the CMFB loop should have a bandwidth exceeding the carrier frequency. Therefore, we consider three different bandwidths which include only the beat frequency (100 kHz), the carrier frequency (3 GHz), and the second harmonic band (6 GHz). The beat frequency is chosen arbitrarily, and as the main circuit in [3] supports a baseband bandwidth of over 400 MHz, it can also be pushed further. Results are presented in Table 1 assuming both opposite-phased (Diff) and in-phase (CM) inputs, and a third case where a 10% amplitude mismatch is introduced between the differential inputs. The differential input is how the circuit is actually used, CM input is only shown to  illustrate the common-mode rejection, and the last case illustrates a more practical case, as presuming perfect symmetry in simulations often hides some of the effects seen in reality. The op-amp gain is 25 dB in all examples, but since the gain is interdependent on the pMOS nonlinearities, we will get back to its effects once they are included. Table 1 suggests that increasing the CMFB bandwidth from 100 kHz to 3 GHz does not have a significant impact on the distortion cancellation, and the 3 GHz and 6 GHz cases are almost similar. To elaborate this, let's take another look at Figs. 6 and 7: as seen in Fig. 6, the dominant cause of IM3 is the up-conversion of the baseband IM2 result gmm8k11O2BB, while the second harmonic products (ending with H2) are smaller and already cancelling each other to some extent. The same pattern is seen in Fig. 7 as well. So, even a narrowband CMFB can yield a considerable improvement in IM3. Although further increase in bandwidth helps to reduce the second order tones in the second harmonic band, it does not matter much if the bandwidth covers fundamental or second harmonics; the loop gain is sufficient in either case. This means that the CMFB circuit in this setup does not have to be very complex or capable of working at high frequencies to give satisfying results, as the improvement from Figs. 6 and 7 with the narrow-band op-amp CMFB in Fig. 2 also confirms.
The above discussion emphasizes the linearity of the feedback devices itself, as any nonlinearity originated in the feedback loop input is not attenuated by the loop. We have assumed completely linear devices in the CMFB loop in the previous sections, but it would be interesting to see if the nonlinearity of the controlling pMOSes has a significant impact on the results and how it can be relaxed by the choice of gain and bandwidth. Since the signal amplified by the loop drives the feedback devices, the combination of high gain and small devices (which was our design choice for the linear response) means that the nonlinearity will also be amplified. So, if this signal is large enough, the feedback loop must be strictly linear to maintain its positive effect. Luckily, the mentioned signal is not the input RF signal, but just the small common-mode error in it, in addition to small IM2 components. Hence, the nonlinearity effect of the CMFB amplifier is mitigated to the point that it does not cause problems. The three cases given in Table 1 are simulated again with nonlinear feedback devices, and the results given in Table 2 are in agreement with this conclusion. As seen from Table 2, IM3 increases by a maximum of 9 dB in the differential input and 14 dB in the mismatched input case, which is not slight, yet low compared to the 30 dB cancellation we still have. The performance degradation is worse at higher frequencies and in the mismatched case, which is also anticipated: the linearity of the feedback path matters if the feedback transistors can mix IM2 to IM3. This is illustrated if we have a mismatched condition where there is also a fundamental common-mode signal, as in the mismatched case. However, a 10% mismatch is still so small that the resulting deterioration in the total IM3 will not be significant (3-5 dB).
Finally, the effect of op-amp gain is studied and three cases with 15 dB, 25 dB and 35 dB gain are compared in Table 3 (the bandwidth is kept at 100 kHz). The linear signal and IM2 are fixed at À 33.4 dB and À 78 dB, respectively. It is found that solely increasing the gain improves distortion cancellation, but this changes when the controlling pMOS sizes and nonlinear coefficients are scaled in proportion to the gain. (Note that the 25 dB gain case is taken as a standard, and the pMOSes in the other two cases are scaled with respect to it). In this case, the effect is positive from 15 to 25 dB, but detrimental from 25 to 35 dB. This is due to the fact that, as explained previously, the pMOS nonlinearities are amplified by this gain and could become effective past a certain gain value. We can conclude that sizing the pMOSes based on constant overall gm and choosing the gain accordingly is the best option, but increasing the gain further may make the distortion in the feedback loop visible.

Modeling the frequency conversion
So far, the analysis has not assumed any mixing effectinstead, the mixer has been considered as a pass transistor with a fixed and high gate bias. Adding the actual mixing could give rise to new and significant spurious tones that may affect the overall distortion. However, the used distortion contribution analysis tool does not easily bode with the inclusion of mixing effects. In this section, we will present analyses on what is expected to happen and discuss the technical modeling problems and some practical findings.

Ways to include mixing in the distortion contribution analysis
We have explored three alternatives to implement the mixer in our nonlinearity analysis tool. One is to employ the spectral presentation of the time-varying mixer gain, as traditionally done in analyzing mixers. Typically, this demands solving the frequency translating terms and then copying the circuit multiple times for different frequencies, as in [27], which makes the impedance matrix representing the circuit significantly larger. It may also be complicated to fit into the distortion contribution analysis since it might require injecting higher order signals, while our tool builds the distortion products order by order. The second option is to model the mixer behaviorally. There are several ways to do this, but the most straightforward would be to perform the mixing numerically somewhere outside the device and inject the mixed signal externally. This makes the device a pass transistor again, limiting its function to a non-mixing nonlinear device. Fitting would not be troublesome in this scenario, since it is fitted in exactly the same way as before. Nevertheless, modeling the external injection could cause complications, such as having to break down the circuit in a somewhat similar way to time-variant fitting.
Lastly and most simply, we could model the mixer in the same way as its circuit implementation, feeding LO to the device gate and RF to its source. This imposes a largesignal fit that covers two operating regions as opposed to the small signal fit done in Sect. 5. Implementing the mixer as a large-signal nonlinearity would be appealing in the sense that it would cause no changes in the current NLSim analysis flow nor any added circuit complexity, and would easily lend itself for modeling the effects of the nonlinear capacitances in the mixer as well. The idea is also backed up in [28], which shows that a time-invariant nonlinearity fitted on large enough range has almost the same modeling strength as a time-varying one. Hence, we have proceeded with this method in the remainder of the paper.

The spectral effects of the mixing
Before diving into the modeling details, it would be helpful to give a circuit analysis of the spectral effects a real mixer could add and discuss the changes it would bring to our previous analysis. This will give us insight on what is really occurring in the circuit and clarify what to expect from the large-signal modeling of the mixer. As the passive mixer is notoriously leaky between the RF and IF ports (described in e.g. [26]), additional spectral components will sum up into RF. If strong enough, they may easily affect the total amount of distortion.
A passive mixer can be understood as a switch that is either on or off with the frequency of the LO signal and a duty cycle D. The periodic LO waveform can be written as its Fourier components, and if D = 50%, the dominant spectral components of a two-sided spectrum of the 0/1 gating function are XðÀf LO Þ ¼ 1=p, Xð0Þ ¼ 0:5, and Xðf LO Þ ¼ 1=p, where XðÀf LO Þ and Xðf LO Þ are the negative and positive LO spectral components. In the balanced mixer, we would have components with the same magnitude, but a phase shift of 180 degrees in the fundamentals.
Assuming pass transistor on-conductance of g on , the down-conversion gain will be Xðf LO Þ Á g on , while leakage from both RF to output and IF to input is Xð0Þ Á g on . This causes the IF to appear in the RF port of the mixer, where it will be an additional signal in the distortion contribution analysis and a relatively strong interferer in a single-ended mixer. However, if the mixer is balanced as shown in Fig. 9, the Xðf LO Þ gain terms of the two mixers will be in opposite phases, causing the back-propagating IF terms to cancel each other in the mixer input port. This is how IF leakage cancels out in the input node of a balanced mixer, as illustrated in the figure.
The mixer is still nonlinear. The IM3 it generates on the input side will be mixed to the output side, and the second harmonic of the IF will leak back to the RF side and sum up there coherently. Hence, though it is not cancelled, it is smaller than the IF leakage in power and appears as a common-mode signal in the pseudo-differential structure, in which case the common mode feedback helps in cancelling it. Therefore, a dramatic change to the previous analysis is not to be expected, although including the real mixing effect would make it more comprehensive and may also reveal some unpredicted phenomena.

Large-signal fitting results and vector contribution analysis
The large-signal fit of the mixing transistor was made over a vgs range that covered the high-amplitude LO signal and a vds range of 0.1 V. The obtained set of coefficients was placed into NLsim with a single FET device as the test setup. The resulted spectrum around the baseband at the device output side was compared against the actual circuit simulation. The down-conversion gain was closely matching within 1 dB, but the IM3 predicted by NLSim was more than 10 dB higher than in the circuit simulations. Initially, the model order was reduced to the smallest with which it could represent the I-V curve, having only vgs, vgs 2 , vds, vds 3 and the corresponding cross-terms. However, increasing the order of the model did not improve the results. To get to the bottom of this, we will first take a look at how the nonlinearity analysis evolves order by order with the fitted values, and which coefficients are the most effective at each order. Then, we will have a clearer viewpoint on whether the modeling scheme needs to be rethought. As mentioned previously, NLsim takes the node voltages, converts it to distortion currents using the nonlinear coefficients, and then solves the distortion voltages by multiplying the nonlinear currents by the node impedances. So, looking at the IF for instance, we will have (assuming just a resistive load R load at the drain of a single mixer): where V1 drain and V2 drain are first and second order voltages at the device output. Multiplication in time-domain translates to convolution in frequency domain. Here, V1 is the combination of LO and RF as shown in Fig. 10, hence NLSim sees (4) at the IF frequency as: The same procedure is continued up to the fifth order. As the hand analysis gets too lengthy for the scope of this paper, we will continue investigating the buildup of nonlinearities using the vector plots, which are showing essentially similar results. As expected, V2 is the largest voltage generated and the higher order terms tend to be smaller and cancel each other out. Thus, K 11 is the most influential coefficient since it models the mixing of LO and RF. Even though the fit produces rather large higher order cross-terms, K 11 particularly determines the conversion gain as the others do not yet come into play. Nevertheless, the situation is different with IM3s, which are non-existent in V3 (the beat frequency and IF are both present in V2 but not in V1, thus RF ± IF disappears in their convolution) and emerge in the fourth and fifth order only. Figure 11 illustrates the orientation of the vector plots in V4 and V5. In the former, K 21 and less dominantly K 13 are trying to cancel K 11 . In the latter, the effect of K 11 is not seen at all, hence no cancelling terms and a bigger contribution to IM3s. The overall result is a sum of all orders, so a smaller IM3 means either a smaller K 11 or higher K 21 and K 13 for V4 and V5 to be cancelling. The model has predicted K 11 correctly as discussed above, so the problem must lie within the higher order cross-term coefficients. We have limited the model order so far to make the analysis easier to follow, but adding more cross-terms would make them appear here as well, building up in V5 and canceling K 11 in V4. The reason for this apparently inherent problem in the fitting will be explained in the next section.

Problem of large-signal fitting
Intuitively, one might speculate that the fitting problem originates from trying to fit two different operating regions into one set of coefficients. Fitting such a large scale nonlinearity is unfortunately a compromise and quite sensitive to the voltage range used for the fitting. Figure 12 illustrates the spectral performance for a clean two-tone RF test versus the DC I-V fitting range. The numbers on the axes indicate the ratio of the fitting range to the actual signal range (i.e. point (1,1) is the actual operating point). It is seen that the conversion gain (left) matches quite well, while the IM3 of the down-converted result (right) is more sensitive. However, the IM3 error given in NLSim is not the same as this result, which leads us to the most interesting finding of the fitting: a set of coefficients giving 1 dB IM3 match when driven by a clean zero-impedance twotone still generates 10 dB error when simulated with proper terminal impedances. This means that the terminating impedances are further converting second order current to voltage and causing it to mix into IM3, which is in line with the vector plots in Sect. 7.3 (K 21 transferring second and third order outputrelated components to IM3). The interpretation for this could be that, to achieve the on-off large-signal switching, high even order nonlinearities are needed to model the off region. This generates high IM2 currents that mix further into IM3. In other words, the strength needed for modeling the on-off switching overestimates and outweighs the curvature in the on region. In essence, with a 16-term polynomial, we can achieve a -35 dB NMSE fit for the large-signal I-V response and very precise conversion gain. Nevertheless, the on region (which is quite linear in practice) is now modeled by a set of mutually cancelling high-order polynomial terms that cause the contribution analysis to give unrealistic results.
In conclusion, the large-signal nonlinear modeling seems to be appropriate for large-signal gain estimation, but cannot be used simultaneously for small-scale distortion analysis. Hence, it seems necessary to proceed towards time-varying or behavioral modeling in future works.

Discussion
This paper has investigated the mechanisms that generate IM3 in the combination of an inverter-type amplifier and a passive mixer. The utilized distortion contribution analysis technique allows to show the relative importance of all the contributions of polynomially modelled nonlinear devices.
The first finding was that, even though the inverter-type gm is quite linear, its linearity can still be further improved. Thus, a polynomial model of its input-output response was extracted at different bias points, and several zero-crossing points of the quadratic and cubic coefficients were observed in the operating band. Consequently, it was found that it is possible to bias the circuit in a sweet spot or near it, and even apply the parallelism of the structure so that if The second finding was that-as expected-the common-mode feedback loop attenuates the even-order nonlinearities that appear as common-mode interference in the output of the pseudo-differential amplifier. The amount of this attenuation depends on the available loop gain and bandwidth, which are also investigated in the paper.
The third finding was that, in the passive mixer, the input voltage directly modulates the V GS of the switch. This generates a strong second-order nonlinearity that first generates IM2 products, and then mixes them again with fundamental tones and generates IM3. The common-mode feedback is very useful here, as it reduces the IM2 level by 24 dB and IM3 level by 40 dB, to a level where it can be said to match the performance of the gm amplifier again.
The fourth finding was that, luckily the bandwidth of the common-mode feedback does not need to be dramatically wide. With the baseband IM products being the most dominant cause of distortion, cancelling the low-frequency IM2 is already quite helpful. Also, as the first and second harmonic bands are just an octave away from each other, it does not matter much if the 3dB bandwidth ends in the fundamental or the second harmonic band.
The fifth finding was that, the nonlinearity of the CMcorrecting pMOSes (which is assumed to be the dominant reason for nonlinearity regarding the CMFB) does not prove very destructive as the signal present in that node is small compared to the input RF signal. Although it causes 9-14 dB degradation in nonlinearity performance in the worst case scenario, there is still about 30 dB improvement over the no-feedback case. However, if the op-amp gain is too high, this effect may become more adverse.
Finally, the amount of spurious components generated by the mixer leakage was evaluated. The IF leakage to the RF side generates a strong spurious tone in a single mixer, but gets cancelled in a balanced mixer structure. The common-mode feedback helps further by reducing its second harmonic. In attempts to modify the previous analysis to handle the mixing effects, it was found that large-signal fitting cannot model mixing and distortion simultaneously, predicting the conversion gain very well but failing to predict the amount of small-signal distortion correctly. This happens because IM3s are dictated by higher order nonlinear voltages and hence higher order cross-terms, while the fitting model cannot circumvent all the cross-terms due to trying to make a trade-off between two different device regions.
The study was made using a MATLAB-based distortion contribution analysis tool NLSim [24]. Device I-V curves were extracted in Cadence, fitted to polynomial models in MATLAB, and calculated to vectors in NLSim. Results were checked against pss simulations in Cadence.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons. org/licenses/by/4.0/.
Data availability Data sharing not applicable to this article as no datasets were generated or analyzed during the current study. License restrictions may apply to sharing the simulations that support the findings of this paper.