Main Content

ee.spice.semiconductorSubcircuit2lookup

Generate lookup table data for three-terminal or four-terminal devices from SPICE subcircuit

Since R2022a

Description

example

lookuptable = ee.spice.semiconductorSubcircuit2lookup(subcircuitFile,subcircuitName) returns the lookup table data for the SPICE subcircuit file run in SPICE engine at the path 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.

lookuptable = ee.spice.semiconductorSubcircuit2lookup(subcircuitFile,subcircuitName,Name=Value) creates a SPICE subcircuit file with the specified name-value arguments.

Examples

collapse all

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

collapse all

File path of the SPICE subcircuit file from which to generate the data, specified as a 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]

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

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

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 connection

  • 1D for MOSFET or C for IGBT

  • 2G for MOSFET and IGBT

  • 3S for MOSFET or E for IGBT

  • 4B for MOSFET and IGBT

  • 5Tj 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].

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.

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.

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.

Whether to return capacitance characteristics, specified as a numeric or logical 1 (true) or 0 (false).

Whether to return diode characteristics, specified as a numeric or logical 1 (true) or 0 (false).

Whether to return IGBT turn-off tail current transient, as a numeric or logical 1 (true) or 0 (false).

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.

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.

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.

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.

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.

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.

AC frequency of the small signal for the capacitance characteristics, in Hz, specified as a positive scalar.

AC amplitude of the small signal for the capacitance characteristics, in F, specified as a positive scalar.

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.

IGBT collector-emitter voltage, Vce, in volts, for the turn-off tail current characteristics, specified as a 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.

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.

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.

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 with all non-linear devices used in SPICE simulations, in 1/Ohm, specified as a scalar.

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

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

collapse all

Generated lookup table data from the SPICE subcircuit file, returned as a structure with these fields:

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:

MOSFET gate-source voltages, Vgs, or IGBT gate-emitter voltages, Vge, in volts, returned as a vector of scalars.

MOSFET drain-source voltages, Vds, or IGBT collector-emitter voltages, Vce, in volts, returned as a vector of scalars.

Temperatures, in degC, returned as a vector 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.

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:

MOSFET gate-source voltages, Vgs, or IGBT gate-emitter voltages, Vge, in volts, returned as a vector of scalars.

MOSFET drain-source voltages, Vds, or IGBT collector-emitter voltages, Vce, in volts, returned as a vector of scalars.

MOSFET gate-source capacitance, Cgs, or IGBT gate-emitter capacitance, Cge, returned as a matrix of scalars.

MOSFET gate-drain capacitance, Cgd, or IGBT gate-collector capacitance, Cgc, returned as a matrix of scalars.

MOSFET drain-source capacitance, Cds, or IGBT collector-emitter capacitance, Cce, returned as a vector of scalars.

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:

Diode voltages, in volts, returned as a vector of scalars.

Temperatures, returned as a vector 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.

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:

Time constant of the IGBT turn-off current tail transient, in seconds, returned as a positive scalar.

Version History

Introduced in R2022a