
Micro-Cap v7.1.6 / RM
.PDF
Model statement form
.MODEL <model name> CORE ([model parameters ])
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 |
Alpha |
Mean field parameter |
|
2E-5 |
A |
Shape parameter |
a/m |
25 |
C |
Domain wall flexing constant |
|
.001 |
K |
Domain wall bending constant |
|
25 |
Model Equations
Definitions
N= number of turns
Ma = Anhysteretic magnetization
H = Magnetic field intensity
HE = Effective magnetic field intensity
B = Magnetic flux density
M = Magnetization
I = Core current
V = Core voltage
H = (100•N•I-M•Gap)/Path
HE = H + ALPHA•Ma
Ma = MS • (coth(HE/A)-A/HE)
Sign = K if dH/dt > 0.0
Sign= - K if dH/dt <= 0.0
Equations
µ = dM/dH = (Ma-M) / ((Sign)•(1+C)) + (C / (1+C))•dMa/DH B = µ0 • (H +M)
L = µ • 4 • π • 1E-9 • N2 • AREA / PATH V = L • dI/dt
To derive model parameters from data sheet values, use the MODEL program.
418 Chapter 22: Analog Devices

Laplace sources
Schematic format
PART attribute <name>
Examples
FIL1
LOW1
LAPLACE attribute of LFIOFI, LFIOFV, LFVOFV, LFVOFI <expression>
Example 1/(1+.001*S+1E-8*S*S)
FREQ attribute of LTIOFI, LTIOFV, LTVOFV, LTVOFI <(f1,m1,p1) (f2,m2,p2)...(fn,mn,pn)>
Example
(0.0,1.0,0.0) (1Meg,0.9,-10) (10Meg,0.2,-35)
KEYWORD attribute (for use with FREQ attribute) [[DB | MAG] [DEG | RAD]] | [R_I]
Examples
DB RAD
MAG DEG
R_I
There is no SPICE version of this source. Use the Dependent source, E or G device.
The keywords DB, MAG, DEG, RAD, R_I are interpreted as follows:
DB: Magnitude value is expressed in decibels. (default)
MAG: Magnitude value is true magnitude.
DEG: Degrees value is expressed in degrees. (default)
RAD: Degrees value is expressed in radians.
R_I: The table contains real and imaginary parts.
420 Chapter 22: Analog Devices

Formula types
The input and output variables and definition names for the Laplace formula sources are as follows:
Source type |
Input |
Output |
Definition |
Current-controlled current source |
I |
I |
LFIOFI |
Current-controlled voltage source |
I |
V |
LFVOFI |
Voltage-controlled voltage source |
V |
V |
LFVOFV |
Voltage-controlled current source |
V |
I |
LFIOFV |
Here are some examples: |
|
|
|
1/(1+.001*S) |
a simple low pass filter. |
||
1/(1+.001*s+1E-8*S*S) |
a second order filter. |
||
exp(-pow((C*S*(R+S*L)),.5)) |
equation of a simple lossy, transmission |
||
|
line. R, L, and C are .define constants. |
For illustration, see the circuits L1, L2, and L3.
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:
(F1,X1,Y1) (F2,X2,Y2) ... (FN,XN,YN)
Fi is the i’th frequency value in hertz.
Xi is the i’th magnitude value or the real value.
Yi is the i’th phase value or the imaginary value.
There are six rules for forming the table:
1.Values are separated by commas, triplets are enclosed in parentheses and are separated by spaces.
2.Data triplets must be arranged in order of ascending frequency.
3.The function is constant at X1,Y1 for inputs below F1.
4.The function is constant at XN,YN for inputs above FN.
422 Chapter 22: Analog Devices

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 symbolic names for VALUE attributes and/or model parameter values and declare these names in a .parameters statement. Save the circuit to disk using the desired macro name.
2.Enter a component in the Component library as follows:
•Enter the macro file name for the Name field.
•Choose a suitable shape.
•Choose Macro for the Definition field.
•Place pins on the shape by clicking in the Shape drawing area. Name the pins with the same grid text names you placed on the nodes in the macro circuit.
•Add optional .MACRO statements to one of the *.LIB files to substitute long parameter lists for shorter names.
424 Chapter 22: Analog Devices

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
VALUEattribute
[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
426 Chapter 22: Analog Devices