Mixer Simulation

MIXER : Mixer Simulation

Requires: Gateway and SmartSpiceRF

Minimum required Versions: Gateway 2.12.10.R, SmartSpiceRF 1.6.5.R

In this Mixer example we will make various RF measurements for; Spectral response, Noise Figure, S-Parameters, Conversion gain, 1dB Compression, and Third Order Intercept point using the SmartSpiceRF control file accessed within Gateway's schematic design environment to run SmartSpiceRF simulations.

Gateway Schematic

Start Gateway and load the workspace file mixer.workspace by selecting File->Open->Workspace.

The Gilbert cell mixer simulation will be setup with an RF input frequency of 990MHz, a 1 GHz Local Oscillator (LO) generating a 10 MHz Intermediate Frequency (IF) output.

To load the Mixer example circuit schematic, select File->Open->Schematic . When the file browser appears, select the file mixer.schlr. The Mixer schematic will appear in the gateway schematic window.

Generating Netlists

Netlists are the text files used to describe device connectivity and element properties of the circuit. Gateway can create two different netlist formats: SmartSpice for circuit simulation, or Guardian for layout design. See the Gateway Users Manual for more information on these formats.

To generate a netlist in SmartSpice format, either select Simulation->Create Netlist , or click on the SmartSpice Netlist icon in the Tool Bar . The Mixer netlist will then appear in a new window.

Simulator Setup

Check in Gateway that your preferred simulator is set to SmartSpiceRF . Click on Edit->Preferences to open the preferences setup window. Choose Tools->Simulator and set Simulator to SmartSpiceRF . Version number is set to Default (which usually means the latest installed version) in the Version field. You can change the simulator version to any of your installed versions using this setup window.

Control File

SmartSpiceRF needs more than just a circuit netlist to perform a meaningful simulation. It needs the Circuit Netlist, Voltage or Current stimulus, Options, Analysis Statements, and active device Model parameters or Libraries. All this information comes together in the form of an Input Deck file (*.in, *.inp, *.cir, *.sp, *.sm, *.scs, etc.) which provides SmartSpiceRF with all the necessary information to run simulations and generate output data.

Click on the simulation Tool Bar icon Edit Control File. pngview

The control file will open in a text editor (Sedit) window and contains the path to the model library file as well as .OP and .SPECTRAL Analyses statements. The control file combined with the circuit netlist and list of vectors to be saved creates an Input Deck for SmartSpiceRF.

SmartSpiceRF Simulation

In the following we describe how to set up SmartSpiceRF simulations to perform measurements on RF Mixer circuits.

Quasi Periodic Steady-State Analysis (.SPECTRAL)

The input sources for this analysis are defined as Port and Voltage sources. Using a Port source allows us to input or measure rf signals in terms of power (dBm) while specifying an associated port resistance. These are helpful for power matching, gain and noise measurements shown later.

The Mixer circuit control file has the following stimulus:

********************************************************

Pif IFOUT_P IFOUT_M R=10K

Prf RFIN_P RFIN_M MTS1(prf 0 1 -1 0)

Vlop LOIN_P GND mag1f=vlo

Vlom LOIN_M GND mag1f=vlo phase1f=180

********************************************************

Pif is a resistive port load across the IF output with load 10K ohms.

Prf is the RF input source defined by the coefficients in its Multi-Tone Spectral (MTS) source for the fundamental tones defined in a Spectral analysis statement. The signal power is prf (dBm), phase is 0, and the frequency will be (1)*Fund1+(-1)*Fund2+(0)*Fund3.

Uncomment the .SPECTRAL analysis statement to make the analysis active.

In the .SPECTRAL analysis we define the fundamental signals in the circuit. There can be up to 3 fundamentals defined, here we have only defined 2 so the third one is 0Hz. 1GHz for the LO and 10MHz for the IF frequency. Prf input frequency is therefore 1GHz -10MHz + 0Hz= 990MHz when we apply the Prf MTS coefficients to the .SPECTRAL analysis fundamentals.

Solver and lrs_tol are analysis parameters for the solver. We are loosening the large signal convergence tolerance by specifying lrs_tol=0.5 because the default value is 1e-3. In this particular circuit simulation we could also use the default value as the circuit converges easily.

Oversample multiplies the number of points used in the time-domain waveforms to represent the non-linear devices while reducing the FFT aliasing and improving simulation accuracy and robustness.

Annotate=3 generates the necessary spectral data and time-domain waveforms from the simulation run.

Click on Gateway->Simulation->Run to begin the SmartSpiceRF simulation.

QPSS Results

SmartSpiceRF outputs simulation results of Large-Signal QPSS analysis and statistic information into the Output window and generates a number of plots with Waveforms, Spectra, Measurement results, etc. Simulation results in form of plots will be loaded into SmartView, and the SmartView Data Browser window will be open.

Open plot spect_sp1 , then select vector vm(ifout_p,ifout_m) and click Plot .

Place the cursor on the chart and right mouse click to display Cartesian Properties . Select dBm(MAG) on the Data Map Type window. From the menu Chart , select Bars and unselect Lines . The output harmonics plot is shown dBm.

Noise Figure Simulation (.HNOISE)

Periodic Steady-State Noise Analysis (.HNOISE Analysis) is a small-signal analysis that must follow a Steady-State analysis. This analysis is used to compute the mixer noise figure.

The input sources for this analysis are defined as Port and Voltage sources:

********************************************************

Pif IFOUT_P IFOUT_M R=10K

Prf RFIN_P RFIN_M

Vlop LOIN_P GND mag1=vlo

Vlom LOIN_M GND mag1=vlo phase1=180

********************************************************

For the .HNoise analysis we do not need to define an active RF input signal because a small-signal ac source, Prf here, is sufficient.

Uncomment the .HNOISE analysis statement to calculate Noise Figure.

The HNOISE analysis output (Pif) and input reference(Prf) ports are defined. A Periodic Steady State (PSS) analysis is automatically run by HNOISE using 1GHz as the fundamental frequency and a default of 4 harmonics are used to calculate the Periodic Operating Point of the circuit. After the PSS analysis has converged an output frequency sweep from 10MHz to 100MHz is specified with the circuit fundamental being 1GHz. The reference sideband for input referred noise calculations is -1 which equates to an input frequency band of 10M =>100MHz - 1GHz = -990MHz => -900MHz or 900M=>990MHz at the RF input port Prf. The maximum number of noise sidebands (KMAX) is defined as 10 so every sideband from -10....-1, 0, +1....+10 will have it's noise contributions included.

Click on Gateway->Simulation->Run to begin the SmartSpiceRF simulation.

Noise Figure Results

To plot the single sideband noise figure measurement open plot hnoise1, select vector NFssb and click Plot . The noise figure plot is displayed.

S-parameter Simulation (.HNET)

Periodic Steady-State NET Analysis (.HNET Analysis) is a small-signal analysis, which is used to compute scattering parameters (S-parameters) for two-port circuits that exhibit frequency translation.

The input sources for this analysis are defined as Port and Voltage sources:

********************************************************

Pif IFOUT_P IFOUT_M R=10K

Prf RFIN_P RFIN_M

Vlop LOIN_P GND mag1=vlo

Vlom LOIN_M GND mag1=vlo phase1=180

********************************************************

Again the rf input port Prf only needs to be a small-signal source, so we have not specified a Multi-Tone Signal.

Uncomment the .HNET analysis statement.

HNET will make a frequency sweep from -200MHz to +200MHz relative offset from the 1GHz fundamental (800MHz - 1200MHz) on the input port 1 to -200MHz to +200MHz on the output to calculate S-parameters .

Click on Gateway->Simulation->Run to begin the SmartSpiceRF simulation.

S-parameter Results

To setup the Smith Chart graph type in SmartView select Chart->Create->Extended Smith or click on the Extended Smith Chart icon . Open Plot hnet1 , then select vector s22_h1h0 , and click Plot . To display the S22 plot on the Smith Chart.

Conversion Gain (.HTF)

Periodic Steady-State Transfer Function Analysis (.HTF Analysis) is a small-signal analysis that follows a Periodic Steady-State analysis. It is used to compute mixer conversion gain.

The input sources for this analysis are defined as Port and Voltage sources:

********************************************************

Pif IFOUT_P IFOUT_M R=10K

Prf RFIN_P RFIN_M

Vlop LOIN_P GND mag1=vlo

Vlom LOIN_M GND mag1=vlo phase1=180

********************************************************

HTF is also a small-signal analysis calculated about the large signal periodic operating point of its initial PSS analysis, so the RF input only needs be a small-signal source during the frequency translating transfer function analysis.

Uncomment the .HTF analysis statement for Conversion Gain calculation.

HFT will run a PSS analysis using 1GHz as its fundamental. After the Periodic Operating Point is calculated, a sweep of the output frequency from 1MHz tp 301MHz in 51 linear steps is run and the transfer functions from circuit sources to the output nodes IFOUT_P, IFOUT_M is calculated. For each source the frequency translations from the sidebands -1 ([1MHz=>301MHz] -1GHz = 699MHz=>999MHz ) and sideband +1 (1[MHz->301MHz] + 1GHz = 1001M=>1301MHz) are calculated. A .LET statement is used to make a db20 calculation of the voltage transfer functions for easy plotting later.

Click on Gateway->Simulation->Run to begin the SmartSpiceRF simulation.

Conversion Gain Results

To plot the Mixer Conversion Gain, open plot htf1 , select vectors prf_gain1h and prf_gain_1h , and click Plot . The Mixer Conversion Gain plot is displayed.

1dB Compression Point Calculation (Swept .SPECTRAL)

The Input Referred 1dB Compression Point is that input signal level at which the actual gain departs from the theoretical gain by -1dB. SmartSpiceRF allows you to compute Input Referred 1dB Compression Point using the measurement statement COMPR1DB.

The input sources for this analysis are defined as Port and Voltage sources:

********************************************************

Pif IFOUT_P IFOUT_M R=10K

Prf RFIN_P RFIN_M MTS1(prf 0 1 -1 0)

Vlop LOIN_P GND mag1f=vlo

Vlom LOIN_M GND mag1f=vlo phase1f=180

********************************************************

For the SPECTRAL analysis we will need to apply a large signal RF input to measure the effect of the input signal compressing the gain of the Mixer. The MTS definition means a 1GHz -10MHz+0Hz =990MHz input signal is generated at the RF input by Prf port.

Uncomment the .SPECTRAL analysis statement to calculate the 1dB compression point.

SPECTRAL analysis will run a QPSS analysis for each step of the Prf input power sweep from -40dBm to 0 dBm and the measurements are taken of the output power at 10MHz with the FIND function. These measurements are then used to calculate the 1dB compression point using the SmartSpiceRF function COMPR1DB. The scaled result is saved in r_1dbCompression.

Click on Gateway->Simulation->Run to begin the SmartSpiceRF simulation.

1dB Compression Results

To plot the output power showing compression, open plot meas1 , then select vector dbout and click Plot . The 1dB compression point plot is displayed.

In SmartSpiceRF, you can see the actual values that are being plotted. To view these, select the vector r_1dbcompression from meas1 and press View Data. A data window showing the 1dB compression point measurement result will be displayed by SmartView.

Third-Order Intercept Calculation (Swept .SPECTRAL)

The input sources for this analysis are defined as Port and Voltage sources:

********************************************************

Pif IFOUT_P IFOUT_M R=10K

Prf RFIN_P RFIN_M MTS1(prf 0 1 -1 0) MTS2(prf 0 1 0 -1)

Vlop LOIN_P GND mag1f=vlo

Vlom LOIN_M GND mag1f=vlo phase1f=180

********************************************************

For Third-Order Intercept we need to add a second input signal MTS2 at 1GHz + 0Hz - 10.1MHz = 989.9MHz with the same power level as the 990MHz signal. A third fundamental is added in the SPECTRAL analysis definition, fund3=10.1MHz.

Uncomment the .SPECTRAL analysis statement from the section IIP3 to calculate the Third-Order Intercept Point (IIP3).

The SmartSpiceRF function IP3 is used to calculate the Input referred third-order intercept point.

Click on Gateway->Simulation->Run to begin the SmartSpiceRF simulation.

Third-Order Intercept Results

To plot the Third-Order Intercept power sweep data, open plot meas1 , then select both vectors pout_1 and pout_3 click Plot . The IP3 simulation plot is shown.

In SmartSpiceRF, you can see the actual values that are being plotted. To view the IIP3 measurement, select vector resip3 from ip3_meas1 and press View Data. The IP3 value will be shown in a data window.