ee.spice.semiconductorSubcircuit2lookup
Generate lookup table data for three-terminal or four-terminal devices from SPICE subcircuit
Since R2022a
Syntax
Description
returns the lookup table data for the SPICE subcircuit file run in SPICE engine at the path
lookuptable
= ee.spice.semiconductorSubcircuit2lookup(subcircuitFile
,subcircuitName
)subcircuitFile
and with the file name
subcircuitName
. Use this function to create lookup table data that
characterizes an N-Channel MOSFET, P-Channel MOSFET, or N-Channel IGBT block. If you want to
create the lookup table data for devices with two terminals, use the ee.spice.diodeSubcircuit2lookup
function instead.
This function supports SIMetrix 8.4 and beyond. Since R2023a, this function also supports LTSpice.
creates a SPICE subcircuit file with the specified name-value arguments.lookuptable
= ee.spice.semiconductorSubcircuit2lookup(subcircuitFile
,subcircuitName
,Name=Value
)
Examples
Generate Current-Voltage Characteristics from Output Characteristics
Generate the lookup table data for the current-voltage characteristics from the output characteristics of a SPICE subcircuit.
First define the path of the subcircuit, the name of the subcircuit, and the path of the SPICE executable file.
subcircuitFile = [matlabroot '\toolbox\physmod\elec\supporting_files\IAUC100N04S6L014.cir']; subcircuitName = "IAUC100N04S6L014"; SPICEPath = "C:\Program Files\SIMetrix850\bin64\Sim.exe";
Then generate the lookup table data by calling the
semiconductorSubcircuit2lookup
function.
lookuptable = ... ee.spice.semiconductorSubcircuit2lookup(subcircuitFile, ... subcircuitName, 'SPICEPath', SPICEPath, 'terminals', [1,2,3, 0, 5], ... 'flagIdsVgs', 0, 'flagIdsVds', 1, 'T', [27 50 150]);
Input Arguments
subcircuitFile
— File path
character vector
File path of the SPICE subcircuit file from which to generate the data, specified as a character vector.
subcircuitName
— File name
character vector
File path of the SPICE subcircuit file from which to generate the data, specified as a character vector.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: 'terminals'=[1,2,3,0,5]
SPICETool
— Name of SPICE simulation engine
'SIMetrix'
(default) | 'LTspice'
Name of the SPICE simulation engine executable file, specified as
SIMetrix
or LTspice
.
SPICEPath
— Path of SPICE simulation engine executable file
character vector | string
Path of the SPICE simulation engine executable file, specified as a character vector or a string.
outputPath
— Path of generated outputs
character vector | string
Path of the generated SPICE netlists and the simulation output files, specified as a character vector or a string. If you do not specify this argument, the function uses a temporary directory to store the files and removes the temporary directory when the function completes.
terminals
— Vector of terminal orders
vector of scalars
Vector of terminal orders in the SPICE subcircuit, specified as a vector of scalars. The values of this vector define the ports of the semiconductor device that each node of the SPICE subcircuit connects to:
0
— No connection1
— D for MOSFET or C for IGBT2
— G for MOSFET and IGBT3
— S for MOSFET or E for IGBT4
— B for MOSFET and IGBT5
— Tj for MOSFET and IGBT
The size of this vector must match the number of nodes specified in the subcircuit.
For example, if your SPICE subcircuit is .SUBCKT IAUC100N04S6L014 drain
gate source Tj Tcase
, then define this vector as
[1,2,3,5,0]
.
flagTran
— Whether to obtain characteristics from transfer characteristics
false or 0
(default) | true or 1
Since R2023a
Whether to generate netlists to run transient simulation for current-voltage and
capacitance-voltage characteristics, specified as a numeric or logical
1
(true) or 0
(false).
The default value is false, which means running DC and AC simulations for characteristics.
flagIdsVgs
— Whether to obtain characteristics from transfer characteristics
false or 0
(default) | true or 1
Whether to obtain current-voltage characteristics from the transfer
characteristics, specified as a numeric or logical 1
(true) or
0
(false).
If you also set 'flagIdsVds'
to 1
, the
function obtains the current-voltage characteristics only from transfer
characteristics.
flagIdsVds
— Whether to obtain characteristics from output characteristics
true or 1
(default) | false or 0
Whether to obtain current-voltage characteristics from the output characteristics,
specified as a numeric or logical 1
(true) or 0
(false).
If you also set 'flagIdsVgs'
to 1
, the
function obtains the current-voltage characteristics only from transfer
characteristics.
flagCapacitance
— Whether to return capacitance characteristics
true or 1
(default) | false or 0
Whether to return capacitance characteristics, specified as a numeric or logical
1
(true) or 0
(false).
flagDiodeIV
— Whether to return diode characteristics
true or 1
(default) | false or 0
Whether to return diode characteristics, specified as a numeric or logical
1
(true) or 0
(false).
flagTailTransient
— Whether to return IGBT turn-off tail current transient
false or 0
(default) | true or 1
Whether to return IGBT turn-off tail current transient, as a numeric or logical
1
(true) or 0
(false).
VgsRangeIdsVgs
— Vgs or Vge transfer characteristics range
[0, 20]
(default) | row vector of two scalars
Range for the transfer characteristics of the MOSFET gate-source voltage,
Vgs
, or the IGBT gate-emitter voltage, Vge
, in
volts, specified as a row vector of two or more scalars. If you specify two values,
VgsRangeIdsVgs
defines a range inside which the intermediate
points are automatically defined. If you specify more than two values, the function
returns the lookup table at the values you have specified.
VdsStepsIdsVgs
— Vds or Vce transfer characteristics steps
[0, 5]
(default) | vector of scalars
Steps for the transfer characteristics of the MOSFET drain-source voltage,
Vds
, or the IGBT collector-emitter voltage,
Vce
, in volts, specified as a vector of two or more scalars. If
you specify two values, VdsStepsIdsVgs
defines a range inside
which the intermediate points are automatically defined. If you specify more than two
values, the function returns the lookup table at the values you have specified.
VdsRangeIdsVds
— Vds or Vce output characteristics range
[0, 5]
(default) | row vector of two scalars
Range for the output characteristics of the MOSFET gate-drain voltage,
Vds
, or the IGBT collector-emitter voltage,
Vce
, in volts, specified as a row vector of two or more scalars.
If you specify two values, VdsRangeIdsVds
defines a range inside
which the intermediate points are automatically defined. If you specify more than two
values, the function returns the lookup table at the values you have specified.
VgsStepsIdsVds
— Vgs or Vge output characteristics steps
[0, 20]
(default) | vector of scalars
Steps for the output characteristics of the MOSFET gate-source voltage,
Vgs
, or the IGBT gate-emitter voltage, Vge
, in
volts, specified as a vector of two or more scalars. If you specify two values,
VgsStepsIdsVds
defines a range inside which the intermediate
points are automatically defined. If you specify more than two values, the function
returns the lookup table at the values you have specified.
VgsCapacitance
— Vgs or Vge capacitance characteristics steps
[-5, 20]
(default) | vector of scalars
Steps for the capacitance characteristics of the MOSFET gate-source voltage,
Vgs
, or the IGBT gate-emitter voltage, Vge
, in
volts, specified as a vector of two or more scalars. If you specify two values,
VgsCapacitance
defines a range inside which the intermediate
points are automatically defined. If you specify more than two values, the function
returns the lookup table at the values you have specified.
VdsCapacitance
— Vds or Vce capacitance characteristics steps
[0, 30]
(default) | vector of scalars
Steps for the capacitance characteristics of the MOSFET drain-source voltage,
Vds
, or the IGBT collector-emitter voltage,
Vce
, in volts, specified as a vector of two or more scalars. If
you specify two values, VdsCapacitance
defines a range inside
which the intermediate points are automatically defined. If you specify more than two
values, the function returns the lookup table at the values you have specified.
frequencyCapacitance
— AC frequency for capacitance characteristics
1e6
(default) | positive scalar
AC frequency of the small signal for the capacitance characteristics, in Hz, specified as a positive scalar.
acVoltageCapacitance
— AC amplitude for capacitance characteristics
0.05
(default) | positive scalar
AC amplitude of the small signal for the capacitance characteristics, in F, specified as a positive scalar.
VdsDiodeIV
— Vgs or Vce diode characteristics sweep range
[0, -3]
(default) | row vector of two nonpositive scalars
Sweep range for the diode characteristics of the MOSFET gate-source voltage,
Vgs
, or the IGBT collector-emitter voltage,
Vce
, in volts, specified as a row vector of two or more
nonpositive scalars. If you specify two values, VdsDiodeIV
defines a range inside which the intermediate points are automatically defined. If you
specify more than two values, the function returns the lookup table at the values you
have specified.
VceTail
— Vce voltage for turn-off tail current characteristics
400
(default) | positive scalar
IGBT collector-emitter voltage, Vce
, in volts, for the turn-off
tail current characteristics, specified as a positive scalar.
pulseVgeTail
— Gate-emitter pulse amplitude for turn-off tail current characteristics
15
(default) | positive scalar
Amplitude of the pulse applied between the IGBT gate and emitter for the turn-off tail current characteristics, in volts specified as a positive scalar.
pulsePeriodTail
— Gate-emitter pulse period for turn-off tail current characteristics
5e-6
(default) | positive scalar
Period of the pulse applied between the IGBT gate and emitter for the turn-off tail current characteristics, in seconds, specified as a positive scalar.
T
— Device case temperature vectors
27
(default) | vector of scalars
Device case temperatures for all current-voltage characteristics, specified as a
row vector of one or more scalars. If you specify two values, T
defines a range inside which the intermediate points are automatically defined. If you
specify more than two values, the function returns the lookup table at the values you
have specified.
IVSimulationTime
— Simulation time for current-voltage characteristics
20
(default) | positive scalar
Simulation time for the current-voltage characteristics, in seconds, specified as a positive scalar.
IVSimulationStepSize
— Simulation step size for current-voltage characteristics
0.02
(default) | positive scalar
Simulation step size for all current-voltage characteristics, specified as a positive scalar.
reltol
— Relative tolerance
1e-3
(default) | scalar
Relative tolerance parameter used in SPICE simulations, specified as a scalar.
abstol
— Absolute tolerance
1e-12
(default) | scalar
Absolute current tolerance parameter used in SPICE simulations, specified as a scalar.
vntol
— Absolute voltage tolerance
1e-6
(default) | scalar
Absolute voltage tolerance parameter used in SPICE simulations, specified as a scalar.
gmin
— Parallel conductance
1e-12
(default) | scalar
Parallel conductance with all non-linear devices used in SPICE simulations, in
1/Ohm
, specified as a scalar.
cshunt
— Shunt resistance
0
(default) | scalar
Parasitic capacitance, in F, between each node in the SPICE circuit and the ground, specified as a scalar.
debug
— Debugging flag
0
(default) | 1
| 2
Since R2023a
Flag for debugging SPICE simulations, specified as either 0
,
1
, or 2
. If you set debug
to 1, the function runs the simulation without regenerating the netlists. If you set
debug
to 2, the function extracts the values without running a
simulation.
Output Arguments
lookuptable
— Table lookup data
structure
Generated lookup table data from the SPICE subcircuit file, returned as a structure with these fields:
channel
— Channel data
ee.internal.spice.lookuptable.IdsVds
object | ee.internal.spice.lookuptable.IdsVgs
object
Data that characterizes the channel of the SPICE subcircuit, returned as an
ee.internal.spice.lookuptable.IdsVds
or
ee.internal.spice.lookuptable.IdsVgs
object. The function
returns the channel
object only when you specify the
name-value arguments flagIdsVgs
or
flagIdsVds
with a value of 1
. The
object contains these properties:
VgsVec
— Vgs or Vge voltage
vector of scalars
MOSFET gate-source voltages, Vgs
, or IGBT
gate-emitter voltages, Vge
, in volts, returned as a
vector of scalars.
VdsVec
— Vds or Vce voltage
vector of scalars
MOSFET drain-source voltages, Vds
, or IGBT
collector-emitter voltages, Vce
, in volts, returned as a
vector of scalars.
TVec
— Temperature
vector of scalars
Temperatures, in degC
, returned as a vector of
scalars.
IdsMat
— Drain-source or collector-emitter currents
matrix of scalars
MOSFET drain-source currents, Ids(Vgs,Vds,T)
, or IGBT
collector-emitter currents, Ice(Vge,Vce,T)
, returned as a
matrix of scalars.
capacitance
— Capacitance data
ee.internal.spice.lookuptable.capacitance
object
Data that characterizes the capacitance of the SPICE subcircuit, returned as
an ee.internal.spice.lookuptable.capacitance
object. The function
returns the capacitance
object only when you specify
the name-value argument flagCapacitance
with a value of
1
. The object contains these properties:
VgsVec
— Vgs or Vge voltage
vector of scalars
MOSFET gate-source voltages, Vgs
, or IGBT
gate-emitter voltages, Vge
, in volts, returned as a
vector of scalars.
VdsVec
— Vds or Vce voltage
vector of scalars
MOSFET drain-source voltages, Vds
, or IGBT
collector-emitter voltages, Vce
, in volts, returned as a
vector of scalars.
CgsMat
— Cgs or Cge capacitance
matrix of scalars
MOSFET gate-source capacitance, Cgs
, or IGBT
gate-emitter capacitance, Cge
, returned as a matrix of
scalars.
CgdMat
— Cgd or Cgc capacitance
matrix of scalars
MOSFET gate-drain capacitance, Cgd
, or IGBT
gate-collector capacitance, Cgc
, returned as a matrix of
scalars.
CdsVec
— Cds or Cce voltage
vector of scalars
MOSFET drain-source capacitance, Cds
, or IGBT
collector-emitter capacitance, Cce
, returned as a vector
of scalars.
diode
— Diode data
ee.internal.spice.lookuptable.diodeIV
object
Data that characterizes the drain-source diode or the collector-emitter diode
of the SPICE subcircuit, returned as an
ee.internal.spice.lookuptable.diodeIV
object. The function
returns the diode
object only when you specify the
name-value argument flagDiodeIv
with a value of
1
. The object contains these properties:
VVec
— Diode voltages
vector of positive scalars
Diode voltages, in volts, returned as a vector of scalars.
TVec
— Temperatures
vector of scalars
Temperatures, returned as a vector of scalars.
IMat
— Tabulated currents
matrix of scalars
Tabulated diode currents, Idiode(VVec,TVec)
, or IGBT
collector-emitter currents, Ice(Vge,Vce,T)
, in amperes,
returned as a matrix of scalars.
igbtTail
— Data of IGBT turn-off tail current transient
ee.internal.spice.lookuptable.currentTail
Data that characterizes the IGBT turn-off tail current transient time,
returned as an ee.internal.spice.lookuptable.currentTail
object.
The function returns the igbtTail
object only when you
specify the name-value argument flagTailTransient
with
a value of 1
. The object contains this property:
TT
— Time constant for IGBT turn-off current tail transient
positive scalar
Time constant of the IGBT turn-off current tail transient, in seconds, returned as a positive scalar.
Version History
Introduced in R2022a
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)