Spectrum Software
spacer
Industrial Strength Simulation
select:

divider

 

News:

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.

 

divider

 

Quasi Small Signal Analysis Updated

 

This article was updated from a previous article in the Winter 2009 newsletter to reflect the improved capabilities of Micro-Cap 11 in this area. Specifically MC11.0.0.9 and later versions can now use the DEL operator on Performance functions to compute group delay.

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.

Quasi small signal analysis circuit

The method to 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.

The circuit used to demonstrate this technique is shown 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. In this case, it specifies a 1 volt small signal source for an AC simulation run. The Freq attribute is 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's initial value is set through a define statement present in the schematic. The AC analysis is shown below. The magnitude of the output voltage is the top plot, the phase of the output voltage is the middle plot and the group delay is the bottom plot. This plot will be the benchmark for the quasi small signal results.

Standard AC analysis simulation


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 Log method has been selected for FS1, and the parameters are as follows:

From .01

To 10

Step Value (10/.01)^(1/99)

These settings will produce exactly 100 points over the frequency range of .01 to 10 Hz.

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 = 2/fs1

Maximum Time Step = 1/(50*fs1)

This time range expression will simulate 2 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 50 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 = 2/fs1

Lower Time Limit = 1/fs1

This produces a frequency step for the FFT of 1/(2/FS1 - 1/FS1) = 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 cycles simulated during each frequency step. Using the last cycle will exclude much of the initial transient that occurs from the FFT calculations. 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, or you can use PSS to compute the steady state solution. The resulting transient analysis is displayed below.

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.

Transient analysis simulation


Though all of the data is shown plotted, it's not in an easily readable format to show the 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 plot created is displayed below.

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

Y_Level(HARM(V(OUT)),1,1,FS1)

Y_Level(PH(FFT(V(OUT))),1,1,FS1)+90

-DEL(Y_Level(Ph(FFT(V(OUT))),1,1,FS1)+90)/DEL(FS1)*(1/360)

The Y_Level operators will return the Y value of each stepped waveform at the X value (FS1) 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.

Quasi small signal plot

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 value of this expression:

-DEL(Y_Level(Ph(FFT(V(OUT))),1,1,FS1)+90)/DEL(FS1)*(1/360)

Since group delay is defined as

GD = DELTA(PHASE(DEGREES))/DELTA F /360,

this formula yields group delay directly. The new thing in Micro-Cap 11.0.0.9 is the ability to calculate and plot performance functions using the DEL operator. The DEL operator calculates the change in its argument from one value of FS1 to the next, so the ratio calculates the numeric derivative to arrive at the GD value.

You can see by comparing the AC and transient plots that the results for gain, phase, and group delay are the same.

 
Download Winter 2015 Circuit Files
Return to the main Newsletter page