13.07.2015 Views

Using Pdisto effectively - Cadence

Using Pdisto effectively - Cadence

Using Pdisto effectively - Cadence

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto EffectivelyAs a further complication, many multi-timescale circuits, such as mixers andswitched-capacitor filters, have a highly nonlinear response with respect to oneor more of the exciting inputs. Consequently, steady-state approaches such asmulti-frequency harmonic balance do not perform well.Mixed frequency-time (MFT) approaches avoid these difficulties. They assumethat many circuits of engineering interest have a strongly nonlinear response toonly one input, such as the clock in a switched-capacitor circuit or the LO in amixer, and respond in a weakly nonlinear manner to other inputs.Compared to previous MFT methods [2, 4], the PDisto algorithm has many thefollowing advantages:■■■■■It avoids the ill-conditioning caused by a poor choice of boundary conditionfound in previous algorithms.It uses a multi-dimensional discretized Fourier transform (DFT) scheme forcycle placement.It uses a continuation method to enhance the global convergence ofNewton’s method.It uses a matrix-implicit, Krylov-subspace-based iterative scheme that letsMFT methods solve large problems.It has a preconditioning strategy that permits rapid convergence of theiterative solver.If you are unfamiliar with terminology such as matrix-implicit, Krylov-subspace,and preconditioning, please refer to [6] for details. You can find an introductionto continuation methods in [1].December 1999BackPage F-3Close F-3


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto EffectivelyEssentials of the MFT MethodCircuit behavior is usually described by a set of nonlinear differential-algebraicequations (DAEs) that can be written asd----Q( vt ()) + I( v()t ) + ut () = 0 (3.1)dtwhere■ Qvt ( ()) ∈ R N is typically the vector of sums of capacitor charges at eachnode.■ I( v()t ) ∈ R N is the vector of sums of resistive currents at each node.■ ut () ∈ R N is the vector of inputs.■ vt () ∈ R N is the vector of node voltages.■N is the number of circuit nodes.The MFT algorithm assumes that the circuit is in quasiperiodic steady state, thatis, that the signals can be represented using∑∑vt () V kl e j2π ( lf 0 + kf 1 )t= (3.2)k lwhere, for simplicity, there are only two fundamental frequencies, f 0 and f 1 . Thesignal v(t) is then sampled at one of the fundamental frequencies, f 0 , which iscalled the clock. This is shown in Figure 1, where sampling a two-fundamentalquasiperiodic signal at one of the fundamental frequencies creates a sampledwaveform that is one-fundamental quasi-periodic, or simply periodic. MFTdirectly finds the solution that when sampled at f 0 is periodic in f 1 .December 1999BackPage F-4Close F-4


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto EffectivelyFigure F-1 Sample envelope is the waveform traced out when signal issampled with the clock period. The envelope is shown sampled at thepeaks, but this is not necessary.The sampled waveform isDecember 1999BackPage F-5Close F-5


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto Effectively∞v n = vnT ( 0 ) = V k e j2πkf 1t∑(3.3)k = – ∞where T 0 = 1/f 0 . Alternatively, one can writev n = F – 1 V (3.4)which states that v is the inverse Fourier transform of V .Recall that v is a solution of the circuit equations, and that v is simply v uniformlysampled, so given one can compute a subsequent sample point usingwhere ϕ is the state transition function for the circuit. ϕ(v 0 ,t 0 ,t 1 ) is the solutionfor the circuit equations at t 1 , given that it starts from the initial condition v 0 att 0 . Consider the nth sample interval. Then let x n = v n be the solution at the startof the interval and y n = v n + 1 = x n + 1 be the solution at the end. Then (3.5) usesthe circuit equations to relate the solution at both ends of the interval,Let X = Fx and Y = Fy (X and Y are the Fourier transforms of x and y). Then,from (3.3) and because y n = x n+1 ,orv n v n + 1v n + 1 = φ( v n , nT 0 ,( n + 1)T 0 ) (3.5)y n = φ( v n , nT 0 ,( n + 1)T 0 ) (3.6)–X k = e j2πkf 1T 0Y (3.7) kX= D T Y (3.8)0December 1999BackPage F-6Close F-6


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto Effectivelydetermined by the numbers of harmonics of moderate fundamentals that youspecify. Given maxharms =[k 1 ,k 2 , ..., k S ], the total number of integrations isS∏s = 1( 2k s + 1)Consequently, the efficiency of the algorithm depends significantly on thenumber of harmonics required to model the responses of moderatefundamentals.Fortunately, the number of harmonics of the clock does not significantly affectthe efficiency of the shooting algorithm. The boundary conditions of a shootinginterval are such that the time-domain integrations are consistent with afrequency-domain transformation with a shift of one large-signal period.As a SpectreRF user, you might need to run PSS to calculate the steady-stateoperating point of circuits with multiple input frequencies. You can do this byusing the greatest common factor of all input frequencies as the PSS beatfrequency. When this factor is relatively close to the clock frequency, such aswithin a factor of 10, PSS might be preferable to PDisto for two reasons. Firsteach nonlinear iteration would not require excessive integrations of clock period.Secondly, PSS solves a much smaller linear system in each nonlinear iteration.The size of the linear system resulting from PDisto isS∏K = ( 2k s + 1)s = 1December 1999BackPage F-8Close F-8


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto Effectivelytimes as big as that of PSS. In general, if the clock/beat frequency ratio of PSSis smaller than K, PSS might be preferable to PDisto. For circuits operating onwide timescales, such as switched-capacitor filters, the clock/beat frequency ofPSS can be greater than 1000, and PDisto is clearly the method of choice.Another difference between the two analyses is that PSS does not have anyrestrictions on input sources, whereas PDisto requires that all non-clock inputsmust be sinusoidal.One limitation of the current PDisto analysis is that small signal analyses afterPDisto, such as quasi-periodic noise analysis, cannot be performed.PDisto analysis also cannot currently be applied to autonomous circuits.PDisto compared with PACLike PAC analysis, the PDisto calculates responses of a circuit that exhibitsfrequency translations. However, instead of having small-signal linear behavior,it models the response as having components of a few harmonics of input-signalfrequencies. This permits computing responses to moderately large inputsignals. PAC analysis assumes that only the clock is generating harmonics. Forexample, for a clock frequency f c , and a small signal frequency f s , amplitudes ofcircuit response are generated at f s k c f c , where k c is bonded by the parameterharms in PSS analysis. In contrast, PDisto also permits non-clockfundamentals to generate harmonics. In the same situation, a spectrum atfrequencies k s f s k c f c is generated, where k s and k c are bonded by the PDistoparameter maxharms.Unlike PAC, a PSS analysis is not explicitly required before PDisto analysis.PDisto internally does a PAC analysis to determine initial conditions.December 1999BackPage F-9Close F-9


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto EffectivelyPDisto Analysis ParametersPDisto inherits most PSS parameters, and it adds two new parameters, fundsand maxharms. They replace PSS parameters, fund (or period) and harms,respectively. The funds parameter accepts a list of names of fundamentals thatare present in the sources. These names are specified in the sources byparameter fundname. The first fundamental is assumed to be the large signal.Parameter maxharms accepts a list of numbers of harmonics needed for eachfundamental. If you do not list all the fundamental names using the fundsparameter, the current analysis is skipped. However, if you do not specifymaxharms, a warning message is issued, and the number of harmonics isdefaulted to 1 for each of the fundamentals.The remaining PDisto analysis parameters are directly inherited from PSSanalysis, and their meanings remain essentially unchanged.The role of some PSS parameters is expanded. The maxperiods parameter thatcontrols the maximum number of shooting iterations for PSS analysis alsocontrols the number of the maximum number of shooting iterations for PDistoanalysis.Application ExamplesPDisto is particularly efficient for circuits operating on widely separatedtimescales. This is demonstrated by two examples shown below, a switchedcapacitorfilter and a high-performance receiver.Switched-Capacitor FilterThe first example is a low-pass switched-capacitor filter with 4kHz bandwidthand 238 nodes, resulting in 337 equations. To analyze this circuit, the PDistoDecember 1999BackPage F-10Close F-10


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto Effectivelyanalysis was performed with an 8-phase 100kHz clock and a 1V sinusoidal inputat 100Hz.The 1000 to 1 clock to signal ratio makes this circuit difficult for traditional circuitsimulators to analyze. Three harmonics were used to model the input signal.The eight-phase clock required about 1250 timepoints for each transientintegration. The total number of variables solved by the analysis is 337 X (2 X 3+1) X 1250 = 2,948,750, slightly less than three million. The simulationcompletes in less than 20 minutes on a Sun UltraSparc1 workstation with 128Megabyte memory and a 167MHz CPU clock. A swap file (see 9.5) is usedbecause the analysis cannot be finished in core.December 1999BackPage F-11Close F-11


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto EffectivelyFigure F-2 Harmonic distortion of a switched-capacitor filterHigh-Performance ReceiverThe second example is the high-performance image rejection receiver. Itconsists of a low-noise amplifier, a splitting network, two double-balancedmixers, and two broad-band Hilbert transform output filters combined with aDecember 1999BackPage F-12Close F-12


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto EffectivelyFigure F-3 Intermodulation distortion of a high-performance receiver<strong>Using</strong> PDistoThis section tells you how to set up and run PDisto analysis. It also tells youways to promote convergence.December 1999BackPage F-14Close F-14


Picking the Large FundamentalAffirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto EffectivelyYour first task is to select the large fundamental, called the clock or the LO.Below are a few guidelines for selecting the large fundamental.■■■■Choose the one which is not sinusoidal.Choose the one which causes the most nonlinearity.Choose the one which causes the largest response.Choose the one which has the highest frequency.Set up SourcesYou can specify the clock input using any type of source. However, otherfundamentals can only be sinusoidal sources.In addition to specifying the waveform parameters such as type, and ampl,youmust also use the parameter fundname to specify a name for each non-dcsource. Each fundamental can be a composition of several input sources withthe same name. This is a difference between PDisto and other analyses.The example below shows how to set up the sources for the switched-capacitorfilter discussed in section 8.1.An eight-phase clock://******************BEGIN NETLIST**********************************...// ClocksDecember 1999BackPage F-15Close F-15


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto EffectivelyPhi1 (phi1 gnd) vsource type=pulse period=2.5us delay=0.25us\width=1us val0=-VDD val1=VDD rise=10ns fundname="Clock"Phi2 (phi2 gnd) vsource type=pulse period=2.5us delay=1.5us\width=1us val0=-VDD val1=VDD rise=10ns fundname="Clock"Phi8 (phi8 gnd) vsource type=pulse period=5.0us delay=1.5us\width=2.25us val0=-VDD val1=VDD rise=10ns fundname="Clock"Phi9 (phi9 gnd) vsource type=pulse period=5.0us delay=1.25us\width=2.75us val0=VDD val1=-VDD rise=10ns fundname="Clock"Phi10 (phi10 gnd) vsource type=pulse period=10.0us delay=3.75us\width=5.25us val0=VDD val1=-VDD rise=10ns fundname="Clock"Phi11 (phi11 gnd) vsource type=pulse period=10.0us delay=4.0us\width=4.75us val0=-VDD val1=VDD rise=10ns fundname="Clock"// Input sourceVin (pin gnd) vsource type=sine freq=100_Hz ampl=1 sinephase=0\fundname="Input"// PDisto AnalysisharmDisto pdisto funds=["Clock" "Input"] maxharms=[3 3]+swapfile="SomeFileName"//******************END NETLIST************************************This example shows how the sources and analysis are set up for the highperformance receiver discussed in section 8.2.//******************BEGIN NETLIST**********************************...// LO inputVlo (8 7) vsource type=sine ampl=400mV freq=780MegHz fundname="LO"December 1999BackPage F-16Close F-16


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto Effectively//RF inputsPrf1 (15 44) port type=sine ampl=50mV freq=840MegHz fundname="F1"+ ampl2=50mV freq2=840.01MegHz fundname2="F2"//AnalysisInterModDisto pdisto funds=["LO" "F1" "F2"] maxharms=[5 3 3]+ swapfile="SomeFileName"//******************END NETLIST***********************************Sweeping PDistoYou can combine PDisto analysis with the Spectre SWEEP analysis to create apowerful tool for a wide variety of applications, such as IP3, and IP5calculations. For example, you might want to calculate the distortion for inputpower ranging from -60dbm to 0dbm. The netlist for this task is shown below://******************BEGIN NETLIST*********************************...parameters inputpower=-60// ClockVlo (clock 0) vsource type=pulse val0=-1 val1=1 period=1n delay=0\rise=10p fall=10p width=460.00p fundname="carrier"// Input portPrf (input 0) port type=sine r=50.0 num=1.0+freq=+9.0E+08 dbm=inputpower fundname="RF1"+freq2=+9.05E+08 dbm2=inputpower fundname2="RF2"December 1999BackPage F-17Close F-17


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto Effectively// Analysisswp sweep param=inputpower start=-60 stop=0 lin=6 {distortion pdisto funds=["LO" "RF" "RF2"] maxharms=[5 3 3]}//******************END NETLIST***********************************Always arrange the sweep values so that analyses that converge more easilyare performed first. When you sweep PDisto, it automatically uses theconverged steady-state solution of the previous PDisto analysis as its initialcondition and omits the PSS and PAC stage of initial condition calculations. Asdiscussed in section 9.4, the practice can also aid convergence.Convergence AidsNormally PDisto converges with default parameter settings, but occasionallyyou might need to adjust some parameters.There are two situations that can cause non-convergence. One of these occursin the PSS analysis called internally by PDisto to calculate its initial condition,and the second occurs during PDisto iterations. The messages printed on thescreen from the simulator identify the problem. If the simulation fails beforeprinting the message ‘‘Trying PAC for PDISTO initial condition’’ to the screen, theproblem is in the PSS analysis. If it fails after printing ‘‘Starting PDISTO analysisiterations’’ to the screen, the problem occurs during PDisto. For the firstcondition, see the convergence aids for PSS in Appendix B. Normally, giving asufficiently large tstab or an looser steadyratio will resolve convergenceDecember 1999BackPage F-18Close F-18


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto Effectivelyproblems in the PSS stage. For convergence problems in the PDisto iterations,try the following procedures.■■■■Increase steadyratio. steadyratio guards against false convergence. Itsdefault values, 1.0 for liberal, 0.1 for moderate, and 0.01 forconservative, are derived from the errpreset parameter. Tighten it only ifyou suspect false convergence. Sometimes it must be loosened (forexample to steadyratio=1) particularly with a tight reltol setting. Alsoloosen steadyratio when convergence stagnates. An indication ofstagnation is that the ‘convNorm’ value, which you can be observe fromthe screen, fluctuates within a certain range and never decreases further.The convergence tolerance of PDisto is determined by the product ofsteadyratio X reltol. Normally, you do not set steadyratio to a valuehigher than 10.Severe trapezoidal rule ringing can prevent convergence. If you suspecttrapezoidal rule ringing, use method=gear2 or method=gear2only.Avoid using unnecessarily tight reltol settings. Excessively tight reltolsignificantly reduces efficiency besides causing convergence problems.Do continuation on a parameter, such as input power, of moderatefundamentals. When the circuit is behaving highly nonlinearly at a certaininput power level, the PSS+PAC approach might not compute a goodenough estimate of the initial condition. One effective strategy is to rampup the input power gradually by carefully arranging a sweep, see section9.3. Because it is usually much easier to achieve convergence at a lowpower input level where the circuit behaves more linearly, start with a lowinput power. Once the simulation converges, save the steady-state solutionas the initial condition for the next input power level. Repeat this processDecember 1999BackPage F-19Close F-19


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto EffectivelyFigure F-4 PDisto convergence scenariosAn important indication of convergence or divergence is the Conv value printedto the screen. There are a few typical scenarios shown in Figure 4. For mostPDisto runs, the ‘‘Easy Convergence’’ scenario occurs. A few simulations followthe ‘‘Hard Convergence’’ scenario. If PDisto iterations stagnate (Conv valuefluctuates close to but above 1.0), loosen steadyratio. Loosening steadyratioDecember 1999BackPage F-21Close F-21


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto Effectivelywill solve the stagnation problem. If the iterations diverge, you usually mustimprove the initial condition. Do a continuation on input power level as describedabove.Memory ManagementPDisto analysis is a memory intensive analysis. If PDisto cannot be finished incore with real physical memory, use a swap file residing on a local disk. Thesimulator manages swapping much more efficiently than the operating systems.Examples telling how to set up swapfile parameter are given in section 9.2.Typically, 80‰ CPU utilization is achieved.Dealing with Sub-harmonicsOne advantage of PDisto analysis over PSS is that you only need to provide aname for each fundamental frequency. The actual beat frequency valueassociated with the name is calculated automatically by the simulator. For eachunique fundamental name, the simulator first finds all the frequenciesassociated with it. Then the greatest common factor is calculated among thesefrequencies, which is used as the beat frequency associated with thefundamental name. However, if the fundamental frequency has sub-harmonics(circuit responses at some fraction of a driven frequency, typically 1/2 or 1/3),aswith a divider, for example, the simulator currently cannot detect them. As aworkaround, add a dummy source that tells the simulator of the existence of asub-harmonic associated with a fundamental frequency.Understanding the PDisto Analysis NarrationBelow is what typically printed to the screen from a session of a PDisto analysisrun.December 1999BackPage F-22Close F-22


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto Effectively...Fundamental LO: period = 1 ns, freq = 1 GHz.Fundamental RF: period = 2 ns, freq = 500 MHz.Fundamental RF2: period = 1.96078 ns, freq = 510 MHz.*********************************************************Trying PSS for PDISTO initial condition.Trying PAC for PDISTO initial condition.Starting PDISTO analysis iterations.Iter = 1, convNorm = 33.9, maximum dI(Vin:p) = 44.6082 uA,took 1.48333 s.Iter = 2, convNorm = 9.94, maximum dI(Vlob:p) = 31.0627 uA,took 1.38333 s.Iter = 3, convNorm = 8.37, maximum dI(Vlob:p) = 11.6634 uA,took 1.4 s.Iter = 4, convNorm = 15.1, maximum dI(Vin:p) = 5.88558 uA,took 1.51667 s.Iter = 5, convNorm = 7.77, maximum dI(Vlob:p) = 13.6397 uA,took 1.63333 s.Iter = 6, convNorm = 52.1e-03, maximum dI(Vcc:p) = 61.1425 nA,took 1.51667 s.PDISTO solution has converged. Starting spectrum calculation....December 1999BackPage F-23Close F-23


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto EffectivelyThe simulator first confirms with you what fundamental names have been readand what their beat frequencies are. For the above example, the circuit has a1GHz fundamental named LO as the clock and two fundamentals named RFand RF2, respectively, as inputs. Their associated frequencies are 500MHz and510MHz, respectively.Before starting the PSS analysis for initial condition calculations,Trying PSS for PDisto initial condition.is printed out. After the PSS is finished,Trying PAC for PDISTO initial condition.is printed to the screen telling you that a PAC is started for further initial conditioncalculations. Once the initial condition is obtained, PDisto printsStarting PDISTO analysis iterations.and begins PDisto nonlinear iterations. At the end of each iteration, a few piecesof information such as the iteration number, its convergence norm, which nodehad the maximum deviation, and the amount of CPU time spent in the iteration,are printed to the screen.Occasionally, you might see warning messages such asMinimum time step used. Solution might be in error.orJunction current exceeds ‘imelt’. The results computed by Spectreare now incorrect because the junction current model has beenlinearized.You can ignore these warning messages if they appear in the early stage ofPDisto iterations or in the initial condition calculations (PSS). They might beDecember 1999BackPage F-24Close F-24


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto Effectivelycaused by bad starting integration conditions and do not affect the final solution.However, if they appear in the final iteration, the solution might be in error.References[1] A. ALLGOWER AND K. GEORG, Numerical Continuation Methods,Springer-Verlag, New York, 1990.[2] L. O. CHUA AND A. USHIDA, Algorithms for computing almost periodicsteady-state response of nonlinear systems to multiple inputfrequencies, IEEE Trans. Circuits and Systems, 28 (1981), pp. 953-971.[3] D. FENG, J. PHILLIPS, K. NABORS, K. KUNDERT, AND J. WHITE, Efficientcomputation of quasi-periodic circuit operating conditions via a mixedfrequency/time approach. Submitted to Proceedings of the 36th DesignAutomation Conference, June 1999.[4] K. KUNDERT, J. WHITE, AND A. SANGIOVANNI-VINCENTELLI, A mixedfrequency-time approach for distortion analysis of switching filtercircuits, IEEE J. Solid State Circuits, 24 (1989), pp. 443-451.[5] P. LANCASTER AND M. TISMENETSKY, The Theory of Matrices,Academic Press, second ed., 1985.[6] Y. SAAD, Iterative methods for sparse linear systems, PWS PublishingCompany, 1996.[7] R. TELICHEVESKY, K. S. KUNDERT, AND J. K. WHITE, Efficientsteady-state analysis based on matrix-free Krylov-subspaceDecember 1999BackPage F-25Close F-25


Affirma RF Simulator (SpectreRF) User Guide<strong>Using</strong> PDisto Effectivelymethods, in Proceedings of the 1995 Design Automation Conference, June1995.[8] _____, Efficient AC and noise analysis of two-tone RF circuits, inProceedings of the 1996 Design Automation Conference, June 1996.December 1999BackPage F-26Close F-26

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!