Product Documentation
Spectre Circuit Simulator Reference
Product Version 23.1, September 2023

Envelope Following Analysis (envlp)

Description

This analysis computes the envelope response of a circuit based on the specified analysis clockname, period or fund. If clockname is specified, the simulator automatically determines the clock period by looking through all the sources with the specified name. The envelope response is computed over the interval from start to stop. If the interval is not a multiple of the clock period, it is rounded off to the nearest multiple before the stop time. The initial condition is taken to be the DC steady-state solution, if not given.

Envelope following analysis is most efficient for circuits where the modulation bandwidth is orders of magnitude lower than the clock frequency. This is typically the case, for example, in circuits where the clock is the only fast varying signal and other input signals have a spectrum whose frequency range is orders of magnitude lower than the clock frequency. The down conversion of two closely placed frequencies can also generate a slow-varying modulation envelope.

Envelope following analysis is capable of handling both autonomous (non-driven) and driven (non-autonomous) circuits. Autonomous circuits are time-invariant circuits that have time-varying responses. Therefore, autonomous circuits generate non-constant waveforms even though they are not driven by a time-varying stimulus. Driven circuits require time-varying stimulus to generate a time-varying response. The most common example of an autonomous circuit is an oscillator.

When applied to autonomous circuits, envelope following analysis requires you to specify a pair of nodes, p and n. In fact, this is how envelope following analysis determines whether it is being applied to an autonomous or a driven circuit. If the pair of nodes is supplied, envelope assumes the circuit is autonomous; if not, the circuit is assumed to be driven.

The analysis generates two types of output files, a voltage versus time (td) file and an amplitude/phase versus time (fd) file for each of the specified harmonics of the clock fundamental.

Fast mode envelope analysis is used to simulate RF power amplifier (PA) with I/Q orthogonal modulation. Like normal envelope analysis, the time scale difference between I/Q signals and carrier is very large. Fast envelope analysis has larger speed up performance than normal envelope. Fast envelope has two modes, level1 and level2. Level1 is used to simulate the circuit without memory effect. Level2 has been discontinued. If selected, the simulator will automatically switch to level1. If the circuit has strong nonlinear-memory effect, fast envelope can be inaccurate. In this situation, the only accurate way is to use regular envelope analysis. Fast envelope only outputs the fd result of specified nodes (assigned by the parameter 'output') at harmonic 1 of carrier.

Fast mode envelope analysis is not supported in the Shooting engine; its parameters apply only to the harmonic balance engine.

Syntax

Name  [p]  [n] envlp parameter=value ...

Parameters

Envelope fundamental parameters

clockname

Name of the clock fundamental.

modulationbw

(Hz)

Modulation bandwidth.

resolutionbw

(Hz)

Resolution bandwidth: if set, overwrites the stoptime to be at least 1/resolutionbw.

Simulation interval parameters

stop

(s)

Stop time.

start

0 s

Start time.

tstab

0 s

Initial stabilization time: can be used to change the phase that envelope starts shooting.

period

(s)

Period of the clock fundamental: if set, clockname can be ignored. It is the estimated period for autonomous circuits.

fund

(Hz)

Alternative to period. Frequency of the clock fundamental frequency.

outputstart

start s

Output is saved only after this time is reached.

Time-step parameters

maxstep

(s)

Maximum time step for inner transient integration. Default is derived from errpreset.

envmaxstep

(s)

Maximum outer envelope step size. Default is derived from errpreset.

fixstepsize

no

Use this option to fix envelope step size for speeding up envelope analysis. Possible values are no and yes.

stepsize

4

The number of cycles skipped between two steps when fixstepsize is yes. The time interval between the two steps will be (stepsize+1)*Tc, where Tc is the clock period. For shooting, autonomous, and fm envelope, it is rounded off to an integer.

stepperiod

The interval (in seconds of envelope following time) between two steps when fixstepsize is yes. Should be greater than period of clock. For autonomous FM or shooting envelope, it is rounded off to the nearest integer multiple of clock period.

Initial-condition parameters

ic

all

What should be used to set initial condition. Possible values are dc, node, dev and all.

skipdc

no

If set to yes, there will be no DC analysis for initial transient. Possible values are no and yes.

readic

File that contains initial transient condition.

useprevic

no

If set to yes or ns, use the converged initial condition from previous analysis as ic or ns. Possible values are no, yes and ns.

Convergence parameters

readns

File that contains estimate of initial DC solution.

cmin

0 F

Minimum capacitance from each node to ground.

State-file parameters

write

File to which initial transient solution is to be written.

writefinal

File to which final transient solution is to be written.

swapfile

Temporary file that holds the matrix information used by Newton's method. It tells Spectre to use a regular file, rather than virtual memory, to hold the matrix information. Use this option if Spectre does not have enough memory to complete this analysis, This parameter is now valid only for shooting. It does not apply to harmonic balance..

Envelope Integration method parameters

envmethod

gear2only

Envelope Integration method. Possible values are euler, trap, traponly, gear2, gear2only and trapgear2.

Integration method parameters

method

gear2only

Inner transient integration method. Possible values are euler, trap, traponly, gear2, gear2only and trapgear2.

oscic

default

Oscillator IC method. It determines how the starting values for the oscillator are determined. Possible values are default and lin.

Accuracy parameters

errpreset

moderate

Selects a reasonable collection of parameter settings. Possible values are liberal, moderate and conservative.

relref

Reference used for the relative convergence criteria. Default is derived from errpreset. Possible values are pointlocal, alllocal, sigglobal and allglobal.

lteratio

Ratio used to compute LTE tolerances from Newton tolerance. Default is derived from errpreset.

smoothcheck

yes

When set to no, the smoothness of the envelope is not checked. The skip cycles are as many as possible. If 'fixstepsize=yes', 'smoothcheck' is set to 'no' automatically.. Possible values are no and yes.

itres

1e-2

Relative tolerance for linear solver.

inexactNewton

no

Inexact Newton method. Possible values are no and yes.

steadyratio

Ratio used to compute steady-state tolerances from LTE tolerance. Default is derived from errpreset.

envlteratio

Ratio used to compute envelope LTE tolerances. Default is derived from errpreset.

Annotation parameters

annotate

sweep

Degree of annotation. Possible values are no, title, sweep, status and steps.

title

Analysis title.

Output parameters

harms

If harmonicbalance is set to no, it is the number of clock harmonics to output and the default value is 1. If harmonicbalance is set to yes, it is the maxharm of the clock fundamental and the default value is 3.

harmsvec

[...]

Array of desired output clock harmonics. Alternative form of harms that allows selection of specific harmonics. For multi-carrier envelope, each group of elements with size equal to that of funds is a selection of specific harmonic combinations of fundamental frequencies.

outputtype

both

Output type. Possible values are both, envelope and spectrum.

save

Signals to output. Possible values are all, lvl, allpub, lvlpub, selected, none and nooutput.

nestlvl

Levels of subcircuits to output.

compression

no

Perform data compression on output. Possible values are no and yes.

strobeperiod

(s)

The output strobe interval (in seconds) of envelope following time. For Shooting Envelope, the actual strobe interval is rounded off to an integer multiple of the clock period.

transtrobeperiod

(s)

The output strobe interval (in seconds) of envelope time. The value of the parameter must be less than the cycle period. Those strobe timepoints in all cycles will output when the parameter is working. It is valid for shooting and HB.

Newton parameters

maxiters

5

Maximum number of Newton iterations per transient integration time step.

envmaxiters

Maximum number of Newton iterations per envelope step. For time domain Shooting envelope, the default is 3. For Harmonic Balance Envelope, the default is 40.

restart

no

Restart the DC solution from scratch if any condition has changed. If not, use the previous solution as initial guess. Possible values are no and yes.

Circuit age

circuitage

(Years)

Stress time. Age of the circuit used to simulate hot-electron degradation of MOSFET and BSIM circuits.

fmspeedup

0

The level to speed up the envelope analysis for frequency modulated signal. Default is 0 for standard envelope following and 1 for fmmod sources speed up.

saveinit

no

If set, the waveforms for the initial transient (tstab) before envelope are saved. Possible values are no and yes.

Fast envelope parameters

fastmode

off

This parameter controls the accuracy/performance tradeoffs of envelope analysis. When fastmode=off, a transistor-level accurate envelope algorithm is used. When fastmode=level1 or level2, a block-level envelope algorithm is used that provides faster simulation and lesser memory occupation. Level1 mode provides the fastest operation, but ignores eventual modulation signal memory effects. The latter are accounted by Level2 mode at a little less operation speed.. Possible values are off, level1 and level2.

fastmethod

passband

This parameter applies only in fast envelope mode. The passband method models only magnitude-dependent (AM-AM and AM-PM) effects . The baseband method includes both magnitude- and phase-dependent (PM-AM and PM-PM) effects. Use the passband method when you model PAs. Use the baseband method when the circuit includes transistor-level modulators, demodulators, and generally whenever the output depends both on the magnitude and phase of the input signal. Possible values are passband and baseband.

writeenv

The file to which fast mode envelope data is written. It can be reused by 'readenv' if the circuit remains unchanged, except for the decrease in 'srci' or 'srcq' scale. Can only be used in fast envelope.

readenv

File from which fast mode envelope data is read. It can be used only if the circuit remains unchanged after the file is created, except for the decrease in 'srci' or 'srcq' scale. Can only be used in fast envelope.

srci

[...]

I branch baseband modulation source, whose signal corresponds to the real part of baseband signal. If two sources are assigned, it means that the inputs are differential signals and the first source is positive. Only the pwl type of source is supported. Can only be used in fast envelope.

srcq

[...]

Q branch baseband modulation source, whose signal corresponds to the imaginary part of baseband signal. If two sources are assigned, it means that the inputs are differential signals and the first source is positive. Only the pwl type of source is supported and can be used only in fast envelope.

srcw

[...]

Wireless source. Can be used only in fast envlp currently.

sweepmethod

coarse

This parameter controls the sweep algorithm during the fast envelope circuit characterization. When sweepmethod is coarse, fine, or userdefined, it uses a fixed number of sweep points. When sweepmethod is adaptive, it determines the number of sweep points automatically. coarse uses 7 magnitude points (plus 12 phase points when fastmethod=baseband); fine uses 10 magnitude points (plus 16 phase points when fastmethod=baseband); when sweepmethod=userdefined, use the sweepnum parameter to define the grid. Possible values are coarse, fine, userdefined and adaptive.

sweepnum

[...]

This parameter controls the number of sweep points for fast envelope characterization when sweepmethod=userdefined. When fastmethod=passband, sweepnum is a one-element integer array which sets the number of magnitude sweep points. When fastmethod=baseband, it is a two-element integer array which sets the number of magnitude and phase sweep points. In passband mode, default sweepnum=[7]. In baseband mode, default sweepnum=[7 12]. In most cases, default values are adequate to capture the main and adjacent channel power accurately. Nevertheless, it is recommended to increase sweepnum gradually to ensure that the results do not change. A reasonable strategy is to start at sweepnum=[7 12] and increase to [10 16] until results converge. The upper limit of the magnitude and phase sweep points is [49 48].

output

[...]

Fast mode envelope output nodes. Fast mode envelope only generates fd result ( complex solution of a certain harmonic versus time ) and can be used only in fast envelope.

outputharmonic

[1]

Output harmonic vector in fast mode envelope analysis. Default value is 1.

outputallharms

no

By default, fast mode envlp analysis outputs only one harmonic, as determined by the 'outputharmonic' parameter. When 'outputallharms' is set to 'yes', all harmonics are calculated and sent to output. In addition, when 'outputallharms' is set to 'yes' and the input excitation is single-tone, SpectreRF also calculates and stores the output time domain waveform. This parameter applies to fast mode envlp analysis only. Possible values are no and yes.

Fast envelope noise model parameters

noisemethod

off

This parameter controls the noise model in fast envelope mode. noisemethod does not apply in regular envelope (when fastmode=off). By default, noisemethod=off and the circuit is treated as noiseless. If noisemethod=level1, the noise model is generated from linear noise analysis performed about the DC operating point. If noisemethod=level2, the noise model is calculated from a more rigorous periodic noise analysis. The root-mean-square value of the magnitude of the input signal and the mean of the phase of the input signal, are used as the operating point in periodic noise analysis. The level2 model is preferred in almost all the practical situations. The level1 model is faster to extract and may be useful in certain situations under nearly-linear operating condition. Possible values are off, level1 and level2.

fstart

1k

This parameter sets the starting sweep frequency for the fast envelope noise sweep.

dec

3

This parameter controls the noise frequency sweep for the fast envelope noise model. It is applicable when noisemethod=level1 or level2. When set, the simulator performs a linear or periodic noise analysis around output harmonic, using dec log steps per decade in the frequency interval given by [fstart, 1/(2*Tstep)]. If lin and dec are both specified, log sweep is used and the parameter lin is ignored.

lin

10

This parameter controls the noise frequency sweep for the fast envelope noise model. It is applicable when noisemethod=level1 or level2. When set, the simulator performs a linear or periodic noise analysis around output harmonic, using lin equal steps in the frequency interval given by [fstart, 1/(2*Tstep)].

noisesep

no

This parameter controls BER/EVM/FSKErr calculation in wprobe when noisemethod=level1 or level2 in fast envlp wireless simulation. When set, the simulator provides two sets of data for wprobe to calculate two BER/EVM/FSKErr values. One is impacted only by circuit distortion, the other is impacted by both circuit distortion and noise. Possible values are no and yes.

Wireless fundamental parameters

wsource

Wireless source in envlp analysis. It must be selected within wsource instances.

wprobe

[...]

The wprobe vector in envlp analysis. It is designed to measure evm or ber, and so on.

Harmonic Balance Envelope parameters

funds

[...]

Array of fundamental frequency names for fundamentals that will be used for Harmonic Balance Envelope.

maxharms

[...]

Array of number of harmonics of each fundamental that will be considered for Harmonic Balance Envelope.

freqdivide

Large signal frequency division.

fundfreqs

[...]

Array of fundamental frequencies to use in multi-carrier envelope.

harmonicbalance

no

Use Harmonic Balance Envelope. Possible values are no and yes.

flexbalance

no

The same parameter as harmonicbalance. Possible values are no and yes.

oversamplefactor

1

Oversample sample device evaluations for Harmonic Balance Envelope.

oversample

[...]

Array of oversample factors for each tone for Harmonic Balance Envelope.

Tstab save/restart parameters

saveperiod

Save the tran analysis periodically on the simulation time.

saveclock

1800 s

Save the tran analysis periodically on the wall clock time.

savetime

[...]

Save the analysis states into files on the specified time points.

savefile

Save the analysis states into the specified file.

recover

Specify the file to be restored.

AMS-envlp co-sim parameters

resetenv

no

Use this option to reset envelope data after D2A/A2D events for AMS-envlp co-simulation. Possible values are no and yes.

ignoredclk

no

Use this option to ignore digital clock if the clock rate is in the same order as envelope clock for AMS-envlp co-simulation. Possible values are no and yes.

trancycles

5

The number of transient cycles for AMS-envlp co-simulation. This is the number of cycles around D2A/A2D events' time point. Default value is 5.

envlp-PAC parameters

pacnames

[...]

Names of pac, pnoise, psp, or pxf analyses to be performed at each time point in the pactimes array. Not for AMS.

pactimes

[...] s

Times when analyses specified in pacnames array are performed. Not for AMS.

If period or fund is not specified, the simulator examines all the sources whose name matches the clock name specified in the analysis line by the clockname parameter to determine the clock frequency. If more than one frequency is found, the greatest common factor of these frequencies is used as the clock frequency.

The maximum envelope step size is affected by many parameters. It can be directly limited by envmaxstep. It is also limited by modulationbw. You provide an estimate of the modulation bandwidth. The simulator puts at least eight points within the modulation period. It is recommended that you use strobeperiod to get equally spaced envelope points, which will improve the noise floor in power spectrum density computation.

The harms and harmsvec parameters affect the simulation time in an insignificant way. The spectrum is calculated for all the specified harmonics for all sampled integration cycles as the envelope following analysis marches on. For each harmonic, a file is generated. If harmonicbalance is no, harms is typically set to 1 or 2 because the high-order harmonics are not accurate.

Most parameters of this analysis are inherited from either transient or PSS analysis and their meanings are consistent. However, a few of them need to be clarified. The effect of errpreset on certain envelope following analysis parameters is shown in the following table.

For 'conservative' autonomous envelope, default values for 'method' and 'envmethod' set to 'traponly' to avoid numerical damping of the oscillator.

In this table, T is the period of the clock.

---------------------------------------------------------------------

Parameter defaults as a function of errpreset

---------------------------------------------------------------------

errpreset   maxstep envmaxstep reltol relref steadyratio envlteratio

---------------------------------------------------------------------

liberal   T/20 Interval/10 0.01 sigglobal 0.1 0.35

moderate   T/20 Interval/25 0.001 sigglobal 0.1 3.5

conservative   T/50 Interval/50 0.0001 alllocal 1.0 35.0

The default value for compression is no. The output file stores data for every signal at every timepoint for which Spectre calculates a solution. Spectre saves the X-axis data only once, because every signal has the same x value. If compression=yes, Spectre writes data to the output file only if the signal value changes by at least two times the convergence criteria. To save data for each signal independently, X-axis information corresponding to each signal must be saved. If the signals stay at constant values for large periods of the simulation time, setting compression=yes results in a smaller output data file. If the signals in your circuit move around a lot, setting compression=yes results in a larger output data file.


Return to top
 ⠀
X