• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Blogs
  2. System, PCB, & Package Design
  3. (P)SpiceItUp: Sweeping Multiple Parameters to Enhance P…
mrigashira
mrigashira

Community Member

Blog Activity
Options
  • Subscribe by email
  • More
  • Cancel
CDNS - RequestDemo

Try Cadence Software for your next design!

Free Trials
17.4
PSpiceA/D
(P)SpiceItUp
17.4-2019
OrCAD
PSpice Advanced Analysis
simulation

(P)SpiceItUp: Sweeping Multiple Parameters to Enhance Performance

21 Feb 2022 • 7 minute read

 Often, you want to see the effect of changing multiple parameters on the performance of your design. For example, you might want to know how the gain or bandwidth of a design is affected when you vary multiple components across a range of values. Sometimes, the variation of the component values can also be nested - varying a component for each changed value of another component. In simple words, you want to sweep a design to determine the relationship of parameter variations to performance. You can use Parametric Plotter to sweep any number of design and model parameters in any combinations and view results in Plot/Probe in a tabular or plot form.   

You need to determine the answers to the following three questions before you start with parametric plots: What performance you want to measure, which components you will vary and in what order, and how you will vary the value of the components? 

Most often the choice of components to be swept and the performance being measured are closely tied to each other. For example, on running transient analysis on a circuit, overshoots or spikes are seen and it is observed that the spikes can be reduced by increasing the values of a resistor and a capacitor in the circuit. However, increasing the value leads to power dissipation across the resistor. The measurements will then be overshoot and power dissipation against the resistor and the capacitor values.

Once you have identified the components, you can vary the values using any of the following four sweep types:

  1. Discrete Sweep: Specify the parameter values in the order they are to be used. For example, you can specify 10, 85, 63 as the three values to be assigned to a resistor. The first simulation will be run using 10 Ohms, followed by the second using 85 Ohms, and the third using 63 Ohms.

  2. Linear Sweep: Specify the start value, the end value, and a step value. The simulation will start with the start value, followed by values incremented by the specified step value till the final value is reached. For example, assume a start value of 10, an end value of 50, and a step value of 15. The simulation will run for the following values: 10, 25, and 40.

  3. Logarithmic Octave sweep: Specify the start value, the end value, and the number of points per octave. An octave is twice the start value. Assume that the start value is 10, the end value is 50, and the number of points per octave is 2. Two points will be picked between 10 and 20, including 20. But the end is 50, so another two points will be picked between 20 and 40, including 40. But because 50 is more than two octaves from the start value, an extra point will be picked. Each point will be calculated using the following formula to calculate a factorial:

    exp(ln(2)/N), where N is the number of points.

    The factorial in the example is 1.4142. Multiplying the start number with the factorial gives 14.142. Therefore, the two points in the first octave are 14.142 and 20. Calculating similarly, the simulation will be run for the following values: 10, 14.142, 20, 28.284, 40, and 56.569.
  1. Logarithmic Decade Sweep: Specify the start value, the end value, and the number of points per decade. A decade is ten times the start value. Assume that the start value is 10, the end value is 100, and the number of points per decade is 5. Five points will be picked between 10 and 100, including 100. Each point will be calculated using the following formula to calculate a factorial:

    exp(ln(10)/N), where N is the number of points.

    The factorial in the example is 1.8489. Multiplying the start number with the factorial gives 15.8489, the second point. Multiplying the second point by the factorial gives 25.1189.  Calculating similarly, the simulation will be run for the following values: 10, 15.8489, 25.1189, 39.8107, 63.0957, and 100.

    The total number of simulation runs will depend upon the number of components and what values are specified for each component. For example, if in a nested sweep, the first component is swept for 10 values and the second component is swept for 15 values, the total number of simulations will be 150.

You will use the RF Amplifier demo design (File – Open – Demo Designs) in OrCAD® Capture to follow along with the steps. If you are using another design, you might want to run a transient simulation or AC analysis and create the measurements of interest in PSpice A/D. You can also create measurements in PSpice Advanced Analysis.

Selecting Parameters and Specifying Sweep Types

To specify sweep types, do the following:

  1. In OrCAD Capture, choose PSpice – Advanced Analysis – Parametric Plot.
  2. In the Sweep Parameters table, click the text Click here to import a parameter from the design property map.


    The Select Sweep Parameters Component Filter dialog appears.


    First, you will select component R6 and specify a linear sweep setting with default values.
  1. Click in the Sweep Type column for R6 and choose Linear.
  2. Click in the Sweep Values column for R6.
    The Sweep Settings dialog appears.

    Notice that the default start value is 47 and the end value is 4700. The step value is 470 and the number of steps is 10.
  1. Click OK to retain the default settings.
  2. Similarly, specify linear sweep for R4 and retain the default values.
  3. Click OK to close the Select Sweep Parameters Component Filter dialog.

There will be a total of 100 simulations as each parameter will be swept for 10 values.

Specifying Measurements and Running Simulation

You will observe the effect of value change on the bandwidth and gain of the circuit. You can either import measurements created in PSpice A/D by clicking the text Click here to import a Measurement created within PSpice or right-click and choose Create New Measurement.

  1. Create or import the following two measurements: max(db(v(load))) and bandwidth(v(load),3).
  1. Click Start/Resume ( ) to run Parametric Plot.


    The number of sweeps is 100.


    The Results tab shows the outcome of the sweep.


    You can select and copy any part of the table or the entire table to the clipboard for use in other applications.
  1. Observe the nesting order of the table.
    For each value of R6, the different values of R4 and the equivalent measurements are given.

    You can double-click a column header to sort the data by that column in ascending or descending order.
    You can click the lock icon of a given column while sorting another column. This allows you to change the nesting order of the sweep without simulating.

Adding a Plot

You can also add a plot to show the relationship between parameters and measurements graphically.

To add a plot, do the following steps:

  1. Click Plot Information.
  2. Click the text Click here to add a plot to start the Plot Wizard.
  3. Select the ac.sim profile and click Next.
  4. Select R4 as the parameter to be plotted on the X-axis.
  5. Click Next.
  6. Select the bandwidth measurement expression for the Y-axis.
  7. Click Next.
  8. Select R6 as the parameter to be varied.
  9. Click Finish.

    The plot is listed under Plot Information.
  1. Right-click and choose Display Plot.


    The plot of bandwidth versus R4 and R6 is displayed.
  1. To see information specific to a trace, right-click the trace and choose Trace Information.

Conclusion

This concludes our series on Advanced Analysis. You can refer to the following earlier posts:

  • Smoke Analysis: Managing the Stress Levels of Design Components
  • Sensitivity Analysis: Creating Predictable Designs Using Sensitivity Analysis
  • Optimization:
    • Using Measurements: How to Use Measurements to Optimize Your Design
    • Using Curve-fitting: Using Curve-Fitting to Optimize a Design
  • Monte Carlo: Using Monte Carlo to Make Sense of Randomness and Calculate Yield

Contact Us

For any feedback, including any topic you want to be covered, write to us at pcbbloggers@cadence.com.

Do SUBSCRIBE to be updated about upcoming blogs. 

About (P)SPiceItUp

The (P)SpiceItUp series provides solutions to analog and mixed-signal simulation and analysis-related tasks performed using PSpice A/D or PSpice Advanced Analysis. Our vision, as reflected by the logo and the title of this series, is to make the critical simulation and analysis activities easy and enjoyable. Our regular new blog posts cover every aspect of analysis and simulation, including modeling and schematic design preparation.


CDNS - RequestDemo

Have a question? Need more information?

Contact Us

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information