Index: simulation/raw/06_passive_ac.html =================================================================== --- simulation/raw/06_passive_ac.html (revision 7926) +++ simulation/raw/06_passive_ac.html (revision 7927) @@ -5,12 +5,12 @@

Scope

In this simulation we are going to look at how a multi-stage RC filter behaves -when stimulated with different frequency sine waves. +when stimulated with sine waves of various frequencies.

The schematics

-The single-sheet schematics contains the filter, the voltage source and -spice command symbol. +The single-sheet schematic contains the filter, the voltage source and +the spice command symbol.

@@ -19,8 +19,8 @@

SPICE: what an ac simulation is

-In the ac analysis the simulation a DC solution is calculated first -then a small signal sinusoidal stimulus is applied over a range of +In the ac analysis simulation a DC solution is calculated first +and then a small signal sinusoidal stimulus is applied over a range of frequencies. The result is typically a graph with frequency on the X axis and gain or phase on the Y axis. The AC analysis is often used to get a transfer function. @@ -29,7 +29,7 @@

V1

-In our example, V1 specifies an 1V AC signal with a DC component of 0V +In our example, V1 specifies a 1V AC signal with a DC component of 0V on the in network. The syntax for this is (see in V1's spice/params):

 dc 0 ac 1
@@ -57,16 +57,16 @@
 

The first line instructs spice to do the "ac analysis" in decade variation mode (dec 10), to get a decade logarithmic output with 10 points in each -decade. It then specifies the range of interest for frequencies: anything -between 1 Hz and 100 kHz. +decade. It then specifies the range of interest for the frequencies: +anything between 1 Hz and 100 kHz.

Then come three plots. The first is the output voltage in decibels, on -a logarithmic Y scale. Then the phase shift of the circuit, in radian -and converted to degrees. +a logarithmic Y scale, then the phase shift of the circuit, both in radians +and in degrees.

Export and run ngspice

-Because of the plot commands the output is a set of drawing (if ngspice is ran +Because of the plot commands the output is a set of drawings (if ngspice is run on X): three graphs with one curve each.

@@ -86,12 +86,12 @@ ac dec 10 1 1000k > plot.txt

-After the export, write a single word spice in the first line of the -file (e.g. using a text editor), else gnucap won't know the file is in spice +After the export, write the single word spice in the first line of the +file (e.g. using a text editor), otherwise gnucap won't know the file is in spice syntax. Then run gnucap 06_passive_ac.cir and it will dump a text -table to plot.txt that can be plotted using e.g. gnuplot. +table to plot.txt that can be plotted using a suitable utility, e.g. gnuplot.

-The gnucap-modified schematics is also available. +The gnucap-modified schematic is also available.