Transistor Amplifier
The circuit
In this example, a simple amplifier with complementary transistors is
described. An important statement, .model, is used for describing the
characteristics of bipolar transistors. Up to forty parameters based on the
Gummel-Poon equivalent circuit may be specified. SPICE inserts default
values for any parameters that are not specified. However, relying on the
SPICE default settings causes the use of a more ideal device.
For example, ignoring the collector knee current parameter, ikf, which is the
collector current at which the forward current gain is reduced to half its
maximum value, would cause SPICE to set the value equal to infinity. This
would create an unrealistic transistor whose gain remained constant even at
very high operating currents.
The input file
transistor amplifier
.control
dc v2 0 1V 5mV
plot v(4) xlabel v(2)[V] ylabel output[V] title 'DC analysis'
tran 1us 200us
plot 10*v(1) v(4) xlabel t[s] ylabel '10*input output [V]'
+ title 'TRAN analysis'
ac dec 25 1kHz 100megHz
* phase should be continuous
set units = degress
let phase = vp(4) / 10 - 36 * (vp(4) gt 0)
plot vdb(4) phase xlabel f[Hz] ylabel 'magnitude[dB] phase[degree]'
+ title 'AC analysis'
unlet phase
noise v(4) v1 dec 25 1kHz 100megHz 1
setplot noise1
plot sqrt(onoise_spectrum) sqrt(inoise_spectrum) xlabel f[Hz]
+ ylabel 'Output and input noise spectrum [V/sqrt(Hz)]'
+ title 'NOISE analysis'
.endc
* input node 1
* output node 4
v0 3 0 dc 10V
v1 1 7 dc 0V ac 1 sin 0 .1V 10kHz
v2 7 0 dc .58V
q1 6 2 5 2n2222
q2 4 6 3 2n2907
r1 1 2 1k
r2 5 4 1k
r3 5 0 10
* model for a 2n2222 transistor
.model 2n2222 npn (is=19f bf=150 vaf=100 ikf=.18 ise=50p ne=2.5 br=7.5
+ var=6.4 ikr=12m isc=8.7p nc=1.2 rb=50 re=.4 rc=.3 cje=26p tf=.5n cjc=11p
+ tr=7n xtb=1.5 kf=0.032f af=1)
* model for a 2n2907 transistor
.model 2n2907 pnp (is=1.1P bf=200 nf=1.2 vaf=50 ikf=.1 ise=13p ne=1.9 br=6
+ rc=.6 cje=23p vje=.85 mje=1.25 tf=.5n cjc=19p vjc=.5 mjc=.2 tr=34n xtb=1.5)
.end
The results
|