An AC analysis generates a frequency response graph. i.e. a plot of amplitude or gain against frequency. Both magnitude and phase can be viewed.
Sweep Mode=Frequency
Enter in the start, stop and number of points per decade desired. Inverse FFTs needs the linear sweep mode.
Too many points will make the simulation run longer. Too few points will result in a jagged looking graph.
Sweep Mode=Device
This option allows the ac response to be computed as a device parameters varied, for example, for VCAs or non linear capacitance with voltage sweep plots.
With this option, the fields for frequency now refer to the parameter of a swept device, with the spot test frequency given by the "Freq" field in the Swept Devices section. The reference designator of the device must be specified in the "Ref Des" field, e.g. v2, r23 etc.
R, L, C VDC and IDC may be swept.
Noise Analysis
Noise runs use the same setup as the AC sweep. Noise runs will allow plotting of:
ein - equivalent input noise, either current (A/sqrthz) or voltage (V/sqrthz). Spice waveform name is inoise_spectrum.
eon - equivalent output noise, either current or voltage. Spice waveform name is onoise_spectrum.
integrated ein - total input noise from the first plotted frequency to the cursor value. Spice waveform name is onoise_integrated.
integrated eon - total output noise from the first plotted frequency to the cursor value. Spice waveform name is onoise_integrated.
Select an input source to refer the noise to, and an output node.
Note: To obtain correct ein/iin set the signal sweep source to an ac value of either 1V or 1A.
Automatic Loop Gain Plots And Results
Plotting open loop gain in SuperSpice is a snip compared to any other Spice simulator.
To plot loop gain do the following:
1 Put an AC voltage source in series with the feedback loop, the positive end going to the amplifier input.
2 Popup the AC run setup dialog, i.e. the blue "SS" button, and go to the AC tab.
3 Set the "Analysis source" in the list box to the series loop voltage source noted in 1.
4 Check the "Plot Loop Gain" radio button.
5 Check the "Plot Signal Analysis Results" radio button.
6 Ensure all other sources have an AC value of 0.
7 Run the simulation, note its a good idea to remove the test points from other nodes to ensure only the loop gain signal gets plotted.
The selected Loop Gain source will be automatically set to AC=1V when LG is enabled, and reset to 0V after each run. Make sure that the LG source select list is set "None" if not used to prevent other sources being inadvertently set to zero.
Data from all runs can be obtained by using the "View" menu, and selecting the "Analysis Results\Loop Gain" menu item. New results with different setup data can be obtained without running the simulation again.
Results
Gain margin, phase margin, unity gain frequency loop "zero phase" frequency, and low frequency gain will be automatically displayed in the docked status window at the bottom of the main frame. Gain and phase margin are expressed in the usually positive sense. That is, if the gain is down at -12db, at the net zero phase point, it will be reported as a +12db gain margin. If the gain is unity, a positive phase margin will reflect that the phase is much larger then the zero phase point. For example, if the zero phase point is -180, and the phase at unity gain is -145, the phase margin will be (-145--180) = 35.
The AC reports feature will output the maximum and minimum of these results over all runs.
To get accurate results, use a reasonable large number of points per decade, e.g. 100-500.
"Zero Phase" phase point
The AC setup dialog has a field to set the "zero phase" phase point. In a negative feedback system this is usually -180 degrees. This is the point that is considered to be the net zero phase around the loop. For a simple system, phase will usually be shown to roll off from zero towards the -180 degree point. However, because there is some indeterminacy in calculating phase, this value may need to be set differently, typically at +/-n*180, where n must be determined from understanding the loop operation manually.
Example
SuperSpice calculates the loop gain by taking the ratio of the voltages at each side of the source, and plots the results automatically.
A typical setup is shown here.
Note that SS puts the loop gain data in the last signal position of all signals. This is usually a component power, not often examined, when doing loop gain tests.
Tips:
Always use an AC signal source of 1V. This way the graph will always be an expression of the gain. Nonlinear effects are only apparent in transient so this value is of no consequence for transient analysis. Also, make sure that other DC supplies have their AC value set to zero, unless the effect of signal on the power line as in PSRR is required.
There is potential for errors in the loop gain calculation due to loading effects. Make sure that the drive impedance on the - node is low with respect to the load impedance on the + node. For example, connecting the - node the output of the amplifier is usually sufficient.
Automatic Input and Output Impedance
Plotting the input/output impedance at a node is also an automatic feature of SuperSpice.
To plot an impedance do the following:
1 Put an AC voltage source set to 1V across the node/nodes where the impedance is to be measured.
2 Popup the AC run setup dialog, i.e. the blue "SS" button, and go to the AC tab.
3 Set the "Analysis source" in the list box to the impedance source noted in 1.
4 Check the "Impedance" radio button.
5 Check the "Plot Signal Analysis Results" radio button.
6 Ensure all other sources have an AC value of 0.
7 Run the simulation, note its a good idea to remove the test points from other nodes to ensure only the Impedance signal gets plotted.