# SPICE NPN

SPICE-compatible Gummel-Poon NPN Transistor

• Library:
• Simscape / Electrical / Additional Components / SPICE Semiconductors

## Description

The SPICE NPN block represents a SPICE-compatible four-terminal Gummel-Poon NPN bipolar junction transistor. A capacitor connects the substrate port, sx, to the transistor base, bx. Therefore, the device is equivalent to a three-terminal transistor when you use the default value of `0` for the C-S junction capacitance, CJS parameter and connect the substrate port to any other port, including the emitter port, ex, or the collector port, cx.

SPICE, or Simulation Program with Integrated Circuit Emphasis, is a simulation tool for electronic circuits. You can convert some SPICE subcircuits into equivalent Simscape™ Electrical™ models using the Environment Parameters block and SPICE-compatible blocks from the Additional Components library. For more information, see `subcircuit2ssc`.

### Equations

Variables for the SPICE NPN block equations include:

• Variables that you define by specifying parameters for the SPICE NPN block. The visibility of some of the parameters depends on the value that you set for other parameters. For more information, see Parameters.

• Geometry-adjusted variables, which depend on several values that you specify using parameters for the SPICE NPN block. For more information, see Geometry-Adjusted Variables.

• Temperature, T, which is `300.15` `K` by default. You can use a different value by specifying parameters for the SPICE NPN block or by specifying parameters for both the SPICE NPN block and an Environment Parameters block. For more information, see Transistor Temperature.

• Minimal conductance, GMIN, which is `1e–12` `1/Ohm` by default. You can use a different value by specifying a parameter for an Environment Parameters block. For more information, see Minimal Conduction.

Several variables in the equations for the SPICE NPN bipolar junction transistor model consider the geometry of the device that the block represents. These geometry-adjusted variables depend on variables that you define by specifying SPICE NPN block parameters. The geometry-adjusted variables depend on these variables:

• AREA — Area of the device

• SCALE — Number of parallel connected devices

The table includes the geometry-adjusted variables and the defining equations.

VariableDescriptionEquation
`$I{S}_{d}=IS*AREA*SCALE$`
`$IK{F}_{d}=IKF*AREA*SCALE$`
`$IS{E}_{d}=ISE*AREA*SCALE$`
`$IK{R}_{d}=IKR*AREA*SCALE$`
`$IS{C}_{d}=ISC*AREA*SCALE$`
`$IR{B}_{d}=IRB*AREA*SCALE$`
`$CJ{E}_{d}=CJE*AREA*SCALE$`
`$IT{F}_{d}=ITF*AREA*SCALE$`
`$CJ{C}_{d}=CJC*AREA*SCALE$`
`$CJ{S}_{d}=CJS*AREA*SCALE$`
`$R{B}_{d}=\frac{RB}{AREA*SCALE}$`
`$RB{M}_{d}=\frac{RBM}{AREA*SCALE}$`
`$R{E}_{d}=\frac{RE}{AREA*SCALE}$`
`$R{C}_{d}=\frac{RC}{AREA*SCALE}$`

Transistor Temperature

You can use these options to define transistor temperature, T:

• Fixed temperature — The block uses a temperature that is independent from the circuit temperature when the Model temperature dependence using parameter in the Temperature settings of the SPICE NPN block is set to `Fixed temperature`. For this model, the block sets T equal to TFIXED.

• Device temperature — The block uses a temperature that depends on circuit temperature when the Model temperature dependence using parameter in the Temperature settings of the SPICE NPN block is set to `Device temperature`. For this model, the block defines temperature as

`$T={T}_{C}+TOFFSET$`

Where:

• TC is the circuit temperature.

If there is no Environment Parameters block in the circuit, TC is equal to 300.15 K.

If there is an Environment Parameters block in the circuit, TC is equal to the value that you specify for the Temperature parameter in the SPICE settings of the Environment Parameters block. The default value for the Temperature parameter is `300.15` `K`.

• TOFFSET is the offset local circuit temperature.

Minimal Conduction

Minimal conductance, GMIN, has a default value of `1e–12` `1/Ohm`. To specify a different value:

1. If there is not an Environment Parameters block in the circuit, add one.

2. In the SPICE settings of the Environment Parameters block, specify the desired GMIN value for the GMIN parameter.

Current-Voltage and Base Charge Model

The current-voltage relationships and base charge relationships for the transistor are described in terms of Base-Emitter and Base-Collector Junction Currents, Terminal Currents, and Base Charge Model. As applicable, the model parameters are first adjusted for temperature.

Base-Emitter and Base-Collector Junction Currents

The base-emitter junction current depends on the base-emitter voltage, VBE such that:

• When ${V}_{BE}>80*{V}_{TF}$:

`${I}_{bef}=I{S}_{d}*\left(\left(\frac{{V}_{BE}}{{V}_{TF}}-79\right)*{e}^{80}-1\right)+{G}_{\mathrm{min}}*{V}_{BE}$`
`${I}_{bee}=IS{E}_{d}*\left(\left({V}_{BE}-80*{V}_{TF}+{V}_{TE}\right)*\frac{{e}^{\left(80*{V}_{TF}/{V}_{TE}\right)}}{{V}_{TE}}-1\right)$`
• When ${V}_{BE}\le 80*{V}_{TF}$:

`${I}_{bef}=I{S}_{d}*\left({e}^{\left({V}_{BE}/{V}_{TF}\right)}-1\right)+{G}_{\mathrm{min}}*{V}_{BE}$`
`${I}_{bee}=IS{E}_{d}*\left({e}^{\left({V}_{BE}/{V}_{TE}\right)}-1\right)$`

The base-collector junction current depends on the base collector voltage, VBC, such that:

• When ${V}_{BC}>80*{V}_{TR}$:

`${I}_{bcr}=I{S}_{d}*\left(\left(\frac{{V}_{BC}}{{V}_{TR}}-79\right)*{e}^{80}-1\right)+{G}_{\mathrm{min}}*{V}_{BC}$`
`${I}_{bcc}=IS{C}_{d}*\left(\left({V}_{BC}-80*{V}_{TR}+{V}_{TC}\right)*\frac{{e}^{\left(80*{V}_{TR}/{V}_{TC}\right)}}{{V}_{TC}}-1\right)$`
• When ${V}_{BC}\le 80*{V}_{TR}$:

`${I}_{bcr}=IS{C}_{d}*\left({e}^{\left({V}_{BC}/{V}_{TR}\right)}-1\right)+{G}_{min}*{V}_{BC}$`
`${I}_{bcc}=IS{C}_{d}*\left({e}^{\left({V}_{BC}/{V}_{TC}\right)}-1\right)$`

Where:

• VBE is the base-emitter voltage.

• VBC is the base-collector voltage.

• VTE is the emitter thermal voltage, such that ${V}_{TE}=NE*k*T/q$.

• VTC is the collector thermal voltage, such that ${V}_{TC}=NC*k*T/q$.

• VTF is the forward thermal voltage, such that ${V}_{TF}=NF*k*T/q$.

• VTR is the reverse thermal voltage, such that ${V}_{TR}=NR*k*T/q$.

• ISCd is the geometry-adjusted base-collector leakage current.

• ISEd is the geometry-adjusted base-emitter leakage current.

• NE is the base-emitter emission coefficient.

• NC is the base-collector emission coefficient.

• NF is the forward emission coefficient.

• NR is the reverse emission coefficient.

• q is the elementary charge on an electron.

• k is the Boltzmann constant.

• T is the transistor temperature. For more information, see Transistor Temperature.

• Gmin is the minimum conductance. For more information, see Minimal Conduction.

Terminal Currents

The terminal currents are calculated as:

`${I}_{B}=\left(\frac{{I}_{bef}}{BF}+{I}_{bee}+\frac{{I}_{bcr}}{BR}+{I}_{bcc}\right)$`

`${I}_{C}=\left(\frac{{I}_{bef}-{I}_{bcr}}{{q}_{b}}-\frac{{I}_{bcr}}{BR}-{I}_{\text{bcc}}\right)$`

Where:

• IB is the base terminal current.

• IC is the collector terminal current.

• BF is the forward beta.

• BR is the reverse beta.

Base Charge Model

The base charge, qb, is calculated using these equations:

`${q}_{1}={\left(1-\frac{{V}_{BC}}{VAF}-\frac{{V}_{BE}}{VAR}\right)}^{-1}$`

`${q}_{2}=\frac{{I}_{bef}}{IK{F}_{d}}+\frac{{I}_{bcr}}{IK{R}_{d}}$`

Where:

• qb is the base charge.

• VAF is the forward Early voltage.

• VAR is the reverse Early voltage.

• IKFd is the geometry-adjusted forward knee current.

• IKRd is the geometry-adjusted reverse knee current.

• eps is 1e-4.

Base Resistance Model

You can use these options to model base resistance, rbb:

• If you use the default value of infinity for the Half base resistance cur, IRB parameter, the block calculates the base resistance as

Where:

• rbb is base resistance.

• RBMd is the geometry-adjusted minimum base resistance.

• RBd is the geometry-adjusted zero-bias base resistance.

• If you specify a finite value for the Half base resistance cur, IRB parameter, the block calculates the base resistance as

Where

`$z=\frac{\sqrt{1+144{I}_{B}/\left({\pi }^{2}IR{B}_{d}\right)}-1}{\left(24/{\pi }^{2}\right)\sqrt{\left({I}_{B}/IR{B}_{d}\right)}}$`

Transit Charge Modulation Model

If you specify nonzero values for the Coefficient of TF, XTF parameter, the block models transit charge modulation by scaling the forward transit time as

`$T{F}_{\mathrm{mod}}=\frac{TF*\left[1+XTF*{e}^{{V}_{BC}/\left(1.44{V}_{TF}\right)}{\left(\frac{{I}_{BE}}{{I}_{BE}+IT{F}_{d}}\right)}^{2}\right]}{{q}_{b}}$`

Where ITFd is the geometry-adjusted coefficient of the forward transit time.

Junction Charge Model

The block lets you model junction charge. The base-collector charge, Qbc, and the base-emitter charge, Qbe, depend on an intermediate value, Qdep. As applicable, the model parameters are first adjusted for temperature.

• For the internal base-emitter junctions

`${Q}_{be}=T{F}_{\mathrm{mod}}*{I}_{be}+{Q}_{dep}$`

• For the internal base-collector junctions

`${Q}_{bc}=TR*{I}_{bc}+XCJC*{Q}_{dep}$`

• For the external base-collector junctions

`${Q}_{{b}_{ext}c}=\left(1-XCJC\right)*{Q}_{dep}$`

Qdep depends on the junction voltage, Vjct (VBE for the base-emitter junction and VBC for the base-collector junction), as follows.

Applicable Range of Vjct ValuesCorresponding Qdep Equation
${V}_{jct}${Q}_{dep}={C}_{jct}*VJ*\frac{1-{\left(1-{V}_{jct}/VJ\right)}^{\left(1-MJ\right)}}{1-MJ}$
${V}_{jct}\ge FC*VJ$${Q}_{dep}={C}_{jct}*\left[F1+\frac{F3*\left({V}_{jct}-FC*VJ\right)+\frac{MJ*\left[{V}_{jct}{}^{2}-{\left(FC*VJ\right)}^{2}\right]}{2*VJ}}{F2}\right]$

Where:

• FC is the capacitance coefficient.

• VJ is:

• The base-emitter built-in potential, VJE, for the base-emitter junction.

• The base-collector built-in potential, VJC, for the base-collector junction.

• MJ is:

• The base-emitter exponential factor, MJE, for the base-emitter junction.

• The base-collector exponential factor, MJC, for the base-collector junction.

• Cjct is:

• The geometry-adjusted base-emitter depletion capacitance, CJEd, for the base-emitter junction.

• The geometry-adjusted base-collector depletion capacitance, CJCd, for the base-collector junction.

• $F1=VJ*\left(1-{\left(1-FC\right)}^{\left(1-MJ\right)}\right)/\left(1-MJ\right)$

• $F2={\left(1-FC\right)}^{\left(1+MJ\right)}$

• $F3=1-FC*\left(1+MJ\right)$

The collector-substrate charge, Qcs, depends on the collector-substrate voltage, Vcs. As applicable, the model parameters are first adjusted for temperature.

Applicable Range of Vcs ValuesCorresponding Qcs Equation
${V}_{cs}<0$$Qcs=CJ{S}_{d}*VJS*\left(\frac{1-{\left(1-{V}_{cs}/VJS\right)}^{\left(1-MJS\right)}}{1-MJS}\right)$
${V}_{cs}\ge 0$$Qcs=CJ{S}_{d}*\left(1+MJS*{V}_{cs}/\left(2*VJS\right)\right)*{V}_{cs}$

Where:

• CJSd is the geometry-adjusted collector-substrate junction capacitance.

• VJS is the substrate built-in potential.

• MJS is the substrate exponential factor.

Temperature Dependence

The relationship between the saturation current, ISd, and the transistor temperature, T, is

`$IS\left(T\right)=I{S}_{d}*{\left(T/{T}_{meas}\right)}^{XTI}*{e}^{\left(\frac{T}{{T}_{meas}}-1\right)*\frac{EG}{{V}_{t}}}$`

Where:

• ISd is the geometry-adjusted transport saturation current.

• Tmeas is the parameter extraction temperature.

• XTI is the transport saturation current temperature exponent.

• EG is the energy gap.

• Vt = kT/q.

The relationship between the base-emitter junction potential, VJE, and the transistor temperature, T, is

`$VJE\left(T\right)=VJE*\left(\frac{T}{{T}_{meas}}\right)-\frac{3*k*T}{q}*\mathrm{log}\left(\frac{T}{{T}_{meas}}\right)-\left(\frac{T}{{T}_{meas}}\right)*E{G}_{{T}_{meas}}+E{G}_{T}$`

Where:

• VJE is the base-emitter built-in potential.

• $E{G}_{{T}_{meas}}=1.16eV-\left(7.02e-4*{T}_{meas}{}^{2}\right)/\left({T}_{meas}+1108\right)$

• $E{G}_{T}=1.16eV-\left(7.02e-4*{T}^{2}\right)/\left(T+1108\right)$

The block uses the VJE(T) equation to calculate the base-collector junction potential by substituting VJC, the base-collector built-in potential, for VJE.

The relationship between the base-emitter junction capacitance, CJE, and the transistor temperature, T, is

`$CJE\left(T\right)=CJ{E}_{d}*\left[1+MJE*\left(400e-6*\left(T-{T}_{meas}\right)-\frac{VJE\left(T\right)-VJE}{VJE}\right)\right]$`

Where:

• CJEd is the geometry-adjusted base-emitter depletion capacitance.

• MJE is the base-emitter exponential factor.

The block uses the CJE(T) equation to calculate the base-collector junction capacitance by substituting CJCd, geometry-adjusted base-collector depletion capacitance, for CJEd and MJC, base-collector exponential factor, for MJE.

The relationship between the forward and reverse beta and the transistor temperature, T, is

`$\beta \left(T\right)=\beta *{\left(\frac{T}{{T}_{meas}}\right)}^{XTB}$`

Where:

• β is the forward beta or reverse beta.

• XTB is the beta temperature exponent.

The relationship between the base-emitter leakage current, ISE, and the transistor temperature, T, is

Where:

• ISEd is the geometry-adjusted base-emitter leakage current.

• NE is the base-emitter emission coefficient.

The block uses this equation to calculate the base-collector leakage current by substituting, ISCd, the geometry-adjusted base-collector leakage current for ISEd and NC, the base-collector emission coefficient, for NE.

## Assumptions and Limitations

• The block does not support noise analysis.

• The block applies initial conditions across junction capacitors and not across the block ports.

## Ports

### Conserving

expand all

Electrical conserving port associated with the transistor base terminal.

Electrical conserving port associated with the transistor collector terminal.

Electrical conserving port associated with the transistor emitter terminal.

Electrical conserving port associated with the transistor substrate terminal.

## Parameters

expand all

### Main

Device area. The value must be greater than `0`.

Number of parallel transistors that the block represents. The value must be greater than `0`.

### Forward Gain

Magnitude of the current at which the transistor saturates. The value must be greater than `0`.

Ideal maximum forward beta. The value must be greater than `0`.

Forward emission coefficient or ideality factor. The value must be greater than `0`.

Forward Early voltage. The value must be greater than or equal to `0`.

Current value at which forward-beta high-current roll-off occurs. The value must be greater than or equal to `0`.

Base-emitter leakage current. The value must be greater than or equal to `0`.

Base-emitter emission coefficient or ideality factor. The value must be greater than `0`.

### Reverse Gain

Ideal maximum reverse beta. The value must be greater than `0`.

Reverse emission coefficient or ideality factor. The value must be greater than `0`.

Reverse Early voltage. The value must be greater than or equal to `0`.

Current value at which reverse-beta high-current roll-off occurs. The value must be greater than or equal to `0`.

Base-collector leakage current. The value must be greater than or equal to `0`.

Base-collector emission coefficient or ideality factor. The value must be greater than `0`.

### Resistors

Maximum resistance of the base. The value must be greater than or equal to `0`.

Base current at which the base resistance has dropped to half of its zero-bias value. The value must be greater than or equal to `0`. If you do not want to model the change in base resistance as a function of base current, use the default value of `Inf`.

Minimum resistance of the base. The value must be less than or equal to the Zero-bias base resistance, RB parameter value.

Resistance of the emitter. The value must be greater than or equal to `0`.

Resistance of the collector. The value must be greater than or equal to `0`.

### Capacitance

Options for modeling the junction capacitance:

• `No` — Do not include junction capacitance in the model. This is the default option.

• `Yes` — Include junction capacitance in the model.

#### Dependencies

Selecting `Yes` for the Model junction capacitance parameter exposes other Capacitance parameters and these capacitance junction settings:

• B-E Capacitance — Base-emitter parameters

• B-C Capacitance — Base-collector parameters

• C-S Capacitance — Collector-substrate parameters

Fitting coefficient, FC, that quantifies the decrease of the depletion capacitance with applied voltage. The value must be greater than or equal to `0` and less than `0.95`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Options for specifying initial conditions:

• `No` — Do not specify an initial condition for the model. This is the default option.

• `Yes` — Specify the initial transistor conditions.

Note

The block applies the initial transistor voltages across the junction capacitors and not across the ports.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Selecting `Yes` for the Specify initial condition parameter exposes related parameters.

Base-emitter voltage at the start of the simulation.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance and `Yes` for the Specify initial condition parameter.

Base-collector voltage at the start of the simulation.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance and `Yes` for the Specify initial condition parameter.

### B-E Capacitance

These settings are exposed if you select `Yes` for the Model junction capacitance parameter in the Capacitance settings.

Depletion capacitance across the base-emitter junction. The value must be greater than or equal to `0`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Base-emitter junction potential. The value must be greater than or equal to `0.01`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Grading coefficient for the base-emitter junction. The value must be greater than or equal to `0` and less than or equal to `0.9`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Transit time of the minority carriers that cause diffusion capacitance when the base-emitter junction is forward-biased. The value must be greater than or equal to `0`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Coefficient for the base-emitter bias dependence of the transit time, which produces a charge across the base-emitter junction. The value must be greater than or equal to `0`. If you do not want to model the effect of base-emitter bias on transit time, use the default value of `0`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Voefficient for the base-collector bias dependence of the transit time. The value must be greater than or equal to `0`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Coefficient for the dependence of the transit time on collector current. The value must be greater than or equal to `0`. If you do not want to model the effect of collector current on transit time, use the default value of `0`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

### B-C Capacitance

These settings are exposed if you select `Yes` for the Model junction capacitance parameter in the Capacitance settings.

Depletion capacitance across the base-collector junction. The value must be greater than `0`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Base-collector junction potential. The value must be greater than or equal to `0.01` `V`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Grading coefficient for the base-collector junction. The value must be greater than or equal to `0` and less than or equal to `0.9`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Fraction of the base-collector depletion capacitance that is connected between the internal base and the internal collector. The rest of the base-collector depletion capacitance is connected between the external base and the internal collector. The value must be greater than or equal to `0` and less than or equal to `1`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Transit time of the minority carriers that cause diffusion capacitance when the base-collector junction is forward-biased. The value must be greater than or equal to `0`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

### C-S Capacitance

These settings are exposed if you select `Yes` for the Model junction capacitance parameter in the Capacitance settings.

Collector-substrate junction capacitance. The value must be greater than or equal to `0`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Potential of the substrate. The value must be greater than or equal to `0.01` `V`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

Grading coefficient for the collector-substrate junction. The value must be greater than or equal to `0` and less than or equal to `0.9`.

#### Dependencies

This parameter is only visible when you select `Yes` for the Model junction capacitance parameter.

### Temperature

Select one of these options for modeling the transistor temperature dependence:

• `Device temperature` — Use the device temperature to model temperature dependence.

• `Fixed temperature` — Use a temperature that is independent of the circuit temperature to model temperature dependence.

#### Dependencies

Selecting `Device temperature` exposes the Offset local circuit temperature, TOFFSET parameter. Selecting `Fixed temperature` exposes the Fixed circuit temperature, TFIXED parameter.

Forward and reverse beta temperature exponent that models base current temperature dependence. The value must be greater than or equal to `0`.

Energy gap that affects the increase in the saturation current as temperature increases. The value must be greater than or equal to `0.1`.

Order of the exponential increase in the saturation current as temperature increases. The value must be greater than or equal to `0`.

Amount by which the transistor temperature differs from the circuit temperature.

#### Dependencies

This parameter is only visible when you select ```Device temperature``` for the Model temperature dependence using parameter.

Transistor simulation temperature. The value must be greater than `0` `K`.

#### Dependencies

This parameter is only visible when you select ```Fixed temperature``` for the Model temperature dependence using parameter.

Temperature at which the transistor parameters are measured. The value must be greater than `0` `K`.

## References

[1] G. Massobrio and P. Antognetti. Semiconductor Device Modeling with SPICE. 2nd Edition. New York: McGraw-Hill, 1993.

## Extended Capabilities

### Functions

Introduced in R2008a