SpectreRF Ohio
SpectreRF Ohio
1. SpectreRF Overview
SpectreRF is an optional feature added to Spectre ,and is represented by 6 analyses:
1. 2. 3. 4. PSS: Periodic Steady State Analysis PAC: Periodic AC Analysis PXF: Periodic Transfer Function Analysis PNOISE: Periodic Noise Analysis Tdnoise: Time Domain Noise QPNOISE: Quasi-Periodic Noise (not discuss here) 5. PDISTO: Periodic Distortion Analysis QPSS: Quasi-Periodic Steady State (not discuss here) 6. Envelope Analysis (not discuss here)
PAC, PXF, and PNOISE are similar in concept to AC, XF, and Noise. However, they are applied to periodically-driven circuits such as mixers and oscillators.
1-1
CIC
SPECTRE Engine
Spectre RF Control
1-2
CIC
Stimuli is coperiodic
Yes
PSS setup Spectre Engine PSS Analysis PSS Results Spectre Engine -PAC Analysis -PXF Analysis -PNOISE Analysis Report Results
1-3
PSS is a large-signal analysis and determines the period of the small-signal analyses. PSS requires that multiple periodic stimuli be coperiodic.
PDISTO is also a largesignal analysis, and need not to be run after a PSS analysis. PDISTO does not require multiple periodic stimuli to be coperiodic.
CIC
SpectreRF Features
Compute a steady-state solution efficiently and directly Handles very large circuits (~ 10,000 transistors) Displays results in both time and frequency domains Use Discrete Fourier Transform (DFT) for better accuracy Displays standard RF measurements, such as s-parameter in Smith chart, NF, IP3, and 1dB compression point in the Analog Artist design environment. Performs oscillator analysis.
1-4
CIC
2. S-Parameter Analysis
Linear Simulation:
Entirely in the frequency domain A basic RF feature of the Spectre simulator
Ports:
Specify the port number on the psin ( or port); psin (or port) can act as a source port or a load. Required properties for linear analysis: Resistance & Port number
Noise Analysis:
Use Nfmin and NF for 2-port circuits ONLY.
2-1
CIC
SP, ZP, YP, HP GD VSWR NFmin Gmin Rn rn NF Kf & B1f GT GA GP Gmax Gmsg Gumx ZM NC GAC GPC LSB SSB
CIC
2-3
CIC
CIC
2-5
CIC
Push Analyses Choose then the window Choosing Analyses appears. Key in the values as right and push ok, then some information will appear in the Analyses domain of the window Affirma Analog Circuit Design Environment. Push Simulation Netlist and Run to run the simulation. The Netlist will be saved under a directory called ~/simulation.
Push Select button then to select the port on the schematic window
2-6
CIC
Use the Direct Plot tool to look the results. In the S-parameter Results window choose some parameters to see their results.
2-7
CIC
Some Results
2-8
CIC
2-9
CIC
S2P File
2-10
CIC
Simulation State
Push Session Save State to save simulation states under a directory called ~/.artist_states. Designate a new directory with the Session Options command in the simulation window. Push Session Save State to load saved states for a design.
2-11
CIC
2-12
CIC
Create a new schematic view and use library analogLib & tsmc25rf to draw the scheme. . After Check and Save ; then call the window Affirma Analog Circuit Design Environment .
Setup up the Model Libraries. Push Variables Copy From Cellview, and the defined variables appear in the Design Variables section. Double click on the variable name or push Variables Edit, the window Editing Design Variables appears. Key in the appropriate value for the variables.
3-1
CIC
Call the window Choosing Analyses and key in the values as right and push ok. To plot power or current at the end of the simulation, you must explicitly save the currents necessary for the calculation before the simulation. The voltages at each node are saved by default. Select Outputs To Be Saved Select On Schematic. In the schematic, select the NMOS. The terminals are circled in the schematic window after you select them. Press Esc to end the selections.
3-2
CIC
3-3
CIC
The Results
Select Results Direct Plot DC and select the terminal Drain of the nmos in the schematic window; then push ESC, and the results will be showed.
3-4
CIC
4-1
CIC
vi vf
The signal starts at a The starting point is adjusted The first iteration is transient point vi doesn't by the shooting method to simulation from t=0 to t=1/PSSfund result in periodicity. result in periodic steady state.
by default. The tstab parameter can be adjusted to facilitate convergence. Transient Analysis The second iteration is PSS analysis between t=tstab to t=(tsatb+1/PSSfund) and compares all voltage and currents at the start and end of the shooting interval. Set the value of tstab to keep start-up behavior away.
PSS Analysis
tstab
Shooting Interval
t=0s t=1/PSSfundt=2/PSSfund
4-2
CIC
1 PSS fund
1 PSS fund
Transient Analysis
PSS Analysis
RF 2.4GHz IF 100MHz
Shooting method takes the last few point data at the end of the shooting interval to adjust the slopes of the waveform at the beginning of the next iteration. If 20 iterations do not yield a solution, this might indicate the circuit won converge to a PSS solution. t
4-3
LO 2.3GHz PSSfund=100MHz
CIC
4-4
CIC
IF1
IF2
PSSfund = 10 MHz
4-5
CIC
PSS Operation
Start PSS Initial Transient (1 period or tstab) 1 Period of PSS Analysis
No
Periodicity Meet?
Yes
Yes
CIC
CIC
Measured V between start and end of shooting interval Conv norm = reltol*lteratio*steadyratio
4-8
CIC
Create a new schematic view and use library analogLib & tsmc25rf to draw the scheme.
Port1: Frequency name: F1 Resistance: 50 Source type: sine Amplitude(dBm): -40 Frequency: frf Port2: Frequency name: F2 Resistance: 50 Source type: sine Amplitude(dBm): 8 Frequency: flo
4-9
Pif
CIC
Model library setup. Call the window Affirma Analog Circuit Design Environment; key in appropriate value for the variables in the Design Variables section.
Analyses Choose. In the window Choosing Analyses, select pss.
4-10
CIC
The Signal field is ONLY applicable to the pdisto analysis. Beat Frequency represents the PSS Fundamental (PSSfund) frequency. This fundamental is the highest frequency that evenly divides into all frequencies in the circuit. You may key in an appropriate value or push Auto Calculate button to get an autoresponded value. Set the value for number of harmonics. The number of harmonics won affect the simulation t accuracy or time. Make sure the Enabled field is on. Click the Options button and set the integration method to gear2only.
4-11
CIC
In the Analog Artist Simulation window, select Simulation Options Analog. Set the Tolerance Options as recommended. If it is hard to converge set the Tolerance Options looser. Finally, Select Simulation Netlst and Run to start the simulation. Note if the Conv norm is less than 1 or if the PSS simulation has a convergent result.
4-12
CIC
In the Analog Artist Simulation Window, select Results Direct Plot PSS. Note the prompts on the bottom of the schematic and PSS Results windows. The PSS Results window MUST be on the screen when probing the nodes in the schematic. Don push OK. t In the PSS Results form, use the cursor to select the Pif net and Prf nets on the schematic. Press Esc to end this command. Click the Switch Axis Mode icon on the Waveform Window or select Axes To Strip.
4-13
CIC
4-14
CIC
4-15
CIC
Push Netlist and Run icon to run this simulation. Select Results Direct Plot PSS. Set the function and modifier as right; Select instance terminal(PORT1 & RL1) in the schematic window. Press Esc to end the selections. Compare the results to those of method 1.
4-16
CIC
Change the Amplitude(dBm) of PORT1 to a variable prf; Designate a value to prf in the Design Variables section. In the Choosing Analyses window, turn on the Sweep button as shown here. Type in prf for the Design Variable Name, or click the Select Design Variable button, and highlight prf from a list , then click OK. Remember to check in the INTEGRATION METHOD PARAMETERS the method is gear2only. Select Netlist and Run button.
4-17
CIC
P1 dB Simulation Results
Use Direct Plot function to see the results. Set up PSS Results form as shown here. Then select the Pif net in the schematic. With the cursor still in the schematic window, press ESC key to end the Direct Plot command.
4-18
CIC
Simulating IP3
PSS by itself is seldom used for IP3 simulation, because the separation between the 2-tone frequency is typically only a few Khz, and leads to a very long simulation time.
Edit PORT1 properties as right. So The Fundamental (Beat) Frequency is now 25MHz. Set up Choosing Analysis form appears as shown below and push OK Run the simulation
4-19
CIC
IP3 Results
3rd order intermodulation product will occur at (2 2.4GHz 2.425GHz) 2.3GHz = 75 MHz
Use Direct Plot function to see the results. Set up PSS Results form as shown here. Then select the Pif net in the schematic. Press ESC key to end the Direct Plot command.
4-20
CIC
5. PAC Analysis
PAC is a small-signal analysis like AC analysis, except the circuit is first linearized around a periodically varying operating point as opposed to a simple DC operating point. Linearizing around a periodically time-varying operating point allows analyzing transfer-functions that include frequency translation. When a small sinusoid is applied to a linear circuit that is periodically time-varying, the circuit responds with harmonics. PAC computes a series of transfer functions, one for each frequency. These transfer functions are unique because the input and output frequencies are offset by the harmonics of the LO.
5-1
CIC
PAC computes the transfer function from one input to many outputs. PAC is similar in concept to normal small-signal AC analysis, but it also calculates frequency conversion effects. By setting the maxsideband value to Kmax, PAC generates all 2Kmax +1 sidebands from Kmax to +Kmax. The small-signal frequency in a PAC analysis can be arbitrarily close or even equal to the LO frequency.
LO
State
PSSfund Harmonic no. 0 1 2 3 4
f f f
-2 -1 0 1 2 3
Input Output
CIC
CIC
* When setting Output harmonics less than the PAC harmonics, be sure to set the maxacfreq parameter to assure that the simulator takes sufficient time points to accurately characterize the output waveform in the PSS analysis.
5-4
CIC
Parameter Resistance Source type Frequency PAC magnitude Amplitude (dBm) Amplitude2 (dBm) Frequency2
CIC
Click on pac in the Choosing Analyses form, and setup the form as left; then click OK .
The Frequency Sweep Range sets the sweep range on the psin(port) component at the input port which has a PAC magnitude parameter value specified. The value for Maximum sideband is relative to the Fundamental frequency. Since the LO frequency and PSSfund are equal, you get the results of mixing the RF with the 0 through 3rd harmonic of the LO.
CIC
5-7
CIC
To measure the CG, move the marker to the 100MHz position in the waveform window and read the gain. -1
Note if the input and output port are both matched to 50ohm, we get conversion power gain; otherwise we get conversion voltage gain.
-2
1 -3 2 3
5-8
CIC
Modify the parameter values of PORT1 as right table; then check and save! Select pss in the Choosing Analyses form, and setup the form as below : Note now the Fundamental Frequency is 100 MHz Set the Number of harmonics to 50 and you have the harmonics available to view; it won t affect the simulation time. Click Apply! The Choosing Analyses form is still active on the screen.
5-9
CIC
CIC
IP3 Results
LO: 2.3 G RF: 2.4 G & 2.425G 1st order harmonics: 100M & 125M 3 rd order harmonics: 75M & 150M
The only 1st and 3rd order pair available from this analysis (due to the 100MHz PSSfund) is 125M and 75M. Use Direct Plot function; select the Pif net in the schematic window. Compare the IP3 values using 2 different method!
5-11
CIC
6. PXF Analysis
The periodic transfer function (PXF) analysis directly computes such useful quantities as conversion efficiency(the transfer function from input to output at a preferred frequency), image and sideband rejection, and power supply rejection. The primary use of PXF analysis is to measure various conversion gains. This is very valuable when looking at different spurs on the input of a receiver. PXF can be a better choice for calculating CG than PAC, because PXF will provide information on all of the frequencies on the RF port that are converted to the IF band. When simulating oscillators, PXF can determine the tstab
value.
6-1
CIC
The PXF analysis computes the energy contributions from all source harmonic frequencies to a signal or swept output frequency. In this way, a single output response is the combination of all possible frequency components in the design. Set the maxsideband, or the sidebands parameters, to select the periodic small-signal input frequencies of interest, while sweeping the selected output frequency.
6-2
LO
State
PSSfund Harmonic no. 0 1 2 3 4
f f f
-1 0 1 2 3 4
Output Input
CIC
CIC
* When setting Output harmonics to 0, be sure to set the maxacfreq parameter to assure that the simulator takes sufficient time points to accurately characterize the output waveform in the PSS analysis.
6-4
CIC
Pif
Pif-
6-5
CIC
6-6
CIC
6-7
CIC
0 -1 1
-2 2 -3 3
6-8
CIC
6-9
CIC
-1 1 -3 -2 2 0 3
6-10
CIC
7. PNOISE Analysis
PNOISE analysis, unlike conventional noise analysis, computes frequency convention effects, noise folding, aliasing. For noise sources that are bias dependent, such as shot noise sources, the time-varying operating point acts to modulate the noise sources. The transfer function from the noise source to the output is also periodically time-varying, and so acts to modulate the contribution of the noise source to the output. The effect of a periodically time-varying bias point on the noise generated by the various components in the circuit is also included. Include the effects of thermal noise, shot noise, and flicker noise.
7-1
CIC
Input
Output
f noise_source = f out + K i PSS fund LO where fout represents the output signal frequency; Ki is the PNOISE sidebands no.
LO
State
PSSfund Harmonic no. 0 1 2 3 4
Output Input
-1
CIC
CIC
CIC
Output net (v) or Voltage source (i) Specify in form Output sweep frequency Input frequency contributors Input Sources Reference Sideband
7-5
CIC
7-6
CIC
7-7
CIC
Click on pnoise in the Choosing analyses form, and set up the form as right: A Maximum sideband of 8 implies PNOISE will calculate the noise out to 8 harmonics of the PSSfund, or 18.4 GHz. To set the Positive/Negative Output Node, click the Select button, and select the Pif/Pif- node in the schematic window. Click the Select button and select PORT1 component in the schematic to set the Input Port Source. To obtain the Reference Side-Band, run PXF analysis. Finally, push OK; then Netlist and Run.
7-8
CIC
Plotting the NF
Use Direct Plot function to see the results. In the PSS Results form, select pnoise button. Click Plot button, and the waveform window displays the results.
7-9
CIC
7-10
CIC
7-11
CIC
CIC
2. timedomain:
Calculates the time-varying instantaneous noise power in a circuit with periodically driven components Setting the NOISE Skip Count=N parameter will only compute the noise at every Nth timepoint in the PSS waveform.
3. correlations:
Calculate correlations in noise at different ports of a multiport circuit
7_time_domain-2
CIC
Create a new schematic view. Use library analogLib & tsmc25rf to draw the scheme. After drawing, Check and Save!
7_time_domain-3
CIC
7_time_domain-4
CIC
CIC
7_time_domain-6
CIC
7_time_domain-7
CIC
7_time_domain-8
CIC
7_time_domain-9
CIC
CIC
CIC
PDISTO Results
RF Amplifier
10 5 8-3 900 905 1800 1810 895 895 1805
Input Spectrum
CIC
PSS
0 hz
PAC
RF2=900.2 MHz amplitude=-30dBm
199.8 M 200.2 M
99.8 M 100.2 M
200 M
899.8 M
100 M
PSIN Source Type = sine RF1=900 MHz moderate harms=2 or 3 RF1=900.2 MHz moderate harms=2 or 3 amplitude=-10dBm
8-4
100.4 M
99.6 M
199.6 M 200 M
200 K 600 K
900.6 M
0 hz 400 K
harms=2
899.8 M 900.2 M
900.2 M
200 K
900 M
PSS PAC
CIC
8-5
CIC
PDISTO Assumptions
Unlike PSS, PDISTO does not required multiple inputs be commensurate or coperiodic. However, they still must be periodic. For coperiodic, well separated signals, use PSS. For signals that are closely spaced or not coperiodic, use PDISTO. For circuits driven by 2 or more moderate signals or at unrelated frequencies, use PDISTO. If only one periodic signal is large enough to create distortion, choose PSS followed by PAC or PXF.
8-6
CIC
Parameter Resistance Source type Frequency Amplitude (dBm) Amplitude2 (dBm) Frequency2
8-7
CIC
CIC
8-9
CIC
zoom in
8-10
CIC
CIC
In the PDISTO Analyses form, use the Clear/Add button to change the values in the Fundamental tones list box. Set up the Sweep Range as shown right. Remember to choose the gear2only method and set the Tolerance Options as recommended or relax reltol to appropriate value. Click OK. Run the simulation.
8-12
CIC
Use Direct Plot function to see the results. Set up the PDISTO Results form as shown right. Follow the prompts at the bottom of the form, and select instance terminal (RL1) in the schematic
LO: 2.3 G RF: 2.4 G & 2.425G
1st order harmonics: 100M & 125M 3rd order harmonics: 75M & 150M
8-13
CIC
-14.5 dBm
-16
8-14
CIC
CIC
Troubleshooting Oscillators
Does not converge increase tstab Improve the estimate of the period. Be especially carefully that the period specified is not too short. Change the value of the method parameter from gear2only to trap or traponly. Does not converge increase maxperiods If the shooting iteration approaches convergence and fails, increase the value of the steadyratio parameter, but never set steadratio larger than 0.1. Change the value of the tolerance parameter.
9-2
CIC
tstart
Ttran
Ttran_end
tstart - Start time for transient analysis.(default is 0) Tonset Time when the last stimulus waveform becomes periodic. PSSperiod the guess period entered by the user. tstab additional stabilization time entered by the user. maxstep = (Ttran / 50)(default). The algorithm then adds a further 4 periods of our guess frequency of transient analysis in order to measure the oscillator frequency.
9-3
CIC
Setting a high harmonic in the PSS analysis or setting maxacfreq will only effect the maxstep of the PSS shooting iterations but NOT the maxstep of the initial transient section.
9-4
CIC
Vout1
Vout2
CIC
9-6
CIC
Select Analyses Choose to set up the transient simulation as right window. Set up the form and option form as shown right: Push Netlist and Run button.
9-7
CIC
9-8
CIC
Oscillator Notes
When applying initial conditions to start an oscillator, first run a transient analysis to get the voltages for a few nodes in the circuit. To set the initial conditions for the next run, select Simulation Convergence Aids Initial Condition. In the Transient Options form, set a value such as spectre.fc for the writefinal parameter in the STATE FILE PARAMETERS section. The spectre.fc file will have all of the final conditions on the nodes in the circuit. Before running another transient or PSS analysis, set readns to spectre.fc in the CONVERGENCE PARAMETERS section of the Options form.
9-9
CIC
spectre.fc file
9-10
CIC
In the Waveform window, click the Add Subwindow icon, then a subwindow with a label of 2 in the upper right corner is added. Click the Calculator, then the calculator appears. Click the vt button in the Calaulator and follow the prompt at the bottom of the schematic window. Then select the Vout1 node in the schematic and press Esc; click and hold Special Functions and select dft form from the Special Function list.
9-11
CIC
2.33GHz
zoom in
9-12
CIC
PSS/PNOISE Analysis(1)
In the Choosing Analysis window, turn off the transient analysis; select the pss analysis and set up the form as right: An estimate of 2GHz was selected for Beat Frequency. It recommended to estimate a lower frequency than s expected to help in the convergence. The value of tstab is set to 100n to inform the simulator that the oscillation needs 100ns to stabilize to a steady-state waveform. Remember to choose the gear2only method in the options form. Click Apply.
9-13
CIC
PSS/PNOISE Analysis(2)
Next, click the pnoise button, and set up the PNOISE analysis as right: The phase noise from 1 Hz to 10 MHz, relative to the derived oscillation frequency, will be calculated. The Sidebands field is set to a Maximum sideband of 0. In this case, you are interested in the upconverted 1/f device noise to the oscillation frequency. To account for higher harmonics of the oscillator that also contribute noise, change this value. No Input Source is specified. Click OK.
9-14
CIC
Click the Run Simulation icon and use Direct function to see the results. Compare the oscillation frequency with the previous transient results. Click Plot icon, and the waveform window appears.
9-15