General form: RXXXXXXX N1 N2 VALUE <TC=TC1<,TC2>> Examples: R1 1 2 100 RC1 12 17 1K TC=0.001,0.015N1 and N2 are the two element nodes. VALUE is the resistance (in ohms) and may be positive or negative but not zero. TC1 and TC2 are the (optional) temperature coefficients; if not specified, zero is assumed for both. The value of the resistor as a function of temperature is given by:
value(TEMP) = value(TNOM)*(1+TC1*(TEMP-TNOM)+TC2*(TEMP-TNOM)**2))
General form: CXXXXXXX N+ N- VALUE <IC=INCOND> LYYYYYYY N+ N- VALUE <IC=INCOND> Examples: CBYP 13 0 1UF COSC 17 23 10U IC=3V LLINK 42 69 1UH LSHUNT 23 51 10U IC=15.7MAN+ and N- are the positive and negative element nodes, respectively. VALUE is the capacitance in Farads or the inductance in Henries.
For the capacitor, the (optional) initial condition is the initial (time-zero) value of capacitor voltage (in Volts). For the inductor, the (optional) initial condition is the initial (time-zero) value of inductor current (in Amps) that flows from N+, through the inductor, to N-. Note that the initial conditions (if any) apply 'only' if the UIC option is specified on the .TRAN card.
Nonlinear capacitors and inductors can be described. General form: CXXXXXXX N+ N- POLY C0 C1 C2 ... <IC=INCOND> LYYYYYYY N+ N- POLY L0 L1 L2 ... <IC=INCOND>C0 C1 C2 ...(and L0 L1 L2 ...) are the coefficients of a polynomial describing the element value. The capacitance is expressed as a function of the voltage across the element while the inductance is a function of the current through the inductor. The value is computed as
value=C0+C1*V+C2*V**2+... value=L0+L1*I+L2*I**2+...where V is the voltage across the capacitor and I the current flowing in the inductor.
General form: KXXXXXXX LYYYYYYY LZZZZZZZ VALUE Examples: K43 LAA LBB 0.999 KXFRMR L1 L2 0.87LYYYYYYY and LZZZZZZZ are the names of the two coupled inductors, and VALUE is the coefficient of coupling, K, which must be greater than 0 and less than or equal to 1. Using the 'dot' convention, place a 'dot' on the first node of each inductor.
General form: TXXXXXXX N1 N2 N3 N4 Z0=VALUE <TD=VALUE> <F=FREQ <NL=NRMLEN>>+ <IC=V1,I1,V2,I2> Examples: T1 1 0 2 0 Z0=50 TD=10NSN1 and N2 are the nodes at port 1; N3 and N4 are the nodes at port 2. Z0 is the characteristic impedance. The length of the line may be expressed in either of two forms. The transmission delay, TD, may be specified directly (as TD=10ns, for example). Alternatively, a frequency F may be given, together with NL, the normalized electrical length of the transmission line with respect to the wavelength in the line at the frequency F. If a frequency is specified but NL is omitted, 0.25 is assumed (that is, the frequency is assumed to be the quarter-wave frequency). Note that although both forms for expressing the line length are indicated as optional, one of the two must be specified. Note that this element models only one propagating mode. If all four nodes are distinct in the actual circuit, then two modes may be excited. To simulate such a situation, two transmission line elements are required. (see the example in Appendix A for further clarification.) The (optional) initial condition specification consists of the voltage and current at each of the transmission line ports. Note that the initial conditions (if any) apply 'only' if the UIC option is specified on the .TRAN card. One should be aware that SPICE will use a transient timestep which does not exceed 1/2 the minimum transmission line delay. Therefore very short transmission lines (compared with the analysis time frame) will cause long run times.
SPICE allows circuits to contain linear dependent sources characterized by any of the four equations
i=g*v v=e*v i=f*i v=h*iwhere g, e, f, and h are constants representing transconductance, voltage gain, current gain, and transresistance, respectively. Note: a more complete description of dependent sources as implemented in SPICE is given in Appendix B.
General form: GXXXXXXX N+ N- NC+ NC- VALUE Examples: G1 2 0 5 0 0.1MMHON+ and N- are the positive and negative nodes, respectively. Current flow is from the positive node, through the source, to the negative node. NC+ and NC- are the positive and negative controlling nodes, respectively. VALUE is the transconductance (in mhos).
General form: EXXXXXXX N+ N- NC+ NC- VALUE Examples: E1 2 3 14 1 2.0N+ is the positive node, and N- is the negative node. NC+ and NC- are the positive and negative controlling nodes, respectively. VALUE is the voltage gain.
General form: FXXXXXXX N+ N- VNAM VALUE Examples: F1 13 5 VSENS 5N+ and N- are the positive and negative nodes, respectively. Current flow is from the positive node, through the source, to the negative node. VNAM is the name of a voltage source through which the controlling current flows. The direction of positive controlling current flow is from the positive node, through the source, to the negative node of VNAM. VALUE is the current gain.
General form: HXXXXXXX N+ N- VNAM VALUE Examples: HX 5 17 VZ 0.5K
N+ and N- are the positive and negative nodes, respectively. VNAM is the name of a voltage source through which the controlling current flows. The direction of positive controlling current flow is from the positive node, through the source, to the negative node of VNAM. VALUE is the transresistance (in ohms).
General form: VXXXXXXX N+ N- <<DC> DC/TRAN VALUE> <AC <ACMAG <ACPHASE>>> IYYYYYYY N+ N- <<DC> DC/TRAN VALUE> <AC <ACMAG <ACPHASE>>> Examples: VCC 10 0 DC 6 VIN 13 2 0.001 AC 1 SIN(0 1 1MEG) ISRC 23 21 AC 0.333 45.0 SFFM(0 1 10K 5 1K) VMEAS 12 9
N+ and N- are the positive and negative nodes, respectively. Note that voltage sources need not be grounded. Positive current is assumed to flow from the positive node, through the source, to the negative node. A current source of positive value, will force current to flow out of the N+ node, through the source, and into the N- node. Voltage sources, in addition to being used for circuit excitation, are the 'ammeters' for SPICE, that is, zero valued voltage sources may be inserted into the circuit for the purpose of measuring current. They will of course, have no effect on circuit operation since they represent short-circuits.
DC/TRAN is the dc and transient analysis value of the source. If the source value is zero both for dc and transient analyses, this value may be omitted. If the source value is time-invariant (e.g., a power supply), then the value may optionally be preceded by the letters DC.
ACMAG is the ac magnitude and ACPHASE is the ac phase. The source is set to this value in the ac analysis. If ACMAG is omitted following the keyword AC, a value of unity is assumed. If ACPHASE is omitted, a value of zero is assumed. If the source is not an ac small-signal input, the keyword AC and the ac values are omitted.
Any independent source can be assigned a time-dependent value for transient analysis. If a source is assigned a time dependent value, the time-zero value is used for dc analysis. There are five independent source functions: pulse, exponential, sinusoidal, piece-wise linear, and single-frequency FM. If parameters other than source values are omitted or set to zero, the default values shown will be assumed. (TSTEP is the printing increment and TSTOP is the final time (see the .TRAN card for explanation)).
Examples: VIN 3 0 PULSE(-1 1 2NS 2NS 2NS 50NS 100NS) parameters default values units V1 (initial value) Volts or Amps V2 (pulsed value) Volts or Amps TD (delay time) 0.0 seconds TR (rise time) TSTEP seconds TF (fall time) TSTEP seconds PW (pulse width) TSTOP seconds PER(period) TSTOP seconds A single pulse so specified is described by the following table: time value 0 V1 TD V1 TD+TR V2 TD+TR+PW V2 TD+TR+PW+TF V1 TSTOP V1Intermediate points are determined by linear interpolation.
Examples: VIN 3 0 SIN(0 1 100MEG 1NS 1E10) parameters default value units ---------- ------------- ----- VO (offset) Volts or Amps VA (amplitude) Volts or Amps FREQ (frequency) 1/TSTOP Hz TD (delay) 0.0 seconds THETA(damping factor) 0.0 1/seconds The shape of the waveform is described by the following table: time value 0 to TD VO TD to TSTOP VO + VA*exp(-(time-TD)*THETA)*sine(twopi*FREQ*(time+TD))
Examples: VIN 3 0 EXP(-4 -1 2NS 30NS 60NS 40NS) parameters default values units ---------- -------------- ----- V1 (initial value) Volts or Amps V2 (pulsed value) Volts or Amps TD1 (rise delay time) 0.0 seconds TAU1 (rise time constant) TSTEP seconds TD2 (fall delay time) TD1+TSTEP seconds TAU2 (fall time constant) TSTEP seconds The shape of the waveform is described by the following table: time value ---- ----- 0 to TD1 V1 TD1 to TD2 V1+(V2-V1)*(1-exp(-(time-TD1)/TAU1)) TD2 to TSTOP V1+(V2-V1)*(1-exp(-(time-TD1)/TAU1)) +(V1-V2)*(1-exp(-(time-TD2)/TAU2))
Examples: VCLOCK 7 5 PWL(0 -7 10NS -7 11NS -3 17NS -3 18NS -7 50NS -7)Parameters and default values
Each pair of values (Ti, Vi) specifies that the value of the source is Vi (in Volts or Amps) at time=Ti. The value of the source at intermediate values of time is determined by using linear interpolation on the input values.
Examples: V1 12 0 SFFM(0 1M 20K 5 1K) parameters default values units ---------- -------------- ----- VO (offset) Volts or Amps VA (amplitude) Volts or Amps FC (carrier frequency) 1/TSTOP Hz MDI (modulation index) FS (signal frequency) 1/TSTOP Hz The shape of the waveform is described by the following equation: value = VO + VA*sine((twopi*FC*time) + MDI*sine(twopi*FS*time))