LIBRARY
Analog.Semiconductors.Tests.NPNOperatingPoint ​
Forward-active operating-point check for NPN.
The base is held at 0.65 V through 10 Ohm and the collector at 5 V. Values from the Ebers-Moll equations at the default MSL card (Is = 1e-16, Bf = 50, Br = 0.1, Vak = 0.02, Vt = 0.02585, temperature dependency off):
I_CC = Is*(exp(0.65/Vt) - 1) + 0.65*Gbe = 8.32461e-6
I_EC = Is*(exp(-4.35/Vt) - 1) - 4.35*Gbc = -4.450e-15
qbk = 1 - V_BC*Vak = 1.087
i_c = (I_CC - I_EC)*qbk - I_EC/Br = 9.04886e-6The simulated value is 9.04827e-6. The 6.4e-5 relative gap is the 10 Ohm base drop: i_b*10 = 1.66 µV, and 1.66e-6/Vt = 6.4e-5. The base resistor is not optional — an ideal source across the junction sits across C_jE, which is structurally singular.
qbk = 1.087 is the Early factor, so it contributes the 8.7% excess over I_CC.
Usage ​
ElectricalComponents.Analog.Semiconductors.Tests.NPNOperatingPoint(Vbase=0.65, Vcollector=5.0)
Parameters: ​
| Name | Description | Units | Default value |
|---|---|---|---|
Vbase | Base bias | V | 0.65 |
Vcollector | Collector bias | V | 5.0 |
Behavior ​
Source ​
dyad
"""
Forward-active operating-point check for NPN.
The base is held at 0.65 V through 10 Ohm and the collector at 5 V. Values from the
Ebers-Moll equations at the default MSL card (`Is = 1e-16`, `Bf = 50`, `Br = 0.1`,
`Vak = 0.02`, `Vt = 0.02585`, temperature dependency off):
```
I_CC = Is*(exp(0.65/Vt) - 1) + 0.65*Gbe = 8.32461e-6
I_EC = Is*(exp(-4.35/Vt) - 1) - 4.35*Gbc = -4.450e-15
qbk = 1 - V_BC*Vak = 1.087
i_c = (I_CC - I_EC)*qbk - I_EC/Br = 9.04886e-6
```
The simulated value is 9.04827e-6. The 6.4e-5 relative gap is the 10 Ohm base drop:
`i_b*10 = 1.66 µV`, and `1.66e-6/Vt = 6.4e-5`. The base resistor is not optional — an
ideal source across the junction sits across `C_jE`, which is structurally singular.
`qbk = 1.087` is the Early factor, so it contributes the 8.7% excess over `I_CC`.
"""
test component NPNOperatingPoint
"Base level"
base_sig = BlockComponents.Sources.Constant(k = Vbase) {
"Dyad": {"placement": {"diagram": {"x1": 20, "x2": 120, "y1": 120, "y2": 220}}}
}
"Base source"
vb = ElectricalComponents.Analog.Sources.VoltageSource() {
"Dyad": {"placement": {"diagram": {"x1": 155, "x2": 255, "y1": 225, "y2": 325}}}
}
"Small base series resistance; keeps the drive off `C_jE`"
rb = ElectricalComponents.Analog.Basic.Resistor(R = 10) {
"Dyad": {"placement": {"diagram": {"x1": 295, "x2": 395, "y1": 435, "y2": 535}}}
}
"Collector level"
col_sig = BlockComponents.Sources.Constant(k = Vcollector) {
"Dyad": {"placement": {"diagram": {"x1": 150, "x2": 250, "y1": 20, "y2": 120}}}
}
"Collector source"
vc = ElectricalComponents.Analog.Sources.VoltageSource() {
"Dyad": {"placement": {"diagram": {"x1": 295, "x2": 395, "y1": 125, "y2": 225}}}
}
"Transistor under test, default card"
q = ElectricalComponents.Analog.Semiconductors.NPN() {
"Dyad": {"placement": {"diagram": {"x1": 425, "x2": 525, "y1": 435, "y2": 535}}}
}
"Ground reference"
ground = ElectricalComponents.Analog.Basic.Ground() {
"Dyad": {"placement": {"diagram": {"x1": 430, "x2": 530, "y1": 230, "y2": 330}}}
}
"Base bias"
parameter Vbase::Voltage = 0.65
"Collector bias"
parameter Vcollector::Voltage = 5.0
relations
"Started at the operating point, so the junction states carry no transient"
initial q.V_BE = 0.65
connect(base_sig.y, vb.V) {"Dyad": {"edges": [{"S": 1, "M": [{"x": 205, "y": 170}], "E": 2}], "path": {}}}
connect(col_sig.y, vc.V) {"Dyad": {"edges": [{"S": 1, "M": [{"x": 345, "y": 70}], "E": 2}], "path": {}}}
connect(vb.p, rb.p) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 140, "y": 275}, {"x": 140, "y": 485}], "E": 2}],
"path": {}
}
}
connect(rb.n, q.b) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "path": {}}}
connect(vc.p, q.c) {
"Dyad": {
"edges": [
{
"S": 1,
"M": [{"x": 280, "y": 175}, {"x": 280, "y": 380}, {"x": 475, "y": 380}],
"E": 2
}
],
"path": {}
}
}
connect(q.e, q.s, vb.n, vc.n, ground.g) {
"Dyad": {
"edges": [
{
"S": 1,
"M": [{"x": 475, "y": 550}, {"x": 540, "y": 550}, {"x": 540, "y": 485}],
"E": 2
},
{
"S": 2,
"M": [{"x": 550, "y": 485}, {"x": 550, "y": 600}, {"x": 270, "y": 600}],
"E": -1
},
{"S": -1, "M": [], "E": 3},
{"S": -1, "M": [{"x": 410, "y": 275}], "E": -2},
{"S": -2, "M": [], "E": 4},
{"S": -2, "M": [{"x": 480, "y": 175}], "E": 5}
],
"junctions": [{"x": 270, "y": 275}, {"x": 410, "y": 175}],
"path": {}
}
}
metadata {
"Dyad": {
"tests": {
"case1": {
"stop": 0.000001,
"atol": {"q.c.i": 2e-8},
"expect": {"final": {"q.c.i": 0.0000090483}}
}
}
}
}
endFlattened Source
dyad
"""
Forward-active operating-point check for NPN.
The base is held at 0.65 V through 10 Ohm and the collector at 5 V. Values from the
Ebers-Moll equations at the default MSL card (`Is = 1e-16`, `Bf = 50`, `Br = 0.1`,
`Vak = 0.02`, `Vt = 0.02585`, temperature dependency off):
```
I_CC = Is*(exp(0.65/Vt) - 1) + 0.65*Gbe = 8.32461e-6
I_EC = Is*(exp(-4.35/Vt) - 1) - 4.35*Gbc = -4.450e-15
qbk = 1 - V_BC*Vak = 1.087
i_c = (I_CC - I_EC)*qbk - I_EC/Br = 9.04886e-6
```
The simulated value is 9.04827e-6. The 6.4e-5 relative gap is the 10 Ohm base drop:
`i_b*10 = 1.66 µV`, and `1.66e-6/Vt = 6.4e-5`. The base resistor is not optional — an
ideal source across the junction sits across `C_jE`, which is structurally singular.
`qbk = 1.087` is the Early factor, so it contributes the 8.7% excess over `I_CC`.
"""
test component NPNOperatingPoint
"Base level"
base_sig = BlockComponents.Sources.Constant(k = Vbase) {
"Dyad": {"placement": {"diagram": {"x1": 20, "x2": 120, "y1": 120, "y2": 220}}}
}
"Base source"
vb = ElectricalComponents.Analog.Sources.VoltageSource() {
"Dyad": {"placement": {"diagram": {"x1": 155, "x2": 255, "y1": 225, "y2": 325}}}
}
"Small base series resistance; keeps the drive off `C_jE`"
rb = ElectricalComponents.Analog.Basic.Resistor(R = 10) {
"Dyad": {"placement": {"diagram": {"x1": 295, "x2": 395, "y1": 435, "y2": 535}}}
}
"Collector level"
col_sig = BlockComponents.Sources.Constant(k = Vcollector) {
"Dyad": {"placement": {"diagram": {"x1": 150, "x2": 250, "y1": 20, "y2": 120}}}
}
"Collector source"
vc = ElectricalComponents.Analog.Sources.VoltageSource() {
"Dyad": {"placement": {"diagram": {"x1": 295, "x2": 395, "y1": 125, "y2": 225}}}
}
"Transistor under test, default card"
q = ElectricalComponents.Analog.Semiconductors.NPN() {
"Dyad": {"placement": {"diagram": {"x1": 425, "x2": 525, "y1": 435, "y2": 535}}}
}
"Ground reference"
ground = ElectricalComponents.Analog.Basic.Ground() {
"Dyad": {"placement": {"diagram": {"x1": 430, "x2": 530, "y1": 230, "y2": 330}}}
}
"Base bias"
parameter Vbase::Voltage = 0.65
"Collector bias"
parameter Vcollector::Voltage = 5.0
relations
"Started at the operating point, so the junction states carry no transient"
initial q.V_BE = 0.65
connect(base_sig.y, vb.V) {"Dyad": {"edges": [{"S": 1, "M": [{"x": 205, "y": 170}], "E": 2}], "path": {}}}
connect(col_sig.y, vc.V) {"Dyad": {"edges": [{"S": 1, "M": [{"x": 345, "y": 70}], "E": 2}], "path": {}}}
connect(vb.p, rb.p) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 140, "y": 275}, {"x": 140, "y": 485}], "E": 2}],
"path": {}
}
}
connect(rb.n, q.b) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "path": {}}}
connect(vc.p, q.c) {
"Dyad": {
"edges": [
{
"S": 1,
"M": [{"x": 280, "y": 175}, {"x": 280, "y": 380}, {"x": 475, "y": 380}],
"E": 2
}
],
"path": {}
}
}
connect(q.e, q.s, vb.n, vc.n, ground.g) {
"Dyad": {
"edges": [
{
"S": 1,
"M": [{"x": 475, "y": 550}, {"x": 540, "y": 550}, {"x": 540, "y": 485}],
"E": 2
},
{
"S": 2,
"M": [{"x": 550, "y": 485}, {"x": 550, "y": 600}, {"x": 270, "y": 600}],
"E": -1
},
{"S": -1, "M": [], "E": 3},
{"S": -1, "M": [{"x": 410, "y": 275}], "E": -2},
{"S": -2, "M": [], "E": 4},
{"S": -2, "M": [{"x": 480, "y": 175}], "E": 5}
],
"junctions": [{"x": 270, "y": 275}, {"x": 410, "y": 175}],
"path": {}
}
}
metadata {
"Dyad": {
"tests": {
"case1": {
"stop": 0.000001,
"atol": {"q.c.i": 2e-8},
"expect": {"final": {"q.c.i": 0.0000090483}}
}
}
}
}
endTest Cases ​
Test Case case1 ​
Related ​
Examples
Experiments
Analyses
Tests