• Home
  • :
  • Community
  • :
  • Blogs
  • :
  • PCB Design
  • :
  • (P)SpiceITUp: Using Curve-Fitting to Optimize a Design

PCB Design Blogs

  • Subscriptions

    Never miss a story from PCB Design. Subscribe for in-depth analysis and articles.

    Subscribe by email
  • More
  • Cancel
  • All Blog Categories
  • Breakfast Bytes
  • Cadence Academic Network
  • Cadence Support
  • Computational Fluid Dynamics
  • CFD(数値流体力学)
  • 中文技术专区
  • Custom IC Design
  • カスタムIC/ミックスシグナル
  • 定制IC芯片设计
  • Digital Implementation
  • Functional Verification
  • IC Packaging and SiP Design
  • In-Design Analysis
    • In-Design Analysis
    • Electromagnetic Analysis
    • Thermal Analysis
    • Signal and Power Integrity Analysis
    • RF/Microwave Design and Analysis
  • Life at Cadence
  • Mixed-Signal Design
  • PCB Design
  • PCB設計/ICパッケージ設計
  • PCB、IC封装:设计与仿真分析
  • PCB解析/ICパッケージ解析
  • RF Design
  • RF /マイクロ波設計
  • Signal and Power Integrity (PCB/IC Packaging)
  • Silicon Signoff
  • Solutions
  • Spotlight Taiwan
  • System Design and Verification
  • Tensilica and Design IP
  • The India Circuit
  • Whiteboard Wednesdays
  • Archive
    • Cadence on the Beat
    • Industry Insights
    • Logic Design
    • Low Power
    • The Design Chronicles
mrigashira
mrigashira
7 Dec 2021

(P)SpiceITUp: Using Curve-Fitting to Optimize a Design

(P)SpiceITUP LogoOptimization is all about meeting requirements. In the last post, you read about how you can use measurements to optimize a circuit. This post will discuss the use of curve fitting to optimize a circuit. In this method, the goal or constraint is not a measurement, but a curve or a table of points. If you are interested in the performance of a circuit that can be best described by a waveform instead of a value, say a practical filter circuit response, curve-fitting is the choice. You can use an external specification composed of measurement data defined in an external data file when using curve fitting as an optimization goal.

You will run Optimizer on the following bandpass schematic. You can open the design from tools\pspice\tutorial\capture\pspiceaa\bandpass of your installation.

You will optimize the values of the component parameters in the circuit, such that the output waveform matches the waveform described in a reference file. For this design example, you will use a reference file to specify the waveform for the voltage gain (dB) of the output voltage (DB(V(Vout)) and the phase gain of the output voltage (P(V(Vout)). A reference file contains measured points and the corresponding measurement values. In this example, you will use a reference file named reference.txt.

Preparing to Run Optimizer

To be able to run Optimizer, do the following:

  1. Simulate the design using PSpice® A/D.

  2. Generate a reference file describing desired circuit goal in form of an X Y table.

To run the simulation, do the following:

  1. In OrCAD® Capture, create a simulation profile with the following settings:



  2. Run PSpice.

  3. In PSpice, add traces for P(V(Vout)) and DB(V(Vout)).



    Generate a reference file, either manually or using the Export feature of PSpice. A reference file is a text file that contains the reference waveform with respect to a sweep in the tabular form with the data values separated by white spaces, blanks, tabs, or comma. A reference file must have a minimum of two columns, one for the sweep data and one for the reference waveform. You can add more than one waveform.

To generate a reference file from PSpice, do the following:

  1. Choose File – Export – Text.



  2. Specify a file name and add required traces in the Export Text Data dialog.



    You can also create the file manually by writing the x,y points of the reference waveform in a text file and then saving the text file with any one of .mdp, .csv, or .txt extensions.

    For this example, use the reference file named reference.txt available at the following location: tools\pspice\tutorial\capture\pspiceaa\bandpass \bandpass-PSpiceFiles\SCHEMATIC1

Running Optimizer

Before running Optimizer, you must specify the component parameters and set up the curve-fit specification. Perform the following steps to do so:

  1. Start Optimizer by choosing PSpice – Advanced Analysis – Optimizer in Capture.

  2. Select an engine. In this example, select Modified LSQ.

  3. Make the Curve Fit tab active.



    Now import and set up the component parameters.

  4. Click the text Click here to import a parameter … in the Parameters section.

  5. For this example, select C1, C2, C3, C4, R1, R2, R3, and R4.



  6. Set R3 off to exclude this component value from the list of parameters that Optimizer can tweak to achieve the desired goal.



    Now that you have specified the component parameters, set up the curve-fit specification.

  7. In the Curve Fit tab, click the Click here to enter a curve-fit specification row.

  8. In the New Trace Expression dialog, specify the measurement as P(V(out)).



    See (P)SpiceItUp: Creating Predictable Designs Using Sensitivity Analysis for the steps to create expressions.

    The expression is now listed.

  9. Specify the reference file under Reference File.



  10. Select PHASE under Ref. Waveform.



    Observe that Tolerance% is 5 and Weight is 1. You can edit these values if needed.

  11. Similarly, add the DB(V(out) specification as shown.



    The Tolerance% is 3 and the Weight is 1.

  12. Run Optimizer.



    Observe the Error Graph and the Current value.

You can edit the schematic to update the values suggested by the simulation.

You can view an Optimizer run because by default all runs are saved. To view a run, say run 3, for the phase of the output voltage in PSpice do the following:

  1. Select Run 3 in Error Graph.



  2. Right-click the specification P(V(out)) and choose View (Run #3) in PSpice.



    The trace for the selected run opens in PSpice A/D.



    You can also turn on dynamic viewing so that the PSpice UI comes up displaying the changes in the output waveform for each Optimizer run.

Conclusion

You can quickly define external specifications using waveforms and reference tables and then determine the right component parameters to achieve the specification using Optimizer in PSpice Advanced Analysis. This is especially useful for any wave-shaping circuits that you might be designing.

The previous post discussed the standard, measurement-based way of specifying goals and constraints. This post takes the exploring of Optimizer one step ahead by discussing Curve Fitting, which is the curve-based method that uses points on a waveform to specify requirements. In the next post, you will be exploring another useful Advanced Analysis feature, Monte Carlo Analysis that predicts the behavior of a circuit statistically and calculates yield.

Do SUBSCRIBE to be updated about upcoming blogs. If you have any topic you want us to cover or any feedback for us, you can write to us at pcbbloggers@cadence.com.

Tags:
  • 17.4 |
  • OrCAD Capture |
  • PSpiceA/D |
  • (P)SpiceItUp |
  • 17.4-2019 |
  • PCB design |
  • PSpice Advanced Analysis |