Transistor amplifier * this is amplifier.cir file * input node 1 * output node 4 * voltage resources v0 3 0 dc 10V v1 1 7 dc 0V ac 1 sin 0 0.1V 10kHz v2 7 0 dc 0.58V * bipolar transistors q1 6 2 5 2n2222 q2 4 6 3 2n2907 * resistors 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=0.18 ise=50p + ne=2.5 br=7.5 var=6.4 ikr=12m isc=8.7p nc=1.2 rb=50 re=0.4 + rc=0.3 cje=26p tf=0.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=0.1 ise=13p + ne=1.9 br=6 rc=0.6 cje=23p vje=0.85 mje=1.25 tf=0.5n cjc=19p + vjc=0.5 mjc=0.2 tr=34n xtb=1.5) .control destroy all dc v2 0 1V 5mV tran 1us 200us ac dec 25 1kHz 100megHz setplot setplot dc1 plot v(4) xlabel v(2)[V] ylabel Output[V] setplot tran1 plot 10*v(1) v(4) xlabel t[s] ylabel '10*Input, Output [V]' setplot ac1 set units = degrees plot vdb(4) vp(4) let phase = unwrap(vp(4)) plot vdb(4) phase xlabel f[Hz] ylabel 'Magnitude[dB], Phase[deg]' .endc .end