Circuit Simulator

  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Circuit Simulator as PDF for free.

More details

  • Words: 44,551
  • Pages: 190
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 desktop, 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 environment that allows the user to maximize productivity and facilitates data transfer between the simulator 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 transmission line design, matching network extraction, and filter synthesis for both lumped and distributed 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 methods, 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

Features and Capabilities of the Circuit Simulator

Linear Analysis For 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 coupled lines, while the device library contains models for popular chip components, such as resistors, capacitors, and inductors.

Nonlinear Features Circuit’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 characteristic

• • • • • •

Power amplifiers Digitally modulated amplifiers Oscillators and VCOs, including industry-leading phase noise features Mixers, including noise Limiters Detectors

Available outputs include:

• • • • • •

Spectral plots

• • • •

Dynamic load lines

Waveforms Eye diagrams/constellations ACPR plots Spectral regrowth Multidimensional sweeps, including gain, power, conversion loss, frequency v voltage, and any variables in an analysis 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 optimization 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 applications.

Circuit Simulator-2

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 Integration HFSS 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 missing variations using HFSS. For more information about integrating HFSS designs into Designer, see Adding an HFSS Circuit to a Design.

Circuit Simulator Options When 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 Circuit 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 impedance 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

2 Inserting 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

Title

1 Linear Network Analysis

Linear Network Analysis

1-1

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 frequency 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 simulated 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 Domain In 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 outputs.

To Set Up a Basic Frequency-Domain Analysis 1.

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 analysis-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 Calculations (for aditional details, see Group Delay Analysis, later in this topic).

7.

To add a basic frequency sweep do either of the following:



1-2

.

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,

Linear Network Analysis

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

Title

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

anaSwpOrderDef

SWPORD

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

The values that define the order in which the parameters get swept. Defines ordered sweep

The first entry defines the innermost loop

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 frequency, and any duplicate frequency points are removed.

Notes 1.

1-4

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, Linear Network Analysis

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 Analysis Group 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 frequency. 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 frequency, 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 values 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 values may yield more accurate results for circuits with high-Q components, or those with sharp passbands-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 frequency 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

Title

Linear Analysis: Steady-State Time-Domain In 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 frequency 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 linearized 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 Analysis

1-6

1.

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 analysis-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: Linear Network Analysis

.

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):

9.

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.

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

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}]

1-8

Parameter

Description

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

Linear Network Analysis

Default

none

Comments

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

Title

anaSwpOrderDef

SWPORD

The values that define the order in which the parameters get swept. Defines ordered sweep

The first entry defines the innermost loop

Netlist Example The 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

Notes 1.

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).

Responses to an Arbitrary Time Signal The 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 preceded by a time value. The first and last sample points must have the same value for the signal to be expandable to periodic 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.

Linear Network Analysis

1-9

Title

Linear Analysis: Pulse Modulated Carrier In 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, including 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 linearized 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 Analysis, 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 Analysis 1.

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 analysis-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:

7. 1-10

.

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.

For a basic analysis, click Finish and run the analysis (step 10). Linear Network Analysis

Title

8.

9.

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.

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

Title

Netlist Syntax and Parameters Parameter

Description

PULSE

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

Fcarrier RatePeriod

Frequency of the carrier For values > 1.0 Pulse rate in Hertz For values < 1.0 Pulse repetition period in seconds

Width Sideband

Modulating pulse width in seconds For values > 1.0 Number of single sidebands used for the calculation For values < 1.0 Sidebands are included until the sin(x)/x envelope is < Sideband The default value for Sideband is 0.01.

Netlist Example The 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

Notes

1-12

1.

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).

Linear Network Analysis

26 Circuit 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 Responses The responses for linear network analysis are categorized into the following sections: 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.

Display Parameters in the Report Editor The format for linear and small-signal circuit responses is: CircuitResponse(CKT=arg1 term=arg2) where CircuitResponse

identifies the response parameter, for example, S11.

Circuit Response Definitions26-1

Linear Network Analysis Circuit Responses

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.

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: S21 S21(CKT=cktA R2=600.0) S21(CKT=cktA R1=75 Z2=60+j10 Z3=IMP(ckt1Port))

Complex Numbers Formats for Display Parameters and Expressions Complex 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).

Circuit Response Definitions26-2

Linear Network Analysis Circuit Responses

Reference Circuit Definitions for Two-Port Responses

+ Vs

ZOUT

ZIN

Zs

Two-port Network [S]

V1 -

Γs

ΓIN

+ V2 -

ZL

ΓOUT ΓL

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

∆ = S11 S 22 − S12 S 21

Circuit Response Definitions26-3

Linear Network Analysis Circuit Responses

Parameters for N-Port Circuits Sij

Complex S parameter

Yij

Complex Y parameter

Zij

Complex Z parameter

GDij

dφDelay Real Group (not available in linear network analysis), ij GD ij =



where φij=phase(Sij)

Single Port Parameters for N-Port Circuits RHOi Complex Reflection coefficient, RHOi = Sii RTLi VSWRi

Real Return loss ,

RTLi = Sii

VSWRi =

Real Voltage standing wave ratio,

1 + S ii 1 − S ii

Parameters for Two-Port Circuits Aij

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

Hij

Complex Hybrid parameters

Gij

1 − ΓS

2

1

2

Complex Inverse Hybrid parameters S 21 GA = 2

2

1 − S11 ΓS 1 − ΓOUT Gain and Matching Parameters for Circuits S12Two-Port S 21 ΓS S 22 gain, + ΓOUT =power GA Available 1 − S11 ΓS GFMN

, where

1 impedance 1 is used to achieve minimum 2 (Zopt) Gain when the  input 2 S 21 2 , unilateral case noise figure (FMIN) 

1 − S 22 1 − S11 GMAX =   S 21 K − K 2 − 1 , GMAX Real Maximum gain ,  available  S12

(

)

bilateral case

Circuit Response Definitions26-4

Linear Network Analysis Circuit Responses

GML

B2 ± B22 − 4 C2

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

= 1 + S 22

− S11

C2 = S 22 − ∆ S11∗

GMS

− ∆ 2

B1 ± B −reflection 4 C1 coefficient for Source at maximum Complex Optimum GMS =gain (GMax), available 2 2C 1 −2 Γ L 1 2

− S 22 2 −S 21∆ ,

= S11 + ΓIN gain, Power

,

1 − ΓIN

2

, where

S12 S 21 Γ L 1 − S 22 Γ L TG

MSG

1

22,

∗ ΓL C1 = S11 1−−∆SS2222

TG

,

,

2 gain 1

B1 = 1=+ S11 GP

GP

2

=

Transducer power gain,

1 − ΓS

2

1 − S11 ΓS

S 21

2

2

1− ΓL

2

1 − ΓOUT Γ L

2

S 21 MSG = Real Maximum stable gain , S12

UPG

1 UPG = Unilateral power gain, 1 − S11

YMS

YMS admittance =  at maximum  available gain (GMAX), Source Z S  1 + GMS  where ZS is the source impedance.

2

S 21

2

1 1 − S 22

2

, when S12 = 0

1  1 − GMS 

1  1 − GML 

YML

YMLadmittance = at maximum  available gain (GMAX), Load Z L  1 + GML  where ZL is the load impedance.

ZMS

Source ZMS =impedance at maximum available gain (GMAX),

ZML

1 YMS

1 YML

Load at maximum available gain (GMAX), ZMLimpedance =

Circuit Response Definitions26-5

Linear Network Analysis Circuit Responses

Port Parameters for Two-Port Circuits Y12 Y21 YIN admittance = Y11 − with port 2 terminated, YIN Input Y22 + YL is the load admittance. where YL

YOUT

Y12 Y21 YOUTadmittance = Y22 −with port 1 terminated, Output Y11 + YS is the source admittance. where YS

ZIN

Z12 Z 21 ZIN impedance = Z11 −with port 2 terminated, Input Z 22 + Z L is the load impedance. where ZL

ZOUT

Z12 Z 21 ZOUTimpedance = Z 22 −with port 1 terminated, Output Z11 + Z S is the source impedance. where ZS

Stability Parameters for Two-Port Circuits B1

2 B1 term of the2 stability2 factor,

B1 = 1 + S11 + S 22 − ∆ 2 .2 For SSAC 2 analysis, use BI. 1 − S11 − S 22 + ∆ K =Real Stability factor k 2 S 21 S12

K

1 − S22

MUReal = Stability factor * mu S11 − ( ∆ ) S22 + S21S12

MU

KCSR =

KCSR

KCLR

KCSO

KCLO

2

S12 S 21

KCLR =

S12 S 21 2

2

Real Stability circleSradius−for ∆ Source , 11

2

2

Real Stability circle S radius − ∆ for Load ,

KCSO

(S =

22

11

∗ − ∆ S 22

)



2

2 Complex Stability S circle − ∆origin for Source ,

KCLO =

(S

11

22

− ∆ S11∗ ) 2



2

Complex Stability − ∆origin for Load S circle 22

Noise Parameters for Two-Port Circuits FMIN

NF

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

Circuit Response Definitions26-6

Linear Network Analysis Circuit Responses

NT RN

RNU

Real Equivalent noise temperature, NT = ( NF − 1) * 290 Real Equivalent normalized noise resistance ratio. RN is derived from fundamental noise quantities. Real Equivalent un-normalized noise resistance, RNU = RN * Z REF

Zopt − Zs Zopt + Zs

GOPT

GOPT =Optimum noise figure reflection coefficient, Complex

YOPT

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

ZOPT

Complex Optimum noise figure source impedance,

ZOPT = 1 YOPT

Two-Port Voltage Gain Parameters Vgain 2 VGIO Complex input-output, VGIO Voltage = V1 VGIN

 1 + Z S Complex gain insertion, VGIN Voltage = VGSL

VGSL

2 source-load, Complex VGSL Voltage = gain



V

 ZL

VS

Voltage and Current Probe Parameters Vp(name)

Complex voltage of the probe element name.

Ip(name)

Complex current of the probe element name.

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 Responses Note Time domain responses are valid only when time specifications are included in the analysis. 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.

Circuit Response Definitions26-7

Linear Network Analysis Circuit Responses

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.

OUT Block Parameters The OUT block is automatically generated when needed for schematic users. For netlist users, the OUT block is needed only for group delay calculations. S GD PERT

Indicate to the analysis to calculate group delay, as defined above. Group delay perturbation factor. The perturbation frequency used in the difference calculation will be perturbed by f*PERT.

If group delay is desired, include the following in the netlist: OUT PRI cktName S GD PERT=val END Using PERT is optional. Schematic users enter the information in the linear FREQ block component and fill out the properties for GD (ON or OFF), PERT, and OPTION (S or VG).

OPT and STAT Block Parameters The 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. 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

Linear Network Analysis Circuit Responses

Yij

Zij

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

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.

MVG i

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

Linear Network Analysis Circuit Responses

IZij IVGi

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

Circuit Response Definitions26-10

Linear Network Analysis Circuit Responses

For Two-Ports Only K GMAX NF UPG GFMN

Specify stability factor to a goal. Specify maximum available gain to a goal. Specify noise figure to a goal. Unilateral power gain for two-port circuits. 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 YOUT ZIN

Input admittance with port 2 terminated, complex. Output admittance with port 1 terminated, complex. Input impedance with port 2 terminated, complex.

ZOUT

Output impedance with port 1 terminated, complex.

RHOi

Reflection coefficient, complex.

Circuit Response Definitions26-11

Nonlinear Circuit Responses

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. 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 GBW

Specify gain-bandwidth product to a goal

Group Delay Perturbation PERT

Frequency perturbation for group delay calculations

Nonlinear Circuit Responses Display Parameters Forms are used for defining graphs and tables that allow very general expressions. Several functions 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

). The available functions are given at the end of this chapter.

Circuit Response Definitions26-12

Nonlinear Circuit Responses

Definitions Hn

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

i,j x xy z

Port numbers. Single device port index (for example, Ig for gate current) Dual device port index (for example, Vds for drain-source voltage) Instance name of device

External Port Responses Ai

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 in the frequency V < Hm > + Iwave i < Hm > Ri Ai < as Hm >= i domain, specified Ai. Definition:

Bi

2 Ri

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 V < Hm − I i in< the Hmfrequency > Ri Bi < as Hm >= i domain, specified Bi. Definition:

2 Ri

Circuit Response Definitions26-13

Nonlinear Circuit Responses

EFi

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/A Spectral Domain Display: N/A

PO < Hm >

i Network Fn/Sweep Domain EFi < Hm >= Display: Select a port and harmonic to display the efficiency, specified as EFi I BiasVbias

Definition:

FO



All Bias Sources

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/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: Select a harmonic to display the frequency, specified as FO

GCij

Complex general conversion transfer parameters between output port i, harmonic m and input port j, harmonic n. These are the largesignal analogy to S parameters. Use dB() to get the transfer parameter in dB. Time Domain Display: N/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: Bi <Select Hma>harmonic to display the frequency, specified as GCij. GC < Hm , Hn >= ij Definition:

A j < Hn >

where B and A are the

exiting and incident traveling waves, respectively.

Circuit Response Definitions26-14

Nonlinear Circuit Responses

Ii

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.

PAij

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/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: Select a port and harmonic POi < Hm > − Pin j < Hn > to display the, power-added efficiency, specified as PAij PA < Hm Hn >= ij

Definition: Pinj

∑I

V Bias

Bias All Bias Sources

where

is the power absorbed by the network at port j, harmonic

Hn.

Circuit Response Definitions26-15

Nonlinear Circuit Responses

PFi

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.

Definition for time domain: PFi = vi ( t )ii ( t )

1 2

{

Definition frequency PFi < Hmfor>= < Hm > Re Vidomain:

POi

I i* < 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. Definition for time domain: POi = vi ( t )ii ( t ) Definition for frequency domain: 1

2

POi < Hm >= 2 Ri I i < Hm > =

1 2

Bi < Hm >

2

Circuit Response Definitions26-16

Nonlinear Circuit Responses

RLi

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/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: Select POi < Hm > a harmonic 2 component toRL display the power return loss, specified < Hm >= Hm > = Γi as < RLi. i Definition:

Pavsi < Hm >

where Γ is the reflection coefficient at port i, harmonic m.

SPi

Real spectral purity of the mth harmonic power at port i. Use dB() to get purity in dB. Time Domain Display: N/A Spectral Domain Display: N/APO < Hm > i SPi < Hm >= Display: NH Network Fn/Sweep Domain Select a harmonic component to display the spectral purity, POi <specified Hn > as SPi. Definition:



n =1, n ≠ m

where NH are the

total number of harmonic components, excluding DC.

TGij

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 dB Time Domain Display: N/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: Select the harmonic components to display the transducerPO gain,<specified Hm > as i TGij. TGij < Hm, Hn >= Definition:

Pavs j < Hn >

where Pavs is the

available source power at port j, harmonic n.

Circuit Response Definitions26-17

Nonlinear Circuit Responses

Vi

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.

VGij

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/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: Select the harmonic components to display the voltage gain, Vi < specified Hm > as VGij. VGij < Hm, Hn >=

V j < Hn >

Definition:

YIi

Complex input admittance at port i, harmonic m. Requires a source at port i, harmonic m. Time Domain Display: N/A Spectral Domain Display: N/A Network Fn/Sweep DomainIDisplay: Select the harmonic i < Hm > components YI to idisplay admittance, specified as YIi. < Hmthe >=input Definition:

Vi < Hm >

Circuit Response Definitions26-18

Nonlinear Circuit Responses

ZIi

Complex input impedance at port i, harmonic m. Requires a source at port i, harmonic m. Time Domain Display: N/A Spectral Domain Display: N/A Network Fn/Sweep DomainVDisplay: the harmonic < Hm Select > components ZI to display the >=inputi impedance, specified as ZIi. i < Hm Definition:

I i < Hm >

Circuit Response Definitions26-19

Nonlinear Circuit Responses

Noise Spectrum Responses ANi

Amplitude noise spectrum at port i, harmonic m. AN is only computed by specifying NSi or ANiin the NOUT block. The default unit is the dBc/Hz. Time Domain Display: N/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: Amplitude noise is available at the port and harmonic specified in the NOUT block for the NS keyword.

NSi

Lower sideband noise spectrum at port i, harmonic m. Noise spectrum is available for single-tone analysis only. NSi 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/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: Noise Spectrum is available for the ports and harmonics specified in the NOUT block.

NSLi

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

Circuit Response Definitions26-20

Nonlinear Circuit Responses

NSUi

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

PNi

Phase noise spectrum at port i, harmonic m. PN is only computed by specifying NSi or PNi in the NOUT block. The default unit is dBc/Hz. Time Domain Display: N/A Spectral Domain Display: N/A Network 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

Nonlinear Circuit Responses

Small-Signal Mixer and Mixer Noise Responses CGij

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/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: Conversion gain is available for the ports and harmonics specifiedPO in theblock. Use dB() i to obtain conversion dB.>= CGij < gain Hm,inHn Definition:

Pavs j < Hn >

where Pavs is the

available source power at port j, harmonic n.

NFij

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/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: Noise Figure is available for the ports and harmonics specified in the NOUT block.

Circuit Response Definitions26-22

Nonlinear Circuit Responses

Noise Contribution Responses NPLINi

Noise power contribution at port i, harmonic m from the linear subnetwork. The default unit is the watt. Time Domain Display: N/A Spectral Domain Display: N/A Network 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)

Noise power contribution at port i, harmonic m from nonlinear device named z. The default unit is the watt. Time Domain Display: N/A Spectral Domain Display: N/A Network 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

Noise power contribution at port i, harmonic m from local oscillator signal. The default unit is the watt. Time Domain Display: N/A Spectral Domain Display: N/A Network 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

Nonlinear Circuit Responses

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/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: Noise contribution is available if NS or NF is specified in the NOUT block.

NPWRi

Total noise power at port i, harmonic m. The default unit is the watt. NPWR = NPLIN + NPDEV + NPSRC + NPKT. Time Domain Display: N/A Spectral Domain Display: N/A Network 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.

Modulation Analysis Responses The modulation analysis responses use the following definitions: 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

Nonlinear Circuit Responses

FSn and BWn are defined in the modulation source specifications for adjacent and alternate channel 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. A1PRi A2PRi A3PRi

Adjacent channel power ratio. Use dB() to obtain units of dB. Time Domain Display: N/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: Adjacent channel power Pnports ACispecified in the NOUT block. ratio is available for the Definition: AnPRi = PnIBi

Circuit Response Definitions26-25

Nonlinear Circuit Responses

ACPRi

Same as A1PRi.

P1ACi P2ACi P3ACi

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/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: Adjacent channel power is f2 available for the ports specified in the NOUT block. Definition: PnACi =



f1

p(ω )dw

where f1 and f2 define the start and

stop frequencies of the adjacent channel. f1 = FSn and f2 = f1 + 2BWn.

PACPi

P1IBi P2IBi P3IBi

Same as P1ACi.

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/A Spectral Domain Display: N/A Network Fn/Sweep Domain Display: In-band power is available for the ports specifiedBWn in the NOUT block. Definition: PIBi =



− BWn

p( w)dw

. where BWn is the bandwidth of the

main channel as defined in the modulation source specification.

PIBi

same as P1IBi.

Ichi

In-phase and quadrature-phase time-domain waveforms at port i. The default unit is the volt.

Qchi

Time Domain Display: The voltage waveform of the in-phase signal component, Ichi, and the quadrature-phase signal component Qchi. Spectral Domain Display: N/A Network Fn/Sweep Domain Display: N/A

Circuit Response Definitions26-26

Nonlinear Circuit Responses

IchEyei QchEyei

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/A Network 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/A Network 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/A Spectral Domain Display: Voltage modulation spectra of the complex signal at port i. Network Fn/Sweep Domain Display: N/A It may be useful to use the Msmooth() function to smooth, or lowpass filter, the spectral data; that is, Msmooth(IQi) or dB(Msmooth(FQi)).

Circuit Response Definitions26-27

Nonlinear Circuit Responses

Device Port Responses Ix (z) < H m >

Current into terminal x of device name z. The default unit is the ampere. Time Domain Display: This is the real current waveform, specified as Ix(z). Spectral Domain Display: Complex current spectrum, specified as Ix(z). Network Fn/Sweep Domain Display: Select a harmonic component to display the complex current in the frequency domain, specified as Ix(z).

IP(z)

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).

Circuit Response Definitions26-28

Nonlinear Circuit Responses

POxy(z) PFxy(z)

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 or PFi. Definition for time domain: z

PO xy ( z ) = PFxy ( z ) = v xy ( t ) i xyz ( t )

, where

v xyz

represents the

voltage across terminals xy at device z, and similarly for i. PO

xy

( z ) < Hm >= PFxy ( z ) < Hm >=

{

1 frequency domain: Definition for Re V ( z ) < Hm > 2

Vxy(z)

xy

}

I xy* ( 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).

Circuit Response Definitions26-29

Nonlinear Circuit Responses

VP(z)

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).

SVn(z)

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).

Circuit Response Definitions26-30

Nonlinear Circuit Responses

Bias Element Responses V(z)

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).

I(z)

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).

Device Port Indices The 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 Indices FET: 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 Indices All combinations of two single indices are valid for the built-in device models. Example usage:Vgs, Vds, Vce, Vac, POgs, Poac Vtj gives temperature for HBT

Circuit Response Definitions26-31

Nonlinear Circuit Responses

Examples 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



Sweep

Fundamental output power at port 1.

TG21

Sweep

Gain from the 1st harmonic at port 1 to the 2nd harmonic at port 2.

GC21

Sweep

Large-signal S parameter similar to S21

Display Functions and Operators Expressions 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 running variable in the expressions.

Operators Operators take the form: argument1 operator argument2 Here 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.

Functions A 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. Mag(z) Re(z)

Real, Magnitude. Real, Real component.

Circuit Response Definitions26-32

Nonlinear Circuit Responses

Im(z) Ang(z)

Real, Imaginary component. 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

Nonlinear Circuit Responses

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) Log10(r) Msmooth(exp r [, fl = value])

Real, sign extension. [abs(r1) for r2≥0, -abs(r1) for r2<0] Real, Logarithm of base 10. 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%.

Functions that reduce a vector into a single value Note The results of these functions cannot be graphed, but should be displayed in a table. 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

Examples

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.

Constants Pi e

Real constant 3.1415.... Natural logarithm base 2.718....

DegRad

Convert degrees to radians (π/180).

RadDeg

Convert radians to degrees (180/π).

Examples Some examples of functional expressions using circuit responses, functions and operators are: dB(S21) Mag(S11) Mag(V(cktA.cktB.3)) dB(TG21) 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),dBm(PO2),P1) where: dBm(PO2)

Output power at port 2 at the fundamental of tone 1.

dBm(PO2)

Output power at port 2 at the intermodulation product.

P1

Input power source (assumed sweep in dBm) at low power levels (prior to compression).

Circuit Response Definitions26-35

12 Harmonic Balance Analysis (HBA)

Harmonic balance analysis is performed using a spectrum of harmonically related frequencies, similar to what you would see by measuring signals on a spectrum analyzer. The fundamental frequencies 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 truncate 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 frequencies (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

Title

Formation of the Harmonic Balance Equations Harmonic 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:

x(t ) =

NH

∑X

k

e jkω ot

k =− NH

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.

Sources and Loads

Linear Subcircuit

Nonlinear Subcircuit

Separation of the linear and nonlinear subcircuits The nonlinear subcircuit contains the active devices whose models compute the voltages and currents 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 voltage 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  dxequations d n xare of the form:

v ( t ) = Φ  x ( t ), , K , n , x ( t − τ ) dt dt     dx d nx i( t ) = Ψ  x ( t ), ,K , n , x ( t − τ ) (2) dt dt  

12-2

Harmonic Balance Analysis (HBA)

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:

Yk Vk ( X ) + Ik ( X ) + Jk = 0 where Jk are the Norton equivalents of the applied generators. This constitutes the harmonic balance equations at each harmonic frequency. The object of the analysis is to find the set of state variables, 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:

Ek ( X ) = Yk Vk ( X ) + Ik ( X ) + Jk 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 Methods The 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 efficient 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 frequency components (=NH for single tone analysis). Now we can write E(X)=0 as a Taylor series expansion truncated after the first derivative term:

E(X) = 0 ≈ E(X (n) ) + J(X (n) ) (X − X (n) ) 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:

X (n +1) = X (n) − J −1 (X (n) )E(X (n) ) 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. Harmonic Balance Analysis (HBA)

12-3

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 intermodulation 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 better 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 Analysis The discussion above was based on single-tone analysis for conceptual simplicity. Multi-tone analysis 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 singletone spectrum is defined as: S1 = k*f0 k=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 circuit. 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 dimension 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 Circuits For 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 conversion gain is determined using small-signal (linear) frequency-conversion methods. This is performed using the Small-Signal Mixer Analysis option (see the next section in this chapter). 12-4

Harmonic Balance Analysis (HBA)

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 components 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 methods), 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 Option The 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 components 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 negligible 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 nonlinearity INTM m

two-tone Full (default)

two-tone Reduced

three-tone Full (default)

three-tone Reduced

3

12

8

31

21

4

20

12

64

31

Harmonic Balance Analysis (HBA)

12-5

Title

5

30

22

115

79

6

42

30

188

115

7

56

44

8

72

56

9

90

74

10

110

90

209

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

Note: #LO is the number of local oscillator harmonics; #SB is the number of RF sidebands Number of Spectral Components (excluding DC) for Three-Tone Mixer analysis

12-6

Harmonic Balance Analysis (HBA)

Title

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

Notes:Entries that have been filled-in can be simulated #LO is the number of local oscillator harmonics; INTM is the intermodulation order The 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 components, 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 spectral 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 Techniques The 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 Harmonic Balance Analysis (HBA)

12-7

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 bandwidth 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 minimal 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 n where 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. DIAG 0 1 2 3 4

Sparse Jacobian block structure.

Iterative Newton Method One 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 12-8

Harmonic Balance Analysis (HBA)

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 factorization 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 maintained. The convergence and power-handling capabilities of conventional harmonic-balance analysis 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 automatically invokes it. A brief summary of the method and its advantages is given: Conventional harmonic-balance computes 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 factorization 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 harmonicbalance 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 improvement factor of 30x. Memory requirements have also been tremendously reduced. The 20 FET circuit 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 Outputs During analysis, Designer generates a number of output files that are used to store textual, graphical and initialization information. The files generated are:

myfile.aud The 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 n where 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 Sources Each 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

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-Parameters Since 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)

Title

parameters. It will depend on the specific application and must be tailored in each case. Presented below is one interpretation: b1(f1) b1(f2) a1(f1)

R1

a.

P1,f1

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

Devic e Under Test

R2 P2,f2

b1(f1) a1(f1)

R1

b.

P1,f1

Devic e Under Test

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

R1

c.

P1,f1

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

Devic e Under Test

R2 P2,f2

a3(f3)

R3

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

P3,f3

Schematic diagram: Generating large-signal S-parameters The 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. Guidelines 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 conversely for a source applied to port 2 [7]. However, this assumes that when the device under test is Harmonic Balance Analysis (HBA)

12-11

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 Sparameters 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 analysis. 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. Nonetheless, 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 repetitive 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 Difficulties The 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 following 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 Jacobian.” 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)

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 subsequent 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 initialization 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-ofthe-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 Nonlinear 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 Analysis of Nonlinear Microwave Circuits Under Multitone Excitation,” IEEE Trans. Microwave Theory 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 Harmonic-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

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 Fterm Fterm := F1 | F2 | F3 optSign := + | - | 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

Comments

NHARM

Number of harmonics for 1tone HB

INTM

Intermod. order for 2- and 3-tone HB

Used for amplifier intermodulation analysis

NLO NSB

Number of LO harmonics for 2tone number of sidebands for 2tone

Mixer case

NLO INTM

Number LO harmonics for 3tone

Used for mixer intermodulation analysis

Intermod. order for 3-tone 12-14

Default

Harmonic Balance Analysis (HBA)

4

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

SWPORD

Defines ordered sweep

OPTION

Name of .OPTIONS statement

none

control options for this analysis

Name of .SVINIT statement

none

initial values for this analysis

SVINI

1

Toggles modulationbased HB if MSPTS > 1

See Note 1

Harmonic Balance Analysis (HBA)

12-15

Title

SWPORD

Defines ordered sweep

TBD

The first entry defines the innermost loop

Notes

12-16

1.

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.

Harmonic Balance Analysis (HBA)

Title

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

HBA, 1-Tone Single 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: NHARM

Number of harmonics to use in the analysis

F1

Frequency of the fundamental tone in the analysis

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 circuits 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 Analysis 1.

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 information 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. Harmonic Balance Analysis (HBA)

12-17

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 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 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.

Noise Spectrum Calculations The 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: 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)

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 12-18

Harmonic Balance Analysis (HBA)

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 Tracing This 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 Parameter

Description

Default

NHARM

Number of harmonics to use in the analysis

Required

F1

Frequency of the fundamental tone in the analysis

Required

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

Netlist Example .HB NHARM=16 F1=1GHz The analysis contains 16 harmonics of the fundamental at 10GHz, plus DC. The frequency spectrum used is {0, 1GHz, 2GHz, 3GHz, ... 16GHz}.

Harmonic Balance Analysis (HBA)

12-19

Title

HBA, 2-Tone, Mixer Two-tone harmonic balance analysis is used for simulating up-conversion in modulators and downconversion 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: 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

Two-Tone Mixer Analysis Spectrum 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 switchmode 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 sidebands of the LO and weak signal (RF) can be assessed. The bounds are then chosen as: m1 = M1m2 = M2 0 ≤ |p| ≤ M1 and 0 ≤ |q| ≤ M2 where 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 by Nt = M1*(2*M2 + 1) + M2 This resulting spectrum (for M1=4, M2=2) is shown in the following figure:

12-20

Harmonic Balance Analysis (HBA)

IF

LO Harmonics

1st Sideband

RF

LO

Title

H3-H2 > = f1-2* d H2-H1 > = f1-d H1+ H0 > = f1 H0+ H1 > = f2= f1+ d -H1+ H2 > = f1+ 2*d

H4-H2 > = 2* f1-2* d H3-H1 > = 2* f1-d H2+ H0 > = 2* f1 H1+ H1 > = 2* f1+ d H0+ H2 > = 2* f2= 2* f1+ 2* d

H5-H2 > = 3*f1-2*d H4-H1 > = 3*f1-d H3+ H0 > = 3* f1 H2+ H1 > = 3* f1+ d H1+ H2 > = 3* f1+ 2* d

H6-H2 > = 4*f1-2*d H5-H1 > = 4*f1-d H4+ H0 > = 4* f1 H3+ H1 > = 4* f1+ d H2+ H2 > = 4* f1+ 2* d

< < < < <

< < < < <

< < < < <

d = f2-f1

f

< < < < <

< H0+ H0 > = 0 < -H1+ H1 > = d= -f1+ f2 < -H2+ H2 > = 2* d = -2*f1+ 2*f2

2nd Sideband

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

To Set Up a 2-Tone, Mixer 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 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 information 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 following:



In the Harmonic Balance Analysis, 2-Tone Mixer Spectrum dialog box, click the Harmonic Balance Analysis (HBA)

12-21

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 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.

Small-Signal Mixer Analysis This 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 singletone LO. This analysis is much faster than two-tone analysis. The program then computes the specified conversion gain using linear frequency conversion methods. For additional information, see Small-Signal Mixer Analysis in the online help topics.

Calculate Noise Figure The 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)

Title

NF31. 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 signal 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-signal” RF drive level.

Harmonic Balance Analysis (HBA)

12-23

Title

Netlist Syntax and Parameters Parameter

Description

NLO

Number of LO harmonics to use in the analysis

Default

Comments 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

Netlist Example Down-Converter Example: VSIN 1 0 V=1.0V HNUM=F1; 1V LO source at F1 VSIN 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 frequency is 50MHz at harmonic number F2-F1. Up-Converter Example: VSIN 1 0 V=1.0 HNUM=F1; 1V LO source at F1 VSIN 2 0 V=0.2 HNUM=F2-F1; 0.2V modulation source at F2-F2 12-24

Harmonic Balance Analysis (HBA)

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 F1 VSIN 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

Title

HBA, 2-Tone, Intermod Two-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 harmonically related frequencies can also be included, if desired. Parameters: 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

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 more frequency components are considered and the longer the calculation time.

Two-Tone Intermod Analysis Spectrum The two-tone analysis spectrum is defined as: S2 = |p*f1 + q*f2| |p|=0,1,,...,m1 |q|=0,1,...,m2 where 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| ≤ INTM INTM 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 algorithm is Nt = INTM * (INTM + 1) In two-tone intermodulation analysis (two RF signals), INTM is the maximum order of intermodulation 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| ≤ INTM The spectrual plot (for INTM = 3) is shown in the following diagram:

12-26

Harmonic Balance Analysis (HBA)

2

Sig na l 2

Up per 3rd Ord er Prod uc t

1

Sig na l 1

Intermodulation Order

Lower 3rd Order Prod uc t

Title

f < H0+ H3 > = 3* f2

< H1+ H2 > = f1+ 2*f2

< H2+ H1 > = 2* f1+ f2

< H3+ H0 > = 3*f1

< H0+ H2 > = 2*f2

< H1+ H1 > = f1+ f2

< H2+ H0 > = 2*f1

< -H1+ H2 > = -f1+ 2*f2

< H2+ H0 > = f2

< H1+ H0 > = f1

< H2-H1 > = 2*f1-f2

< -H1+ H1 > = -f1+ f2

< H0+ H0 > = 0

3

Two-tone intermodulation spectrum for M=3. The vertical axis shows the intermodulation order for each spectral component. 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 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 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 Spectrum dialog box appears. In the Intermodulation Order box, enter the appropriate integer value. For more information, see the previous discussion (Two-Tone Intermod Analysis Spectrum).

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: Harmonic Balance Analysis (HBA)

12-27

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 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. 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 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 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.

12-28

Harmonic Balance Analysis (HBA)

Title

Netlist Syntax and Parameters Parameter

Description

INTM

Order of intermodulation distortion to calculate in the analysis

Default

Comments

3

INTM is usually set to 3 for third-order intermodulation calculations and calculation of IP3. Similarly, set INTM to 5 for fifthorder 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

Netlist Example VSIN 1 0 V=1.0 HNUM=F1 VSIN 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.

Harmonic Balance Analysis (HBA)

12-29

Title

HBA, 3-Tone, Intermod Three-tone harmonic balance analysis for amplifiers is used to analyze the intermodulation characteristics 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 example, 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: 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

Three-Tone, Intermod Analysis Spectrum INTM 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| ≤ Intm where 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:

12-30

Harmonic Balance Analysis (HBA)

Title

Signal 3

1

Signal 2

Signal 1

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.(

2

> > > > > > > > > H3+ H0+ H0 H2+ H1+ H0 H1+ H2+ H0 H1+ H1+ H1 H0+ H3+ H0 H1+ H0+ H2 H0+ H2+ H1 H0+ H1+ H2 H0+ H0+ H3 < < < < < < < < <

> > > > > > H2+ H0+ H0 H1+ H1+ H0 H1+ H0+ H1 H0+ H2+ H0 H0+ H1+ H1 H0+ H0+ H2 < < < < < <

> > > > < H0+ H0+ H1 < -H1+ H2+ H0 < H0-H1+ H2 < -H1+ H1+ H1

< -H1+ H0+ H2 >

> > > > > > > H2+ H0-H1 H2-H1+ H0 H1+ H1-H1 H1+ H0+ H0 H0+ H2-H1 H1-H1+ H1 H0+ H1+ H0 < < < < < < <

< -H1+ H0+ H1 >

< H0+ H0+ H0 > < H0-H1+ H1 > < -H1+ H1+ H0 >

3

f

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

To Set Up a 3-Tone, Intermod Spectrum 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 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 Spectrum dialog box appears. In the Intermodulation Order box, enter the appropriate integer value. For more information, see the previous discussion (Three Tone Intermod Analysis Spectrum).

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 following: Harmonic Balance Analysis (HBA)

12-31

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 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, 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 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.

12-32

Harmonic Balance Analysis (HBA)

Title

Netlist Syntax and Parameters Parameter

Description

INTM

INTM is usually set to 3 for third-order intermodulation calculations, 5 for fifth order, etc.

Default

Comments

Required

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

F3

Frequency of tone 2 in the analysis

Required

Netlist Example VSIN 1 0 V=1.0 HNUM=F1 VSIN 2 0 V=1.0 HNUM=F2 VSIN 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.

Harmonic Balance Analysis (HBA)

12-33

Title

HBA, 3-Tone, Mixer Intermod Three-tone harmonic-balance analysis for mixers is used for simulating the intermodulation distortion in mixers and modulators. The circuit is excited by a LO and two RF signals separated in frequency by 1%, typically. Sources at harmonically related frequencies can also be included, if desired. Parameters: 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)

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 switchmode mixers or mixers that are driven far into saturation, 8 to 16 harmonics may be needed.

Three-Tone Mixer Intermod Analysis Spectrum 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. 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 = INTM 0 ≤ |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 by Nt = 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

12-34

Harmonic Balance Analysis (HBA)

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):

LO Ha rm onic s

1st Ord er 2nd Ord er 3rd Ord er

LO= < H1+ H0+ H0 > L= < -H1+ H2-H1 > IF1= < -H1+ H1+ H0 > IF2= < -H1+ H0-H1 > U= < -H1-H1+ H2 >

RF1= < H0+ H1+ H0 > RF2= < H0+ H0+ H1 >

f

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.

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 Spectrum).

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 following:



In the Harmonic Balance Analysis, 3-Tone, Mixer Intermodulation dialog box, Harmonic Balance Analysis (HBA)

12-35

Title

under Name and Sweep Value, click the blank area near F1: Type the sweep parameters 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 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.

12-36

Harmonic Balance Analysis (HBA)

Title

Netlist Syntax and Parameters Parameter

Description

Default

NLO

Number of LO harmonics to use in the analysis

required

Comments 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

Netlist Example VSIN 1 0 V=1.0 HNUM=F1; LO signal VSIN 2 3 V=0.01 HNUM=F2; RF1 signal VSIN 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 thirdorder intermodulation distortion at baseband. The two RF signals at 1.01GHz and 1.011GHz will Harmonic Balance Analysis (HBA)

12-37

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):

12-38

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 Analysis (HBA)

Title

Solution Options After 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

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)

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 converge 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 Perform 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 onetone 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 derivatives of nonlinear devices in HB analysis. Designer will evaluate the derivatives of nonlinear devices using the numerical method if this box is unchecked.

Harmonic Balance Analysis (HBA)

12-41

Title

HB2 When you select the HB2 tab in the Solution Options dialog, the following dialog is displayed:

The following controls are available:

12-42



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

Harmonic Balance Analysis (HBA)

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 displayed:

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

Title

12-44



Absolute charge solution tolerance sets the charge error tolerace used in transient analysis.



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.

Harmonic Balance Analysis (HBA)

Title

Transient2 When you select the Transient2 tab in the Solution Options dialog, the following dialog is displayed:

The following controls are available:



Relative mag. required for pivoting sets the minimum acceptable pivot ratio used in partial 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 transient analysis. Harmonic Balance Analysis (HBA)

12-45

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 transient 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 displayed:

12-46

Harmonic Balance Analysis (HBA)

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.



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 FSWPNUM 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.

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

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 circuit’s electrical performance. The higher the verbosity number, the more detailed the reportage.

HBA Sweep Options To 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

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 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: 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 Sources Both 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 Variables 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 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

12-48

Harmonic Balance Analysis (HBA)

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 moredimensional tuning curves. For example, a two-dimensional tuning curve can be set up as follows: .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} 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 separated by a comma. .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} will sweep P1, F1, and C1 independently, resulting in 6x11x11 = 726 analysis points.

Harmonic Balance Analysis (HBA)

12-49

Title

12-50

Harmonic Balance Analysis (HBA)

14 Harmonic Balance Oscillator Analysis

Harmonic Balance Oscillator Analysis

14-1

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 frequency 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 displayed. The criteria for the resonant frequency is: Imaginary part = 0 Real part < 0 Only under these conditions does the circuit have the potential to oscillate. Once the resonant frequency is determined, the frequency range is usually narrowed (to about +/- 10%) and an oscillator analysis is performed. . 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.

Example .HBOSC F1=500MHz 700MHz DESIGN=ON The analysis will search between 500MHz and 700MHz to find the resonant frequency where oscillations can be supported.

14-2

Harmonic Balance Oscillator Analysis

Title

Oscillator Option Parameters Three .OPTION parameters are sometimes modified for oscillator design and analysis: 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)

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. Alternatively, 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 frequencies 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

Default

Comments

Harmonic Balance Oscillator Analysis

14-3

Title

NHARM

INTM

NLO NSB

Number of harmonics for 1-tone HB

4

Intermod. order for 2 & 3-tone HB

amplifier case

Number of LO harmonics for 2-tone

mixer case

Number of sidebands for 2-tone NLO INTM

Number LO harmonics for 3-tone

mixer case

Intermod. order for 3tone

14-4

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

SWPORD

Defines ordered sweep

Harmonic Balance Oscillator Analysis

OFF See Notes

Title

Notes Parameter 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

Title

HBOSC, 1-Tone Basic 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. Parameter

Description

NHARM

Number of harmonics used in the analysis

F1

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

This analysis is usually preceded by an oscillator design analysis which identifies the resonant frequency 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 Analysis The oscillator noise analysis option computes the noise spectral power at a discrete set of frequencies 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.

14-6

Harmonic Balance Oscillator Analysis

Title

Parameter

Description

OSCFSTEP

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

FSWPNUM

Number of frequencies to used to search between start and stop 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)

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 Harmonic Balance Oscillator Analysis

14-7

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 appropriate 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 information, 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 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 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.

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

Harmonic Balance Oscillator Analysis

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 information on noise spectral power, see Harmonic Balance, 1-Tone in the online help topics.

Parameters Parameter NHARM

F1

Description Number of harmonics used in the analysis 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)

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 Tracing This 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.

Harmonic Balance Oscillator Analysis

14-9

Title

Netlist Syntax and Parameters for 1-Tone HB Analysis Parameters NHARM

F1

Description

Default

Number of harmonics to use in the analysis

Required

Frequency of the fundamental tone in the analysis

Required

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

Netlist Example .HB NHARM=16 F1=1GHz The analysis contains 16 harmonics of the fundamental at 10GHz, plus DC. The frequency spectrum used is {0, 1GHz, 2GHz, 3GHz, ... 16GHz}.

14-10

Harmonic Balance Oscillator Analysis

Title

HBOSC, 2-Tone, Mixer Oscillator 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 oscillatormixer systems or for the special case of self-oscillating mixers where the RF signal is injected directly into the oscillating device. Parameters: 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

Example VSIN 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 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, “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 Harmonic Balance Oscillator Analysis

14-11

Title

will invalidate the simulation results.) 5.

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

6.

In the No. of LO Harmonics and No. of RF Sidebands boxes, enter appropriate integer values (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 appropriate 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 topics.

9.

Specify F2: To enter the sweep parameters for frequency F2 (required) do either of the following:



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 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, 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 topics. 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 corrective 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

Title

Netlist Syntax and Parameters Parameter

Description

NLO

Number of LO harmonics to use in the analysis

Default

Comments 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

Netlist Example Down-Converter Example: VSIN 1 0 V=1.0V HNUM=F1; 1V LO source at F1 VSIN 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 frequency is 50MHz at harmonic number F2-F1. Up-Converter Example: VSIN 1 0 V=1.0 HNUM=F1; 1V LO source at F1 VSIN 2 0 V=0.2 HNUM=F2-F1; 0.2V modulation source at F2-F2 Harmonic Balance Oscillator Analysis

14-13

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 F1 VSIN 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

Title

HBOSC, 2-Tone, Intermod Oscillator 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 oscillator. Parameter INTM

Description Intermodulation order used in the analysis

F1

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

F2

Set the fundamental frequency for the second tone

Example VSIN 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 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, “HBOSC3Tone2”). Make sure that 2-Tone 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, 2-Tone, Intermodulation SpecHarmonic Balance Oscillator Analysis

14-15

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 appropriate 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 following:



In the Harmonic Balance Oscillator Analysis, 2-Tone, Intermodulation 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, 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 Spectrum 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 topics. 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 corrective 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

Title

Netlist Syntax and Parameters Parameter

Description

Default

Comments

INTM

Order of intermodulati on 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

Netlist Example VSIN 1 0 V=1.0 HNUM=F1 VSIN 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.

Harmonic Balance Oscillator Analysis

14-17

Title

HBOSC, 3-Tone, Intermod Oscillator 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 threetone 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. Parameter INTM

Description Intermodulation order used in the analysis

F1

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

F2

Set the fundamental frequency for the second tone

F3

Set the fundamental frequency for the third tone

Example: VSIN 2 1 V=0.01 HNUM=F2 VSIN 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 oscillator 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 Analysis

14-18

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, “HBOSC3Tone2”). Make sure that 3-Tone Intermodulation Spectrum is selected in the Category list.

4.

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

Harmonic Balance Oscillator Analysis

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 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 appropriate 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 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, 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, 3-Tone, Intermodulation Spectrum 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 topics. 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 corrective action.) 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.

Harmonic Balance Oscillator Analysis

14-19

Title

Netlist Syntax and Parameters Parameter

Description

Default

INTM

INTM is usually set to 3 for third-order intermodulation calculations, 5 for fifth order, etc.

Required

Comments

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

F3

Frequency of tone 2 in the analysis

Required

Netlist Example VSIN 1 0 V=1.0 HNUM=F1 VSIN 2 0 V=1.0 HNUM=F2 VSIN 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.

14-20

Harmonic Balance Oscillator Analysis

Title

HBOSC, 3-Tone, Mixer Intermod Oscillator 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 threetone 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 computed. This analysis can be used to compute mixer intermodulation distortion of complete oscillator-mixer systems or for the special case of self-oscillating mixers where the RF signals are injected directly into the oscillating device. Parameter INTM

Description Intermodulation order used in the analysis

F1

Set the start and stop frequency limits, 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 frequency limits, 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)

Example: Harmonic Balance Oscillator Analysis

14-21

Title

VSIN 2 1 V=0.01 HNUM=F2 VSIN 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 oscillator 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 Analysis

14-22

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, “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 Intermodulation 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 appropriate 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 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. 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 Intermodulation Spectrum dialog box reappears, click Finish.

Harmonic Balance Oscillator Analysis

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 Spectrum 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 topics. 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 corrective action.) 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.

Harmonic Balance Oscillator Analysis

14-23

Title

Netlist Syntax and Parameters Parameter

Description

Default

NLO

Number of LO harmonics to use in the analysis

required

Comments 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

Netlist Example VSIN 1 0 V=1.0 HNUM=F1; LO signal VSIN 2 3 V=0.01 HNUM=F2; RF1 signal VSIN 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 thirdorder intermodulation distortion at baseband. The two RF signals at 1.01GHz and 1.011GHz will 14-24

Harmonic Balance Oscillator Analysis

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

Title

Harmonic Balance Sweeps Swept 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 specification will be preserved only if one specification is used. For example: .HBSSMIX NLO=8 F1=LIN 1GHZ 2GHZ 100MHZ F2=2.1GHZ will 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 Analysis To 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 = 0dBm PORTP 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 Sources Both frequency and RF or DC sources can be swept in a HBSSMIX analysis.

14-26

Harmonic Balance Oscillator Analysis

15 Small-Signal Mixer Analysis

Small-Signal Mixer Analysis

15-1

Title

Overview Small-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 signal applied using a 1-tone harmonic-balance analysis, and then the desired frequency converted signal 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 singletone LO. This analysis is much faster than two-tone analysis. The program then computes the specified 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 operating 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: 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

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:

• • • 15-2

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| Small-Signal Mixer Analysis

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 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 source PORTP 2 0 PNUM = 2 P1 = 10dBm HNUM1 = F1;LO source PORT 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 converted 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 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 NLO

NSB

Description

Default

Comments

Number of LO harmonics

NSB = 1

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

Number of sidebands F1, F2

Fundamental Frequencies (LO & RF)

anaSwpDef

Define swept parameters

none

IFPORT

IF port number

IFHNUM

Harmonic number for IF

RFPORT

RF port number

1

RFHNUM

Harmonic number for RF

F2

3 |F2-F1|

Small-Signal Mixer Analysis

15-3

Title

NOISE

SWPORD

Toggles mixer noise analysis

OFF

Defines ordered sweep

TBD

1st entry defines innermost loop

Notes 1.

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 .HBSSMIX Since 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 2tone 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 CGij

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

15-4

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).

Small-Signal Mixer Analysis

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 only use 1-tone harmonic numbers.

Small-Signal Mixer Analysis

15-5

Title

15-6

Small-Signal Mixer Analysis

16 Load-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 . Loadpull 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 userdefined 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

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 Analysis 1.

On the menu bar, click Circuit and then click Add Solution Setup: The Solution Setup dialog 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

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 additional 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. Follow 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 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 Form .LOADPULL[:name] +TUNER = name [CLUSTER = integer] +[ZRHO = swpDef ] [ZANG = swpDef ] + SIMREF = simCommand

Load-Pull Analysis16-3

Netlist Parameters Parameter

Description

Default

TUNER

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

CLUSTER

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

1

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:name

Comments required

0 only applies to multi-tone analysis

required defines the type of analysis used in the load-pull simulation

HBOSC:name HBSSMIX:name HBOSCSSMIX:name

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

Harmonic Cluster A harmonic cluster is defined as the cluster of spectral components surrounding a particular harmonic 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.

Load-Pull Analysis16-4

For example, in two tone intermodulation analysis with the highest intermodulation order is 5 and F2 > F1: 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

Harmonic Impedances Real world tuners are limited by their ability to control impedances at frequencies besides the fundamental. 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 Parameter TUNER

Description

Default

The name of the referenced tuner (.TUNER)

Required

Netlist form: PTUNER:xxx

n1

n2

TUNER=tuner_name

Netlist Example: PTUNER:1

n1

n2 TUNER=tuner1

Load-Pull Analysis16-5

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 loadpull analysis, but can also be used to insert arbitrary harmonic impedances in a circuit.

Load-Pull Analysis16-6

Specify Tuner for Load Pull

Specify Tuner for Load Pull There are two types of tuners available for load-pull simulation:

• •

Ideal Tuner Double-Slug Tuner

The 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 independently. 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 perform 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 Form The ideal tuner is configured as a variable impedance device at the tuned harmonic cluster. Its impedance is configured as follows: Tuned Frequency Cluster

Ri + jXi

Untuned Frequency Clusters

Rk + jXk , k≠i

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: Parameter

Description

Default

RDEF

Default resistance value for the impedances of all clusters

inf.

Load-Pull Analysis16-7

Specify Tuner for Load Pull

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

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 Z − Zr Γ = Z + Zr

Load-Pull Analysis16-8

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 Form A 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

P2

Magnitude of Γ at the 2nd harmonic cluster

PDEF

A2

Angle of Γ at the 2nd harmonic cluster

ADEF

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

:

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 Tuner The 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-

Specify Tuner for Load Pull

mined by the slug configuration and are not individually controllable. The tuner is nominally configured as: where Z0 and ZS are the characteristic impedances of the corresponding transmission lines. The parameters for the double-slug tuner are 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

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.

Load-Pull Analysis16-11

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 parameter 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 tuning 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

17 DC Nyquist Analysis

DC Nyquist Analysis

17-1

Title

HB Stability Analysis Overview Most 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: 2

K=

2

1 − S11 − S22 + ∆

2

,

2 S12 S21

∆ = S11 S22 − S12 S21

and 2

2

B1 = 1 + S11 − S22 − ∆

2

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:



Determine whether a circuit has a natural frequency in the right-half plane or on the imaginary axis - that is, whether the circuit will oscillate (asynchronous instability)



Determine the approximate frequency of the potential oscillation



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 “regular” 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.

DC Nyquist Stability Analysis

Solution-Path Tracing

17-2

DC Nyquist Analysis

Title

Netlist Syntax and Parameters (.HBSTABILITY) Parameter

Description

Default

Comments

NHARM

Number of harmonics for 1-tone HB

INTM

Intermod order for 2 & 3tone HB

amplifier case

NLO NSB

Number of LO harmonics for 2-tone

mixer case

4

Number of sidebands for 2tone NLO INTM

Number LO harmonics for 3-tone

mixer case

Intermod order for 3-tone F1, F2, F3

Fundamental Frequencies

anaSwpDef

Define swept parameters

TYPE

Select the type of stability analysis to be performed

SWPORD

Defines ordered sweep

none

TBD

1st entry defines innermost loop

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}] DC Nyquist Analysis

17-3

Title

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.

Example .HBSTABILITY:1 NHARM = 8 F1 = DEC 10Hz 10GHz 9 TYPE=DCNYQUIST

Notes Parameter 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.

17-4

DC Nyquist Analysis

Title

DC Nyquist Analysis DC 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 oscillate. This is called Asynchronous Instability because a new frequency is generated that is not synchronized 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 analysis. 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-coupled 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 sufficiently 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 system determinant. The maximum step size can be set by using the third value of linear sweep specification (for example, 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 system equations. This output is complex valued and can be plotted on the polar plane or magnitudeangle 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 useful 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

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 crossings 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 frequencies is actually a stable oscillating point and this is shown below in AC Nyquist analysis.

(A)

4.72GHz

16.9GHz

8.19GHz

(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.

17-6

DC Nyquist Analysis

Title

A

B Figure 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 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. 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

Title

Parameter F1

Description Specifies the frequency range to sweep. The maximum frequency step is set by the third value of a LIN sweep.

TYPE SWPORD

set to DCNYQUIST for DC Nyquist analysis can be used to define multiple analyses as a circuit parameter is swept

Notes 1.

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.

17-8

DC Nyquist Analysis

Title

Solution Path Tracing Some 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 highfrequency circuits that exhibit this type of complex behavior are:

• • • •

Free-running oscillators Injection-locked oscillators Parametric frequency dividers and multipliers Certain types of mixers

The type of change in behavior of these circuits is characterized as synchronous because the frequencies 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 additional 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.

Fundamentals Solution path tracing uses harmonic-balance analysis to trace a locus of solution points to determine 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 frequencies 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 summarized 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

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 Figure 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 excitation 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.

+

E

Pout

Pout C

0

H1 z

A z

Š z

c

Š

D z

b

z

B E

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:

17-10

• •

The analysis begins at 25V where an oscillatory solution exists.



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.

The analysis decreases the bias voltage until it comes to turning point T2 where stability is exchanged.

DC Nyquist Analysis

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.

z T1

z T2

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 10mW Decreasing bias from 25V, when T2 is reached at 3V, the output power jumps from 3mW to 24mW Thus a hysteresis loop is formed.

Source Stepping Sweeping a source in solution path tracing serves two purposes: Detection of turning points Completing the path to a known stable point The 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 tuning (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 = 0 VSIN 1 0 V={V1} FNUM=F1 .HBSTABILITY NHARM=8 F1=1GHz V1=LIN 10.0 0.0 -0.1

DC Nyquist Analysis

17-11

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 = 100mW PORTP 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 Stepping Sweeping 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 locking range of an injection-locked oscillator can be determined using this analysis ( note that an injection-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 direction to achieve a smooth trace around turning and bifurcation points. The largest step will be limited by the increment given. To sweep frequency, set the F1 parameter in the .HBSTABILITY statement (or F2 or F3 for multitone 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 continue until the maximum number of allowed steps is reached as given by the MAXNSTEP parameter 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

Title

Figure 5: Injection-locked oscillator analysis parameterized by frequency.

Tracing Forced-Circuit Responses When 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 parameter of .HBSTABILITY: DCOUTTRACE

Perform solution-path tracing on a forced circuit while examining a DC output response

ACOUTTRACE

Perform solution-path tracing on a forced circuit while examining an AC output response

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 DCOUTTRACE option during this step and examine a DC output (e.g. bias current).

DC Nyquist Analysis

17-13

Title

Note any exchanges of stability as turning points were encountered. As discussed in section Fundamentals, 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 oscillator solution path parameterized by bias using the ACOUTTRACE option.

Figure 6: Injection-locked oscillator solution path Point 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

18 Transient 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 information 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 environment variables that control the analysis and its convolution, are presented in the following sections.

To Set Up a Transient Analysis 1.

On the menu bar, click Circuit and then click Add Solution Setup: The Solution Setup dialog 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 Step

7.

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

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 corrective 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

TSTEP

the time increment for reporting transient simulation results

TSTOP

final analysis time

TSTART

start time to report the analysis results

TMAX

maximum step size used during analysis

SAMPLESTEP

time increment for convolution analysis

UIC

OPTION

use initial conditions specified in the element or a .IC statement.

Default

Comments Only applied to data table and .print

Only applied to data table and print

OFF

For more information, see next section

name of a .OPTIONS statement

Transient Analysis18-2

Transient Initial Conditions

Transient Initial Conditions Netlist Form .IC voltageAssignmentList voltageAssignementList := voltageAssignement [voltageAssignmentList] voltageAssignment := V([cktPath.]nodeName ) = voltageVal Parameter cktPath

Description

Default

Comments

Hierarchical circuit path

Defined above

nodeName

Name of a node

String

voltageVal

Value to assign to the node voltage

Real

Notes 1.

2.

The .IC statement has two different effects depending on whether the value of the UIC keyword 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 specified 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.

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 Control The following environment variables determine analysis control.

Transient Analysis18-3

Convolution Control

Maximum Time Step Allowed Maximum 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 Analysis The Length of Analysis variable defines the total time of analysis.

Convolution Control The following environment variables determine convolution control.

Maximum Sampling Frequency Maximum 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 Frequency Delta Frequency is defined by 1 / Length of Analysis. The corresponding time-domain sampling length is defined by 1 / Delta Frequency.

Default Values The 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 Example Elements 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

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

1 Sweep 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 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).



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 simulation setup sweep dialog.

To Set Up a Circuit Analysis Using a Swept Circuit Parameter 1.

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 dialog box appears. To define the new variable, type its Name, and then type its initial Value

Sweep Options1-1

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 variable 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

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

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, Linear 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 circuit 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 value CAP: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 moredimensional tuning curves. For example, a two-dimensional tuning curve can be set up as follows: .PARAM C1 CAP:1 1 0 .PARAM C2 CAP:2 2 0

= 10pF C={C1} = 5pF C={C2} Sweep Options1-4

Sweeping Bias Sources

.NWA:1 F=1GHz C1= LIN 5pF 15pF 1pF SWPORD=(C1,C2)

C2 = LIN 4pF 6pF 1pF

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 biassource 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 voltage 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 Source 1.

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 dialog 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

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 Properties 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

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

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 definitions 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 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, Parameters, and Examples Sweeping one source: .PARAM V1 = 2V VDC: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 Sources More than one source may be swept at a time. By default, all sources are swept simultaneously (1D sweep). .PARAM V1=2V V2=12V V3=0V

Sweep Options1-8

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

1 Advanced Sweep Options

Advanced Sweep Options1-1

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 procedure applies to for a system design.

To Set Up a Circuit Analysis 1.

2.

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.

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

Sweeping Parameters in a Circuit or System Design

3.

4.

5.

c.

In Properties, make sure that the Parameter Values tab is selected. Locate the appropriate parameter, and then enter the newly-created variable in the Value box.

d.

Click OK to close Properties and return to the schematic.

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 Contents and the Designer Help window appears).

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.

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

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 this analysis

C1 = LIN 5pF 15pF 1pF ; C1 is swept in

.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 moredimensional 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 independently 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 1pF SWPORD={C1,C2}



C1= LIN 5pF 15pF 1pF

C2 = LIN 4pF 6pF

The following analysis sweeps P1, F1, and C1 independently, resulting in 6x11x11 = 726 analysis 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 biassource 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

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 procedure applies to for a system design.

To Set Up a Circuit Analysis Using a Swept Bias Source 1.

2.

3.

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 initial 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.

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.

Set up an analysis: a.

Click Add Solution Setup. The Solution Setup dialog box appears: Advanced Sweep Options1-5

Sweeping DC and RF Sources

4.

5.

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 dialog 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 Contents and the Designer Help window appears).

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.

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 Sweeping 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

Sweeping DC and RF Sources

.PARAM V1 = 2V VDC: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=0V 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

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 braces VSIN 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 Sources Both 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

28 Interpretive User-Defined Models

The Interpretive User-defined model, or IUDM, lets the user model a nonlinear component. Available topics: IUDM Representations IUDM Syntax Frequency Weighting Functions Examples

IUDM Representations The 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 voltages. The equations are specified in time domain. The equations may be specified in either an explicit or an implicit representation.

i2

i1 IUDM

With the explicit representation, the current at port k is specified as a function of the n port voltages i.e. i k = f k ( v 1, v 2, …, v n, i 1, i 2, …, i n ) . The implicit representation uses an implicit relationship between any of the port currents and any of the port voltages i.e. f k ( v 1, v 2, …, v n, i 1, i 2, …, i n ) = 0 .

Interpretive User-Defined Models28-1

IUDM Syntax

The explicit representation is a voltage-controlled representation and can implement only voltagecontrolled 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 Syntax The 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.

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 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

For a given port, the port equation may be of the explicit or implicit form but not both

2.

There must be at least one equation corresponding to each port

3.

Weighting function index 0 and 1 are predefined as indicated below.

4.

Noise currents and noise correlation equations are optional Interpretive User-Defined Models28-2

Frequency Weighting Functions

The pre-defined variables are global and set by the simulator. They cannot be re-defined by the user. _V1 to _V9

Port voltages

_I1 to _I9

Port currents

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 Example IUDM: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) = 0 The 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 Example IUDM:resistor1 1 2 F[1,0] = {_I1 - _V1/10 }

Frequency Weighting Functions The 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.

Interpretive User-Defined Models28-3

Frequency Weighting Functions

For example, to realize the expression i = f(v) + d[g(v)]/dt

(1)

one can use, in the frequency domain I(ω) = F(V(ω)) + H(ω)G(V(ω))

(2)

where H(ω) = jω is the weighting function.

Pre-Defined Weighting Functions Two weighting functions are pre-defined for the most common cases. Weight Index

Scale Factor

0

1

1



User-Defined Functions The .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

• •

Arguments cannot start with a digit and cannot be ReservedKeywords



The use of curly braces to define an expression is optional

.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 .IUDMFUNC Use of variables follow normal scoping rules in .IUDMFUNC, i.e. Parameter usage in .IUDMFUNC will be resolved using the same scope search as performed for .PARAM

Interpretive User-Defined Models28-4

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 Model A 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 displacement 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
VJ I J = I S  exp  ------------------- – 1   V thermal 

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:

V –1 ⁄ 2 C J = C 0  1 – ------J- V bi

where C0 is the zero-bias junction capacitance and Vbi is the built-in voltage. To calculate the current through the capacitor we use

I C = dQ C ⁄ dt J J Interpretive User-Defined Models28-5

Examples

which is equal to

jωQ C

J

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: Cgd G

D Ig2

Ig1

Cgs

Ids

S

The channel current equation is:

αV ds V gs 2 I ds = I dss  1 – ------- tanh  -------------------   V gs – v p Vp  where Vgs and Vds are the intrinsic FET voltages; Idss, Vpo, γ, and α are fitting parameters, and .

V p = V po + γV ds

The capacitances are given (for

V gs < 0.8V bi ) by:

Interpretive User-Defined Models28-6

Examples

V gs – 1 ⁄ 2 C gs = C gs0  1 – ------V bi  and (for

V gd < 0.8V bi ) by: V gd – 1 ⁄ 2 C gd = C gd0  1 – ------ V bi 

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:

I g1 = I sf ( exp ( α f V gs ) – 1 ) I g2 = I sf ( exp ( α f V gd ) – 1 ) 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))) Interpretive User-Defined Models28-7

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

10 Component 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. Hint You 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

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


Related Documents

Circuit Simulator
December 2019 12
Network Simulator
November 2019 14
Cnc Simulator
May 2020 6
Tutorial Simulator
May 2020 10
Routing Simulator
July 2020 5
Circuit
November 2019 43