rm12 463 766 PDF
rm12 463 766 PDF
rm12 463 766 PDF
VOut(t) = | VIn(t) |
The function is implemented with the ABS macro:
See the circuit SYSTEM2 for an example of the use of this macro.
465
AM
This block provides an amplitude modulation function implemented as follows
The device consists of a single NFV source whose VALUE attribute is selected
by the TYPE parameter which can be one of two values, SM or CM. These two
symbolic variables SM and CM are defined as follows:
.define SM Offset*(1+ModIndex*V(In))*VPeak*Sin(2*PI*FS*t)
.define CM Offset*(1+ModIndex*V(In))*VPeak*Cos(2*PI*FS*t)
Parameter Definition
FS Frequency of the carrier signal
VPEAK Magnitude of the carrier signal
MODINDEX Modulation Index
OFFSET Offset added to the input signal
TYPE Modulation type. SM=Sine modulation.
CM=Cosine modulation
See the circuit AMTEST1.CIR for an example of how to use this macro.
The function is implemented with the AMP macro:
The single input parameter, GAIN, multiplies the input to produce an amplified
output. This implementation uses a simple linear dependent VOFV source. It
could have been done with a Function source or a Spice poly source. In general,
the simplest type of source that will perform the function is preferred.
467
BALUN
The BALUN macro is a macro which converts balanced signals to unbalanced
signals or vice versa.
See the circuit BALUNMIXER for an example of the use of this macro.
This circuit is implemented with three linear inductors and one K (coupling)
device.
Parameter Definition
L1 Primary inductance
L2 Secondary inductance 1
L3 Secondary inductance 2
See the circuit TRANS for an example of the use of this macro.
469
CLIP
The clip macro can be used as a limiter, ideal OPAMP, or inverter. It provides an
output that is a scaled copy of the input, but limited to the specified maximum
and minimum levels.
A pair of input parameters, LOW and HIGH, define the lowest value and highest
value of the output. Between these limits, the output equals the input multiplied
by the GAIN parameter. The block is constructed of a NTVOFV Function table
source.
Parameter Definition
GAIN Linear gain between clip limits
LOW Lowest output value
HIGH Highest output value
See the circuit SYSTEM2 for an example of the use of this macro.
Parameter Definition
SCALE Scaling factor applied to the delayed signal
DELAY Delay applied to the original signal in seconds
TYPE 1 = Feed-forward comb filter 2 = Feedback comb filter
See the circuit Comb Test for an example of the use of this macro. There is also
an article describing the macro at:
http://www.spectrum-soft.com/news/fall2012/comb.shtm
471
COMP
The COMP macro is a simple, fast, and convergence-friendly voltage comparator
implemented with a TANH function.
A pair of input parameters, VOL and VOH, define the lowest value and highest
value of the output. Between these limits, the output equals the input multiplied
by the GAIN parameter. The block is constructed of a function source whose ex-
pression is DC+VA*TANH(GAIN*(V(INP,INM))), where
VA = (VOH-VOL)/2
DC = (VOH+VOL)/2
The use of the smooth TANH function with its continuous derivatives improves
convergence in critical circuits.
Parameter Definition
GAIN Linear gain between clip limits
VOL Lowest output value
VOH Highest output value
Parameter Definition
VIH Lower limit of input state change voltage
VIL Upper limit of input state change voltage
VOH Lower limit of output voltage
VOL Upper limit of output voltage
ROUT Comparator output resistance
SIGN -1 for inverting version, 1 for non-inverting version
See the circuit COMPDEMO for an example of the use of this macro.
473
Constant Power
The Constant Power macro is an implementation of a constant power load.
1/(Rlow/V(G1) + V(G1)/Power)
Parameter Definition
Rlow Minimum resistance of the load
Power The constant power in watts the load draws
Parameter Definition
AC Amplitude of the output waveform
FC Base carrier frequency
DF Frequency deviation of the modulated signal
VTHRESH Threshold voltage to differentiate between a binary one
and a binary zero
TYPE Type = 1 means high frequency occurs at a logic 1.
Type = 2 means high frequency occurs at a logic 0.
See the circuit CPFSK for an example of the use of this macro.
475
DC Motor
This is an electrical as well as mechanical model of a DC motor.
Parameter Definition
LA Electrical inductance of the motor
RA Electrical resistance of the motor
KE Back EMF electromotive force constant
KT Torque electromotive force constant
JM Moment of inertia of the motor
BM Viscous friction constant
TL Load torque
VOut(t+delay) = VOut(t)
The single input parameter, DELAY, provides the specified delay through a trans-
mission line.
477
DIAC
The DIAC macro is based on an elaboration of the TRIAC macro and looks like
this:
A pair of input parameters, RS and VK define the series impedance and the volt-
age at which breakover occurs.
Parameter Definition
RS Series resistance
VK Breakover voltage
See the DIAC1 and DIAC2 circuits for an example of the use of this macro.
The single input parameter, SCALE, multiplies or scales the derivative. This
particular implementation has a buffered output, allowing it to drive very low
impedance networks.
479
DIGPOT
The digital potentiometer macro is loosely based on the MAX5450-5455 series of
devices from Maxim. These devices are digital potentiometers with an up/down
interface consisting of two fixed resistors with 256 digitally controlled wiper con-
tacts (taps). There are three digital inputs that determine the tap point that will be
accessible to the wiper. These digital inputs are INC, CS, and U/D.
The INC input is the wiper increment control input. A high to low transition on
this input increments or decrements the wiper position depending on the states
of CS and U/D. The CS input is the chip select input. When this input is low,
the wiper position may be changed through INC and U/D. The U/D input is the
up/down control input. When this input is high, a high-to-low transition on INC
increments the wiper position, and when the input is low, a high-to-low transi-
tion on INC decrements the wiper position. If the wiper is at either the high or
low end of the resistor array, any increment or decrement in the direction of the
endpoint will not change the wiper position, so in other words, there is no wrap
around effect.
Finally, upon power-up the initial setting for the wiper is at midscale (tap 127).
The single input parameter passed to the macro by the calling circuit, SCALE,
multiplies or scales the ratio of the two input waveforms at the output.
481
F
This system block merely provides a convenient shape to house a general linear
transfer function, F(S). It is implemented with a Laplace LFVOFV source.
See the circuit SYSTEM2 for an example of the use of this macro.
Parameter Definition
WMAG Magnitude of the output waveform
NC0 Number of cycles of the output waveform that will occur
in the duration of a single zero bit of the input waveform
NC1 Number of cycles of the output waveform that will occur
in the duration of a single one bit of the input waveform
TB Duration of a single bit in seconds
See the circuit FSK2 for an example of the use of this macro.
483
FWeighting
This is a frequency weighting filter macro
Parameter Definition
TYPE Selects the frequency weighting scale.
Must be A, B, C, or D.
A-Weighting
.define Ka 7.39705e9
.define A (Ka*s^4)/((s+129.4)^2 * (s+676.7) * (s+4636) * (s+76655)^2)
B-Weighting
.define Kb 5.99185e9
.define B (Kb*s^3)/((s+129.4)^2 * (s+995.9) * (s+76655)^2)
C-Weighting
.define Kc 5.91797e9
.define C (Kc*s^2)/((s+129.4)^2 * (s+76655)^2)
D-Weighting
.define Kd 91204.32
.define D (Kd*s*(s^2+6532*s+4.0975e7))/((s+1776.3) * (s+7288.5) *
(s^2+21514*s+3.8836e8))
484 Chapter 25: Macros
GYRATOR
The gyrator can be used to scale a resistive impedance. It can also transform an
inductive impedance to a capacitive impedance or a capacitive impedance to an
inductive impedance.
Req = 1/(R*G*G)
Leq = C/(G*G)
Ceq = L*G*G
See the circuit GYRTEST for an example of the use of this macro.
485
IDEAL_TRANS2
This is an ideal two port transformer. It provides a fixed voltage gain.
VOUT = VIN*GAIN
IOUT = IIN / GAIN
See the circuit IDEALTRANS for an example of the use of this macro.
Two parameters, GAIN12 and GAIN13, determine the transformer port voltage
gains.
VOUT2 = VIN*GAIN12
IOUT2 = IIN / GAIN12
VOUT3 = VIN*GAIN13
IOUT3 = IIN / GAIN13
See the circuit IDEALTRANS for an example of the use of this macro.
487
INT
One of the most useful functions for system modeling is the integrator. Ideally
this function provides an output which is the integral of the input signal:
Two parameters are passed to the macro by the calling circuit: SCALE and VI-
NIT. SCALE multiplies the integral and VINIT provides its initial value. This
particular implementation has a buffered output, allowing it to drive very low
impedance networks. It also has a voltage limiting resistor. The resistor keeps the
output voltage finite when there is a DC voltage input. It should be large enough
to avoid placing any practical limit on the frequency response.
Parameter Definition
SCALE Scale factor to multiply the integral by
VINIT Initial value of the integral
See the circuit SYSTEM1 for an example of the use of this macro.
The macro uses the same parameters as its parent, the INT macro.
Parameter Definition
SCALE Scale factor to multiply the integral by
VINIT Initial value of the integral
A 1 volt pulse on the Reset pin will reset the output voltage to zero. Reset is ac-
complished by the RON (1e-6) of the switch. The discharge time constant is
set by the 1e-6 resistance of the switch and the 10mF capacitor, requiring about
10*1e-6*1e-2 or 100nS for a complete discharge. Returning the Reset pin voltage
to 0 volts will then allow integration to restart.
489
Memristor
The memristor device is the fourth elementary passive element (in addition to
the resistor, capacitor, and inductor) that was first theorized about by Prof. Leon
Chua in 1971 and finally developed recently by HP Labs. It is based upon a
model developed by Zdenek Biolek, Dalibor Biolek, Vierka Biolek.
The Memristor can use either the Biolek or the Joglekar window function for
simulating the nonlinear dopant drift.
Parameter Definition
PWIDTH High state pulse width
VLOW Low state voltage level
VHIGH High state voltage level
THRESH Voltage threshold level at which the device will trigger
491
MONOSTABLE_RT
This macro is a retriggerable version of the monostable macro.
Parameter Definition
PWIDTH High state pulse width
VLOW Low state voltage level
VHIGH High state voltage level
THRESH Voltage threshold level at which the device will trigger
http://www.spectrum-soft.com/news/summer2010/mono.shtm
The single input parameter passed to the macro by the calling circuit, SCALE,
multiplies the product of the two input waveforms. The scaled product is provid-
ed at the output. This implementation is done with an NFV function source.
Parameter Definition
SCALE Scale factor to multiply the input by
493
NOISE
This macro implements a random noise generator to produce a noisy time-do-
main waveform.
Parameter Definition
TS Noise repetition rate. A new noise value is generated
every TS seconds.
VS The maximum value of the noise source. All values will
be in the range of 0.0 to VS volts.
The implementation is done with a Sample and Hold whose expression is:
.if type==2
.define TypeExp V(In) < V(Out)
.else
.define TypeExp V(In) > V(Out)
.endif
Depending upon the type parameter specified, the conditional code (in the text
page of the macro) implements a positive or negative detector.
Parameter Definition
TYPE Type = 1 for a positive peak detector
Type = 2 for a negative peak detector
495
PHOTODIODE
The model consists of a diode paralleled by a voltage-controlled current source,
G1. The source creates the light current in the junction under control of the volt-
age at the IN pin. The voltage on this pin is an analog for the optical power in
watts incident on the detector.
Parameter Definition
RESPONSIVITY Sensitivity expressed in units of amps per watt. The
exact units do not matter so long as the control voltage
pin produces the expected current,
I = RESPONSIVITY*V(IN).
IDARK Current that flows across the junction when the diode is
reverse biased and there is no illumination. The diode IS
value parameter is set equal to IDARK.
RSERIES Value of a resistor in series with the diode
CJO Junction capacitance of the photo diode
BV Junction breakdown voltage
N Diode emission coefficient. It mainly affects the slope of
the dark current vs. temperature curve.
Parameter Definition
RESPONSIVITY Sensitivity expressed in units of amps per watt. The
exact units do not matter so long as the control voltage
pin produces the expected current,
I = RESPONSIVITY*V(IN).
497
PID Controller
The PID (Proportional-Integral-Derivative) controller is a common feedback
mechanism used within closed loop control systems. The controller automatically
adjusts a variable to keep a specified measurement at a set point. It can be found
in temperature, flow, and position control applications. The macro employs other
math function macros, SUB, AMP, INT, DIF, and SUM.
Parameter Definition
KP Proportional scale value
KI Integral scale value
KF Derivative scale value
To sweep the pot wiper arm, step the Value field of the macro resistor R1 from
the Stepping dialog box. The stepped value will override the default percent pa-
rameter. See POTDEMO.CIR for an example.
Parameter Definition
Potsize Maximum resistance value
Percent Percent of Potsize between PINA and PINB
See the circuit POTDEMO for an example of the use of this macro.
499
PSK
This is a phase-shift keyer.
Parameter Definition
WMAG Magnitude of the output waveform
NC Number of cycles of the output waveform that will occur
in the duration of one bit of the input waveform
TB Duration of a single bit in seconds
See the circuit PSK2 for an example of the use of this macro.
Parameter Definition
IH DC holding current
IGT Gate trigger current
TON Turn-on time
VTMIN Minimum anode to cathode on-state voltage
VDRM Maximum repetitive peak off-state voltage
DVDT Critical rate of rise of off-state voltage
TQ Turn-off time
K1 Tweak factor for DVDT
K2 Tweak factor for TQ
See the circuit THY1 for an example of the use of this macro.
501
PWM
This macro models a pulse width modulator and is implemented with a ramp
voltage source and a function source with the expression:
Vo+Va*tanh(100k*(v(In,Ramp)))
Parameter Definition
MODHIGH High voltage value of the modulating waveform
MODLOW Low voltage value of the modulating waveform
MODFREQ Frequency of the modulating waveform
MODTYPE 1 = Trailing edge modulation
2 = Leading edge modulation
3 = Centered pulse modulation
PWMHIGH High voltage value of the PWM output
PWMLOW Low voltage value of the PWM output
The PWM_NT macro is the same circuit without the T flip flop.
Parameter Definition
VOFF VDD voltage at which regulation ceases
VON VDD voltage at which regulation begins
See the circuit UC1845_BOOST circuit for an example of the use of this macro.
503
RELAY1
This relay model includes a user-specified coil resistance and inductance. The
coil current is sensed and converted to a voltage by H1 which drives a Schmitt
macro to provide hysteresis between the ION and IHOLD currents. The output of
the Schmitt drives a standard voltage controlled switch S1.
Parameter Definition
RCOIL Resistance of the relay coil
LCOIL Inductance of the relay coil
RON Closed resistance of the output switch
ROFF Open resistance of the output switch
ION Input current required to close the relay contacts
IOFF Input current required to hold the relay contacts closed
See the circuit RELAY for an example of the use of this macro.
Parameter Definition
RCOIL Resistance of the relay coil
LCOIL Inductance of the relay coil
RON Closed resistance of the output switch
ROFF Open resistance of the output switch
See the circuit RELAY for an example of the use of this macro.
505
RESONANT
This macro implements a resonant circuit with a resistor, capacitor, and inductor.
The L value is entered as an input parameter, LIN. The C value is computed from
the LIN and F0 input parameters. The resistor is computed from all three input
parameters. The implementation is as follows:
Parameter Definition
LIN Value of inductance
F0 Center frequency
Q0 Quality factor
Parameter Definition
RNOM Nominal resistance value at 0C
A Linear temperature coefficient
B Quadratic temperature coefficient
C Quartic temperature coefficient
507
SCHMITT
This circuit is a macro model for a Schmitt trigger, a circuit with a large number
of uses, including noise filtering, hysteresis, and level shifting. The circuit looks
like this:
Parameter Definition
X1 Lower limit of input state change voltage
X2 Upper limit of input state change voltage
Y1 Lower limit of output voltage
Y2 Upper limit of output voltage
ROUT Output Resistance of circuit
SIGN -1 for inverting version, 1 for non-inverting version
See the circuit OSC1 for an example of the use of this macro.
Parameter Definition
IH DC holding current
IGT Gate trigger current
TON Turn-on time
VTMIN Minimum anode to cathode on-state voltage
VDRM Maximum repetitive peak off-state voltage
DVDT Critical rate of rise of off-state voltage
TQ Turn-off time
K1 Tweak factor for DVDT
K2 Tweak factor for TQ
See the circuit THY1 for an example of the use of this macro.
509
SLIP
The SLIP macro models hysteresis, or backlash. The output is zero within the slip
zone, -DX to +DX. Outside of the hysteresis zone, the output is proportional to
the input. The output is clipped to MAX.
A pair of input parameters, DX and MAX, define the slip zone and the maxi-
mum output level. The function is constructed with an NTVOFV Function table
source.
Parameter Definition
DX Slip value
MAX Maximum value
See the circuit SYSTEM2 for an example of the use of this macro.
A pair of input parameters, CSNUB and RSNUB, specify the parallel RC net-
work that provides the energy absorbing parasitics.
Parameter Definition
CSNUB Parallel capacitance value
RSNUB Parallel resistance value
511
SPARKGAP
This is a macro circuit model for a spark gap arrestor.
Parameter Definition
VTHRES Voltage at which the spark-gap strikes
VARC Voltage across the spark-gap once struck
ISUS Sustaining current under which the arc is stopped
RNEG Negative resistance once struck
LPL Lead inductance
RPL Flux loss associated with LPL
CPAR Gap capacitance
CARC Arc capacitance
See the circuit SPARK for an example of the use of this macro.
The two input parameters, KA and KB, scale each input. The scaled input signals
are then subtracted to produce the output. This implementation is done with an
NFV function source.
Parameter Definition
KA Multiplier of input A
KB Multiplier of input B
See the circuit SYSTEM2 for an example of the use of this macro.
513
SUM
Many system simulations call for a function to perform the analog addition of
two signals. The desired function is:
VOut(t) = ka Va(t) + kb Vb(t)
The two input parameters, KA and KB, scale each input. The scaled input signals
are then added to produce the output.
Parameter Definition
KA Multiplier of input A
KB Multiplier of input B
See the circuit SYSTEM2 for an example of the use of this macro.
The three input parameters, KA, KB, and KC, multiply each input. The three
scaled input signals are then added to produce the output. This implementation is
done with an NFV function source.
Parameter Definition
KA Multiplier of input A
KB Multiplier of input B
KC Multiplier of input C
See the circuit SYSTEM1 for an example of the use of the SUM3 macro.
515
TRIAC
This circuit is a macro model for a TRIAC. The macro circuit is as follows:
Parameter Definition
IH DC holding current
IGT Gate trigger current
TON Turn-on time
VTMIN Minimum anode to cathode on-state voltage
VDRM Maximum repetitive peak off-state voltage
DVDT Critical rate of rise of off-state voltage
TQ Turn-off time
K1 Tweak factor for DVDT
K2 Tweak factor for TQ
See the circuit THY1 for an example of the use of the TRIAC macro.
516 Chapter 25: Macros
TRIGGER6
This circuit is a macro model for a thyristor gate trigger circuit. The macro equiv-
alent circuit is as follows:
See the circuit RECTIFIER_45.CIR for an example of the use of this macro.
517
TRIODE
The TRIODE is a macro model of a vacuum triode device. Its equivalent circuit
is as shown below.
Parameter Definition
K Tube constant k
MU Tube constant mu
CGP Grid to plate capacitance
CGC Grid to cathode capacitance
CPC Plate to cathode capacitance
See the circuit F4 for an example of the use of the TRIODE macro.
The VCO uses a nonlinear function source, which uses the output of an integrator
stage to control the frequency. The input parameters specify the magnitude, cen-
ter frequency, and the frequency sensitivity.
Parameter Definition
VP Peak magnitude of the output signal
F0 Center frequency
KF Frequency sensitivity in Hz/Volt
519
WIDEBAND
This is a wideband model of a transformer.
Parameter Definition
RS Primary series resistance
N Number of turns
FL Low frequency breakpoint
FH High frequency breakpoint
The XTAL macro is implemented with a standard tank circuit model for crystals.
Parameter Definition
F0 Center frequency
R Resistance
Q Crystal quality factor
For examples of how to use the macro, see the circuit XTAL1, which shows a
crystal oscillator application.
521
555
The 555 is a model of the ubiquitous 555 timer circuit. Its circuit is as follows:
The 555 uses several nonlinear function sources to monitor the THRES and
TRIG input voltage values. When they cross a certain threshold the sources
switch to a high or low level and charge capacitors which drive the R and S in-
puts of a RS flip-flop. The flip-flop drives the output and an NPN which provides
a discharge path. There are no input parameters.
For examples of how to use the macro, see the circuits 555MONO, which shows
a monostable application, and 555ASTAB, which demonstrates how to use the
555 in an astable application.
You can change the power supply by using a .PARAM statement as follows:
The statement may be placed in the text area, the grid text, the User Definitions,
or an appropriate text library file.
522 Chapter 25: Macros
Chapter 26 Analog Devices
Model statements describe the model parameters for the more complex devices.
Model parameters are the numeric values to be used in the model equations.
They are obtained from model statements or binary model libraries (*.LBR).
Model equations use the numeric model parameter values in a set of mathemati-
cal equations that describe three aspects of a device's electrical behavior:
If the SPICE parameter format is not given, the component is available for use
only in schematic circuits and not in SPICE text file circuits.
523
References
This chapter provides a comprehensive guide to the device models used in Mi-
cro-Cap. It does not, however, teach the principles of analog or digital simulation,
or the operation of semiconductor devices. The following references provide a
good introduction to these and related topics:
Circuit design
1. Paul R. Gray, and Robert G. Meyer
Analysis and Design of Analog Integrated Circuits
John Wiley and Sons, 1977, 1984
5. John P. Uyemura
Introduction to VLSI Circuits and Systems
John Wiley & Sons Inc, 2002
Analog simulation
7. A. Ruehli, Editor
Circuit Analysis, Simulation and Design
Advances in CAD for LSI, Part 3, Vol 1
North-Holland 1986
8. J. Vlach, K. Singhal
Computer Methods for Circuit Analysis and Design
Van Nostrand Reinhold 1994
524 Chapter 26: Analog Devices
9. Kenneth Kundert
Designers Guide to SPICE & Spectre
Kluwer Academic Publishers, 1995
Device modeling
14. H. Statz, P. Newman, I. W. Smith, R. A. Pucel, and H. A. Haus
GaAsFET Device and Circuit Simulation in SPICE
IEEE Transactions on Electron Devices, ED - 34, 160-169 (1987)
525
18. Liu, William
MOSFET Models for SPICE Simulation Simulation including
BSIM3v3 and BSIM4
Wiley-Interscience ISBN: 0-471-39697-4
28. Kendall L. Su
Analog Filters
Chapman & Hall, 1996
RF circuits
35. Vendelin, Pavio, and Rhoda
Microwave Circuit Design
Wiley-Interscience, 1990
527
Animated analog bar
Schematic format
PART attribute
<name>
Example
BAR1
LOW attribute
<low_value>
Example
1
HIGH attribute
<high_value>
Example
2
The animated analog bar produces a colored bar whose height tracks its input
voltage. When the voltage equals low_value the bar is at a minimum. When the
voltage equals high_value the bar is at a maximum.
Example
LED2
COLOR attribute
<color name> , <on voltage> , <on current> , [rs] , [cjo]
Example
Red,1.7,0.015,250m,30p
This device is a light emitting diode whose color appears when the diode voltage
equals or exceeds <on voltage>. It is modeled as a conventional diode with the
model parameters RS set to [rs] and CJO set to [cjo]. Other model parameters are
adjusted so that the diode voltage and current match the specified <on voltage>
and <on current>. [rs] defaults to .500. [cjo] defaults to 20pF.
529
Animated DC motor
Schematic format
PART attribute
<name>
Example
MOTOR1
RPSPV attribute
<revs_per_sec_per_volt>
Example
1
RMOTOR attribute
<motor_resistance>
Example
50
LMOTOR attribute
<motor_inductance>
Example
1
The voltage on the Velocity pin is equal to the velocity in revolutions per second.
Warning: If the rotation rate is too high the display will appear to be still due to a
rapid rotation rate. A rate of 10 RPS is a good working maximum.
SPDT switch
STATE attribute
<UP | DOWN>
RON attribute
<ron>
Example
.001
ROFF attribute
<roff>
Example
1E12
GROUP attribute
<group_name | NOT group_name>
Examples
Group1
NOT Group22
Double clicking in the switch area toggles the state of these switches between
open and closed (SPST and DPST), or between up and down (SPDT). The
switches are modeled with a simple resistor whose on and off values are set by
ron (default=.001) and roff (default=1E15). Double clicking just outside of the
switch area accesses the Attribute dialog box for the device. A click on a switch
with a GROUP attribute causes all others of the same attribute to behave the
same. If group_name is preceded with the reserved word NOT, the switch be-
haves oppositely to that of switches with group_name.
531
Animated meter
Schematic format
PART attribute
<name>
Example
METER1
LOW attribute
<low>
Example
-10
HIGH attribute
<high>
Example
10
SCALE attribute
< T | G | MEG | K | m | u | n | p | f | none >
Example
m
AUTOSCALE attribute
<ON | OFF>
Example
OFF
Example
ANALOG
INPUT_RESISTANCE attribute
<rin>
Example
1E9
The animated meter is a voltage or current meter whose display can be either
analog or digital.
Click on the Digital or Analog text on the meter shape to select either an analog
or digital display.
Click on the Amps or Volts text on the meter shape to select either an ammeter or
a voltmeter.
Click on the Autoscale text on the analog meter shape to toggle between automat-
ic scaling and manual scales. In manual scaling the lower limit is set by low and
the higher limit is set by high. The digital meter mode always uses autoscaling.
The SCALE attribute is effective only when AUTOSCALE is OFF and the ANA-
LOG meter option is selected. With an input voltage of 8000, a scale of k would
read 8 when the analog range is 10 (LOW=0 and HIGH=10).
When the meter is in voltmeter mode, rin is added across the input terminals. If
unspecified, the value of rin is 1/GMIN.
When the meter is in ammeter mode, the input resistance is .001 ohms.
533
Animated relay
Schematic format
PART attribute
<name>
Example
RELAY1
LIN attribute
<input_inductance>
Example
1E-4
RIN attribute
<input_resistance>
Example
100
ION attribute
<input_on_current>
Example
50m
IOFF attribute
<input_off_current>
Example
15m
RON attribute
<on_resistance>
Example
1
ROFF attribute
<off_resistance>
534 Chapter 26: Analog Devices
Example
1E9
BIDIRECTIONAL attribute
< YES | NO >
Example
NO
The animated relay is an SPST relay that responds dynamically to changes in in-
put current. It behaves like a smooth transition, current-controlled W switch. The
relay input is modeled as an inductor of value input_inductance and a resistor of
value input_resistance.
Model Equations
Example
LIGHT1
Example
2
The animated traffic light is designed to simulate a typical traffic light. There are
three lights, red, yellow, and green. Each of the three lights is illuminated when
its input control pin voltage exceeds on_voltage.
Example
U1
Example
IO_STD
IO_LEVEL attribute
<interface subckt select value>
Example
1
Example
$G_DPWR
Example
$G_DGND
STATE attribute
<output_state>
Example
1
The animated digital switch generates a 1 or 0 at its digital output. To change the
state, double-click on the switch body.
537
Animated digital LED
Schematic format
PART attribute
<name>
Example
U1
Example
IO_STD
IO_LEVEL attribute
<interface subckt select value>
Example
1
Example
$G_DPWR
Example
$G_DGND
It is designed to represent the display of a light emitting diode. It has a single in-
put pin. Depending on the digital state or the analog voltage at the input pin, the
LED will be lit with a different color on the schematic. The colors the LED uses
are defined in the Color/Font page of the circuit's Properties dialog box. In this
page, there is a list of digital states that have a corresponding color.
Example
U1
Example
IO_STD
IO_LEVEL attribute
<interface subckt select value>
Example
1
Example
$G_DPWR
Example
$G_DGND
ON STATE attribute
<HIGH | LOW>
Example
HIGH
Each segment in the display is lit if its control pin is at the ON STATE, otherwise
it is unlit. ON STATE can be specified as either HIGH or LOW.
539
Battery
Schematic format
PART attribute
<name>
Example
V1
VALUE attribute
<value>
<value>[LOT[/#][/GAUSS|/UNIFORM|WCASE]=<tolvalue>[%]]
Examples
10 LOT=10%
3 LOT/1/Gauss=10%
5.5
The battery provides a constant voltage value. If you need a voltage source that is
dependent on other circuit variables or time, use one of the dependent sources or
the function source (NFV).
A battery can be toleranced by adding the Lot statement to the VALUE attribute.
For example, if a 10V battery was to have a 20% tolerance, the VALUE attribute
would be defined as:
10 Lot=20%
Examples
Q1 5 7 9 2N3904 1 OFF IC=0.65,0.35 M=20
Q3 C 20 OUT [SUBS] 2N3904
Schematic format
PART attribute
<name>
Examples
Q1
BB1
VALUE attribute
[area] [OFF] [IC=<vbe>[,vce]][M=<multiplier>]
Example
1.5 OFF IC=0.65,0.35
MODEL attribute
<model name>
Example
2N2222A
543
Definitions
The model parameters IS, IKF, ISE, IKR, ISC, ISS, IRB, CJC, CJE, CJS, and ITF
are multiplied by [area] and the model parameters RC, RE, RB, and RBM are
divided by [area] prior to their use in the equations below.
T is the device operating temperature and Tnom is the temperature at which the
model parameters are measured. Both are expressed in degrees Kelvin. T is set
to the analysis temperature from the Analysis Limits dialog box. TNOM is de-
termined by the Global Settings TNOM value, which can be overridden with a
.OPTIONS statement. T and Tnom may both be customized for each model by
specifying the parameters T_MEASURED, T_ABS, T_REL_GLOBAL, and
T_REL_LOCAL. For more details on how device operating temperatures and
Tnom temperatures are calculated, see the .MODEL section of the Command
Statements chapter.
The substrate node is optional and, if not specified, is connected to ground. If, in
a SPICE file, the substrate node is specified and is an alphanumeric name, it must
be enclosed in square brackets.
The model types NPN and PNP are used for vertical transistor structures and the
LPNP is used for lateral PNP structures. The isolation diode DJ and capacitance
CJ are connected from the substrate node to the internal collector node for NPN
and PNP model types, and from the substrate node to the internal base node for
the LPNP model type.
When adding new four terminal BJT components to the Component library, use
NPN4 or PNP4 for the Definition field.
VT = k•T/q
VBE = Internal base to emitter voltage
VBC = Internal base to collector voltage
VCS = Internal collector to substrate voltage
In general, X(T) = Temperature adjusted value of parameter X
Temperature effects
EG(T) = EG - .000702•T2/(T+1208)
IS(T) = IS•e((T/Tnom-1)•EG/(VT))•(T/Tnom)(XTI)
ISE(T) = (ISE/(T/Tnom)XTB)•e((T/Tnom-1)•EG/(NE•VT))•(T/Tnom)(XTI/NE)
ISC(T) = (ISC/(T/Tnom)XTB)•e((T/Tnom-1)•EG/(NC•VT))•(T/Tnom)(XTI/NC)
544 Chapter 26: Analog Devices
BF(T) = BF•(T/Tnom)XTB
BR(T) = BR•(T/Tnom)XTB
VJE(T) = VJE•(T/Tnom)-3•VT•ln((T/Tnom))-EG(Tnom)•(T/Tnom)+EG(T)
VJC(T) = VJC•(T/Tnom)-3•VT•ln((T/Tnom))-EG(Tnom)•(T/Tnom)+EG(T)
VJS(T) = VJS•(T/Tnom)-3•VT•ln((T/Tnom))-EG(Tnom)•(T/Tnom)+EG(T)
CJE(T) = CJE•(1+MJE•(.0004•(T-Tnom) + (1 - VJE(T)/VJE)))
CJC(T) = CJC•(1+MJC•(.0004•(T-Tnom) + (1 -VJC(T)/VJC)))
CJS(T) = CJS•(1+MJS•(.0004•(T-Tnom) + (1 - VJS(T)/VJS)))
Current equations
Q1 = 1/ (1 - VBC/VAF - VBE/VAR)
Q2 = IS(T)•(e(VBE/(NF•VT))-1)/IKF + IS(T)•(e(VBC/(NR•VT))-1)/IKR
QB = Q1•(1+(1+4•Q2)NK ) / 2
Current source value
ICT = IS(T)•(e(VBE/(NF•VT))-1)/QB - IS(T)•(e(VBC/(NR•VT))-1)/QB
Capacitance equations
Base emitter capacitance
GBE = base emitter conductance = ð(IBE) / ð(VBE)
545
If VBE ≤ FC•VJE(T)
CBE1 =CJE(T)•(1 - VBE/VJE(T))-MJE
Else
CBE1 = CJE(T)•(1 - FC)-(1+MJE) • (1 - FC•(1+MJE)+MJE•VBE/VJE(T))
R = IS(T)•(e(VBE/(NF•VT))-1)/(IS(T)•(e(VBE/(NF•VT))-1)+ITF)
CBE2 = GBE•TF•(1+XTF•(3•R2-2•R3)•e(VBC/(1.44•VTF)))
CBE = CBE1+CBE2
If VBC ≤ FC•VJC(T)
C = CJC(T)•(1 - VBC/VJC(T))-MJC
Else
C = CJC(T)•(1 - FC)-(1+MJC) • (1 - FC•(1+MJC)+MJC•VBC/VJC(T))
Noise
RE, RB, and RC generate thermal noise currents.
Ie2 = (4 • k • T) / RE
Ib2 = (4 • k • T) / RB
Ic2 = (4 • k • T) / RC
Both the collector and base currents generate frequency-dependent flicker and
shot noise currents.
where
KF is the flicker noise coefficient
AF is the flicker noise exponent
546 Chapter 26: Analog Devices
Bipolar transistor (Philips Mextram Level = 2 or 21)
SPICE format
Syntax
Q<name> <collector> <base> <emitter> [substrate] [thermal]
+<model name>
+ MULT=<no_parallel>
Examples
Q1 1 2 3 MM1
Q2 1 2 3 4 MM2
Q3 1 2 3 4 5 MM3
Q4 1 2 3 4 5 MM3 MULT=20
Schematic format
PART attribute
<name>
Examples
Q1
BB1
VALUE attribute
MULT=<no_parallel>
Example
MULT=100
MODEL attribute
<model name>
Example
MLX
547
Example of thermal model
.MODEL MODP PNP (LEVEL=21 ...)
549
Model parameters for Mextram bipolar transistor level 2/21
For the thermal model (Level = 21) there are three additional parameters to han-
dle thermal effects.
551
Bipolar transistor (Philips Modella Level = 500 or 501)
SPICE format
Syntax
Q<name> <collector> <base> <emitter> [substrate] [thermal]
+<model name>
+ MULT=<no_parallel>
Examples
Q1 1 2 3 MM1
Q2 1 2 3 4 MM2
Q3 1 2 3 4 5 MM3
Q4 1 2 3 4 5 MM3 MULT=20
Schematic format
PART attribute
<name>
Example
Q1
VALUE attribute
MULT=<no_parallel>
Example
MULT=100
MODEL attribute
<model name>
Example
LATPNP
553
Model parameters for Modella transistor levels 500/501
For the thermal model (Level = 501) there are three additional parameters to
handle thermal effects.
555
Capacitor
SPICE format
Syntax
C<name> <plus> <minus> [model name]
+ <capacitance> [IC=<initial voltage>]
Example
C2 7 8 120P IC=2
<plus> and <minus> are the positive and negative node numbers. The
polarity references are used to apply the initial condition.
Schematic format
PART attribute
<name>
Example
C5
CAPACITANCE attribute
<capacitance> [LOT[/#][/GAUSS|/UNIFORM|WCASE] = <tolerance>[%]]
[IC=<initial value>]
Examples
1U LOT=2% IC=1.0
120P IC=3
1N/(1+V(C1)^2)
CHARGE attribute
[charge]
Example
ATAN(V(C1))
FREQ attribute
[freq]
Example
1.2+10m*log(F)
Example
CMOD
CAPACITANCE attribute
[capacitance] may be a simple number or an expression involving time-
domain variables. It is evaluated in the time domain only. Consider the
following expression:
1N/SQRT(1+V(C1))
V(C1) refers to the value of the voltage across C1 during a transient analysis,
a DC operating point calculation prior to an AC analysis, or during a DC
analysis. It does not mean the AC small signal voltage across C1. If the DC
operating point value for V(C1) was 3, the capacitance would be evaluated
as 1N/SQRT(1+3)) =.5n. The constant value, .5n, would be used in AC
analysis.
CHARGE attribute
[charge], if used, must be an expression involving time-domain variables,
including the voltage across the capacitor and perhaps other symbolic
(.define or .param) variables.
2) If both [capacitance] and [charge] are given, the user must ensure that
[capacitance] is the derivative of [charge] with respect to the capacitor
voltage. [capacitance] = d([charge])/dV
5) If [charge] is given, its expression must involve the voltage across the
capacitor. Even for a constant capacitance, Q(C) = C*V(C).
557
6) If [capacitance] or [charge] is given as a time-varying expression, the
MODEL attribute is ignored. Capacitance and charge values are determined
solely by the expressions and are unaffected by model parameters.
FREQ attribute
If <fexpr> is given, it replaces the capacitance value determined during the
operating point. <fexpr> may be a simple number or an expression involving
frequency domain variables. <fexpr> is evaluated during AC analysis as the
frequency changes. For example, suppose the <fexpr> attribute was this:
1n + 1E-9*V(1,2)*(1+10m*log(f))
In this expression F refers to the AC analysis frequency variable and V(1,2)
refers to the AC small signal voltage between nodes 1 and 2. Note that there
is no time-domain equivalent to <fexpr>. Even if <fexpr> is present,
[capacitance] and/or [charge] will be used in transient analysis.
MODEL attribute
If [model_name] is given then the model parameters specified in a library or
a model statement are employed. If either [capacitance] or [charge] are
given as time-varying expressions, then the MODEL attribute is ignored.
Initial conditions
IC=<initial voltage> assigns an initial voltage across the capacitor.
Stepping effects
The CAPACITANCE attribute and all of the model parameters may be stepped,
in which case, the stepped value replaces [capacitance], even if it is an expres-
sion. The stepped value may be further modified by the quadratic and tempera-
ture effects.
Quadratic effects
If [model_name] is used, [capacitance] is multiplied by a factor, QF, a quadratic
function of the time-domain voltage, V, across the capacitor.
QF = 1+ VC1•V + VC2•V2
This is intended to provide a subset of the old SPICE 2G POLY keyword, which
is no longer supported.
TF = 1+TC1•(T-Tnom)+TC2•(T-Tnom)2
TC1 is the linear temperature coefficient and is sometimes given in data sheets as
parts per million per degree C. To convert ppm specs to TC1 divide by 1E6. For
example, a spec of 1500 ppm/degree C would produce a TC1 value of 1.5E-3.
T is the device operating temperature and Tnom is the temperature at which the
nominal capacitance was measured. T is set to the analysis temperature from the
Analysis Limits dialog box. TNOM is determined by the Global Settings TNOM
value, which can be overridden with a .OPTIONS statement. T and Tnom may
be changed for each model by specifying values for T_MEASURED, T_ABS,
T_REL_GLOBAL, and T_REL_LOCAL. See the .MODEL section of the Com-
mand Statements chapter, for more information on how device operating tem-
peratures and Tnom temperatures are calculated.
If tolerance percentage is zero or Monte Carlo is not in use, then the MF factor is
set to 1.0 and has no effect on the final value.
Examples
.MODEL CMOD CAP (C=2.0 LOT=10% VC1=2E-3 VC2=.0015)
.MODEL CEL CAP (C=1.0 LOT=5% DEV=.5% T_ABS=37)
559
Model parameters
Name Parameter Units Default
C Capacitance multiplier 1
LS Series inductance Henrys 0
RP Parallel resistance Ohms ∞
RS Series resistance Ohms 0
VC1 Linear voltage coefficient V-1 0
VC2 Quadratic voltage coefficient V-2 0
TC1 Linear temperature coefficient °C 0
-1
The model used for the capacitor when the parasitic values of LS, RP, and RS are
specified is as follows:
Noise effects
RS and RP, if specified, generate thermal noise currents in the usual manner.
Example
DEP1
VALUE attribute
<value>
Example
10
These ideal, linear, two-port functions transform the input voltage or current to an
output voltage or current. Input voltage is the voltage between the plus and minus
input leads. Positive input current is defined as into the plus input lead.
Model equations
Part Equation
IOFI Iout(Iin) = value• Iin
IOFV Iout(Vin) = value• Vin
VOFV Vout(Vin) = value• Vin
VOFI Vout(Iin) = value• Iin
561
Dependent sources (SPICE E, F, G, H devices)
Standard SPICE formats:
Syntax of the voltage-controlled voltage source
E<name> <plusout> <minusout> [POLY(<k>)] n1p n1m
+ [n2p n2m...nkp nkm] p0 [p1...pk] [IC=c1[,c2[,c3...[,ck]]]]
SPICE Examples
E2 7 4 POLY(2) 10 15 20 25 1.0 2.0 10.0 20.0
G2 7 4 POLY(3) 10 15 20 25 30 35 1.0 2.0 3.0 10.0 20.0 30.0
H2 7 4 POLY(3) V1 V2 V3 1.0 2.0 3.0 10.0 20.0 30.0
E1 10 20 VALUE = {V(2)*V(3)}
E2 10 20 FREQ {V(1,2)} = (0,0,0) (1K,0,0) (10K,0.001,0)
G1 10 20 TABLE{V(5,6)*V(3)} = (0,0) (1,1) (2,3.5)
E2 10 20 LAPLACE {V(5,6)} = {1/(1+.001*S+1E-8*S*S)}
Schematic format
The schematic attributes are similar to the standard SPICE format without the
<plusout> and <minusout> node numbers. The TABLE, VALUE, LAPLACE,
and FREQ features are not supported in the schematic versions of the E, F, G,
and H devices. These features are supported in the Function and Laplace devices,
described later in this chapter.
PART attribute
<name>
Example
G1
VALUE attribute
[POLY(<k>)] n1p n1m [n2p n2m...nkp nkm] p0 [p1...pk]
+ [IC=c1[,c2[,c3...[,ck]]]]
[POLY(<k>)] n1p n1m [n2p n2m...nkp nkm] p0 [p1...pk]
+ [IC=c1[,c2[,c3...[,ck]]]]
Examples
POLY(2) 10 15 20 25 1.0 2.0 10.0 20.0
POLY(3) 10 15 20 25 30 35 1.0 2.0 3.0 10.0 20.0 30.0
POLY(2) V1 V2 1.0 2.0 10.0 20.0
POLY(3) V1 V2 V3 1.0 2.0 3.0 10.0 20.0 30.0
563
Model equations
When the POLY keyword is not used, the general equation for the dependent
source function is:
The values of the exponents E1, E2, E3, ..., En are chosen by a procedure which is
best understood by referring to Table 22-1.
For a description of how the LAPLACE and FREQ versions work, see the La-
place sources section of this chapter.
565
The lightly shaded parts of the table mark the coefficients used for summing the
input variables. The heavily shaded portions of the table mark the coefficients
used for forming a product of the input variables. Other combinations of polyno-
mial products are shown in the rest of the table.
For example, to create a voltage source whose value equals the sum of three input
voltages, use this:
E1 4 0 POLY(3) 1 0 2 0 3 0 0 1 1 1
The exponents E1=1, E2=1, and E3=1 are chosen from the p1, p2, and p3 rows, re-
spectively, of the 3'rd order column. The output of this source is:
To create a current source whose value equals the product of the current flowing
in two sources, use this:
F1 3 0 POLY(2) V1 V2 0 0 0 0 1
This creates a current source whose output is a second order polynomial function
of the current flowing in the sources V1 and V2.
The exponents E1=1 and E2=1 are chosen from the p4 row and second order col-
umn. The output of this source is:
Example
D1 7 8 1N914 1.0 OFF IC=.001
Schematic format
PART attribute
<name>
Example
D1
VALUE attribute
[area] [OFF] [IC=<vd>][M=<multiplier>]
Example
10.0 OFF IC=0.65 M=2
MODEL attribute
<model name>
Example
1N914
Both formats
[area] multiplies or divides model parameters as shown in the model parameters
table. The presence of the OFF keyword forces the diode off during the first itera-
tion of the DC operating point. The initial condition, [IC=<vd>], assigns an initial
voltage to the junction in transient analysis if no operating point is done (or if the
UIC flag is set). <multiplier> is the number of parallel devices.
Example
.MODEL 1N4434 D (IS=1E-16 RS=0.55 TT=5N)
567
Diode model parameters
The diode model is the standard PSpiceTM diode model with an additional linear
parallel resistance added to account for leakage effects.
The parameters ISR, NR, IKF, NBV, IBVL, NBVL, TIKF, TBV1, TBV2, TRS1,
and TRS2 are used only if Level is set to 2. The RL parameter is used only if
Level is set to 1.
T is the device operating temperature and Tnom is the temperature at which the
model parameters are measured. Both are expressed in degrees Kelvin. T is set
to the analysis temperature from the Analysis Limits dialog box. TNOM is de-
termined by the Global Settings TNOM value, which can be overridden with a
.OPTIONS statement. T and Tnom may both be customized for each model by
specifying the parameters T_MEASURED, T_ABS, T_REL_GLOBAL, and T_
REL_LOCAL. See the .MODEL section of the Command Statements chapter, for
more information on how device operating temperatures and Tnom temperatures
are calculated.
Temperature Effects
VT = k • T / q = 1.38E-23 • T / 1.602E-19
IS(T) = IS • e((T/Tnom - 1)•EG/(VT•N)) • (T/Tnom)(XTI/N)
ISR(T) = ISR • e((T/Tnom - 1)•EG/(VT•NR)) • (T/Tnom)(XTI/NR)
IKF(T) = IKF • (1+TIKF•(T - Tnom))
BV(T) = BV • (1+TBV1•(T-Tnom)+TBV2•(T-Tnom)2)
RS(T) = RS • (1+TRS1•(T-Tnom)+TRS2•(T-Tnom)2)
VJ(T) = VJ•(T/Tnom)- 3•VT•ln(T/Tnom)- EG(Tnom)•(T/Tnom)+EG(T)
EG(T) = 1.16-.000702•T2/(T+1208)
EG(Tnom) = 1.17-.000702•Tnom2/(Tnom+1208)
CJO(T) = CJO•(1+M•(.0004•(T-Tnom) + (1 - VJ(T)/VJ)))
569
Current source equations
I = Ifwd - Irev
Inrm = IS(T) • (e(V/(VT•N)) - 1)
If IKF > 0
Kinj = (IKF /(IKF +Inrm))1/2
Else
Kinj = 1
Irec = ISR(T) • (e(V/(VT•NR)) - 1)
Kgen = ((1-V/VJ(T))2 + 0.005)M/2
Irev = IBV • (e-(V+BV(T))/(VT•NBV) - 1) + IBVL • (e-(V+BV(T))/(VT•NBVL) - 1)
Ifwd = Kinj • Inrm + Kgen • Irec
Capacitance Equations
Transit Time capacitance
Gd = DC conductance of the diode
CT = TT•Gd
If V ≤ FC•VJ(T) then
CJ = CJO(T)•(1 - V/VJ(T))-M
Else
CJ = CJO(T)•(1 - FC)-(1+M)•(1 - FC•(1+M)+M•(V/VJ(T)))
C = CT + CJ
Noise Equations
Flicker and shot noise is generated by the diode current, I. The resistors RS and
RL generate thermal noise. The noise currents are computed as follows:
Examples
D1 7 8 MM1 LS=.2u LG=.3u AB=2.4p MULT=50
D2 7 8 MDX LS=12u LG=12u AB=121p MULT=2
Schematic format
PART attribute
<name>
Example
D1
VALUE attribute
AB=<diffusion_area>
LS=<nongate_sw_length>
LG=<gate_sw_length>
MULT=<no_parallel>
Example
LS=.46u LG=.12u AB=1.5p MULT=5
MODEL attribute
<model name>
Example
MM2
571
Examples
.MODEL JUNCAP D (LEVEL=4 ...)
.MODEL JUNCAP2 D (LEVEL=200 ...)
The JUNCAP models are intended to describe the behavior of the diodes that are
formed by the source, drain, or well-to-bulk junctions in MOS devices. The cur-
rent equations are formulated and AC effects are modeled via charge equations
using the quasi-static approximation. In order to include the effects of differences
in the sidewall, bottom, and gate edge-junction profiles, each is handled separate-
ly in the model. Both diffusion and generation currents are treated in the model,
each with its own temperature and voltage dependence.
The JUNCAP and JUNCAP2 models are provided for use with the Philips MOS-
FET models 12, 20, 31, and 40. A subcircuit is usually used to bundle one of
the diodeless Philips MOSFET models (12, 20, 31, 40) with one or more of the
JUNCAP models. The PSP MOSFET employs its own built-in JUNCAP2 model.
573
Model parameters for JUNCAP2 diode level 200
575
Model parameters for JUNCAP2 diode level 200
Example
F1
FREQ attribute
[<fexpr>]
Example
1200*(1+sqrt(F/1e6))
DERIVATIVE attribute
[<Algebraic> | <Numeric> | <Default>]
Example
Algebraic
Example
1200*(1+sqrt(F/1e6))
577
Function sources provide the principle time domain analog behavioral modeling
capability. You can express a voltage or current source's time-domain dependence
on circuit variables as an algebraic formula or as a tabular function. The two ba-
sic types are distinguished by the way the value of the output current or voltage is
calculated.
Formula type
The Formula type, which is similar to the SPICE3 B device, uses an algebraic
formula, or expression, to compute the value of the output variable as a function
of any set of valid time-domain variables. There are two versions of this source:
K* pow((V(Plate)-V(Cathode)+Mu*(V(Grid)-V(Cathode))),1.5)
Table type
The Table type, which is similar to the SPICE3 A device, uses a table of ordered
data pairs which describe the output variable as a function solely of the input
variable. The table describes a time-domain transfer function.
There are several rules for constructing the data pairs in the TABLE attribute.
1. The x,y values and the pairs may be separated by commas or spaces. The
x,y values may be replaced by expressions containing constants or symbolic
variables created with a .define statement.
x1<x2<...xk
3. Output values are interpolated for input values between table values.
For example:
(-.010,-10) (.010,10)
For an NTVOFV source, this describes an ideal amplifier having a gain of 1000
with the output clipped to +-10 volts. The output value when the input is greater
than .010 is limited to +10.0. Similarly, the output value when the input is less
than -.010 is limited to -10.0.
FREQ usage
If <fexpr> is present, it replaces the ordinary small-signal AC incremental value
determined during the operating point. <fexpr> may be a simple number or an
expression involving frequency domain variables. The expression is evaluated
during AC analysis as the frequency changes. For example, suppose the <fexpr>
attribute is this:
579
1+V(3)*(1+1e6/F)
In this expression, F refers to the AC analysis frequency variable and V(3) refers
to the AC small-signal voltage from node 3 to ground. There is no time-domain
equivalent to <fexpr>. Even if <fexpr> is present, only <value> will be used in
transient analysis.
NOISE_EXPRESSION usage
If noise_expr is present, it generates a noise current equal to the expression. For
example to simulate shot noise you might use an expression like this:
1E-16 * pow(6.5ma,1.1) / F
Note that the expression should contain only frequency (F) dependent variables.
The feature is available only in the NFI source.
DERIVATIVE attribute
Derivatives of the expressions are evaluated in several ways:
Algebraic:
Algebraic formulas are created for each derivative of each variable in the expres-
sion. This is generally the preferred way as it is usually more accurate. However,
complex expressions with many variables sometimes result in large unwieldy
derivative expressions which take much longer to evaluate than simple numerical
derivatives.
Numeric:
Derivatives are calculated numerically by simple perturbation. This method often
works the best when the formulas are complex but well behaved and have no
discontinuities.
Default:
In this case derivatives are evaluated according to the state of the Global Settings
NUMERIC_DERIVATIVE flag.
See the sample circuit T1 for an example of table sources, and the sample circuits
F1, F2, F3, and F4 for examples of formula sources.
SMOKE attribute
This is the SMOKE model name.
FRACTION attribute
For limit functions, this is the fraction of the interval between high and low val-
ues where smoothing begins. For TABLE functions, the fraction of the interval
between X,Y points where smoothing begins. The fraction can be entered as a
decimal(0.1) or a percent (10%). FRACTION is limited to the range 0.0 to 0.50.
INTERPOLATION attribute
This specifies the log or linear nature of the table entries. There are four choices:
Linear_X _Linear_Y
Linear_X _Log_Y
Log_X _Linear_Y
Log_X _Log_Y
581
GaAsFET
SPICE format
Syntax
B<name> <drain> <gate> <source> <model name>
+ [area] [OFF] [IC=<vds>[,vgs]][M=<multiplier>]
Example
B1 5 7 9 2N3531 1 OFF IC=1.0,2.5 M=10
Schematic format
PART attribute
<name>
Example
B1
VALUE attribute
[area] [OFF] [IC=<vds>[,vgs]][M=<multiplier>]
Example
1.5 OFF IC=0.05,1.00
MODEL attribute
<model name>
Example
GFX_01
Example
.MODEL B1 GASFET (VTO=-2 ALPHA=2 BETA=1E-4 LAMBDA=1E-3)
582 Chapter 26: Analog Devices
Model Parameters
Name Parameter Units Def. Level Area
LEVEL Model level (1, 2, 3, or 4) 1 ALL
VTO Pinch-off voltage V -2.50 ALL
ALPHA Saturation voltage parameter V -1
2.00 ALL
BETA Transconductance coefficient A/V2 0.10 ALL *
B Doping tail extender V-1 0.30 2
LAMBDA Channel-length modulation V-1 0.00 ALL
GAMMA Static feedback parameter 0.00 3
DELTA Output feedback parameter (A-V)-1 0.00 3
Q Power law parameter 2.00 3
RG Gate ohmic resistance Ω 0.00 ALL /
RD Drain ohmic resistance Ω 0.00 ALL /
RS Source ohmic resistance Ω 0.00 ALL /
IS Gate pn saturation current A 1E-14 ALL
N Gate pn emission coefficient 1.00 ALL
M Gate pn grading coefficient 0.50 ALL
VBI Gate pn potential V 1.00 ALL
CGD Zero-bias gate-drain pn cap. F 0.00 ALL *
CGS Zero-bias gate-source pn cap. F 0.00 ALL *
CDS Fixed drain-source cap. F 0.00 ALL *
FC Forward-bias depletion coeff. 0.50 ALL
VDELTA Capacitance transition volt. V 0.20 2,3
VMAX Capacitance limiting voltage V 0.50 2,3
EG Bandgap voltage eV 1.12 ALL
XTI IS temperature coefficient 0.00 ALL
VTOTC VTO temperature coefficient V/°C 0.00 ALL
BETATCE BETA exp. temperature coeff. %/°C 0.00 ALL
TRG1 RG temperature coefficient °C-1 0.00 ALL
TRD1 RD temperature coefficient °C-1 0.00 ALL
TRS1 RS temperature coefficient °C-1 0.00 ALL
KF Flicker-noise coefficient 0.00 ALL
AF Flicker-noise exponent 1.00 ALL
T_MEASURED Measured temperature °C ALL
T_ABS Absolute temperature °C ALL
T_REL_GLOBAL Relative to current temp. °C ALL
T_REL_LOCAL Relative to AKO temperature °C ALL
583
GaAsFET model equations
T is the device operating temperature and Tnom is the temperature at which the
model parameters are measured. Both are expressed in degrees Kelvin. T is set
to the analysis temperature from the Analysis Limits dialog box. TNOM is de-
termined by the Global Settings TNOM value, which can be overridden with a
.OPTIONS statement. T and Tnom may both be customized for each model by
specifying the parameters T_MEASURED, T_ABS, T_REL_GLOBAL, and T_
REL_LOCAL. See the .MODEL section of the Command Statements chapter, for
more information on how device operating temperatures and Tnom temperatures
are calculated.
Id=BETA(T)•(1+LAMBDA•Vds)•(Vgs-VTO(T))2•Kt/(1+B•(Vgs-VTO(T)))
585
Idso = BETA•(Vgs-(VTO-GAMMA•Vds)Q•Kt
Id = Idso/(1+DELTA•Vds•Idso)
If Vds ≤ FC•VBI(T)
Cgd = CGD/(1 - Vgd/VBI(T))M
Else
Cgd = CGD•(1 - FC)-(1+M)•(1 - FC•(1+M)+M•(Vgd/VBI(T)))
K1 = (1 + Ve - VTO(T))/((Ve - VTO(T))2+DELTA2)1/2)/2
K2 = (1 + (Vgs - Vgd)/((Vgs - Vgd)2+ALPHA-2)1/2)/2
K3 = (1 - (Vgs - Vgd)/((Vgs - Vgd)2+ALPHA-2)1/2)/2
Cgs = CGS•K2•K1/(1 - Vn/VBI(T))1/2 +CGD•K3)
Cgd = CGS•K3•K1/(1 - Vn/VBI(T))1/2 +CGD•K2)
Noise
The parasitic lead resistances, RG, RD, and RS, generate thermal noise currents.
Ig2 = 4•k•T / RG
Id2 = 4•k•T / RD
Is2 = 4•k•T / RS
PART attribute
<name>
Example
X1
NAME attribute
<subckt_name>
Example
LVC_33_4_MIN
Type Purpose
IBIS_Input1 Input only with internal power supplies
IBIS_Input3 Input only with external power supplies
IBIS_Output3 Input, enable, and output pins. Internal power supplies
IBIS_Output5 Input, enable, and output pins. External power supplies
When you place the IBIS part on a schematic, Micro-Cap invokes the IBIS
Translator. It lets you select an input or output model from an IBIS source file.
Micro-Cap then creates an equivalent SPICE subcircuit model for the chosen part
and invokes the Attribute dialog box showing the subcircuit. Click the OK button
and the IBIS model is placed in the schematic.
All of this can be done manually by running the IBIS to SPICE Translator, plac-
ing the subckt generated by it in a circuit, and creating an IBIS component from
the Component editor. The IBIS component and the automatic routines that sup-
port it simply make it easier to create an IBIS part.
See the file IBIS3.CIR for an example of how the component is used.
587
IGBT
SPICE format
Syntax
Z<name> <gate> <collector> <emitter> <model name>
+ [AREA=<area>]
+ [WB=<base_width>]
+ [AGD=<agd>]
+ [KP=<kp>]
+ [TAU=<tau>]
+ [OFF]
+ [IC=[vgs[,vae[,vds[,veb]]]]]
Example
Z1 1 2 0 IXGH10N170
+ AREA=1E-4 WB=100U AGD=.1N KP=1E-5
+ TAU=100N OFF IC=1,2,3,4
Schematic format
PART attribute
<name>
Example
Z1
VALUE attribute
[AREA=<area>] [WB=<base_width>] [AGD=<agd>] [KP=<kp>]
[TAU=<tau>] [OFF] [IC=[vgs[,vae[,vds[,veb]]]]]
Example
AREA=2E-7 WB=10u
MODEL attribute
<model name>
Example
IXGH10N170
The [OFF] keyword forces the device off for the first iteration of the operating
point. The initial condition, IC=[vgs[,vae[,vds[,veb]]]], assigns initial voltages to
the model nodes. Additional model information can be found in these references:
Modelling Buffer Layer IGBT’s for Circuit Simulation, Allen R. Hefner Jr, IEEE
Transactions on Power Electronics, Vol. 10, No. 2, March 1995
589
VT 4.7 Threshold voltage
VTD 1m Gate-drain overlap depletion threshold
WB 90u Metallurgical base width
IGBT model
Definitions
IMOS = MOSFET channel current (amps)
IC = IT = Collector or anode current (amps)
ICSS = Steady-state (bipolar) collector current (amps)
IBSS = Steady-state base current (amps)
IMOS
Vgst<0
IMOS = 0
IC (or IT)
Vgst<0
IC = IT = Vae/Rb
ICSS
Veb<= 0
ICSS = 0
Veb > 0
ICSS = IT/(1+b) + b•(4•Dp/W2)*Qeb/(1+b)
591
IBSS
Veb<= 0
IBSS = 0
Veb > 0
IBSS = Qeb/TAU + (Qeb2/QB)•(4•NB2/Ni2)•JSNE•AREA
IMULT
Imult = (M–1)•(IMOS + ICSS) + M•Igen
Gate-source
Cgs = CGS
Qgs = CGS•VGS
Drain-source
Wdsj = sqrt(2•Esi•(Vds+.6)/(q•NB))
Cds = (AREA-AGD)•Esi/ Wdsj
Qds = q•(AREA-AGD)•NB•Wdsj
Drain-gate
Vds = Vgs - VTD
Cdg = Cdgj•COXD/(Cdgj+COXD)
Wdgj = sqrt(2•Esi•(Vdg+.6)/(q•NB))
Cdgj = AGD•Esi/Wdgj
Cx = COXD•Wdgj/(Esi•AGD)
Qdg = (q•NB•Esi•AGD2/COXD)•Cx-log(1+Cx))-COXD•VTD
Ccer
Wbcj = sqrt(2•Esi•(Vbc+.6)/(q•NB))
Cbcj = AREA•Esi/Wbcj
Ccer = Qeb•Cbcj/(3•QB)
Cmult
Cmult = (M-1)•Ccer
Qmult = (M-1)•Qcer
Emitter-base
Ceb = d(Qeb)/d(Veb)
Qmult = (M-1)•Qcer
Examples
V3 2 0 DC 0 AC 1 0 SIN 0 1 1MEG 100NS 1E6 0 ;voltage-sin
V5 3 0 DC 0 AC 1 0 EXP 0 1 100N 100N 500N 100N ;voltage-exp
I3 4 0 DC 0 AC 1 0 SFFM 0 1 1E6 .5 1E7 ;current-sffm
V1 5 0 DC 1 AC 1 0 NOISE 10N 1 100N 700N 1 ; voltage-noise
Schematic format
These are the Voltage Source and Current Source components from
Component / Analog Primitives / Waveform Sources.
PART attribute
<name>
Example
V1
VALUE attribute
<value> where value is identical to the SPICE format without the name and
the plus and minus node numbers.
Examples
DC 1 PULSE 0 1MA 12ns 8ns 120ns 240ns 500ns
DC 0 AC 1 0 SFFM 0 2 2E6 .5 1E7
593
Equations
The equations and sample waveforms that follow are for transient analysis
only. AC analysis uses AC magval (volts) and AC phaseval (degrees) to set
the amplitude and phase of the small signal stimulus. TSTEP is the print
interval. TSTOP is the run time. These values are obtained from the Analysis
Limits dialog box. For SPICE files, Micro-Cap obtains these values from the
.TRAN statement and copies them to the Analysis Limits dialog box.
EXP type
Name Description Units Default
v1 Initial value V or A None
v2 Peak value V or A None
td1 Rise delay S 0
tc1 Rise time constant S TSTEP
td2 Fall delay S td1+TSTEP
tc2 Fall time constant S TSTEP
From To Value
0 td v1
td td+tr v1+((v2-v1)/tr)•(T-td)
td+tr td+tr+pw v2
td+tr+pw td+tr+pw+tf v2+((v1-v2)/tf)•(T-td-tr-pw)
td+tr+pw+tf per v1
where From and To are T values, and T=TIME mod per. The waveform
repeats every per seconds.
Figure 26-12 Waveform for "PULSE .4 1.6 .1u .1u .2u .1u .5u"
595
Smoothing
The normal, unsmoothed waveform has sharp angles. For a smoother
waveform use either the tanh or quadratic smoothing. The fraction parameter
specifies the fraction of the rise time or fall time over which smoothing
occurs. It applies only to quadratic smoothing. Here is an example of the
three waveform shapes.
This constraint helps to ensure that there is adequate time in which to include the
transition regions.
Note the fraction value is limited to the range 0 to 0.5. 0 means no smoothing and
.50 means smoothing out to the 50% point between the rise and fall edges.
597
SIN type
From To Value
0 td vo
td TSTOP vo+va•sin(2•π•(f0•(T-td)+ph/360))•e-(T-td)•df
where T = Transient analysis time
General Form:
PWL
+ [TRIGGER=<{trigger_expression}>]
+ [TIME_SCALE_FACTOR=<ts_value>]
+ [VALUE_SCALE_FACTOR=<vs_value>]
+(data_pairs OR FILE="filename")
The file "filename" must be a text file and its content must use the same
format as used above in data_pairs.
Each data pair specifies one point on the waveform curve. Intermediate
values are linearly interpolated from the table pairs. There is no specific limit
on the number of data pairs in the table. They may be added indefinitely until
system memory is exhausted.
599
Examples:
VALUE attribute for a single 5 volt or amp 5ns wide pulse:
PWL (0,0) (5n,0) (5n,5) (10n,5) (10n,0)
VALUE attribute for another single 5 volt or amp 5ns wide pulse:
PWL TIME_SCALE_FACTOR=1n (0,0) (5,0) (5,5) (10,5) (10,0)
VALUE attribute for a single 5000 volt or amp 5ns wide pulse:
PWL VALUE_SCALE_FACTOR=1E3 (0,0) (5n,0) (5n,5) (10n,5) (10n,0)
The blue curve is normal (no smoothing). The red curve is with smoothing
enabled. Note that you may need to use a small time step to be able to see the
smoothed regions.
601
Noise Type
The waveform starts at the dcvalue and stays there through start_time.
Interval seconds later a random value between + amplitude/2, and
- amplitude/2 is added to the baseline dcvalue. Interval seconds later another
random value is added to the dcvalue and the source is updated. This process
is repeated every interval seconds until end_time where the waveform value
returns to the dcvalue. The value at T = start_time and T = end_time is
dcvalue. The first random value occurs at T = start_time + interval. The last
random value occurs at T = end - interval.
If seed is >=1 the values are random but are the same on every run.
Otherwise the values are both random and different on every run. The seed is
initialized at the beginning of every temperature, Monte Carlo, or stepping
run.
This source type is an extension to the standard SPICE Voltage Source and
Current Source.
602 Chapter 26: Analog Devices
Gaussian Type
This source type is an extension to the standard SPICE voltage and current
sources.
603
Inductor
SPICE format
Syntax
L<name> <plus> <minus> [model name]
+ <inductance> [IC=<initial current>]
Examples
L1 2 3 1U
L2 7 8 120P IC=2
<plus> and <minus> are the positive and negative node numbers.
Positive current flows into the plus node and out of the minus node.
Schematic format
PART attribute
<name>
Example
L1
INDUCTANCE attribute
<inductance> [LOT[/#][/GAUSS|/UNIFORM|WCASE] = <tolerance>[%]]
[IC=<initial current>]
Examples
1U LOT=10% IC=.002
1U/(1+I(L2)^2)
FLUX attribute
[flux]
Example
1u*ATAN(I(L2))
FREQ attribute
[fexpr]
Example
1.2mh+5m*(1+log(F))
Examples
LMOD
INDUCTANCE attribute
[inductance] may be either a simple number or an expression involving
time-varying variables. Consider the following expression:
1u/(1+I(L2)^2)
FLUX attribute
[flux], if used, must be an expression involving time-domain variables,
including the current through the inductor and possibly other symbolic
(.define or .param) variables.
[inductance] = d([flux])/dI
605
6) If [inductance] or [flux] is given as a time-varying expression, the
MODEL attribute is ignored and the inductor cannot be referenced by a K
device (mutual inductance). The inductance and flux values are determined
solely by the expressions and are unaffected by model parameters.
Time-varying expression means any expression that uses a variable that can
vary during a simulation run, such as V(L1) or I(L2).
FREQ attribute
If <fexpr> is used, it replaces the value determined during the operating
point. <fexpr> may be a simple number or an expression involving frequency
domain variables. The expression is evaluated during AC analysis as the
frequency changes. For example, suppose the <fexpr> attribute is this:
10mh+I(L1)*(1+1E-9*f)/5m
In this expression, F refers to the AC analysis frequency variable and I(L1)
refers to the AC small signal current through inductor L1. Note that there
is no time-domain equivalent to <fexpr>. Even if <fexpr> is present,
[inductance] will be used in transient analysis.
Initial conditions
The initial condition assigns an initial current through the inductor in transient
analysis if no operating point is done (or if the UIC flag is set).
Stepping effects
Both the INDUCTANCE attribute and all of the model parameters may be
stepped. If the inductance is stepped, it replaces [inductance], even if it is an
expression. The stepped value may be further modified by the quadratic and tem-
perature effects.
Quadratic effects
If [model name] is used, [inductance] is multiplied by a factor, QF, which is a
quadratic function of the time-domain current, I, through the inductor.
QF = 1+ IL1•I + IL2•I2
This is intended to provide a subset of the old SPICE 2G POLY keyword, which
is no longer supported.
Temperature effects
The temperature factor is computed as follows:
606 Chapter 26: Analog Devices
If [model name] is used, [inductance] is multiplied by a temperature factor, TF.
TF = 1+TC1•(T-Tnom)+TC2•(T-Tnom)2
TC1 is the linear temperature coefficient and is sometimes given in data sheets as
parts per million per degree C. To convert ppm specs to TC1 divide by 1E6. For
example, a spec of 200 ppm/degree C would produce a TC1 value of 2E-4.
T is the device operating temperature and Tnom is the temperature at which the
nominal inductance was measured. T is set to the analysis temperature from the
Analysis Limits dialog box. TNOM is determined by the Global Settings TNOM
value, which can be overridden with a .OPTIONS statement. T and Tnom may
be changed for each model by specifying values for T_MEASURED, T_ABS,
T_REL_GLOBAL, and T_REL_LOCAL. See the .MODEL section of the Com-
mand Statements chapter, for more information on how device operating tem-
peratures and Tnom temperatures are calculated.
If tolerance percentage is zero or Monte Carlo is not in use, then the MF factor is
set to 1.0 and has no effect on the final value.
607
Examples
.MODEL LMOD IND (L=2.0 LOT=10% RS=5m IL1=2E-3 IL2=.0015)
.MODEL L_W IND (L=1.0 LOT=5% DEV=.5% CP=1.8p T_ABS=37)
Model parameters
Name Parameter Units Default
L Inductance multiplier 1
CP Parallel capacitance F 0
RS Series resistance Ohms 0
IL1 Linear current coefficient A-1 0
IL2 Quadratic current coefficient A-2 0
TC1 Linear temperature coefficient °C-1 0
TC2 Quadratic temperature coefficient °C-2 0
T_MEASURED Measured temperature °C
T_ABS Absolute temperature °C
T_REL_GLOBAL Relative to current temperature °C
T_REL_LOCAL Relative to AKO temperature °C
The model used for the inductor when the parasitic values of CP and RS are
specified is as follows:
Noise effects
The parasitic resistance RS, if specified, generates a thermal noise current in the
usual manner, IRS = (4•k•T / RS)0.5
608 Chapter 26: Analog Devices
Isource
Schematic format
PART attribute
<name>
Examples
I1
CURRENT_SOURCE
VALUE attribute
<value>[LOT[/#][/GAUSS|/UNIFORM|WCASE]=<tolvalue>[%]]
Examples
5
10u LOT/1/Gauss=10%
10m
609
JFET
SPICE format
Syntax
J<name> <drain> <gate> <source> <model name>
+ [area] [OFF] [IC=<vds>[,vgs]] [M=<multiplier>]
Example
J1 5 7 9 2N3531 1 OFF IC=1.0,2.5
Schematic format
PART attribute
<name>
Example
J1
VALUE attribute
[area] [OFF] [IC=<vds>[,vgs]] [M=<multiplier>]
Example
1.5 OFF IC=0.05,1.00
MODEL attribute
<model name>
Example
JFET_MOD
Examples
.MODEL J1 NJF (VTO=-2 BETA=1E-4 LAMBDA=1E-3)
.MODEL J2 PJF (VTO= 2 BETA=.005 LAMBDA=.015)
Model Parameters
Name Parameter Units Def. Area
611
Model equations
Temperature Dependence
T is the device operating temperature and Tnom is the temperature at which the
model parameters are measured. Both are expressed in degrees Kelvin. T is set
to the analysis temperature from the Analysis Limits dialog box. TNOM is de-
termined by the Global Settings TNOM value, which can be overridden with a
.OPTIONS statement. Both T and Tnom may be customized for each model by
specifying the parameters T_MEASURED, T_ABS, T_REL_GLOBAL, and T_
REL_LOCAL. See the .MODEL section of the Command Statements chapter, for
more information on how device operating temperatures and Tnom temperatures
are calculated.
IDRAIN = 0
613
Capacitance equations
If Vgs ≤ FC • PB(T) then
Cgs = area· CGS(T)/(1 - Vgs/PB(T))M
Else
Cgs = area· CGS(T)•(1 - FC•(1+M)+M•(Vgs/PB(T)))/ (1 - FC) (1+M)
Noise
The resistors RS and RD generate thermal noise currents.
Examples
K1 L1 L2 .98
K1 L1 L2 L3 L4 L5 L6 .98
Schematic format
PART attribute
<name>
Example
K1
INDUCTORS attribute
<inductor name> <inductor name>*
Example
L10 L20 L30
COUPLING attribute
<coupling value>
Example
0.95
MODEL attribute
[model name]
Example
K_3C8
If <model name> is used, there can be a single inductor name in the INDUC-
TORS attribute. If model name is not used, there must be at least two inductor
names in the INDUCTORS attribute.
615
The K device specifies a mutual inductance between two or more linear induc-
tors. You can specify a nonlinear magnetic core by using a MODEL attribute.
A resistive impedance of 1/GMIN is added between the positive pins of the cou-
pled inductors to avoid DC convergence problems.
where Ii is the current flowing into the plus lead of the i'th inductor and Ii' is its
time derivative. For linear inductors, <model name> is not used.
1. The linear K device becomes a nonlinear magnetic core. The model for the
core is a variation of the Jiles-Atherton model.
3. The list of coupled inductors may contain just one inductor. Use this method to
create a single magnetic core device, not coupled to another inductor.
The nonlinear magnetics model is based on the Jiles-Atherton model. This model
is based upon contemporary theories of domain wall bending and translation. The
anhysteretic magnetization curve is described using a mean field approach. All
magnetic domains are coupled to the bulk magnetization and magnetic fields. The
anhysteretic curve is regarded as the magnetization curve that would prevail if
there were no domain wall pinning. Of course, such pinning does occur, mainly
at defect sites. The hysteresis effect that results from this pinning is modeled as a
simple frictional force, characterized by a single constant, K. The resulting state
equation produces a realistic ferromagnetic model.
This procedure creates two coupled cores whose magnetic properties are con-
trolled by the KCORE model statement. See the sample circuit file CORE3 for an
example of multiple, coupled core devices.
Examples
.MODEL K1 CORE (Area=2.54 Path=.54 MS=2E5)
.MODEL K2 CORE (MS=2E5 LOT=25% GAP=.001)
Model parameters
Name Parameter Units Default
Area Mean magnetic cross-section cm2 1.00
Path Mean magnetic path length cm 1.00
Gap Effective air gap length cm 0.00
MS Saturation magnetization a/m 4E5
A Shape parameter a/m 25
C Domain wall flexing constant .001
K Domain wall bending constant 25
Note that the model parameters are a mix of MKS or SI units (a/m) and CGS
units (cm and cm2).
Model Equations
Definitions and Equations
All calculations are done in MKS (SI) units
µ0 = magnetic permeability of free space = 4*PI*1e-7 Webers/Amp-meter
N= number of turns
Ma = Anhysteretic magnetization
H = Magnetic field intensity inside core
B = Magnetic flux density inside core
M = Magnetization due to domain alignment
I = Core current
V = Core voltage
Ma = MS • H/( |H| +A)
Sign = K if dH/dt > 0.0
Sign= - K if dH/dt <= 0.0
618 Chapter 26: Analog Devices
dM/dH = (Ma-M) / ((Sign)•(1+C)) + (C / (1+C))•dMa/DH
B = µ0 • (H +M)
L = µ0 • (1+dM/dH) • N2 • AREA / PATH
V = L • dI/dt
To derive model parameters from data sheet values, use the MODEL program.
Doing it manually requires this procedure:
1. Many data sheets provide the value of Bsat in Gauss. To calculate the required
value of MS in units of Amps/meter, multiply the Bsat value in Gauss by 79.577.
This yields the required model value for MS in Amps/meter.
2. Run the sample circuit CORE.CIR and adjust the values of A, K, and C, to fit
the data sheet BH curve. The effect of increasing each parameter is as follows:
Parameter µ HC BR
A - + +
K + +
C + - -
619
Laplace sources
Schematic format
PART attribute
<name>
Examples
FIL1
LOW1
Example
1/(1+.001*S+1E-8*S*S)
Example
(0.0,1.0,0.0) (1Meg,0.9,-10) (10Meg,0.2,-35)
Examples
DB RAD
MAG DEG
R_I
There is no SPICE version of this source. Use the Dependent source, E or G de-
vice.
The keywords DB, MAG, DEG, RAD, R_I are interpreted as follows:
In AC analysis, the value of the transfer function is computed from the algebraic
expression involving S, where S = 2•π•frequency•j, or obtained by interpolation
from the given table.
For DC analysis, the value of the transfer function is computed from the given
algebraic expression involving S, where S = 0, or obtained from the table, using
the lowest frequency data point supplied.
The accuracy of this procedure is limited by the number of time points in the
impulse response, or alternatively, by the bandwidth of the function. As a practi-
cal matter, no more than 8192 time points should be computed for the impulse
response, due to memory and time limitations. The actual number of time points,
N, is a logarithmic function of the value of RETOL.
N=2 6-log10(RELTOL)
For example, for RELTOL= .001, 512 time points are computed.
As a general rule, Laplace sources will give the best transient analysis results on
narrow band functions. Wide band functions, such as the differentiator, f(s)=s,
and the integrator, f(s)=1/s, are best modeled by using discrete components. See
the sample circuits INT (integrator macro) and DIF(differentiator macro).
621
Formula types
The input and output variables and definition names for the Laplace formula
sources are as follows:
Table types
In a Table type, the transfer function is defined with a table. The table contains
ordered triplets of numbers listing the frequency, magnitude or real value, and
phase or imaginary value of the transfer function. The general form of the table
entries is:
The table may be entered directly as the parameter string or indirectly using the
.define statement. For illustration, see the circuit P1.
The input variable and output variables and definition names are as follows:
623
Macro
Schematic format
PART attribute
<name>
Example
2N5168
FILE attribute
<macro circuit name>
Example
SCR
Macros are the schematic equivalents of subcircuits. They are circuit building
blocks that have been created and saved to disk for use in other circuits.
To create a macro:
1. Create a circuit. Place grid text on the nodes that you want to make available
as macro pins. If you want to pass numeric parameters to the macro, use sym-
bolic variables for attributes and/or model parameter values and declare these
names in a .parameters statement. Save the circuit to the LIBRARY folder using
the desired macro name with an extension of .MAC.
Alternatively, create the circuit as in Step 1, then use the make Macro command
at Edit / Box / Make Macro. It automates Step 2.
Select the macro from the Component library. Place it in the circuit that will
use it and edit its parameters, if it has any. You can also use an alias which,
using a .macro statement, substitutes a short name like 2N5168 for the macro
FILE name and a corresponding set of parameters.
This statement lets you store the parameters that turn a general macro for, say an
SCR, into a specific model for a specific part like the 2N5168 SCR, and to access
the part with a simple meaningful name, like 2N5168. For more information on
the .MACRO statement see the Command Statements chapter.
When a macro is placed in a circuit, the program reads the macro circuit file,
determines if it has parameters from the .PARAMETERS statement in the macro
circuit file and shows these parameters and their default values in the Attribute
dialog box. Edit the parameter values from their default values to those you want.
625
MOSFET
SPICE format
Syntax
M<name> <drain> <gate> <source> <bulk> <model name>
+ [M=<mval>]
+ [L=<length>] [W=<width>] [AD=<drainarea>] [AS=<sourcearea>]
+ [PD=<drainperiphery>] [PS=<sourceperiphery>]
+ [NRD=<drainsquares>] [NRS=<sourcesquares>]
+ [NRG=<gatesquares>] [NRB=<bulksquares>]
+ [OFF][IC=<vds>[,vgs[,vbs]]]
Example
M1 5 7 9 0 IRF350 L=1.5E-6 W=0.25 OFF IC=25.0,8.0
Schematic format
PART attribute
<name>
Example
M1
VALUE attribute
[M=<mval>]
+ [L=<length>] [W=<width>] [AD=<drainarea>] [AS=<sourcearea>]
+ [PD=<drainperiphery>] [PS=<sourceperiphery>]
+ [NRD=<drainsquares>] [NRS=<sourcesquares>]
+ [NRG=<gatesquares>] [NRB=<bulksquares>]
+ [OFF][IC=<vds>[,vgs[,vbs]]]
Examples
M=20 NRD=10 NRS=25 NRG=5
L=.35u IC=.1, 2.00
L=.4u W=2u OFF IC=0.05,1.00
MODEL attribute
<model name>
Examples
IRF350
MM150
626 Chapter 26: Analog Devices
Supported Models
<width> and <length> are the drawn device dimensions, before side diffusion, in
meters. They can be specified as device attributes, model parameters, or by us-
ing the global default values, DEFW and DEFL. For Levels 1-3, and BSIM 1-3,
DEFNRD and DEFNRS define default drain and source squares, and DEFPD and
DEFPS default drain and source periphery. Device attributes supersede model
parameters, which supersede the global values from the Global Settings dialog
box or a local .OPTIONS statement.
The parasitic resistances may be specified directly with the model parameters
RS, RD, RG, and RB. If unspecified, they are calculated from the product of
the sheet resistivity, RSH, and the number of squares terms, <drainsquares>,
<sourcesquares>, <gatesquares>, and <bulksquares>. If these terms are absent,
or zero, and the model parameters RS, RD, RG, and RB are absent or zero,
then the parasitic resistances are not included in the model. <drainsquares> and
<sourcesquares> default to 0. The other parameter line values also default to
zero.
627
<mval> is a multiplier (default = 1) that provides a way to simulate the effect of
paralleling many devices. It multiplies the effective width, overlap, and junction
capacitances, and the junction currents. It multiplies the drain and source areas,
the device width, and the two peripheries, and divides the four resistances RS,
RD, RG, and RB.
Examples
.MODEL M1 NMOS (W=0.2 L=0.8U KP=1E-6 GAMMA=.65)
.MODEL M2 PMOS (W=0.1 L=0.9U KP=1.2E-6 LAMBDA=1E-3)
Temperature effects
T is the device operating temperature and Tnom is the temperature at which the
model parameters are measured. Both are expressed in degrees Kelvin. T is set
to the analysis temperature from the Analysis Limits dialog box. TNOM is deter-
mined by the Global Settings TNOM value, which can be overridden with a .OP-
TIONS statement. T and Tnom may be customized for each model by specifying
the parameters T_MEASURED, T_ABS, T_REL_GLOBAL, and T_REL_LOCAL.
For details on how device temperatures and Tnom temperatures are calculated,
see the .MODEL section of the Command Statements chapter.
Current equations
Only the Level 1 N-channel drain equations are shown here. The Level 2 and
Level 3 current equations are too complex for presentation in this manual. Inter-
ested users should consult reference (22) for more information.
K = KP • W/ (L - 2 • LD)
VTH = VTO + GAMMA • ((PHI - VBS)1/2- √(PHI))
Id = 0.0
Linear region: For Vgs > VTH and Vds < (Vgs - VTH)
Saturation region: For Vgs > VTH and Vds > (Vgs - VTH)
Capacitance equations
Meyer model for gate capacitance
Levels 1-3 use the capacitance model proposed by Meyer. The charges are mod-
eled by three nonlinear capacitances, Cgb, Cgd, and Cgs.
631
Depletion region (Von - PHI < Vgs < Von)
Cgb = Cox • (Von - Vgs)/PHI + CGBO • Leff
Cgs = 2/3 • Cox • ((Von - Vgs)/PHI + 1) + CGSO • W
Cgd = CGDO • W
Linear region:
For Vgs > Von + Vds,
Cgb = CGBO • Leff
Cgs = Cox • (1 - ((Vgs - Vds - Von)/(2•(Vgs - Von) - Vds))2) + CGSO • W
Cgd = Cox • (1 - ((Vgs - Von)/(2•(Vgs - Von) - Vds))2) + CGDO • W
Junction capacitance
If CBS=0 and CBD=0 then
Cbs = CJ(T)•AS•f1(VBS) + CJSW(T)•PS•f2(VBS) + TT•GBS
Cbd = CJ(T)•AD•f1(VBD) + CJSW(T)•PD•f2(VBD) + TT•GBD
else
Cbs = CBS(T)•f1(VBS) + CJSW(T)•PS•f2(VBS) + TT•GBS
Cbd = CBD(T)•f1(VBD) + CJSW(T)•PD•f2(VBD) + TT•GBD
633
Model parameters for BSIM2 level 5
These are the model parameters for the BSIM 2 model, level 5. All parameters
are binnable except those marked with an asterisk.
635
Model parameters for BSIM3 level 8 and 49
These are the model parameters for the BSIM 3 model. This is the Berkeley
BSIM3v3.3, dated 7/29/2005. All parameters are binnable except those marked
with an asterisk.
637
Model parameters for BSIM3 level 8 and 49
639
Model parameters for BSIM3 level 8 and 49
641
Model parameters for BSIM4 level 14
These are the model parameters for the BSIM4.5.0 model dated July 29, 2005.
All parameters are binnable except those marked with an asterisk. Default entries
specify NMOS, PMOS default values where they differ.
643
Model parameters for BSIM4 level 14
645
Model parameters for BSIM4 level 14
647
Model parameters for BSIM4 level 14
649
Model parameters for BSIM4 level 14
651
Model parameters for BSIM4 level 14
Binning in BSIM1 and BSIM2 uses the Berkeley method and uses the length and
width terms only.
Binning for both BSIM3 (Level = 8 or Level = 49) and BSIM4 (Level = 14) uses
length, width, and product terms. There are two ways to bin in these models:
Leff = L - 2*DL
Weff = W - 2*DW
X = X0 + XL/Leff + XW/Weff + XP/Leff/Weff
HSPICE method
This method uses the model parameters LMIN, LMAX, WMIN, WMAX, LREF,
and WREF to provide multiple cell binning. LMIN, LMAX, WMIN, WMAX
define the cell boundary. LREF and WREF are offset values used to interpolate a
value within the cell boundaries. The model parameters are assumed to apply for
the case Leff = Lref and Weff = Wref.
When this method is used Micro-Cap expects to find multiple model statements
(or parameter sets) of the form:
653
Here NC is the basic model name and NC.1, NC.2, ... are the model parameters
for the W values between WMIN to WMAX and L values between LMIN to
LMAX.
Micro-Cap selects the model statement or parameter set for which the following
statements are both true:
If it can't find a model statement (or parameter set) for which these conditions are
true, an error message is generated.
Once the model statement (or parameter set) is selected the binnable parameters
are calculated as follows:
Leff = L - 2*DL
Weff = W - 2*DW
Note that the starting values of L and W are those specified on the device line for
a SPICE netlist device or in a VALUE attribute for a schematic device. Micro-
Cap allows L and W to be specified in the model statement also, but binning
always uses the L and W specified at the device level.
BSIM3 and BSIM4 use the parameter VTH0M to account for short-distance
VTH matching. The device threshold is adjusted as follows:
The EKV device format is similar to other MOSFETs but has a few more device
parameters that are not found in the other models.
SPICE format
Syntax
M<name> <drain> <gate> <source> <bulk> <model name>
+ [L=<length>] [W=<width>] [AD=<drainarea>] [AS=<sourcearea>]
+ [PD=<drainperiphery>] [PS=<sourceperiphery>]
+ [NRD=<drainsquares>] [NRS=<sourcesquares>]
+ [NRG=<gatesquares>] [NRB=<bulksquares>]
+ [NP|M=<no_parallel>] [NS|N=<no_series>]
+ [SCALE=<scale>] [GEO=<geometry_model>]
+ [TEMP=<temperature>]
+ [OFF][IC=<vds>[,vgs[,vbs]]]
Examples of device instance
M1 5 7 9 0 IRF350 L=1.5E-6 W=0.25 NP=10 OFF IC=25.0,8.0
MS 1 2 3 4 NSC SCALE=.8 GEO=2 NRD=1 NRS=2 AS=1E-12 AD=1E-12
Schematic format
PART attribute
<name>
VALUE attribute
[L=<length>] [W=<width>] [AD=<drainarea>] [AS=<sourcearea>]
+ [PD=<drainperiphery>] [PS=<sourceperiphery>]
+ [NRD=<drainsquares>] [NRS=<sourcesquares>]
+ [NRG=<gatesquares>] [NRB=<bulksquares>]
+ [NP|M=<no_parallel>] [NS|N=<no_series>]
+ [SCALE=<scale>] [GEO=<geometry_model>]
+ [TEMP=<temperature>]
+ [OFF][IC=<vds>[,vgs[,vbs]]]
655
Examples of VALUE attribute
M=20 NRD=10 NRS=25 NRG=5
L=.35u IC=.1, 2.00
L=.4u W=2u OFF IC=0.05,1.00
MODEL attribute
<model name>
<width> and <length> are the drawn device dimensions, before side diffusion, in
meters. They can be specified as device attributes, model parameters, or by using
the global default values, DEFW and DEFL. Device attributes supersede model
parameters, which supersede the global DEFW and DEFL values from the Global
Settings dialog box or a local .OPTIONS statement.
The diffusion resistances may be specified directly with the model parameters
RS, RD, RG, and RB. If unspecified, they are calculated from the product of
the sheet resistivity, RSH, and the number of squares terms, <drainsquares>,
<sourcesquares>, <gatesquares>, and <bulksquares>. If these terms are absent,
or zero, and the model parameters RS, RD, RG, and RB are absent or zero, then
the parasitic resistances are not included in the model. The procedure used to
calculate the resistive values is dependent upon the ACM model parameter and is
described in the section "EKV diode parameter calculation methods".
657
Model parameters for EKV level 44
Setup Parameters
Name Default Range Description
LEVEL None 44 MOSFET model level. Must be
44 for EKV.
EKVINT None None Interpolation method selector.
EKVINT = 1 selects F(v) =
ln^2(1+exp(v/2))
EKVDYN 0 0-1 EKVDYN=1 sets all intrinsic
capacitances to zero.
UPDATE None None RD,RS selector for ACM=1
SATLIM exp(4) None Ratio defining the saturation
limit. For operating point
information only.
XQC 0.4 None Charge/capacitance model
selector. XQC=.4 selects
original charge/transcapacitance
model. XQC=1 selects simpler
capacitance only model.
Optional Parameters
Name Default Range Description
TOX 0 m None Oxide thickness
NSUB None cm-3 None Channel doping
VFB None V None Flat-band voltage
UO None cm2/(Vs) >=0 Low-field mobility
VMAX None m/s >=0 Saturation velocity
THETA 0 V-1 >=0 Mobility reduction coefficient
659
Model parameters for EKV level 44
Temperature Parameters
Name Default Range Description
TR1 0 1/K None Linear resistance
temperature coefficient
TR2 0 1/K None Quadratic resistance
temperature coefficient
TCV 1.0E-3 V/K None Vth temperature coefficient
BEX -1.5 None Mobility temperature exponent
UCEX 0.8 None Longitudinal critical field
temperature exponent
IBBT 9.0E-4 1/K None Temperature coefficient for
IBB
TNOM 27 °C None Parameter measurement
temperature. TNOM takes
priority over T_MEASURED.
XTI 0.0 None Junction current temperature
exponent coefficient
T_MEASURED None °C >0.0 Measured temperature
T_ABS None °C >0.0 Absolute temperature
T_REL_GLOBAL None °C None Relative to current temperature
T_REL_LOCAL None °C None Relative to AKO temperature
661
Model parameters for EKV level 44
Matching Parameters
Name Default Range Description
AVTO 0 V·m None Area related threshold voltage
mismatch parameter
AKP 0 m None Area related gain mismatch
parameter
AGAMMA 0.0 V1/2·m None Area related body effect
mismatch parameter
Noise Parameters
Name Default Range Description
KF 0 None Flicker noise coefficient
AF 1 None Flicker noise exponent
GDSNOI 1.0 None Channel shot noise coefficient
NLEV 2.0 None Noise equation selector
Geometry Parameters
Name Default Range Description
SCALM 1.0 >0 Model parameter scale factor
HDIF 0 m None Length of heavily doped
diffusion, from contact to lightly
doped region (ACM=2, 3 only)
HDIF scaled=HDIF×SCALM
LD None m None Lateral diffusion into channel
from source and drain diffusion.
If LD and XJ are unspecified,
LD default=0.0. When LD is
unspecified, but XJ is specified,
LD is calculated from XJ. LD
default=0.75 × XJ.
LDIF 0 m None Length of lightly doped
diffusion adjacent to gate
(ACM=1, 2)
LDIFscaled = LDIF × SCALM
WMLT 1 None Width diffusion layer shrink
reduction factor
XJ 0 m None Metallurgical junction depth
XJscaled = XJ × SCALM
The EKV model employs an ACM (Area Calculation Method) parameter to select
different methods of calculating the drain and source diode parameters. The
method is similar to that employed by HSPICE.
If the ACM model parameter is not set, the method defaults to the ACM=0 SPICE
model.
ACM=0 and ACM=1 models do not use HDIF. ACM=0 does not use LDIF.
The geometric element parameters AD, AS, PD, and PS are not used for the
ACM=1 model.
663
ACM=0 SPICE style diodes
Source Resistance
val = NRS·RSH
Drain Resistance
val = NRD·RSH
When ACM=1 the ASPEC method is used. The parameters AD, PD, AS, and PS
are not used. The units JS and CJ differ from the (ACM=0) SPICE case.
Source Resistance
If UPDATE=0
RSeff = RS · (LDscaled + LDIFscaled) / Weff + (NRS · RSH + RSC) / M
Else if UPDATE >= 1 and LDIF=0 then
RSeff = (RS + NRS · RSH + RSC) / M
Else
RSeff = 0
Drain Resistance
If UPDATE=0
RSeff = RD · (LDscaled + LDIFscaled) / Weff + (NRD · RSH + RDC) / M
Else if UPDATE >= 1 and LDIF=0 then
RDeff = (RD + NRD · RSH + RDC) / M
Else
RDeff = 0
665
ACM=2 HSPICETM style diodes
This method uses a fold-back calculation similar to the ASPEC method, retaining
full model-parameter compatibility with the SPICE procedure. It also supports
both lightly and heavily doped diffusions (by setting the LD, LDIF, and HDIF
parameters). The units of JS, JSW, CJ, and CJSW used in SPICE are preserved,
permitting full compatibility. ACM=2 automatically generates more reasonable
diode parameter values than those for ACM=1. The ACM=2 geometry can be
generated one of two ways:
Device parameters: AD, AS, PD, and PS can be used for parasitic
generation when specified for the device. Default option values for
these parameters are not applicable.
The source diode can be suppressed if AS=0 is set in the element and IS=0 is set
in the model, a useful setting for shared contacts.
Source Resistance
If NRS is specified
RSeff = RS · (LDscaled + LDIFscaled) / Weff + (NRS · RSH + RSC) / M
Else
RSeff = RSC / M + (HDIFeff · RSH + (LDscaled · LDIFscaled) · RS) / Weff
Drain Resistance
If NRD is specified
RDeff = RD · (LDscaled + LDIFscaled) / Weff + (NRD · RSH + RDC) / M
Else
RDeff = RDC / M + (HDIFeff · RSH + (LDscaled · LDIFscaled)· RD) / Weff
667
ACM=3 Improved HSPICETM style diodes
The AD, AS, PD, PS calculations depend on the layout of the device, which is
determined by the value of device parameter GEO (specified in the Attribute
dialog box or in a SPICE file, on an element line). It can have the following
values:
GEO=0 (Default) Neither drain nor source is shared with another device.
GEO=1 Drain is shared with another device.
GEO=2 Source is shared with another device.
GEO=3 Both drain and source are shared with another device.
Source Resistance
If NRS is specified
RSeff = RS · (LDscaled + LDIFscaled) / Weff + (NRS · RSH + RSC) / M
Else
RSeff = RSC / M + (HDIFeff · RSH + (LDscaled · LDIFscaled) · RS) / Weff
Drain Resistance
If NRD is specified
RDeff = RD · (LDscaled + LDIFscaled) / Weff + (NRD · RSH + RDC) / M
Else
RDeff = RDC / M + (HDIFeff · RSH + (LDscaled · LDIFscaled)· RD) / Weff
669
Noise models
The MOSFET noise model described below is used for Level 1, 2, 3, 4, 5 and
EKV models.
It is also used for BSIM3 (Level 8) and BSIM4 (Level 14) when NLEV is
defined. If NLEV is undefined, the native Berkeley BSIM3 and BSIM4 noise
models are used.
I2rg = 4•k•T / RG
I2rd = 4•k•T / RD
I2rs = 4•k•T / RS
I2rb = 4•k•T / RB
Ishot2 = (8/3)•k•T•gm
If NLEV = 3 then
Ishot2 = (8/3)•k•T•gm•GDSNOI•beta•(Vgs-Vth)•(1+a+a2)/(1+a)
The EKV model provides the short-distance matching parameters AVTO for
threshold voltage, AGAMMA for gamma, and AKP for KP. The parameters are
calculated as follows:
KP = KP + AKP / SQRT(Weff*Leff)
671
MOSFET Philips Model 12
The Philips Model 12 is a compact MOSFET model, intended for digital, analog,
and RF circuit simulation in modern CMOS technologies. Its surface potential
formulation assures continuity of derivatives across operating boundaries. The
instance format is similar to other MOSFET devices but with fewer parameters.
Note that the model includes no source or drain diodes. When needed, these are
added using the JUNCAP diode model, usually as a part of a subcircuit which
includes the MOSFET.
SPICE format
Syntax for Geometrical and Binning models
M<name> <drain> <gate> <source> <bulk> <model name>
+ [L=<length>] [W=<width>] [M=<no_parallel>]
Schematic format
PART attribute
<name>
MODEL attribute
<model name>
<width> and <length> are the drawn device dimensions, before side diffusion, in
meters. They can be specified as device attributes or as model parameters. Device
attributes, if specified, supersede model parameters. If neither model nor device
attributes are specified, they assume the default values of W=10u, L=2u.
673
Model Parameters
There are actually fourteen versions of Model 12 available for use within Micro-
Cap. The first release (1200) had only two types, electrical and geometrical. Each
of the last two versions that Philips has released (1201 and 1202) came in two va-
rieties (thermal and standard) of three variations (electrical, geometric, and bin-
ning). Although for legacy purposes each is available for use in Micro-Cap, only
the latest model, 1202.3, dated March 2006, will be documented in this manual.
In the parameter tables that follow, the level parameter is shown first and the
remainder of the model parameters are listed in alphabetical order. Where the
NMOS and PMOS default parameters differ, they are shown as NMOS,PMOS.
Parameters marked with an asterisk are new to the Philips 1202 models and are
not available in earlier versions. Default entries specify NMOS, PMOS default
values where they differ.
For the thermal model (Level = 12024) there are three additional parameters to
handle thermal effects.
677
Model parameters for level 12022/12025 (Philips 1202.3 Geometrical)
For the thermal model (Level = 12025) there are three additional parameters to
handle thermal effects.
681
Model parameters for level 12023/12026 (Philips 1202.3 Binning)
Remaining parameters
Name Default Description
THER1 0 Numerator of gate voltage dependent part of
series resistance
THER2 1 Denominator of gate voltage dependent part
of series resistance
TOX 3.2n Thickness of gate oxide layer
TR 21 Reference temperature
VFB -1.05 Flat-band voltage at reference temperature
VFBOV 0 Flat-band voltage for the Source/Drain
overlap extensions
VP 50m Characteristic voltage of channel-length
modulation
W 10u Drawn channel width in the layout
WOT 0 Effective channel width reduction per side
WVAR 0 Difference between the actual and the
programmed field-oxide opening
For the thermal model (Level = 12026) there are three additional parameters to
handle thermal effects.
Note that the model includes no source or drain diodes. When needed, these are
added using the JUNCAP diode model, usually as a part of a subcircuit which
includes the MOSFET.
SPICE format
Syntax for Electrical model
M<name> <drain> <gate> <source> <bulk> <model name>
+ [M=<no_parallel>]
Schematic format
PART attribute
<name>
MODEL attribute
<model name>
There are two versions of Model 20 available for use within Micro-Cap, the
Electrical and the Geometric. The latest model, dated March 2006, will be docu-
mented here.
In the table below, the model parameters are listed in alphabetical order.
Parameters marked with an asterisk are new to the Philips 20.02 models and are
not available in the Philips 20.01 models.
689
Parameters MOSFET level 20012/20021/20014/ (Philips 20 Electrical)
For the electrical thermal model (Level = 20014) only there are three additional
parameters to handle thermal effects.
691
Parameters MOSFET level 20012/20022/20015 (Philips 20 Geometrical)
693
Parameters MOSFET level 20012/20022/20015 (Philips 20 Geometrical)
For the geometrical thermal model (Level = 20015) only there are three addition-
al parameters to handle thermal effects.
Note that the model includes no source or drain diodes. When needed, these are
added using the JUNCAP diode model, usually as a part of a subcircuit which
includes the MOSFET.
SPICE format
Syntax
M<name> <drain> <gate> <source> <bulk> <model name>
+ [M=<no_parallel>]
Example of device instance
MS 1 2 3 4 NSC M=200
Schematic format
PART attribute
<name>
VALUE attribute
[M=<no_parallel>]
MODEL attribute
<model name>
695
<no_parallel> is the number of devices in parallel. If specified, it overrides the
MULT model parameter, which multiplies the current-dependent and oxide ca-
pacitance model parameters.
There are two versions of Model 31 available for use within Micro-Cap, one that
includes self-heating (thermal) effects and one that does not. The latest model,
dated March 2006, will be documented here.
In the table below, the model parameters are listed in alphabetical order.
For the thermal model (Level = 31004) there are three additional parameters to
handle thermal effects.
697
MOSFET Philips Model 40
The Philips Model 40 is a physics based model for high voltage applications.
The model describes the electrical behavior of an accumulation / depletion type
MOSFET in Silicon-on-Insulator (SOI) processes. The model is used as a drain
extension of high-voltage MOS devices, like the Lateral Double-diffused MOS
(LDMOS), the Vertical Double-diffused MOS (VDMOS), and the Extended
MOS transistors.
Note that the model includes no source or drain diodes. When needed, these are
added using the JUNCAP diode model, usually as a part of a subcircuit which
includes the MOSFET.
SPICE format
Syntax
M<name> <drain> <gate> <source> <bulk> <model name>
+ [M=<no_parallel>]
Example of device instance
MS 1 2 3 4 NSO M=100
Schematic format
PART attribute
<name>
VALUE attribute
[M=<no_parallel>]
MODEL attribute
<model name>
There are two versions of Model 40 available for use within Micro-Cap, one that
includes self-heating (thermal) effects and one that does not. The latest model,
dated March 2006, is documented here.
699
Model parameters for MOSFET level 40001/40004 (Philips Model 40)
In the table below, the model parameters are listed in alphabetical order.
For the thermal model (Level = 40004) there are three additional parameters to
handle thermal effects.
SPICE format
Syntax of electrical model
M<name> <drain> <gate> <source> <bulk> <model name>
+ [ABSOURCE=<bottom_area_source>]
+ [ABDRAIN=<bottom_area_drain>]
+ [LSSOURCE=<sti_edge_source>] [LSDRAIN=<sti_edge_drain>]
+ [LGSOURCE=<gate_edge_source>] [LGDRAIN=<gate_edge_drain>]
+ [AD=<drainarea>] [AS=<sourcearea>]
+ [PD=<drainperiphery>] [PS=<sourceperiphery>]
+ [MULT=<no_parallel>]
+ [JW=<jw>]
Syntax of geometrical and binning models
M<name> <drain> <gate> <source> <bulk> <model name>
+ [L=<length>] [W=<width>]
+ [SA=<source_od-poly_distance>] [SB=<drain_od-poly_distance>]
+ [ABSOURCE=<bottom_area_source>]
+ [ABDRAIN=<bottom_area_drain>]
+ [LSSOURCE=<sti_edge_source>] [LSDRAIN=<sti_edge_drain>]
+ [LGSOURCE=<gate_edge_source>] [LGDRAIN=<gate_edge_drain>]
+ [AD=<drainarea>] [AS=<sourcearea>]
+ [PD=<drainperiphery>] [PS=<sourceperiphery>]
+ [MULT=<no_parallel>]
701
Schematic format
PART attribute
<name>
MODEL attribute
<model name>
<w> and <l> are the drawn device dimensions, before side diffusion, in meters.
There are three versions of PSP model available, an electrical model, a geometri-
cal model, and a binning model. Each is based on the Philips model 102, dated
July 2006. There is no thermal version of this model.
703
The equivalent circuit of the PSP model is as follows:
In the table below, the Level parameter is shown first and the remainder of the
model parameters are listed in alphabetical order.
Example
SP1
FILE attribute
<file name>
The FILE attribute specifies the path and name of the N-Port parameter file.
Example
E:\MC12\data\Gg10v20m.s2p
Typically these files are provided by RF suppliers in a text file as a table of val-
ues. Here, for example, is a set of typical 2-port S parameters:
For an example of how the N-Port device is used see the sample circuit file
NPORT4.CIR.
Example
OP1
MODEL attribute
<model name>
Example
LF351
There are three model levels for the OPAMP. Each succeeding level provides
increasingly more realistic models at the expense of increasingly more complex
equivalent circuits.
Level 2 is a three stage, two pole model with slew rate limiting, finite gain, and
output resistance.
Examples
.MODEL LM709 OPA (A=45K VOFF=.001 SRP=250K GBW=1E6)
.MODEL LF155 OPA (LEVEL=2 TYPE=1 A=50K SRP=330K)
727
Model parameters
VCC and VEE are the nominal power supply values at which VPS and VNS are
specified. It is possible to operate the OPAMP at other supply voltages. VEE and
VCC affect only power dissipation and the output saturation characteristics.
729
Figure 26-29 The level 3 opamp model with NPN inputs
Level 1 equations
R = ROUTAC+ROUTDC
GM = A/R
Level 2 equations
R = ROUTAC+ROUTDC
GM = A1/3/ R
F1 = GBW / A (First pole)
F2 = GBW / tan(90 - PM) (Second pole)
C1 = 1/(2•π•F1•R)
C2 = 1/(2•π•F2•R)
Level 3 equations
C3 = C
C1 = 0.5*C* tan(90 - PM)
RC1 = 1/(2•π•GBW•C3)
RC2 = RC1
R2 = 1E5
GA = 1/RC1
ALL STAGES
RO2 = ROUTDC - ROUTAC
GCM = 1/(CMRR•RC1)
GB = RC1•A/RO2
VLP = IOSC•1000
VLN = VLP
VC = VCC - VPS
VE = -VEE + VNS
Level 2 and 3 models use Gain Bandwidth (GBW) as an input parameter. The
models produce an OPAMP which, in open-loop configuration, produces the
specified phase margin (PM) and a gain of -3.01 dB at F = GBW. The intersection
of the gain curve asymptote (a straight line tangent to the mid-band gain curve)
and the line F = GBW occurs at 0.0 dB.
Note PM = Phase Margin = Phase Angle + 180. To plot the phase margin of
V(OUT), the Y expression would be PH(V(OUT)) + 180.
733
Pulse source
Schematic format
PART attribute
<name>
Example
P1
MODEL attribute
<model name>
Example
RAMP
The PULSE source is similar to the SPICE PULSE independent voltage source,
except that it uses a model statement and its timing values are defined with re-
spect to T=0.
Example
.MODEL STEP PUL (VZERO=.5 VONE=4.5 P1=10n P2=20n P3=100n
+ P4=120n P5=500n)
Model parameters
Name Parameter Units Default
VZERO Zero level V 0.0
VONE One level V 5.0
P1 Time delay to leading edge S 1.0E-7
P2 Time delay to one-level S 1.1E-7
P3 Time delay to trailing edge S 5.0E-7
P4 Time delay to zero level S 5.1E-7
P5 Repetition period S 1.0E-6
where From and To are T values, and T=TIME mod P5. The waveform
repeats every P5 seconds. Note that P5 ≥ P4 ≥ P3 ≥ P2 ≥ P1.
735
Resistor
SPICE format
Syntax
R<name> <plus> <minus> [model_name]
+<resistance> [TC=<tc1>[,<tc2>]]
Example
R1 2 3 50
<plus> and <minus> are the positive and negative node numbers. The
polarity references are used only for plotting or printing the voltage across,
V(RX), and the current through, I(RX), the resistor.
Schematic format
PART attribute
<name>
Examples
R5
CARBON5
RESISTANCE attribute
<resistance>[LOT[/#][/GAUSS|/UNIFORM|WCASE]=<tolvalue>[%]]
[TC1=<tc1> [,<tc2>]]
Examples
50
50K*(1+V(6)/100)
FREQ attribute
<fexpr>
Examples
2K+10*(1+F/1e9)
MODEL attribute
[model_name]
Example
RMOD
736 Chapter 26: Analog Devices
RESISTANCE attribute
<resistance> may be a constant or an expression involving time-domain
variables. The expression is evaluated in the time domain only. Consider the
expression:
100+V(10)*2
FREQ attribute
If <fexpr> is used, it replaces the value determined during the operating
point. <fexpr> may be a simple number or an expression involving frequency
domain variables. The expression is evaluated during AC analysis as the
frequency changes. For example, suppose the <fexpr> attribute is this:
V(4,5)*(1+F/1e7)
In this expression, F refers to the AC analysis frequency variable and V(4,5)
refers to the AC small signal voltage between nodes 4 and 5. Note that there
is no time-domain equivalent to <fexpr>. Even if <fexpr> is present,
<resistance> will be used in transient analysis.
Stepping effects
The RESISTANCE attribute and all of the model parameters may be stepped. If
it is stepped, it replaces <resistance>, even if <resistance> is an expression. The
stepped value may be further modified by the temperature effect.
Temperature effects
There are two different temperature factors, a quadratic factor and an exponential
factor. The quadratic factor is characterized by the model parameters TC1 and
TC2, or <tc1> and <tc2> from the parameter line. The exponential factor is char-
acterized by the model parameter TCE.
TF = 1+<tc1>•(T-Tnom)+<tc2>•(T-Tnom)2
737
If [model_name] is used and TCE is not specified, <resistance> is multiplied by a
temperature factor, TF.
TF = 1+TC1•(T-Tnom)+TC2•(T-Tnom)2
TC1 is the linear temperature coefficient and is sometimes given in data sheets as
parts per million per degree C. To convert ppm specs to TC1 divide by 1E6. For
example, a spec of 3000 ppm/degree C would produce a TC1 value of 3E-3.
TF = 1.01TCE•(T-Tnom)
T is the device operating temperature and Tnom is the temperature at which the
nominal resistance was measured. T is set to the analysis temperature from the
Analysis Limits dialog box. TNOM is determined by the Global Settings TNOM
value, which can be overridden with a .OPTIONS statement. T and Tnom may be
changed for each model by specifying values for T_MEASURED, T_ABS, T_REL_
GLOBAL, and T_REL_LOCAL. See the .MODEL command for more on how de-
vice operating temperatures and Tnom temperatures are calculated.
If tolerance percentage is zero or Monte Carlo is not in use, then the MF factor is
set to 1.0 and has no effect on the final value.
Example
.MODEL RM RES (R=2.0 LOT=10% LS=2.3n TC1=.015)
Model parameters
Name Parameter Units Default
R Resistance multiplier 1.0
LS Series inductance H 0.0
CP Parallel capacitance F 0.0
TC1 Linear temperature coefficient °C-1 0.0
TC2 Quadratic temperature coefficient °C-2 0.0
TCE Exponential temperature coefficient %/°C 0.0
NM Noise multiplier 1.0
T_MEASURED Measured temperature °C
T_ABS Absolute temperature °C
T_REL_GLOBAL Relative to current temperature °C
T_REL_LOCAL Relative to AKO temperature °C
I = NM * sqrt(4*K*T/rvalue )
NM multiplies the resistor noise current. A value of zero eliminates the noise
contribution from all resistors that use the model.
739
S (Voltage-controlled switch)
SPICE format
S<name> <plus output node> <minus output node>
+<plus controlling node> <minus controlling node>
+<model name>
Example
S1 10 20 30 40 RELAMOD
Schematic format
PART attribute
<name>
Example
S1
MODEL attribute
<model name>
Example
RELAY
The switch can operate in two distinct operational modes, Smooth Transition and
Hysteresis.
Hysteresis Mode:
Use this mode if you need input hysteresis and the circuit is not sensitive to con-
vergence problems. In the Hysteresis mode, VT and VH are specified. VON and
VOFF are ignored. The switch impedance changes abruptly from ROFF to RON
as the control voltage moves higher than VT+VH and from RON to ROFF as the
control voltage moves lower than VT-VH.
RON and ROFF must be greater than zero and less than 1/Gmin.
Do not make the transition region, VON-VOFF, too small as this will cause an
excessive number of time points required to cross the region. The smallest al-
lowed values for VON-VOFF is (RELTOL•(max(VON,VOFF))+VNTOL).
Example
.MODEL S1 VSWITCH (RON=1 ROFF=1K VON=1 VOFF=1.5)
.MODEL S2 VSWITCH (RON=1 ROFF=1K VT=3 VH=1)
Model parameters
Name Parameter Units Default
RON On resistance Ohms 1
ROFF Off resistance Ohms 1E6
VON Control voltage for On state V 1
VOFF Control voltage for Off state V 0
VT Threshold voltage V None
VH Hysteresis voltage V None
Model Equations
VC = Voltage across the control nodes
LM = Log-mean of resistor values = ln((RON•ROFF)1/2)
LR = Log-ratio of resistor values = ln(RON/ROFF)
VM= Mean of control voltages = (VON+VOFF)/2
VD = Difference of control voltages = VON-VOFF
k = Boltzmann's constant
T = Analysis temperature
RS = Switch output resistance
741
Smooth Transition Mode: (Used if VON and VOFF are defined)
If VON > VOFF
If VC >= VON
RS = RON
If VC <= VOFF
RS = ROFF
If VOFF < VC < VON
RS = exp(LM + 3•LR•(VC-VM)/(2•VD) - 2•LR•(VC-VM)3/VD3)
Noise effects
Noise is modeled as a resistor equal to the resistance found during the DC operat-
ing point. The thermal noise current is calculated as follows:
I = sqrt(4•k•T/RS)
Schematic format
PART attribute
<name>
Examples
S1
S10
SA
Examples
V(1,2)
V(10,20)*I(R1)
V(INPUT)
Examples
V(1,2)>1.2
V(5)>1.1 AND V(4) >1.2
I(RL)>1e-3
PERIOD attribute
<sampling period>
Examples
100ns
tmax/100
1U
PRECISION attribute
<precision>
743
Examples
1e-3
1U
This device is an ideal sample and hold. It samples <input expression> when
<sampling expression> is true or every sample period seconds. The behavioral
modes are distinguished as follows:
<precision> determines the degree of tracking. The smaller the number the closer
the device tracks the sampled expression. Small values of <precision> produce
smaller time steps and more accurate tracking.
Note that while <input expression> is usually a node voltage, the expression
can involve circuit variables, as in the second example. <sampling period> may
include a non-time varying expression, as in the second example, where the
<tmax> of the analysis run is used to calculate the sampling period.
See the sample file SH2.CIR for an example of how to use the sample and hold
Examples
S1
MODEL attribute
<model name>
Example
Line60
The Sine source is similar to the SPICE SIN independent voltage source. Unlike
the SPICE source, it uses a model statement.
Example
.MODEL V1 SIN (F=1Meg A=0.6 DC=1.5)
Model parameters
Name Parameter Units Default
F Frequency Hz 1E6
A Amplitude V 1.0
DC DC level V 0.0
PH Phase shift Radians 0.0
RS Source resistance Ω 0.001
RP Repetition period of exponential S 0.00
TAU Exponential time constant S 0.00
Model Equations
If TAU = 0 then
V = A•sin (2•π•F•TIME + PH) + DC
Else
V = A•e(-T/TAU)•sin (2•π•F•TIME + PH) + DC
Examples
X1 10 20 AMP
XDIFF 100 200 DIFF PARAMS: GAIN=10
Schematic format
PART attribute
<name>
Example
X1
NAME attribute
<subcircuit name>
Example
FILTER
FILE attribute
[<file name>]
Example
MYFILE.MOD
PARAMS attribute
[<<parameter name>=<parameter value>>*]
Example
CENTER=10kHz BW=1kHz
OPTIONAL attribute
[<<pin_name>=<node_name>>*]
Example
DPWR=$G_DPWR_VCC
747
TEXT: attribute
[<<text name>=<text value>>*]
Example
JEDEC="FILENAME"
[node]* are the numbers or names of the nodes specified in the .SUBCKT state-
ment. The number of nodes in the subcircuit call must be the same as the number
of nodes in the .SUBCKT statement. When the subcircuit is called, the nodes in
the call are substituted for the nodes in the body of the subcircuit in the same or-
der as they are listed in the .SUBCKT statement.
Any nodes defined in the .SUBCKT statement with the OPTIONAL keyword
may optionally follow the [node]* values. A subset of the optional nodes may be
listed, and will be assigned to the internal subckt nodes in the order specified by
the OPTIONAL statement. If you skip nodes, they must be skipped from the end
of the list. This statement is used in the Digital Library to specify optional power
nodes. Optional nodes can also be specified through the OPTIONAL attribute.
The SPICE <subcircuit name> or schematic NAME attribute defines the subcir-
cuit name. It must be the same as the name in the defining .SUBCKT statement.
The schematic FILE attribute defines the name of the file in which the .SUBCKT
statement can be found. Micro-Cap looks for the .SUBCKT statement in the fol-
lowing places in the order indicated.
Subcircuits are used extensively in the Component library. They are accessed via
the default .LIB statement. The SPICE keyword or schematic PARAMS attribute
let you pass multiple numeric parameters to the subcircuit. <parameter name> is
its name and <parameter value> defines the value it will assume if the parameter
is not included in the subcircuit call. For example:
748 Chapter 26: Analog Devices
.SUBCKT CLIP 1 2
+ PARAMS: LOW=0 HIGH=10
The SPICE keyword or schematic TEXT: attribute lets you pass text parameters
to the subcircuit. <text name> is the name of the text parameter and <text value>
defines the value it will assume if the parameter is not included in the subcircuit
call. For example:
.SUBCKT STIMULUS 1 2 3 4
+ TEXT: FILE="T1.STM"
Using the subckt component in a Micro-Cap schematic circuit file is easy. First,
you must enter the subcircuit into the Component library using the Component
editor. This requires entering:
• Subckt Name: Use any unique name. To avoid confusion, it should be the
same as the name used in the SUBCKT control statement, although this is not
strictly necessary.
To see how subckts are called, see the sample circuit files SUBCKT1 and PLA2.
749
Switch
Schematic format
PART attribute
<name>
Example
S1
VALUE attribute
<[V | T | I]>,<n1,n2> [,<ron>[,<roff>]]
Examples
V,1,2
I,2ma,3ma
T,1ms,2ms,50,5Meg
This is the oldest of three types of switches. The newer S and W switches exhibit
a slower, but smoother transition between the off and on states.
The two controlling nodes for a time-controlled switch are not used and may be
shorted to ground or to the two output nodes to reduce the node count by two.
In transient analysis, care must be taken in choosing the time step of the simula-
tion. If the time step is too large, the switch might never turn on. There must be at
least one time point within the specified window for the switch to close or open.
Rules of operation
If n1 < n2 then
Switch is closed (ON) when
n1 ≤ X ≤ n2
Switch is open (OFF) when
X < n1 or X > n2
If n1 > n2 then
Switch is open (OFF) when
n1 ≥ X ≥ n2
Switch is closed (ON) when
X > n1 or X < n2
If the switch is closed, the switch has a resistance of <ron>. If the switch is open,
the switch has a resistance of <roff>.
751
Timer
SPICE format
There is no equivalent timer device in SPICE or PSpice.
Schematic format
PART attribute
<name>
Examples
T1
S2
INPUTEXPR attribute
<input expression>
Examples
V(1,2)>=1.3
I(R1)>=1ma AND I(R1)<=5ma
T>120ns AND V(3)>5
ELAPSED_SCALE attribute
<elapsed scale>
Examples
1E6
1
INCREMENT attribute
<increment>
Examples
-1
1
INITIAL attribute
<initial value>
Examples
0
16384
Example2
0
-100
MAX attribute
<max>
Examples
16384
10
• Count: The number of events since the beginning of the simulation run or
the end of the last reset pulse.
Count is initially set to <initial value> when the simulation starts and whenever
the voltage on the RESET pin exceeds 1.0.
Pins: There are three pins, ELAPSED, COUNT, LAST. The pins are all outputs
and are connected to voltage sources whose value reflects the elapsed time, count
value, and last event time.
753
The value on the COUNT pin is:
The value on the LAST pin is the last simulation time (in secs) at which an event
occurred.
Note the Reset pin resets only the COUNT value. It has no effect on the
ELAPSED or LAST values.
See the sample file TIMER.CIR for an example of how to use the timer.
Example
T1
VALUE attribute
<primary inductance>,<secondary inductance>,<coupling coefficient>
Example
.01,.0001,.98
k = M / (LP*LS)0.5
M is the mutual inductance.
k is the coefficient of coupling and -1 <= k <= 1.
LP is the primary inductance.
LS is the secondary inductance.
A resistive impedance of 1/GMIN is added between the positive input pin and the
positive output pin to avoid DC convergence problems.
755
Transmission line
SPICE format
Ideal Line
T<name> <A port + node> <A port - node>
+<B port + node> <B port - node>
+[model name]
+ [Z0=<value> [TD=<value>] | [F=<value> [NL=<value>]]]
Example
T1 10 20 30 40 Z0=50 TD=3.5ns
T1 10 20 30 40 Z0=150 F=125Meg NL=0.5
T1 20 30 40 50 TLMODEL
Lossy Line
T<name> <A port + node> <A port - node>
+<B port + node> <B port - node>
+[<model name> [physical length]]
+[ LEN=<len value> R=<rvalue> L=<lvalue> G=<gvalue>
+ C=<cvalue>]
Examples
T1 20 30 40 50 LEN=1 R=.5 L=.8U C=56PF
T3 1 2 3 4 TMODEL 12.0
Schematic format
PART attribute
<name>
Example
T1
MODEL attribute
<model name>
Example
RELAY
Examples
.MODEL TIDEAL TRN(Z0=50 TD=10ns)
.MODEL TLOSS TRN(C=23pF L=13nH R=.35 LEN=10)
R, L, C, and G are usually fixed values, but may also be expressions using the
frequency F, or complex frequency S (2*PI*F*j), in AC analysis only. In any
other analysis, expressions are evaluated with F = 0.
Model Equations
The ideal and lossy lines are represented by the model shown in Figure 26-35.
757
The principal difference between the two models is in the implementation of
the delay. In the ideal model, the delay is implemented as a linked-list of data
pairs (time,value) and breakpoints. The lossy line uses the SPICE3 convolution
Note that only the RLC, RC, RG, and LC lines are supported. Nonzero values for
R, L, C, and G specifying other line types will generate an error.
For both types of transmission lines, both VALUE and MODEL parameter de-
scriptions may be given. VALUE parameters replace MODEL parameters and the
final result is checked for adherence to the VALUE attribute syntax rules.
Note that either 'Z0' (Z -zero) or 'ZO' (Z-Oh) may be used in either the VALUE or
MODEL parameters.
If the length modifier, <physical length>, is given, it overrides the model param-
eter LEN, if <model name> is used.
For examples of lossless transmission line circuits see the TL1, TL2, and TL3 cir-
cuits. For lossy transmission lines see the LTRA3 and SkinEffect1 circuits. The
latter uses a frequency dependent expression for R to model skin effect.
Example
U1
FILE attribute
<file name>
Example
AMP.USR
EXPRESSION attribute
[expression]
Example
V(OUT) vs T
REPEAT attribute
[number]
Example
5
ENABLE_EXPR attribute
[enable_expression]
Examples
V(OUT)>3.2
Time>120ns
This is a voltage source whose curve comes from a text file. The curve is repeated
[number] times in transient analysis and once in AC and DC analysis.
The files contain a header and N sequential lines, each with a variable number of
data values:
759
Transient analysis:
Two data values per line: Time, Y X set to Time
Three data values per line: Time, X, Y
AC:
Three data values per line: Frequency, Real(Y), Imag(Y) X set to Frequency
Five data values per line: Frequency, Real(X), Imag(X), Real(Y), Imag(Y)
User files may be created externally, or by saving one or more curves or wave-
forms after an analysis run. To save a particular waveform, press F10 to invoke
the Plot Properties dialog box after the analysis is over and select the waveform
to be saved from the Save Curves section of the dialog box.
When you place a user source in a schematic, Micro-Cap reads the current data
directory to find any files with the extension *.USR. It then reads the files them-
selves to see what waveforms are available for use. It presents the files and wave-
forms as items in drop-down lists in the FILE and EXPRESSION fields so you
can easily select the file name and waveform expression.
Curves saved in user files can be displayed in an analysis by selecting them from
the Curves section of the Variables list. To invoke this list, click the right mouse
button in the Y Expression field. The X and Y parts of a waveform are stored as
CurveX and CurveY, to let you select the X and Y parts independently.
See USER for an example of a simple source, USER2 for an example of two
sources, and USER3 for an example of a triggered source. Click on Info , then
on the source to examine the data file used by the source.
Example
W1 10 20 V1 IREF
Schematic format
PART attribute
<name>
Example
W1
REF attribute
<controlling voltage source name>
Example
VSENSE
MODEL attribute
<model name>
Example
SW
The W switch can operate in two distinct operational modes, Smooth Transition
(default) and Hysteresis.
Hysteresis Mode:
Use this mode if you need input hysteresis and the circuit is not sensitive to con-
761
vergence problems. In the Hysteresis mode, IT and IH are specified. ION and
IOFF are ignored. The switch impedance changes abruptly from ROFF to RON
as the control current moves past IT+IH and from RON to ROFF as the control
current moves past IT-IH.
This switch is controlled by the current through the source defined by <control-
ling voltage source name>.
RON and ROFF must be greater than zero and less than 1/Gmin.
Examples
.MODEL W1 ISWITCH (RON=1 ROFF=1K ION=1 IOFF=1.5)
.MODEL W2 ISWITCH (RON=1 ROFF=1K IT=1 IH=1.5)
Model parameters
Name Parameter Units Default
RON On resistance Ohms 1
ROFF Off resistance Ohms 1E6
ION Control current for On state A .001
IOFF Control current for Off state A 0
IT Threshold current A None
IH Hysteresis current A None
Model Equations
IC = Controlling current
LM = Log-mean of resistor values = ln((RON•ROFF)1/2)
LR = Log-ratio of resistor values = ln(RON/ROFF)
IM = Mean of control currents = (ION+IOFF)/2
ID = Difference of control currents = ION-IOFF
k = Boltzmann's constant
T = Analysis temperature
RS = Switch output resistance
Noise effects
Noise is modeled as a resistor equal to the resistance found during the DC operat-
ing point. The thermal noise current is calculated as follows:
I = sqrt(4•k•T/RS)
763
WAV file source
Schematic format
PART attribute
<name>
Example
W1
FILE attribute
<file name>
Examples
AUDIO2.WAV
ode_to_joy.wav
CHANNEL attribute
<channel number>
Examples
0
1
SCALE attribute
<scale>
Examples
1
15
REPEAT attribute
<repeat number>
Examples
1
3
ENABLE attribute
<enable_expression>
<scale>: This is the scale factor to multiply the file values by. Increasing it
increases the volume.
<repeat number>: This is the number of times to repeat the file contents.
During a DC operating point calculation, the value on the source is the initial
value in the file.
The Play button in the Attribute dialog box can be used to play the contents of
a WAV source. The source can also be played from Transient Analysis / F10 /
Save Curves / Play button.
For an example of the WAV source, see the circuit file WAV.CIR.
765
Z transform source
Schematic format
PART attribute
<name>
Example
E1
ZEXP attribute
<transform expression>
Example
(.10*(Z+1)*(POW(Z,2)-.70*Z+1))/((Z-.56)*(POW(Z,2)-1.16*Z+.765))
Example
24khz
See the sample file Filters\ZDOMAIN.CIR for an example of how to use the
source.