Linear N Port (nport)
An N-port takes its characteristics from an S, Y, or Z-parameter data file. An N-port can have as many ports as described in the data file. Each pair of terminals in the `nport' instance statement represents one port. Because there is no limit to the number of ports, there is no limit to the number of terminals. However, the terminals must be specified in pairs and you must specify at least one pair. The order of the pairs is the same as the order of the ports in the data file. Any missing ports are ignored.
The S, Y, or Z-parameter data file specifies the characteristics of the N-port. You can scale the frequency axis with the scale parameter. The frequencies in the data file are then multiplied by scale before the simulator uses them. The default scale factor is unity. In addition to Spectre's native format, the S, Y, or Z-parameters can be in Touchstone or CITIfile format, and the data can be given as: real-imag, mag-deg, mag-rad, db-deg, or db-rad.
An internal thermal noise model is used in noise analysis. However, if you provide frequency-dependent noise data, this data is used to build a noise model. Currently, the Touchstone format accepts the two-port noise parameters (NFmin, Gamma (Gopt, Bopt) and Rn), while Spectre's native format accepts both two-port noise parameters and noise correlation matrix.
If interp=linear or spline is specified, the impulse response is calculated and the convolution-based method is used for simulation in the time domain. It is assumed that the S, Y, or Z-parameter data is complete and smooth enough to be safely interpolated or extrapolated in the frequency range from fdelta to fmax, and to DC. N-port can be used to model different kinds of systems. The default setting of the impulse response and convolution algorithm is made for typical N-port applications. See the notes below on when and how to set some of the controlling parameters.
Linear interpolation or cubic spline is used for data in polar form. A simple algorithm removes 2 pi jumps in the phase data. Frequency points where the data is measured must therefore be close enough to avoid an excessive number of jumps. Unfortunately, noisy phase data can cause unnecessary warning messages. The number of frequency domain samples used for FFT is fmax/fdelta with the upper limit of maxn. It might be necessary to increase maxn for extremely large average group delays. When usewindow is set to yes, the data in the frequency domain is multiplied by the Kaiser-Bessel window function with smoothing parameter set to one.
If interp=rational is specified, the data is interpolated and extrapolated using a rational function fit to the data. The degree of rational interpolation is automatically selected based on the values of abserr and relerr, unless ratorder is given, in which case relerr and abserr are ignored in selecting the order of the rational function interpolation. It is recommended to allow the simulator to automatically select the rational interpolation order.
When interp=bbspice and nport_bbspice_to_linear=yes are specified, then if:
- bbspice fails, interpolation method will switch to linear for all analysis.
- bbspice gives large fitting error, interpolation method will switch to linear for dc, ac, xf, sp, noise, stb analyses, and hb analysis on HB Newton stage.
If the S, Y, or Z-parameter data contains noise, abserr and relerr should be set so that the fitting procedure can ignore the noise, for example, by setting abserr above the noise floor and/or relaxing relerr as necessary.
Because the fitting procedure can take a long time for complicated data, the reduced order model (ROM) file option is available to store and re-use the rational interpolation function in subsequent simulations.
It is not practical to rely on extrapolated data.
If the matrixform parameter is set to yes, nport becomes a state-space model. A state-space model is a set of state space equations in matrix form describing a linear system. The equations are in the following form:
where u is the input vector, y is the output vector, and x is the internal-state vector. A, B, C, D, E, and K are coefficient matrices.
Refer to the notes on state-space models for detailed information on how to use the parameters.
Sample Instance Statement
x1 (a1 0 b1 0 b3 0) ndata file="sparam2.data"
Sample Model Statement
model ndata nport file="sparam.data" scale=1
This device is not supported within altergroup.
Synopsis
Name t1 b1 [t2] [b2] ... ModelName <parameter=value> ...
Name t1 b1 [t2] [b2] ... nport <parameter=value> ...
Terminals must be given in pairs.
Model Synopsis
model ModelName nport <parameter=value> ...
Instance Parameters
Spline/Linear interpolation parameters
Passivity checking and enforcement parameters
Causality correction parameters
Rational interpolation parameters
Noise parameters
Matrixform state-space model parameter
Related Topics
Important note about spline and linear interpolation parameters
Model Syntax
model modelName nport parameter=value ...
Model Parameters
Spline/Linear interpolation parameters
Passivity checking and enforcement parameters
Causality correction parameters
|
Correct the S-parameter data to ensure that the system is causal. The default value is |
Noise parameters
Matrixform state-space model parameter
Related Topics
Important note about spline and linear interpolation parameters
Important note about spline and linear interpolation parameters
To calculate impulse response, either linear or spline interpolation is used to sample data points in the frequency domain, based on the S-parameter data file. When the input data points are sufficient, linear and spline interpolation produce comparable model accuracy. However, when the input data points are scarce, linear interpolation is preferred to bound jumps between data points. Interpolation/extrapolation can be avoided all together if the S-parameter data is provided from zero frequency to fmax with uniform step fdelta, and number of samples is a power of 2.
The default value of fmax is three times the highest frequency in the S-parameter data file. Impulse response is calculated by sampling frequency points between DC and `fmax'. The purpose of this extrapolation is to preserve high-frequency model accuracy. However, if you have enough bandwidth in the S-parameter data file, `fmax' needs to be set to the original highest frequency in the S-parameter data file. In general, fmax must be larger than the expected signal bandwidth.
Frequency sampling interval automatically calculated by the simulator. If causality=no, it is the default of fmax/4096. If causality=fmax/auto, it is adaptively optimized. This interval is also limited by fmax/maxn. If you specify the parameter explicitly, adaptive sampling is disabled.
fdelta can be further reduced so that fmax/fdelta is a power of 2. This is required by the FFT algorithm.
Maximal order of impulse response, or the maximum number of sampling points in the frequency domain. You should increase this value only when modeling a system with large average group delay, such as transmission line. Setting this parameter to an unnecessarily large value slows down the time-domain simulation. The absolute upper limit for maxn is 262144.
Noise level threshold for impulse responses used in causality enforcement.
Relative truncation threshold for impulse response. The head and tail of the impulse response with absolute values below imptrunc is removed to speed up the simulation.
S-parameter data truncation threshold relative to the maximum element in the same row. The S-parameter data below datatrunc is dropped. This improves the capability and performance for simulating large-scale nport systems. Set datatrunc=0 to keep all S-parameter data.
Kaiser-Bessel window with smoothing parameter 1 is used to regulate the stability of S-parameter data. This parameter trades off model accuracy with model stability and is particularly useful for S-parameter data with insufficient bandwidth. Window must be used for all-pass type systems, where S-parameters are non-zero for frequencies beyond fmax.
For long delay, the DC extrapolation method can be set to constant, unwrap, or hpunwrap. The default is constant, where, without a dc point, the low-frequency magnitude is held at the lowest data point and the dc phase is set to the real axis near the lowest-frequency data point and interpolated elsewhere. If the parameter is set to unwrap and there is no dc point, the DC magnitude is set based on a regression of some low-frequency data, and the DC phase is set by unwrapping the phase and then setting it onto the real axis. If the dc point is specified, the magnitude is interpolated while the phase is still determined using the unwrapped estimate. hpunwrap is similar to unwrap for DC phase extrapolation but provides an alternative approach for DC magnitude extrapolation, which may be preferred for high-pass characteristics.
For an all-pass system or nearly all-pass system, the high frequency extrapolation method can be set to constant or linear. The default is constant, which causes the out-of-band frequency magnitude and phase to be held at the highest data point. For the 'linear' case, the out-of-band frequency magnitude is still held at the highest data point, but the phase is linearly extrapolated based on the phase of the in-band high frequency data.
Due to poor measurement accuracy, the S-parameter data may be non-passive. Non-passive S-parameter data may lead to non-converging or even unstable time domain simulations. . The passivity option controls the detection and enforcement of S-parameter simulation model passivity. The passivity option can be set to no, check, or enforce for interp=spline|linear. The default is check, which causes the simulator to check the S-parameter data at each frequency point and report non-passive data. If the parameter is set to enforce, the simulator corrects the data to ensure passivity, if the original data is non-passive. This can cause accuracy loss.
For interp=bbspice, passivity may be set to fit_weak_enforce or fit_enforce, The default value is fit_enforce. With passivity=fit_enforce, the simulator always attempts to create a passive simulation model and favors passivity over accuracy. With passivity=fit_weak_enforce, the simulator does not create a passive model if the passivity enforcement phase results in a significant accuracy loss.
For interp=bbspice, the simulator always checks if the S-parameter data is passive. Passivity options fit_weak_enforce and fit_enforce are only available for interp=bbspice and are interpreted as passivity=check for interp=linear|spline. Passivity options no, check, and enforce are only available for interp=linear|spline and are interpreted as passivity=fit_enforce for interp=bbspice.
When checking or enforcing passivity, the default tolerance of the passivity criteria is -1.0e-6. If the parameter is set to a higher value, the passivity checking criteria loosens.
For convolution-based time-domain simulation, causality is an important factor that affects the simulation accuracy. If causality=fmax, the simulator corrects the S-parameter causality up to fmax, as specified by the existing parameter. If causality=auto, the simulator corrects the S-parameter causality up to the automatically optimized fmax and ignores the existing parameter fmax. The parameters usewindow and hfextrap are ignored when causality=fmax or causality=auto.
It is recommended to use causality=fmax to obtain good simulation accuracy. For certain cases, if causality=fmax does not provide the expected accuracy, you can try causality=auto. However, it is slow to perform causality correction for large systems if causality=auto.
Important note about parameters for validation tool
An S-parameter time-domain validation tool is used to compare the original S-parameter data with the equivalent S-parameter data based on the corresponding time-domain model. The simulator uses the equivalent S-parameter data instead of the original S-parameter data in small signal analyses: sp, ac, and xf.
This parameter alters the nport behavior in small signal analyses: sp, ac, and xf. The default value is freqdomain. When acmodel=freqdomain, the frequency domain data is used directly in small signal analysis after interpolation/extrapolation to a set of frequency sweep points. When acmodel=timedomain, frequency domain data is converted to a time-domain model in the same way it is done in the transient initialization step. Then, the time-domain model is converted back to the frequency domain, which is used in small signal analysis.
This parameter is used to specify the name of the file used for storing the equivalent S-parameter data based on the corresponding time-domain model. The file format is touchstone. The instance name is added as a suffix and the file extension is added automatically. If the corresponding impulse responses are not generated, this parameter is ignored.
You can run ac analysis with acmodel=timedomain and compare the results with acmodel=freqdomain to see if the time-domain model is accurate. In addition, you can plot the equivalent S-parameters (outfile) and compare the results with the original S-parameter data using VIVA.
If interp=bbspice, this file is the same as the fitted sp file in the cache directory.
Important note about impulse responses (IR) reuse feature
Spectre checks there is a corresponding IR file. If yes, it loads the data from the IR file. If an IR file is not found, Spectre computes it and saves the IR file to the directory specified by the global option nportirfiledir. If the directory name is not specified, the file is written to /home/<username>/.cadence/mmsim/. To store the file in a location other than the default, you must specify either an absolute or a relative path. If a relative path is specified, the path is relative to the current working directory.
The global option nportirreuse={yes|no} can be used to enable or disable the IR reuse feature for all nport instances.
nportirreuse and nportirfiledir also work for interp=bbspice. The stored file named with '_encrypt' is the encrypted rational fitting model (RFM) from bbspice. The stored file named with '_save' is the fitting error report, it is created only when large fitting errors show up.
With interp=bbspice, there are some output files from bbspice run, they are located in BBSpiceOutput directory. This directory is under the current working directory unless the -outdir command line option is specified.
Important note about parameters for state-space models
Both parameters have the same number of entries as the number of ports, and each entry corresponds to a port. The entries are in the same order as the port order in the terminal specification of the instance. The porttype parameter specifies the type of each port of nport. A port can be of type input, output, or both. The portquantities parameter specifies whether each input/output is a voltage or current. Each entry in portquantities corresponds to one entry in porttypes. It specifies the quantity of input for input and both ports and the quantity of output for the output port. For both input and output ports, if the input quantity is set to voltage, the output quantity will be current and vice-versa.
Any line beginning with ";", "#", or "%" is treated as a comment and discarded.
Remaining lines should have a first character as A, B, C, D, E, or K, two integers, and a floating-point number. Such a line denotes an entry in the appropriate matrix with given row column indexes and matrix element.
For example, a file may look like this:
;matrix A, 3x3
A 1 1 1234.5678
...
;
;matrix E, 3x3
E 1 1 1.0
...
;
;matrix B, 3x1
B 2 1 4.28
...
;
;matrix C, 2x3
C 2 1 3.14
...
If a matrix is not specified in the file, it is treated as a zero matrix for A, B, C, D, and K. Matrix E is treated as an identity matrix, if it is not specified in the file.
matrixA matrixB matrixC matrixD matrixE matrixK
Coefficient matrices of the state-space model. The syntax of the vector is in sparse form, that is:
[ Row_1, Column_1, Value_11,
...
Row_i, Column_j, Value_ij,
... ]
If a matrix is not specified, it is treated as a zero matrix for A, B, C, D, and K. Matrix E is treated as an identity matrix, if it is not specified.
Related Topics
Return to top