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

HB AC Analysis (hbac)

Description

The harmonic balance AC (HBAC) analysis computes transfer functions for circuits that exhibit single or multi-tone frequency translation. Such circuits include mixers, switched-capacitor filters, samplers, phase-locked loops, and so on. HBAC is a small-signal analysis like AC analysis, except that the circuit is first linearized about a periodically or quasi-periodically varying operating point, rather than about a simple DC operating point. Linearizing about a periodically or quasi-periodically time-varying operating point allows transfer-functions that include frequency translation, which is not the case when linearizing about a DC operating point because linear time-invariant circuits do not exhibit frequency translation. In addition, the frequency of the sinusoidal stimulus is not constrained by the period of the large periodic solution.

Computing the small-signal response of a periodically or quasi-periodically varying circuit is a two-step process. First, the small stimulus is ignored and the periodic or quasi-periodic steady-state response of the circuit to possibly large periodic stimulus is computed using HB analysis. As part of the HB analysis, the periodically or quasi-periodically time-varying representation of the circuit is computed and saved for later use. The second step is to apply the small stimulus to the periodically or quasi-periodically varying linear representation to compute the small signal response. This is done using the HBAC analysis. An HBAC analysis cannot be used independently; it must follow an HB analysis. However, any number of periodic or quasi-periodic small-signal analyses, such as HBAC,HBSP, or HBNOISE, can follow an HB analysis.

Modulated small signal measurements are possible using the Analog Design Environment(ADE). The modulated option for HBAC and other modulated parameters are set by ADE. HBAC analyses with this option produce results that can have limited use outside ADE. Direct Plot is configured to analyze these results and combine several wave forms to measure AM and PM response due to single sideband or modulated stimuli. For details, see the 'Spectre Circuit Simulator and Accelerated Parallel Simulator RF Analysis User Guide'.

Note: Unlike other analyses in Spectre, the HBAC analysis can only sweep frequency.

Syntax

Name ... hbac parameter=value ...

Parameters

Sweep interval parameters

start

0

Start sweep limit.

stop

Stop sweep limit.

center

Center of sweep.

span

0

Sweep limit span.

step

Step size, linear sweep.

lin

50

Number of steps, linear sweep.

dec

Points per decade.

log

50

Number of steps, log sweep.

values

[...]

Array of sweep values.

valuesfile

Name of the file containing the sweep values.

sweeptype

unspecified

Specifies if the sweep frequency range is the absolute frequency of input or if it is relative to the port harmonics. When the unspecified value is used, Spectre RF sweeps using relative when autonomous simulation is performed or when the analysis is PSP; for other cases Spectre RF sweeps the absolute value of the input. Possible values are absolute, relative and unspecified.

relharmvec

[...]

Sideband - vector of HB harmonics - to which relative frequency sweep should be referenced.

Sampled analysis parameters

ptvtype

timeaveraged

Specifies whether the PTV analysis will be traditional or sampled under certain conditions. Possible values are timeaveraged and sampled.

sampleprobe

The crossing event at this port triggers the sampled small signal computation.

thresholdvalue

0

Sampled measurement is done when the signal crosses this value.

crossingdirection

all

Specifies the transitions for which sampling must be done. Possible values are all, rise, fall and ignore.

maxsamples

16

Maximum number of sampled events to be processed during the sampled analysis.

extrasampletimepoints

[...]

Additional time points for sampled PTV analysis.

Output parameters

sidevec

[...]

Array of relevant sidebands for the analysis.

maxsideband

7

An alternative to the sidebands array specification, which automatically generates the array: [ -maxsideband ... 0 ... +maxsideband ]. For the shooting analysis, the default value is 7. For HB small signal analysis, the default value is the harms/maxharms setting in the HB large signal analysis. It is ignored in HB small signal when it is larger than the harms/maxharms value of large signal.

freqaxis

Specifies whether the results should be printed as per the input frequency, the output frequency, or the absolute value of the output frequency. Default is absout. . Possible values are absout, out and in.

save

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

nestlvl

Levels of subcircuits to output.

Convergence parameters

tolerance

Tolerance for linear solver. The default value is 1.0e-9 for shooting-based solver and 1.0e-4 for harmonic balance-based solver.

relativeTol

Relative tolerance for harmonic balance-based linear solver. Default value is 1.0e-2.

resgmrescycle

short

Restarts GMRES cycle. Possible values are instant, short, long, recycleinstant, recycleshort, recyclelong and custom.

hbprecond_solver

autoset

Select a linear solver for the GMRES preconditioner. Default is autoset. With autoset, the simulator will automatically select the appropriate precondtioner. The preconditioner affects the rate of convergence of the linear matrix solver used in periodic small-signal analysis. When autoset is selected, the simulator may decide to switch to a different preconditioner after the analysis begins. When that happens, the simulator may issue a warning instructing you to choose a different preconditioner during subsequent runs. Although not required, choosing a different preconditioner according to the simulator's instructions may speed up subsequent analyses. Possible values are basicsolver, blocksolver, autoset, blockdense, blocksolver2 and directsolver.

lowmem

0

Harmonic balance low memory mode; Possible values are 0, 1, or number (>=10). The default value is '0', the low memory mode is turned off; if '1' is set, the standard low memory mode is turned on; If a number no less than 10 is set, Spectre interprets the value as the memory requested in GigaBytes..

krylov_size

200

This parameter is used to set maximum iteration count of the linear matrix solver used in periodic small-signal analysis. After reaching 1.25*krylov_size  iterations, the iteration is forced to terminate because of the poor rate of convergence. Increase the krylov_size if the simulation reports insufficient norm reduction errors in GMRES.

Annotation parameters

annotate

sweep

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

title

Analysis title.

Modulation conversion parameters

modulated

no

Compute transfer functions/conversion between modulated sources and outputs. Possible values are single, first, second and no.

inmodharmnum

1

Harmonic value for the input source modulation.

outmodharmvec

[...]

Harmonic list for the output modulations.

moduppersideband

1

Index of the upper sideband included in the modulation of an output for PAC and HBAC, or an input for PXF.

modsource

Refer the output noise to this component.

perturbation

linear

The type of HBAC analysis. The default is linear for normal HBAC analysis. im2ds stands for im2 distortion summary and ds stands for distortion summary. Value multiple_beat is deprecated and will be removed in the future: use triple_beat instead. Possible values are linear, ds, ip3, ip2, im2ds, multiple_beat and triple_beat.

flin_out

0 Hz

Frequency of linear output signal.

fim_out

0 Hz

Frequency of IM output signal.

out1

NULL

Output signal 1.

out2

NULL

Output signal 2.

contriblist

NULL

Array of device names for distortion summary. When contriblist=[""], distortion from each non-linear device is calculated.

maxharm_nonlin

4

Maximum harmonics of input signal frequency induced by non-linear effect.

rfmag

0

RF source magnitude.

rfdbm

0

RF source dBm.

rf1_src

NULL

Array of RF1 source names for IP3/IP2/IM2.

rf2_src

NULL

Array of RF2 source names for IP3/IP2/IM2.

rf_src

NULL

Array of RF source names for triple beat analysis, triple beat is not supported in shooting engine, PSS must be run before PAC with 'flexbalance=yes' or 'harmonicbalance=yes'.

freqs

NULL

Array of RF source frequencies for triple beat analysis, triple beat is not supported in shooting engine, PSS must be run before PAC with 'flexbalance=yes' or 'harmonicbalance=yes'.

rfampls

NULL

RF source amplitudes; the units are dBm for ports, Voltage for v-sources and Ampere for i-sources.

You can select the set of periodic small-signal output frequencies of interest by setting either the maxsideband or the sidevec parameter. When there is only one tone in HB analysis, sidebands are n integer numbers, K1, K2, ..., Kn, and the output frequency at each sideband is computed as follows:

f(out)= f(in) + Ki * fund(hb)

where f(in) represents the (possibly swept) input frequency and fund(hb) represents the fundamental frequency used in the corresponding HB analysis. Thus, when analyzing a down-converting mixer, while sweeping the RF input frequency, the most relevant sideband for IF output is Ki= -1. When simulating an up-converting mixer, while sweeping IF input frequency, the most relevant sideband for RF output is Ki= 1. By setting the maxsideband value to Kmax, all 2 * Kmax + 1 sidebands from -Kmax to +Kmax are generated.

When there are multiple tones in HB analysis, sidebands are vectors. Consider that you have one large tone and one moderate tone in HB. A sideband, K1, is represented as [K1_1 K1_2]. Corresponding frequency is as follows:

K1_1 * fund(large tone of HB) + K1_2 * fund(moderate tone of HB)

The assumption is that there are L large and moderate tones in HB analysis and a given set of n integer vectors representing the sidebands, K1 = { K1_1, ..., K1_j, ..., K1_L}, K2, ..., Kn. The output frequency at each sideband is computed as follows:

f(out)= f(in) + SUM_j=1_to_L{Ki_j * fund_j(hb)},

where f(in) represents the (possibly swept) input frequency and fund_j(hb) represents the fundamental frequency used in the corresponding HB analysis. Therefore, when analyzing a down-converting mixer, while sweeping the RF input frequency, the most relevant sideband for IF output is  { -1, 0}. When simulating an up-converting mixer, while sweeping IF input frequency, the most relevant sideband for RF output is { 1, 0}. You enter sidevec as a sequence of integer numbers, separated by spaces. The set of vectors {1 1 0} {1 -1 0} {1 1 1} becomes sidevec=[ 1 1 0 1 -1 0 1 1 1]. For maxsideband, only the large tone, which is the first fundamental, is affected by this entry. All the other tones, which are the moderate tones, are limited by maxharms specified for an HB analysis. Given maxharms=[k1max k2max ... knmax] in HB and maxsideband=Kmax, all (2*Kmax + 1)*(2*k2max+1)*(2*k3max+1) *...*(2*knmax+1) sidebands are generated.

The number of requested sidebands changes the simulation time substantially.

With HBAC, the frequency of the stimulus and of the response are usually different (this is an important area in which HBAC differs from AC). The freqaxis parameter is used to specify whether the results should be output versus the input frequency (in), the output frequency (out), or the absolute value of the output frequency (absout).

You can specify sweep limits by specifying the end points, or the center value and span of the sweep. Steps can be linear or logarithmic, and you can specify the number of steps or the size of each step. You can specify a step size parameter (step, lin, log, or dec) to determine whether the sweep is linear or logarithmic. If you do not specify a step size parameter, the sweep is linear when the ratio of stop to start values is less than 10 and logarithmic when this ratio is 10 or greater. Alternatively, you can use the values parameter to specify the values that the sweep parameter should take. If you provide both a specific set of values and a set specified using a sweep range, the two sets are merged and collated before being used. All frequencies are in Hertz.


Return to top
 ⠀
X