Spectrum Software
Industrial Strength Simulation




Spectrum Software has released Micro-Cap 11, the eleventh generation of our SPICE circuit simulator.

For users of previous Micro-Cap versions, check out the new features available in the latest version. For those of you who are new to Micro-Cap, take our features tour to see what Micro-Cap has to offer.




Quasi Small Signal Analysis


This article was updated from a previous article in the Fall 2005 newsletter to reflect the improved capabilities of Micro-Cap 9 in this area.

The standard AC analysis is a small signal analysis that calculates the DC operating point of a circuit and then linearizes the devices about the operating point values. For AC analysis to produce reasonable results, the operating point values should be characteristic of the circuit's standard mode of operation such as the linear mode of operation for an opamp circuit. With switching circuits, there are commonly two modes of operation that an AC response would have to take into account. Since a standard AC analysis can only take into account a single mode, different methods must be used to obtain a frequency response.

One method is to use average models of all the switching components in the schematic. Average models average the state equations of the two switch positions over a switching cycle, but they are not very common and can be difficult to create. The method that will be described in this article is a quasi small signal analysis that uses the Fourier capabilities of transient analysis to convert a nonlinear simulation into its frequency domain equivalent.

Quasi small signal example circuit

The example circuit used to demonstrate this technique is displayed above. The circuit is a simple low pass RC filter. A linear circuit is used in this example instead of a switching circuit in order to be able to compare the quasi small signal analysis to the standard AC analysis. In addition to the RC filter, the only other component in the schematic is a nonlinear function voltage source whose main attributes are defined as:

VALUE = sin(2*PI*FS1*T)
FREQ = 1

The Freq attribute, if defined, has priority over the Value attribute during an AC analysis, and in this case, it defines a 1 volt small signal source for an AC simulation run. The Freq attribute will be ignored during a transient simulation. The Value attribute defines a one volt peak amplitude sine wave signal during a transient run whose frequency is set by the symbolic variable FS1. FS1 has its value set through a define statement present in the schematic. The standard AC analysis is displayed below. The magnitude of the output voltage is the top plot, and the phase of the output voltage is the bottom plot. This plot will be the benchmark for the quasi small signal results.

Standard AC analysis simulation

The quasi small signal analysis is simulated through the transient analysis capabilities of Micro-Cap. For transient analysis, the symbolic variable FS1 will be stepped in order to obtain the circuit's output waveform at different frequencies of operation. In the Stepping dialog box, the List method has been selected for FS1, and the list of values to be stepped through has been defined as:


The improvements made in Micro-Cap 9 to aid quasi small signal analysis are in allowing stepped symbolic parameters to be used within the Time Range, Maximum Time Step, and the FFT Upper and Lower Time Limit fields. This allows the simulation time, timestep, and the FFT window limits to vary along with the stepped frequency which greatly speeds up the simulation. The accuracy and ease of use have also improved with these additions. The circuit example in this article takes 37s to simulate using the method specified in the older article, but the simulation time is reduced to just 6s using the updated method.

For this example, the Time Range and Maximum Time Step fields in the Transient Analysis Limits dialog box have been set to the following:

Time Range = 200/fs1
Maximum Time Step = 1/(100*fs1)

This time range expression will simulate 200 cycles of the input sine source at each stepped frequency. In addition, the maximum time step dynamically adjusts at each step to produce a minimum of 100 data points per cycle.

In the FFT page of the Analysis Properties dialog box, the Upper and Lower Time Limit fields have been set to the following:

Upper Time Limit = 200/fs1
Lower Time Limit = 199/fs1

These two fields set the portion of the simulation that the FFT operators will perform their calculations on. With these settings, the FFT operators will only work with the last cycle out of the two hundred cycles simulated during each frequency step. Using the last cycle will exclude any initial transient that occurs from the FFT calculations. Obviously, if a circuit takes a different time to reach its steady state operation, then both the time range and the FFT limits can be adjusted accordingly. The resulting transient analysis is displayed below.

Transient analysis simulation

The top plot is the actual voltage of node Out at each frequency step. Only the last cycle in each step is displayed due to the settings in the FFT page of the Analysis Properties dialog box. The second plot displays the harmonic content of each of the stepped output waveforms. The third plot displays the phase output of the Fourier plots for each of the stepped output waveforms, and the bottom plot shows the total harmonic distortion of the voltage at node Out at each frequency step. Note that the Thd operator has had its optional reference frequency parameter defined as FS1 so that the distortion will be calculated versus the frequency of operation for each step. Although the distortion in this analysis is due to timestep aliasing, there is one slight difference in the following technique for the Thd operator that makes it a worthwhile addition to this example.

Though all of the important data is displayed on the screen, it is not in an easily readable format in determining the quasi small signal response. A performance plot can be used to extract the appropriate data and provide a better visualization of the frequency information. Performance plots can be generated by right clicking on the waveform name in the plot or by selecting the menu option Transient/Performance Windows/Add Performance Window. For this example, the performance plot created is displayed below.

Quasi Small Signal performance plot

The plot has been defined to display the following three waveforms:


The Y_Level operators will return the Y value of each stepped waveform at the X value that is specified within the expression. The top waveform plots the value of the harmonic of V(Out) at frequency FS1 for each stepped frequency. The plot reproduces the AC gain response and matches the V(Out) waveform from the standard AC analysis simulation.

The middle waveform plots the value of the phase of the Fourier response of V(Out) at frequency FS1 for each stepped frequency. This plot reproduces the AC phase response and matches the Ph(V(Out)) waveform from the standard AC analysis simulation. Note that an offset of 90 degrees was added to the waveform expression. This offset compensates for the use of the cosine expressions within the Fourier mathematical routines and aligns the phase plot with the typical AC results.

The bottom waveform plots the total harmonic distortion level at frequency 10*FS1 for each stepped frequency. Since FS1 is the reference frequency at which the distortion is measured against, the data must be extracted from a frequency greater than FS1. Setting the X value to 10*FS1 will include the second through tenth harmonics in the distortion calculation.

Return to the main Newsletter page