Main Content

Parameterize a Lookup Table-Based MOSFET from SPICE

This example shows how to use the SPICE simulation results of a metal-oxide-semiconductor field-effect transistor (MOSFET) to set the parameter values of an N-Channel MOSFET (Lookup table-based) in Simscape™. Then, it compares the N-Channel MOSFET characteristics in Simscape with the SPICE netlist simulation results.

Open the N-Channel MOSFET (Lookup Table-Based) Model

Open the MOSFET Subcircuit

The subcircuit contains a SPICE model of an N-Channel power transistor. To open it, in the MATLAB command window, enter edit IAUC100N04S6L014.cir.

Create a Transfer Characteristics Netlist

You can create a SPICE netlist that specifies the target operating range for the subcircuit. The IAUC100N04S6L014_idvgs.net netlist simulates the transfer characteristics with drain-source voltage list.

* Transfer characteristic of MOSFET IAUC100N04S6L014
.opt DampInductors=0 Thev_Induc=1 Gfarad=0 Gfloat=0 reltol=1e-05 abstol=1e-05 vntol= 1e-05 Gmin=0 cshunt=0 cshuntintern=0 gshunt=0 topologycheck=0

X1 dut1 dut2 dut3 dut4 dut5 IAUC100N04S6L014
V1 dut1 0 2
V2 dut2 0 pwl(0 0 20 4.5)
V3 dut3 0 0
V4 dut4 0 27
.step V1 list 2 5 8 11 14
.tran 1m 20
.lib IAUC100N04S6L014.cir
.end

Set Lookup Table Parameters for Transfer Characteristics

To obtain the required MOSFET transfer characteristics, run the simulation in SPICE. The TabulatedMOSFETSetParameters script uses the simulation results stored in the IAUC100N04S6L014_idvgs1.raw raw-files to set the parameter values for the N-Channel MOSFET (Lookup Table-Based). To set the MOSFET channel parameters, in the Define Condition tab, check the Set MOSFET channel parameters box, or call the set_param function.

Compare Transfer Characteristics

The plot below compares the transfer characteristics of the N-Channel MOSFET (Lookup table-based) with the SPICE subcircuit simulation results.

Create an Output Characteristics Netlist

To parameterize an N-Channel MOSFET (Lookup table-based), you can also use an output characteristics SPICE data. The IAUC100N04S6L014_idvds.net netlist simulates the output characteristics with gate-source voltage list.

* Output characteristic of MOSFET IAUC100N04S6L014
.opt DampInductors=0 Thev_Induc=1 Gfarad=0 Gfloat=0 reltol=1e-05 abstol=1e-05 vntol= 1e-05 Gmin=0 cshunt=0 cshuntintern=0 gshunt=0 topologycheck=0

X1 dut1 dut2 dut3 dut4 dut5 IAUC100N04S6L014
V1 dut1 0 pwl(0 0 20 15)
V2 dut2 0 2
V3 dut3 0 0
V4 dut4 0 27
.step V2 1 4 0.5
.tran 2m 20
.lib IAUC100N04S6L014.cir
.end

Set Lookup Table Parameters for Output Characteristics

The IAUC100N04S6L014_idvds1.raw raw file stores the output characteristics simulated in SPICE. To change the raw file path and plot type, specify the relevant parameters in the Define Condition tab, or call the set_param function.

Compare Output Characteristics

The plot below compares the output characteristics of the N-Channel MOSFET (Lookup table-based) with the SPICE subcircuit simulation results.

Create a Capacitance vs Drain-source Voltage Netlist

To parameterize the tabulated capacitance of an N-Channel MOSFET, create a SPICE netlist that simulates the input capacitance (Ciss), the reverse transfer capacitance (Crss), and the output capacitance versus drain-source voltage with specific gate-source voltage. The IAUC100N04S6L014_cvds.net netlist simulates the I-V results of Ciss and Crss by a small AC signal on gate-source voltage and the I-V results of Coss by a small AC signal on drain-source voltage.

* Ciss Crss Coss measurement of MOSFET IAUC100N04S6L014
.opt DampInductors=0 Thev_Induc=1 Gfarad=0 Gfloat=0 reltol= 1e-05 abstol= 1e-05 vntol= 1e-05 Gmin=0 cshunt=0 cshuntintern=0 gshunt=0 topologycheck=0

* Ciss Crss I-V with Vgs small AC
X1 dut11 dut12 dut13 dut14 dut15 iauc100n04s6l014
V11 dut11 0 sine({VDC} 0 1e6)
V12 dut12 0 sine(0 0.05 1e6)
V13 dut13 0 0
V14 dut14 0 27

* Coss I-V with Vds small AC
X2 dut21 dut22 dut23 dut24 dut25 iauc100n04s6l014
V21 dut21 0 sine({VDC} 0.05 1e6)
V22 dut22 0 sine(0 0 1e6)
V23 dut23 0 0
V24 dut24 0 27
*.param VDC = 0
.step param VDC 0 30 1
.tran 1e-7 5e-6 0 2e-8
.inc IAUC100N04S6L014.cir
.end

Set Lookup Table Parameters for Capacitance

The IAUC100N04S6L014_cvds1.raw raw file stores the capacitance I-V results simulated in SPICE. To set MOSFET capacitance parameters, in the Define Conditions tab, check the Set MOSFET capacitance parameters box, or call the set_param function.

Compare Ciss, Crss and Coss Capacitance

The plot below compares the Ciss, Crss, and Coss capacitance of the N-Channel MOSFET with the SPICE subcircuit simulation results.

Create a Source-drain Forward Diode Characteristics Netlist

To parameterize the tabulated forward diode of a N-Channel MOSFET, create a SPICE netlist with the MOSFET operating in the off region and with reverse biasing drain-source voltage. The IAUC100N04S6L014_diode.net netlist simulates the current voltage characteristics of a forward diode.

* Source-Drain Forward Diode of MOSFET IAUC100N04S6L014
.opt DampInductors=0 Thev_Induc=1 Gfarad=0 Gfloat=0 reltol=1e-05 abstol=1e-05 vntol= 1e-05 Gmin=0 cshunt=0 cshuntintern=0 gshunt=0 topologycheck=0

X1 dut1 dut2 dut3 dut4 dut5 IAUC100N04S6L014
V1 dut1 0 pwl(0 0 20 -5)
V2 dut2 0 -10
V3 dut3 0 0
V4 dut4 0 27
.tran 0.1 20
.lib IAUC100N04S6L014.cir
.end

Set Lookup Table Parameters for Source-drain Forward Diode

The IAUC100N04S6L014_diode1.raw raw file stores the forward diode characteristics simulated in SPICE. To set MOSFET diode parameters, in the Define Conditions tab, check the Set MOSFET diode parameters box, or call the set_param function

Compare Forward Diode Characteristics

The plot below compares the forward diode characteristics of the N-Channel MOSFET with the SPICE subcircuit simulation results.

Results from Real-Time Simulation

This example has been tested on a Speedgoat Performance real-time target machine with an Intel® 3.5 GHz i7 multi-core CPU. This model can run in real time with a step size of 200 microseconds.