Main Content

ee.spice.diodeSubcircuit2lookup

Generate lookup table data for two-terminal devices from SPICE subcircuit

Since R2023a

Description

lookuptable = ee.spice.diodeSubcircuit2lookup(filename,pathname) returns lookup table data for the SPICE subcircuit file that you run in SPICE engine on the path 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.

example

lookuptable = ee.spice.diodeSubcircuit2lookup(filename,pathname,Name=Value) creates a SPICE subcircuit file with additional options specified by one or more name-value arguments.

Examples

collapse all

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

collapse all

Path to the SPICE subcircuit file from which the function generates the data, specified as a 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]

Name of the SPICE simulation engine executable file, specified as 'SIMetrix' or 'LTspice'.

Path to the SPICE simulation engine executable file, specified as a character vector or a 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.

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 connection

  • 1+ for Diode block (anode)

  • 2- for Diode block (cathode)

  • 3H for Diode block (Tj)

The size of this vector must match the number of nodes in the subcircuit.

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).

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.

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.

Simulation time for the current-voltage characteristics, in seconds, specified as a positive scalar.

Simulation step size for all current-voltage characteristics, specified as a positive scalar.

Relative tolerance parameter used in SPICE simulations, specified as a scalar.

Absolute current tolerance parameter used in SPICE simulations, specified as a scalar.

Absolute voltage tolerance parameter used in SPICE simulations, specified as a scalar.

Parallel conductance of all nonlinear devices used in SPICE simulations, in reciprocal ohm, specified as a scalar.

Parasitic capacitance, in F, between each node in the SPICE circuit and the ground, specified as a scalar.

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

collapse all

Lookup table data generated from the SPICE subcircuit file, returned as a structure with this field:

Data that characterizes the diode of the SPICE subcircuit, returned as an ee.internal.spice.lookuptable.diodeIV object. The object contains these properties:

Diode voltages, in volt, returned as a vector of positive values.

Temperatures, returned as a vector of real values.

Tabulated diode currents, Idiode(VVec,TVec), in ampere, returned as a matrix of real values.

Version History

Introduced in R2023a