
SILICON CHIP Amplifier Stability & Compensation, July 2011

   This zip contains three circuits, seven ngspice command files, a
simulation model library, a makefile and some scripts.  These can be used in
combination with ngspice or ltspice to generate the plots from the article
and to explore other circuit conditions and configurations.

Circuits:

   For each circuit there is a PDF file, showing the configuration, a SPICE
netlist (.net) and a GNU schematic editor (gschem) compatible file (.sch).
   The netlist should be compatible with most versions of SPICE. It uses
components whose properties are defined in the model library, "model.lib".
   The "amplifier_with_output_stage" and "amplifier_without_output_stage"
circuits are configured in open loop mode for open loop gain and phase
analysis while "amplifier_with_output_stage_and_feedback" is configured in
closed loop mode for stability and clipping analysis.

Models:

   The transistor and diode models needed to simulate the circuits have been
gathered from the internet (mainly from On Semiconductor and NXP
Semiconductor) and placed in this file for convenience.

.cir files:

   Each .cir file contains a set of ngspice commands to load one of the
circuits and the models file, set up the simulation conditions, run the
simulation(s) and save the results to a GNUplot file.  They can be modified
to show the plot on the screen (by changing the gnuplot command) and they
can be further modified to simulate different conditions.

Script files:

   The fix_plt.sh and fix_plt2.sh files take the output of the gnuplot
command from ngspice and change the gnuplot configuration to produce more
readable graphs.  After running the simuations and replotting the graphs
using these scripts, we then cleaned up the resulting graphs for
publication.

Makefile:

   The makefile can be input to the "make" utility in Linux or Cygwin (under
Windows) and this will run all the simuations and then fix the plot files
and generate PDFs.  Note that sometimes ngspice crashes when running the
"gnuplot" command but it usually works if tried again.
