190
Circuit Simulator-1 Circuit Simulator The Ansoft Designer® Circuit simulator offers full linear, nonlinear and transient analysis for microwave and RF circuit design. The circuit simulator runs seamlessly within the Designer desk- top, a Windows-standard schematic capture, layout, and simulation environment. A library of over 100,000 active and passive devices supports linear and nonlinear simulations with unparalleled accuracy and reliability. This intuitive tool enables key decisions and trade-offs to be made up front, allowing designers to make creative, effective, and responsible circuit level decisions that speed time-to-market and reduce costs. Features and Capabilities of the Circuit Simulator Designer offers a powerful range of circuit, system, and electromagnetic simulation tools for the modern RF and microwave designer. Our user interface provides an intuitive, easy-to-use environ- ment that allows the user to maximize productivity and facilitates data transfer between the simula- tor and other tools, such as word processors and presentation software. Circuit offers full linear, nonlinear and transient analysis features, including integrated schematic capture, tuning and optimization. Libraries of commercial components feature over 100,000 active and passive devices, allowing easy access to standard transistors, diodes, resistors, capacitors, and inductors from major manufacturers. In addition, utilities are included to speed the process of trans- mission line design, matching network extraction, and filter synthesis for both lumped and distrib- uted designs. An integrated layout editor automates the artwork generation process. Nonlinear Analysis Designer’s circuit simulator was the first harmonic-balance nonlinear circuit simulator (brought to market over 10 years ago). Today Ansoft offers the latest enhancements, including Krylov meth- ods, to reduce analysis time and memory requirements. In addition to efficiency, Circuit offers the most robust nonlinear simulation capability available. Time after time, designers have demonstrated that Circuit offers the best convergence of any tool in its class while achieving the most accurate simulation results.

Circuit Simulator

Embed Size (px)

Citation preview

Page 1: Circuit Simulator

Circuit Simulator

The Ansoft Designer® Circuit simulator offers full linear, nonlinear and transient analysis for microwave and RF circuit design. The circuit simulator runs seamlessly within the Designer desk-top, a Windows-standard schematic capture, layout, and simulation environment. A library of over 100,000 active and passive devices supports linear and nonlinear simulations with unparalleled accuracy and reliability. This intuitive tool enables key decisions and trade-offs to be made up front, allowing designers to make creative, effective, and responsible circuit level decisions that speed time-to-market and reduce costs.

Features and Capabilities of the Circuit SimulatorDesigner offers a powerful range of circuit, system, and electromagnetic simulation tools for the modern RF and microwave designer. Our user interface provides an intuitive, easy-to-use environ-ment that allows the user to maximize productivity and facilitates data transfer between the simula-tor and other tools, such as word processors and presentation software.Circuit offers full linear, nonlinear and transient analysis features, including integrated schematic capture, tuning and optimization. Libraries of commercial components feature over 100,000 active and passive devices, allowing easy access to standard transistors, diodes, resistors, capacitors, and inductors from major manufacturers. In addition, utilities are included to speed the process of trans-mission line design, matching network extraction, and filter synthesis for both lumped and distrib-uted designs. An integrated layout editor automates the artwork generation process.

Nonlinear AnalysisDesigner’s circuit simulator was the first harmonic-balance nonlinear circuit simulator (brought to market over 10 years ago). Today Ansoft offers the latest enhancements, including Krylov meth-ods, to reduce analysis time and memory requirements.In addition to efficiency, Circuit offers the most robust nonlinear simulation capability available. Time after time, designers have demonstrated that Circuit offers the best convergence of any tool in its class while achieving the most accurate simulation results.

Circuit Simulator-1

Page 2: Circuit Simulator

Features and Capabilities of the Circuit Simulator

Linear AnalysisFor small-signal and passive circuits, the circuit simulator includes a full set of linear analysis tools for tuning and optimization. The software includes an extensive library of distributed elements. The unique Multiple Coupled Line (MCPL) model allows for analysis of up to 20 simultaneously cou-pled lines, while the device library contains models for popular chip components, such as resistors, capacitors, and inductors.

Nonlinear FeaturesCircuit’s nonlinear analysis capabilities are suitable for a wide range of applications including:• Amplifiers that model both the linear region and IMD created by the nonlinear transfer charac-

teristic• Power amplifiers• Digitally modulated amplifiers• Oscillators and VCOs, including industry-leading phase noise features• Mixers, including noise• Limiters• DetectorsAvailable outputs include:• Spectral plots• Waveforms• Eye diagrams/constellations• ACPR plots• Spectral regrowth• Multidimensional sweeps, including gain, power, conversion loss, frequency v voltage, and

any variables in an analysis• Dynamic load lines• Phase noise and mixer noise figure• 2-D and 3-D graphs, and tabular data• Subset of PSpice® syntax Modulation analysis permits circuits to be simulated using digital modulation schemes. Available sources include GMSK, Pi/4DQPSK, PSK, QASK/QAM, and CDMA. Although these sources are fully user-definable, they are configured by default to represent common commercial standards such as IS-54, IS-95, and GSM.Full tuning and optimization capabilities are available with nonlinear analysis, including optimiza-tion of phase noise for oscillators. Circuit also supports the widest range of nonlinear device models for active devices, allowing the strengths of each model to be exploited for appropriate applica-tions.

Circuit Simulator-2

Page 3: Circuit Simulator

Circuit Simulator Options

Nonlinear stability analysis is available, allowing wideband determination of circuit stability. Using DC Nyquist criteria, Circuit can predict out-of-band resonances and determine the correct solution for oscillators that exhibit bifurcation properties (that is, it can determine the dominant frequency for multi-stable circuits).

HFSS IntegrationHFSS designs become integrated components in Designer. When Designer integrates HFSS designs, terminal data from the HFSS model is used, if it is available. Otherwise, modal data is used. You can interpolate between HFSS design variations in the Designer circuit or simulate miss-ing variations using HFSS. For more information about integrating HFSS designs into Designer, see Adding an HFSS Circuit to a Design.

Circuit Simulator OptionsWhen you select Circuit Options from the Tools > Options submenu, the following dialog is displayed:

The following controls are available:• Show details for every analysis specifies that the Design icon in the Message window

will expand to show all messages from the simulation as it runs. The default is not to expand the Design icon unless there are warnings.

• Use circuit S-parameter definition controls the definition for port impedances. For Cir-cuit designs, this option should typically be selected (checkbox checked).The definition of a “matched port” depends on the application. In applications that deal mostly with circuit quantities (including the Nexxim, Circuit, and System simulators), a “matched port” has a characteristic impedance that maximizes the power transfer. This is also called a “conjugate match.” In applications that deal mostly with electromagnetic quantities (including HFSS and Planar EM), a “matched port” has a characteristic imped-ance that maximizes the transfer of the voltage wave. The two definitions differ only by the conjugate of the characteristic impedance of the port. For real port impedances, there is no difference.

Circuit Simulator-3

Page 4: Circuit Simulator

2Inserting a Circuit Design into a Project

To insert a Circuit design into a project:1. Do either of the following:• a. In the project tree, select the project into which you want to insert the design.

b. On the Project menu, click Insert Circuit Design.• In the project tree, right-click the icon for the project into which you want to insert a Circuit

design, point to Insert, and then click Insert Circuit Design.The Choose Layout Technology dialog box opens.

2. In the Choose Layout Technology dialog box, do one of the following:• Click a technology, and then click Open;• Click Browse, browse to (or manually type the name of) a technology file, and click OK; or• Click None.A blank Circuit schematic opens in the schematic editor.

Warning Pathnames to technology files must be less than 128 characters in length. Pathnames longer than 128 characters may render technology files inaccessible and require Designer to be restarted.

Inserting a Circuit Design into a Project2-1

Page 5: Circuit Simulator

Title

1Linear Network Analysis

Linear Network Analysis 1-1

Page 6: Circuit Simulator

Title

Linear Analysis is used for simulation of all passive circuits, as well as active circuits that operate under small signal conditions. In linear analysis the signal level and termination values do not influence the operation of circuit components, and the superposition principle holds true.Linear analysis requires at least one circuit design, and a sweep-parameter definition for either fre-quency or time. Any nonlinear devices are linearized at the bias point, so a bias-point solution is also possible.Following a successful linear-circuit analysis, Designer automatically updates and displays the sim-ulated electrical characteristics of the circuit under small-signal conditions. The basic output results include scattering, impedance and admittance parameters; for two-port networks, the possible results include stability, noise, gain (voltage and power), and matching parameters.

Linear Analysis: Frequency DomainIn this case the Linear Network Analysis command (.NWA) performs a linear frequency-domain analysis. Circuit components are analyzed using a modified Y-matrix analysis, and any nonlinear devices are linearized around their bias points when computing the bias values. (The analysis is identical to small-signal analysis, but no AC signals need be applied, so the method is exact.)The basic outputs of the analysis are the linear network parameters (S, Y, and Z) and port parameters (RHO, VSWR). Additional results are available for the following cases:

• If the circuit is a two-port, then the possible outputs include gain and noise figure. • If a bias-point analysis is specified, the DC currents and voltages are available as out-

puts.

To Set Up a Basic Frequency-Domain Analysis1. On the Circuit menu, click Add Solution Setup. .2. The Solution Setup dialog box opens, and Linear Network Analysis is, already selected in

the Analysis Type list.3. Type an Analysis Name (or accept the default name, for example “NWA1”). Make sure that

Frequency Domain is selected in the Category list.4. For most simulations, leave the Disable this analysis unselected (the default setting). But

depending on the needs of a particular project, selecting this box lets you store multiple analy-sis-setups for later use. (Note that if this feature is used, any changes made to the design will invalidate the simulation results.)

5. Click Next, and the Linear Network Analysis, Frequency Domain dialog box appears. 6. Depending on the requirements of the project, you can select Enable Group Delay Calcula-

tions (for aditional details, see Group Delay Analysis, later in this topic).7. To add a basic frequency sweep do either of the following:

• In Linear Network Analysis, Frequency Domain, a. Click Add, and the Add/Edit Sweep dialog box appears.b. In the Variable list, make sure that F is selected (default value), and then select

one of the following: Single value, Linear step, Linear count, Decade count,

1-2 Linear Network Analysis

Page 7: Circuit Simulator

Title

Octave count, or Exponential count. c. Type the sweep values into the Start, Stop, and Step text boxes, and make sure

that the appropriate units (GHz, MHz, kHz) are selected for each. d. Click Add, and then click OK to close the Add/Edit Sweep dialog box. e. When Linear Network Analysis, Frequency Domain reappears.

• Or, in Linear Network Analysis, Frequency Domain:a. Click anywhere in the area under Name and Sweep Value. b. Type the sweep parameters and netlist syntax directly into the text box.

8. For a basic frequency-domain analysis, click Finish.9. Optional: To customize the analysis (for example, to add Verbose mode):

a. Click Solution Options, and the Solution Options dialog box appears.b. Make the appropriate selections, click OK, and return to the Linear Network

Analysis, Frequency Domain dialog box. c. For more information, see Solution Optionssolution options in Designer Help.

10. To set up an advanced sweep (for example, to sweep a circuit parameter or a bias source), see Advanced Sweep Options in Designer Help.

11. Run the simulation: a. On Circuit menu, click Start Analysis. If the circuit is set up correctly, the analysis

begins immediately and a red progress bar appears. b. If the analysis is not successful, check the Message Window for an explanation, and

then take corrective action.12. Display results:

a. On the menu bar, click Circuit and then click Create Report. The Create Report dialog box appears.

b. When the Traces dialog box appears, make the appropriate selections, click Add Trace, and then click Done.

c. For more information, see Generating Reports and Post-Processing in Designer Help.

Netlist Parameters and Syntax.NWA[:name] F = SwpDef [GD = ON | OFF] [PERT = cval]+ [anaSwpDef]+ [SWPORD = {anaSwpOrderDef}]

Parameter Description Default Comments

Linear Network Analysis 1-3

Page 8: Circuit Simulator

Title

Netlist Examples• The following linear analysis takes place from 1 GHz to 10 GHz in steps of 1 GHz. If there are

any nonlinear models present, the bias point is analyzed and the devices will be linearized:.NWA:1 F=LIN 1GHz 10GHz 1GHz

• Similar to above, but finer frequency steps of 100 MHz are taken between 5 GHz and 6 GHz:.NWA:2 F=LIN 1GHz 10GHz 1GHz LIN 5GHz 6GHz 100MHz

• This analysis takes place from 1 kHz to 1 GHz with a logarithmic sweep and 9 analysis points for each decade of frequency. Between 100 MHz and 1 GHz, additional frequencies are added every 50 MHz:.NWA:3 F=DEC 1kHz 1GHz 9 LIN 100MHz 1GHz 50MHz

• The sweep specifications used for F can be arbitrarily mixed with any number of different sweeps or discrete points given. The frequency list is sorted for monotonically increasing fre-quency, and any duplicate frequency points are removed.

Notes1. Parameter keyword values in the Linear Network Analysis command (.NWA) can be algebraic

expressions or simple parameters. But an expression must be evaluated prior to analysis. (In other words, the keyword parameter cannot be dependent on an analysis variable, for example,

F One or more frequencies (or a sweep specification of frequencies for analysis)

GD Toggles group delay calculations

OFF

PERT Perturbation for GD analysis 0.001

anaSwpDef The actual valus that define swept parameters.

none When sweeping bias sources, the only parameters that can be swept are voltage (V) and current (I) for the DC sources

anaSwpOrderDef The values that define the order in which the parameters get swept.

SWPORD Defines ordered sweep The first entry defines the innermost loop

1-4 Linear Network Analysis

Page 9: Circuit Simulator

Title

"F.")2. If a value is assigned by a parameter which is swept, only the original value of the parameters

is used (in other words, the sweep values will be ignored).

Group-Delay AnalysisGroup delay analysis determines the delay of the propagation of energy at a given frequency point. This analysis is defined as the derivative of the phase of a network parameter with respect to fre-quency. Since we are interested in power propagation, S parameters are commonly used:GDij = dSij / dωTo compute group delay, numerical perturbation is used to compute the derivative. At each fre-quency, two analyses are computed (one at the nominal frequency, and a second at the perturbed frequency). The perturbed frequency is:F' = F × (1.0 + PERT)The offset between the nominal and perturbed frequencies can be modified from their default val-ues to avoid problems caused by the computer’s precision limitations. The default for PERT is 0.001 (0.1%) which is acceptable for most circuits. However, smaller val-ues may yield more accurate results for circuits with high-Q components, or those with sharp pass-bands-stopbands. Larger values may yield more accurate results for large circuits that use very numerically complex models (such as the Tee or MCPL components), where truncation errors can accumulate. The typical range for PERT is 0.1 to 1.0E-7. Negative values for PERT will use a perturbed fre-quency less than the nominal frequency. (If very fine frequency steps are used, care should be taken to make sure the perturbation is less than the frequency step.)

Linear Network Analysis 1-5

Page 10: Circuit Simulator

Title

Linear Analysis: Steady-State Time-DomainIn this case the frequency-domain results from linear-network (.NWA) analysis are transformed into the time domain via the Fast Fourier Transform (FFT), which presents steady-state (periodic) information about network parameters in the time domain. The response of a circuit to a periodic excitation of impulses or steps can be computed if the time interval between impulses (or between leading edges of a step) is sufficiently long, i.e., the transient must die out, thus eliminating aliasing error.In general, the Fourier transform is not frequency limited, but the discrete FFT uses a Fourier series expansion to make a periodic extension of the frequency data. The real part of the computed fre-quency response is extended as an even function of frequency, and the imaginary part is extended as an odd function of frequency.Additionally, the time-domain response to an arbitrary user-defined waveform can be computed using the data points of the waveform that are specified in an .NPORTDATA statement (where each sample value is identified by a time value and a voltage magnitude). The first and last sample points must have the same value so the sequence is periodic and discontinuities are avoided, and linear interpolation is used to change the input data to the time samples of the analysis. The N-port component is included in the circuit and references the .NPORTDATA statement. (See Creating and Placing N-Ports for details.)If there are nonlinear devices in the circuit, a bias-point analysis is performed, each device is linear-ized at its bias point, and linear analysis in the frequency domain proceeds.After analysis, linear network parameters (S, Y, and Z) are available as outputs. The DC currents and voltages are also available, if a bias-point analysis was done. The bias sources (current and voltage) and circuit parameters can be swept (same as Frequency Domain Analysis, above). A separate analysis will be conducted at each source and parameter value. For additional information, see Advanced Sweep Options in Designer Help.

To Set Up a Steady-State Time Domain Analysis1. On the Circuit menu, click Add Solution Setup. .2. The Solution Setup dialog box opens, and Linear Network Analysis is, already selected in

the Analysis Type list.3. Type an Analysis Name (or accept the default name, for example “NWA1”). In the Category

list, select Steady-State Time Domain.4. For most simulations, leave the Disable this analysis unselected (the default setting). But

depending on the needs of a particular project, selecting this box lets you store multiple analy-sis-setups for later use. (Note that if this feature is used, any changes made to the design will invalidate the simulation results.)

5. Click Next, and the Linear Network Analysis, Steady-State Time Domain dialog box appears.

6. Enter the basic time-domain parameters:

1-6 Linear Network Analysis

Page 11: Circuit Simulator

Title

a. In the Period text box, type the time duration (“time window”) for the simulation. b. In the Time Step text box, type the time increment to be used for analysis. c. Make sure that the correct units are selected for each parameter.

7. For a basic analysis, click Finish and run the analysis (step 10). 8. Optional: To customize the analysis (for example, to add Verbose mode):

a. Click Solution Options, and the Solution Options dialog box appears. Select Default Options and then click Edit.

b. Make the appropriate selections, click OK, and return to the Linear Network Analysis, Steady-State Time Domain dialog box.

c. For more information, see Solution Options in Designer Help.9. Optional: To sweep a predefined variable, do either of the following:

• In Linear Network Analysis, Steady-State TimeDomain, a. Click Add, and the Add/Edit Sweep dialog box appears.b. In the Variable list, make sure that F is selected (default value), and then select

one of the following: Single value, Linear step, Linear count, Decade count, Octave count, or Exponential count.

c. Type the sweep values into the Start, Stop, and Step text boxes, and make sure that the appropriate units (GHz, MHz, kHz) are selected for each.

d. Click Add, and then click OK to close the Add/Edit Sweep dialog box. e. When Linear Network Analysis, Steady-State Time Domain reappears, click

Finish.f. Click Finish to close the Linear Network Analysis, Steady-State Time

Domain dialog box.• Or, in Linear Network Analysis, Steady-State Time Domain:

a. Click anywhere in the area under Name and Sweep Value. b. Type the sweep parameters and netlist syntax directly into the text box, and then

click Finish. • For more information, see Advanced Sweep Options in Designer Help.

10. Run the simulation: a. On Circuit menu, click Start Analysis. If the circuit is set up correctly, the analysis

begins immediately and a red progress bar appears. b. If the analysis is not successful, check the Message Window for an explanation, and

then take corrective action.11. Display results:

a. On the menu bar, click Circuit and then click Create Report. The Create Report dialog box appears.

b. When the Traces dialog box appears, make the appropriate selections, click Add Trace, and then click Done.

Linear Network Analysis 1-7

Page 12: Circuit Simulator

Title

c. For more information, see Generating Reports and Post-Processing in Designer Help.

Netlist Syntax and Parameters.NWA[:name] TIME Window Increment+ [anaSwpDef]+ [SWPORD = {anaSwpOrderDef}]

Parameter Description Default Comments

TIME The TIME keyword takes two real values: Window and Increment

Window Time window of analysis ("period"): The period between impulses or step leading edges.

Increment Time increment of analysis ("sample rate"): The lowest frequency in the analysis is determined by Window and the highest frequency is determined by Increment.

anaSwpDef Definition of swept parameters

none When sweeping bias sources, the only parameters that can be swept are voltage (V) and current (I) for the DC sources

1-8 Linear Network Analysis

Page 13: Circuit Simulator

Title

Netlist ExampleThe following example takes place over a time interval of 10 ns using a sampling rate of 0.1 ns. The lowest frequency of the analysis (besides DC) is 100 MHz and the highest is 10 GHz. If there are any nonlinear models present, the bias point is analyzed and the devices are linearized.NWA:1 TIME 10ns 0.1ns

Notes1. Parameter keyword values in the Linear Network Analysis command (.NWA) can be alge-

braic expressions or simple parameters. But an expressions must be evaluated prior to analysis (in other words, the keyword parameter cannot be dependent on an analysis variable, for exam-ple, "F").

2. If a value is assigned by a parameter which is swept, only the original value is used (in other words, the sweep values will be ignored).

Responses to an Arbitrary Time SignalThe shape of an arbitrary time signal is defined by an external time-data file, specified by sample values at each time step within the time window. Each sample value is a voltage magnitude pre-ceded by a time value. The first and last sample points must have the same value for the signal to be expandable to peri-odic form without any discontinuities. Linear interpolation is used to fill in any sample values which are omitted. The time data is defined in a black box two port component and in this way is included in the simulation of all the circuits.

anaSwpOrderDef The values that define the order in which the parameters get swept.

SWPORD Defines ordered sweep

The first entry defines the innermost loop

Linear Network Analysis 1-9

Page 14: Circuit Simulator

Title

Linear Analysis: Pulse Modulated CarrierIn this case, the time-domain response of the circuit for a pulse-modulated carrier is computed: The frequency-domain results from linear network analysis are transformed into the time domain by applying the FFT, which yields steady-state (periodic) information of network parameters in the time domain.The analysis parameters are used to compute a frequency-list that is centered at the carrier, includ-ing the lower and upper spectrum. For these lower and upper spectra, the number of frequency components is equal to the specified number of sidebands.If there are nonlinear devices in the circuit, a bias-point analysis is performed, each device is linear-ized at its bias point, and linear analysis in the frequency domain proceeds.After analysis, linear network parameters (S, Y, and Z) are available as outputs. The DC currents and voltages are also available, if a bias-point analysis was done.The bias sources (I and V) and circuit parameters can be swept (same as Frequency Domain Analy-sis, above). A separate analysis will be conducted at each source and parameter value. See the Advanced Options, below, for details.

To Set Up a Steady-State Pulsed Carrier Time Domain Analysis1. On the Circuit menu, click Add Solution Setup. .2. The Solution Setup dialog box opens, and Linear Network Analysis is, already selected in

the Analysis Type list.3. Type an Analysis Name (or accept the default name, for example “NWA1”). In the Category

list, select Steady-State Pulsed Carrier Time Domain.4. For most simulations, leave the Disable this analysis unselected (the default setting). But

depending on the needs of a particular project, selecting this box lets you store multiple analy-sis-setups for later use. (Note that if this feature is used, any changes made to the design will invalidate the simulation results.)

5. Click Next, and the Linear Network Analysis, Steady-State Pulsed Carrier Time Domain dialog box appears.

6. Enter the basic analysis parameters:a. In the Carrier Frequency text box, enter the RF frequency.b. Under Pulse Repetition, select either Pulse Rate or Pulse Repetition Period and enter

the appropriate value. c. Enter the appropriate value for Modulating Pulse Width.d. In the Sideband Limits text box, enter either the No. of Sidebands (an integer) or the

Max. Envelop Amplitue (a percentage, in decimal).e. Make sure that the correct units (GHz, MHz, kHz) are selected for each parameter.

7. For a basic analysis, click Finish and run the analysis (step 10).

1-10 Linear Network Analysis

Page 15: Circuit Simulator

Title

8. Optional: To customize the analysis (for example, to add Verbose mode):a. Click Solution Options, and the Solution Options dialog box appears. Select

Default Options and click Edit. b. Make the appropriate selections, click OK, and return to the Linear Network

Analysis, Steady-State Pulsed Carrier Time Domain dialog box. c. For more information, see Solution Options in Designer Help.

9. Optional: To sweep a predefined variable, do either of the following:• In Linear Network Analysis, Steady-State Pulsed Carrier TimeDomain,

a. Click Add, and the Add/Edit Sweep dialog box appears.b. In the Variable list, make sure that F is selected (default value), and then select

one of the following: Single value, Linear step, Linear count, Decade count, Octave count, or Exponential count.

c. Type the sweep values into the Start, Stop, and Step text boxes, and make sure that the appropriate units (GHz, MHz, kHz) are selected for each.

d. Click Add, and then click OK to close the Add/Edit Sweep dialog box. e. When Linear Network Analysis, Steady-State Pulsed Carrier Time Domain

reappears, click Finish.f. Click Finish to close the Linear Network Analysis, Steady-State Time

Domain dialog box.• Or, in Linear Network Analysis, Steady-State Time Domain:

a. Click anywhere in the area under Name and Sweep Value. b. Type the sweep parameters and netlist syntax directly into the text box, and then

click Finish. • For more information, see Advanced Sweep Options in Designer Help.

10. Run the simulation: a. On Circuit menu, click Start Analysis. If the circuit is set up correctly, the analysis

begins immediately and a red progress bar appears. b. If the analysis is not successful, check the Message Window for an explanation, and

then take corrective action.11. Display the results:

a. On the menu bar, click Circuit and then click Create Report. The Create Report dialog box appears.

b. When the Traces dialog box appears, make the appropriate selections, click Add Trace, and then click Done.

c. For more information, see Generating Reports and Post-Processing in Designer Help.

Linear Network Analysis 1-11

Page 16: Circuit Simulator

Title

Netlist Syntax and Parameters

Netlist ExampleThe following analysis takes place with a center frequency of 5 GHz, a pulse repetition rate of 100 ns, a pulse width of 20 ns and the number of sidebands includes are those whose envelope value is greater than 0.01.

NWA:1 PULSE 5GHz 100ns 20ns 0.01

Notes1. Parameter keyword values in the Linear Network Analysis command (.NWA) can be algebraic

expressions or simple parameters. But an expressions must be evaluated prior to analysis (in other words, the keyword parameter cannot be dependent on an analysis variable, for example, "F").

2. If a value is assigned by a parameter which is swept, only the original value is used (in other words, the sweep values will be ignored).

Parameter Description

PULSE The PULSE keyword takes four real values: Fcarrier RatePeriod Width Sideband

Fcarrier Frequency of the carrier

RatePeriod For values > 1.0Pulse rate in Hertz For values < 1.0Pulse repetition period in seconds

Width Modulating pulse width in seconds

Sideband For values > 1.0Number of single sidebands used for the calculationFor values < 1.0Sidebands are included until the sin(x)/x envelope is < SidebandThe default value for Sideband is 0.01.

1-12 Linear Network Analysis

Page 17: Circuit Simulator

26Circuit Response Definitions

This topic provides a reference for all circuit response keywords that are supported in Designer. The coverage is divided into two major sections, one for responses available for linear network analysis and one for responses available for harmonic-balance nonlinear analysis.

Linear Network Analysis Circuit ResponsesThe responses for linear network analysis are categorized into the following sections:

Display Parameters in the Report EditorThe format for linear and small-signal circuit responses is:

CircuitResponse(CKT=arg1 term=arg2)

where

Display Parameters Circuit responses available in the Traces dialog.

OUT Block Parameters Circuit responses specified in the OUT block to indicate a special analysis; for example, group delay.

OPT Block Parameters Circuit responses available for optimization.

STAT Block Parameters Circuit responses available for statistical analysis.

CircuitResponse identifies the response parameter, for example, S11.

Circuit Response Definitions26-1

Page 18: Circuit Simulator

Linear Network Analysis Circuit Responses

The CKT and term parameters are optional. If CKT is not specified, the top-level circuit will be used. If term is not specified, the global default terminations will be used. Multiple term keywords may be used to terminate circuit ports individually and differently.Examples:

S21S21(CKT=cktA R2=600.0)S21(CKT=cktA R1=75 Z2=60+j10 Z3=IMP(ckt1Port))

Complex Numbers Formats for Display Parameters and ExpressionsComplex numbers can be specified in real-imaginary or magnitude-angle format:1. Real-Imaginary numbers take the form x+jy, where x and y are the real and imaginary parts of

the complex value, respectively. They can be integers, floating point, or exponential-format numbers, for example, 3+j5, 3.5−j4.6, 1.2E2+j5.5.

2. Magnitude-Angle numbers take the form (r a) where r is the magnitude and a is the angle in degrees. They can be integers, floating point, or exponential-format numbers—for example, (30 60), (75.3 22.5), (1.1E2 1.3E1).

arg1 is the circuit name. CircuitResponse will be computed using this circuit.For an analysis that includes nonlinear devices, arg1 must include the instance path since active devices in subcircuits may have different bias points. For example, A_1.B_2 where B_2 is the instance of subcircuit B referenced from the instance of subcircuit A_1.

term is either R or Z followed by a port number, e.g. R1. R is used for real termination and Z is used for complex termination in real-imaginary or magnitude-angle format.

arg2 is the value of R or Z.Z can also be set to the impedance of a one-port circuit or data label by using the IMP() function, e.g. Z1=IMP(ckt1Port). Note: Not available in SSAC analysis.

Circuit Response Definitions26-2

Page 19: Circuit Simulator

Linear Network Analysis Circuit Responses

Reference Circuit Definitions for Two-Port Responses

The circuit responses for two-port circuits use the impedance and reflection coefficient definitions used in the figure. A common quantity used defines the determinant of the [S] matrix representing the two-port and is defined as

Zs

Vs ZL

Γs

ZIN ZOUT

ΓIN ΓOUT ΓL

V1 V2Two-portNetwork

[S]

+

-

+

-

∆ = − S S S S11 22 12 21

Circuit Response Definitions26-3

Page 20: Circuit Simulator

Linear Network Analysis Circuit Responses

Parameters for N-Port Circuits

Single Port Parameters for N-Port Circuits

Parameters for Two-Port Circuits

Gain and Matching Parameters for Two-Port Circuits

Sij Complex S parameter

Yij Complex Y parameter

Zij Complex Z parameter

GDij Real Group Delay (not available in linear network analysis),

where φij=phase(Sij)

RHOi Complex Reflection coefficient,

RTLi Real Return loss ,

VSWRi Real Voltage standing wave ratio,

Aij Complex ABCD parameters (chain parameters). For linear network analysis, use ABCDij.

Hij Complex Hybrid parameters

Gij Complex Inverse Hybrid parameters

GA Available power gain,

GFMN Gain when the input impedance (Zopt) is used to achieve minimum noise figure (FMIN)

GMAX Real Maximum available gain ,

GD ijijd

d=φ

ω

RHOi Sii=

RTLi Sii=VSWRi

S

Sii

ii

=+

1

1

GA =−

− −

= +−

1

1

1

1

1

2

11

2 21

2

2

2212 21

11

Γ

Γ Γ

ΓΓ

Γ

S

S OUT

OUTS

S

SS where

SS S

S

,

( )GMAX =

− −

− −

1

1

1

1

1

11

2 21

2

22

2

21

12

2

SS

Sunilateral case

S

SK K bilateral case

,

,

Circuit Response Definitions26-4

Page 21: Circuit Simulator

Linear Network Analysis Circuit Responses

GML Complex Optimum gain reflection coefficient for Load at maximum available gain (GMax) , where,

, ,

GMS Complex Optimum gain reflection coefficient for Source at maximum available gain (GMax),

,

,

,

GP Power gain,

TG Transducer power gain,

MSG Real Maximum stable gain ,

UPG Unilateral power gain,

YMS Source admittance at maximum available gain (GMAX), where ZS is the source impedance.

YML Load admittance at maximum available gain (GMAX), where ZL is the load impedance.

ZMS Source impedance at maximum available gain (GMAX),

ZML Load impedance at maximum available gain (GMAX),

GML =± −B B C

C2 2

22

2

2

42

B S S2 222

112 21= + − − ∆

C S S2 22 11= − ∗∆

GMS =± −B B C

C1 1

21

2

1

42

B S S1 112

222 21= + − − ∆

C S S1 11 22= − ∗∆GP =

− −

= +−

1

1

1

1

1

2

22

2 21

2

2

1112 21

22

Γ

Γ Γ

ΓΓ

Γ

L

L IN

INL

L

SS where

SS S

S

,

TGS

SS

S

L

OUT L

=−

1

1

1

1

2

112 21

22

2

Γ

Γ

Γ

Γ Γ

MSG =S

S21

12

UPG =− −

=1

1

1

10

11

2 21

2

22

2 12S

SS

when S,

YMSGMSGMS

=−+

1 11ZS

YMLGMLGML

=−+

1 11Z L

ZMSYMS

=1

ZMLYML

=1

Circuit Response Definitions26-5

Page 22: Circuit Simulator

Linear Network Analysis Circuit Responses

Port Parameters for Two-Port Circuits

Stability Parameters for Two-Port Circuits

Noise Parameters for Two-Port Circuits

YIN Input admittance with port 2 terminated, where YL is the load admittance.

YOUT Output admittance with port 1 terminated, where YS is the source admittance.

ZIN Input impedance with port 2 terminated, where ZL is the load impedance.

ZOUT Output impedance with port 1 terminated, where ZS is the source impedance.

B1 B1 term of the stability factor,. For SSAC analysis, use BI.

K Real Stability factor k

MU Real Stability factor mu

KCSR Real Stability circle radius for Source ,

KCLR Real Stability circle radius for Load ,

KCSO Complex Stability circle origin for Source ,

KCLO Complex Stability circle origin for Load

FMIN Real Minimum noise figure power ratio. FMIN is derived from fundamental noise quantities.

NF Real Noise figure power ratio. NF is derived from fundamental noise quantities.

YIN = −+

YY Y

Y YL11

12 21

22

YOUT = −+

YY Y

Y YS22

12 21

11

ZIN = −+

ZZ Z

Z Z L11

12 21

22

ZOUT = −+

ZZ Z

Z ZS22

12 21

11

B1 = + + −1 11

2

22

2 2S S ∆

K =− − +1

211

2

22

2 2

21 12

S S

S S

( )MU =

− +

1 222

11 22 21 12

SS S S S∆ *

KCSR =−

S S

S12 21

11

2 2∆

KCLR =−

S S

S12 21

22

2 2∆

( )KCSO =

∗ ∗S S

S

11 22

11

2 2

∆( )

KCLO =−

∗ ∗S S

S

22 11

22

2 2

Circuit Response Definitions26-6

Page 23: Circuit Simulator

Linear Network Analysis Circuit Responses

Two-Port Voltage Gain Parameters

Voltage and Current Probe Parameters

The name includes the hierarchical path. The hierarchy is traced from the top-level circuit through subcircuit instance names to the probe (for example, Vp(cktA1.cktB1.p1). The top-level circuit is terminated in the port termination(s) specified in the analysis. In schematic, the terminations are properties of the ports themselves. For netlists, the terminations are specified in the NOUT block.

Parameters for Linear Network Analysis Time-Domain ResponsesNote Time domain responses are valid only when time specifications are included in the analysis.

NT Real Equivalent noise temperature,

RN Real Equivalent normalized noise resistance ratio. RN is derived from fundamental noise quantities.

RNU Real Equivalent un-normalized noise resistance,

GOPT Complex Optimum noise figure reflection coefficient,

YOPT Complex Optimum noise figure source admittance, , where Go and Bo are derived from fundamental noise quantities.

ZOPT Complex Optimum noise figure source impedance,

VGIO Complex Voltage gain input-output,

VGIN Complex Voltage gain insertion,

VGSL Complex Voltage gain source-load,

Vp(name) Complex voltage of the probe element name.

Ip(name) Complex current of the probe element name.

TI(z, RT=r) Real Impulse response for Time domain simulation. z represents the circuit response of Sij, Yij, or Zij. r is the rise time used in the calculation.

NT NF= −( ) *1 290

RNU RN= * ZREF

GOPTZoptZopt

=−+

ZsZs

YOPT = +Go jBo

ZOPT YOPT= 1

VGIO = V V

2

1

VGIN VGSL ZZ

SL

= +

1

VGSL = V V

2

S

Circuit Response Definitions26-7

Page 24: Circuit Simulator

Linear Network Analysis Circuit Responses

OUT Block ParametersThe OUT block is automatically generated when needed for schematic users. For netlist users, the OUT block is needed only for group delay calculations.

If group delay is desired, include the following in the netlist:OUTPRI cktName S GD PERT=valEND

Using PERT is optional.Schematic users enter the information in the linear FREQ block component and fill out the proper-ties for GD (ON or OFF), PERT, and OPTION (S or VG).

OPT and STAT Block ParametersThe OPT and STAT blocks share many of the same parameters and syntax. Definitions of the parameters are the same as the display parameters above unless otherwise indicated. For detailed syntax information, see the sections on Optimization Specification and Statistical Analysis in the Control Blocks chapter of the Reference Volume.

TS(z, RT=r) Real Step response for Time domain simulation. z represents the circuit response of Sij, Yij, or Zij. r is the rise time used in the calculation.

TP(z, RT=r) Real Pulse response for Time domain pulse simulation. z represents the circuit response of Sij, Yij, or Zij. r is the rise time used in the calculation.

S GD Indicate to the analysis to calculate group delay, as defined above.

PERT Group delay perturbation factor. The perturbation frequency used in the difference calculation will be perturbed by f*PERT.

S Device modeling to match S parameters to measured data or another circuit. For example, S=data_ref where data_ref is the name of a data block or another circuit. See Circuit Modeling Goals in the Optimization Specification section in the Control Blocks chapter of the Reference Volume for more information.

Y Device modeling to match Y parameters to measured data or another circuit.

Z Device modeling to match Z parameters to measured data or another circuit.

Sij Device modeling to match Sij to measured data or another circuit.

Circuit Response Definitions26-8

Page 25: Circuit Simulator

Linear Network Analysis Circuit Responses

Yij Device modeling to match Yij to measured data or another circuit.

Zij Device modeling to match Zij to measured data or another circuit.

VG1 Device modeling to match VGSL (source-to-load voltage gain) to measured data.

VG2 Device modeling to match VGIN (insertion voltage gain) to measured data.

VG3 Device modeling to match VGIO (input-to-output voltage gain) to measured data.

GDij Specify GDij to a goal.

MSij Specify magnitude of Sij to a goal.

MYij Specify magnitude of Yij to a goal.

MZij Specify magnitude of Zij to a goal.

MVGi

Specify magnitude of VG1, VG2, or VG3 to a goal.

PSij Specify phase (in degrees) of Sij to a goal.

PYij Specify phase (in degrees) of Yij to a goal.

PZij Specify phase (in degrees) of Zij to a goal.

PVGi Specify phase (in degrees) of VG1, VG2, or VG3 to a goal.

RSij Specify real part of Sij to a goal.

RYij Specify real part of Yij to a goal.

RZij Specify real part of Zij to a goal.

RVGi Specify real part of VG1, VG2, or VG3 to a goal.

ISij Specify imaginary part of Sij to a goal.

IYij Specify imaginary part of Yij to a goal.

Circuit Response Definitions26-9

Page 26: Circuit Simulator

Linear Network Analysis Circuit Responses

IZij Specify imaginary part of Zij to a goal.

IVGi Specify imaginary part of VG1, VG2, or VG3 to a goal.

Circuit Response Definitions26-10

Page 27: Circuit Simulator

Linear Network Analysis Circuit Responses

For Two-Ports OnlyK Specify stability factor to a goal.

GMAX Specify maximum available gain to a goal.

NF Specify noise figure to a goal.

UPG Unilateral power gain for two-port circuits.

GFMN Gain when the input impedance (Zopt) is used to achieve minimum noise figure (FMIN) for two-port circuits.

FMIN Specify minimum noise figure to a goal.

GOPT Device modeling to match optimum reflection coefficient for minimum noise figure to complex data or another circuit.

GMS Optimum gain reflection coefficient for source at GMAX, complex.

GML Optimum gain reflection coefficient for load at GMAX, complex.

YMS Source admittance at maximum available gain (GMAX), complex.

YML Load admittance at maximum available gain (GMAX), complex.

ZMS Source impedance at maximum available gain (GMAX), complex.

ZML Load impedance at maximum available gain (GMAX), complex.

YOPT Optimum noise figure source admittance, complex.

ZOPT Optimum noise figure source impedance, complex.

YIN Input admittance with port 2 terminated, complex.

YOUT Output admittance with port 1 terminated, complex.

ZIN Input impedance with port 2 terminated, complex.

ZOUT Output impedance with port 1 terminated, complex.

RHOi Reflection coefficient, complex.

Circuit Response Definitions26-11

Page 28: Circuit Simulator

Nonlinear Circuit Responses

Note All optimizable complex responses for two ports devices may be preceded by R, I, M or P prefix for real, imaginary, magnitude and phase, respectively. For example, RYOUT denotes the real part of YOUT while MZIN indicates the magnitude of ZIN, etc.

For Port Models Only

Group Delay Perturbation

Nonlinear Circuit ResponsesDisplay Parameters

Forms are used for defining graphs and tables that allow very general expressions. Several func-tions are available to manipulate the display parameters. Equations can also be used to obtain data consisting of several display parameters. To obtain responses such as magnitude, use the MAG() function; for example, MAG(V1<H1>). The available functions are given at the end of this chapter.

VSWRi Voltage Standing Wave Ratio, real.

MSG Maximum Stable Gain, real.

GA Available Power Gain, real.

GP Power Gain, real.

TG Transducer Power Gain, real.

NT Equivalent Noise Temperature, real.

RN Equivalent Normalized Noise Resistance Ratio, real.

RNU Equivalent Un-Normalized Noise Resistance Ratio, real.

GBW Specify gain-bandwidth product to a goal

PERT Frequency perturbation for group delay calculations

Circuit Response Definitions26-12

Page 29: Circuit Simulator

Nonlinear Circuit Responses

Definitions

External Port Responses

Hn Harmonic expression that may be for single-, two-, or three-tone analysis. That is, Hi, +/−Hi +/−Hj, +/−Hi +/−Hj +/−Hk, respectively.

i,j Port numbers.

x Single device port index (for example, Ig for gate current)

xy Dual device port index (for example, Vds for drain-source voltage)

z Instance name of device

Ai<Hm> Incident traveling wave at external port i, harmonic m. Time Domain Display: This is the real incident wave waveform, specified as Ai.Spectral Domain Display: Complex incident wave spectrum, specified as Ai.Network Fn/Sweep Domain Display: Select a harmonic component to display the complex incident wave in the frequency domain, specified as Ai<Hm>.Definition:

Bi<Hm> Exiting traveling wave at external port i, harmonic m. Time Domain Display: This is the real exit wave waveform, specified as Bi.Spectral Domain Display: Complex exit wave spectrum, specified as Bi.Network Fn/Sweep Domain Display: Select a harmonic component to display the complex exit wave in the frequency domain, specified as Bi<Hm>.Definition:

A HmV Hm I Hm R

Rii i i

i

< >=< > + < >

2

B HmV Hm I Hm R

Rii i i

i

< >=< > − < >

2

Circuit Response Definitions26-13

Page 30: Circuit Simulator

Nonlinear Circuit Responses

EFi<Hm> Real DC to RF conversion efficiency of the mth harmonic at port i. Use primarily for computing oscillator efficiency. Multiply by 100 to get efficiency in percent.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Select a port and harmonic to display the efficiency, specified as EFi<Hm>Definition:

FO<Hm> Frequency at harmonic m. Use to obtain the oscillation frequency at the first or higher harmonics. The default unit is the hertz.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Select a harmonic to display the frequency, specified as FO<Hm>

GCij<Hm,Hn> Complex general conversion transfer parameters between output port i, harmonic m and input port j, harmonic n. These are the large-signal analogy to S parameters. Use dB() to get the transfer parameter in dB.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Select a harmonic to display the frequency, specified as GCij<Hm,Hn>.Definition: where B and A are the exiting and incident traveling waves, respectively.

EF HmPO Hm

I Vii

Bias biasAll Bias Sources

< >=< >

GC Hm HnB HmA Hnij

i

j< >=

< >< >

,

Circuit Response Definitions26-14

Page 31: Circuit Simulator

Nonlinear Circuit Responses

Ii<Hm> Current into external port i, harmonic m. The default unit is the ampere.Time Domain Display: This is the real current waveform, specified as Ii.Spectral Domain Display: Complex current spectrum, specified as Ii.Network Fn/Sweep Domain Display: Select a harmonic component to display the complex current in the frequency domain, specified as Ii<Hm>.

PAij<Hm,Hn> Real power-added efficiency between output port i, harmonic Hm and input port j, harmonic Hn. Requires a source at port j, harmonic n. Multiply by 100 to get efficiency in percent.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Select a port and harmonic to display the power-added efficiency, specified as PAij<Hm,Hn>Definition:

where Pinj<Hn> is the power absorbed by the network at port j, harmonic Hn.

PA Hm HnPO Hm Pin Hn

I Viji j

Bias BiasAll Bias Sources

< >=< > − < >

∑,

Circuit Response Definitions26-15

Page 32: Circuit Simulator

Nonlinear Circuit Responses

PFi<Hm> Power flux at external port i, harmonic m. Power flux is positive if power is delivered into the network, and it is negative if power is delivered from the network. The default unit is the watt. Use the dBm() function to obtain power in dB with respect to 1 mW (the dBm() function will lose the directional information).Time Domain Display: This is the instantaneous power, specified as PFi.Spectral Domain Display: Power flux spectrum, specified as PFi.Network Fn/Sweep Domain Display: Select a harmonic component to display the power flux in the frequency domain, specified as PFi<Hm>.Definition for time domain: Definition for frequency domain:

POi<Hm> Output power flowing out of the network at external port i, harmonic m. Output power is positive if power exits the network. The default unit is the watt. Use the dBm() function to obtain power in dB with respect to 1 mW (the dBm() function will lose the directional information).Time Domain Display: This is the instantaneous power, specified as POi.Spectral Domain Display: Output power spectrum, specified as POi.Network Fn/Sweep Domain Display: Select a harmonic component to display the output power in the frequency domain, specified as POi<Hm>.Definition for time domain: Definition for frequency domain:

PF v t i ti i i= ( ) ( )

{ }PF Hm V Hm I Hmi i i< >= < > < >12

Re *

PO v t i ti i i= ( ) ( )

PO Hm R I Hm B Hmi i i i< >= < > = < >12

2 12

2

Circuit Response Definitions26-16

Page 33: Circuit Simulator

Nonlinear Circuit Responses

RLi<Hm> Real power return loss at port i, harmonic m. Requires a source at port i, harmonic m. Use dB() to get return loss in dB.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Select a harmonic component to display the power return loss, specified as RLi<Hm>.Definition: where Γ is the reflection coefficient at port i, harmonic m.

SPi<Hm> Real spectral purity of the mth harmonic power at port i. Use dB() to get purity in dB.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Select a harmonic component to display the spectral purity, specified as SPi<Hm>.Definition: where NH are the total number of harmonic components, excluding DC.

TGij<Hm,Hn> Real transducer gain between output port i, harmonic m and input port j, harmonic n. Requires a source at port j, harmonic n. Use dB() to get gain in dBTime Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Select the harmonic components to display the transducer gain, specified as TGij<Hm,Hn>.Definition: where Pavs is the available source power at port j, harmonic n.

RL HmPO Hm

Pavs HmHmi

i

ii< >=

< >< >

= < >Γ2

SP HmPO Hm

PO Hni

i

in n m

NH< >=< >

< >= ≠∑1,

TG Hm HnPO Hm

Pavs Hniji

j< >=

< >< >

,

Circuit Response Definitions26-17

Page 34: Circuit Simulator

Nonlinear Circuit Responses

Vi<Hm> Voltage across external port i, harmonic m. Default units are volts.Time Domain Display: This is the real voltage waveform, specified as Vi.Spectral Domain Display: Complex voltage spectrum, specified as Vi.Network Fn/Sweep Domain Display: Select a harmonic component to display the complex voltage in the frequency domain, specified as Vi<Hm>.

VGij<Hm,Hn> Complex voltage gain between port i, harmonic m and port j, harmonic n. Requires a source at port j, harmonic n. Use dB() to get voltage gain in dB.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Select the harmonic components to display the voltage gain, specified as VGij<Hm,Hn>.Definition:

YIi<Hm> Complex input admittance at port i, harmonic m. Requires a source at port i, harmonic m.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Select the harmonic components to display the input admittance, specified as YIi<Hm>.Definition:

VG Hm HnV HmV Hnij

i

j< >=

< >< >

,

YI Hm I HmV Hmi

i

i

< >=< >< >

Circuit Response Definitions26-18

Page 35: Circuit Simulator

Nonlinear Circuit Responses

ZIi<Hm> Complex input impedance at port i, harmonic m. Requires a source at port i, harmonic m.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Select the harmonic components to display the input impedance, specified as ZIi<Hm>.Definition:

ZI Hm V HmI Hmi

i

i

< >=< >< >

Circuit Response Definitions26-19

Page 36: Circuit Simulator

Nonlinear Circuit Responses

Noise Spectrum ResponsesANi<Hm> Amplitude noise spectrum at port i, harmonic m. AN is only

computed by specifying NSi<Hm> or ANi<Hm>in the NOUT block. The default unit is the dBc/Hz.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Amplitude noise is available at the port and harmonic specified in the NOUT block for the NS keyword.

NSi<Hm> Lower sideband noise spectrum at port i, harmonic m. Noise spectrum is available for single-tone analysis only. NSi<Hm> must be present in the NOUT block to tell the simulator to compute it and noise analysis or oscillator noise analysis must be activated. The default unit is the dBc/Hz. Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Noise Spectrum is available for the ports and harmonics specified in the NOUT block.

NSLi<Hm> Lower sideband noise spectrum at port i, harmonic m. This is the same as noise spectrum and is produced by specifying NSi<Hm> in the NOUT block. The default unit is the dBc/Hz. Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Noise Spectrum is available for the ports and harmonics specified in the NOUT block.

Circuit Response Definitions26-20

Page 37: Circuit Simulator

Nonlinear Circuit Responses

NSUi<Hm> Upper sideband noise spectrum at port i, harmonic m. This is produced by specifying NSi<Hm> in the NOUT block. The default unit is dBc/Hz. Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Noise Spectrum is available for the ports and harmonics specified in the NOUT block.

PNi<Hm> Phase noise spectrum at port i, harmonic m. PN is only computed by specifying NSi<Hm> or PNi<Hm> in the NOUT block. The default unit is dBc/Hz.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Phase noise is available at the port and harmonic specified in the NOUT block for the NS keyword.

Circuit Response Definitions26-21

Page 38: Circuit Simulator

Nonlinear Circuit Responses

Small-Signal Mixer and Mixer Noise ResponsesCGij<Hm,Hn> Conversion gain between output port i, harmonic m and input port j,

harmonic n. Conversion gain is available for two-tone excitation in small-signal mixer analysis only. It must be present in the NOUT block to tell the simulator to compute it.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Conversion gain is available for the ports and harmonics specified in the NOUT block. Use dB() to obtain conversion gain in dB.Definition: where Pavs is the available source power at port j, harmonic n.

NFij<Hm,Hn> Mixer noise figure between output port i, harmonic m and input port j, harmonic n. Noise figure is available for a two-tone excitation only in the small-signal mixer analysis. It must be present in the NOUT block to tell the simulator to compute it and the noise analysis must be activated. Use dB() to obtain Noise Figure in dB.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Noise Figure is available for the ports and harmonics specified in the NOUT block.

CG Hm HnPO Hm

Pavs Hniji

j< >=

< >< >

,

Circuit Response Definitions26-22

Page 39: Circuit Simulator

Nonlinear Circuit Responses

Noise Contribution ResponsesNPLINi<Hm> Noise power contribution at port i, harmonic m from the linear

subnetwork. The default unit is the watt.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Noise contribution is available at the port and harmonics specified in the NOUT block for the NS keyword or at the output port and harmonics specified in the NOUT block for the NF keyword.

NPDEVi(z)<Hm> Noise power contribution at port i, harmonic m from nonlinear device named z. The default unit is the watt.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Noise contribution is available at the port and harmonics specified in the NOUT block for the NS keyword or at the output port and harmonics specified in the NOUT block for the NF keyword.

NPSRCi<Hm> Noise power contribution at port i, harmonic m from local oscillator signal. The default unit is the watt.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Noise contribution is available at the port and harmonics specified in the NOUT block for the NS keyword or at the output port and harmonics specified in the NOUT block for the NF keyword.

Circuit Response Definitions26-23

Page 40: Circuit Simulator

Nonlinear Circuit Responses

Modulation Analysis ResponsesThe modulation analysis responses use the following definitions:

NPKT Basic system noise power added in NPWR. The default unit is the watt.NPKT = Factor*(Boltzmann’s constant)*(ambient temperature in Kelvin), where Factor is from 0 to 1.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Noise contribution is available if NS or NF is specified in the NOUT block.

NPWRi<Hm> Total noise power at port i, harmonic m. The default unit is the watt.NPWR = NPLIN + NPDEV + NPSRC + NPKT.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Noise power is available at the port and harmonics specified in the NOUT block for the NS keyword or at the output port and harmonics specified in the NOUT block for the NF keyword.

FS1 Start baseband frequency of the first adjacent channel.

FS2 Start baseband frequency of the second adjacent channel.

FS3 Start baseband frequency of the third adjacent channel.

BW1 One-sided bandwidth of the main and first adjacent channels.

BW2 One-sided bandwidth of the main and second adjacent channels.

BW3 One-sided bandwidth of the main and third adjacent channels.

Circuit Response Definitions26-24

Page 41: Circuit Simulator

Nonlinear Circuit Responses

FSn and BWn are defined in the modulation source specifications for adjacent and alternate chan-nel measurements. An explanation of the BWn and FSn parameters is shown graphically below. Note that BW1, BW2, and BW3 do not have to be equal:

To invoke modulation analysis, one of PACP, PIB, or ACPR must be specified in the NOUT block.A1PRiA2PRiA3PRi

Adjacent channel power ratio. Use dB() to obtain units of dB.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Adjacent channel power ratio is available for the ports specified in the NOUT block.Definition: AnPRi =

P ACP IBn in i

Circuit Response Definitions26-25

Page 42: Circuit Simulator

Nonlinear Circuit Responses

ACPRi Same as A1PRi.

P1ACiP2ACiP3ACi

Adjacent channel power at port I for channel definition n. The default unit is the watt. Use dBm() to obtain units of dBm. Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: Adjacent channel power is available for the ports specified in the NOUT block.Definition: PnACi = where f1 and f2 define the start and stop frequencies of the adjacent channel. f1 = FSn and f2 = f1 + 2BWn.

PACPi Same as P1ACi.

P1IBiP2IBiP3IBi

In-band power at port i for channel definition n. Default units are watts. Use dBm() to obtain units of dBm.Time Domain Display: N/ASpectral Domain Display: N/ANetwork Fn/Sweep Domain Display: In-band power is available for the ports specified in the NOUT block.Definition: PIBi = . where BWn is the bandwidth of the main channel as defined in the modulation source specification.

PIBi same as P1IBi.

IchiQchi

In-phase and quadrature-phase time-domain waveforms at port i. The default unit is the volt.Time Domain Display: The voltage waveform of the in-phase signal component, Ichi, and the quadrature-phase signal component Qchi.Spectral Domain Display: N/ANetwork Fn/Sweep Domain Display: N/A

p dwf

f( )ω

1

2

p w dwBWn

BWn( )

−∫

Circuit Response Definitions26-26

Page 43: Circuit Simulator

Nonlinear Circuit Responses

IchEyeiQchEyei

Eye diagram of the in-phase or quadrature-phase time-domain waveforms at port i. The default unit is the volt.Time Domain Display: The voltage waveform of the in-phase signal component, IchEyei, or quadrature-phase signal component, QchEyei, framed in time and overlapped. The overlap is repeated every (#samples/bit * #cycles). #samples/bit is defined by the modulation source as N; #cycles is defined in the program’s Traces dialog.Spectral Domain Display: N/ANetwork Fn/Sweep Domain Display: N/A

Constlltni Constellation plot of the complex signal at port i.Time Domain Display: The voltage waveform of the in-phase signal component is plotted on the X axis and the quadrature-phase signal component is plotted on the Y axis.Spectral Domain Display: N/ANetwork Fn/Sweep Domain Display: N/A

IQi Modulation spectra of the complex signal at port i. The default unit is the volt. Use dB() to obtain units of dB with respect to 1 V.Time Domain Display: N/ASpectral Domain Display: Voltage modulation spectra of the complex signal at port i.Network Fn/Sweep Domain Display: N/AIt may be useful to use the Msmooth() function to smooth, or low-pass filter, the spectral data; that is, Msmooth(IQi) or dB(Msmooth(FQi)).

Circuit Response Definitions26-27

Page 44: Circuit Simulator

Nonlinear Circuit Responses

Device Port ResponsesIx(z)<Hm>

Current into terminal x of device name z. The default unit is the ampere.Time Domain Display: This is the real current wave-form, specified as Ix(z).Spectral Domain Display: Complex current spec-trum, specified as Ix(z).Network Fn/Sweep Domain Display: Select a har-monic component to display the complex current in the frequency domain, specified as Ix(z)<Hm>.

IP(z)<Hm> Current into probe named z. The default unit is the ampere.Time Domain Display: This is the real current waveform, specified as IP(z).Spectral Domain Display: Complex current spectrum, specified as IP(z).Network Fn/Sweep Domain Display: Select a harmonic component to display the complex current in the frequency domain, specified as IP(z)<Hm>.

Circuit Response Definitions26-28

Page 45: Circuit Simulator

Nonlinear Circuit Responses

POxy(z)<Hm>PFxy(z)<Hm>

Power flux at device port xy, device name z. In the frequency domain, the output power at an external port is positive. The power flux at a device port is positive if power is delivered to the device and negative if power is delivered from the device. Use the dBm() Function to obtain power in dB with respect to 1 mW. The default unit is the watt.Time Domain Display: This is the instantaneous power, specified as POxy(z) or PFxy(z).Spectral Domain Display: Power flux spectrum, specified as POxy(z) or PFxy(z).Network Fn/Sweep Domain Display: Select a harmonic component to display the power flux in the frequency domain, specified as POi<Hm> or PFi<Hm>.Definition for time domain:

, where represents the voltage across terminals xy at device z, and similarly for i.

Definition for frequency domain:

Vxy(z)<Hm> Voltage at device port xy, device name z. The default unit is the volt.Time Domain Display: This is the real voltage waveform, specified as Vxy(z).Spectral Domain Display: Complex voltage spectrum, specified as Vxy(z).Network Fn/Sweep Domain Display: Select a harmonic component to display the complex voltage in the frequency domain, specified as Vxy(z)<Hm>.

PO z PF z v t i txy xy xyz

xyz( ) ( ) ( ) ( )= = vxy

z

( ) ( )

( ) ( ){ }PO z Hm PF z Hm

V z Hm I z Hm

xy xy

xy xy

< >= < >=

< > < >12

Re *

Circuit Response Definitions26-29

Page 46: Circuit Simulator

Nonlinear Circuit Responses

VP(z)<Hm> Voltage across probe named z. The default unit is the volt.Time Domain Display: This is the real voltage waveform, specified as VP(z).Spectral Domain Display: Complex voltage spectrum, specified as VP(z).Network Fn/Sweep Domain Display: Select a harmonic component to display the complex voltage in the frequency domain, specified as VP(z)<Hm>.

SVn(z)<Hm> State variable n of the device named z. The unit depends on the specific state variable and device, but is usually the volt. Consult the component catalog for the definition of the state variables for each nonlinear device.Time Domain Display: This is the real state variable waveform, specified as SVn(z).Spectral Domain Display: Complex state variable spectrum, specified as SVn(z).Network Fn/Sweep Domain Display: Select a harmonic component to display the complex state variable in the frequency domain, specified as SVn(z)<Hm>.

Circuit Response Definitions26-30

Page 47: Circuit Simulator

Nonlinear Circuit Responses

Bias Element Responses

Device Port IndicesThe device port indices indicate the terminals of built-in device models. They are used to specify the current into a terminal, a voltage across a pair of terminals, and power into a pair of terminals.

Single Device Port IndicesFET: g, d, s, b (gate, drain, source, and bulk (for MOS))DIOD: a, c (anode and cathode)BIP: b, e, c, s (base, emitter, collector, and substrate)BIP: b, e, c, tj (base, emitter, collector, and thermal port nodes (for HBT))Example usage: Ig, Ia, Ie

Dual Device Port IndicesAll combinations of two single indices are valid for the built-in device models.Example usage:Vgs, Vds, Vce, Vac, POgs, PoacVtj gives temperature for HBT

V(z)<Hm> Voltage across bias source named z. The default unit is the volt.Time Domain Display: This is the real voltage waveform, specified as V(z).Spectral Domain Display: Complex voltage spectrum, specified as V(z).Network Fn/Sweep Domain Display: Select a harmonic component to display the complex voltage in the frequency domain, specified as V(z)<Hm>.

I(z)<Hm> Current into bias source named z. The default unit is the ampere.Time Domain Display: This is the real current waveform, specified as I(z).Spectral Domain Display: Complex current spectrum, specified as I(z).Network Fn/Sweep Domain Display: Select a harmonic component to display the complex current in the frequency domain, specified as I(z)<Hm>.

Circuit Response Definitions26-31

Page 48: Circuit Simulator

Nonlinear Circuit Responses

Examples

Display Functions and OperatorsExpressions may be defined and displayed on graphs and tables. The expressions use the operators and functions defined below. Several constants are also defined. You can also use the swept or run-ning variable in the expressions.

OperatorsOperators take the form:argument1 operator argument2Here the operator is one of the algebraic operator symbols +, −, /, * having their usual meaning and ^ (caret) for exponentiation. The arguments may be constants, functions or circuit responses.

FunctionsA large variety of functions are available to operate on real and complex arguments. The arguments are indicated in parentheses and are separated by commas. The arguments are specified by r for a real argument and z for a complex argument. Most functions accepting complex argument are defined for real arguments as well. The return type is indicated by the first word of the description. If the return type depends on the argument, then it is listed as Argument.

Data Domain Description

PO1 Spectrum Output power spectrum at port 1.

Vds(Q1) Spectrum Drain-source voltage spectrum at Q1.

VP(Probe1) Spectrum Voltage spectrum across probe1

Ig(Q1) Time Gate current waveform of Q1

POds(Q1) Time Instantaneous power waveform at the drain-source of Q1.

PO1<H1> Sweep Fundamental output power at port 1.

TG21<H2,H1> Sweep Gain from the 1st harmonic at port 1 to the 2nd harmonic at port 2.

GC21<H1,H1> Sweep Large-signal S parameter similar to S21

Mag(z) Real, Magnitude.

Re(z) Real, Real component.

Circuit Response Definitions26-32

Page 49: Circuit Simulator

Nonlinear Circuit Responses

Im(z) Real, Imaginary component.

Ang(z) Real, Angle.

CAng(Z) Real, cumulative angle. Remains continuous as the angle passes through ±180º.

Conjg(z) Complex, Conjugate of a complex number.

dB(r) Real, Converts the quantity to dB based on the unit. If the argument is V, I, S, etc., 20*Log10(r) is used. If the argument is a power unit such as PO, TG, NF, 10*Log10(r) is used. If the unit of the argument is not known, 20*Log10(r) is used.

dB10(r) Real, 10*Log10(r) used for power ratios.

dB20(r) Real, 20*Log10(r) used for voltage and current ratios.

dBm(r) Real, 10*Log10(1000*r), Logarithmic power with respect to 1 milliwatt.

dBW(r) Real, 10*Log10(r), Logarithmic power with respect to 1 watt.

Deriv(r) Real, Derivative of r with respect to the X or running axis.

Int(r) Real, Truncation to integer value.

NInt(r) Real, Rounding to nearest integer value.

Sin(z) Argument, Sine trigonometric function.

Cos(z) Argument, Cosine trigonometric function.

Tan(z) Argument, Tangent trigonometric function.

ASin(z) Argument, Arc Sine trigonometric function.

ACos(z) Argument, Arc Cosine trigonometric function.

ATan(z) Argument, Arc Tan trigonometric function.

Sinh(z) Argument, Sine hyperbolic function.

Circuit Response Definitions26-33

Page 50: Circuit Simulator

Nonlinear Circuit Responses

Functions that reduce a vector into a single valueNote The results of these functions cannot be graphed, but should be displayed in a table.

Cosh(z) Argument, Cosine hyperbolic function.

Tanh(z) Argument, Tangent hyperbolic function.

ASinh(z) Argument, Arc Sine hyperbolic function.

ACosh(z) Argument, Arc Cosine hyperbolic function.

ATanh(z) Argument, Arc Tan hyperbolic function.

Sqrt(z) Argument, Square root.

Log(r) Real, Natural logarithm.

Exp(r) Real, Exponential function.

Sgn(r) Real, Sign extraction. (-1 for r<0, 0 for r=0, 1 for r>0)

Sgn(r1,r2) Real, sign extension. [abs(r1) for r2≥0, -abs(r1) for r2<0]

Log10(r) Real, Logarithm of base 10.

Msmooth(expr [, fl = value])

Msmooth is a median smoothing function that averages a window of data points as the window center moves across the data vector (expr). If applied to complex data, it calculates the magnitude first and then smooths. The fl specification is optional. Its value is the percentage of the data size used to calculate average. Its default value is 1%.

Min(r) Real, Minimum value of argument vector.

Max(r) Real, Maximum value of argument vector.

Rms(r) Real, Root Mean Squared value of argument vector.

Avg(r) Real, Average of argument vector.

Intrx(r1,r2,s) Find the X value of the intersection of lines (circuit responses) r1 and r2 using s as the running variable. The function uses only the first two points of the lines and will extrapolate. See the examples at the end of this section.

Circuit Response Definitions26-34

Page 51: Circuit Simulator

Examples

Constants

ExamplesSome examples of functional expressions using circuit responses, functions and operators are:

dB(S21)Mag(S11)Mag(V(cktA.cktB.3))dB(TG21<H2,H1>)ANG(S21(CKT=cktA,R2=600.0))-ANG(S21(CKT=cktB,Z2=IMP(cktC)))1.0-MAG(S11(CKT=cktA))^2-MAG(S21(CKT=cktA))^2

To determine IP3 for an amplifier two-tone power sweep analysis:INTRY(dBm(PO2<H1+H0>),dBm(PO2<H2-H1>),P1<H1+H0>)

where:

Intry(r1,r2,s) Find the Y value of the intersection of lines (circuit responses) r1 and r2 using s as the running variable. The function uses only the first two points of the lines and will extrapolate. See the examples at the end of this section.

Pi Real constant 3.1415....

e Natural logarithm base 2.718....

DegRad Convert degrees to radians (π/180).

RadDeg Convert radians to degrees (180/π).

dBm(PO2<H1+H0>) Output power at port 2 at the fundamental of tone 1.

dBm(PO2<H2-H1>) Output power at port 2 at the intermodulation product.

P1<H1+H0> Input power source (assumed sweep in dBm) at low power levels (prior to compression).

Circuit Response Definitions26-35

Page 52: Circuit Simulator

12Harmonic Balance Analysis (HBA)

Harmonic balance analysis is performed using a spectrum of harmonically related frequencies, sim-ilar to what you would see by measuring signals on a spectrum analyzer. The fundamental frequen-cies are the frequencies whose integral combinations form the spectrum of harmonic frequency components used in the analysis. On a spectrum analyzer you may see a large number of signals, even if the input to your circuit is only one or two tones. The harmonic balance analysis must trun-cate the number of harmonically related signals so it can be analyzed on a computer.Analysis parameters such as No. of Harmonics specify the truncation and the set of fundamental frequencies used in the analysis. The fundamental frequencies are typically not the lowest frequen-cies (except in the single-tone case) nor must they be the frequencies of the excitation sources. They simply define the base frequencies upon which the complete analysis spectrum is built.A project for harmonic balance analysis must contain at least the following: A top-level circuit, at least one nonlinear active device, and a frequency specification (including the number of harmonics of interest). Designer has five categories of harmonic balance analysis:• Single-tone analysis (single RF signal)• Two-tone intermodulation analysis (two RF signals)• Two-tone mixer analysis (one RF signal and one LO signal)• Three-tone intermodulation analysis (three RF signals)• Three-tone mixer analysis (two RF signals and one LO signal).

Harmonic Balance Analysis (HBA) 12-1

Page 53: Circuit Simulator

Title

Formation of the Harmonic Balance EquationsHarmonic balance analysis involves the periodic steady-state response of a fixed circuit given a pre-determined set of fundamental tones [1,2]. The analysis is limited to periodic responses because the basis set chosen to represent the physical signals in the circuit are sinusoids, which are periodic. The Fourier series is used to represent these signals. In the single-tone case, a signal is given by:

where Xk = X-k*, ωo is the fundamental frequency and NH is the number of harmonics chosen to

represent the signal.In harmonic balance, the circuit is usually divided into two subcircuits connected by wires forming multiports. One subcircuit contains the linear components of the circuit and the other contains the nonlinear device models as shown in the figure. The linear subcircuit response is calculated in the frequency domain at each harmonic component (k*ωo) and is represented by a multiport Y matrix. This is the function performed by linear analysis.

Separation of the linear and nonlinear subcircuitsThe nonlinear subcircuit contains the active devices whose models compute the voltages and cur-rents at the intrinsic ports of the device (parasitic elements are linear and absorbed by the linear subnetwork). The port voltages (v) and currents (i) are analytic or numeric functions of the device state variables (x). Often the state variables represent physical voltages such as diode junction volt-age or FET gate voltage, but are not restricted to physical quantities. The port voltages and currents are often functions of the time derivatives of the state variables (when a nonlinear capacitor is involved) and of time-delayed state variables (such as a time-delayed current source). Generally, the nonlinear device equations are of the form:

(2)

x t X ekk NH

NHjk to( ) =

=−

∑ ω

NonlinearSubcircuit

LinearSubcircuit

Sourcesand

Loads

v t x t dxdt

d xdt

x tn

n( ) ( ), , , , ( )= −

Φ K τ

i t x t dxdt

d xdt

x tn

n( ) ( ), , , , ( )= −

Ψ K τ

12-2 Harmonic Balance Analysis (HBA)

Page 54: Circuit Simulator

Title

The device state variables, port voltages, and currents are transformed to the frequency domain using the discrete Fourier transforms as X, Vk(X) and Ik(X), respectively. Kirchhoff's current law is applied to the interface between the subcircuits at each harmonic frequency:

where Jk are the Norton equivalents of the applied generators. This constitutes the harmonic bal-ance equations at each harmonic frequency. The object of the analysis is to find the set of state vari-ables, X, to satisfy equation 4.When the analysis begins, the state variables are typically set to zero and the left side of equation 4 is non-zero. We can write an error vector:

whose Euclidean norm EtE = ||E|| is called the Harmonic Balance Error (HBE). If the HBE is reduced below a tolerance, we say that equation 4 is satisfied and a solution has been obtained.

Solving MethodsThe process of solving the harmonic balance equations is an iterative one. An estimate of X is inserted into (5), E is calculated and if it is not below the tolerance then a new value of X must be determined and tried. Each such loop is termed an iteration. There have been several methods used in the past to determine new values of X and two that have proven to be the most general and effi-cient are discussed here.The state variables, X, and harmonic balance residuals, E are complex valued. In practice these are decomposed into their real and imaginary parts so that the number of real unknowns in X is ND*(2*Nt+1) where ND is the total number of nonlinear device ports and Nt is the number of fre-quency components (=NH for single tone analysis). Now we can write E(X)=0 as a Taylor series expansion truncated after the first derivative term:

where J, the Jacobian matrix, is the first derivative matrix of E with respect to X and superscript n indicates the current iteration. Solving for X and using this for the next trial:

This is the Newton-Raphson update method where the last right-hand term is the update. This method works in one iteration if the set of equations is linear, but will take an unknown number of iterations if nonlinear. Often the update is reduced by a factor called the Newton damping factor so the method takes smaller steps each iteration. Convergence to a solution is not guaranteed and the iterates may diverge if not controlled. Designer uses enhanced versions of the Newton-Raphson method to improve convergence and speed.

YkVk X( ) Ik X( ) Jk+ + 0=

Ek X( ) YkVk X( ) Ik X( ) Jk+ +=

E(X) E(X ) J(X ) (X X )(n) (n) (n)= ≈ + −0

X X J (X ) E(X(n 1) (n) 1 (n) (n)+ −= − )

Harmonic Balance Analysis (HBA) 12-3

Page 55: Circuit Simulator

Title

Designer uses an algorithm that dynamically changes the Newton damping factor during solving based on the rate of convergence. If the solver has trouble converging, the factor will be made smaller to improve convergence. If it has been reduced by more than a predetermined factor, the solver will stop and an error will be reported. An important aspect to note is the size of the Jacobian. If X contains ND*(2*Nt+1) elements, then J contains this number squared. As a practical example, if ND=10 (5 FETs) and Nt=4, then there are 8100 entries in J which takes 63 kBytes. This is relatively small, but Nt becomes much larger when multi-tone excitation is considered.Some of the controlling functions are made accessible through the CTRL block in the project (see the Control Blocks chapter). The HBE tolerance can be changed from its default by: HBTOL x where x is the tolerance per device port per frequency component.The absolute harmonic balance error allowed is scaled by the number of device ports and number of frequency components so that large circuits with many frequency components meet HBE criteria similar to those of small circuits. The default for HBTOL is 1.0x10-6. For the case of 2-tone inter-modulation analysis and 3-tone analysis, the allowed harmonic balance is also scaled by the relative currents of the circuit. This reduces the allowed error (effectively reducing HBTOL) to provide bet-ter accuracy of the intermodulation products.The number of allowed iterations before the program stops can be changed from its default value of 400 by: MAXITER n, where n is an integer.

Multi-tone AnalysisThe discussion above was based on single-tone analysis for conceptual simplicity. Multi-tone anal-ysis is simply an extension of single-tone [3,4,5]. In the single-tone case, a circuit is excited with an RF source and harmonics of that source are produced by the nonlinearities of the circuit. The set of harmonics, the frequency of excitation and DC are called the spectrum of the analysis. The single-tone spectrum is defined as: S1 = k*f0k=0,1,...,NH. (8)where f0 is the fundamental frequency. In multi-tone analysis the spectrum is modified to include the harmonic products of each fundamental tone. The harmonic products are just integer functions of the fundamental frequencies and indicate the allowed “bins” for power conversion within a cir-cuit. The rest of the harmonic balance analysis is exactly the same.The conversion between time-domain waveforms and Fourier coefficients is accomplished by the discrete Fourier transform in single-tone analysis. For each additional fundamental tone, a dimen-sion is added in the transform. This allows efficient computation between domains, but becomes cpu-intensive when more than three-dimensions are encountered.

Local Oscillator Spectrum Initialization of Mixer CircuitsFor mixer analysis cases where the primary interest is the conversion gain and the RF signal powers are small compared to the LO, the circuit can be analyzed using the LO signal only and the conver-sion gain is determined using small-signal (linear) frequency-conversion methods. This is per-formed using the Small-Signal Mixer Analysis option (see the next section in this chapter).

12-4 Harmonic Balance Analysis (HBA)

Page 56: Circuit Simulator

Title

For cases where the RF signal power is not insignificant compared to the LO, a full mixer spectrum must be used. Compression of the conversion gain due to high RF power can then be analyzed. Here, the mixer problem can be divided into two parts to help speed the analysis. Firstly, the LO signal is analyzed using single-tone analysis; the RF signal is turned off. Single-tone analysis is usually very fast compared with a full two-tone analysis. Once the LO signal spectrum is found, the results are used to initialize the full mixer spectrum and the RF signal is turned back on. The full spectrum is then analyzed.This method is most useful for three-tone mixer problems, due to the large number of spectral com-ponents used in the analysis. The primary use of the three-tone mixer analysis is to determine the intermodulation products of the IF products. This precludes the use of small-signal mixer analysis (since the intermodulation products cannot be determined using linear frequency conversion meth-ods), but the RF signals are generally small compared to the LO. By solving the LO problem first, which is the primary nonlinear problem, and then introducing the RF signals, the analysis time can be reduced by a factor of about three. The actual time reduction depends on the circuit, the RF power levels, and the conversion gain.Using the LO harmonic spectrum to initialize the full mixer spectrum is the default for three-tone analysis. The option is not the default for two-tone analysis, because significant time improvements have not been observed.

Number of Spectral Components and Reduced Spectrum OptionThe number of spectral components considered in each type of analysis is related to the number of fundamental tones and the nonlinearity specified. The tables below list the number of spectral com-ponents for several nonlinearities considered in two-tone and three-tone analyses. The reduced spectrum option removes selected spectral components where significant harmonic power is not expected. The results of the analysis will not degrade at low power levels, but may yield different results for high power levels, depending on the circuit. Usually, the difference in results is negligi-ble for practical cases.The reduced spectrum option is especially useful for three-tone mixer analysis where the primary objective is to obtain the intermodulation intercept point with the IF. Low RF signal power levels are used and the analysis results are unaffected by the reduced spectrum option (the number of LO harmonics is not affected).

Number of Spectral Components (excluding DC) for Two-Tone and Three-Tone Intermodulation Analysis

nonlinearityINTM m

two-toneFull (default)

two-toneReduced

three-toneFull (default)

three-toneReduced

3 12 8 31 21

4 20 12 64 31

Harmonic Balance Analysis (HBA) 12-5

Page 57: Circuit Simulator

Title

Note: #LO is the number of local oscillator harmonics; #SB is the number of RF sidebands

5 30 22 115 79

6 42 30 188 115

7 56 44 209

8 72 56

9 90 74

10 110 90

Number of Spectral Components (excluding DC) for Two-Tone Mixer analysis

#SB (M2) = 1 #SB (M2) = 2 #SB (M2) = 3

#LO (M1) Full (default) Reduced Full(default) Reduced Full

(default) Reduced

2 7 7 12 12 17 17

4 13 13 22 18 31 23

6 19 19 32 24 45 29

10 31 31 52 36 73 41

15 46 46 77 51 108 56

20 61 61 102 66 143 71

25 76 76 127 81 178 86

30 91 91 152 96 213 101

Number of Spectral Components (excluding DC) for Three-Tone Mixer analysis

12-6 Harmonic Balance Analysis (HBA)

Page 58: Circuit Simulator

Title

Notes:Entries that have been filled-in can be simulated#LO is the number of local oscillator harmonics; INTM is the intermodulation orderThe total number of spectral components grows very quickly with the level of nonlinearity and number and fundamental tones.• Two-tone or three-tone intermodulation spectrum: The highest order group of spectral compo-

nents, except those in the fundamental group (the intermodulation products), are ignored. In this case, the n in REDUCEDn is ignored.

• Two-tone mixer analysis: All sidebands except the first sideband above the nth local oscillator harmonic will be ignored.

• Three-tone mixer analysis: All sideband groups at or below the nth local oscillator harmonic will be the same as the reduced two-tone intermodulation spectrum; all the sidebands above the n'th local oscillator harmonic will contain the two fundamental frequencies only.

Understanding the reduced spectrum is a little complicated. If the analysis is run with several reduced spectrum values and the spectrums are compared, then a better understanding of the spec-tral selections will be attained. Many studies were conducted and showed that the (default) reduced spectrum option for three-tone mixer intermodulation analysis affected analysis accuracy only slightly.

Sparse Jacobian TechniquesThe Jacobian matrix, when properly arranged, can be treated as a sparse matrix by pre-setting some entries to zero [6]. The physical reason for doing this is that most of the power transfer takes place

INTM (M2) = 3 INTM (M2) = 5

# LO (M1) Full Reduced(default) Full Reduced

(default)

2 62 42 152 112

4 112 52 274 122

6 162 62 132

10 262 82 152

15 107 177

20 132 202

25 157 227

30 182 252

Harmonic Balance Analysis (HBA) 12-7

Page 59: Circuit Simulator

Title

between the harmonic frequencies of the fundamentals and much less takes place between the other frequencies in the spectrum. We can therefore set these derivatives to zero within the Jacobian. When this criterion is not met, the band of non-zero entries is widened to include cross-harmonic terms. Because the Jacobian structure is properly arranged, sparse matrix techniques are efficiently employed. General purpose sparse matrix solvers that analyze the sparsity structure are avoided and specialized solvers can be used that are much more efficient. Designer automatically sets the band-width of the sparse tridiagonal matrix and dynamically alters it if the nonlinearity of the circuit is too great for the sparse assumptions. In this way the simulator achieves convergence using the min-imal amount of computation time and memory that is possible for a given problem. For circuits with many devices under multi-tone operation, the CPU time may be decreased by a factor of 40.A control parameter is made available to override the initial default sparsity parameter that controls the Jacobian bandwidth. The initial setting is 0 and can be changed by: DIAG nwhere n will be the initial sparsity parameter. Typical values range between 0 and 6. The sparsity parameter will still be dynamically altered during execution if needed. If n is greater than Nt/3 (Nt is the number of frequencies), then the program will use the full Jacobian. If only the full Jacobian is desired, then set n to a large number.Using a sparse Jacobian does not affect the final values or accuracy of the results. It will only affect the convergence properties of the particular problem.

Iterative Newton MethodOne of the short comings of harmonic-balance methods is the large memory requirements when a circuit has many nonlinear devices and/or multi-tone analysis is needed. The Jacobian system matrix grows large and must be stored and factored. Sparse methods may not be enough to keep the

DIAG

1

0

2

3

4

Sparse Jacobian block structure.

12-8 Harmonic Balance Analysis (HBA)

Page 60: Circuit Simulator

Title

problem within the memory bounds and acceptable computational resources of desktop computers. Designer uses a technique that efficiently solves large systems of equations without direct factor-ization of the system matrix. In this way, there is no simplification or approximation made to the problem and the full accuracy of the conventional harmonic-balance method is completely main-tained. The convergence and power-handling capabilities of conventional harmonic-balance analy-sis are also fully maintained. The method is completely automatic and does not require any user intervention. An internal software switch detects when the new method should be used and auto-matically invokes it.A brief summary of the method and its advantages is given: Conventional harmonic-balance com-putes and stores the Jacobian matrix. The iterative solution of the harmonic-balance equations requires factorization of the Jacobian to obtain updates of the circuit voltages. As the number of nonlinear devices in the circuit increases and the number of spectral components used to analyze the circuit increases, the Jacobian matrix can become very large, requiring tens or hundreds of megabytes of storage and several minutes of CPU time to factor it. The calculation and factoriza-tion of the Jacobian typically occurs several times during a single harmonic-balance solution. The new method, based on an iterative approach known as Krylov Subspace Methods, avoids direct storage and factorization of the Jacobian. Rather, a series of matrix-vector operations replaces the full storage and factorization steps while retaining full numerical accuracy.Observed speed-up factors depend on the number of nonlinear devices in the circuit and the number of spectral components used in the analysis as well as the convergence properties of the harmonic-balance algorithm. Speed improvements over conventional harmonic balance analysis from 2x to 10x for circuits consisting of a few transistors under two and three-tone excitation have routinely been observed. A circuit containing 20 FETs under three-tone analysis exhibited a speed improve-ment factor of 30x. Memory requirements have also been tremendously reduced. The 20 FET cir-cuit originally required >200MB and now will analyze with 64MB. As the circuit becomes more “complex” the new methods provides better speed and memory improvements.

Designer OutputsDuring analysis, Designer generates a number of output files that are used to store textual, graphi-cal and initialization information. The files generated are:

myfile.audThe audit file contains textual information about the analysis. In its basic form it contains the final results of the network functions. Additional information can be requested by setting the verbosity flag in the control block as:

VERBOSE nwhere 0 ≤ n ≤ 4. The higher the verbosity number is, the more output that is generated about the final and initial points at each sweep step.

Sweeping Frequency, Power and Voltage SourcesEach source in the design can be swept in amplitude. Also, the tones defined for the analysis can be swept. When more than one source or frequency are swept, an ambiguity arises as to the order of precedence. The following rules apply in the cases of multiple sweeps:

Harmonic Balance Analysis (HBA) 12-9

Page 61: Circuit Simulator

Title

1) When more than one source is swept and no frequencies are swept, then the sources sweep in unison. That is, each source is stepped at the same time. This is a one-dimensional sweep.2) When more than one frequency is swept and no sources are swept, then the frequencies sweep in unison. This is also a one-dimensional sweep.3) When frequencies and sources are both swept, the program performs a two-dimensional sweep where the sources are swept in the innermost loop. A matrix results where the source sweep is the most rapidly changing index. An exception to this case is during noise analysis, where the swept frequency deviation will be the innermost loop.For additional details, see the Advanced Sweep Options topic.

Generating Large-Signal S-ParametersSince large-signal S-parameters are poorly defined, but widely used, we will show two methods of generating them. If your definition of large-signal S-parameters is different, you can redefine the example to suit your own needs. Here lies the ambiguity as to what one means by large-signal S-

12-10 Harmonic Balance Analysis (HBA)

Page 62: Circuit Simulator

Title

parameters. It will depend on the specific application and must be tailored in each case. Presented below is one interpretation:

Schematic diagram: Generating large-signal S-parametersThe calculation of S-parameters in the large-signal regime is not as straightforward as it is in the linear, small-signal regime. The “large-signal S-parameters” are dependent on the power of the excitation sources at each external circuit port as well as the circuit bias and terminations. Guide-lines will be given here on using Designer to generate large-signal S-parameters, but the proper use of these S-parameters in circuit design is up to you.Consider a two-port circuit whose large-signal S-parameters are desired. If we apply a source at port 1 with port 2 terminated, we could measure the reflected and transmitted waves, and con-versely for a source applied to port 2 [7]. However, this assumes that when the device under test is

DeviceUnderTest

b1(f1)b1(f2) a1(f1)

b2(f1)a2(f2) b2(f2)

R1 R2P2,f2P1,f1a.

DeviceUnderTest

b1(f1) a1(f1)

R1P1,f1b.

DeviceUnderTest

a3(f3)

b3(f1)b3(f2)b3(f3)

R1 R2

R3

P2,f2

P3,f3

P1,f1

b1(f1)b1(f2)b1(f3) a1(f1)

b2(f1)b2(f2)

a2(f2) b2(f3)

c.

Harmonic Balance Analysis (HBA) 12-11

Page 63: Circuit Simulator

Title

actually used, it will be terminated in the same impedance as it was tested. This is rarely the case. Typically the device is embedded in some matching network which presents a complex impedance to the device. Therefore, the operating regime of the device will change and its large-signal S-parameters will be altered.We could then hypothesize that a source can be placed at each port and the traveling waves could be measured at each port. The problem here is that it is not possible to distinguish between the reflected wave at a port and the transmitted wave due to the source at the other port because the sources are the same frequency. If we perturb the frequency of one of the sources, then the reflected and transmitted waves due to each source can be resolved. This, however, requires a two-tone anal-ysis. The situation is illustrated in the diagram for a two-port device under test. The difference in frequency between the two sources can be made small, on the order of 0.001%. This is recommended for circuits of large Q. Typically the difference used is about 0.1% because the S-parameters of the device under test do not change rapidly with frequency. This example shows some of the inconsistencies associated with large-signal S-parameters. For example, what happens to the power that is converted to other harmonic products? These will depend on the bias point, harmonic terminations, etc. In practice, the powers measured include all harmonic powers incident on the detector, whereas in the calculations we can pick out the precise fundamental powers. Also, we chose incident power levels as 10 dBm and 8 dBm, but how do we know if these are correct until after the design is done? There are several approximations like these that are assumed to be small when using large-signal S-parameters in active circuit design. None-theless, these parameters persist in design and can be computed using Designer.In some cases where it can be approximated that one or more ports will be conjugately matched so a source doesn't need to be present there, higher port parameters can also be computed using repet-itive analyses.Other so-called conversion parameters can be computed. For example, if a mixer conversion matrix is desired between the RF and IF frequencies, the corresponding transmission parameters can be computed using TG between the proper harmonic numbers. The reflection coefficients can be found by using RL at the source ports and source harmonics.

If You Encounter Convergence DifficultiesThe nonlinear solver present in Designer has been greatly improved over previous versions, but you may still have convergence problems with some circuits. Particularly, highly nonlinear circuits with bipolar transistors or circuits with high drive levels may pose a problem. For such circuits, the fol-lowing hints are suggested to enable finding a solution: 1)Check the circuit connections. Improper node connections and/or missing units on parameters are the most common causes for convergence problems and messages that indicate “Singular Jaco-bian.” This commonly happens when the active devices are not biased properly or the signal path is not connected. Use the Show Bias Point option on the Analysis dialog to check for proper bias.2)Check that the bias sources are properly connected. If constant current sources are used, make sure the current flow is in the desired direction.3) Add losses in the circuit. When initial designs are simulated it is common to use ideal elements that don't have losses (e.g., transmission lines using characteristic impedance and electrical length

12-12 Harmonic Balance Analysis (HBA)

Page 64: Circuit Simulator

Title

only). This may pose problems in the analysis of the linear subcircuit at DC or when computing the Jacobian for nonlinear analysis.4) Approach the solution point incrementally. By sweeping the source voltage or power toward the desired level, the circuit is driven gradually into the region where convergence is difficult to obtain. During a source sweep, the results of the previous step are used for the initial iterate of the subse-quent step, the starting point is closer to the vicinity of the desired solution than a “cold” start from zero initial values. Designer also employs automatic step reduction on power sweeps, whereby the step size is halved if convergence was not obtained on the previous step.5) A similar solution to the above is to start the analysis from the previous solution. The *.VAR file should be backed up, the solution options should start from a previous solution, and the DC initial-ization should be disabled. This method can also be useful when manually tuning the circuit to achieve a desired response (if it is a single-point analysis).6)If insufficient sampling points are used to represent the time-domain waveforms, there will be significant aliasing errors in the FFT.

References[1]V. Rizzoli, A. Lipparini, and Ernesto Marazzi, “A General-Purpose Program for Nonlinear Microwave Circuit Design,” IEEE Trans. Microwave Theory Tech., vol. 31, no. 9, pp. 762-770, September 1983.[2]V. Rizzoli, A. Lipparini, A. Costanzo, F. Mastri, C. Cecchetti, A. Neri, and D. Masotti, “State-of-the-Art Harmonic-Balance Simulation of Forced Nonlinear Microwave Circuits by the Piecewise Technique,” IEEE Trans. Microwave Theory Tech., vol. 40, no. 1, pp. 12-28, January 1992.[3]V. Rizzoli, C. Cecchetti, A. Lipparini, “ A General-Purpose Program for the Analysis of Nonlin-ear Microwave Circuits Under Multitone Excitation by Multidimensional Fourier Transform,” 17th European Microwave Conf., pp. 635-640, September 1987.[4]V. Rizzoli and A. Neri, “State-of-the-Art and Present Trends in Nonlinear Microwave CAD Techniques,” IEEE Trans. Microwave Theory Tech., vol. 36, no. 2, pp. 343-365, February 1988.[5]V. Rizzoli, C. Cecchetti, A. Lipparini, and F. Mastri, “General-Purpose Harmonic-Balance Anal-ysis of Nonlinear Microwave Circuits Under Multitone Excitation,” IEEE Trans. Microwave The-ory Tech., vol. 36, no. 12, pp. 1650-1660, December 1988.[6]V. Rizzoli, F. Mastri, F. Sgallari, V. Frontini, “The Exploitation of Sparse-Matrix Techniques in Conjunction with the Piecewise Harmonic-Balance Method for Nonlinear Microwave Circuit Analysis,” 1990 MTT-S Int. Microwave Symp. Digest, pp. 1295-1298, June 1990.[7]V. Rizzoli, A. Lipparini, and F. Mastri, “Computation of Large-Signal S-Parameters by Har-monic-Balance Techniques,” Electron. Lett., vol. 24, pp. 329-330, Mar. 1988.[8]V. Rizzoli, F. Mastri, and F. Sgallari, and G. Spaletta, “Harmonic-Balance Simulation of Strongly Nonlinear Very Large-Size Microwave Circuits by Inexact Newton Methods,” IEEE MTT-S, pp. 1357-1360, 1996.

Harmonic Balance Analysis (HBA) 12-13

Page 65: Circuit Simulator

Title

General Form for Netlist Syntax and Parameters Definitions Used for Harmonic Balance:

HarmSpec :=optSign integer Fterm ||optSign integer Fterm sign integer Fterm |optSign integer Fterm sign integer Fterm sign integer FtermFterm := F1 | F2 | F3optSign := + | - | sign := + | -

for example: -F1+F2 or -F1+2F2

General Form: Nonlinear Analysis Using Harmonic Balance.HB[:name] + [NHARM = integer] | INTM = integer| | NLO = integer NSB = integer | + NLO = integer INTM = integer + F1 = swpDef [F2 = swpDef] [F3 = swpDef] [FNOI = swpDef]+ [anaSwpDef]+ [PORT = int] [HNUM = HarmSpec] [NOISE = boolean]+ [MSPTS = integer]+ [SWPORD = {anaSwpOrderDef}] [OPTION = name] [SVINI = name]

Parameter Description Default Comments

NHARM Number of harmonics for 1-tone HB

4

INTM Intermod. order for 2- and 3-tone HB

Used for amplifier intermodulation analysis

NLO NSB Number of LO harmonics for 2-tone number of sidebands for 2-tone

Mixer case

NLO INTM Number LO harmonics for 3-toneIntermod. order for 3-tone

Used for mixer intermodulation analysis

12-14 Harmonic Balance Analysis (HBA)

Page 66: Circuit Simulator

Title

F1, F2, F3 Fundamental Frequencies

FNOI Noise spectral frequencies

Noise spectrum case

anaSwpDef Define swept parameter (dummy variable that represents the actual value)

none When sweeping bias sources, the only parameters that can be swept are voltage (V) and current (I) for the DC sources

anaSwpOrderDef The actual values that define the order in which the parameters get swept.

none Inc. sources & params

PORT Port for noise spectrum output

1

HNUM Harmonic number for noise output

F1

NOISE Toggles noise spectrum analysis

OFF

MSPTS Number of modulation sampling points

1 Toggles modulation-based HB if MSPTS > 1

SWPORD Defines ordered sweep

See Note 1

OPTION Name of .OPTIONS statement

none control options for this analysis

SVINI Name of .SVINIT statement

none initial values for this analysis

Harmonic Balance Analysis (HBA) 12-15

Page 67: Circuit Simulator

Title

Notes1. Parameter keyword values in the Harmonic Balance Analysis command (.HB) can be algebraic

expressions or simple parameters. But an expressions must be evaluated prior to analysis (in other words, the keyword parameter cannot be dependent on an analysis variable, for example, "F").

2. If a value is assigned by a parameter which is swept, only the original value is used (in other words, the sweep values will be ignored).

3. The SWPORD parameter defines the sweep order of items specified in anaSwpDef. The 1st sweep variable in the list will be the innermost sweep loop. See the discussion below on sweeping circuit variables for more detail.

4. For discussion of the frequency spectrum and selecting spectrum parameters see the earlier section, Overview of Harmonic Balance Analysis.

5. If no SVINIT is assigned to the analysis commands, the first .SVINIT command in the netlist will be used.

SWPORD Defines ordered sweep

TBD The first entry defines the innermost loop

12-16 Harmonic Balance Analysis (HBA)

Page 68: Circuit Simulator

Title

For discussion of spectral noise analysis, see Glossary in the online help topics (Noise Analysis).

HBA, 1-ToneSingle tone harmonic balance analysis is used when simulating a circuit that is driven by a single excitation source at one frequency, or several sources at related frequencies. This case also includes frequency dividers where the fundamental corresponds to the division frequency. Parameters:

Increasing the number of harmonics increases the accuracy of the analysis at the expense of longer computation times and large memory requirements. Typical number of harmonics is 4 to 8. For cir-cuits that are driven with harmonic sources (e.g., square wave sources) or circuits that generate high harmonics, a greater number of harmonics may be included in the analysis; e.g., 32. See Program Limits to determine the largest number of harmonics that can be simulated.

To Set Up a 1-Tone Analysis1. On the Circuit menu, click Add Solution Setup.

2. When the Solution Setup dialog box appears, select Harmonic Balance in the Analysis Type list.

3. In Solution Setup, type an Analysis Name (or accept the default name, for example, “HB1Tone1”). Select 1-Tone in the Category list.

4. For most simulations, leave Disable this analysis unselected (the default). But depending on the requirements for a particular project, clearing this box lets you create and store multiple solution setups for later use. (Note that if this feature is used, any changes made to the project will invalidate the simulation results.)

5. Click Next, and the Harmonic Balance Analysis, 1-Tone dialog box appears. In the No. of Harmonics box, enter the number of harmonics: The higher the number of harmonics, the more accurate the results, but the analysis takes longer to complete. For more information, see Overview of Harmonic Balance Analysis.

6. In the Harmonic Balance Analysis, 1-Tone dialog box, select either the following: Enable Noise Spectrum Calculations or Use Solution-Path Tracing. These are either/or selections, depending on the requirements of a particular project. For more informa-tion see Solution-Path Tracing in the online help topics and Noise Spectrum Calculations (next section).

7. To enter the sweep parameters for frequency (F1, required), do either of the following:• In the Harmonic Balance Analysis, 1-Tone dialog box, click the blank text area to

the right of F1 (under Name and Sweep Value). Type the sweep parameters and netlist syntax directly into the text box.

• Click Add, and the Add/Edit Sweep dialog box appears: In the Variable list, make sure that F1 is selected (default selection). Select Single Value, type the frequency in the Value text box, and make sure that the appropriate units (GHz, MHz, kHz) are selected.

NHARM Number of harmonics to use in the analysis

F1 Frequency of the fundamental tone in the analysis

Harmonic Balance Analysis (HBA) 12-17

Page 69: Circuit Simulator

Title

Click Add, and then click OK to close the Add/Edit Sweep dialog box. 8. To customize the analysis (for example, to override Verbose mode), click Solution Setup

Options (Default Options). When the Select Solution Options dialog box appears, make the appropriate selections, click OK, and return to the Harmonic Balance Analysis, 1-Tone dia-log box. For more information, see Solution Options in the online help topics.

9. When the Harmonic Balance Analysis, 2-Tone, Mixer Spectrum dialog box reappears, click Finish.

10. To set up an advanced sweep option (for example, to sweep a circuit parameter or a bias source), see Sweep Options, HBA Sweep Options, and Advanced Sweep Options in the online help topics.

11. Run the simulation: On the menu bar, click Circuit and then click Start Analysis. If the circuit was set up correctly, the analysis begins immediately and a red progress bar appears. (If the analysis is not successful, check the Message Window for an explanation, and then take cor-rective action.)

12. To display results: On the menu bar, click Circuit and then click Create Report. For more information, see Generating Reports and Post-Processing in the online help topics.

Noise Spectrum CalculationsThe noise spectrum analysis option computes the noise power in dBc/Hz at discrete frequencies offset from the single-tone input. This type of analysis is generally used to determine phase noise, amplitude noise or upper and lower sideband noise spectrum of forced circuits, such as amplifiers, frequency multipliers, dividers, etc. This analysis can only be used with single-tone analysis.The source(s) exciting the circuit can be defined with their own noise spectral power using the .NOISESOURCE statement. The frequency deviations used to specify the source do not have to match those used in the analysis; the program will linearly interpolate the input data.When computing the noise powers, the noise contributed by the power source termination and the load termination is ignored. Parameters:

Example:PORTP:1 1 0 PNUM=1 RZ=50 P1=0dBm HNUM1=F1 NOISE=nsrc.NOISESOURCE nsrc (+FDEV =10100100010KHz100KHz 1MHz+PN =0-30-60-80-100-120+AN = -100-130-150-160-165-165 )PORTP:2 2 0 PNUM=2 RZ=50

FNOI Specifies the offset frequencies from the fundamental for the noise spectrum. Can use a general sweep specification.

PORT Output port of the noise calculation (default is port 1)

HNUM Harmonic of the noise calculation (default is F1)

NOISE Turns noise analysis ON or OFF (default is OFF)

12-18 Harmonic Balance Analysis (HBA)

Page 70: Circuit Simulator

Title

.HB NHARM=8 F1=1GHz FNOI = DEC 10 1MHz 1 PORT=2 HNUM=2*F1 NOISE=ON

This analysis will use the noisy source at port 1 whose noise spectrum is defined by nsrc and it will compute the noise power density at the load at port 2, at the second harmonic. After the analysis, the phase noise, amplitude noise, upper and lower sideband noise spectrums can be displayed.

Stability Analysis and Solution-Path TracingThis is an optional setting in the Harmonic Balance Analysis, 1-Tone dialog box. For additional explanation, see Solution-Path Tracing in the online help topics.

Netlist Syntax and Parameters for 1-Tone HB Analysis

Netlist Example.HB NHARM=16 F1=1GHz

The analysis contains 16 harmonics of the fundamental at 10GHz, plus DC. The frequency spec-trum used is {0, 1GHz, 2GHz, 3GHz, ... 16GHz}.

Parameter Description Default Comments

NHARM Number of harmonics to use in the analysis

Required The number of harmonics excluding DC. A DC analysis of the circuit is indicated by a value of 0.

F1 Frequency of the fundamental tone in the analysis

Required

Harmonic Balance Analysis (HBA) 12-19

Page 71: Circuit Simulator

Title

HBA, 2-Tone, MixerTwo-tone harmonic balance analysis is used for simulating up-conversion in modulators and down-conversion in mixers. The circuit is driven by a LO source at F1 and either a RF source at F2 (for down-conversion) or a RF source at |F2-F1| (for up-conversion). Sources at other harmonically related frequencies can also be included, for example, to define sub-harmonic mixers. Parameters:

Two-Tone Mixer Analysis SpectrumIncreasing the number of LO harmonics improves the accuracy of the simulation at the expense of computation time. For non-switching mixers, NLO is typically set between 4 and 8. For switch-mode mixers or mixers that are driven far into saturation, 8 to 16 harmonics may be needed.If the RF source is small compared to the LO, the number of sidebands can be set to 1 (default). Many up-converter cases have a large-signal modulation source, in which case NSB may be increased to 2 or 3. When studying mixer compression by the RF source, NSB can also be increased to 2 or 3 for improved accuracy.When the power contained in one of the fundamentals is much greater than the other, as in a mixer case, then a spectrum is selected such that the harmonics of the strong signal (LO) and the side-bands of the LO and weak signal (RF) can be assessed. The bounds are then chosen as:m1 = M1m2 = M20 ≤ |p| ≤ M1 and 0 ≤ |q| ≤ M2where M1 is the number of LO harmonics (NLO) and M2 is the number of sidebands (NSB) on each side of the LO. The LO harmonics, sidebands and difference frequency are clearly seen. The total number of spectral components for this selection algorithm is given byNt = M1*(2*M2 + 1) + M2This resulting spectrum (for M1=4, M2=2) is shown in the following figure:

NLO Number of LO harmonics to use in the analysis

NSB Number of RF sidebands

F1 Frequency of tone 1 in the analysis

F2 Frequency of tone 2 in the analysis

12-20 Harmonic Balance Analysis (HBA)

Page 72: Circuit Simulator

Title

To Set Up a 2-Tone, Mixer Analysis1. On the menu bar, click Circuit and then click Add Solution Setup.2. When the Solution Setup dialog box appears, select Harmonic Balance in the Analysis

Type list.3. In Solution Setup, type an Analysis Name (or accept the default name, for example,

“HB2Tone2”). Select 2-Tone, Mixer Spectrum in the Category list.4. For most simulations, leave Disable this analysis unselected (the default). But depending

on the requirements for a particular project, clearing this box lets you create and store multiple solution setups for later use. (Note that if this feature is used, any changes made to the project will invalidate the simulation results.)

5. Click Next, and the Harmonic Balance Analysis, 2-Tone, Mixer Spectrum dialog box appears. In the No. of LO Harmonics and No. of RF Sidebands boxes, enter integer values for the local-oscillator harmonics and RF sidebands. For more information, see the previous discussion (Two-Tone Mixer Analysis Spectrum).

6. In the Harmonic Balance Analysis, 2-Tone, Mixer Spectrum dialog box, select either the following: Small Signal Mixer Analysis or Use Solution-Path Tracing. These are either/or selections, depending on the requirements of a particular project. For more informa-tion see Stability Analysis, Solution-Path Tracing, and Small Signal Mixer Analysis in the online help topics.

7. To enter the sweep parameters for frequency (F1 and F2, both required) do either of the fol-lowing:• In the Harmonic Balance Analysis, 2-Tone Mixer Spectrum dialog box, click the

< H

0+H0

>=

0

f

LO Harmonics

1st Sideband

2nd Sideband<

H1+

H0 >

=f1

< H

0+H1

>=

f2=

f1+

d

d= f2-f1

< -

H1+

H2 >

=f1

+2*

d

< H

2-H1

>=

f1-d

< H

3-H2

>=

f1-2

*d

< -

H1+

H1 >

=d=

-f1+

f2<

-H2

+H2

>=

2*d=

-2*f

1+2*

f2

< H

4-H2

>=

2*f1

-2*d

< H

5-H2

>=

3*f1

-2*d

< H

6-H2

>=

4*f1

-2*d

< H

3-H1

>=

2*f1

-d

< H

4-H1

>=

3*f1

-d

< H

5-H1

>=

4*f1

-d

< H

2+H0

>=

2*f1

< H

3+H0

>=

3*f1

< H

4+H0

>=

4*f1

< H

1+H1

>=

2*f1

+d

< H

2+H1

>=

3*f1

+d

< H

3+H1

>=

4*f1

+d

< H

0+H2

>=

2*f2

=2*

f1+

2*d

< H

1+H2

>=

3*f1

+2*

d

< H

2+H2

>=

4*f1

+2*

d

IF

LORF

Two-tone spectrum for M1=4, M2=2. The vertical axisdelineates the LO harmonics and sideband products.

Harmonic Balance Analysis (HBA) 12-21

Page 73: Circuit Simulator

Title

blank text area to the right of F1 (under Name and Sweep Value). Type the sweep parameters and netlist syntax directly into the text box. Then follow the same procedure for F2.

• Click Add, and the Add/Edit Sweep dialog box appears: In the Variable list, make sure that F1 is selected (default selection). Select Single Value, type the frequency in the Value text box, and make sure that the appropriate units (GHz, MHz, kHz) are selected. Then follow the same procedure for F2, Click Add, and then click OK to close the Add/Edit Sweep dialog box.

8. To customize the analysis (for example, to override Verbose mode), click Solution Setup Option (Default Options). When the Select Solution Options dialog box appears, make the appropriate selections, click OK, and return to the Harmonic Balance Analysis, 2-Tone, Mixer Spectrum dialog box. For more information, see Solution Options in the online help topics.

9. When the Harmonic Balance Analysis, 2-Tone, Mixer Spectrum dialog box reappears, click Finish.

10. To set up an advanced sweep option (for example, to sweep a circuit parameter or a bias source), see Sweep Options, HBA Sweep Options, and Advanced Sweep Options in the online help topics.

11. Run the simulation: On the menu bar, click Circuit and then click Start Analysis. If the circuit was set up correctly, the analysis begins immediately and a red progress bar appears. (If the analysis is not successful, check the Message Window for an explanation, and then take cor-rective action.)

12. To display results: On the menu bar, click Circuit and then click Create Report. For more information, see Generating Reports and Post-Processing in the online help topics.

Small-Signal Mixer AnalysisThis mode assumes that the RF signal is small enough to not affect the operating regime. In other words, the RF signal power should be much smaller than the LO (at least 10 dB for a lossy mixer , and 0 ~ 30 dB for a high gain mixer). This criterion is easily satisfied for most mixer applications. But if the RF signal power is comparable to the LO (or if you need to determine the compression characteristics of the mixer), then a full harmonic-balance analysis is needed.The advantage to using small-signal mixer analysis comes from the speed of the analysis. Since the RF signal power is neglected, the harmonic-balance analysis is performed using only the single-tone LO. This analysis is much faster than two-tone analysis. The program then computes the spec-ified conversion gain using linear frequency conversion methods.For additional information, see Small-Signal Mixer Analysis in the online help topics.

Calculate Noise FigureThe noise figure of the mixer can be computed by turning NOISE on. The noise is computed at the default temperature (297K). Contributions of phase noise injected by the LO can be accommodated by using the .NOISESOURCE statement. The output of the mixer noise analysis is NF as detailed above. For example, in the default mixer configuration, the noise figure can be displayed at

12-22 Harmonic Balance Analysis (HBA)

Page 74: Circuit Simulator

Title

NF31<F2-F1,F2>. Note the similarity between the CG and NF keywords - they use the same ports and harmonic numbers. Sources and frequencies can also be swept for noise figure analysis.The key point is that nonlinear mixer noise analysis “ignores” the RF input specification. The sig-nal is still there for use in graphs, as we have shown with our Y-Data definition. However, the RF signal is assumed to be low enough that it qualifies as a small-signal input, so its absolute level is irrelevant. The definition shown is the proper way to display mixer noise figure as a function of LO power.Based upon the discussion above, it is not possible to analyze mixer noise figure as a function of RF drive. The RF specification is ignored, so the simulator simply will not see the swept variable. The analysis will still run, however, and you will be able to see the noise figure at a single drive level. The results here would be valid for LO drive as specified in the project and any “small-sig-nal” RF drive level.

Harmonic Balance Analysis (HBA) 12-23

Page 75: Circuit Simulator

Title

Netlist Syntax and Parameters

Netlist ExampleDown-Converter Example:

VSIN 1 0 V=1.0V HNUM=F1; 1V LO source at F1VSIN 2 0 V=0.1V HNUM=F2; 0.1V RF source at F2.HB NLO=8 NSB=1 F1=1.00GHz F2=1.05GHz

The analysis will use 8 harmonics of the LO and 1 RF sideband. The LO frequency is 1GHz using harmonic number F1, the RF frequency is 1.05GHz using harmonic number F2, and the IF fre-quency is 50MHz at harmonic number F2-F1.Up-Converter Example:

VSIN 1 0 V=1.0 HNUM=F1; 1V LO source at F1VSIN 2 0 V=0.2 HNUM=F2-F1; 0.2V modulation source at F2-F2

Parameter Description Default Comments

NLO Number of LO harmonics to use in the analysis

Increasing the number of LO harmonics improves the accuracy of the simulation at the expense of computation time. For non-switching mixers, NLO is typically set between 4 and 8. For switch-mode For mixers or mixers that are driven far into saturation, 8 to 16 harmonics may be needed.

NSB Number of RF sidebands

If the RF source is small compared to the LO, the number of sidebands can be set to 1 (default). Many up-converter cases have a large-signal modulation source, in which case NSB may be increased to 2 or 3. When analyzing mixer compression by the RF source, NSB can also be increased to 2 or 3 for improved accuracy.

F1 Frequency of tone 1 in the analysis

required

F2 Frequency of tone 2 in the analysis

required

12-24 Harmonic Balance Analysis (HBA)

Page 76: Circuit Simulator

Title

(50MHz).HB NLO=8 NSB=2 F1=1.00GHz F2=1.05GHz

The analysis will use 8 harmonics of the LO and 2 RF sidebands. The LO frequency is 1GHz at F1, the up-converted RF signal will emerge at 1.05GHz at F2, and the modulation signal is 50MHz at F2-F1. Note there will also be an up-converted RF signal at 0.95GHz (2*F1-F2).Sub-harmonic Down Converter Example:

VSIN 1 0 V=1.0 HNUM=F1; 1V LO source at F1VSIN 2 0 V=0.01 HNUM=F1+F2; 0.01V RF source at 2*F1+? = F1+F2; ? = F2-F1.HB NLO=8 NSB=1 F1=1.00GHz F2=1.05GHz

This example is mixing the RF signal at 2.05GHz with the LO at 1GHz. The 2nd harmonic of the LO is used to mix with the RF to produce an IF at 50MHz. Note that the fundamental frequencies F1 & F2 are chosen for a regular mixer and the RF signal is applied at the appropriate harmonic, i.e. 2.05GHz = 2*F1+? = F1 + F2 where ? is F2 - F1. The analysis takes place with 8 LO harmonics and 1 RF sideband.

Harmonic Balance Analysis (HBA) 12-25

Page 77: Circuit Simulator

Title

HBA, 2-Tone, IntermodTwo-tone harmonic balance is used to simulate intermodulation distortion in amplifiers. The circuit is driven by two sinusoidal sources separated in frequency by 1%, typically. Sources at harmoni-cally related frequencies can also be included, if desired. Parameters:

INTM is usually set to 3 for third-order intermodulation calculations and calculation of IP3. Simi-larly, set INTM to 5 for fifth order intermodulation, 7 for seventh order, etc. The higher the order, the more frequency components are considered and the longer the calculation time.

Two-Tone Intermod Analysis SpectrumThe two-tone analysis spectrum is defined as:S2 = |p*f1 + q*f2||p|=0,1,,...,m1 |q|=0,1,...,m2where f1 and f2 are the first and second fundamentals, and m1 and m2 define the bounds of the spectrum. When the powers of the fundamentals are of similar magnitude, the bounds are chosen such that the harmonics and intermodulation products can be accurately assessed. The bounds are chosen as: m1 = m2 = INTM|p| + |q| ≤ INTMINTM is called the intermodulation order since it determines the order of intermodulation products that will included in the spectrum. The total number of spectral components for this selection algo-rithm isNt = INTM * (INTM + 1)In two-tone intermodulation analysis (two RF signals), INTM is the maximum order of intermodu-lation products and must not be less than 2. If the pair of fundamental frequencies are (f1, f2), the frequencies of interest, i.e., all spectral elements of the circuit, are given by: |p*f1 + q*f2 |, 0 ≤ |p| + |q| ≤ INTMThe spectrual plot (for INTM = 3) is shown in the following diagram:

INTM Order of intermodulation distortion to calculate in the analysis

F1 Frequency of tone 1 in the analysis

F2 Frequency of tone 2 in the analysis

12-26 Harmonic Balance Analysis (HBA)

Page 78: Circuit Simulator

Title

Two-tone intermodulation spectrum for M=3. The vertical axis shows the intermodulation order for each spectral component.

To Set Up a 2-Tone, Intermod Spectrum Analysis1. On the menu bar, click Circuit and then click Add Solution Setup.2. When the Solution Setup dialog box appears, select Harmonic Balance in the Analysis

Type list.3. In Solution Setup, type an Analysis Name (or accept the default name, for example,

“HB3Tone2”). Select 2-Tone, Intermodulation Spectrum in the Category list.4. For most simulations, leave Disable this analysis unselected (the default). But depending

on the requirements for a particular project, clearing this box lets you create and store multiple solution setups for later use. (Note that if this feature is used, any changes made to the project will invalidate the simulation results.)

5. Click Next, and the Harmonic Balance Analysis, 2-Tone, Intermodulation Spec-trum dialog box appears. In the Intermodulation Order box, enter the appropriate integer value. For more information, see the previous discussion (Two-Tone Intermod Analysis Spec-trum).

6. In the Harmonic Balance Analysis, 2-Tone, Intermodulation Spectrum dialog box, you can also select Use Solution-Path Tracing. This is an optional selection, depending on the requirements of a particular project. For more information see Solution-Path Tracing in the online help topics.

7. To enter the sweep parameters for frequency (F1 and F2, required) do either of the following:

< -

H1+

H1 >

=-f1

+f2

< H

1+H0

>=

f1

< H

2+H0

>=

f2

< H

2-H1

>=

2*f1

-f2

< -

H1+

H2 >

=-f1

+2*

f2

< H

0+H0

>=

0

< H

2+H0

>=

2*f1

< H

1+H1

>=

f1+

f2

< H

0+H2

>=

2*f2

< H

3+H0

>=

3*f1

< H

2+H1

>=

2*f1

+f2

< H

1+H2

>=

f1+

2*f2

< H

0+H3

>=

3*f2

f

3

2

1

IntermodulationOrder

Signa

l 1

Signa

l 2

Low

er 3

rd O

rder

Pro

duct

Uppe

r 3r

d O

rder

Pro

duct

Two-tone intermodulation spectrum for M=3. The verticalaxis shows the intermodulation order for each spectralcomponent.

Harmonic Balance Analysis (HBA) 12-27

Page 79: Circuit Simulator

Title

• In the Harmonic Balance Analysis, 2-Tone, Intermodulation Spectrum dialog box, click the blank text area to the right of F1 (under Name and Sweep Value). Type the sweep parameters and netlist syntax directly into the text box. Follow the same proce-dure for F2.

• Click Add, and the Add/Edit Sweep dialog box appears: In the Variable list, make sure that F1 is selected (default selection). Select Single Value, type the frequency in the Value text box, and make sure that the appropriate units (GHz, MHz, kHz) are selected. Follow the same procedure for F2, Click Add, and then click OK to close the Add/Edit Sweep dialog box.

8. To customize the analysis (for example, to override Verbose mode), click Solution Setup Option (Default Options). When the Select Solution Options dialog box appears, make the appropriate selections, click OK, and return to the Harmonic Balance Analysis, 2-Tone, Intermodulation Spectrum dialog box. For more information, see Solution Options in the online help topics.

9. When the Harmonic Balance Analysis, 2-Tone, Mixer Spectrum dialog box reap-pears, click Finish.

10. To set up an advanced sweep option (for example, to sweep a circuit parameter or a bias source), see Sweep Options, HBA Sweep Options, and Advanced Sweep Options in the online help topics.

11. Run the simulation: On the menu bar, click Circuit and then click Start Analysis. If the circuit was set up correctly, the analysis begins immediately and a red progress bar appears. (If the analysis is not successful, check the Message Window for an explanation, and then take cor-rective action.)

12. To display results: On the menu bar, click Circuit and then click Create Report. For more information, see Generating Reports and Post-Processing in the online help topics.

12-28 Harmonic Balance Analysis (HBA)

Page 80: Circuit Simulator

Title

Netlist Syntax and Parameters

Netlist ExampleVSIN 1 0 V=1.0 HNUM=F1VSIN 2 0 V=1.0 HNUM=F2.HB INTM=3 F1=1.00GHz F2=1.01GHz

The analysis will contain 13 harmonics, including DC. The frequency spectrum used is {0, 0.01GHz,0.99GHz, 1.00GHz, 1.01GHz, 1.02GHz, 2.00GHz, 2.01GHz, 2.02GHz, 3.00GHz, 3.01GHz, 3.02GHz, 3.03GHz}. The intermodulation frequencies for this example are 2*F1−F2 = 0.99GHz and 2*F2−F1 = 1.02GHz.

Parameter Description Default Comments

INTM Order of intermodulation distortion to calculate in the analysis

3 INTM is usually set to 3 for third-order intermodulation calculations and calculation of IP3. Similarly, set INTM to 5 for fifth-order intermodulation, 7 for seventh-order, etc. The higher the order, the greater the number of frequency components considered and the longer the calculation time.

F1 Frequency of Tone 1 in the analysis

Required

F2 Frequency of Tone 2 in the analysis

Required

Harmonic Balance Analysis (HBA) 12-29

Page 81: Circuit Simulator

Title

HBA, 3-Tone, IntermodThree-tone harmonic balance analysis for amplifiers is used to analyze the intermodulation charac-teristics of circuits excited with three incommensurate tones. Although the common definition of IP3 for amplifiers uses two tones, performing a three-tone analysis will provide more information of the intermodulation products. Applications include investigating intermodulation of a signal consisting of three tones, for exam-ple, a CATV amp with one video tone and two audio tones, or an interfering signal in a receiver. This analysis is used when the 3 tones are of similar power. Parameters:

Three-Tone, Intermod Analysis SpectrumINTM is usually set to 3 for third-order intermodulation calculations, 5 for fifth order, and so on. The higher the order, the more frequency components are considered and the longer the calculation time. The three-tone analysis spectra are very similar to two-tone and are defined by|p*f1 + q*f2 + r*f3|, 0 ≤ |p| + |q| + |r| ≤ Intmwhere f1, f2, and f3 are the fundamental frequencies. If the pair of fundamental frequencies are (f1, f2), the frequencies of interest, i.e., all spectral elements of the circuit, are given by:| p*f1 + q*f2 |, 0 ≤ | p | + | q | ≤ m The total number of spectral components is given by:

INTM Order of intermodulation distortion to calculate in the analysis

F1 Frequency of tone 1 in the analysis

F2 Frequency of tone 2 in the analysis

F3 Frequency of tone 3 in the analysis

12-30 Harmonic Balance Analysis (HBA)

Page 82: Circuit Simulator

Title

The resulting spectral components (for INTM =3) are shown in the following diagram. Notice the much larger number of tones in the spectrum as compared with the two-tone case for INTM=3.(

To Set Up a 3-Tone, Intermod Spectrum Analysis1. On the menu bar, click Circuit and then click Add Solution Setup.2. When the Solution Setup dialog box appears, select Harmonic Balance in the Analysis

Type list.3. In Solution Setup, type an Analysis Name (or accept the default name, for example,

“HB4Tone3”). Select 3-Tone, Intermodulation Spectrum in the Category list.4. For most simulations, leave Disable this analysis unselected (the default). But depending

on the requirements for a particular project, clearing this box lets you create and store multiple solution setups for later use. (Note that if this feature is used, any changes made to the project will invalidate the simulation results.)

5. Click Next, and the Harmonic Balance Analysis, 3-Tone, Intermodulation Spec-trum dialog box appears. In the Intermodulation Order box, enter the appropriate integer value. For more information, see the previous discussion (Three Tone Intermod Analysis Spec-trum).

6. In the Harmonic Balance Analysis, 3-Tone, Intermodulation Spectrum dialog box, you can also select Use Solution-Path Tracing. This is an optional selection, depending on the requirements of a particular project. For more information see Solution-Path Tracing in the online help topics.

7. To enter the sweep parameters for frequency (F1, F2 and F3, all required) do either of the fol-lowing:

f

< H

0-H1

+H1

><

-H1

+H1

+H0

>

< -

H1+

H0+

H1 >

< H

0+H0

+H0

>

< H

2+H0

-H1

><

H2-

H1+

H0 >

< H

1+H1

-H1

><

H1+

H0+

H0 >

< H

0+H2

-H1

><

H1-

H1+

H1 >

< H

0+H1

+H0

>

< H

0+H0

+H1

><

-H1

+H2

+H0

><

H0-

H1+

H2 >

< -

H1+

H1+

H1 >

< -

H1+

H0+

H2 >

< H

2+H0

+H0

><

H1+

H1+

H0 >

< H

1+H0

+H1

><

H0+

H2+

H0 >

< H

0+H1

+H1

><

H0+

H0+

H2 >

< H

3+H0

+H0

><

H2+

H1+

H0 >

< H

1+H2

+H0

><

H1+

H1+

H1 >

< H

0+H3

+H0

><

H1+

H0+

H2 >

< H

0+H2

+H1

><

H0+

H1+

H2 >

< H

0+H0

+H3

>

1

2

3

Signa

l 1

Signa

l 2

Signa

l 3

Three tone intermodulation spectrum for M=3. The vertical axis shows the intermodulation order for each spectral component. Note that theproducts will change position depending on the separation between thefundamental tones. Here the difference between signal 3 and signal 2 isslightly greater than the difference between signal 2 and signal 1.

Harmonic Balance Analysis (HBA) 12-31

Page 83: Circuit Simulator

Title

• In the Harmonic Balance Analysis, 3-Tone, Intermodulation Spectrum dialog box, click the blank text area to the right of F1 (under Name and Sweep Value). Type the sweep parameters and netlist syntax directly into the text box. Follow the same proce-dure for F2 and F3.

• Click Add, and the Add/Edit Sweep dialog box appears: In the Variable list, make sure that F1 is selected (default selection). Select Single Value, type the frequency in the Value text box, and make sure that the appropriate units (GHz, MHz, kHz) are selected. Follow the same procedure for F2 and F3, Click Add, and then click OK to close the Add/Edit Sweep dialog box.

8. To customize the analysis (for example, to override Verbose mode), click Solution Setup Option (Default Options). When the Select Solution Options dialog box appears, make the appropriate selections, click OK, and return to the Harmonic Balance Analysis, 3-Tone, Intermodulation Spectrum dialog box. For more information, see Solution Options in the online help topics.

9. When the Harmonic Balance Analysis, 3-Tone, Intermodulation Spectrum dialog box reappears, click Finish.

10. To set up an advanced sweep option (for example, to sweep a circuit parameter or a bias source), see Sweep Options, HBA Sweep Options, and Advanced Sweep Options in the online help topics.

11. Run the simulation: On the menu bar, click Circuit and then click Start Analysis. If the circuit was set up correctly, the analysis begins immediately and a red progress bar appears. (If the analysis is not successful, check the Message Window for an explanation, and then take cor-rective action.)

12. To display results: On the menu bar, click Circuit and then click Create Report. For more information, see Generating Reports and Post-Processing in the online help topics.

12-32 Harmonic Balance Analysis (HBA)

Page 84: Circuit Simulator

Title

Netlist Syntax and Parameters

Netlist ExampleVSIN 1 0 V=1.0 HNUM=F1VSIN 2 0 V=1.0 HNUM=F2VSIN 3 0 V=1.0 HNUM=F3.HB INTM=3 F1=1.00GHz F2=1.01GHz F3=1.011GHz

The analysis uses 1.00GHz, 1.01GHz and 1.011GHz for the fundamental frequencies. Note that the difference chosen between F2 and F1 is 10MHz and the difference between F3 and F2 is 1MHz. These differences should not be chosen as equal because intermodulation products will then fall on the same frequencies. It is generally better to separate the differences, even by a small amount, so that the harmonic number of the intermodulation product can be determined.

Parameter Description Default Comments

INTM INTM is usually set to 3 for third-order intermodulation calculations, 5 for fifth order, etc. The higher the order, the more frequency components are considered and the longer the calculation time

Required

F1 Frequency of tone 1 in the analysis

Required

F2 Frequency of tone 2 in the analysis

Required

F3 Frequency of tone 2 in the analysis

Required

Harmonic Balance Analysis (HBA) 12-33

Page 85: Circuit Simulator

Title

HBA, 3-Tone, Mixer IntermodThree-tone harmonic-balance analysis for mixers is used for simulating the intermodulation distor-tion in mixers and modulators. The circuit is excited by a LO and two RF signals separated in fre-quency by 1%, typically. Sources at harmonically related frequencies can also be included, if desired. Parameters:

Increasing the number of LO harmonics improves the accuracy of the simulation at the expense of computation time. For non-switching mixers, NLO is typically set between 4 and 8. For switch-mode mixers or mixers that are driven far into saturation, 8 to 16 harmonics may be needed.

Three-Tone Mixer Intermod Analysis SpectrumFor third-order intermodulation, INTM is set to 3; for fifth order, it is set to 5, etc.The number of frequency components used in the analysis increases rapidly as NLO or INTM are increased, and the corresponding memory and computation time increases. See the Nonlinear Anal-ysis Chapter for details.For the mixer case, the spectrum is chosen assuming that one LO and two RF signals are present. The spectrum is selected by recognizing the intermodulation products of the RF signals as the quantities of interest. The intermodulation spectrum of the two isolated RF signals is then repeated on each side of the LO harmonics to form the three-tone mixer spectrum. This is given by: m1 = NLO and m2 = m3 = INTM0 ≤ |p + q + r| ≤ M1 0 ≤ |q| + |r| ≤ M2(17)where M1 is the number of LO harmonics and M2 is the intermodulation order of the RF tones. The spectrum is shown in Figure 10-5 for M1=2 and M2=3. The total number of spectral components is given byNt = M1*(2*M22 + 2*M2 + 1) + M22 + M2 (18)Generally, the number of frequency components required for three-tone analysis grows much faster than for two-tone analysis. This restricts the nonlinearity that can be computed. If four or more

NLO Number of LO harmonics to use in the analysis

INTM Order of intermodulation distortion to calculate in the analysis

F1 Frequency of the local oscillator (tone 1)

F2 Frequency of the first RF tone (tone 2)

F3 Frequency of the second RF tone (tone 3)

12-34 Harmonic Balance Analysis (HBA)

Page 86: Circuit Simulator

Title

tones were considered, the number of frequency components becomes prohibitive unless smaller selection schemes are used.The intermodulation products of the two RF signals are shown to the third order in the following diagram (important spectral components are labeled):

To Set Up a 3-Tone, Mixer Intermod Analysis (.HBA)1. On the menu bar, click Circuit and then click Add Solution Setup.2. When the Solution Setup dialog box appears, select Harmonic Balance in the Analysis

Type list.3. In Solution Setup, type an Analysis Name (or accept the default name, for example,

“HB5Tone3”). Select 3-Tone, Mixer Intermodulation Spectrum in the Category list.4. For most simulations, leave Disable this analysis unselected (the default). But depending

on the requirements for a particular project, clearing this box lets you create and store multiple solution setups for later use. (Note that if this feature is used, any changes made to the project will invalidate the simulation results.)

5. Click Next, and the Harmonic Balance Analysis, 3-Tone, Mixer Intermodulation Spectrum dialog box appears. In the No. of LO Harmonics and Intermodulation Order boxes, enter integer values for the local-oscillator harmonics and intermodulation order. For more information, see the previous discussion (Three-Tone Mixer Intermod Analysis Spec-trum).

6. In the Harmonic Balance Analysis, 3-Tone Mixer Intermodulation dialog box, you can select the Use Solution-Path Tracing option. This is an optional selection, depending on the requirements of a particular project. For more information see Solution-Path Tracing in the online help topics.

7. To enter the sweep parameters for frequency F1, F2, and F3 (all required) do either of the fol-lowing:• In the Harmonic Balance Analysis, 3-Tone, Mixer Intermodulation dialog box,

f

LO Harmonics

1st Order2nd Order3rd Order

IF1= < -H1+ H1+ H0 >IF2= < -H1+ H0-H1 >

U= < -H1-H1+ H2 >

L= < -H1+ H2-H1 >

LO= < H1+ H0+ H0 >

RF1= < H0+ H1+ H0 >

RF2= < H0+ H0+ H1 >

Three tone mixer spectrum for M1=2, M2=3. The intermodulation products of the two RF signals are shown to third order. Important spectral components are labeled.

Harmonic Balance Analysis (HBA) 12-35

Page 87: Circuit Simulator

Title

under Name and Sweep Value, click the blank area near F1: Type the sweep parame-ters and netlist syntax directly into the text box. Follow the same procedure for F2 and F3.

• Click Add, and the Add/Edit Sweep dialog box appears: In the Variable list, make sure that F1 is selected (default selection). Select Single Value, type the frequency in the Value text box, and make sure that the appropriate units (GHz, MHz, kHz) are selected. Follow the same procedure for F2 and F3, Click Add, and then click OK to close the Add/Edit Sweep dialog box.

8. To customize the analysis (for example, to override Verbose mode), click Solution Setup Option (Default Options). When the Select Solution Options dialog box appears, make the appropriate selections, click OK, and return to the Harmonic Balance Analysis, 3-Tone, Mixer Intermodulation Spectrum dialog box. For more information, see Solution Options in the online help topics.

9. When the Harmonic Balance Analysis, 3-Tone, Mixer Intermodulation Spectrum dialog box reappears, click Finish.

10. To set up an advanced sweep option (for example, to sweep a circuit parameter or a bias source), see Sweep Options, HBA Sweep Options, and Advanced Sweep Options in the online help topics.

11. Run the simulation: On the menu bar, click Circuit and then click Start Analysis. If the circuit was set up correctly, the analysis begins immediately and a red progress bar appears. (If the analysis is not successful, check the Message Window for an explanation, and then take cor-rective action.)

12. To display results: On the menu bar, click Circuit and then click Create Report. For more information, see Generating Reports and Post-Processing in the online help topics.

12-36 Harmonic Balance Analysis (HBA)

Page 88: Circuit Simulator

Title

Netlist Syntax and Parameters

Netlist ExampleVSIN 1 0 V=1.0 HNUM=F1; LO signalVSIN 2 3 V=0.01 HNUM=F2; RF1 signalVSIN 3 0 V=0.01 HNUM=F3; RF2 signal.HB NLO=4 INTM=3 F1=1.00GHz F2=1.01GHz F3=1.011GHz

The LO at 1.00GHz will be analyzed with 4 harmonics and the spectrum will be set up for third-order intermodulation distortion at baseband. The two RF signals at 1.01GHz and 1.011GHz will

Parameter Description Default Comments

NLO Number of LO harmonics to use in the analysis

required Increasing the number of LO harmonics improves the accuracy of the simulation at the expense of computation time. For non-switching mixers, NLO is typically set between 4 and 8. For switch-mode mixers or mixers that are driven far into saturation, 8 to 16 harmonics may be needed.

INTM Order of intermodulation distortion to calculate in the analysis

required For third-order intermodulation, INTM is set to 3; for fifth order, it is set to 5, etc.The number of frequency components used in the analysis increases rapidly as NLO or INTM are increased, and the corresponding memory and computation time increases. See the Nonlinear Analysis Chapter for details.

F1 Frequency of tone 1 in the analysis

required

F2 Frequency of tone 2 in the analysis

required

F3 Frequency of tone 2 in the analysis

required

Harmonic Balance Analysis (HBA) 12-37

Page 89: Circuit Simulator

Title

mix down to IF1 at 10MHz and IF2 at 11MHz. The intermodulation products will be at 9MHz and 12MHz. The corresponding harmonic numbers are given (Similar principles apply for the up-converter and sub-harmonic mixer cases as described the earlier 2-tone HB Mixer Analysis):

LO 1.00GHz F1

RF1 1.01GHz F2

RF2 F3 1.011GHz

IF1 10MHz F2-F1

IF2 11MHz F3-F1

IM1 9MHz 2IF1-IF2 = -F1+2*F2-F3

IM2 12MHz 2IF2-IF1 = -F1-F2+2*F3

12-38 Harmonic Balance Analysis (HBA)

Page 90: Circuit Simulator

Title

Solution OptionsAfter doing the solution setup (see Hamonic Balance Analysis) you can configure solution options by selecting Solution Setup Option (Default Options) in the Select Solution Options dialog and clicking New. This opens the Solution Options dialog.

The Solution Options dialog is organized into the following tab sections:• HB1 • HB2

Harmonic Balance Analysis (HBA) 12-39

Page 91: Circuit Simulator

Title

• Transient1• Transient2• Advanced Note: The Name field in the Solution Options dialog specifies the file in which to save the options you select.

HB1 The HB1 tab is already selected when the Solution Options dialog opens.

The following controls are available:

12-40 Harmonic Balance Analysis (HBA)

Page 92: Circuit Simulator

Title

• Harmonic balance tolerance sets the total allowed error tolerance Designer uses for solving harmonic balance equations. (The default value is 1E-006.) The solution is said to converge when the solver reduces the harmonic balance error to a value equal to or less than this number. The error tolerance is normalized for each nonlinear device port and each spectral component.

• Max. no of iterations sets the nonzero integer number of solution iterations within which the solver must achieve convergence. (The default value is 400.) If the solver cannot con-verge within the number of iterations specified, it stops.

• Perform DC solution to initialize HB solution tells Designer to perform a DC analysis before harmonic balance analysis. (The default is checked.) You may wish to turn Per-form DC Initialization off when you use the results of a previous analysis to initialize the current analysis (see Initialize Using Previous Solution), or in cases where the analyzed circuit’s DC operating point differs greatly from its DC bias point. (“DC bias point” assumes no signal sources.)

• Use previous solution from file to initialize HB solution tells Designer to use the state variables determined in a previous analysis to initialize the state variables of the current analysis. (The default is unchecked.) After completing each nonlinear analysis, Designer automatically stores the state variables determined in a file named *.var, where * is the filename of the circuit under analysis.

• Increase default sampling rate for TONE1 by 2^x sets the additional sampling point exponent for the first tone. If NP1 is the number of sampling points for Tone 1 determined by Designer, then NP1’ = NP1*(2^x) is used for the number of sampling points of Tone.

• Initialize mixer spectrum by solving LO problem first tells Designer to perform a one-tone analysis of the LO spectrum and use the results for initialization of the complete mixer spectrum.

• Use analytic derivatives during nonlinear solution tells Designer to use analytic deriva-tives of nonlinear devices in HB analysis. Designer will evaluate the derivatives of non-linear devices using the numerical method if this box is unchecked.

Harmonic Balance Analysis (HBA) 12-41

Page 93: Circuit Simulator

Title

HB2 When you select the HB2 tab in the Solution Options dialog, the following dialog is dis-played:

The following controls are available:• Default No. of search points sets the number of steps used during oscillator search mode.

A large number of steps is useful for oscillator design, but may slow Designer during oscillator analysis. This value must be > 5. The default number of search points is 40

• Amplitude of test source sets the amplitude of injected test signal to search and locate oscillation during the oscillator search mode.

• Krylov subset factor sets the maximum number of dimensions of the Krylov subspace used in the iterative Newton analysis by GMRES method. This value must be > 1 and the

12-42 Harmonic Balance Analysis (HBA)

Page 94: Circuit Simulator

Title

default value is 80.• Print CPU times in audit file tells the program to write out the analysis CPU times in the

audit file *.aud, located in the result directory, which allows the user to see the CPU times consumed by the analysis.

Transient1 When you select the Transient1 tab in the Solution Options dialog, the following dialog is dis-played:

The following controls are available:• Absolute current solution tolerance sets the absolute current error tolerance used in

transient analysis.

Harmonic Balance Analysis (HBA) 12-43

Page 95: Circuit Simulator

Title

• Absolute charge solution tolerance sets the charge error tolerace used in transient analy-sis.

• Relative solution tolerance of V and I sets the relative error tolerance of voltages and currents used in transient analysis.

• Minimum conductance of any branch sets the value of the minimum conductance Gmin used in transient analysis.

• Testing device internal currents error tolerance sets the device internal current error tolerance used in transient analysis.

• Absolute voltage tolerance sets the absolute voltage error tolerance used in transient analysis.

• Approximated truncation error scalar factor sets the factor by which the approximate truncation error evaluated in transient analysis is scaled.

12-44 Harmonic Balance Analysis (HBA)

Page 96: Circuit Simulator

Title

Transient2 When you select the Transient2 tab in the Solution Options dialog, the following dialog is dis-played:

The following controls are available:• Relative mag. required for pivoting sets the minimum acceptable pivot ratio used in par-

tial pivoting in the solution of network equations used in transient analysis. PIVREL is the minimum acceptable ratio of an acceptable pivot value to the largest column entry.

• Absolute mag. required for pivoting sets the minimum value of a matrix element for it to be used as a pivot used in transient analysis.

• DC and bias point max. iterations sets the limit on the number of DC iterations in tran-sient analysis.

Harmonic Balance Analysis (HBA) 12-45

Page 97: Circuit Simulator

Title

• DC and bias point max. guess iterations sets the DC transfer curve iteration limit used in transient analysis.

• Max. iterations at any time point sets the limit on the number of iterations for solving one time point in transient analysis.

• Max. iterations for all time points sets the limit on the number of total iterations in tran-sient analysis.

• Max. number of freq. sampling points for convolution sets the maximum number of frequency sampling points for convolution in transient analysis.

Advanced When you select the Advanced tab in the Solution Options dialog, the following dialog is dis-played:

12-46 Harmonic Balance Analysis (HBA)

Page 98: Circuit Simulator

Title

Select one or more of the options listed in the All Options window and click Add to add the option. The following controls are available:

• addsam2 sets the additional sampling point exponent for the second tone. If NP2 is the number of sampling points for Tone 2 determined by Designer, then NP2’ = NP2*(2^x) is used for the number of sampling points of Tone 2. The default value is 0.

• addsamp3 sets the additional sampling point exponent for the third tone. If NP3 is the number of sampling points for Tone 3 determined by Designer, then NP3’ = NP3*(2^x) is used for the number of sampling points of Tone 3. The default value is 0.

• cfnewt is a damping factor used during a Newton iteration in HB analysis. Designer dynamically determines CFNEWT so setting this parameter has limited effect. It is still offered for compatibility with previous Circuit products.

• hbesuppress will suppress the writing of HB errors into the audit file.• itqmin sets the minimum number of Quasi-Newton iterations in HB analysis.• maxnfsampling sets the maximum number of frequency sampling points for convolution

in transient analysis• newtontype sets a flag to select inexact Newton or exact Newton method in HB analysis.

Checked: exact Newton. Unchecked: inexact Newton• oscfstep sets the fractional frequency step used during oscillator search mode. If FSWP-

NUM is set this option will be ignored.• spectrum sets the harmonic pattern used in HB analysis. Undefined=Reduced pattern is

used. Full=full harmonics are used. Reduced=reduced2 pattern is used. Reduced0 through Reduced20 defines each different harmonics pattern used in HB analysis, respectively

• tnom sets the nominal temperature for the circuit.• verbose sets the degree (as an integer ³ 0 and £ 4) of output detail the program saves in

audit files, the names of which take the form *.aud, where * is the filename of the circuit under analysis. The default value, 0, tells Designer to store only the final results of the cir-cuit’s electrical performance. The higher the verbosity number, the more detailed the reportage.

HBA Sweep OptionsTo sweep the frequency of any of the analyses, one or more sweep specifications can be applied to the F1, F2, and F3 parameters. The program will sort the frequencies specified into a monotonic list. For example:

.HB NHARM=16 F1=LIN 1GHz 10GHz 1GHz

will sweep F1 from 1GHz to 10GHz in steps of 1GHz. Sweep specifications can be combined to form sweeps with additional points, for example:

.HB NHARM=16 F1=LIN 1GHz 10GHz 1GHz LIN 5GHz 6GHz 0.1GHz

will include a finer set of analysis points spaced 0.1GHz between 5GHz and 6GHz. Any of the sweep specifications can be mixed (LIN, LIST, DEC, etc.) to define the analysis points.

Harmonic Balance Analysis (HBA) 12-47

Page 99: Circuit Simulator

Title

If a sweep is specified as decreasing, the program will form a monotonically decreasing list to use in the analysis. To specify a decreasing sweep, the end value must be less than the start value; the sign of the increment (for LIN) is ignored. If two or more sweeps with conflicting directions are specified, an increasing sweep will be assumed. For more detailed information, see the discussion on Sweep Specifications.When sweeping more than one frequency, the number of sweep points for the frequencies that are swept together must be the same. That is, if F1 and F2 are swept together and F1 has 10 sweep points, then F2 must also have 10 sweep points. In .HB analysis, all frequencies are collectively swept by default.

Swept Source AnalysisTo sweep DC or RF sources, the SourceSpec specification is used. Voltage, current and power sources may be swept. The sweep is specified in the .HB analysis statement and the source to be swept references the appropriate analysis source variable, i.e. VSRCi, ISRCi, or PSRCi where i is replaced by an integer. For example:

VSIN 1 0 V={VSRC1} FNUM=F1

.HB NHARM=8 F1=1GHz VSRC1=LIN 0.0 1.0 0.1

will sweep the voltage source from 0.1V to 1.0V in steps of 0.1V. Note that VSRC1 is considered a variable and must be enclosed in curly braces. An example of a swept power source at a port is:

PORTP 1 0 PNUM=1 P1={PSRC1} HNUM1=F1 P2={PSRC1} HNUM2=F2

.HB INTM=3 F1=1GHz F2=1.01GHz PSRC1=LIN 0dBm 20dBm 2dB

will sweep each power source at port 1 from 0dBm to 20dBm in steps of 2dB. This is commonly used for intermodulation distortion calculations. Source specifications can also be mixed to sweep power and bias independently, for example:

PORTP 1 0 PNUM=1 P1={PSRC1} HNUM1=F1 P2={PSRC2} HNUM2=F2

.HB NHARM=8 F1=1GHz PSRC1=LIN 0dBm 20dBm 2dB PSRC2=LIN -10dBm 10dBm 2dB

will sweep RF power source 1 from 0dBm to 20dBm in steps of 2dB and will sweep RF power source 2 from -10dBm to 10dBm in steps of 2dB.

Sweeping Frequencies and SourcesBoth frequency and RF or DC sources can be swept in an analysis. By default, the sources will be swept together as the inner loop of the .HB analysis and will be swept independent of frequency.

Sweeping Circuit VariablesArbitrary circuit variables can be swept in an analysis to provide tuning curves of a circuit. For example, to sweep a capacitor value, we can set up an analysis:

.PARAM C1 = 10pF; Set up nominal valueCAP:1 1 0 C={C1}.HB:1 NHARM=8 F1=1GHz C1 = LIN 5pF 15pF 1pF ; C1 is swept in

12-48 Harmonic Balance Analysis (HBA)

Page 100: Circuit Simulator

Title

this analysis.HB:2 NHARM=8 F1=1GHz; C1 is not swept in this analysis

The .PARAM statement sets up the nominal value of C1 which would be used when C1 is not swept, as in the HB:2 analysis. Coupled sweeps and independent sweeps can be set up in this fashion to generate one or more-dimensional tuning curves. For example, a two-dimensional tuning curve can be set up as follows:

.PARAM C1 = 10pFCAP:1 1 0 C={C1}*.PARAM C2 = 5pFCAP:2 2 0 C={C2}*.HB NHARM=8 F1=1GHz C1= LIN 5pF 15pF 1pF C2 = LIN 4pF 6pF 1pF SWPORD={C1,C2}

will generate 11 sweep points for C1 and 3 sweep points for C2 resulting in 33 analysis points. The SWPORD statement indicates that C1 and C2 will be swept independently because they are sepa-rated by a comma.

.PARAM C1 = 10pF P1=0dBmCAP:1 1 0 C={C1}.HB NHARM=8 F1=LIN 1GHz 2GHz 0.1GHz P1=LIN 0dBm 10dBm 2dB + C1= LIN 5pF 15pF 1pF SWPORD={P1, F1, C1}

will sweep P1, F1, and C1 independently, resulting in 6x11x11 = 726 analysis points.

Harmonic Balance Analysis (HBA) 12-49

Page 101: Circuit Simulator

Title

12-50 Harmonic Balance Analysis (HBA)

Page 102: Circuit Simulator

14Harmonic Balance Oscillator Analysis

Harmonic Balance Oscillator Analysis 14-1

Page 103: Circuit Simulator

Title

HB Oscillator (HBOSC)Oscillator Analysis Using Harmonic Balance (.HBOSC)

The Oscillator Design Aid performs a small (but finite) signal HB analysis at frequency points between the start and stop frequencies given for F1. By examining the real and imaginary parts of the injected source, the analysis determines if a resonant frequency exists. If one does exist, it will be displayed during the analysis. The purpose of this analysis is to quickly examine a broad fre-quency range to determine the approximate oscillation frequency (if one exists within the range). See the section on Oscillator Analysis in the Nonlinear Analysis Chapter for more detail.At the end of the analysis, a graph of the real and imaginary parts of the injected source will be dis-played. The criteria for the resonant frequency is:

Imaginary part = 0Real part < 0

Only under these conditions does the circuit have the potential to oscillate. Once the resonant fre-quency is determined, the frequency range is usually narrowed (to about +/- 10%) and an oscillator analysis is performed. .

Example.HBOSC F1=500MHz 700MHz DESIGN=ON

The analysis will search between 500MHz and 700MHz to find the resonant frequency where oscil-lations can be supported.

Parameter Description

F1 Set the start and stop frequency limits, i.e. F1=start stop

DESIGN Set to ON for oscillator design analysis and OFF for other functions

Other parameters

Other parameters may be specified, but will be ignored during this analysis.

14-2 Harmonic Balance Oscillator Analysis

Page 104: Circuit Simulator

Title

Oscillator Option ParametersThree .OPTION parameters are sometimes modified for oscillator design and analysis:

Normally, OSCFSTEP=0.02 is sufficiently small to catch the resonant frequency between the start and stop limits. For high-Q oscillators, it may be necessary to set this to a smaller fraction. Alterna-tively, FSWPNUM can be set, which provides a more intuitive means of specifying the number of frequency points to analyze between the start and stop frequencies. The actual number of frequen-cies may depend on the bandwidth of the range, but 30 to 50 usually suffices. Two methods are offered because using OSCFSTEP is often faster, but FSWPNUM is more intuitive. If FSWPNUM is specified, any value given to OSCFSTEP will be ignored.The default setting for OSCVEXT should suffice for practically all applications. However, for very low power oscillators, it may be necessary to decrease the source magnitude to 1mV.

General Netlist Form.HBOSC[:name]+[NHARM = integer] | INTM = integer | NLO = integer NSB = integer | +NLO = integer INTM = integer +F1 = cval cval [F2 = swpDef] [F3 = swpDef] [FNOI = swpDef]+[anaSwpDef]+[DESIGN = boolean]+[PORT = integer] [HNUM = HarmSpec] +[ NOISE = boolean ] [SWPORD = {anaSwpOrderDef}]

Parameter Description

OSCFSTEP Fractional frequency step used to sweep between the start and stop frequencies (default 0.02)

FSWPNUM Number of frequencies to use to search between start and stop frequencies

OSCVEXT Magnitude of excitation applied to oscillator circuit (default 10mV)

Parameter Description Default Comments

Harmonic Balance Oscillator Analysis 14-3

Page 105: Circuit Simulator

Title

NHARM Number of harmonics for 1-tone HB

4

INTM Intermod. order for 2 & 3-tone HB

amplifier case

NLO NSB Number of LO harmonics for 2-toneNumber of sidebands for 2-tone

mixer case

NLO INTM Number LO harmonics for 3-toneIntermod. order for 3-tone

mixer case

F1 Fundamental frequency oscillator frequency

F2, F3 Frequencies of tones 2 and 3

frequencies that contain RF sources

FNOI Noise spectral frequencies

oscillator noise analysis

anaSwpDef Define swept parameters

none

DESIGN Select Design Aid or Osc Analysis

OFF

PORT Port for noise output 1

HNUM Harmonic number for noise output

F1

NOISE Toggles oscillator noise analysis

OFF

SWPORD Defines ordered sweep See Notes

14-4 Harmonic Balance Oscillator Analysis

Page 106: Circuit Simulator

Title

NotesParameter keyword values in the .HBOSC command may be expressions or parameters, but must be evaluated prior to analysis. Therefore they cannot be dependent on analysis variables (e.g., F).If a value is assigned by a parameter and the parameter is being swept, the value used will only be the one assigned by the original value of the parameter and the sweep values will be ignored.

Harmonic Balance Oscillator Analysis 14-5

Page 107: Circuit Simulator

Title

HBOSC, 1-ToneBasic oscillator analysis (HBO, single tone) is used to perform a full harmonic-balance analysis to solve for the state variables and frequency of an oscillator.

This analysis is usually preceded by an oscillator design analysis which identifies the resonant fre-quency of the circuit and narrow the frequency range within +/-10%, however, this is optional. (For more information, see Oscillator Resonant Frequency Search in the online help topics.) The oscillator analysis proceeds in two phases:1. An injected source will search for the approximate frequency and amplitude needed to satisfy

the loop-gain criteria of an oscillator. Once these conditions are met, step two will proceed.2. A rigorous harmonic-balance analysis will commence to solve the HB equations and determine

the frequency of the oscillator. (For more information, see the oscillator analysis section in the Nonlinear Analysis chapter.)

Example.HBOSC NHARM=4 F1=500MHz 700MHz

This analysis searches for the oscillation frequency between 500MHz and 700MHz. Once found, four harmonics will be used to carry out the full oscillator analysis.

Oscillator Noise AnalysisThe oscillator noise analysis option computes the noise spectral power at a discrete set of frequen-cies offset from the carrier (or harmonics of the carrier). The typical application is to simulate phase noise and amplitude noise of an oscillator. A full harmonic-balance analysis of the oscillator is first carrier out, then the phase noise at each specified frequency offset is computed.

Parameter Description

NHARM Number of harmonics used in the analysis

F1 Set the start and stop frequency limits, i.e. F1=start stop

14-6 Harmonic Balance Oscillator Analysis

Page 108: Circuit Simulator

Title

Example.HBOSC NHARM=4 F1=500MHz 700MHz FNOI=DEC 10 10MHz 2 PORT=2 HNUM=F1 NOISE=ON

This analysis will first perform the oscillator analysis and search for an oscillatory frequency between 500MHz and 700MHz. Then, the oscillator noise analysis will commence and the noise

Parameter Description

OSCFSTEP Fractional frequency step usedto sweep between the start andstop frequencies (default 0.02)

FSWPNUM Number of frequencies to usedto search between start andstop frequencies

OSCVEXT Magnitude of excitation applied to oscillator circuit (default 10mV)

NHARM Number of harmonics used in the analysis

F1 Set the start and stop frequency limits, i.e. F1=start stop

FNOI Specifies the offset frequencies from the fundamental for the noise spectrum. Can use a general sweep specification.

PORT Output port of the noise calculation (default is port 1)

HNUM Harmonic of the noise calculation (default is F1)

NOISE Turns oscillator noise analysis ON or OFF (default is OFF)

Harmonic Balance Oscillator Analysis 14-7

Page 109: Circuit Simulator

Title

power will be computed at port 2, harmonic F1 between 10Hz and 100MHz using 2 frequency points per decade.

To Set Up a 1-Tone Oscillator Analysis 1. On the menu bar, click Circuit and then click Add Solution Setup: 2. When the Solution Setup dialog box appears, select Harmonic Balance Oscillator in the

Analysis Type list.3. In Solution Setup, type an Analysis Name (or accept the default name, for example,

“HBOSC1Tone1”). Make sure that 1-Tone is selected in the Category list.4. For most simulations, leave Perform Analysis selected (the default selection). But depending

on the requirements for a particular project, clearing this box lets you create and store multiple solution setups for later use. (Note that if this feature is used, any changes made to the project will invalidate the simulation results.)

5. Click Next, and the Harmonic Balance Oscillator Analysis, 1-Tone dialog box appears. Select Enable Oscillator Design Analysis.

6. In the No. of Harmonics box, enter an appropriate integer value (required). The higher the number of harmonics, the more accurate the results, but the analysis takes longer to complete. For more information, see Harmonic Balance Analysis in the online help topics.

7. Specify the Oscillator Search Range (required): In the Start and Stop boxes, type the appro-priate frequencies, and make sure that the appropriate units (GHz, MHz, kHz) are selected.

8. Select either of the following: Enable Noise Spectrum Calculations or Use Solution-Path Tracing. These are either/or selections, depending on the requirements of a particular project. For more information see Oscillator Noise Analysis (next section) or Solution-Path Tracing (in the online help topics).

9. To customize the analysis (for example, to override Verbose mode), click Solution Options. When the Solution Options dialog box appears, make the appropriate selections, click OK, and return to the Harmonic Balance Oscillator Analysis, 1-Tone dialog box. For more infor-mation, see Solution Options in the online help topics.

10. To set up an advanced sweep option (for example, to sweep a circuit parameter or a bias source), see Harmonic Balance Sweeps and Advanced Sweep Options in the online help top-ics.

11. Run the simulation: On the menu bar, click Circuit and then click Start Analysis. If the circuit was set up correctly, the analysis begins immediately and a red progress bar appears. (If the analysis is not successful, check the Message Window for an explanation, and then take cor-rective action.)

12. To display results: On the menu bar, click Circuit and then click Create Report. For more information, see Generating Reports and Post-Processing in the online help topics.

Oscillator Noise AnalysisThe oscillator noise analysis option computes the noise spectral power at a discrete set of frequen-cies offset from the carrier (or harmonics of the carrier). The typical application is to simulate phase

14-8 Harmonic Balance Oscillator Analysis

Page 110: Circuit Simulator

Title

noise and amplitude noise of an oscillator. First a full harmonic-balance analysis of the oscillator is done, and then the phase noise at each specified frequency-offset is computed. For additional infor-mation on noise spectral power, see Harmonic Balance, 1-Tone in the online help topics.

Parameters

Example.HBOSC NHARM=4 F1=500MHz 700MHz FNOI=DEC 10 10MHz 2 PORT=2 HNUM=F1 NOISE=ON

This analysis will first perform the oscillator analysis and search for an oscillatory frequency between 500MHz and 700MHz. Then, the oscillator noise analysis will commence and the noise power will be computed at port 2, harmonic F1 between 10Hz and 100MHz using 2 frequency points per decade.

Stability Analysis and Solution-Path TracingThis is an optional setting in the Harmonic Balance Analysis, 1-Tone dialog box. For additional explanation, see Solution-Path Tracing in the online help topics.

Parameter Description

NHARM Number of harmonics used in the analysis

F1 Set the start and stop frequencylimits, i.e. F1=start stop

FNOI Specifies the offset frequencies from the fundamental for the noise spectrum. Can use a general sweep specification.

PORT Output port of the noise calculation (default is port 1)

HNUM Harmonic of the noise calculation (default is F1)

NOISE Turns oscillator noise analysis ON or OFF (default is OFF)

Harmonic Balance Oscillator Analysis 14-9

Page 111: Circuit Simulator

Title

Netlist Syntax and Parameters for 1-Tone HB Analysis

Netlist Example.HB NHARM=16 F1=1GHz

The analysis contains 16 harmonics of the fundamental at 10GHz, plus DC. The frequency spec-trum used is {0, 1GHz, 2GHz, 3GHz, ... 16GHz}.

Parameters Description Default Comments

NHARM Number of harmonics to use in the analysis

Required The number of harmonics excluding DC. A DC analysis of the circuit is indicated by a value of 0.

F1 Frequency of the fundamental tone in the analysis

Required

14-10 Harmonic Balance Oscillator Analysis

Page 112: Circuit Simulator

Title

HBOSC, 2-Tone, MixerOscillator Analysis as Part of 2-Tone Mixer Analysis

The oscillator can determine the frequency of F1 in a two-tone analysis. In this case, the two-tone mixer spectrum is used. The oscillator will perform as the LO and a RF source can be used for F2, or at any harmonic component. The effect of the finite power of any source will be computed. For example, in mixer compression analysis, the large RF source may shift the oscillator frequency if the isolation between the RF and the LO is low. This analysis can be used for complete oscillator-mixer systems or for the special case of self-oscillating mixers where the RF signal is injected directly into the oscillating device. Parameters:

ExampleVSIN 1 0 V=0.01 HNUM=F2.HBOSC NLO=4 NSB=1 F1=500MHz 700MHz F2=800MHz

This analysis will first perform a single-tone oscillator analysis, searching for the oscillation between 500MHz and 700MHz. The second tone will then be introduced and the oscillator problem (using a full two-tone analysis) will be solved. The oscillator frequency and power characteristics may change depending on the effects of the RF source in the circuit.

To Set Up a 2-Tone Oscillator, Mixer Analysis1. On the menu bar, click Circuit and then click Add Solution Setup: 2. When the Solution Setup dialog box appears, select Harmonic Balance Oscillator in the

Analysis Type list.3. In Solution Setup, type an Analysis Name (or accept the default name, for example,

“HBOSC2Tone2”). Select 2-Tone Mixer Intermodulation Spectrum in the Category list.4. For most simulations, leave Perform Analysis selected (the default selection). But depending

on the requirements for a particular project, clearing this box lets you create and store multiple solution setups for later use. (Note that if this feature is used, any changes made to the project

Parameter Description

NLO Number of LO harmonics used in the analysis

NSB Number of RF sidebands used in the analysis

F1 Set the start and stop frequency limits, i.e. F1=start stop

F2 Set the fundamental frequency for the RF tone

Harmonic Balance Oscillator Analysis 14-11

Page 113: Circuit Simulator

Title

will invalidate the simulation results.) 5. Click Next, and the Harmonic Balance Oscillator Analysis, 2-Tone, Mixer Spectrum dia-

log box appears. Select Enable Oscillator Design Analysis.6. In the No. of LO Harmonics and No. of RF Sidebands boxes, enter appropriate integer val-

ues (both required). The higher the number of harmonics, the more accurate the results, but the analysis takes longer to complete. For more information, see Harmonic Balance Analysis in the online help topics.

7. Specify the Oscillator Search Range (required): In the Start and Stop boxes, type the appro-priate frequencies, and make sure that the appropriate units (GHz, MHz, kHz) are selected.

8. Select either of the following: Small-Signal Mixer Analysis or Use Solution-Path Tracing. These are either/or selections, depending on the requirements of a particular project. For more information see Solution-Path Tracing and Small-Signal Mixer Analysis in the online help top-ics.

9. Specify F2: To enter the sweep parameters for frequency F2 (required) do either of the follow-ing:• In the Harmonic BalanceOscillator Analysis, 2-Tone, Mixer Spectrum dialog box,

under Name and Sweep Value, click the blank area near F2: Type the sweep parameters and netlist syntax directly into the text box, and click Finish. Or,

• Click Add, and the Add/Edit Sweep dialog box appears: In the Variable list, make sure that F2 is selected (default selection). Select Single Value, type the frequency in the Value text box, and make sure that the appropriate units (GHz, MHz, kHz) are selected. Click Add, and then click OK to close the Add/Edit Sweep dialog box. When Harmonic Balance Oscillator Analysis, 2-Tone, Mixer Spectrum dialog box reappears, click Fin-ish.

10. To customize the analysis (for example, to override Verbose mode), click Solution Options. When the Solution Options dialog box appears, make the appropriate selections, click OK, and return to the Harmonic Balance Oscillator Analysis, 2-Tone, Mixer Spectrum dialog box. Click Finish. For more information, see Solution Options in the online help topics.

11. To set up an advanced sweep option (for example, to sweep a circuit parameter or a bias source), see Harmonic Balance Sweeps and Advanced Sweep Options in the online help top-ics.

12. Run the simulation: On the menu bar, click Circuit and then click Start Analysis. If the circuit was set up correctly, the analysis begins immediately and a red progress bar appears. (If the analysis is not successful, check the Message Window for an explanation, and then take cor-rective action.)

13. To display results: On the menu bar, click Circuit and then click Create Report. For more information, see Generating Reports and Post-Processing in the online help topics.

14-12 Harmonic Balance Oscillator Analysis

Page 114: Circuit Simulator

Title

Netlist Syntax and Parameters

Netlist ExampleDown-Converter Example:

VSIN 1 0 V=1.0V HNUM=F1; 1V LO source at F1VSIN 2 0 V=0.1V HNUM=F2; 0.1V RF source at F2.HB NLO=8 NSB=1 F1=1.00GHz F2=1.05GHz

The analysis will use 8 harmonics of the LO and 1 RF sideband. The LO frequency is 1GHz using harmonic number F1, the RF frequency is 1.05GHz using harmonic number F2, and the IF fre-quency is 50MHz at harmonic number F2-F1.Up-Converter Example:

VSIN 1 0 V=1.0 HNUM=F1; 1V LO source at F1VSIN 2 0 V=0.2 HNUM=F2-F1; 0.2V modulation source at F2-F2

Parameter Description Default Comments

NLO Number of LO harmonics to use in the analysis

Increasing the number of LO harmonics improves the accuracy of the simulation at the expense of computation time. For non-switching mixers, NLO is typically set between 4 and 8. For switch-mode For mixers or mixers that are driven far into saturation, 8 to 16 harmonics may be needed.

NSB Number of RF sidebands

If the RF source is small compared to the LO, the number of sidebands can be set to 1 (default). Many up-converter cases have a large-signal modulation source, in which case NSB may be increased to 2 or 3. When analyzing mixer compression by the RF source, NSB can also be increased to 2 or 3 for improved accuracy.

F1 Frequency of tone 1 in the analysis

required

F2 Frequency of tone 2 in the analysis

required

Harmonic Balance Oscillator Analysis 14-13

Page 115: Circuit Simulator

Title

(50MHz).HB NLO=8 NSB=2 F1=1.00GHz F2=1.05GHz

The analysis will use 8 harmonics of the LO and 2 RF sidebands. The LO frequency is 1GHz at F1, the up-converted RF signal will emerge at 1.05GHz at F2, and the modulation signal is 50MHz at F2-F1. Note there will also be an up-converted RF signal at 0.95GHz (2*F1-F2).Sub-harmonic Down Converter Example:

VSIN 1 0 V=1.0 HNUM=F1; 1V LO source at F1VSIN 2 0 V=0.01 HNUM=F1+F2; 0.01V RF source at 2*F1+? = F1+F2; ? = F2-F1.HB NLO=8 NSB=1 F1=1.00GHz F2=1.05GHz

This example is mixing the RF signal at 2.05GHz with the LO at 1GHz. The 2nd harmonic of the LO is used to mix with the RF to produce an IF at 50MHz. Note that the fundamental frequencies F1 & F2 are chosen for a regular mixer and the RF signal is applied at the appropriate harmonic, i.e. 2.05GHz = 2*F1+? = F1 + F2 where ? is F2−F1. The analysis takes place with 8 LO harmonics and 1 RF sideband.

14-14 Harmonic Balance Oscillator Analysis

Page 116: Circuit Simulator

Title

HBOSC, 2-Tone, IntermodOscillator Analysis as Part of 2-Tone Intermodulation Analysis

The oscillator can determine the frequency of F1 in a two-tone analysis. In this case, the two-tone intermodulation spectrum is used. A RF source can be used for F2, or at any harmonic component. The effect of the finite power of any source will be computed, e.g. any pulling effects on the oscil-lator.

ExampleVSIN 1 0 V=0.01 HNUM=F2.HBOSC INTM=3 F1=500MHz 700MHz F2=800MHz

This analysis will first perform a single-tone oscillator analysis, searching for the oscillation between 500MHz and 700MHz. The second tone will then be introduced and the oscillator problem (using a full two-tone analysis) will be solved. The oscillator frequency and power characteristics may change depending on the effects of the RF source in the circuit.

To Set Up a 2-Tone Oscillator, Intermod Analysis1. On the menu bar, click Circuit and then click Add Solution Setup: 2. When the Solution Setup dialog box appears, select Harmonic Balance Oscillator in the

Analysis Type list.3. In Solution Setup, type an Analysis Name (or accept the default name, for example,

“HBOSC3Tone2”). Make sure that 2-Tone Intermodulation Spectrum is selected in the Cat-egory list.

4. For most simulations, leave Perform Analysis selected (the default selection). But depending on the requirements for a particular project, clearing this box lets you create and store multiple solution setups for later use. (Note that if this feature is used, any changes made to the project will invalidate the simulation results.)

5. Click Next, and the Harmonic Balance Oscillator Analysis, 2-Tone, Intermodulation Spec-

Parameter Description

INTM Intermodulation order used in the analysis

F1 Set the start and stop frequencylimits, i.e. F1=start stop

F2 Set the fundamental frequency for the second tone

Harmonic Balance Oscillator Analysis 14-15

Page 117: Circuit Simulator

Title

trum dialog box appears. Select Enable Oscillator Design Analysis.6. In the No. of Harmonics box, enter the appropriate integer value (required). The higher the

number of harmonics, the more accurate the results, but the analysis takes longer to complete. For more information, see Harmonic Balance Analysis in the online help topics.

7. Specify the Oscillator Search Range (required): In the Start and Stop boxes, type the appro-priate frequencies, and make sure that the appropriate units (GHz, MHz, kHz) are selected.

8. You can also select Use Solution-Path Tracing. This is an optional selection, depending on the requirements of a particular project. For more information see Solution-Path Tracing in the online help topics.

9. Specify F2: To enter the sweep parameters for frequency F2, (required) do either of the fol-lowing:• In the Harmonic Balance Oscillator Analysis, 2-Tone, Intermodulation Spectrum dia-

log box, under Name and Sweep Value, click the blank area near F2: Type the sweep parameters and netlist syntax directly into the text box, and click Finish. Or,

• Click Add, and the Add/Edit Sweep dialog box appears: In the Variable list, make sure that F2 is selected (default selection). Select Single Value, type the frequency in the Value text box, and make sure that the appropriate units (GHz, MHz, kHz) are selected. Click Add, and then click OK to close the Add/Edit Sweep dialog box. When Harmonic Balance Oscillator Analysis, 2-Tone, Intermodulation Spectrum dialog box reappears, click Finish.

10. To customize the analysis (for example, to override Verbose mode), click Solution Options. When the Solution Options dialog box appears, make the appropriate selections, click OK, and return to the Harmonic Balance Oscillator Analysis, 2-Tone, Intermodulation Spec-trum dialog box. For more information, see Solution Options in the online help topics.

11. To set up an advanced sweep option (for example, to sweep a circuit parameter or a bias source), see Harmonic Balance Sweeps and Advanced Sweep Options in the online help top-ics.

12. Run the simulation: On the menu bar, click Circuit and then click Start Analysis. If the circuit was set up correctly, the analysis begins immediately and a red progress bar appears. (If the analysis is not successful, check the Message Window for an explanation, and then take cor-rective action.)

13. To display results: On the menu bar, click Circuit and then click Create Report. For more information, see Generating Reports and Post-Processing in the online help topics.

14-16 Harmonic Balance Oscillator Analysis

Page 118: Circuit Simulator

Title

Netlist Syntax and Parameters

Netlist ExampleVSIN 1 0 V=1.0 HNUM=F1VSIN 2 0 V=1.0 HNUM=F2.HB INTM=3 F1=1.00GHz F2=1.01GHz

The analysis will contain 13 harmonics, including DC. The frequency spectrum used is {0, 0.01GHz,0.99GHz, 1.00GHz, 1.01GHz, 1.02GHz, 2.00GHz, 2.01GHz, 2.02GHz, 3.00GHz, 3.01GHz, 3.02GHz, 3.03GHz}. The intermodulation frequencies for this example are 2*F1−F2 = 0.99GHz and 2*F2-F1 = 1.02GHz.

Parameter Description Default Comments

INTM Order of intermodulation distortion to calculate in the analysis

3 INTM is usually set to 3 for third-order intermodulation calculations and calculation of IP3. Similarly, set INTM to 5 for fifth order intermod, 7 for seventh order, etc. The higher the order, the more frequency components are considered and the longer the calculation time.

F1 Frequency of tone 1 in the analysis

Required

F2 Frequency of tone 2 in the analysis

Required

Harmonic Balance Oscillator Analysis 14-17

Page 119: Circuit Simulator

Title

HBOSC, 3-Tone, IntermodOscillator Analysis as Part of 3-Tone Intermodulation Analysis

The oscillator can determine the frequency of F1 in a three-tone analysis. In this case, the three-tone intermodulation spectrum is used. A RF source can be used for F2 and F3, or at any harmonic component. The effect of the finite power of any source will be computed, e.g. any pulling effects on the oscillator.

Example:VSIN 2 1 V=0.01 HNUM=F2VSIN 1 0 V=0.01 HNUM=F3.HBOSC INTM=3 F1=500MHz 700MHz F2=800MHz F3=801MHz

This analysis will first perform a single-tone oscillator analysis, searching for the oscillation between 500MHz and 700MHz. The second and third tones will then be introduced and the oscilla-tor problem (using a full three-tone analysis) will be solved. The oscillator frequency and power characteristics may change depending on the effects of the RF sources in the circuit.

To Set Up a 3-Tone Oscillator, Intermod Analysis1. On the menu bar, click Circuit and then click Add Solution Setup: 2. When the Solution Setup dialog box appears, select Harmonic Balance Oscillator in the

Analysis Type list.3. In Solution Setup, type an Analysis Name (or accept the default name, for example,

“HBOSC3Tone2”). Make sure that 3-Tone Intermodulation Spectrum is selected in the Cat-egory list.

4. For most simulations, leave Perform Analysis selected (the default selection). But depending

Parameter Description

INTM Intermodulation order used in the analysis

F1 Set the start and stop frequencylimits, i.e. F1=start stop

F2 Set the fundamental frequency for the second tone

F3 Set the fundamental frequency for the third tone

14-18 Harmonic Balance Oscillator Analysis

Page 120: Circuit Simulator

Title

on the requirements for a particular project, clearing this box lets you create and store multiple solution setups for later use. (Note that if this feature is used, any changes made to the project will invalidate the simulation results.)

5. Click Next, and the Harmonic Balance Oscillator Analysis, 3-Tone, Intermodulation Spec-trum dialog box appears. Select Enable Oscillator Design Analysis.

6. In the No. of Harmonics box, enter the appropriate integer value (required). The higher the number of harmonics, the more accurate the results, but the analysis takes longer to complete. For more information, see Harmonic Balance Analysis in the online help topics.

7. Specify the Oscillator Search Range (required): In the Start and Stop boxes, type the appro-priate frequencies, and make sure that the appropriate units (GHz, MHz, kHz) are selected.

8. You can also select Use Solution-Path Tracing. This is an optional selection, depending on the requirements of a particular project. For more information see Solution-Path Tracing in the online help topics.

9. Specify F2 and F3: To enter the sweep parameters for frequency F2, and F3 (both required) do either of the following:• In the Harmonic Balance Oscillator Analysis, 3-Tone, Intermodulation Spectrum dia-

log box, under Name and Sweep Value, click the blank area near F2: Type the sweep parameters and netlist syntax directly into the text box. Follow the same procecdure for F3, and click Finish. Or,

• Click Add, and the Add/Edit Sweep dialog box appears: In the Variable list, make sure that F2 is selected (default selection). Select Single Value, type the frequency in the Value text box, and make sure that the appropriate units (GHz, MHz, kHz) are selected. Follow the same procedure for F3, click Add, and then click OK to close the Add/Edit Sweep dialog box. When Harmonic Balance Oscillator Analysis, 3-Tone, Intermodu-lation Spectrum dialog box reappears, click Finish.

10. To customize the analysis (for example, to override Verbose mode), click Solution Options. When the Solution Options dialog box appears, make the appropriate selections, click OK, and return to the Harmonic Balance Oscillator Analysis, 3-Tone, Intermodulation Spec-trum dialog box. For more information, see Solution Options in the online help topics.

11. To set up an advanced sweep option (for example, to sweep a circuit parameter or a bias source), see Harmonic Balance Sweeps and Advanced Sweep Options in the online help top-ics.

12. Run the simulation: On the menu bar, click Circuit and then click Start Analysis. If the circuit was set up correctly, the analysis begins immediately and a red progress bar appears. (If the analysis is not successful, check the Message Window for an explanation, and then take cor-rective action.)

To display results: On the menu bar, click Circuit and then click Create Report. For more informa-tion, see Generating Reports and Post-Processing in the online help topics.

Harmonic Balance Oscillator Analysis 14-19

Page 121: Circuit Simulator

Title

Netlist Syntax and Parameters

Netlist ExampleVSIN 1 0 V=1.0 HNUM=F1VSIN 2 0 V=1.0 HNUM=F2VSIN 3 0 V=1.0 HNUM=F3.HB INTM=3 F1=1.00GHz F2=1.01GHz F3=1.011GHz

The analysis uses 1.00GHz, 1.01GHz and 1.011GHz for the fundamental frequencies. Note that the difference chosen between F2 and F1 is 10MHz and the difference between F3 and F2 is 1MHz. These differences should not be chosen as equal because intermodulation products will then fall on the same frequencies. It is generally better to separate the differences, even by a small amount, so that the harmonic number of the intermodulation product can be determined.

Parameter Description Default Comments

INTM INTM is usually set to 3 for third-order intermodulation calculations, 5 for fifth order, etc. The higher the order, the more frequency components are considered and the longer the calculation time

Required

F1 Frequency of tone 1 in the analysis

Required

F2 Frequency of tone 2 in the analysis

Required

F3 Frequency of tone 2 in the analysis

Required

14-20 Harmonic Balance Oscillator Analysis

Page 122: Circuit Simulator

Title

HBOSC, 3-Tone, Mixer IntermodOscillator Analysis as Part of 3-Tone Mixer Intermodulation Analysis

The oscillator can determine the frequency of F1 in a three-tone analysis. In this case, the three-tone mixer spectrum is used. The oscillator will perform as the LO and RF sources can be used for F2 and F3, or at any harmonic component. The effect of the finite power of any source will be com-puted. This analysis can be used to compute mixer intermodulation distortion of complete oscilla-tor-mixer systems or for the special case of self-oscillating mixers where the RF signals are injected directly into the oscillating device.

Example:

Parameter Description

INTM Intermodulation order used in the analysis

F1 Set the start and stop frequencylimits, i.e. F1=start stop

F2 Set the fundamental frequency for the second tone

F3 Set the fundamental frequency for the third tone

NLO Number of LO harmonics used in the analysis

INTM Intermodulation order used in the analysis

F1 Set the start and stop frequencylimits, i.e. F1=start stop

F2 Set the fundamental frequency for the first RF tone (tone 2)

F3 Set the fundamental frequency for the second RF tone (tone 3)

Harmonic Balance Oscillator Analysis 14-21

Page 123: Circuit Simulator

Title

VSIN 2 1 V=0.01 HNUM=F2VSIN 1 0 V=0.01 HNUM=F3.HBOSC NLO=4 NSB=1 F1=500MHz 700MHz F2=800MHz F3=801MHz

This analysis will first perform a single-tone oscillator analysis, searching for the oscillation between 500MHz and 700MHz. The second and third tones will then be introduced and the oscilla-tor problem (using a full three-tone analysis) will be solved. The oscillator frequency and power characteristics may change depending on the effects of the RF sources in the circuit.

To Set Up a 3-Tone Oscillator, Mixer Intermod Analysis1. On the menu bar, click Circuit and then click Add Solution Setup: 2. When the Solution Setup dialog box appears, select Harmonic Balance Oscillator in the

Analysis Type list.3. In Solution Setup, type an Analysis Name (or accept the default name, for example,

“HBOSC3Tone2”). Make sure that 3-Tone, Mixer Intermodulation Spectrum is selected in the Category list.

4. For most simulations, leave Perform Analysis selected (the default selection). But depending on the requirements for a particular project, clearing this box lets you create and store multiple solution setups for later use. (Note that if this feature is used, any changes made to the project will invalidate the simulation results.)

5. Click Next, and the Harmonic Balance Oscillator Analysis, 3-Tone, Mixer Intermodula-tion Spectrum dialog box appears. Select Enable Oscillator Design Analysis.

6. In the No. of Harmonics box, enter the appropriate integer value (required). The higher the number of harmonics, the more accurate the results, but the analysis takes longer to complete. For more information, see Harmonic Balance Analysis in the online help topics.

7. Specify the Oscillator Search Range (required): In the Start and Stop boxes, type the appro-priate frequencies, and make sure that the appropriate units (GHz, MHz, kHz) are selected.

8. You can also select Use Solution-Path Tracing. This is an optional selection, depending on the requirements of a particular project. For more information see Solution-Path Tracing in the online help topics.

9. Specify F2 and F3: To enter the sweep parameters for frequency F2, and F3 (both required) do either of the following:• In the Harmonic Balance Oscillator Analysis, 3-Tone, Mixer Intermodulation Spec-

trum dialog box, under Name and Sweep Value, click the blank area near F2: Type the sweep parameters and netlist syntax directly into the text box. Follow the same procecdure for F3, and click Finish. Or,

• Click Add, and the Add/Edit Sweep dialog box appears: In the Variable list, make sure that F2 is selected (default selection). Select Single Value, type the frequency in the Value text box, and make sure that the appropriate units (GHz, MHz, kHz) are selected. Follow the same procedure for F3, click Add, and then click OK to close the Add/Edit Sweep dialog box. When Harmonic Balance Oscillator Analysis, 3-Tone, Mixer Inter-modulation Spectrum dialog box reappears, click Finish.

14-22 Harmonic Balance Oscillator Analysis

Page 124: Circuit Simulator

Title

10. To customize the analysis (for example, to override Verbose mode), click Solution Options. When the Solution Options dialog box appears, make the appropriate selections, click OK, and return to the Harmonic Balance Oscillator Analysis, 2-Tone, Intermodulation Spec-trum dialog box. For more information, see Solution Options in the online help topics.

11. To set up an advanced sweep option (for example, to sweep a circuit parameter or a bias source), see Harmonic Balance Sweeps and Advanced Sweep Options in the online help top-ics.

12. Run the simulation: On the menu bar, click Circuit and then click Start Analysis. If the circuit was set up correctly, the analysis begins immediately and a red progress bar appears. (If the analysis is not successful, check the Message Window for an explanation, and then take cor-rective action.)

To display results: On the menu bar, click Circuit and then click Create Report. For more informa-tion, see Generating Reports and Post-Processing in the online help topics.

Harmonic Balance Oscillator Analysis 14-23

Page 125: Circuit Simulator

Title

Netlist Syntax and Parameters

Netlist ExampleVSIN 1 0 V=1.0 HNUM=F1; LO signalVSIN 2 3 V=0.01 HNUM=F2; RF1 signalVSIN 3 0 V=0.01 HNUM=F3; RF2 signal.HB NLO=4 INTM=3 F1=1.00GHz F2=1.01GHz F3=1.011GHz

The LO at 1.00GHz will be analyzed with 4 harmonics and the spectrum will be set up for third-order intermodulation distortion at baseband. The two RF signals at 1.01GHz and 1.011GHz will

Parameter Description Default Comments

NLO Number of LO harmonics to use in the analysis

required Increasing the number of LO harmonics improves the accuracy of the simulation at the expense of computation time. For non-switching mixers, NLO is typically set between 4 and 8. For switch-mode mixers or mixers that are driven far into saturation, 8 to 16 harmonics may be needed.

INTM Order of intermodulation distortion to calculate in the analysis

required For third-order intermodulation, INTM is set to 3; for fifth order, it is set to 5, etc.The number of frequency components used in the analysis increases rapidly as NLO or INTM are increased, and the corresponding memory and computation time increases. See the Nonlinear Analysis Chapter for details.

F1 Frequency of tone 1 in the analysis

required

F2 Frequency of tone 2 in the analysis

required

F3 Frequency of tone 2 in the analysis

required

14-24 Harmonic Balance Oscillator Analysis

Page 126: Circuit Simulator

Title

mix down to IF1 at 10MHz and IF2 at 11MHz. The intermodulation products will be at 9MHz and 12MHz. The corresponding harmonic numbers are given (Similar principles apply for the up-converter and sub-harmonic mixer cases as described the earlier 2-tone HB Mixer Analysis):

LO 1.00GHz F1

RF1 1.01GHz F2

RF2 F3 1.011GHz

IF1 10MHz F2-F1

IF2 11MHz F3-F1

IM1 9MHz 2IF1-IF2 = -F1+2*F2-F3

IM2 12MHz 2IF2-IF1 = -F1-F2+2*F3

Harmonic Balance Oscillator Analysis 14-25

Page 127: Circuit Simulator

Title

Harmonic Balance SweepsSwept Frequency Analysis

To sweep the frequency of either F1 or F2, one or more sweep specifications can be applied to F1 and/or F2. The program will sort the frequencies into a monotonic list. Direction of the sweep spec-ification will be preserved only if one specification is used. For example:.HBSSMIX NLO=8 F1=LIN 1GHZ 2GHZ 100MHZ F2=2.1GHZwill sweep the LO frequency from 1GHz to 2GHz in steps of 100MHz. The IF frequency will sweep from 1.1GHz to 0.1GHz. It is important not to let F1 and F2 be the same frequency.To keep a constant IF, sweep both F1 and F2 (by default they will be swept together):

.HBSSMIX NLO=8 F1=LIN 1GHZ 2GHZ 100MHZ F2=LIN 1.1GHZ 2.1GHZ 100MHZ

will keep the IF constant at 100MHZ. An alternative specification to keep the difference between F1 and F2 a constant 100MHz is the FDEV keyword:

.HBSSMIX NLO=8 F1=LIN 1GHZ 2GHZ 100MHZ F2=FDEV 100MHZ

Swept Source AnalysisTo sweep DC or RF sources, the anaSwpSpec specification is used. Voltage, current and power sources may be swept. The sweep is specified in the .HBSSMIX analysis statement and the source to be swept references a source parameter. For example:

.PARAM P1 = 0dBmPORTP 1 0 PNUM=1 P1={P1} HNUM1=F1 .HBSSMIX NLO=8 F1=1GHz F2=1.1GHz P1=LIN 0dBm 10dBm 1dB

will sweep the power source from 0dBm to 10dBm in steps of 1dB. Note that P1 is a parameter and must be enclosed in curly braces.

Sweeping Frequencies and SourcesBoth frequency and RF or DC sources can be swept in a HBSSMIX analysis.

14-26 Harmonic Balance Oscillator Analysis

Page 128: Circuit Simulator

15Small-Signal Mixer Analysis

Small-Signal Mixer Analysis 15-1

Page 129: Circuit Simulator

Title

OverviewSmall-signal mixer analysis treats the RF (or modulation) signal as a small-signal and computes the desired frequency converted IF (or sideband) signal. The circuit is first computed with the LO sig-nal applied using a 1-tone harmonic-balance analysis, and then the desired frequency converted sig-nal is computed using small-signal frequency conversion techniques.The advantage to using small-signal mixer analysis comes from the speed of the analysis. Since the RF signal power is neglected, the harmonic-balance analysis is performed using only the single-tone LO. This analysis is much faster than two-tone analysis. The program then computes the spec-ified conversion gain using linear frequency conversion methods, resultin in a fast analysis time as compared to full 2-tone analysis. The desired frequency component and port of the output signal must be specified prior to analysis. Also, the small-signal analysis assumes that the RF signal is small enough not to affect the operat-ing regime. In other words, the RF signal power should be much smaller than the LO (at least 10 dB for a lossy mixer, or 20 - 30 dB for a high gain mixer). This criteria is easily satisfied for most mixer applications, but when the RF signal power is comparable to the LO (or when you wish to determine the compression characteristics of the mixer) full harmonic-balance analysis is needed as shown in the next section.

Parameters:

Increasing the number of LO harmonics increases the accuracy of the analysis at the expense of longer computation times and larger memory requirements. The typical number of LO harmonics to use is 4 to 8 for non-switching mixers and 8 to 16 for switching mixers.The default values of the parameters IFPORT, IFHNUM, RFPORT and RFHNUM are for a mixer in the configuration:• RF applied to port 1 at frequency F2• LO applied to port 2 at frequency F1• IF extracted from port 3 at frequency |F2-F1|

NLO Number of LO harmonics to use in the analysis

IFPORT Port number of the desired IF signal

IFHNUM Harmonic number of the desired IF signal

RFPORT Port number of the applied RF signal

RFHNUM Harmonic number of the applied RF signal

15-2 Small-Signal Mixer Analysis

Page 130: Circuit Simulator

Title

For other configurations, modify the appropriate parameters as needed.On output, the conversion gain of the mixer can be extracted using the CG keyword. For the default configuration, CG31<F2-F1,F2> will yield the conversion gain (for output in dB use the DB() function).Down-Converter Example:

PORTP 1 0 PNUM = 1 P1 = -30dBm HNUM1 = F2;RF sourcePORTP 2 0 PNUM = 2 P1 = 10dBm HNUM1 = F1;LO sourcePORT 3 0 PNUM = 3;IF load.HBSSMIX NLO=8 F1=1GHZ F2=900MHZ IFPORT=3 IFHNUM=F2-F1 RFPORT=1 RFHNUM=F2

The analysis uses the default configuration (the IF and RF port and hnum information is given for clarity) and will compute the conversion gain of the RF signal injected at port 1 frequency con-verted to the IF signal (100MHz = F2 - F1) at the IF load at port 3. At the output display, the CG response is used to view the conversion gain. In this case CG31<F2-F1,F2> is the proper function.

General Form for Small Signal Mixer Analysis (.HBSSMIX).HBSSMIX[:name]+NLO = integer [NSB = integer]+F1 = swpDef F2 = swpDef+[anaSwpDef]+ [IFPORT = integer] [RFPORT = integer]+ [IFHNUM = HarmSpec] [RFHNUM = HarmSpec]+ [ NOISE = boolean ] [SWPORD = {anaSwpOrderDef}]

Parameter Description Default Comments

NLO NSB Number of LO harmonicsNumber of sidebands

NSB = 1 Specifying a non-unity value for NSB will not affect results.

F1, F2 Fundamental Frequencies (LO & RF)

anaSwpDef Define swept parameters none

IFPORT IF port number 3

IFHNUM Harmonic number for IF |F2-F1|

RFPORT RF port number 1

RFHNUM Harmonic number for RF F2

Small-Signal Mixer Analysis 15-3

Page 131: Circuit Simulator

Title

Notes1. Parameter keyword values in the .HBSSMIX command may be expressions or parameters, but

must be evaluated prior to analysis. Therefore they cannot be dependent on analysis variables (e.g. F).

2. If a value is assigned by a parameter and the parameter is being swept, the value used will only be the one assigned by the original value of the parameter and the sweep values will be ignored.

Example:.HBSSMIX:1 NLO=8 F1=LIN 1GHz 2GHz 50MHz F2=FDEV 100MHz + IFPORT=3 IFHNUM=-F1+F2 RFPORT=2 RFHNUM=F2 NOISE=ON

Special Output for .HBSSMIXSince a special frequency conversion analysis is being performed, not all regular harmonic-balance circuit responses are available on output. Although HBSSMIX is similar to 2-tone analysis, the 2-tone harmonic numbers are only used for the conversion gain (CG) and noise figure (NF) response keywords. All other circuit responses use 1-tone harmonic numbers.Special Keywords Available for .HBSSMIX

NOISE Toggles mixer noise analysis

OFF

SWPORD Defines ordered sweep TBD 1st entry defines innermost loop

CGij<Fn, Fm> Conversion Gain from input port j, harmonic Fm to output port i,harmonic Fn. Fn and Fm represent frequencies, e.g. F1, F2-F1. CG output is available by default when an HBSSMIX analysis is performed.

NFij<Fn, Fm> Noise Figure from input port j, harmonic Fm to output port i, harmonic Fn. NF output is available when noise is turned on for a HBSSMIX analysis (see below).

15-4 Small-Signal Mixer Analysis

Page 132: Circuit Simulator

Title

Other circuit responses are available only for the LO signal, e.g. a power spectrum will only show harmonics of the LO. Responses such as PO2<F1> only use 1-tone harmonic numbers.

Small-Signal Mixer Analysis 15-5

Page 133: Circuit Simulator

Title

15-6 Small-Signal Mixer Analysis

Page 134: Circuit Simulator

16Load-Pull Analysis

Load-pull analysis uses an impedance sampling method to present at a port or a PTUNER element. The impedance samples can cover the entire Smith chart, or be limited to a desired sector . Load-pull analysis varies a selected harmonic impedance of one tuner; the impedances of other tuners are kept constant. An HB simulation is performed at each sampling point to solve for the circuit responses. Upon completion of the analysis, constant contour curves can be generated for any user-defined performance measure. Load-pull analysis can be applied to single or multi-tone circuits, amplifiers, mixers, oscillators, etc.The load-pull analysis requires a minimum of four items (shown in the diagram):• A .LOADPULL statement• An HB analysis statement to define the desired analysis• A .TUNER that defines harmonic tuner impedances• A port or PTUNER element that defines where the tuner will be applied in the circuit (see

Load-Pull Analysis16-1

Page 135: Circuit Simulator

PTUNER section, later in this topic)

Note that there may be multiple port or PTUNER elements that reference a single .TUNER, in which case the impedances of those elements will be tuned simultaneously. It is the .TUNER that is actually sampled during the load-pull simulation. For additional information on load pull analysis, see TUNER, PTUNER, and PORT in the online help topics.

To Set Up a Load Pull Analysis1. On the menu bar, click Circuit and then click Add Solution Setup: The Solution Setup dia-

log box appears, and select Load Pull Analysis in the Analysis Type list.2. Type an Analysis Name (or accept the default name, for example, “Loadpull1”). 3. For most simulations, leave Perform Analysis selected (the default setting). But depending on

the requirements for a particular project, clearing this box lets you create and store multiple solution setups for later use. (Note that if this feature is used, any changes made to the project will invalidate the simulation results.)

Load-Pull Analysis16-2

Page 136: Circuit Simulator

4. Click Next, and the Load Pull Analysis dialog box appears.5. Select a Tuner from the list. There are two types of tuners available for load-pull simulation:

Ideal and Double-Slug. For additional details, see Specify Tuner for Load Pull in the online help topics.

6. (for additional setup details, see Specify Tuner for Load Pull in the online help topics). 7. In the HB Analysis to Apply list, make the appropriate selection (for additional setup details,

see Harmonic Balance Analysis in the online help topics). 8. In the Harmonic/ Harmonic Cluster to Tune box, make the appropriate selection (for addi-

tional details, see Harmonic Cluster in the next section). 9. To specify ZRho and ZAngle (magnitude and angle of complex impedance) do either of the

following:• In the Load Pull Analysis dialog box, under Name and Sweep Value, click the blank area

near ZRho: Type the sweep parameters and netlist syntax directly into the text box. Fol-low the same procedure for ZAngle and click Finish. Or,

• Click Add, and the Add/Edit Sweep dialog box appears: In the Variable list, make sure that ZRho is selected (default selection). Select Single Value, type the magnitude of the complex impedance. Follow the same procedure for ZAngle, click Add, and then click OK to close the Add/Edit Sweep dialog box. When the Load Pull Analysis dialog box reappears, click Finish.

10. To set up an advanced sweep option (for example, to sweep a circuit parameter or a bias source), see Advanced Sweep Options in the online help topics.

11. Run the simulation: On the menu bar, click Circuit and then click Start Analysis. If the circuit was set up correctly, the analysis begins immediately and a red progress bar appears. (If the analysis is not successful, check the Message Window for an explanation, and then take cor-rective action.)

12. To display results: On the menu bar, click Circuit and then click Create Report. For more information, see Generating Reports and Post-Processing in the online help topics.

Netlist Form.LOADPULL[:name] +TUNER = name [CLUSTER = integer]+[ZRHO = swpDef ] [ZANG = swpDef ]+ SIMREF = simCommand

Load-Pull Analysis16-3

Page 137: Circuit Simulator

Netlist Parameters

Netlist Example.LOADPULL:1 TUNER=tuner1 RHO=ESTP 0.1 0.9 20 ANG=ESTP 0 300 40+ CLUSTER=1 SIMREF=HB:1

Harmonic ClusterA harmonic cluster is defined as the cluster of spectral components surrounding a particular har-monic in multi-tone analysis. The frequency of a harmonic cluster is defined as the average value of all the spectral components falling in the same harmonic cluster. If necessary, this frequency will be used to evaluate the harmonic impedance of the selected tuner in the load-pull simulation.

Parameter Description Default Comments

TUNER Tuner used for load pull simulation. It must be defined in the .TUNER statement

required

CLUSTER Harmonic cluster which the tuner apply to (range: 0 - 9)

1 0 only applies to multi-tone analysis

RHO Magnitude of the sample impedance, the range for start and stop is 0-1 and the range for number of divisions is 1 – 99

0.1-0.9 with 10 divisions

ANG Angle of the sample impedance, the range for start and stop is 0-359 and the range for number of divisions is 1-99

0-352 with 20 divisions

SIMREF Reference to the Harmonic Balance simulation command. Its value can be one of the following:HB:nameHBOSC:nameHBSSMIX:nameHBOSCSSMIX:name

requireddefines the type of analysis used in the load-pull simulation

Load-Pull Analysis16-4

Page 138: Circuit Simulator

For example, in two tone intermodulation analysis with the highest intermodulation order is 5 and F2 > F1:

Harmonic ImpedancesReal world tuners are limited by their ability to control impedances at frequencies besides the fun-damental. In the implementation of load-pull simulation, arbitrary impedance values can be set to any harmonic cluster using the ideal tuners. This will allow designers to separate the tuning of the fundamental with the impedance presented to a harmonic. For the ultimate control, it is conceivable that the impedance presented to each spectral components should be determined by the user, but this presented an unwarranted burden. Rather, we will assume that the frequency separation of the fundamental tones is small and therefore presenting the same impedance to each harmonic cluster is justified.

PTUNER Component

Netlist form:PTUNER:xxx n1 n2 TUNER=tuner_name

Netlist Example:PTUNER:1 n1 n2 TUNER=tuner1

Harmonic Cluster Spectral Components

0th F2-F1, 2F2-2F1

1st F1, F2, 2F1-F2, 3F1-2F2, 2F2-F1, 3F2-2F1

2nd 2F1, 2F2, F1+F2, 3F1-F2, 3F2-F1

3rd 3F1, 3F2, 2F1+F2, 2F2+F1, 4F1-F2, 4F2-F1

4th 4F1, 4F2, 2F1+2F2, 3F1+F2, 3F2+F1

5th 5F1, 5F2, 2F1+3F2, 2F2+3F1, 4F1+F2, 4F2+F1

Parameter Description Default

TUNER The name of the referenced tuner (.TUNER)

Required

Load-Pull Analysis16-5

Page 139: Circuit Simulator

The PTUNER element can be used as a harmonic impedance connected to any place in the circuit. Its harmonic impedance values are controlled by the referenced tuner. It is used primarily for load-pull analysis, but can also be used to insert arbitrary harmonic impedances in a circuit.

Load-Pull Analysis16-6

Page 140: Circuit Simulator

Specify Tuner for Load Pull

Specify Tuner for Load PullThere are two types of tuners available for load-pull simulation:• Ideal Tuner• Double-Slug TunerThe ideal tuner presents arbitrary (passive) impedances at any harmonic cluster (see .LOADPULL for the definition of harmonic clusters) so that fundamental and harmonics can be tuned indepen-dently. The double-slug tuner mimics a mechanical tuner that is often used for lab measurements. While the fundamental or harmonic impedance can be controlled using a double-slug tuner, the impedances at other harmonic components are determined by the equivalent circuit of the tuner. The double-slug tuner allows better comparison to actual bench measurements.The .TUNER must be referenced by a port of a PTUNER element in order to take effect during the simulation. For .LOADPULL simulation, only one tuner may be reference by .LOADPULL to per-form the harmonic impedance sampling function.For additional information, see Load Pull Analysis, PTUNER, and PORT in the online help topics.

Netlist Form.TUNER name tunerType (tuner parameter list)

Ideal Tuner, Real-Imaginary FormThe ideal tuner is configured as a variable impedance device at the tuned harmonic cluster. Its impedance is configured as follows:

where i and k refer to harmonic cluster indices. The tuner is configured so any passive impedance can be realized. At the tuned frequency cluster, the impedance will be determined by the sampled impedance point on the Smith chart. At other harmonic frequency clusters, the impedance will be determined by user-supplied impedances. The tuner parameters are:

Tuned Frequency Cluster Ri + jXi

Untuned Frequency Clusters Rk + jXk , k≠i

Parameter Description Default

RDEF Default resistance value for the impedances of all clusters

inf.

Load-Pull Analysis16-7

Page 141: Circuit Simulator

Specify Tuner for Load Pull

The impedances at all clusters > 9 assume the default value specified by RDEF and XDEF.In order to obtain a uniform sampling of points, the impedance of the tuned frequency cluster, Z=Ri+jXi, is mapped to a reflection coefficient using the reference impedance Zr=RR+jXR and the mapping equation

XDEF Default reactance value for the impedances of all clusters

inf.

RDC DC Resistance of Tuner inf.

R0 Resistance at baseband cluster (for multi-tone analysis)

RDEF

X0 Reactance at baseband cluster

XDEF

R1 Resistance at fundamental cluster

RDEF

X1 Reactance at fundamental cluster

XDEF

R2 Resistance at 2nd harmonic cluster

RDEF

X2 Reactance at 2nd harmonic cluster

XDEF

R9 Resistance at 9th harmonic cluster

RDEF

X9 Reactance at 9th harmonic cluster

XDEF

RR Reference resistance 50.0

XR Reference reactance 0.0

Γ = +

Z ZZ Z

r

r

Load-Pull Analysis16-8

Page 142: Circuit Simulator

Specify Tuner for Load Pull

Note that Γ is the reflection coefficient of the tuner only. The impedance sampling is transferred to two swept parameters in the .LOADPULL analysis: the magnitude of Γ from 0 to 1 and the angle of Γ from 0 to 360 degrees.

Netlist form.TUNER tuner_name IDEAL([RDC=dval] [RDEF=dval] [XDEF=dval]+ [R0=dval] [X0=dval] [R1=dval] [X1=dval] [R2=dval] [X2=dval]+ [R3=dval] [X3=dval] [R4=dval] [X4=dval] [R5=dval] [X5=dval]+ [R6=dval] [X6=dval] [R7=dval] [X7=dval] [R8=dval] [X8=dval]+ [R9=dval] [X9=dval] [RR=dval] [XR=dval])

Netlist Example.TUNER tuner1 IDEAL(RDC=0 R0=50 X0=10 R2=50 X2=-10)

Ideal Tuner, Magnitude-Angle FormA tuner can also directly specify Γ using magnitude-angle form using the IDEALA tuner whose parameters are

Parameter Description Default

PDEF Default radius for the reflection coefficient of all clusters

1.0

ADEF Default angle for the reflection coefficient of all clusters

0

RDC DC Resistance of Tuner inf.

P0 Magnitude of Γ at the baseband cluster (for multi-tone analysis)

PDEF

A0 Angle of Γ at the baseband cluster (for multi-tone analysis)

ADEF

P1 Magnitude of Γ at the fundamental cluster

PDEF

A1 Angle of Γ at the fundamental cluster

ADEF

Load-Pull Analysis16-9

Page 143: Circuit Simulator

P2 Magnitude of Γ at the 2nd harmonic cluster

PDEF

A2 Angle of Γ at the 2nd harmonic cluster

ADEF

:

Netlist Form.TUNER tuner_name IDEALA([RDC=dval] [PDEF=dval] [ADEF=dval]+ [P0=dval] [A0=dval] [P1=dval] [A1=dval] [P2=dval] [A2=dval]+ [P3=dval] [A3=dval] [P4=dval] [A4=dval] [P5=dval] [A5=dval]+ [P6=dval] [A6=dval] [P7=dval] [A7=dval] [P8=dval] [A8=dval]+ [P9=dval] [A9=dval] [RR=dval] [XR=dval])

Netlist Example.TUNER tuner1 IDEALA(RDC=50 PDEF=0.9 ADEF=30 P0=0.5 A0=45 P2=0.6+ A2=75 P3=0.8 A3=250 P4=0.9 A4=300)

Double-Slug TunerThe double-slug tuner mimics the common industry implementation of mechanical tuners. The tuner is realized by a double (lossless) slug. All fundamental and harmonic impedances are deter-

P9 Magnitude of Γ at the 9th harmonic cluster

PDEF

A9 Angle of Γ at the 9th harmonic cluster

ADEF

RR Reference resistance 50.0

XR Reference reactance 0.0

Page 144: Circuit Simulator

Specify Tuner for Load Pull

mined by the slug configuration and are not individually controllable. The tuner is nominally con-figured as:where Z0 and ZS are the characteristic impedances of the corresponding transmission lines. The parameters for the double-slug tuner are

The default values for L1, L2, L3 and L4 are corresponding to a quarter wavelength of a waveform of 3GHz frequency.For the double-slug tuner being tuned, L1 and L3 are adjusted to obtain the harmonic impedances of the selected cluster specified by the load-pull simulation with all other parameters being fixed at the values supplied by the user. Then, the L1 and L3 values obtained are used in the evaluation of the harmonic impedances of other clusters. This means that only the harmonic impedance at the selected cluster can be arbitrarily set and the harmonic impedances of other clusters are evaluated using the values of L1 and L3 obtained.

Parameter Description Default

RZS Real part of the characteristic impedance ZS

10

IZS Imaginary part of the characteristic impedance ZS

0

RZ0 Real part of the characteristic impedance Z0

50

IZ0 Imaginary part of the characteristic impedance Z0

0

L1 Length of the transmission line TRL1 25mm

L2 Length of the transmission line TRL2 25mm

L3 Length of the transmission line TRL3 25mm

L4 Length of the transmission line TRL4 25mm

RZC Real part of the reference impedance ZC

50.0

IZC Imaginary part of the reference impedance ZC

0.0

Load-Pull Analysis16-11

Page 145: Circuit Simulator

Specify Tuner for Load Pull

For other double-slug tuners not being tuned, their harmonic impedances are calculated using the parameter values specified by the user.When the double-slug tuner is connected to a port or referenced by a PTUNER element, the param-eter values of Z0, ZS, L2 and L4 together with the port impedance or the reference impedance of the PTUNER element restrict the tuning range of the tuning harmonic impedance. The maximum tun-ing range is internally computed and the tuning values outside the range are skipped. Normally the values of L2 and L4 are identical.

Netlist Form.TUNER tuner_name DBSLUG([RZS=dval] [IZS=dval] [RZ0=dval] [IZ0=dval]+ [L1=dval] [L2=dval] [L3=dval] [L4=dval])

Netlist Example.TUNER tuner1 DBSLUG(RZS=20 RZ0=75 L2=1.e-5 L4=1.e-6)

Load-Pull Analysis16-12

Page 146: Circuit Simulator

17DC Nyquist Analysis

DC Nyquist Analysis 17-1

Page 147: Circuit Simulator

Title

HB Stability Analysis OverviewMost electrical engineers working in the microwave circuit design field are familiar with the steady-state stability criterion commonly referred as the “K” factor for two-ports:

where K>1 and B1>0 are necessary and sufficient conditions for unconditional stability. However, there are three shortcomings to the K-factor:• It is defined for the steady state where S-parameters are defined. This inhibits detection of

instability due to non-steady state behavior, such as circuit start-up. • S-parameters are defined only for linear circuits. • Nonlinear behavior cannot be detected using this approach. As will be shown below, nonlinear

analysis is required for determining the stability portrait of intrinsically nonlinear circuits such as oscillators. Thirdly, the K-factor is independent of the port terminations as can be witnessed by writing K using Z or Y parameters.

Instead, Designer uses the following two analysis methods to determine the stability of an arbitrary circuit:

DC Nyquist Stability Analysis

• Determine whether a circuit has a natural fre-quency in the right-half plane or on the imagi-nary axis - that is, whether the circuit will oscillate (asynchronous instability)

• Determine the approximate frequency of the potential oscillation

Solution-Path Tracing

• Determine circuit behavior such as hysteresis (characterized by “jumps” in a circuit response) and abrupt changes in circuit responses

• Analysis of complex circuit behavior that “regu-lar” harmonic balance analysis is unable to solve. This analysis enables investigation of complex circuits such as frequency dividers, injection-locked oscillators, oscillator drop-out and so on.

KS S

S SS S S S

B S S

=− − +

= −

= + − −

12

1

11

2

22

2 2

12 2111 22 12 21

1 11

2

22

2 2

∆∆

,

and

17-2 DC Nyquist Analysis

Page 148: Circuit Simulator

Title

Netlist Syntax and Parameters (.HBSTABILITY)

Functionality: Perform stability analysis: DC Nyquist, AC Nyquist, Solution-Path Tracing, DC and AC Hopf Bifurcation Detection.

.HBSTABILITY[:name] +[NHARM = integer] | INTM = integer | NLO = integer NSB = integer | +NLO = integer INTM = integer +F1 = swpDef [F2 = swpDef] [F3 = swpDef]+[anaSwpDef]+TYPE = DCNYQUIST | ACNYQUIST | OSCNYQUIST | OSCTRACE | +DCOUTTRACE | ACOUTTRACE | DCHOPF | ACHOPF+[SWPORD = {anaSwpOrderDef}]

Parameter Description Default Comments

NHARM Number of harmonics for 1-tone HB

4

INTM Intermod order for 2 & 3-tone HB

amplifier case

NLO NSB Number of LO harmonics for 2-toneNumber of sidebands for 2-tone

mixer case

NLO INTM Number LO harmonics for 3-toneIntermod order for 3-tone

mixer case

F1, F2, F3 Fundamental Frequencies

anaSwpDef Define swept parameters none

TYPE Select the type of stability analysis to be performed

SWPORD Defines ordered sweep TBD 1st entry defines innermost loop

DC Nyquist Analysis 17-3

Page 149: Circuit Simulator

Title

Example.HBSTABILITY:1 NHARM = 8 F1 = DEC 10Hz 10GHz 9 TYPE=DCNYQUIST

NotesParameter keyword values in the .HBSTABILITY command may be expressions or parameters, but must be evaluated prior to analysis. Therefore they cannot be dependent on analysis variables (for example. F).If a value is assigned by a parameter and the parameter is being swept, the value used will only be the one assigned by the original value of the parameter and the sweep values will be ignored.

Stability Analysis Types Description

DCNYQUIST Performs a Nyquist analysis at the DC bias point

ACNYQUIST Performs a Nyquist analysis at the large-signal AC operating point

OSCNYQUIST Performs a Nyquist analysis at the oscillator AC operating point

OSCTRACE Performs solution-path tracing on an oscillator while examining an AC output response

DCOUTTRACE Performs solution-path tracing on a forced circuit while examining a DC output response

ACOUTTRACE Performs solution-path tracing on a forced circuit while examining an AC output response

DCHOPF Locates the Hopf bifurcations occurring on the DC solution path.

ACHOPF Locates the Hopf bifurcations occurring on the AC solution path.

17-4 DC Nyquist Analysis

Page 150: Circuit Simulator

Title

DC Nyquist AnalysisDC Nyquist analysis determines if any natural frequencies (system poles) lie in the right-hand side (RHS) of the complex σ+jω plane when the circuit is biased at its DC quiescent point with all AC sources killed. If there is a natural frequency (NF) on the RHS, the circuit is unstable and will oscil-late. This is called Asynchronous Instability because a new frequency is generated that is not syn-chronized with the excitation. The analysis does not determine the precise location of the NFs, only the number of complex-conjugate NFs. However, the approximate frequency of the NF can also be found so that the frequency of oscillation can then be determined, if desired, using oscillator analy-sis.Instabilities in high-frequency circuits are often caused by frequency-dependent positive feedback around an active device. The feedback path may be as simple as parasitic reactance, e.g. in the source of an FET; coupling between adjacent transmission lines may be the culprit; poorly de-cou-pled bias lines also contribute to low frequency instabilities. Since the analysis can only provide information when the circuit is properly described, it is important to fully and accurately model the circuit. This often means including parasitic effects, coupled trace descriptions, and accurately defining the on-circuit and external circuit biasing circuit.If an instability occurs due to the biasing circuit, the NF is often at low frequencies due to the long electrical length of the complete biasing circuit. It is important, then, to begin the analysis at suffi-ciently low frequencies, e.g. 1MHz or even less. The upper frequency of the analysis should be past the frequency where the active devices have sufficient gain to oscillate, for example, fmax.The frequency step is determined by the analysis as it progresses from the minimum to maximum frequency. A simple linear or logarithmic sweep is inefficient and may miss critical frequencies. The computed frequency step is based on the rate of change of the system determinant. This way, fast changes can be detected and smaller steps are used to capture the detail of the system over a narrow frequency range while large steps are used when there is little or smooth change in the sys-tem determinant. The maximum step size can be set by using the third value of linear sweep specification (for exam-ple, LIN 10kHz 10GHz 100MHz will hold the maximum step size to 100MHz). It is recommended to keep the third value to less than about 1/20th of the frequency of circuit operation. If there are very high-Q resonances present in the circuit, then the value should be kept to less than the 3dB bandwidth of the resonance. If resonances are not known prior to analysis, but are expected, setting the value to 1/100th or 1/200th of the frequency of circuit operation is often a safe value.The output of the DC Nyquist analysis is the normalized determinant of the harmonic-balance sys-tem equations. This output is complex valued and can be plotted on the polar plane or magnitude-angle graph. For electrically small circuits, it is often most instructive to view the polar output. For complex or electrically large circuits, the polar output can be difficult to discern and it is most use-ful to plot magnitude and cumulative angle CANG(z). Cumulative angle does not include the cut at ±180 degrees.When a circuit is unstable, it will cross the negative real axis and encircle the origin completely. This is shown in the Figure 1: DC Nyquist analysis polar plot for an asynchronously stable circuit

DC Nyquist Analysis 17-5

Page 151: Circuit Simulator

Title

(A) and an unstable circuit (B). The three crossings of the negative real axis in (B) indicate the approximate frequencies of where the circuit may oscillate. (B) where the path crosses the negative real axis three times and completely encircles the origin three times. The frequencies of the cross-ings are shown and these represent three frequencies where the circuit may oscillate. An oscillator analysis can be run at each frequency, and a solution will be found. However, only one of these fre-quencies is actually a stable oscillating point and this is shown below in AC Nyquist analysis.

(A)

(B)Figure 1: DC Nyquist analysis polar plot for an asynchronously stable circuit (A) and an unstable circuit (B). The three crossings of the negative real axis in (B) indicate the approximate frequencies of where the circuit may oscillate.

8.19GHz

16.9GHz

4.72GHz

17-6 DC Nyquist Analysis

Page 152: Circuit Simulator

Title

A

BFigure 2: Magnitude and cumulative angle for plots of Figure 1: DC Nyquist analysis polar plot for an asynchronously stable circuit (A) and an unstable circuit (B). The three crossings of the negative real axis in (B) indicate the approximate frequencies of where the circuit may oscillate..These plots show the same data from the Figure 1: DC Nyquist analysis polar plot for an asynchro-nously stable circuit (A) and an unstable circuit (B). The three crossings of the negative real axis in (B) indicate the approximate frequencies of where the circuit may oscillate. in the magnitude and cumulative angle format. (A) shows that the angle remains between ±180 and does not cross -180 (the negative real axis). (B) shows that the angle crosses -180 and also makes a full encirclement because it also crosses and remains below -360 degrees. Additionally in (B), the angle crosses -540 and -900 degrees (the negative real axis) and continues to make encirclements of the origin.

DC Nyquist Analysis 17-7

Page 153: Circuit Simulator

Title

Notes1. No harmonic frequency spectrum is used for DC Nyquist analysis, therefore the number of

harmonics does not have to be selected. 2. No sources need be specified unless the analysis is to be performed repeatedly as a DC bias

source is swept.

Example.HBSTABILITY TYPE=DCNYQUIST F1=LIN 1MHz 20GHz 50MHz

This analysis will perform a DC Nyquist analysis from 1MHz to 20GHz using a maximum step size of 50MHz. As needed, the analysis will adjust the step to capture any required detail.

Parameter Description

F1 Specifies the frequency range to sweep. The maximum frequency step is set by the third value of a LIN sweep.

TYPE set to DCNYQUIST for DC Nyquist analysis

SWPORD can be used to define multiple analyses as a circuit parameter is swept

17-8 DC Nyquist Analysis

Page 154: Circuit Simulator

Title

Solution Path TracingSome nonlinear circuits exhibit complex behavior as a circuit parameter is swept. For example, a parametric frequency divider only begins generating a subharmonic spur at f/2 when a certain input power is reached. The observed sudden change in circuit behavior when the critical power level is reached is a bifurcation of the circuit operation (bifurcation is a mathematical term used to describe the sudden change of behavior when a critical parameter value is traversed). Several types of high-frequency circuits that exhibit this type of complex behavior are:• Free-running oscillators• Injection-locked oscillators• Parametric frequency dividers and multipliers• Certain types of mixersThe type of change in behavior of these circuits is characterized as synchronous because the fre-quencies within the circuit are the same as the applied source frequency or are harmonically related to it. Therefore, the output frequency is synchronous with the input frequency. This description may appear inconsistent in the oscillator case, but this case can be understood by recognizing that addi-tional frequencies do not appear once the circuit is already oscillating, whereas in the DC Nyquist analysis of asynchronous instability, the circuit was in the stable DC bias point.In general, it is good practice to perform a synchronous stability analysis on any circuit to ensure there are not any unforeseen behavioral problems in the circuit design.

FundamentalsSolution path tracing uses harmonic-balance analysis to trace a locus of solution points to deter-mine bifurcations of a circuit operating condition. Mathematically, a bifurcation takes place when the natural frequencies of a circuit exchange sign on their real parts, or when the solution path splits into two or more distinct curves. From a circuit designer’s point of view, these bifurcations are characterized by the following:• Change from a stable DC operating point to an oscillatory regime (e.g. oscillator start-up)• Hysteresis in a physically observable circuit response (e.g. frequency divider output power)• Physical observation of a subset of computed operating regimes (e.g. multiple oscillator fre-

quencies from the DC Nyquist analysis example)Two important concepts in the determination of synchronous stability are derived from differential equation theory. The first is simply stated: the stability of two points on the solution path curve of a nonlinear function is the same if there is no bifurcation point between the two points.The second concept helps determine the stability when crossing a bifurcation point and can be sum-marized as follows: • Stability is exchanged at a turning point bifurcation. • Stability is maintained at a critical point on the new solution path in the same direction of the

parameter.

DC Nyquist Analysis 17-9

Page 155: Circuit Simulator

Title

So if we can absolutely determine the synchronous stability of one point on the solution path, then we can determine the stability of any point on the path if the bifurcations are known. Consider Fig-ure 3: Consideration of a circuit response Pout as a function of applied DC bias E. where the circuit response Pout is plotted as a function of a bias source E in the absence of any RF excitation. From purely physical considerations, point A is physically stable because it is at rest without any excita-tion and no observable output. Point H1 is a Hopf bifurcation point indicating the start-up of an oscillator. Points B and C are turning points.

Figure 3: Consideration of a circuit response Pout as a function of applied DC bias E.

When a circuit exhibits a characteristic as shown in Figure 3: Consideration of a circuit response Pout as a function of applied DC bias E., the physically observable behavior does not include the unstable path BC. A hysteresis curve is then observed where the output jumps from B to b for increasing E and from C to c for decreasing E.A real circuit example of such behavior is shown in Figure 4: Injection-locked oscillator analysis parameterized by transistor bias. The circuit used to generate this response is an injection-locked oscillator and the parameter is the transistor bias voltage. The interpretation of the result can be summarized as follows:• The analysis begins at 25V where an oscillatory solution exists.• The analysis decreases the bias voltage until it comes to turning point T2 where stability is

exchanged.• The bias voltage is automatically increased until point T1 is reached where stability is again

exchanged.• The bias voltage is automatically decreased until the Hopf bifurcation is reached at about 2V

where oscillation ceases (but stability is maintained).• The analysis ends at 0V where we know we have a stable solution.

+E Pout

A B

0

C

D

E

Pout

b

cH1

17-10 DC Nyquist Analysis

Page 156: Circuit Simulator

Title

Therefore the branch from 0V to T1 is stable, the branch from T1 to T2 is unstable, and the branch from T2 to 25V is stable.

Figure 4: Injection-locked oscillator analysis parameterized by transistor bias.The physical observation on the test bench would be a sudden “jump” in the output power when T1 is reached or T2 is reached, depending on whether the bias is increased or decreased:Increasing bias from 0V, when T1 is reached at 19V, the output power jumps from 22mW to 10mWDecreasing bias from 25V, when T2 is reached at 3V, the output power jumps from 3mW to 24mWThus a hysteresis loop is formed.

Source SteppingSweeping a source in solution path tracing serves two purposes:Detection of turning pointsCompleting the path to a known stable pointThe swept source can be either an RF source or a DC source. The use of an RF source can be for detection of frequency divider action, for example. A DC source can be used for oscillator bias tun-ing (as in Figure 4: Injection-locked oscillator analysis parameterized by transistor bias.) or to sweep the bias point of a circuit to zero to reach a known stable state.When the increment size is given for a source in a sweep, the increment defines the largest step that can be taken by the analysis. The analysis automatically controls the increment size and direction to achieve a smooth trace around turning and bifurcation points. The largest step will be limited by the increment given.To sweep DC or RF sources, the anaSwpDef specification is used. Voltage, current and power sources may be swept. The sweep is specified in the .HBSTABILITY analysis statement and the source to be swept references the source variable. For example:

.PARAM V1 = 0VSIN 1 0 V={V1} FNUM=F1.HBSTABILITY NHARM=8 F1=1GHz V1=LIN 10.0 0.0 -0.1

T 1

T 2

DC Nyquist Analysis 17-11

Page 157: Circuit Simulator

Title

will sweep the voltage source from 10V to 0V using a maximum step size of 0.1V. Note that V1 is a parameter and must be enclosed in curly braces. An example of a swept power source at a port is:

.PARAM P1 = 100mWPORTP 1 0 PNUM=1 P1={P1} HNUM1=F1.HBSTABILITY NHARM=8 F1=1GHz P1=LIN 100mW 0mW -2mW

will sweep the power source at port 1 from 100mW to 0mW using a maximum step of 2mW.

Frequency SteppingSweeping frequency for solution path tracing is useful when a turning point or bifurcation point occurs with a change in frequency. Since frequency is a controlled variable, this analysis is only useful for forced circuits and is not useful for oscillator circuits. For example, the frequency lock-ing range of an injection-locked oscillator can be determined using this analysis ( note that an injec-tion-locked oscillator is a forced circuit and is not free-running).When the increment size is given for a frequency sweep, the increment defines the largest step that can be taken by the analysis. The analysis automatically controls the frequency step size and direc-tion to achieve a smooth trace around turning and bifurcation points. The largest step will be lim-ited by the increment given.To sweep frequency, set the F1 parameter in the .HBSTABILITY statement (or F2 or F3 for multi-tone sweep analysis). For example:

.HBSTABILITY NHARM=8 F1=LIN 6GHz 6.1GHz 2MHz

will sweep from 6GHz to 6.1GHz using a maximum step size of 2MHz. In cases where turning points are encountered, the direction is often changed and the analysis will control the step size and direction. It may be the case that the final frequency cannot be achieved, so the analysis will con-tinue until the maximum number of allowed steps is reached as given by the MAXNSTEP parame-ter in the .OPTIONS statement. For example, for the same injection-locked oscillator used in Figure 4: Injection-locked oscillator analysis parameterized by transistor bias., the power is held fixed and the frequency is swept from 6GHz to an initial target of 6.1GHz, as shown in Figure 5: Injection-locked oscillator analysis parameterized by frequency.. The turning point T1 is encountered at 6.037GHz and the direction of the sweep is automatically changed. The frequency is decreased until turning point T2 is reached at 5.96GHz and again the direction is automatically changed. The frequency is then increased and the sweep stops when the maximum number of steps (MAXNSTEP) is reached.

17-12 DC Nyquist Analysis

Page 158: Circuit Simulator

Title

Figure 5: Injection-locked oscillator analysis parameterized by frequency.

Tracing Forced-Circuit ResponsesWhen performing solution path tracing on a forced circuit, either DC circuit response output or AC circuit response output can be examined. These correspond to two categories in the TYPE parame-ter of .HBSTABILITY:

As shown above, most circuits are first examined for their AC characteristics, e.g. output power, and the ACOUTTRACE option is then used. This analysis will find turning points and bifurcations.To determine the synchronous stability of a circuit, a procedure is followed where:Starting from an AC solution point, decrease the AC source(s) until zero and note any turning or bifurcation points. Use the ACOUTTRACE option during this step and examine an AC output (e.g. output power)Decrease the DC bias source(s) until zero where a known stable point exists. Use the DCOUT-TRACE option during this step and examine a DC output (e.g. bias current).

DCOUTTRACE Perform solution-path tracing ona forced circuit while examininga DC output response

ACOUTTRACE Perform solution-path tracing ona forced circuit while examining an AC output response

DC Nyquist Analysis 17-13

Page 159: Circuit Simulator

Title

Note any exchanges of stability as turning points were encountered. As discussed in section Funda-mentals, an exchange is made if the direction of the solution path is reversed around a turning point (i.e. the slope becomes infinite at the turning point).The stability of the operating point is then determined by noting the stability of the branch on which the operating point resides.For example, Figure 6: Injection-locked oscillator solution path shows the injection-locked oscilla-tor solution path parameterized by bias using the ACOUTTRACE option.

Figure 6: Injection-locked oscillator solution pathPoint A is a bifurcation from zero output power to finite output power. Since the branch from zero to A is unidirectional (not shown here), it is asynchronously stable.Branch A-T1 represents a stable path.A turning point occurs at T1 and the direction is reversed. Therefore an exchange of stability occurs.Branch T1-T2 is unstable.A turning point occurs at T2 and the direction is reversed. Therefore an exchange of stability occurs.Branch T2-B is stable.

Tracing Oscillator Responses

17-14 DC Nyquist Analysis

Page 160: Circuit Simulator

18Transient Analysis

During transient analysis, frequency-domain results from nonlinear-network analysis (.HB) are transformed into the time domain via the Fast Fourier Transform (FFT), which presents informa-tion about network parameters in the time domain. Then a convolution technique uses the impulse responses to calculate a transient response. The way to set up a transient analysis, and the environ-ment variables that control the analysis and its convolution, are presented in the following sections.

To Set Up a Transient Analysis1. On the menu bar, click Circuit and then click Add Solution Setup: The Solution Setup dia-

log box appears, and select Transient Analysis in the Analysis Type list.2. Type an Analysis Name (or accept the default name, for example, “Transient1”). 3. For most simulations, leave Perform Analysis selected (the default setting). But depending on

the requirements for a particular project, clearing this box lets you create and store multiple solution setups for later use. (Note that if this feature is used, any changes made to the project will invalidate the simulation results.)

4. Click Next, and the Transient Analysis dialog box appears.5. In the Length of Analysis box, type the time duration for the simulation (the time increment

for reporting transient simulation result). In the Maximum Time Step Allowed box, type the time increment to be used for analysis. Make sure that the appropriate units (for example, ns) are selected for each parameter.

6. Enter the No. of Sample Points per Maximum Time Step7. To customize the analysis (for example, to set the maximum interations at any time point),

click Solution Options. When the Solution Options dialog box appears, make the appropriate selections, click OK, and return to the Transient Analysis dialog box. (For more information, see Solution Options in the online help topics.)

8. To set up an advanced sweep option (for example, to sweep a circuit parameter or a bias source), see Advanced Sweep Options in the online help topics.

Transient Analysis18-1

Page 161: Circuit Simulator

9. Run the simulation: On the menu bar, click Circuit and then click Start Analysis. If the circuit was set up correctly, the analysis begins immediately and a red progress bar appears. (If the analysis is not successful, check the Message Window for an explanation, and then take cor-rective action.)

10. To display results: On the menu bar, click Circuit and then click Create Report. For more information, see Generating Reports and Post-Processing in the online help topics.

Netlist Form (.TRAN).TRAN:name TSTEP=cval TSTOP=cval TSTART=cval TMAX=cval+ SAMPLESTEP=cval UIC=[ON | OFF]+ [anaSwpDef]+ [SWPORD = {anaSwpOrderDef}] [OPTION=name]

Parameter Description Default Comments

TSTEP the time increment for reporting transient simulation results

Only applied to data table and .print

TSTOP final analysis time

TSTART start time to report the analysis results

Only applied to data table and print

TMAX maximum step size used during analysis

SAMPLESTEP time increment for convolution analysis

UIC use initial conditions specified in the element or a .IC statement.

OFF For more information, see next section

OPTION name of a .OPTIONS statement

Transient Analysis18-2

Page 162: Circuit Simulator

Transient Initial Conditions

Transient Initial ConditionsNetlist Form

.IC voltageAssignmentListvoltageAssignementList := voltageAssignement [voltageAssignmentList]voltageAssignment := V([cktPath.]nodeName ) = voltageVal

Notes1. The .IC statement has two different effects depending on whether the value of the UIC key-

word in the .TRAN statement:• If the UIC keyword is ON, then the initial conditions specified in the .IC statement are

used to establish the initial conditions. Initial conditions specified for individual elements using the IC parameter on the element line will always have precedence over those speci-fied in a .IC statement.No DC analysis is preformed prior to a transient analysis. Thus it is important to establish the initial conditions at all nodes using the .IC statement or using the IC element parameter.

• If the UIC keyword is OFF or not specified, then a DC analysis is performed prior to a transient analysis. During the DC analysis the node voltages indicated in the .IC statement are held constant at the initial condition values. During transient analysis the nodes are not constrained to the initial condition values.

2. In addition to using .IC, initial conditions can be individually set for the semiconductor devices, capacitors, inductors, and other components that have the IC keyword.

Analysis ControlThe following environment variables determine analysis control.

Parameter Description Default Comments

cktPath Hierarchical circuit path

Defined above

nodeName Name of a node String

voltageVal Value to assign to the node voltage

Real

Transient Analysis18-3

Page 163: Circuit Simulator

Convolution Control

Maximum Time Step AllowedMaximum Time Step Allowed defines the largest time step allowed during simulation. In most cases, you do not need to set the maximum time step, because Designer uses an adaptive-time-step method. During transient analysis, Designer automatically detects all break points, and the time step is adjusted accordingly. As a result, the time-step value changes during simulation in accordance with the nature of the circuit. In some instances, you may need to set the maximum time step in order to achieve a smooth and accurate result. One instance is when circuits have sinusoidal sources, since there is no inherent break point. It is recommended that you set the maximum time step to a value that is at least half the shortest anticipated rise or fall time.

Length of AnalysisThe Length of Analysis variable defines the total time of analysis.

Convolution ControlThe following environment variables determine convolution control.

Maximum Sampling FrequencyMaximum Sampling Frequency is defined by 1 / (2 * Maximum Time Step Allowed). In order to satisfy the Nyquist sampling theorem, the corresponding time-domain sampling step is defined by 1 / (2 * Maximum Sampling Frequency).

Delta FrequencyDelta Frequency is defined by 1 / Length of Analysis. The corresponding time-domain sampling length is defined by 1 / Delta Frequency.

Default ValuesThe default “maximum sampling frequency” is 50 GHz, and the default “delta frequency” is 50MHz. Either, or both, of these values can be overridden to achieve higher accuracy for a given circuit. The number of samples in the frequency domain is N = MaximumSamplingFrequency / DeltaFrequency. The default value of N is 1000. The value of N must be less than the value of MaxNFSampling, as set in the Transient Solution Options dialog.

An ExampleElements described in the frequency domain (N-port, CAPQ, INDQ, S-parameters, distributed elements) are calculated using a convolution technique:

1. Linear network analysis calculates frequency domain response 2. Inverse-FFT uses the frequency response to obtain impulse response 3. Convolution uses the impulse response to calculate transient response

Theoretically, in order for the convolution technique to obtain correct results, the sampling range should be set to infinity. However, this is not necessary during a practical simulation. But it is

Transient Analysis18-4

Page 164: Circuit Simulator

Convolution Control

important to set Maximum Sampling Frequency and Delta Frequency to proper values in accordance with circuit characteristics.For example, if Maximum Sampling Frequency is set to 200GHz and Delta Frequency is set to 100MHz. Convolution analysis will calculate the spectral components of the impulse response to be at a bandwidth of 0-200GHz and a resolution of 100 MHz. In this case, the number of frequency sampling points is 2000 and the number of time-sampling points is 4000 (0-10ns with a step of 2.5ps).Due to model limitations, however, the Maximum Sampling Frequency for a particular element may need to be modified. For example, if the MSTRL model is accurate to 30GHz, the maximum sampling frequency should be set to 30GHz, even though the maximum sampling frequency defined in the convolution control is higher than 30GHz.

Transient Analysis18-5

Page 165: Circuit Simulator

1Sweep Options

A key feature of Designer is the ability to add arbitrary variables for sweeping and analysis. For example, voltages and currents of bias sources can be swept, and a capacitor value might be swept in order to generate tuning curves.

Sweeping Circuit Parameters• An arbitrary circuit variable is defined, added to the Variables list, and then used during cir-

cuit analysis and sweeping.• Note that when a swept parameter assigns a value, only the original value is used (in other

words, the sweep values will be ignored).• Coupled sweeps and independent sweeps can be sent up to generate n-dimensional tuning

curves (for additional explanation of these terms, see the glossary and the netlist examples).• Note that sweeps are disabled for circuit parameters whose names conflict with pre-defined

keywords (lin, linc, oct, dec, etc.) and such parameters will not be accessible from the simula-tion setup sweep dialog.

To Set Up a Circuit Analysis Using a Swept Circuit Parameter1. First, define the new variable to be swept: On the menu bar, click Circuit, and then click

Design Properties. The Properties dialog box appears.2. In Properties, click the Local Variables tab, and then click Add. The Add Property dia-

log box appears. To define the new variable, type its Name, and then type its initial Value

Sweep Options1-1

Page 166: Circuit Simulator

Sweeping Circuit Parameters

(which can include a unit; for example, 22.3e-12 or 22.3pF):

3. Click OK to close the Add Property dialog box. The Properties dialog box returns:

4. In Properties make sure that the new variable has been added, and check that the Read Only and Hidden boxes are cleared (these are the default settings; for more details, see Properties Dialog Box in the Glossary). Click OK, close the Properties dialog box, and the new vari-able is created and ready for use.

5. Assign the new variable to a circuit component: On the menu bar click Window. When the Window menu appears, click the appropriate schematic. The schematic-editor window

Sweep Options1-2

Page 167: Circuit Simulator

Sweeping Circuit Parameters

returns:

6. Double-click the component to be swept during analysis, and its Properties dialog box appears. (In this example, you replace the capacitor’s original value, 20 pF, with the variable Cx.)

7. In Properties, click the Passed Parameters tab, type the name of the variable in Value, and then click anywhere outside the Value box. Note that the Override box is automatically checked (for more details about Override, see the glossary). Click OK to close Properties and return to the schematic editor.

8. To execute the sweep, first set up an analysis: On the menu bar, click Circuit and then click Add Solution Setup. The Solution Setup dialog box appears. Note: For additional information about setting up an analysis, refer to the appropriate topic, for example, Linear Network Analysis. (To find a help topic, click the menu bar and then click Help. In the Help menu, click Contents and the Designer Help window appears.)

9. In Solution Setup, select an Analysis Type, make the appropriate selections, and then click Next. When the second dialog box appears, click Add. The Add/Edit Sweep dialog box

Sweep Options1-3

Page 168: Circuit Simulator

Sweeping Circuit Parameters

appears:

10. In Add/Edit Sweep, select the appropriate variable from the Variable list (in this example, Cx) and then select one of the five options for sweeping: Single value, Linear step, Lin-ear count, Decade count, Octave count, or Exponential count (for definitions of these terms, see the glossary). Type the appropriate values into the Start, Stop, and Step text boxes, and make sure that each has the correct units (GHz, MHz, kHz). Click Add, and then click OK to close the Add/Edit Sweep dialog box. (Later, if necessary, use the Edit and Remove buttons to make changes or delete a particular sweep.)

11. Run the simulation: On the menu bar, click Circuit, and then click Start Analysis. If the cir-cuit was set up correctly, the analysis begins immediately, and a red progress bar appears. (If the analysis is not successful, check the Message Manager for an explanation, and then take corrective action.)

12. To display results: On the menu bar, click Circuit, and then click Create Report. For more information, see Generating Reports and Post-Processing in the online help topics.

Netlist Syntax and Parameters.PARAM C1 = 10pF; Set up nominal valueCAP:1 1 0 C={C1}.NWA:1 F=1GHz C1= LIN 5pF 15pF 1pF SWPORD=(C1); C1 is swept in this analysis.NWA:2 F=1GHz; C1 is not swept in this analysis

The .PARAM statement sets up the nominal value of C1 which would be used when C1 is not swept, as in the NWA:2 analysis. Coupled sweeps and independent sweeps can be set up in this fashion to generate one or more-dimensional tuning curves. For example, a two-dimensional tuning curve can be set up as follows:

.PARAM C1 = 10pFCAP:1 1 0 C={C1}.PARAM C2 = 5pFCAP:2 2 0 C={C2}

Sweep Options1-4

Page 169: Circuit Simulator

Sweeping Bias Sources

.NWA:1 F=1GHz C1= LIN 5pF 15pF 1pF C2 = LIN 4pF 6pF 1pF SWPORD=(C1,C2)

This analysis generates 11 sweep points for C1 and 3 sweep points for C2, resulting in 33 analysis points. The SWPORD statement indicates that C1 and C2 will be swept independently because they are separated by a comma.

Sweeping Bias Sources• An arbitrary circuit variable is defined, added to the Variables drop-down list box, and then

used during circuit analysis and sweeping.• Note that when a swept parameter assigns a value, only the original value is used (in other

words, the sweep values will be ignored).• Voltage and current sources can be swept in order to analyze the circuit as a function of a bias-

source value (for example, sweeping the bias to show amplifier gain versus frequency as amplifier bias is swept). The procedure is similar to the sweeping of circuit parameters, except that the analysis variables are restricted to DC voltage or current sources (note that only a volt-age or current source can be swept, not a power source).

• At each value of the swept bias source, the bias-point analysis is performed and the circuit is linearized about the bias point. After analysis, the typical circuit responses and DC data are available at each bias point.

• Coupled sweeps and independent sweeps can be set up to generate n-dimensional tuning curves (for additional explanation of these terms, see glossary and the netlist examples).

To Set Up a Circuit Analysis Using a Swept Bias Source1. First, you must define the new variable to be swept: On the menu bar, click Circuit and then

click Design Properties. The Properties dialog box appears.2. In Properties, click the Local Variables tab, and then click Add. The Add Property dia-

log box appears. To define the new variable, type its Name and then type its initial Value (which must include a number and units (for example, 1V):

Sweep Options1-5

Page 170: Circuit Simulator

Sweeping Bias Sources

3. Click OK to close the Add Property dialog box. The Properties dialog box returns.

4. In Properties, make sure that the new variable has been added, and check that the Read Only and Hidden boxes are cleared (these are the default setting; for more details, see Prop-erties Dialog Box in the glossary). Click OK to close the Properties dialog box. The new variable is created and ready for use.

5. Now assign the variable to a circuit component: On the menu bar, click Window. When the submenu appears, click the appropriate schematic and the schematic editor window returns:

Sweep Options1-6

Page 171: Circuit Simulator

Sweeping Bias Sources

6. Double click the voltage source to be swept, and the Source Selection dialog box appears. (In this example, you assign the variable VOLTx to the voltage source.)

7. In Source Selection, click the Parameters tab, type the name of the variable in Value, and then click anywhere outside the Value box. Click OK to close Properties and return to the schematic editor.

8. To execute the sweep, first set up an analysis: On the menu bar, click Circuit and then click Add Solution Setup. The Solution Setup dialog box appears.Note: For additional information about setting up an analysis, refer to the appropriate topic, for example, Linear Network Analysis. (To find a help topic, click the menu bar and then click Help. In the Help menu, click Contents and the Designer Help window appears.)

9. In Solution Setup, select an analysis type, make the appropriate selections, and then click Next. When the new dialog box appears, click Add, and the Add/Edit Sweep dialog box

Sweep Options1-7

Page 172: Circuit Simulator

Sweeping Bias Sources

appears:

10. In Add/Edit Sweep, select the appropriate variable from the Variable list (in this example, Cx), and then select one of the five options for frequency sweep: Single value, Linear step, Linear count, Decade count, Octave count, or Exponential count (for defini-tions of these terms, see the glossary). Type the appropriate values into the Start, Stop, and Step text boxes, and make sure that the correct units appear for each (GHz, MHz, kHz). Click Add, and then click OK to close the Add/Edit Sweep dialog box. (Later, as necessary, use the Edit and Remove buttons to make changes or delete a particular sweep.)

11. Run the simulation: On the menu bar, click Circuit and then click Start Analysis. If the circuit was set up correctly, the analysis begins immediately, and a red progress bar appears. (If the analysis is not successful, check the Message Window for an explanation, and then take cor-rective action.)

12. To display results: On the menu bar, click Circuit and then click Create Report. For more information, see Generating Reports and Post-Processing in the online help topics.

Netlist Syntax, Parameters, and ExamplesSweeping one source:

.PARAM V1 = 2VVDC:1 1 0 V={V1}.NWA:1 F=LIN 1GHz 10GHz 1GHz V1=LIN 2V 5V 1V

The parameter V1 is swept from 2 to 5 volts in 1 volt steps. At each V1 value, the voltage source VDC:1 is set to V1 and a bias-point analysis is performed. Then the frequency analysis proceeds from 1 GHz to 10 GHz in 1 GHz steps.

Sweeping Multiple SourcesMore than one source may be swept at a time. By default, all sources are swept simultaneously (1-D sweep).

.PARAM V1=2V V2=12V V3=0V

Sweep Options1-8

Page 173: Circuit Simulator

Sweeping Bias Sources

VDC:1 1 0 V={V1}VDC:2 2 0 V={V2}VDC:3 3 0 V={V3}.NWA:2 F=LIN 1GHz 10GHz 1GHz V1=LIN 2V 5V 1V V2=LIN 12V 15V 1V + V3=LIN 0V 5V 1V

Sweep Options1-9

Page 174: Circuit Simulator

1Advanced Sweep Options

Advanced Sweep Options1-1

Page 175: Circuit Simulator

Sweeping Parameters in a Circuit or System Design

One of Designer’s key features is the ability to define variables that can be swept and analyzed. For example, a capacitor might be swept to generate a set of tuning curves. Or, in the case of a bias source, its current or voltage can be swept. The following sections describe how to sweep variables in Designer.

Sweeping Parameters in a Circuit or System Design• First, you must define a circuit variable, and then assign it to a component in the design. After

the variable is set up in the design, you define its sweep parameters during the solution setup.• Note that when a swept parameter assigns a value, only the original value is used (in other

words, the sweep values will be ignored).• Coupled sweeps and independent sweeps can be set up to generate n-dimensional tuning

curves.• The following example assumes that we are working with a circuit design, but the same proce-

dure applies to for a system design.

To Set Up a Circuit Analysis1. On the Circuit menu, click Design Properties. The Properties dialog box appears:

a. Click the Local Variables tab and then click Add. The Add Property dialog box appears. b. To define the new variable, type its Name (for example, “ Cx”) and then type its initial

Value, which must include a number and units (for example, 22.3pF).c. Click OK to close the Add Property dialog box.d. When the Properties dialog box reappears, make sure that the new variable has been

added.

e. Click OK to close the Properties dialog box. The new variable is created and ready for use.

f. For additional information about adding a local variable, see Defining Local Variables in Designer Help.

2. Now assign the variable to a circuit component: a. On the Window menu, click the appropriate schematic. b. Double-click the component to be swept, and its Properties dialog box appears.

Advanced Sweep Options1-2

Page 176: Circuit Simulator

Sweeping Parameters in a Circuit or System Design

c. In Properties, make sure that the Parameter Values tab is selected. Locate the appropri-ate parameter, and then enter the newly-created variable in the Value box.

d. Click OK to close Properties and return to the schematic. 3. Set up an analysis:

a. On the Circuit menu, click Add Solution Setup. The Solution Setup dialog box appears: a. Select an Analysis Type, make the appropriate selections, and then click Next. When the

second dialog box opens, click Add, and the Add/Edit Sweep dialog box appears:

b. In Add/Edit Sweep, select the appropriate variable from the Variable list, enter the appropriate sweep parameters, click Add, and then click OK.

c. For additional information about setting up an analysis, refer to the appropriate topic, for example, see Linear Network Analysis in Designer Help (on the Help menu, click Con-tents and the Designer Help window appears).

4. Run the simulation: a. On Circuit menu, click Start Analysis. If the circuit is set up correctly, the analysis

begins immediately and a red progress bar appears. b. If the analysis is not successful, check the Message Window for an explanation, and

then take corrective action.5. Display the results:

a. On the menu bar, click Circuit and then click Create Report. The Create Report dialog box appears.

b. When the Traces dialog box appears, make the appropriate selections, click Add Trace, and then click Done.

c. For more information, see Generating Reports and Post-Processing in Designer Help.

Netlist Syntax, Parameters, and Examples• Arbitrary circuit variables can be swept in an analysis to provide tuning curves of a circuit. For

example, to sweep a capacitor value, we can set up an analysis. .PARAM statement sets up the

Advanced Sweep Options1-3

Page 177: Circuit Simulator

Sweeping DC and RF Sources

nominal value of C1 which would be used when C1 is not swept, as in the HB:2 analysis:.PARAM C1 = 10pF; Set up nominal value

CAP:1 1 0 C={C1}

.HB:1 NHARM=8 F1=1GHz C1 = LIN 5pF 15pF 1pF ; C1 is swept in this analysis

.HB:2 NHARM=8 F1=1GHz; C1 is not swept in this analysis

• Coupled sweeps and independent sweeps can be set up in this fashion to generate one or more-dimensional tuning curves. For example, the following analysis generates a two-dimensional tuning curve. It generates 11 sweep points for C1 and 3 sweep points for C2, resulting in 33 analysis points. (The SWPORD statement indicates that C1 and C2 will be swept indepen-dently because they are separated by a comma.).PARAM C1 = 10pF

CAP:1 1 0 C={C1}

*

.PARAM C2 = 5pF

CAP:2 2 0 C={C2}

*

.HB NHARM=8 F1=1GHz C1= LIN 5pF 15pF 1pF C2 = LIN 4pF 6pF 1pF SWPORD={C1,C2}

• The following analysis sweeps P1, F1, and C1 independently, resulting in 6x11x11 = 726 anal-ysis points..PARAM C1 = 10pF P1=0dBm

CAP:1 1 0 C={C1}

.HB NHARM=8 F1=LIN 1GHz 2GHz 0.1GHz P1=LIN 0dBm 10dBm 2dB

+ C1= LIN 5pF 15pF 1pF SWPORD={P1, F1, C1}

Sweeping DC and RF Sources• First, you must define a circuit variable, and then assign it to a DC or RF source in the design.

After the variable is set up in the design, you define its sweep parameters during the solution setup.

• Voltage and current sources can be swept in order to analyze the circuit as a function of a bias-source value (for example, sweeping the bias to show amplifier gain versus frequency as amplifier bias is swept).

• The procedure is similar to that for a swept circuit parameter, except that the analysis variables are restricted to DC voltage or current sources (note that only a voltage or current source can be swept, not a power source).

Advanced Sweep Options1-4

Page 178: Circuit Simulator

Sweeping DC and RF Sources

• At each value of the swept bias source, the bias-point analysis is performed and the circuit is linearized about the bias point. After analysis, the typical circuit responses and DC data are available at each bias point.

• Note that when a swept parameter assigns a value, only the original value is used (in other words, the sweep values will be ignored).

• Coupled sweeps and independent sweeps can be set up to generate n-dimensional tuning curves.

• The following example assumes that we are working with a circuit design, but the same proce-dure applies to for a system design.

To Set Up a Circuit Analysis Using a Swept Bias Source1. On the Circuit menu, click Design Properties. The Properties dialog box appears:

a. Click the Local Variables tab and then click Add. The Add Property dialog box appears. b. To define the new variable, type its Name (for example, “VOLTx”) and then type its ini-

tial Value, which must include a number and units ( for example, 1V).c. Click OK to close the Add Property dialog box.d. When the Properties dialog box reappears, make sure that the new variable has been

added.

e. Click OK to close the Properties dialog box. The new variable is created and ready for use.

f. For additional information about adding a local variable, see Defining Local Variables in Designer Help.

2. Now assign the variable to a source: a. On the Window menu, click the appropriate schematic. b. Double-click the source to be swept, and its Source Selection dialog box appears. c. In Source Selection, locate the appropriate parameter, and then enter the new variable in

the Value box. d. Click OK to close Source Selection and return to the schematic.

3. Set up an analysis:a. Click Add Solution Setup. The Solution Setup dialog box appears:

Advanced Sweep Options1-5

Page 179: Circuit Simulator

Sweeping DC and RF Sources

b. In Solution Setup, select an Analysis Type, make the appropriate selections, and then click Next. When the second dialog box opens, click Add, and the Add/Edit Sweep dia-log box appears:

c. In Add/Edit Sweep, select the appropriate variable from the Variable list, enter the appropriate sweep parameters, click Add, and then click OK.

d. For additional information about setting up an analysis, refer to the appropriate topic, for example, see Linear Network Analysis in Designer Help (on the Help menu, click Con-tents and the Designer Help window appears).

4. Run the simulation: a. On Circuit menu, click Start Analysis. If the circuit is set up correctly, the analysis

begins immediately and a red progress bar appears. b. If the analysis is not successful, check the Message Window for an explanation, and

then take corrective action.5. Display the results:

a. On the menu bar, click Circuit and then click Create Report. The Create Report dialog box appears.

b. When the Traces dialog box appears, make the appropriate selections, click Add Trace, and then click Done.

c. For more information, see Generating Reports and Post-Processing in Designer Help.

Netlist Syntax, Parameters, and ExamplesSweeping One Source in Linear Analysis• The parameter V1 is swept from 2 to 5 volts in 1 volt steps. At each V1 value, the voltage

source VDC:1 is set to V1 and a bias-point analysis is performed. Then the frequency analysis proceeds from 1 GHz to 10 GHz in 1 GHz steps.

Advanced Sweep Options1-6

Page 180: Circuit Simulator

Sweeping DC and RF Sources

.PARAM V1 = 2VVDC:1 1 0 V={V1}.NWA:1 F=LIN 1GHz 10GHz 1GHz V1=LIN 2V 5V 1V

Sweeping Multiple Sources in Linear Analysis• More than one source may be swept at a time. By default, all sources are swept simultaneously

(1-D sweep)..PARAM V1=2V V2=12V V3=0VVDC:1 1 0 V={V1}VDC:2 2 0 V={V2}VDC:3 3 0 V={V3}.NWA:2 F=LIN 1GHz 10GHz 1GHz V1=LIN 2V 5V 1V V2=LIN 12V 15V 1V+ V3=LIN 0V 5V 1V

Swept Source in Harmonic Balance Analysis • To sweep DC or RF sources, the SourceSpec specification is used. Voltage, current and power

sources may be swept. The sweep is specified in the .HB analysis statement and the source to be swept references the appropriate analysis source variable, i.e. VSRCi, ISRCi, or PSRCi where i is replaced by an integer. For example, the following will sweep the voltage source from 0.1V to 1.0V in steps of 0.1V. Note that VSRC1 is considered a variable and must be enclosed in curly bracesVSIN 1 0 V={VSRC1} FNUM=F1

.HB NHARM=8 F1=1GHz VSRC1=LIN 0.0 1.0 0.1

• The following example analyzes a swept power source at a port. It sweeps each power source at port 1 from 0dBm to 20dBm in steps of 2dB. This is commonly used for intermodulation distortion calculations. PORTP 1 0 PNUM=1 P1={PSRC1} HNUM1=F1 P2={PSRC1} HNUM2=F2

.HB INTM=3 F1=1GHz F2=1.01GHz PSRC1=LIN 0dBm 20dBm 2dB

• Source specifications can also be mixed to sweep power and bias independently. For example, the following analysis sweeps an RF the first power source from 0dBm to 20dBm in steps of 2dB, and sweeps the second RF power source 2 from -10dBm to 10dBm in steps of 2dB.PORTP 1 0 PNUM=1 P1={PSRC1} HNUM1=F1 P2={PSRC2} HNUM2=F2

.HB NHARM=8 F1=1GHz PSRC1=LIN 0dBm 20dBm 2dB PSRC2=LIN -10dBm 10dBm 2dB

Sweeping Frequencies and SourcesBoth frequency and RF or DC sources can be swept in an analysis. By default, the sources will be swept together as the inner loop of the .HB analysis and will be swept independent of frequency.

Advanced Sweep Options1-7

Page 181: Circuit Simulator

28Interpretive User-Defined Models

The Interpretive User-defined model, or IUDM, lets the user model a nonlinear component.Available topics:IUDM RepresentationsIUDM SyntaxFrequency Weighting FunctionsExamples

IUDM RepresentationsThe Interpretive User-defined model, or IUDM, lets the user model a nonlinear component by specifying the constitutive relationships, equations that relate the n port currents and the n port volt-ages. The equations are specified in time domain. The equations may be specified in either an explicit or an implicit representation.

With the explicit representation, the current at port k is specified as a function of the n port voltages i.e. .The implicit representation uses an implicit relationship between any of the port currents and any of the port voltages i.e. .

IUDM

i1 i2

ik fk v1 v2 … vn i1 i2 … in, , , , , , ,( )=

fk v1 v2 … vn i1 i2 … in, , , , , , ,( ) 0=

Interpretive User-Defined Models28-1

Page 182: Circuit Simulator

IUDM Syntax

The explicit representation is a voltage-controlled representation and can implement only voltage-controlled expressions. The implicit representation is not restricted. It can model equations that are voltage-controlled or current-controlled.The advantages of using explicit representation are its simplicity and its simulation efficiency. In implicit representation the port currents are also included as unknowns along with port voltages. This results in a larger system of equations with a larger number of unknowns. Hence usage of the implicit representation is recommended only when the nonlinear model cannot be expressed by explicit equations.

IUDM SyntaxThe netlist format for the model is:IUDM:name nodelist + I[p, w] = {expression }+ F[p, w] = {expression }+ IN[p, w] = {expression }+ NC[p, p] = {expression}

Note: Plus (+) is used here as a continuation character.where:

1. For a given port, the port equation may be of the explicit or implicit form but not both2. There must be at least one equation corresponding to each port3. Weighting function index 0 and 1 are predefined as indicated below.4. Noise currents and noise correlation equations are optional

name Alphanumeric instance name

nodelist is the list of node names connecting the device. The order of nodes is p1 p2 n1 n2 ... where pi is the positive terminal (+ terminal indicated in the diagram) of the i’th port and ni is the negative terminal of the i’th port (positive current is into pi).

I[p, w] define the current into the p’th port using the w’th weighting function. Corresponds to expressions of the form i = f(v).

F[p, w] define the implicit equation for the p’th port using the w’th weighting function. Corresponds to expressions of the form 0 = f(i,v)

IN[p, w] define the mean-squared noise current <ip2> for the p’th port using the

w’th weighting function.

NC[p, q] define the noise current correlation factor between ports p and q.

expression a valid expression as defined below

Interpretive User-Defined Models28-2

Page 183: Circuit Simulator

Frequency Weighting Functions

The pre-defined variables are global and set by the simulator. They cannot be re-defined by the user.

Explicit Current Equations, i=f(v)The explicit current equation defines the constitutive relationship of the current into a device port as a function of the device port voltages, _V1, _V2, etc. When more than one equation is assigned to a port, the currents are added together after being scaled by their indicated weighting functions. Once a port current is defined by an explicit current equation, then any additional equations for that port must also be explicit (explicit and implicit equations cannot be mixed).Netlist ExampleIUDM:diode1 1 2 I[1,0] = {1.0e-9* (exp(_V1/0.026) - 1)}where the current into port 1 is given by the expression which is a function of _V1. The current is scaled by weighting factor 0, which uses a scale factor of 1 (see below).

Implicit Equations, f(v,i) = 0The implicit equation defines a constraint which is more general than the explicit equation. The explicit equation defines a voltage-controlled equation, while the implicit equation can be voltage or current controlled, or both. The simple case can be represented as i - f(v) = 0 where i is the port current variable _I1, _I2, etc.Similar to the explicit equation case, the implicit equations are scaled by their indicated weighting functions. Implicit equations can be added together at a port, but cannot be combined with explicit equations.

Netlist ExampleIUDM:resistor1 1 2 F[1,0] = {_I1 - _V1/10 }

Frequency Weighting FunctionsThe frequency weighting functions serve to scale the port current and implicit equation spectrums. This is most often used to calculate the derivative of a quantity, as in the case i = jωQ(v) where Q(v) is a nonlinear voltage controlled charge expression.Nonlinear device models are calculated in the time domain. The currents are then converted to the frequency domain through a discrete Fourier transform. At this point weighting functions are applied.

_V1 to _V9 Port voltages

_I1 to _I9 Port currents

Interpretive User-Defined Models28-3

Page 184: Circuit Simulator

Frequency Weighting Functions

For example, to realize the expressioni = f(v) + d[g(v)]/dt (1)

one can use, in the frequency domainI(ω) = F(V(ω)) + H(ω)G(V(ω)) (2)

where H(ω) = jω is the weighting function.

Pre-Defined Weighting FunctionsTwo weighting functions are pre-defined for the most common cases.

User-Defined FunctionsThe .IUDMFUNC element creates a user defined function that can be used in the netlist. Functions created with .IUDMFUNC are special functions that can be used only by the expressions of the Symbolic Defined Device (IUDM).General Form:

.IUDMFUNC name(x1,x2,..) = expression (x1,x2,..)

• The name defines the name of the function• .IUDMfunc cannot redefine built-in functions• .IUDMfunc follows the same scoping rules as .func• Arguments are optional• Arguments are dummy variables and take precedence over .PARAM parameters in a .IUDM-

FUNC• Arguments cannot start with a digit and cannot be ReservedKeywords• Use of variables follow normal scoping rules in .IUDMFUNC, i.e. Parameter usage in .IUDM-

FUNC will be resolved using the same scope search as performed for .PARAM• The use of curly braces to define an expression is optional

Weight Index Scale Factor

0 1

1 jω

Interpretive User-Defined Models28-4

Page 185: Circuit Simulator

Examples

Example:.IUDMFUNC xyz(x,y,z) = sin(x) + tanh(y) + sqrt(z).IUDMFUNC softExp(x) = if (x < 50, exp(x), (x+1-50)*exp(50))

Examples

PN-Junction Diode ModelA simple PN junction diode model is detailed below in netlist form. The diode has an exponential conduction current and simple 1/sqrt() capacitance function. The capacitance has been integrated to obtain the nonlinear charge equation so that weighting functions can be used to compute the dis-placement current.

.param Is = 1nA ; Diode Saturation Current

.param C0=.2pf ; Zero Bias Capacitance

.param Vbi=0.8 ; Built in Voltage

.param IVt = 38.696

.IUDMfunc soft_exp(x) = if (x < 50, exp(x), (x+1-50)*exp(50))

.IUDMfunc my_sqrt(x) = sqrt(Vbi*(Vbi-if(x<Vbi*0.8,x,Vbi*0.8)))

IUDM:Sdiode 1 2+I[1,0] = {Is*(soft_exp(_V1*IVt) - 1)}+I[1,1] = {-2*C0*my_sqrt(_V1)}

The equation used for the diode conduction current is:

where IS is the diode saturation current, VJ is the applied junction voltage, and Vthermal is kT/q. The capacitance of the junction is given by:

where C0 is the zero-bias junction capacitance and Vbi is the built-in voltage. To calculate the cur-rent through the capacitor we use

IJ IS expVJ

Vthermal------------------- 1–

=

CJ C0 1VJVbi-------–

1– 2⁄=

ICJdQCJ

dt⁄=

Interpretive User-Defined Models28-5

Page 186: Circuit Simulator

Examples

which is equal to

in the frequency domain. Therefore, the weighting function of index 1 can be used.

Materka MESFET Model

The topology of the model is shown in the following diagram:

The channel current equation is:

where Vgs and Vds are the intrinsic FET voltages; Idss, Vpo, γ, and α are fitting parameters, and .

The capacitances are given (for ) by:

jωQCJ

G D

S

IdsIg1Ig2

Cgs

Cgd

Ids Idss 1VgsVp--------–

2 αVdsVgs vp–------------------- tanh=

Vp V= po γVds+

Vgs 0.8Vbi<

Interpretive User-Defined Models28-6

Page 187: Circuit Simulator

Examples

and (for ) by:

where Cgs0 and Cgd0 are the zero-bias capacitances for gate-source and gate-drain respectively and Vbi is the built-in voltage. The diode currents are given by:

where Isf and α are fitting parameters. The netlist is as follows.

.param Idss = 100ma

.param Vpo = -2.0

.param GAMMA = -0.1

.param SL = 0.15

.param CGS0 = 1pf

.param CGD0 = 0.2pf

.param VBI = 0.8

.param ISF = 1nA

.param ALPHAF = 38.696

.IUDMfunc soft_exp(x) = if (x < 50, exp(x), (x+1-50)*exp(50))

.IUDMfunc my_sqrt(x) = sqrt(VBI*(VBI - if(x< VBI*0.8, x, VBI*0.8)))

Cgs Cgs0 1VgsVbi--------–

1– 2⁄=

Vgd 0.8Vbi<

Cgd Cgd0 1VgdVbi--------–

1– 2⁄=

Ig1 Isf exp αfVgs( ) 1–( )=

Ig2 Isf exp αfVgd( ) 1–( )=

Interpretive User-Defined Models28-7

Page 188: Circuit Simulator

Examples

.IUDMfunc my_min(x) = Vpo+GAMMA*x

.IUDMfunc my_tanh(x) = tanh(SL*x/Idss)

.IUDMfunc my_square(x) = x*x

.param Vgs = _V1

.param Vds = _V2

.param Vgd = _V1 - _V2

.param Is1 = ISF*(soft_exp(ALPHAF*Vgs)-1)

.param Is2 = ISF*(soft_exp(ALPHAF*Vgd)-1)

.param Qgs = -2*CGS0*my_sqrt(Vgs)

.param Qgd = -2*CGD0*my_sqrt(Vgd)

.param Ids1 = 1 - (Vgs/(my_min(Vds)))

.param Ids = Idss*my_square(Ids1)*my_tanh(Vds)

IUDM:Q1 8 11 9+I[1,0] = {Is1+Is2}+I[1,1] = {Qgs+Qgd}+I[2,0] = {Ids– Is2}+I[2,1] = {-1.0*Qgd}

The corresponding nonlinear library model is:FETMAT:F1 8 11 9 +Idss = 100ma Vp0=-2.0 GAMMA=-0.1 SL=0.15 C10=1pf CF0=0.2pf VBI=0.8+IG0=1nA R10 = 0 Kg=0.0 SS=0

Interpretive User-Defined Models28-8

Page 189: Circuit Simulator

10Component Models

This subtopics beneath this level describe the components available in the Circuit simulator. To expand a component subgroup, double-click its book icon. To read about a specific component, double-click its information icon in the Help topic tree.HintYou can launch online help for any component from the schematic editor:1. In the schematic editor, double-click the component for which you want to view help.

The Properties dialog opens. 2. Select the Parameter Values tab.3. Select the Value radio button.

Component Models10-1

Page 190: Circuit Simulator

4. In the Info row, click the button in the Value column, as shown here for COAXSTEP:

The Help viewer opens to display the component’s specifications.

Component Models10-2