SBOA605 October   2025 OPA323

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2A Reusable Schematic
  6. 3Create a Project
    1. 3.1 Project Hierarchy
  7. 4Schematic Drawing for Increased Readability
    1. 4.1 Placing Passive Components
    2. 4.2 Parameters
    3. 4.3 Place Power Supplies
    4. 4.4 Wiring
    5. 4.5 Organizing for the User Experience
  8. 5Simulation Profile Setup
    1. 5.1 Aiding in Convergence
      1. 5.1.1 Modeling Application
    2. 5.2 Powerful Post-Processing
  9. 6Summary
  10. 7References

Powerful Post-Processing

Once the simulation profile has been created, by default the simulation profile is at the top of the hierarchy and shown as active. The active simulation profile is evaluated through PSpice > Run or keyboard shortcut F11.

 Run PSpice Simulation Icon Figure 5-7 Run PSpice® Simulation Icon

The first time the simulation is run a longer wait time is expected than the subsequent runs as PSpice®-for-TI is updating the latest libraries from ti.com. A new window opens up and displays an empty plot as seen in Figure 5-8.

 First Output is an Empty
                    Plot Figure 5-8 First Output is an Empty Plot

Multiple plots can be added by right-clicking on the plot and selecting Add Plot as seen in Figure 5-9.

 Add a Plot Figure 5-9 Add a Plot

In this example, the frequency sweep was performed to observe the open loop response of the circuit, seen in Magnitude (dB) and Phase (˚); therefore, two plots are added in the output window of the simulator.

Typically for the AC response of op amps, the top plot is Magnitude (dB) and the bottom plot is Phase (˚). To add the Magnitude (dB) and Phase (˚) of the relevant nets, a trace must be placed. This can be done by right-clicking on the desired plot and selecting Add Trace as seen in Figure 5-10.

 Add Trace Figure 5-10 Add Trace

A dialog window appears in which Simulation Output Variables can be selected along with “Functions or Macros.”

In this example, the required Magnitude (dB) and Phase (˚) traces are listed in Table 5-1.

Table 5-1 Trace Syntax
Trace Expression Syntax
Open loop response with load Voltage at op amp output with load (in dB) DB(V(AOL_LOADED))
Loop Gain Voltage across nets labeled "LOOP" and "GAIN" (in dB and degrees) DB(V(LOOP,GAIN))
P(V(LOOP,GAIN))
1/β Ratio of open loop response with load and loop gain DB(V(AOL_LOADED)/V(LOOP,GAIN))

The Trace Expression can be typed in or selected from the available options as seen in Figure 5-10. Alternatively, the traces can be copied and pasted fromTable 5-1 into the program directly if the nets have been labeled as described earlier in the document, Figure 4-17.

The output simulation window including all trace expressions are shown in Figure 5-11, the top plot is the Magnitude (dB) response and the bottom plot is Phase (˚).

 Output Simulation
                    Window Figure 5-11 Output Simulation Window

In this example, the goal is to improve the phase margin. This is done by evaluating the phase margin of the open loop response and calculating compensation component from the AC response of the circuit.

PSpice®-for-TI has built in formulas, the syntax can be found in the Measurements option in the Trace sub menu, as seen in Figure 5-12.In this example, three measurements are used, PhaseMargin, XatNthY, and Max.

 Syntax Definition for
                    Measurements Figure 5-12 Syntax Definition for Measurements

Select the relevant option in the Measurements window, in this example PhaseMargin is highlighted and View is selected.

 PhaseMargin
                    Measurement Figure 5-13 PhaseMargin Measurement

The selected measurement, the description, syntax for the measurement argument, and file path are displayed in the dialogue box.

 PhaseMargin Measurement
                    Defined Figure 5-14 PhaseMargin Measurement Defined

The phase margin measurement is the phase at the frequency in which the magnitude is 0dB. In PSpice®-for-TI, this is accomplished by searching a magnitude of the trace in dB, until the value level is 0, the x value (frequency) is recorded. Then the y value of the phase plot is read at that frequency.

In the defined measurement in Figure 5-14, the phase margin provided by y2 is offset by +180 degrees, this is not relevant for op amps so the measurement evaluated is offset by -180 degrees resulting in the written equation of PhaseMargin(DB(Trace), P(Trace)) -180.

Next, to find the frequency where the output of the magnitude of the op amp is 0dB and 20dB, the XatNthY measurement is used. XatNthY measurement is defined, in Figure 5-15, as the x corresponding to the given y value at an occurrence - where x is the frequency (Hz) and y is the magnitude (dB). For both of these scenarios, there are not multiple occurrences, therefore just the first occurrence is considered.

 XatNthY Measurement
                    Defined Figure 5-15 XatNthY Measurement Defined

To calculate RISO compensation, the value of the capacitive load must be transferred from the schematic to the output simulation window, the implementation of this was described Figure 4-13. To include this probe at CLOAD, P(CLOAD), into an equation to be evaluated, a measurement must be applied to the probe at the parameter CLOAD. Considering the capacitive value does not change with frequency, the max measurement, defined in Figure 5-16, is used.

 Max Measurement
                    Defined Figure 5-16 Max Measurement Defined

Table 5-2 shows a summary of the equation syntax needed for “Phase Margin,” typical "RISO,” and a conservative “RISO” value. The typical "RISO" provides a phase margin close to 45° and the conservative "RISO" provides a phase margin close to 90°. The tradeoff for a larger isolation resistor is voltage inaccuracies at the output with higher current demand (smaller resistive loads).

Equation 1. R I S O   ( t y p i c a l ) = 1 2 π × f A O L _ L O A D E D   =   0 d B × C L O A D
Equation 2. R I S O   ( c o n s e r v a t i v e ) = 1 2 π × f A O L _ L O A D E D   =   20 d B × C L O A D
Table 5-2 Measurement equations and syntax
Measurement Expression Syntax
Phase Margin PhaseMargin(DB(V(LOOP,GAIN)),P(V(LOOP,GAIN)))-180
RISO (typical) 1/(2*pi* Max(P(CLOAD))* XatNthY(DB(V(AOL_LOADED)),0,1))
RISO (conservative) 1/(2*pi* Max(P(CLOAD))* XatNthY(DB(V(AOL_LOADED)),20,1))

To add these measurements to the output simulation window, select Evaluate Measurement through the Trace sub menu.

 Evaluate Measurement Figure 5-17 Evaluate Measurement

The Trace Expression can be typed in, selected from the available options, or copied and pasted from Table 5-2.

 Trace Expression for
                    Measurement Evaluation Figure 5-18 Trace Expression for Measurement Evaluation

The Measurement Results window displays the measurements described in Figure 5-19. The output window, which includes the plots and measurements, is displayed every time an iteration is run.

 Equations in PSpice-for-TI syntax Figure 5-19 Equations in PSpice®-for-TI syntax