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

 

Plotting Filter Step and Impulse Response

 

Some users have asked how to get a plot of the step and impulse response for a filter designed by Micro-Cap. Well it is very easy to do. Both of these plots require a transient analysis of the filter circuit. In the case of the step response we need the response to a unit voltage step at the input. In the case of the impulse response, we need the response of the circuit to an impulse waveform at the input. Both of these responses can readily be obtained by placing a Pulse source at the input and then editing its parameters to produce either a step or an impulse waveform.

A step waveform is simple. The required parameters are as follows:

.MODEL STEP PUL (VONE=1 P1=1m P2=1.001m P3=100m P4=100.001m P5=1)

These parameters are setup for a bandpass filter with a center frequency of 1Khz. For a slower filter you might want to increase the pulse duration. The main point is you need a 1 volt step occurring sometime after T=0 and lasting long enough so the step waveform and the response is easy to see.

An impulse waveform is also easy. Its parameters look like this:

.MODEL IMPULSE PUL (VONE=1E9 P1=0 P2=.001N P3=1N P4=1.001N P5=1)

The important consideration here is that the integral of the pulse have a value of about 1 (1E9 amplitude times 1E-9 width) and that its rise and fall times (.001n) be short in comparison to the pulse width (1n).

When the Active Filter or Passive Filter program creates a filter, it automatically places a Pulse source at the input and gives it the Model name Step, so all we need to do is to edit the model parameters to create the step we want.

As an illustration, select the Active Filters item from the Design menu. Click on the Default button. Then select the Bandpass and Chebyshev options. Select the Circuit option on the Options panel / Circuit group. Finally click on the OK button and Micro-Cap will create the schematic for a Chebyshev 1Khz bandpass filter. It looks like this:

Filter

Select Transient analysis from the Run menu and when the Analysis Limits dialog box comes up change the analysis limits to these:

Analysis Limits

Make sure that the Same Y Scales option on the Scope menu is not checked. Press F2 and the step response is plotted as follows:

Analysis Limits

The plot shows the input 1 volt step starting at 1ms, and the filter output waveform. The result is a classic step response for a third-order Chebyshev bandpass filter.

To produce an impulse response we need only modify the Pulse source.

Press F3 to exit transient analysis and return to the schematic editor. Double click on the Pulse source and change the Model name to Impulse. Edit the parameters to those shown above for the impulse response.

Select Transient analysis from the Run menu and when the Analysis Limits dialog box comes up simply press F2 to start the run. The analysis parameters are the same as the Step case.

When the run is finished the plot should look like this:

Analysis Limits

The display shows the impulse waveform and the response waveform from the filter output. The impulse waveform is so narrow it appears to be a vertical spike, but it actually is 1E9 high and 1ns wide. The output response shows a resonant oscillation whose frequency is at 1Khz, which is also the BP center frequency.

In summary all you need to do to the standard Active Filter or Passive Filter circuit file is:

1) Edit the Pulse parameters to produce either a step or an impulse.

2) Edit the transient analysis parameters so that:

A) The Time Range is between 10/FC and 50/FC, where FC is the center or cutoff frequency of the filter. You may need to increase or decrease this value to see more or less of the response.

B) Maximum Time Step is about .001* Time Range chosen in step A. This simply assures a smooth plot.

C) You are plotting V(IN) and V(OUT).

D) Auto Scale Ranges option is enabled.

E) The Same Y Scales option on the Scope menu is disabled.

For further illustration, here are the step and impulse responses of a 1Khz Chebyshev low pass filter with default settings. Note that here we have used a Time Range of 20*Fc (20msec = 20/1Khz) for better waveform clarity.:

Here is the step response of the low pass filter.

LP Plot1

Here is the impulse response of the low pass filter.

LP Plot2

 
Return to the main Newsletter page