Differential pair
DC transfer curve, transfer function, ac response and transient.
A bipolar differential pair with a current-mirror tail. The .control block sweeps the input with dc, prints the small-signal transfer function with tf, finds the ac response to 1GHz, and runs a transient with a 5MHz sine input. The acct option on the .options line prints the run statistics at the end.
- v(4)
- v(5)
- vdb(5)
- v(4)
- v(5)
Output
transfer_function = 8.789925e+01 Nominal temperature = 27 Operating temperature = 27 Total iterations = 474 Transient iterations = 226 Circuit Equations = 17 Transient timepoints = 108 Accepted timepoints = 108 Rejected timepoints = 0 Total Analysis Time = 0.002 Transient time = 0.001 matrix reordering time = 0 L-U decomposition time = 0 Matrix solve time = 0 transient L-U decomp time = 0 Transient solve time = 0 Transient iters per point = 0 Load time = 0.002
The circuit: examples/diffpair.cir
difpair ckt - simple differential pair * vin 1 0 sin(0 0.1 5meg) ac 1 vcc 8 0 12 vee 9 0 -12 q1 4 2 6 qnl q2 5 3 6 qnl rs1 1 2 1k rs2 3 0 1k rc1 4 8 10k rc2 5 8 10k q3 6 7 9 qnl q4 7 7 9 qnl rbias 7 8 20k .model qnl npn(bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf + va=50) .options acct list node * .control dc vin -0.25 0.25 0.005 plot v(4) v(5) * tf v(5) vin print transfer_function * ac dec 10 1 1ghz *print vm(5) vp(5) plot vdb(5) plot vp(5) ylimit -180 0 * tran 5n 500n *print v(4) v(5) plot v(4) v(5) .endc .end
Run it with spice diffpair.cir, or open it with File › Load netlist in the Qt window. The plots and output above were made by util/mkexamples.py, which runs the deck in batch mode. All examples