ee.spice.diodeSubcircuit2lookup
Generate lookup table data for two-terminal devices from SPICE subcircuit
Since R2023a
Syntax
Description
returns lookup table data for the SPICE subcircuit file that you run in SPICE engine on the
path lookuptable
= ee.spice.diodeSubcircuit2lookup(pathname
,filename
)pathname
and with the filename filename
. Use
this function to create lookup table data that characterizes a two-terminal semiconductor
device. If you want to create the lookup table data for devices with more than two
terminals, use the ee.spice.semiconductorSubcircuit2lookup
function instead.
This function supports SIMetrix version 8.4 and LTSpice software.
creates a SPICE subcircuit file with additional options specified by one or more name-value
arguments.lookuptable
= ee.spice.diodeSubcircuit2lookup(pathname
,filename
,Name=Value
)
Examples
Generate Current-Voltage Characteristics from Output Characteristics
Generate lookup table data for the current-voltage characteristics from the output characteristics of a SPICE subcircuit.
Define the path to the subcircuit, the name of the subcircuit, and the path to the SPICE executable file.
pathname = [matlabroot '\toolbox\physmod\elec\supporting_files\rapid2_e65d.lib']; filename = "ID_08E65D2_L2"; simPath = "C:\Program Files\SIMetrix850\bin64\Sim.exe";
Generate the lookup table data by calling the
diodeSubcircuit2lookup
function.
lookuptable = ... ee.spice.diodeSubcircuit2lookup(pathname, ... filename,SPICEPath=simPath,terminals=[1 2], ... Vdiode=[0 15]);
Input Arguments
pathname
— Path to SPICE subcircuit file
character vector
Path to the SPICE subcircuit file from which the function generates the data, specified as a character vector.
filename
— Filename of SPICE subcircuit file
character vector
Filename of the SPICE subcircuit file from which the function generates 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]
SPICETool
— Name of SPICE simulation engine executable file
'SIMetrix'
(default) | 'LTspice'
Name of the SPICE simulation engine executable file, specified as
'SIMetrix'
or
'LTspice'
.
SPICEPath
— Path to SPICE simulation engine executable file
character vector | string scalar
Path to the SPICE simulation engine executable file, specified as a character vector or a string scalar.
outputPath
— Path of generated outputs
character vector | string scalar
Path of the generated SPICE netlists and simulation output files, specified as a character vector or a string scalar. If you do not specify this argument, the function uses a temporary folder to store the files. The function removes the temporary folder when it completes execution.
terminals
— Terminal orders in SPICE subcircuit
vector of integers in the range [0, 3]
Terminal orders in the SPICE subcircuit, specified as a vector of integers in the range [0, 3]. The values of this vector define the ports of the semiconductor device to which each node of the SPICE subcircuit connects:
0
— No connection1
— + for Diode block (anode)2
— - for Diode block (cathode)3
— H for Diode block (Tj)
The size of this vector must match the number of nodes in the subcircuit.
flagTran
— Option to obtain table data from transfer characteristics
false
or 0
(default) | true
or 1
Option to obtain table data from transfer characteristics, specified as a numeric
or logical 1
(true
) or 0
(false
).
To run DC and AC simulations for characteristics, specify this argument as
0
(false
). To run transient simulation for
current-voltage and capacitance-voltage characteristics, specify this input as
1
(true
).
VDiode
— Voltages of current-voltage lookup table
[0 3]
(default) | vector of nonnegative values
Voltages of the current-voltage lookup table, in volt, specified as a vector of
two or more nonnegative values. If you specify two values, VDiode
defines a range in which the intermediate points are automatically defined. If you
specify more than two values, the function returns the lookup table at those
values.
T
— Device case temperature vectors
27
(default) | real-valued scalar | row vector of real values
Device case temperature of the current-voltage lookup table, specified as a
real-valued scalar or row vector of real values. If you specify two values,
T
defines a range in which the intermediate points are
automatically defined. If you specify more than two values, the function returns the
lookup table at those values.
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 all 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 of all nonlinear devices used in SPICE simulations, in reciprocal 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
Debugging flag for SPICE simulations, specified as 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 lookup values without running a simulation.
Output Arguments
lookuptable
— Lookup table data
structure
Lookup table data generated from the SPICE subcircuit file, returned as a structure with this field:
diode
— Diode data
ee.internal.spice.lookuptable.diodeIV
object
Data that characterizes the diode of the SPICE subcircuit, returned as an
ee.internal.spice.lookuptable.diodeIV
object. The object contains
these properties:
VVec
— Diode voltages
vector of positive values
Diode voltages, in volt, returned as a vector of positive values.
TVec
— Temperatures
vector of real values
Temperatures, returned as a vector of real values.
IMat
— Tabulated diode currents
matrix of real values
Tabulated diode currents, Idiode(VVec,TVec)
, in
ampere, returned as a matrix of real values.
Version History
Introduced in R2023a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)