# PNP 電晶體 (`pnp`)

> 電流與電壓全部反向的 NPN 電晶體。

![pnp](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/img/pnp.svg)

[元件參考](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/) · [English](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/switches/pnp/)

**分類:** 開關元件 · **種類:** `{"kind":"pnp"}`

## 何時使用

用於高側開關、電流鏡，以及與 NPN 電晶體搭配的互補級。

## 接腳

| 接腳 | 訊號域 | 意義 |
|---|---|---|
| `c` | 電氣 | 集極；集極電流由此流出 |
| `b` | 電氣 | 基極；射極電位較高時電流由此流出 |
| `e` | 電氣 | 射極；基極與集極電流由此流入 |

## 常用參數

- `bf`: Current gain in normal use (預設值: 100)
- `vbeOn`: Base-emitter voltage when it turns on (預設值: 0.7)
- `vceSat`: Collector-emitter voltage when fully on (預設值: 0.2)
- `ron`: Resistance of each junction when on (預設值: 10m)

## 參數

| 鍵 | 單位 | 預設值 | 典型範圍 | 說明 |
|---|---|---|---|---|
| `bf` | — | 100 |  | Current gain in normal use |
| `br` | — | 1 |  | Current gain when used backwards |
| `vbeOn` | V | 0.7 |  | Base-emitter voltage when it turns on |
| `vceSat` | V | 0.2 |  | Collector-emitter voltage when fully on |
| `ron` | Ω | 10m |  | Resistance of each junction when on |
| `roff` | Ω | 10g |  | Resistance of each junction when off |
| `rb` | Ω | 0 |  | Resistance in series with the base |
| `rbm` | Ω | 選填（預設關閉） |  | Base resistance at high current, where rb falls to; rb when not set; Gummel–Poon level only |
| `irb` | A | 0 |  | Base current where rb falls halfway to rbm; 0 to follow the base charge instead; Gummel–Poon level only |
| `rc` | Ω | 0 |  | Resistance in series with the collector |
| `re` | Ω | 0 |  | Resistance in series with the emitter |
| `level` | — | pwl |  | Transistor model; `pwl` is the fast piecewise-linear model (bf, br, vbeOn, vceSat, ron, roff), `gp` the SPICE Gummel–Poon model of vendor models (is, bf, br, nf, nr, vaf, var, ikf, ikr, ise, ne, isc, nc, temperature, junction capacitances and transit times) |
| `is` | A | 1e-16 |  | Transport saturation current; Gummel–Poon level only |
| `nf` | — | 1 |  | Forward emission coefficient; Gummel–Poon level only |
| `nr` | — | 1 |  | Reverse emission coefficient; Gummel–Poon level only |
| `vaf` | V | 0 |  | Forward Early voltage; how much the collector current grows with the collector voltage; 0 for none; Gummel–Poon level only |
| `var` | V | 0 |  | Reverse Early voltage; 0 for none; Gummel–Poon level only |
| `ikf` | A | 0 |  | High-current corner of the forward gain; the collector current where the gain starts to fall; 0 for none; Gummel–Poon level only |
| `ikr` | A | 0 |  | High-current corner of the reverse gain; 0 for none; Gummel–Poon level only |
| `ise` | A | 0 |  | Base-emitter leakage saturation current; lowers the gain at small currents; Gummel–Poon level only |
| `ne` | — | 1.5 |  | Base-emitter leakage emission coefficient; Gummel–Poon level only |
| `isc` | A | 0 |  | Base-collector leakage saturation current; Gummel–Poon level only |
| `nc` | — | 2 |  | Base-collector leakage emission coefficient; Gummel–Poon level only |
| `xtb` | — | 0 |  | Temperature exponent of the current gains; Gummel–Poon level only |
| `eg` | eV | 1.11 |  | Energy gap for the temperature effect on is; Gummel–Poon level only |
| `xti` | — | 3 |  | Temperature exponent of is; Gummel–Poon level only |
| `tnom` | °C | 27 |  | Temperature the model's values belong to; Gummel–Poon level only |
| `cje` | F | 0 |  | Base-emitter zero-bias depletion capacitance; Gummel–Poon level only |
| `vje` | V | 0.75 |  | Base-emitter built-in potential; Gummel–Poon level only |
| `mje` | — | 0.33 |  | Base-emitter grading coefficient; Gummel–Poon level only |
| `cjc` | F | 0 |  | Base-collector zero-bias depletion capacitance; Gummel–Poon level only |
| `vjc` | V | 0.75 |  | Base-collector built-in potential; Gummel–Poon level only |
| `mjc` | — | 0.33 |  | Base-collector grading coefficient; Gummel–Poon level only |
| `xcjc` | — | 1 |  | Base-collector capacitance share inside rb; the rest is at the base pin, outside rb; Gummel–Poon level only |
| `fc` | — | 0.5 |  | Forward-bias depletion capacitance coefficient; Gummel–Poon level only |
| `tf` | s | 0 |  | Forward transit time; the charge stored while it conducts; Gummel–Poon level only |
| `xtf` | — | 0 |  | Bias coefficient of the forward transit time; Gummel–Poon level only |
| `vtf` | V | 0 |  | Collector voltage scale of the transit time; how fast xtf's effect grows with the base-collector voltage; 0 for none; Gummel–Poon level only |
| `itf` | A | 0 |  | Current where the transit time starts to grow; Gummel–Poon level only |
| `tr` | s | 0 |  | Reverse transit time; the charge stored in saturation, which sets the turn-off delay; Gummel–Poon level only |
| `temp` | °C | 27 |  | Device temperature the model is evaluated at; Gummel–Poon level only |
| `kf` | — | 0 |  | Flicker (1/f) noise coefficient of the base current, for the noise analysis; 0 for none; Gummel–Poon level only |
| `af` | — | 1 |  | Flicker noise exponent of the base current; Gummel–Poon level only |
| `part` | — | 選填（預設關閉） |  | Part number; the catalogue part number, such as XAL8080-123MEC or 2 × XAL8080-123MEC for two in series; information only, not simulated |

_參數說明在兩種語言中都是英文。_

**適用於:** 高側開關 · 電流鏡 · 互補推挽級

**不適用於:** 低側開關 → [`npn`](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/switches/npn/) · 由閘極電壓驅動的高側開關 → [`pmos`](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/switches/pmos/)

## 公式

| 公式 | 方程式 | 出處 |
|---|---|---|
| 基極電流 | Ib = (Vdrv − vbeOn)/Rb | Sedra & Smith, Microelectronic Circuits, 7th ed. (2015), ch. 6 (BJT circuits at DC) |
| 主動區最大集極電流 | Ic = bf·Ib | Sedra & Smith, Microelectronic Circuits, 7th ed. (2015), ch. 6 (active mode, Ic = β·Ib) |
| 過驅動倍數 | k = bf·Ib/Ic(load) | Sedra & Smith, Microelectronic Circuits, 7th ed. (2015), ch. 6 (saturation mode and forced β) |

## 快速驗算

輸入:

- `vdrv`: 射極到低電位驅動的電壓 = 5 V
- `rbase`: 基極電阻 = 1k Ω
- `vbeOn`: 射基極導通電壓 = 700m V, `vbeOn`
- `bf`: 電流增益 = 100 —, `bf`
- `iload`: 負載所需集極電流 = 200m A

輸出:

- `ib`: 基極電流 = `(vdrv - vbeOn)/rbase` A
- `icmax`: 最大集極電流 = `bf*ib` A
- `overdrive`: 過驅動倍數（大於 1 即飽和） = `bf*ib/iload` —

## 模型邏輯

- 它是鏡像的 NPN 模型：v(e) - v(b) 超過 vbeOn 時，射基極接面經 ron 導通。
- 由 e 到 c 的電流源為射基極電流的 bf 倍；電路無法承受時，集基極接面（壓降 vbeOn - vceSat）把 VEC 鉗在 vceSat 附近。
- 參數都是絕對值；i(name) 是流入 c 的電流，所以導通時為負值。
- 沒有指數定律、電荷儲存、Early 效應與切換時間。

## 模型

鏡像的 NPN 模型。v(e) - v(b) 超過 vbeOn 時射基極接面導通，電流源由 e 到 c 提供該電流的 bf 倍，飽和時把 VEC 鉗在 vceSat。參數都是絕對值，同一組數值兩種類型都適用。

## 常見錯誤

- PNP 開關只有在基極被拉到射極電位時才會截止。射極接電源而基極驅動到 0 V 時，它會一直完全導通。
- vbeOn 與 vceSat 不要填負值，正負號由元件類型決定。i(name) 是集極電流，因為由 c 流出，所以為負值。

## 規格書與來源

bf 取自 hFE，vbeOn 取自 VBE(on)，vceSat 取自 VCE(sat)，都以絕對值填入。SPICE 模型直接給出 BF 與 BR。

## 範例

以指令 `file.openExample` 開啟範例，名稱為 `demo:pnp`.

---
由 `cargo xtask reference` 依使用說明文字與參數規格產生，請勿手動編輯。
