Symbolic Linear Circuit Analysis Results

SLiCAP
Symbolic Linear Circuit Analysis Program
Version 3.1

Anton J.M. Montagne
© 2008 - 2009 Montagne Design & Consultancy
Delft, The Netherlands
http://www.analog-electronics.eu/slicap/slicap.html

June 1, 2009

Contents

List of Figures

List of Tables

1 Disclaimer

Montagne Design & Consultancy pays much attention to the usefulness and reliability of its symbolic linear circuit analysis program SLiCAP. However, despite all efforts, errors might occur and Montagne Design & Consultancy cannot be held liable for any direct or indirect losses due to application of SLiCAP.

2 Introduction to SLiCAP

SLiCAP is a symbolic circuit analysis program that shows network equations, transfer functions, pole-zero patterns, step response and impulse response, in a symbolic, numeric or graphic representation.

SLiCAP is an indispensable web application for designers of analog electronic circuits.

SLiCAP uses the asymptotic-gain model for evaluation of negative feedback circuits.

SLiCAP accepts SPICE-like netlists and returns output files in text, ASCII, TeX, MuPAD (MatLab symbolic toolbox), HTML, XHTML, PNG and EPS format.

This SLiCAP manual describes the syntax for the text-based input file. Such input consists of

The netlist data can be generated by netlist generators that are often part of schematic capture tools. Definitions of parameters, source, load and loopgain reference, as well as analysis instructions and options can also be added with the aid of a user-friendly web interface. This interface is self-explaining and therefore not described in  this manual.

3 Netlist format

The netlist file comprises the following input line types:

  1. A title line; this is the first line of the file (see 4 ).
  2. Element lines (see 5 )
  3. Instruction lines (see 7 )
  4. Comment lines (see 8 )
  5. .end line (see 9 ); this is the last line that will be read by SLiCAP

The lines between the title line and the .end line may be placed in any order. Their line types lines are defined by their first non whitespace character:

There is no limit to the length of a line. A line is terminated with a new line character and cannot be continued on a new line.

4 Title line

The first line of the netlist file is the title line. It may not be left empty and it should have alphanumeric characters only. Non-alphanumeric characters and strings of non-alphanumeric characters are replaced by a single space. No error message or warning is given for these replacements.

5 Element lines

An element line comprises:

  1. An element identifier field (see 5.1 )
  2. Either node fields (see 5.2 ), or element identifier fields (see 5.1 ) that refer to other elements (see 5.3 ).
  3. One or more value fields (see 5.4 ) with a value or an expression

Examples

  1. R_1 1 0 10

    This represents a resistor R1 connected between nodes ’1’ and ’0’ with a value of 10Ω

  2. L_A in out L_alpha

    This represents an inductor LA connected between nodes ’in’ and ’out’ with a value of Lα

  3. l_b in 0 L_alpha

    This represents an inductor lb connected between nodes ’in’ and ’0’ with a value of Lα

  4. E_1 outp outn inp inn A_0/{(1+s*tau_1)*(1+s*tau_2)}

    This represents a voltage-controlled voltage source with its positive output connected to ’outp’ its negative output connected to ’outn’, its positive controlling input connected to ’inp’ and its negative controlling input connected to ’inn’. Its gain is: -----A0-----
(1+sτ1)(1+sτ2).

  5. k_1 L_a l_b 0.8

    This represents a coupling factor of 0.8 between LA and lb.

  6. M_1 1 2 3 0 0.1p 0.01p 0 0.05p 0.2p 100u G_m 10u

    This represents a MOSFET with its drain connected to node 2, its gate to node 2 and the source and the bulk connected to node 0. The required device parameter values are:

    The bulk-drain capacitance: CbdM 1 = 0.1 × 10-12 [F]

    The bulk-gate capacitance: CbgM1 = 0.01 × 10-12 [F]

    The bulk-source capacitance: CbsM1 = 0 [F]

    The drain-gate capacitance: CdgM 1 = 0.05 × 10-12 [F]

    The gate-source capacitance: CgsM 1 = 0.2 × 10-12 [F]

    The backgate transconductance: gbM 1 = 100 × 10-6 [A/V]

    The forward transconductance: gmM 1 = Gm [A/V]

    The output conductance: goM 1 = 10 × 10-6-1]

5.1 Element identifier field

An element identifier consists of three parts:






El. type ident.Description NodesRef.




C Capacitor 2 6.1
E Voltage-controlled voltage source 4 6.2
EZ As E, but with output impedance 4 6.3
F Current-controlled current source 4 6.4
G Voltage-controlled current source 4 6.5
H Current-controlled voltage source 4 6.6
I Independent current source 2 6.7
K Coupling factor 0 6.8
L Inductor 2 6.9
M N or P channel MOSFET (small-signal model) 4 6.10
MD Common source differential pair of M 5 6.11
N Nullor 4 6.12
OC Current-feedback opamp 4 6.13
OV Voltage-feedback opamp 4 6.14
Q Vertical NPN or PNP BJT (small-signal model)4 6.15
QD Common-emitter differential pair of Q 5 6.16
R Resistor 2 6.17
T Ideal transformer 4 6.18
V Independent voltage source 2 6.19
W Gyrator 4 6.20
Y Admittance 2 6.21
Z Impedance 2 6.22





Table 1: Elements and associated element identifiers

  1. The element type identifier

    The string between the first non whitespace character of an element line, and the element type-instance separator ”_”, is the element type identifier. The program recognizes linear elements by their element type identifiers as listed in table 1. These element type identifiers are not case-sensitive. An overview of elements that can be used with SLiCAP is given in section 6 .

  2. The element type - instance separator

    The second character of the element identifier must be ’_’. It causes the following string (the element 3 ) to be subscripted in the TeX, HTML and XHTML output.

  3. The character string between the type - instance separator ’_’ and the first following whitespace character is the element’s instance identifier. It should at least have one alpha numerical character. If more than one element of the same type are listed, their element instance identifiers should be different.

A character string can be divided in substrings using the substring separator character _’. A substring following the substring separator character will be displayed as subscript in the TEX, HTML and XHTML output files. The substrings consists of alpha numerical characters. Reserved strings and their displayed output in TEX and XHTML output are listed in table 2.








String
Display
String
Display
String
Display






alpha α lambdaλ tau τ
beta β mu μ Theta Θ
chi χ nu ν theta θ
Delta Δ Omega Ω Upsilon ϒ
delta δ omega ω upsilon υ
ell Phi Φ varepsilonε
epsilon ϵ phi ϕ varphi φ
eta η Pi Π varpi ϖ
GammaΓ pi π varrho ϱ
gamma γ Psi Ψ varsigma ς
infty psi ψ vartheta ϑ
iota ι rho ρ Xi Ξ
kappa κ Sigma Σ xi ξ
LambdaΛ sigma σ zeta ζ







Table 2: Reserved strings and their displayed symbols.

5.2 Node fields

A node field is a string of alpha numerical characters only.

5.3 Reference field

A reference field has the same syntax as an element identifier field. It refers to an element whose element identifier field is exactly equal to the reference field.

5.4 Value field

The value or expression field be a valid SLiCAP value or an expression.

A valid SLiCAP value is any numerical value in decimal or exponential notation. Scale factors as listed in table 3 can be used. Scale factors are case-sensitive.





Scale factorDescriptionSLiCAP replacement



a atto 10-18
f femto 10-15
p pico 10-12
n nano 10-9
u micro 10-6
m mili 10-3
k kilo 103
M Mega 106
G Giga 109
T Tera 1012
P Peta 1015




Table 3: Scale factors that can be used in value fields and expressions.

1p or 1E-12 or 1e-12 all represent one pico, SLiCAP replaces it by 10-12

1M or 1E6 or 1e6 all represent one Mega, SLiCAP replaces it by 106. MEG is not recognized by SLiCAP!

An expression consists of parameters, operators (’+’, ’-’, ’*’, ’/’ or ’^’), functions and numbers. Scale factors can be used in expressions: don’t use them for user-defined parameters. A list of some other reserved symbols that also cannot be used as user-defined parameters is given in table 4.





SymbolsDescription SLiCAP replacement



e base of natural logarithm2.7183.....
E scientific notation < float > E < int >   = float ×10int
I imaginary unit I
s Laplace variable s
f Fourier variable f
omega Fourier variable ω
t time t
i MuPAD reserved
beta MuPAD reserved
PI pi 3.1416....




Table 4: Reserved parameters and their SLiCAP replacement.

Brackets of all types ”[”, ”{”, ”(”, ”)”, ”}” and ”]” can be used in expressions. SLiCAP replaces straight and curly brackets by their corresponding normal bracket ”(” or ”)”.

Any combination of characters that is not recognized as a function, a reserved parameter form table 4, a symbol from table 2, or scale factor from table 3 is considered to be a parameter (see also .p parameter definition in section 7.5).

Table 5 lists the functions that are accepted by SLiCAP.




FunctionDescription


abs(x) absolute value or magnitude of x
exp(x) =e^x; e = base of natural logarithm
ln(x) logarithm of x with base e
log(x) logarithm of x with base 10
sqrt(x) square root of x
sinh(x) hyperbolic sine of x
cosh(x) hyperbolic cosine of x
tanh(x) hyperbolic tangent of x
coth(x) hyperbolic cotangent of x
sin(x) sine of x; x in radians
cos(x) cosine of x; x in radians
tan(x) tangent of x; x in radians
cot(x) cotangent of x; x in radians
asin(x) inverse sine of x; return value in radians
acos(x) inverse cosine of x; return value in radians
atan(x) inverse tangent of x; return value in radians
acot(x) inverse cotangent of x; return value in radians



Table 5: Functions that can be used in SLiCAP value fields

6 Element definitions

6.1 C: Linear capacitor

6.2 E: Voltage-controlled voltage source (VCVS)

6.3 EZ: Voltage-controlled voltage source with output impedance

SliCAP has a compact matrix stamp for the voltage controlled-voltage source with output impedance.

6.4 F: Current-controlled current source (CCCS)

6.5 G: Voltage-controlled current source (VCCS)

6.6 H: Current-controlled voltage source: CCVS

6.7 I: Independent current source

6.8 K: Coupling factor

6.9 L: Linear inductor

6.10 M: MOSFET


PIC

Figure 1: SLiCAP equivalent circuit for a N or P MOS:
M_x Drain Gate Source Bulk C_bd C_bg C_bs C_dg C_gs g_b g_m g_o


6.11 MD: Common-source MOS differential pair

6.12 N: Nullor

6.13 OC: Current-feedback OpAmp

6.14 OV: Voltage-feedback OpAmp

6.15 Q: Vertical Bipolar Junction Transistor

6.16 QD: Common-emitter vertical BJT differential pair


PIC

Figure 6: SLiCAP equivalent circuit for a common-emitter differential pair:
QD_x C_1 C_2 B_1 B_2 S C_bc C_bx C_cs C_pi g_m g_mu g_pi g_o r_b


6.17 R: Linear resistor

6.18 T: Ideal transformer

6.19 V: Independent voltage source

6.20 W: Gyrator

6.21 Y: Linear admittance

6.22 Z: Linear impedance

7 Instruction lines

The netlist file can comprise instructions as listed in table 6. Instructions are not case-sensitive and may be preceded by white-space characters.




InstructionDescription


.s defines the input source for transfer functions (see 7.1 )
.v defines the voltage output for transfer functions (see 7.3 )
.i defines the current output for transfer functions (see 7.2 )
.l defines the loopgain reference variable (see 7.4 )
.p assigns a value to a parameter (see 7.5 )
.symbolic causes SLiCAP to give symbolic (see 7.6 ) results
.numeric causes SLiCAP to give numeric (see 7.7 ) results
.plot causes SLiCAP to give plotted (see 7.8 ) results
.o definition of SLiCAP options (see 7.10 )
.end is the last line (see 9 ) that will be read by SLiCAP



Table 6: Instructions

7.1 Definition of the signal source: .s

Definition of the signal source. A source is required for calculation of:

  1. GAIN The transfer from source to load of the network
  2. DIRECT The transfer from source to load of the network, with value of the loopgain reference set to zero
  3. ASYMPTOTIC The transfer from source to load of the network, with the loopgain reference replaced by a nullor

Syntax: Not case sensitive, second field must refer to the element identifier of a voltage or current source in the circuit. Following fields are ignored!

Examples:

.s V_1

.S I_in

7.2 Definition of a current detector: .i

Definition of a current detector; which is a current through a voltage source. A detector is required for the calculation of:

  1. GAIN The transfer from source to load of the network
  2. DIRECT The transfer from source to load of the network, with value of the loopgain reference set to zero
  3. ASYMPTOTIC The transfer from source to load of the network, with the loopgain reference replaced by a nullor

Syntax: Not case sensitive, second field must refer to the element identifier of a voltage or current source in the circuit. Following fields are ignored!

Examples:

.i V_1; The detector detects the current through the independent voltage source V_1

.I V_sense; The detector detects the current through the independent voltage source V_sense

7.3 Definition of a voltage detector:

Definition of a voltage detector. A detector is required for the calculation of:

  1. GAIN The transfer from source to load of the network
  2. DIRECT The transfer from source to load of the network, with value of the loopgain reference set to zero
  3. ASYMPTOTIC The transfer from source to load of the network, with the loopgain reference replaced by a nullor

Syntax: Not case sensitive, second and third field must refer to nodes in the circuit. Following fields are ignored!

Examples:

.v out 0; The detector detects the voltage between node out and 0

.V OutP OutN; The detector detects the voltage between node OutP and OutN

7.4 Definition of the loopgain reference: .l

Definition of the reference variable for negative-feedback systems. A loopgain reference is required for the calculation of:

  1. LOOPGAIN The transfer from output quantity of the reference variable to the input quantity of the reference variable multiplied by the gain of the reference variable.
  2. DIRECT The transfer from source to load of the network, with value of the loopgain reference set to zero
  3. ASYMPTOTIC The transfer from source to load of the network, with the loopgain reference replaced by a nullor

Syntax: Not case sensitive, second field must refer to the element identifier of a voltage or current source in the circuit. Following fields are ignored!

Examples:

.l E_amp

.L g_m

7.5 Assignment of numeric values to parameters: .p

Assignment of a value to a parameter. If one ore more parameters have no numerical values assigned, numerical expressions still carry their identifiers, pole-zero analysis will not be performed and plots will not be made!

Syntax:

.p ID VALUE

  1. .p is not case sensitive.
  2. ID is the parameter identifier. It cannot be equal to an element identifier. A parameter identifier may consists of alpha-numeric characters and the subscript symbol ”_”. If it consists of more than one character, the second character must be the subscript symbol ”_”. Strings from table 2 are considered as one character.
  3. VALUE is the parameter’s value field (see 5.4). It may contain expressions and new parameters.
  4. Following fields are ignored!

Examples:

.p A 10k

.P g_m 20m

.p tau_1 1/(2*PI*100k)

.p g_m g_m_0*sqrt(I_out/I_0)

7.6 Symbolic output: .symbolic

Causes SLiCAP to generate symbolic output. Parameter identifiers in element value fields will NOT be substituted by the values or expressions of these parameters. System variables s (LAPLACE or MATRIX), or f (FOURIER, DB, MAG, PHASE, DELAY, RE, IM), or t (IMPULSE, STEP or TIME) are also left in the expression. Any .symbolic instruction can be combined with parameter stepping (see 7.9).

Be careful with .symbolic. It can result in extremely long expressions that makes the TeX to XHTML converter crash. .symbolic PZ is not implemented.

Syntax :

.symbolic variable type <.step step_var lin_log start stop n_values>

  1. .symbolic is not case-sensitive
  2. variable is the object to be evaluated; it can be one of the following:

    1. V The voltage between two specified nodes
    2. I The current through a voltage source.
    3. GAIN The transfer from the source to the load of the network
    4. ASYMPTOTIC The transfer from source to load of the network, with the loopgain reference replaced by a nullor
    5. LOOPGAIN The transfer from output quantity of the loopgain reference element to the input quantity of the loopgain reference element, multiplied by the gain of the loopgain reference element
    6. DIRECT The transfer from source to load of the network, with value of the loopgain reference element set to zero
  3. type can be one of the following:

    1. MATRIX The matrix equation on which the calculation variable will be based
    2. LAPLACE The Laplace transform of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I )
    3. FOURIER The Fourier transform of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ); it is sensitive to the option variable RAD/S
    4. MAG The magnitude of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ); it is sensitive to the option variable RAD/S
    5. DB The magnitude of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ) in dB representation ; it is sensitive to the option variable RAD/S
    6. PHASE The phase of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ); it is sensitive to the option variable RAD/S
    7. RE The real part of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ); it is sensitive to the option variable RAD/S
    8. IM The imaginary part of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ); it is sensitive to the option variable RAD/S
    9. DELAY The group delay of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ); it is sensitive to the option variable RAD/S
    10. IMPULSE The unit-impulse response of a transfer (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT). IMPULSE cannot be used with V or I variables, use TIME instead.
    11. STEP The unit-step response of a transfer (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT). STEP cannot be used with V or I variables, use TIME instead.
    12. TIME A current of voltage time domain response, cannot be used with gain functions, uses STEP instead.

7.7 Numeric output: .numeric

Causes SLiCAP to generate numeric output. Parameter identifiers in element value fields will be substituted by their values. Undefined parameters and s (LAPLACE or MATRIX), or f (FOURIER, DB, MAG, PHASE, DELAY, RE, IM), or t (IMPULSE, STEP or TIME) are left in the expression. Any .numeric instruction can be combined with parameter stepping (see 7.9).

Syntax :

.numeric variable type <.step step_var lin_log start stop n_values>

  1. .numeric is not case-sensitive
  2. variable is the object to be evaluated; it can be one of the following:

    1. V The voltage between two specified nodes
    2. I The current through a voltage source.
    3. GAIN The transfer from the source to the load of the network
    4. ASYMPTOTIC The transfer from source to load of the network, with the loopgain reference replaced by a nullor
    5. LOOPGAIN The transfer from output quantity of the loopgain reference element to the input quantity of the loopgain reference element, multiplied by the gain of the loopgain reference element
    6. DIRECT The transfer from source to load of the network, with value of the loopgain reference element set to zero
  3. type can be one of the following:

    1. MATRIX The matrix equation on which the calculation variable will be based
    2. LAPLACE The Laplace transform of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I )
    3. FOURIER The Fourier transform of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ); it is sensitive to the option variable RAD/S
    4. MAG The magnitude of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ); it is sensitive to the option variable RAD/S
    5. DB The magnitude of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ) in dB representation ; it is sensitive to the option variable RAD/S
    6. PHASE The phase of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ); it is sensitive to the option variable RAD/S
    7. RE The real part of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ); it is sensitive to the option variable RAD/S
    8. IM The imaginary part of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ); it is sensitive to the option variable RAD/S
    9. DELAY The group delay of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ); it is sensitive to the option variable RAD/S
    10. PZ The zero-frequency value and the locations of the poles and zeros of a transfer (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT); it is sensitive to the option variable RAD/S. PZ cannot be used with V or I variables. Numeric pole-zero analysis will only be performed if numeric values have been assigned to all parameters.
    11. IMPULSE The unit-impulse response of a transfer (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT). IMPULSE cannot be used with V or I variables, use TIME instead.
    12. STEP The unit-step response of a transfer (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT). STEP cannot be used with V or I variables, use TIME instead.
    13. TIME A current of voltage time domain response, cannot be used with gain functions.

7.8 Graphic output: .plot

Causes SLiCAP to generate graphic output. Parameter identifiers in element value fields will be substituted by their values. The variables s (PZ), ω or f (FOURIER, DB, MAG, PHASE, DELAY, RE, IM), or t (IMPULSE, STEP or TIME) are taken as independent variable for plotting. Plot instructions will only be executed if numeric values have been assigned to all parameters.

Any .plot instruction can be combined with parameter stepping (see 7.9).

Syntax :

.plot variable type x_var start stop <.step step_var lin_log start stop n_values> <.range x_min x_max y_min y_max>

  1. .plot is not case-sensitive
  2. variable is the object to be evaluated; it can be one of the following:

    1. V The voltage between two specified nodes
    2. I The current through a voltage source.
    3. GAIN The transfer from source to load of the network
    4. ASYMPTOTIC The transfer from source to load of the network, with the loopgain reference replaced by a nullor
    5. LOOPGAIN The transfer from output quantity of the reference variable to the input quantity of the reference variable multiplied by the gain of the reference variable
    6. DIRECT The transfer from source to load of the network, with value of the loopgain reference set to zero
  3. type can be one of the following:

    1. MAG The magnitude of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), always plotted on log-log scale. A frequency range definition .f fmin fmax is required; it is sensitive to the option variable RAD/S. Optional, a .range sub instruction can be used to zoom into a specified area of the y-axis. Syntax: .range y_min y_max.
    2. DB The dB magnitude of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), always plotted on log-lin scale. A frequency range definition .f fmin fmax is required; it is sensitive to the option variable RAD/S. Optional, a .range sub instruction can be used to zoom into a specified area of the y-axis. Syntax: .range y_min y_max.
    3. PHASE The phase characteristic of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), always plotted on log-lin scale. A frequency range definition .f fmin fmax is required; it is sensitive to the option variable RAD/S. Optional, a .range sub instruction can be used to zoom into a specified area of the y-axis. Syntax: .range y_min y_max.
    4. RE The real part of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), always plotted on log-lin scale. A frequency range definition .f fmin fmax is required; it is sensitive to the option variable RAD/S. Optional, a .range sub instruction can be used to zoom into a specified area of the y-axis. Syntax: .range y_min y_max.
    5. IM The imaginary part of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), always plotted on log-lin scale. A frequency range definition .f fmin fmax is required; it is sensitive to the option variable RAD/S. Optional, a .range sub instruction can be used to zoom into a specified area of the y-axis. Syntax: .range y_min y_max.
    6. DELAY The group delay of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), always plotted on log-lin scale. A frequency range definition .f fmin fmax is required; it is sensitive to the option variable RAD/S. Optional, a .range sub instruction can be used to zoom into a specified area of the y-axis. Syntax: .range y_min y_max.
    7. P The pole pattern of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT); it is sensitive to the option variable RAD/S. Optional, a .range sub instruction can be used to zoom into a specified area of the complex plane. Syntax: .range x_min x_max y_min y_max.
    8. Z The zero pattern of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT); it is sensitive to the option variable RAD/S. Optional, a .range sub instruction can be used to zoom into a specified area of the complex plane. Syntax: .range x_min x_max y_min y_max.
    9. PZ The pole-zero pattern of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT), or of a voltage or current (V, I ); it is sensitive to the option variable RAD/S. Optional, a .range sub instruction can be used to zoom into a specified area of the complex plane. Syntax: .range x_min x_max y_min y_max.
    10. IMPULSE The unit-impulse response of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT). A time range definition .t tmin tmax is required. Optional, a .range sub instruction can be used to zoom into a specified area of the y-axis. Syntax: .range y_min y_max.
    11. STEP The unit-step response of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT). A time range definition .t tmin tmax is required. Optional, a .range sub instruction can be used to zoom into a specified area of the y-axis. Syntax: .range y_min y_max.
    12. TIME The time-domain representation of a voltage or current (V or I). A time range definition .t tmin tmax is required. Optional, a .range sub instruction can be used to zoom into a specified area of the y-axis. Syntax: .range y_min y_max.
    13. POLAR A polar plot of a transfer function (GAIN, ASYMPTOTIC, LOOPGAIN DIRECT) or a voltage or current (V or I). A frequency range definition .f fmin fmax is required; it is sensitive to the option variable RAD/S.
  4. type x_var The x-axis variables that should be entered are:

    1. .t for TIME, IMPULSE and STEP. SLiCAP always uses a linear x-axis scale for a time-domain plot.
    2. .f for MAG, DB, PHASE, RE, IM, DELAY and POLAR. SLiCAP always uses a logarithmic x-axis scale for a frequency-domain plot.
    3. no entry for PZ
  5. start start value for time of frequency scale.
  6. stop stop value for time of frequency scale.

Examples

  1. .plot gain db .f 1 1M

    SLiCAP will plot the magnitude characteristic of the gain on a log frequency scale that ranges from 1 [Hz] to 1 [MHz], and a dB (linear) vertical scale.

  2. .plot gain db .f 1 1M .step C_load lin 1p 10p 10

    SLiCAP will plot 10 magnitude characteristics of the gain, combined in one plot, on a log frequency scale that ranges from 1 [Hz] to 1 [MHz], and a dB (linear) vertical scale, with Cload stepping from 1 [pF] to 10 [pF]; 10 values.

  3. .plot gain phase .f 1 1M

    SLiCAP will plot the magnitude characteristic of the gain on a log frequency scale that ranges from 1 [Hz] to 1 [MHz], and a dB (linear) vertical scale.

  4. .plot gain phase .f 1 1M .step C_load lin 1p 10p 10

    SLiCAP will plot 10 phase characteristics of the gain, combined in one plot, on a log frequency scale that ranges from 1 [Hz] to 1 [MHz], and a dB (linear) vertical scale, with Cload stepping from 1 [pF] to 10 [pF]; 10 values.

  5. .plot gain step .1 0 1u

    SLiCAP will plot the unit step responses of the gain, on a linear time scale that ranges from 0 to 1 [μs], and a linear vertical scale.

  6. .plot gain step .1 0 1u .step C_load lin 1p 10p 10

    SLiCAP will plot 10 unit step responses of the gain, combined in one plot, on a linear time scale that ranges from 0 to 1 [μs], and a linear vertical scale, with Cload stepping from 1 [pF] to 10 [pF]; 10 values.

  7. .plot gain pz

    SLiCAP will plot the pole-zero pattern of the gain (auto scale)

  8. .plot gain pz .range -10M 0 -5M 5M

    SLiCAP will plot the pole-zero pattern of the gain, within the specified area of the complex plane: s = 2πσ + i2πf; with σ = -10 106..0 and f = -5 106..5 106, or. s = σ + ;with σ = -10 106..0 and ω = -5 106..5 106, if .o rad/s is used (see options 7.10).

  9. .plot gain pz .step C_load lin 1p 10p 100 .range -10M 0 -5M 5M

    SLiCAP will plot the loci of the poles and the loci of the zeros of the gain, within the specified area of the complex plane: s = 2πσ + i2πf; with σ = -10 106..0 and f = -5 106..5 106, or. s = σ + ; with σ = -10 106..0, and ω = -5 106..5 106, if .o rad/s is used (see options 7.10), for 100 different values of Cload.

    If the gain of the reference variable is used as step variable, you will obtain the root-locus plot that is often used for analysis of the stability of negative-feedback circuits. However, this plot command is much more powerful, you can plot the loci of the poles and/or the zeros while stepping any parameter.

7.9 Parameter stepping: .step

All instructions can be combined with parameter stepping. This will cause SLiCAP to perform the instruction for different values of a parameter. Parameter stepping is performed if a .step sub instruction is found on an instruction line. The syntax for a .step instruction is:

.step step_var lin_log start stop n_values

7.10 SLiCAP options: .o

Sets SLiCAP options.

.o option <option value>

Syntax

  1. .o not case sensitive. Each option should be put on a separate line, starting with .o
  2. option

    1. disp (not case sensitive): .o disp n: Uses n digits displayed numerical accuracy, default n = 4
    2. calc (not case sensitive): .o calc n: Uses n digits calculated numerical accuracy, default n = 20
    3. plot_w (not case sensitive): .o plot_w n: Sets plot width to n [cm], default n = 12, range n : 5..25 (Integer only)
    4. plot_h (not case sensitive): .o plot_h n: Sets plot height to n [cm], default n = 12, range n : 5..25 (Integer only)
    5. rad/s (not case sensitive): .o rad/s; no value required. Uses s = [rad/s] frequency representation for FOURIER, MAG, DB, RE, IM, DELAY, PHASE and PZ output
    6. no_cancel: .o no_cancel (not case sensitive): By default, SLiCAP doesn’t show pole-zero pairs whose relative distance is less than the displayed numeric accuracy. With the option .o no_cancel, SLiCAP does show these non-observable poles and zeros.
    7. unit_circle: .o unit_circle (not case sensitive): Forces SLiCAP to draw the unit circle in polar plots. This is helpful for finding the phase margin in feedback systems.
    8. graph_eps: .o graph_eps (not case sensitive): By default SLiCAP uses the bit map output format .png (portable network graphics) for graphic output. With this options it is changed to vector .eps (encapsulated postscript) format.
    9. zero_r: .o zero_r (not case sensitive): This option should be set if you want to assign zero value to a resistor (not required for zero base resistance of bipolar transistors).

8 Comment lines: *

Any line beginning with an asterix ’*’ is considered as comment and will be ignored.

9 End line: .end

The input file ends with a ’.end’ instruction or with an end of file character. The ’.end’ instruction is not case sensitive.

10 SLiCAP background information

SLiCAP is optimized for symbolic analysis and numeric pole-zero analysis. Hence, it is not optimized for speed.

Reliable pole-zero analysis requires an MNA matrix in the differential form. As can be seen from the matrix stamps, this is guaranteed as long as:

  1. The Laplace variable s is NOT used in expressions for:

    1. The value of a resistor (use Z or Y instead)
    2. The value of a capacitor (use Z or Y instead)
    3. The value of an inductor (use Z or Y instead)
    4. The turns ratio n of an ideal transformer
    5. The coupling factor between two inductors
    6. The gyration constant G of the gyrator
    7. The element values of:
      • Current-feedback operational amplifiers, except for their transimpedance gain and output impedance
      • Voltage-feedback operational amplifiers, except for their voltage gain and output impedance
      • Bipolar and MOS transistors
      • CE and CS differential pairs.
  2. Transfer functions for E, EZ, F, G, H, Y and Z are written as a simple (non-complex) fractions, from which the numerator and denominator can be expanded into polynomials of the Laplace variable sa0 + a1s + a2s2 + ... + a nsn.

Please notice that the above conditions are NOT checked!

The poles are found as the solution for s of the determinant of the MNA matrix, which, under the above conditions, can always be written as a polynomial in s. The determinant is evaluated using minor expansion. This is relatively slow, but it does not have the disadvantage of generating false pole-zero pairs due to rounding errors that occur during a much faster process such as Gaussian elimination. The poles are obtained as the eigenvalues of a matrix, which is constructed from the polynomial coefficients of the Laplace variable s.

Zeros are found in a similar way, after application of Cramer’s rule.

Poles and zeros with a magnitude larger than 10N-2, in which N is the number of digits set by the calculation accuracy (default N = 20) are not displayed.