You are on page 1of 25

Ansoft designer_help

Set up the RF and DC Sources

Next, we'll set up the RF and DC sources. We want to be able to sweep the RF power and the DC bias, so we need
to set up two parameters, which we can then sweep.

To set up the sources:

1. On the Circuit menu, click Design Properties.

2. Ensure that the Value option is selected.

3. Click the Add button, and then enter this parameter:

Name Value
Pavs 10dBm

4. Click OK to accept the entry.

5. Click the Add button again and enter this parameter:

Name Value
Vbias 0V

6. Click OK to accept the entry.

7. Click OK to close the Properties dialog box.

8. Double-click the left port component.

This opens the Port Definition dialog box, through which you can add sources to the port. The default source type
is Power.

9. Click the Add button to add a source.

Port Voltage Source

You can set up an interface port to be a voltage source for the circuit. To specify a voltage power source value,
select the port and click on the Edit button in the Edit Port field, opening the Port Definition dialog box.

In the Source Definition panel, select Voltage as the Source type. Click Add.

The Source Selection window opens:

Click in the Name field to assign a name other than the default. Port voltage sources can be DC, Pulse, Piecewise
Linear, or Sinusoidal. Sinusoidal is the default. The display above shows the Sinusoidal parameters.

1
Ansoft designer_help

Here are the parameters for the Pulse Voltage Source:

Here are the parameters for the Piecewise Linear voltage source:

Click on the grey box in the List row to open a window for entering the PWL timepoints and corresponding current

values:

You can specify the PWL timepoints and corresponding values in an external file, then link to the file from the
window above. The PWL data file should contain two columns of data. The first column is for the time points, the
second is for the voltage values at the corresponding timepoints. A pound sign (#) on the first line indicates that
there is a header. If a pound sign is found, the code looks for header information. The header information should
contain two strings for: time units; and value units. For example: “# ns mv” sets the time units on the first column of
data to nanoseconds and the units on the second column of data to millivolts. If no # is found then the starts looking
for data, i.e., the header is optional. The three characters “!”, “*”, “;” indicate comments follow on the line (any data
following one of these three characters is ignored). Tabs and spaces are used to separate the columns of data.
Commas are NOT allowed.

Here are the parameters for the DC voltage source:

Assign new values or units to the source parameters in the Parameters window by clicking in the field to
be changed.

When all parameters have been entered, click OK. Place the port as described in the help topic on Interface ports.

The netlist entry for a port current source is similar to the entry for a port power source.

 We'll keep the hnum (harmonic number) property set to f1, signifying that this source will be considered as tone 1
in harmonic-balance analysis.

10. For the value of p, type Pavs.

This sets the source power equal to the value of the Pavs parameter defined earlier.

11. Click OK in the Source Selection dialog box, and then click OK in the Port Definition dialog box.

12. Double-click the voltage source in the circuit.

The Source Selection dialog box opens.

13. Set V to Vbias, and set the name of the source to bias:

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

2
Ansoft designer_help

•  Voltage and current sources can be swept in order to analyze the circuit as a function of a bias-source value (for
example, sweeping the bias to show amplifier gain versus frequency as amplifier bias is swept).

•  The procedure is similar to that for a swept circuit parameter, except that the analysis variables are restricted to
DC voltage or current sources (note that only a voltage or current source can be swept, not a power source).

•  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. 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 Ansoft Designer Help.

2. Now assign the variable to a source:

a. On the Window menu, click the appropriate schematic.

b. Double-click the source to be swept, and its Source Selection dialog box appears.

c. In Source Selection, locate the appropriate parameter, and then enter the new variable in the Value box.

d. Click OK to close Source Selection and return to the schematic.

3. Set up an analysis:

a. Click Add Analysis Setup. The Analysis Setup dialog box appears:

b. In Analysis 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:

3
Ansoft designer_help

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 Ansoft Designer Help (on the Help menu, click Contents and the Ansoft Designer Help
window appears).

4. Run the simulation:

a. On Circuit menu, click Start Analysis. If the circuit is set up correctly, the analysis begins immediately and a red
progress bar appears.

b. If the analysis is not successful, check the Message Window for an explanation, and then take corrective action.

5. Display the results:

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

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

c. For more information, see Generating Reports and Post-Processing in Ansoft 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.

.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

4
Ansoft designer_help

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.

Port Voltage Source

You can set up an interface port to be a voltage source for the circuit. To specify a voltage power source value,
select the port and click on the Edit button in the Edit Port field, opening the Port Definition dialog box.

In the Source Definition panel, select Voltage as the Source type. Click Add.

The Source Selection window opens:

Click in the Name field to assign a name other than the default. Port voltage sources can be DC, Pulse, Piecewise
Linear, or Sinusoidal. Sinusoidal is the default. The display above shows the Sinusoidal parameters.

Here are the parameters for the Pulse Voltage Source:

Here are the parameters for the Piecewise Linear voltage source:

Click on the grey box in the List row to open a window for entering the PWL timepoints and corresponding current
values:

You can specify the PWL timepoints and corresponding values in an external file, then link to the file from the
window above. The PWL data file should contain two columns of data. The first column is for the time points, the
second is for the voltage values at the corresponding timepoints. A pound sign (#) on the first line indicates that
there is a header. If a pound sign is found, the code looks for header information. The header information should
contain two strings for: time units; and value units. For example: “# ns mv” sets the time units on the first column of
data to nanoseconds and the units on the second column of data to millivolts. If no # is found then the starts looking

5
Ansoft designer_help

for data, i.e., the header is optional. The three characters “!”, “*”, “;” indicate comments follow on the line (any data
following one of these three characters is ignored). Tabs and spaces are used to separate the columns of data.
Commas are NOT allowed.

Here are the parameters for the DC voltage source:

Assign new values or units to the source parameters in the Parameters window by clicking in the field to be
changed.

When all parameters have been entered, click OK. Place the port as described in the help topic on Interface ports.

The netlist entry for a port current source is similar to the entry for a port power source.

 Output Quantities

The output quantities can be node voltages or currents through individual elements. For a node voltage, the syntax
is:

V(n1)

The simulator outputs the voltage difference between the specified node name (n1) and ground.

For a current through a branch containing any single device, the syntax is:

I(device_name)

The output includes the current entering the device through each node.

The following .PRINT statement outputs the current through resistor R10 in a harmonic balance analysis:

.PRINT HB I(R10)

The outputs would include the current values Iterminals_0(R1) and Iterminals_1(R1) (see illustration below).

The following statement outputs the current through voltage source VSRC in a transient analysis:

.PRINT TRAN I(VSRC)

The outputs would include the current values Ipositive(VSRC) and Inegative(VSRC) (see illustration below).

To obtain voltage and current output variables within one or more subcircuit levels, use the following syntax:

V(subcircuit1.[subcircuit2.]...[subcircuitn.]element)

I(subcircuit1.[subcircuit2.]...[subcircuitn.]element)

For example, if subcircuit instance XSUB1 contains voltage source V6, the .PRINT statement to output the current
through V6 in transient analysis would be:

.PRINT TRAN I(XSUB1.V6)

6
Ansoft designer_help

If XSUB1 is an instance of a subcircuit whose definition includes a node N25, the .PRINT statement to output the
voltage through node N25 in transient analysis would be:

.PRINT TRAN V(XSUB1.N25)

If subcircuit instance XSUB1 contains a nested subcircuit instance XSUB2 which in turn includes NMOS MOSFET
M23, the .PRINT statement to output the current through D23 would be:

.PRINT TRAN I(XSUB1.XSUB2.M23)

The outputs would include the current values Isource(M23), Igate(M23), and Idrain(M23).

The illustration below shows the directions of the current values for the resistor, voltage source, and
MOSFETexamples given earlier.

Sweeping Bias Sources

•  An arbitrary circuit variable is defined, added to the Variables drop-down list box, and then used during circuit
analysis and sweeping.

•  Note that when a swept parameter assigns a value, only the original value is used (in other words, the sweep
values will be ignored).

•  Voltage and current sources can be swept in order to analyze the circuit as a function of a bias-source value (for
example, sweeping the bias to show amplifier gain versus frequency as amplifier bias is swept). The procedure is
similar to the sweeping of circuit parameters, except that the analysis variables are restricted to DC voltage or
current sources (note that only a 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 gnnerate 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):

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:

7
Ansoft designer_help

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 Analysis Setup.
The Analysis 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 Ansoft Designer Help window appears.)

9. In Analysis 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 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 (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

8
Ansoft designer_help

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

2. The Analysis 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:

•  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, 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:

9
Ansoft designer_help

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 Analysis Options, and the Analysis 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 Analysis Options in Ansoft 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 Ansoft 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 Ansoft Designer Help.

Netlist Parameters and Syntax

.NWA[:name] F = SwpDef [GD = ON | OFF] [PERT = cval]


+ [anaSwpDef]
+ [SWPORD = {anaSwpOrderDef}]

Parameter Description Default Comments


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 none When sweeping bias sources, the only parameters
parameters. that can be swept are voltage (V) and current (I)
for the DC sources

10
Ansoft designer_help

anaSwpOrderDef The values that define the order in


   
which the parameters get swept.
SWPORD 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. Parameter keyword values in the Linear Network Analysis command (.NWA) can be algebraic expressions or
simple parameters. But an expression must be evaluated prior to analysis. (In other words, the keyword parameter
cannot be dependent on an analysis variable, for example, "F.")

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.

11
Ansoft designer_help

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

DC Analyses with Sweeps

This example performs DC analyses while sweeping the DC voltage of source VIN from zero to 5 Volts in
increments of 1 Volt.

.DC SWEEP VIN DC START=0.0 STOP=5.0 STEP=1.0

This example performs DC analyses while sweeping two DC voltages: VIN from zero to 5 Volts in increments of 1
Volt, and VREF from zero to 1 volt in 5 increments.

.DC SWEEP VIN DC START=0.0 STOP=5.0 STEP=1.0 VREF DC LIN 5 0 1

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 NPORT component is included in the circuit and references the .NPORTDATA statement.

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 Ansoft Designer Help.

To Set Up a Steady-State Time Domain Analysis

1. On the Circuit menu, click Add Analysis Setup. .

12
Ansoft designer_help

2. The Analysis 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:

a. In the Period text box, type the time duration (“time window”) for the simulation.

b. In the Time Step text box, type the time increment to be used for analysis.

c. Make sure that the correct units are selected for each parameter.

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

8. Optional: To customize the analysis (for example, to add Verbose mode):

a. Click Analysis Options, and the Analysis 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 Analysis Options in Ansoft Designer Help.

9. Optional: To sweep a predefined variable, do either of the following:

•  In Linear Network Analysis, Steady-State TimeDomain,

a. Click Add, and the Add/Edit Sweep dialog box appears.

b. In the Variable list, make sure that F is selected (default value), and then select one of the following: Single
value, Linear step, Linear count, Decade count, Octave count, or Exponential count.

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

d. Click Add, and then click OK to close the Add/Edit Sweep dialog box.

e. When Linear Network Analysis, Steady-State Time Domain reappears, click Finish.

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

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

13
Ansoft designer_help

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

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

Netlist Syntax and Parameters

.NWA[:name] TIME Window Increment


+ [anaSwpDef]
+ [SWPORD = {anaSwpOrderDef}]

Parameter Description Default Comments


TIME The TIME keyword takes two real values:
   
Window and Increment
Window Time window of analysis ("period"): The period
   
between impulses or step leading edges.
Increment Time increment of analysis ("sample rate"): The
lowest frequency in the analysis is determined
by Window and the highest frequency is
determined by Increment.    

 
anaSwpDef Definition of swept parameters none When sweeping bias sources, the
only parameters that can be swept
are voltage (V) and current (I) for the
DC sources
anaSwpOrderDef The values that define the order in which the
   
parameters get swept.
SWPORD Defines ordered sweep The first entry defines the innermost
 
loop

14
Ansoft designer_help

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

Create Graphs of Results

With the analysis completed, we will create three graphs:

•  Port 2 DC voltage at versus Pavs

•  Time-domain voltage waveform across the diode for each value of Pavs

•  Time-domain current waveform into the diode for each value of Pavs

To create the graph of Port 2 DC voltage versus Pavs:

1. In the project tree, right-mouse click this project’s Results icon, and then select Create Report.

The Create Report dialog opens.

2. Click OK.

3. Select the following in the Traces dialog:

Domain Sweep
Category Voltage
Quantity V2<DC>
Function re

15
Ansoft designer_help

You must graph the real part of V2<DC> quantity because all harmonic phasor quantities are handled as complex
numbers, including their DC components.

4. Click Add Trace.

5. Click Done.

You should see the following graph:

For this picture, we have renamed the graph by selecting its icon in the project tree, right-clicking, selecting
Rename, typing a new name, and pressing ENTER.

To view the linear region (in the logarithmic sense) of the detector's operation, change the Y axis scaling to
logarithmic:

1. Double-click the Y axis to open the Y Axis Properties dialog box.

2. Select the Rescale tab, and then click Log.

3. Click OK.

The rescaled plot should look like this:

The linear region extends to about 5dBm.

To create the graph of time-domain voltage waveform across the diode for each Pavs:

1. Start creating a standard, rectangular 2D report as described earlier.

2. In the Traces dialog box, select the following settings:

Domain Time
Category Voltage
Quantity Vac(D1)
Function none

3. Click Add Trace.

4. Click Done.

The resulting graph should look like this:

The graph clearly shows the clipping of the voltage across the diode at higher power levels. On the graph legend on
the right-hand side, you can select the line for each level of Pavs, from -10 dbm to 10 dbm, and it will be highlighted
on the graph. You can scroll down through the Pavs levels by clicking the black rectangle at the top of the legend
window. The legend window can also be resized by clicking the vertical divider and be moved left and right across
the Results window.

To create the graph of the time-domain current waveform into the diode for each Pavs:

16
Ansoft designer_help

1. Right-mouse click the Results icon, select Create Report, and then click OK.

2. Select the following in the Report dialog:

Domain Time
Category Current
Quantity Ia(D1)
Function none

3. Click Add Trace.

4. Click Done.

The resulting graph should look like this:

The forward current through the diode is clearly visible during the time intervals in which the diode voltage is
positive. The negative current and initial rise in forward current are due to energy storage

Displaying Discrete Time Simulation Results

For discrete time simulations, results may be viewed in one of the following domains in the Reporter:

1. Sweep Domain

2. Time Domain (Standard, Constellation, Eye Diagram and Statistical report types)

3. Spectral Domain

Obtaining measurements for discrete time analysis always involves the use of probes. As you may expect, some
probes are only applicable to the Sweep Domain. Examples of such probes include the BERP and ACPRP probes
(since the BER and ACPR responses are typically plotted against some swept parameter). On the other hand, signal,
voltage, and power probes are applicable only to the Time and Spectral Domains, since the response obtained from
these probes is typically plotted against time or frequency. Time and Spectral displays may also be viewed for
different swept values. A special class of probes provides statistical displays of time domain signals, such as
histogram and CCDF probes.

Currently, the following probes are available:

1. ACPRP: Adjacent Channel Power Ratio Probe (Sweep Domain). See cdmaffwd example.

2. AVGPP: Average Power Probe (Sweep Domain)

3. BERP: Bit Error Rate Probe (Sweep Domain). See gsm example.

4. CCDFP: Complementary Cumulative Distribution Function Probe (Statistical Time Domain)

5. CDFP: Cumulative Distribution Function Probe (Statistical Time Domain)

6. CFP: Crest Factor Probe (Sweep Domain)

17
Ansoft designer_help

7. EVMP: Error Vector Magnitude Probe (Sweep Domain)

8. FTRAJP: Frequency Trajectory Probe (Time Domain) for tracking frequency changes in a PLL. This probe may
be connected to the output of a VCO. See pll example.

9. HISTP: Histogram Probe (Statistical Time Domain)

10. PAPP: Peak-to-Average Power Probe (Sweep Domain)

11. PDFP: Probability Density Function Probe (Statistical Time Domain)

12. PP: Power Probe (Time and Spectral Domains). See comrec example.

13. PSDP: Power Spectral Density Probe (Spectral Domain). See cdmaffwd example.

14. RMSP: Root Mean Square Probe (Sweep Domain)

15. SNDP: Signal to Noise and Distortion Probe (Sweep Domain).

16. SP: Signal Probe (Time and Spectral Domains). See gsm, cdmaffwd, pll and am examples.

17. VP: Voltage Probe (Time and Spectral Domains). See comrec and cdmaffwd examples.

18. IP: Current Probe

19. PNP: Phase Noise Probe. See Motorola_Fractional_Synthesizer example.

For more information on the measurements obtained by each probe, please refer to the individual probe component
help sections.

Once the signal analysis is performed, the user should be able to bring up the Create Report editor to display the
results for the Standard, Constellation, Eye Diagram or Statistical Reports. After selecting the solution (analysis) of
interest and one of the available domains (Time, Spectral or Sweep) from the Domain field, the user can select the
probe responses available for display from the Quantity field of the editor. Once a specific probe response is
selected, a list of functions and units in the Function field will be displayed. The user can then view the probe
response in any of the forms available in the Function list.

Add a Sweep of the Bias Voltage

1. Double-click the HB1Tone1 analysis setup to open the Harmonic Balance Analysis, 1-Tone dialog.

2. Click Add.

3. In the Variable list, select Vbias.

4. Specify a Linear Step sweep:.

Start 200mV

18
Ansoft designer_help

Stop 200mV
Step 100mV

5. Click Add, and then click OK.

The graph is now the original graph of current into the diode, which shows a linear frequency, a power sweep, and a
voltage sweep.

6. Right-click the HB1Tone1 icon, and then select Analyze HB1Tone1.

7. Click the V2<DC> graph to bring it to the top, right-click in the graph, and then select Modify Report.

8. Click the trace definition at the top of the dialog to select the trace.

9. Click the Sweeps tab. If you don't see a Vbias entry, reselect the Solution entry for HB1Tone1 to update the
listing.

10. Click the Apply To All Selected Traces button to update the trace with the new sweep information.

11. Click Done.

You should see a set of curves now, but the axis changed back to a linear scale. This is because some of the data is
negative and cannot be plotted on a logarithmic scale. To remedy this, we can define a function that avoids negative
voltages.

a. Right-mouse click on the graph and select Modify Report.

b. Enter the following expression in place of re(V2<DC>):

if(re(V2<DC>) < 1e-6, 1e-6, re(V2<DC>))

The IF function tests the condition in the first argument and if true, returns the value of the second argument;
otherwise, it returns the value of the third argument. This expression states, “If re(V2<DC>) is less than 1E6 (1
microvolt), then let the value be 1E6, otherwise use re(V2<DC>).”

c. Click Done.

Now we can apply the log scaling to obtain this graph:

Diode, Enhanced SPICE Diode Model (DIODES)

Instance Parameters

Properties Description Units Default Range


MOD Model name corresponding to the .MODEL block.      
AREA Area multiplier   1.0  

19
Ansoft designer_help

TJ Junction temperature deg Cel 25  


HARM State variable reduction none FULL {DC|DCF|FULL}
VDT0 Initial junction voltage for transient analysis V 0  

Intrinsic Model Keywords

Properties Description Units Default Range


IS Saturation current A 1.0E-14  
N Emission coefficient   1.0  
IKF High injenction knee current A 1.0E37 0
IBV Magnitude of current at the reverse breakdown voltage A 1.0E-10  
BV Magnitude of the reverse breakdown voltage V inf.  
ISR Recombination current parameter A 0  
NR Emission coefficient for Isr   2  
NBV Reverse breakdown ideality factor   1  
NBVL Low-level reverse breakdown ideality factor   1  
IBVL Low-level reverse breakdown knee current A 0  
T Transit time constant sec 0.0  
RS Series resistance Ohm 0.0  

Capacitances

CJ0 Zero-bias PN junction capacitance F 0.0  


FC Coefficient for forward-bias depletion capacitance   0.5  
VJ Built-in junction potential V 1.0  
M PN junction grading coefficient   0.5  
GC1 Varactor capacitance polynomial coefficient 1 /V 0.0  
GC2 Varactor capacitance polynomial coefficient 2 /V2 0.0  
GC3 Varactor capacitance polynomial coefficient 3 /V3 0.0  

Temperature Coefficient Keywords

Properties Description Units Default Range


TNOM Reference temperature deg Cel 25  
XTI IS temperature exponent   2.0  

20
Ansoft designer_help

EG Barrier height at reference temperature V 0.8  


TBV1 BV temperature coefficient (linear) /deg Cel 0  
TBV2 BV temperature coefficient (quadratic) /deg2 Cel 0  
TRS1 RS temperature coefficient (linear) /deg Cel 0  
2
TRS2 RS temperature coefficient (quadratic) /deg Cel 0  
TIKF IKF temperature coefficient (linear) /deg Cel 0  

Noise Properties

NOISE Noise model name      


KF Flicker noise coefficient   0.0  
AF Flicker noise exponent   1.0  
FCP Flicker noise frequency shape factor   1.0  
SN Switch to turn device shot noise on or off (1 or 0)   1  

DC I-V Plot Properties

Properties Description Units Default Range


IMAX Maximum forward and reverse current for the DC I-V curves A 0.0  

Limitations

1.

Model Notes

1. The transit-time parameter, TT, can also be used to approximate the reverse-recovery time of a diode.

2. Diode breakdown can be modeled by specifying IBV and BV parameters.

3. The reverse-bias capacitance characteristics can be more accurately modeled than the common expression derived
from PN junction theory. The capacitance grading coefficient exponent can be expressed as a polynomial function of
voltage by specifying values for GC1, GC2, and GC3.

Area effects

Id = AREA  Id

Cj = AREA  Cj

21
Ansoft designer_help

Rs = Rs / AREA

Device Equations

All components of the equivalent circuit are assumed to be functions of the junction voltage Vj. This voltage is
automatically selected by the program as the only state-variable for the microwave diode model. The following
expressions are used:

Vj = intrinsic junction voltage state variable

Vt = k TJ/q (thermal voltage)

k = Boltzmann’s constant

q = electron charge

TJ = analysis temperature (Kelvins)

Temperature Effects

Noise Model

1. See section below on diode noise modeling

Form

D@ID %0 %1 *MOD(@MOD) *AREA(@AREA) (*RS(RS=@RS) *TJ(TJ=@TJ) *TNOM(TNOM=@TNOM)


*XTI(XTI=@XTI) *EG(EG=@EG) *M(M=@M) *T(T=@T) *IS(IS=@IS) *N(N=@N) *CJO(CJO=@CJO)
*VJ(VJ=@VJ) *FC(FC=@FC) *BV(BV=@BV) *IBV(IBV=@IBV) *IMAX(IMAX=@IMAX)
*GC1(GC1=@GC1) *GC2(GC2=@GC2) *GC3(GC3=@GC3) *NOISE(NOISE=@NOISE) *FCP(FCP=@FCP)
*KF(KF=@KF) *AF(AF=@AF) *SN(SN=@SN) *HARM(HARM=@HARM) *ISR(ISR=@ISR) *NR(NR=@NR)
*NBV(NBV=@NBV) *NBVL(NBVL=@NBVL) *IBVL(IBVL=@IBVL) *IKF(IKF=@IKF)
*TBV1(TBV1=@TBV1) *TBV2(TBV2=@TBV2) *TRS1(TRS1=@TRS1) *TRS2(TRS2=@TRS2)
*TIKF(TIKF=@TIKF) *VDT0(VDT0=@VDT0))

Examples

1. Using only the diode parameters

D1 1 2 IS=1pA N=1.5 KF=1E-12 CJ0=2pF RS=2.0

2. Using the diode model

D1 1 2 MOD=PIN1

22
Ansoft designer_help

.MODEL PIN1 D(IS=1pA N=1.5 KF=1E-12 CJ0=2pF

+ RS=2.0)

References

1. P. Antognetti and G. Massobrio, ED., Semiconductor Modeling with SPICE, McGraw-Hill, N.Y., 1988.

Diode Noise Modeling

The noise model for the diodes consists of two contributions: the shot noise and the flicker noise. The shot noise is
computed automatically and does not require any parameters. It can be turned off by specifying SN=0 in the model
parameter list. The flicker noise can be specified in two ways:

1. Using the enhanced SPICE noise model by specifying KF, AF, and FCP in the model parameter list (this option is
usually sufficient for most applications)

2. Using bias-dependent flicker noise coefficients through a reference in the DATA block (specifying KF and AF at
multiple bias points)

Specifying the Bias-Independent Flicker Noise Coefficient

Option 1 is the straightforward specification of KF, AF, and FCP that are constant with bias, as in the SPICE noise
model (the flicker noise is considered bias dependent as shown in the noise model below). For example:

DIODEM:NAME 1 2 IS=1.0pA KF=1.0E-12 AF=2.0 FCP=1.0

Specifying The Bias-Dependent Flicker Noise Coefficient or Flicker Corner Frequency

Option 2 allows a bias-dependent flicker noise coefficient (i.e. KF and AF varies with diode current). The diode
noise model data is given in the NOISEDEVICE block and referenced by the model parameter NOISE. For
example:

DIODES:NAME 1 2 IS=1.0pA NOISE=label

The user-defined noise label is defined using one of the following forms:

To specify the flicker noise coefficient factor, use:

.NOISEDEVICE label [FCP=val]

ID=val [KF=val AF=val]

[ID=val KF=val AF=val]

.ENDNOISEDEVICE

To specify the flicker noise corner frequency, use:

.NOISEDEVICE label [FCP=val]

23
Ansoft designer_help

ID=val [FC=val AF=val]

[ID=val FC=val AF=val]

.ENDNOISEDEVICE

.NOISEDEVICE Block Diode Noise Model Keywords Keywords

Properties Description Units Default Range


label User-defined label none Required  
ID Bias current for the data point A Required  
KF Flicker noise coefficient none 0.0  
AF Bias exponent of the flicker none 1.0
 
noise model
FCP Frequency exponent of the none 1.0
 
flicker noise model
FC Flicker noise corner frequency Hz    

Noise Model

The noise generators in the diode noise model are the series parasitic resistance, Rs, and the intrinsic junction. The
figure below illustrates the intrinsic junction noise generator. Let f be the bandwidth (usually normalized to 1Hz).
The intrinsic noise generator has a mean-square value of:

NOTES ON THE NOISE MODEL

1. Shot noise is always present unless the SN parameter is set to zero. Turning noise off is useful for comparing the
total circuit noise that is generated by the nonlinear devices and that generated by the linear circuit components.

2. If the value of KF is specified as zero, then the flicker noise will not be contributed by the device and only shot
noise is considered in the intrinsic model.

3. The corner frequency noise model option in the .NOISEDEVICE block uses the system noise floor to internally
compute the flicker noise coefficient, KF. The system noise floor is computed by the program using the diode
parameters and kT.

4. Up to 36 noise data points in the .NOISEDEVICE block can be used to model the flicker noise coefficient bias
dependency.

5. If the NOISE parameter is specified, the SPICE noise model (defined by KF and AF in the model parameter list)
will be ignored.

6. If KF and AF are not bias dependent (as in the SPICE noise model), specify these parameters in the model
parameter list and not through the NOISE parameter reference of the .NOISEDEVICE block.

24
Ansoft designer_help

25

You might also like