EMA Academy

Quick How-Tos

Home > EMA Academy > How-Tos > How to Perform Frequency Response Analysis

How to Perform Frequency Response Analysis

Devices such as switched-mode power supplies and RF amplifiers require a full analysis of open-loop gain across their entire operating spectrum to ensure proper behavior; however, calculating gain and phase shift at each individual frequency is tedious and time-consuming. With the Frequency Response Analysis included in OrCAD PSpice Designer, open-loop gain analysis becomes simple with automated analysis and Bode plot creation.

This how-to will provide step-by-step instructions for configuring, performing, and evaluating frequency response analysis in OrCAD PSpice Designer.

To follow along with this tutorial, download the provided files above the table of contents.

How-To Video

Creating a Schematic

Step 1: Open the provided design, FRAExample.obj, in OrCAD PSpice Designer.

Searching PSpice Components

Step 2: Select Place > PSpice Component > Search from the menu.

Configuring a Voltage Source

Using a Sine Source for PSpice Simulation

Step 3: Under the Categories tab, open PSpice > Source > Independent Sources > Voltage Source.

Step 4: Select VSIN from the part list. Double-click to attach the part to the cursor.

Placing a Voltage Source for Simulation in PSpice

Step 5: Place the AC source between nodes A and B. Use R on the keyboard to rotate as needed.

Step 6: Right-click and select End Mode or press Escape on the keyboard.

Defining Source Frequency

Step 7: In the AC Source, double-click the FREQ = parameter to change the frequency.

Using a Frequency Parameter in PSpice

Step 8: Enter {freq} for the value to set the frequency from a parameter. Click OK.

Step 9: Double-click the VAMPL= parameter to change the amplitude. Set the amplitude to 10m and click OK.

Step 10: Double-click the VOFF= parameter to change the offset. Set the offset to 0 and click OK.

Step 11: Double-click the AC= parameter. Set the value to 0 and click OK.

Adding Parameters to the Simulation

Using Parameters in PSpice

Step 12: In the PSpice Part Search tab, enter Parameters into the search bar and press Enter.

Step 13: Select the part with name PARAM. Double-click to attach to the cursor.

Placing Parameters in a PSpice Simulation

Step 14: Click to place the parameter table. Right-click and select End Mode (Escape).

Step 15: Double-click the parameter table. This will open the Property Editor tab.

Creating Parameters in PSpice

Step 16: Select New Property. This will open the Add New Property window.

Defining a Frequency Parameter in PSpice

Step 17: Add FREQ as the name and 100 as the value. Check Display [ON/OFF] and click OK.

Displaying Parameters in PSpice

Step 18: The Display Properties window will open. Select Name and Value under Display Format and click OK.

Step 19: Select Apply and close the Property Editor tab.

Placing Text in a PSpice Simulation

Step 20: Select Place > Text from the menu.

Step 21: Enter the following text into the window:


.TRAN 0 {5/Freq+.1m} 0.1m



.options MINSIMPTS = 1000

Note: Use CTRL-Enter to start a new line. If you accidentally press Enter, press CTRL-E on the keyboard to return to the text editor. This text is also included with the design file under OpenLoop.txt.

The .TRAN command performs a transient analysis on the circuit and uses the following syntax: .TRAN start time {end time} maximum step size. For this example, the analysis starts at time t=0 and ends at 5/Freq seconds + .1 millisecond with a maximum step size of 0.1 millisecond.

The .STEP command performs a sweep on the circuit with the following syntax: .STEP sweep variable starting variable ending variable. For this example, OCT indicates that the sweep variable, parameter FREQ, is swept by logarithmic octave beginning at 0.1Hz and finishing at 1MHz.

The .PROBE64 command allows the FREQ parameter to be stored in the 64-bit Probe output results to calculate the Frequency Response Analysis later.

.options MINSIMPTS specifies the minimum number of time points used for each transient simulation. For this example, 1000 time points have been specified.

Step 22: Click OK to attach the text to the cursor.

Placing Text in a PSpice Schematic

Step 23: Place the text in a blank area in the schematic. Right-click and select End Mode (Escape).

Preparing the Design for Simulation

Creating a New Simulation in PSpice

Step 24: Select PSpice > New Simulation Profile from the menu.

Step 25: Name the simulation BIAS and click Create.

Configuring a New Simulation in PSpice

Step 26: Set the Analysis Type to Bias Point.

Adding Configuration Files to a Simulation in PSpice

Step 27: From the menu, select Configuration Files. Select Library under Category.

Step 28: Select Browse.

Step 29: Navigate to the location of the downloaded files. Select opamp.lib and click Open.

Step 30: Select Add to Design. Click OK.

Adding Voltage Probes in PSpice

Step 31: Select the Voltage/Level Marker button from the toolbar.

Placing Voltage Probes in PSpice

Step 32: Place one probe at net A and another probe at net B. Right-click and select End Mode (Escape).

Performing Frequency Response Analysis

Running a Simulation in PSpice

Step 33: Select PSpice > Run from the menu or the Run button from the toolbar.

Step 34: In the Available Sections window, select All and click OK.

Note: The simulation end points are different for each trace. This is accomplished with the text on the schematic canvas and done to save simulation time.

Activating Frequency Response Analysis in PSpice

Step 35: In the simulation window, select Tools > FRA from the menu.

Step 36: In the Frequency Response Analysis window, select V(A) under Select Trace 1 and V(B) under Select Trace 2. Click OK.

Note: Frequency response analysis injects transient signals into the desired circuit then extracts frequency data using Fourier analysis to plot gain/phase response.

Adding a Trace to a Plot in PSpice

Step 37: Select Trace > Add Trace from the menu.

Defining a Trace Expression in PSpice

Step 38: From the Functions or Macros dropdown, select Plot Window Templates. Select Bode Plot – separate(1).

Step 39: Select Gain from the Simulation Output Variables list. Click OK.

Step 40: To view the magnitude, select Plot > Add Plot to Window from the menu.

Step 41: Select Trace > Add Trace from the menu.

Step 42: Under Functions or Macros, select Analog Operators and Functions.

Step 43: Select DB().

Step 44: From the Simulation Output Variables, select Gain. Click OK.

Analyzing Frequency Response Results in PSpice

Step 45: View the results.

Wrap Up & Next Steps

Manually calculating gain and phase shift at every point in the frequency spectrum to create a Bode plot is monotonous and labor-intensive. With Frequency Response Analysis in OrCAD PSpice Designer, calculations along the entire frequency spectrum are automatically collected saving time and guaranteeing accurate results. Learn more about how PSpice can verify circuit functionality and get your free trial today.

Follow Along, Download the Pre-Packaged Design Files

Table of Contents

How To was created with:
EMA Design Automation