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

Quasi-Periodic S-Parameter Analysis (qpsp)

Description

The quasi-periodic SP (QPSP) analysis is used to compute scattering and noise parameters for n-port circuits that exhibit frequency translation. Such circuits include mixers, switched-capacitor filters, samplers, phase-locked loops, and the like. It is a small-signal analysis like SP analysis, except, as done in QPAC and QPXF, the circuit is first linearized about a quasi-periodically varying operating point as opposed to a simple DC operating point. Linearizing about a quasi-periodically time-varying operating point allows the computation of S-parameters between circuit ports that convert signals from one frequency band to another. QPSP can also calculate noise parameters in frequency-converting circuits. QPSP computes noise figure (both single-sideband and double-sideband), input referred noise, equivalent noise parameters, and noise correlation matrices. As in QPNOISE, but unlike SP, the noise features of the QPSP analysis include noise folding effects due to the periodically time-varying nature of the circuit.

Computing the n-port S-parameters and noise parameters of a quasi-periodically varying circuit is a two-step process. First, the small stimulus is ignored and the quasi-periodic steady-state response of the circuit to possibly large periodic stimulus is computed using QPSS analysis. As part of the QPSS analysis, the quasi-periodically time-varying representation of the circuit is computed and saved for later use. The second step is to apply small-signal excitations to compute the n-port S-parameters and noise parameters. This is done using the QPSP analysis. A QPSP analysis cannot be used independently, it must follow a QPSS analysis. However, any number of periodic small-signal analyses, such as QPAC, QPSP, QPXF, QPNOISE, can follow a single QPSS analysis.

Unlike other analyses in Spectre, this analysis can only sweep frequency.

Syntax

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

Specifies if the sweep frequency range is an absolute frequency, that is, actual frequency, or if it is relative to the "relharmvec" sideband frequency. In QPSP, relative means relative to the input port frequency. Possible values are absolute and relative.

Port parameters

ports

[...]

List of active ports. Ports are numbered in the order given. For purposes of noise figure computation, the input is considered port 1 and the output is port 2.

sprobes

[...]

List of s-probes.

sprobeharmsvec

[...]

List of sprobe harmonics. Set 2 * fundsize harmonics for each sprobe..

portharmsvec

[...]

List of the reference sidebands for the specified list of ports. Must have a one-to-one correspondence with the 'ports' vector.

harmsvec

[...]

List of sidebands, in addition to ones associated with specific ports by portharmsvec, that are active. Call them secondary.

Output parameters

freqaxis

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

file

Output file name. It just supports S-parameters in PSP, HBSP, and QPSP analysis.

datafmt

spectre

Data format of the S-parameter output file. Possible values are spectre, touchstone and touchstone2.

datatype

realimag

Data type of the S-parameter output file. Possible values are realimag, magphase and dbphase.

noisedata

no

Should noise data be saved to the S-parameter output file; if yes, in what format. If 'twoport' is selected, the first value in the 'ports' vector parameter will be the input and the second one will be the output. Possible values are no and twoport.

Noise parameters

donoise

yes

Perform noise analysis. If oprobe is specified as a valid port, this is set to yes, and a detailed noise output is generated. Possible values are no and yes.

Probe parameters

clockmaxharm

7

In shooting pnoise, the parameter determines the maximum sideband that is included when computing noise, that is either up-converted or down-converted to the output by the periodic drive signal. In HB pnoise, this parameter determines the size of the small signal system when the HB pnoise is performed. This parameter is critical for the accuracy of the HB pnoise analysis. Using a small maxsideband can cause accuracy loss. The default value for the shooting pnoise is 7. For the HB pnoise, the default is the harms/maxharms setting in the HB large signal analysis..

Convergence parameters

tolerance

Tolerance for linear solver; the default value is 1.0e-9 for shooting-based solver and 1.0e-4 for harmonicbalance-based solver.

relativeTol

Relative tolerance for harmonicbalance-based linear solver; the default value is 1.0e-2.

gear_order

2

Gear order used for small-signal integration, 1 or 2.

solver

turbo

Solver type. Possible values are std and turbo.

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.

To specify the QPSP analysis, the port and sideband combinations must be specified. You can select the ports of interest by setting the port parameter and the set of periodic small-signal output frequencies of interest by setting portharmsvec or harmsvec parameter. Sidebands are vectors in QPSP. Assuming that there are one large tone and one moderate tone in QPSS, a sideband K1 is represented as [K1_1 K1_2]. The corresponding frequency is as follows:

K1_1 * fund (large tone of QPSS) + K1_2 * fund (moderate tone of QPSS) = SUM_j=1_to_L{Ki_j * fund_j(qpss)}

It is also assumed that there are L (1 large plus L-1  moderate) tones in QPSS analysis and a given set of n integer vectors representing the sidebands:

K1 = { K1_1,...K1_j..., K1_L } , K2, ... Kn.

If we specify the relative frequency, the scattering parameters at each port are computed at the following frequencies:

f(scattered)= f(rel) + SUM_j=1_to_L{Ki_j * fund_j(qpss)},

Where, f(rel) represents the relative frequency of a signal incident on a port, f(scattered) represents the frequency to which the relevant scattering parameter represents the conversion,  and fund_j(qpss) represents the fundamental frequency used in the corresponding QPSS analysis.

In the analysis of a down-converting mixer with a blocker and of the signal in the upper sideband, sweep the input frequency of the signal coming into RF port. The most relevant sideband for this input is Ki= {1 , 0}, and for IF output, it is Ki= {0 , 0}. Hence, you can associate K1={1 , 0} with the RF port and K2={0 , 0} with the IF port. S21 represents the transmission of a signal from RF to IF, and S11 represents the reflection of the signal back to the RF port. If the signal is in the lower sideband, a choice of K1={-1 , 0} would be more appropriate.

Either portharmsvec or harmsvec can be used to specify the sidebands of interest. If portharmsvec is given, the sidebands must be in one-to-one correspondence with the ports, with each sideband associated with a single port. If sidebands are specified in the optional harmsvec parameter, all possible frequency-translating scattering parameters associated with the specified sidebands on each port are computed.

With QPSP, the frequency of the input and of the response are usually different (this is an important area in which QPSP differs from SP). Because the QPSP computation involves inputs and outputs at frequencies that are relative to multiple sidebands, the freqaxis and sweeptype parameters behave somewhat differently in QPSP than in QPAC and QPXF.

The sweeptype parameter controls the way the frequencies in the QPSP analysis are swept. A relative sweep is a sweep relative to the port sideband (not the QPSS fundamental), and an absolute sweep is a sweep of the absolute input source frequency. For example, with a QPSS fundamentals of 1000MHz (LO) and 966MHz (blocker in RF channel), portharmsvec could be set to [0 1  -1 1] to examine a downconverting mixer. If sweeptype is set to relative with a sweep range of f(rel)=-10MHz<->10MHz. S21 would represent the strength of the signal transmitted from the input port in the range 956->976MHz to the output port to the frequencies 24<->44MHz. Using sweeptype=absolute and sweeping the frequency from 966<->976MHz would calculate the same quantities, because f(abs)=956<->976MHz, and f(rel) = f(abs) - ( K1_1 * fund_1(qpss) + K1_2 * fund_2(qpss) ) = -10MHz<->10MHz; where, K1_1=0, K1_2=1, fund_1(qpss) = 1000MHz, and fund_2(qpss) = 966MHz.

The freqaxis parameter is used to specify whether the results should be output versus the scattered frequency at the input port (in), the scattered frequency at the output port (out), or the absolute value of the frequency swept at the input port (absin).

An increase in the number of requested ports increases the simulation time substantially. The same happens if you increase the number of sidebands to be included in the noise computations.

QPSP analysis also computes noise figures, equivalent noise sources, and noise parameters. The noise computation, which is skipped only when donoise=no, requires additional simulation time.

If:

No = total output noise at frequency f

Ns = noise at the output due to the input probe (the source)

Nsi = noise at the output due to the image harmonic at the source

Nso = noise at the output due to harmonics other than input at the source

Nl = noise at the output due to the output probe (the load)

IRN = input referred noise

G = gain of the circuit

F = noise factor (single side band)

NF = noise figure (single side band)

Fdsb = double sideband noise factor

NFdsb = double sideband noise figure

Fieee = IEEE single sideband noise factor

NFieee = IEEE single sideband noise figure

Then:

IRN = sqrt(No^2 / G^2)

F = (No^2 - Nl^2)/Ns^2

NF = 10*log10(F)

Fdsb = (No^2 - Nl^2)/(Ns^2+Nsi^2)

NFdsb = 10*log10(Fdsb)

Fieee = (No^2 - Nl^2 - Nso^2)/Ns^2

NFieee = 10*log10(Fieee).

When the results are output, IRN is named in, G is named gain, F, NF, Fdsb, NFdsb, Fieee, and NFieee are named F, NF, Fdsb, NFdsb, Fieee, and NFieee, respectively. Note that the gain computed by QPSP is the voltage gain from the actual circuit input to the circuit output, and not the gain from the internal port voltage source to the output.

To ensure accurate noise calculations, the clockmaxharm parameters must be set to include the relevant noise folding effects. clockmaxharm is relevant only to the noise computation features of QPSP.

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 may specify the values that the sweep parameter should take by using the values parameter. If you specify 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