2.4.3 Defining Arbitrary Curves

To download the examples for Module 2, click Module_2_Examples.zip

In this topic:

What You Will Learn

Getting Started

Exercise #1: The Define Curve Dialog

  1. Open the schematic 2.4_SelfOscillatingConverter_POP_Tran.sxsch.
  2. Run the simulation.
  3. From the menu bar, select Graphs and Data Add Curve...
    Result: The Define Curve Dialog opens:

Discussion

There are times when you may want to generate curves which are an expression of multiple curves or an expression containing functions and curves. This is what the Define Curve dialog is designed for.

Define Curve Dialog

Using the Define Curve Dialog, you can enter expressions defining the Y and X axis of the curve. By default the dialog assumes that the X axis is time (or frequency) and that the user must enter the expression for the Y axis. You can enable the X-Y plot by selecting the X-Y Plot check box. The expressions can contain vector names and a set of built-in functions. The results of the X and Y expressions are expected to be vectors and are plotted on the graph and axis you specify in the dialog.

Exercise #2: Using The Define Curve Dialog to Plot the Power in a Device

In this exercise you will plot the power in the main MOSFET Q1. For purposes of demonstration, the simplified expression for the power dissipated by the MOSFET Q1 is:

To plot this power curve, you need to define the above equation as a expression using the actual simulation vectors. To plot the power curve,

  1. If you have closed the Define Curve dialog, reopen it using the menu bar Graphs and Data Add Curve....
    Note: The Define Curve dialog is interactive, that is, you can click on the waveform viewer or the schematic to automatically populate the dialog X and Y fields with vectors. This is different than other dialogs which steal focus and therefore prevent you from interacting with the other SIMetrix/SIMPLIS windows while the dialog is open.
  2. Click in the Y field at to top of the dialog and press ( to start the expression.
  3. On the schematic, left-click on the drain connection of the MOSFET Q1:
    Result: The dialog is populated with the drain voltage node, :35.
  4. Next, type a minus character, - so that the Y expression is (:35-.
  5. On the schematic, left-click on the source connection of the MOSFET Q1:
    Result: The dialog is populated with the source voltage node, :31.
  6. Type )*, making the Y expression (:35-:31)*
  7. Press and hold the shift key while left-clicking on the positive side of the IQ1 Drain current probe:
    Result: The dialog is populated with the probe current, IPROBE3#P, the final Y expression is (:35-:31)*IPROBE3#P. The dialog should now appear as shown below:
  8. To put the curve on a new grid above the existing grid before you accept the dialog and plot the curve, select the Axis/Graph Options tab and then select the Use new grid radio button as shown below:
  9. Click Ok.
    Result: The power in Q1 is plotted on a new grid above the existing drain voltage and drain current curves. Because you didn't specify a curve name, the program labeled the curve with the expression which created it.

The above procedure used the bare minimum of steps. At any point in the process, you can hand type into the expression box. The Define Curve Dialog allows you to specify much more than just the curve expression, as you will see with the next example.

Exercise #3: Expression History and Curve Annotation

One useful feature of the Define Curve Dialog is that the system remembers the previously plotted expressions. In this example, you will delete the curve you just created and add it with a more useful name than the actual vector expression, which is (:31-:35)*IPROBE3#P.

  1. Select the curve you just created with the curve label (:31-:35)*IPROBE3#P.
  2. Press the Delete key.
    Result: The curve and axis are deleted.
  3. From the menu bar, select Graphs and Data Add Curve...
    Result: The Define Curve Dialog opens.
  4. Select the Y expression combo box pull down as shown below:

    Notice that the curve expression you defined in the first example is remembered and is available to be plotted.

  5. Select the previously used curve expression.
  6. In the Curve label field, type an appropriate curve label, such as Power in Q1. The resulting dialog is shown below:
  7. , To put the curve on a new grid above the existing grid as you did with the first example, select the Axis/Graph Options tab and select the Use new grid radio button as shown below:
  8. Click Ok.
    Result: The Power in Q1 curve is added to a new grid on the waveform viewer. While the vector information is identical to the previous curve, the curve label is much shorter its intuitive that the curve represents the power dissipated in Q1.

In the first two exercises, you plotted the power in Q1 taking into account only the power from the drain current and drain-to-source voltage product. SIMetrix/SIMPLIS has a very powerful probe feature which automatically plots the power in a device, taking into account all pin currents and voltages. In the next exercise, you will compare the power dissipation generated using this method vs. the Define Curve method.

Exercise #4: Compare with the Power In Device function

The schematic menu Probe Power In Device... automatically generates the power in a single device. This includes any device implemented as a subcircuit, such as a hierarchical schematic component. To probe the power in the MOSFET Q1,

  1. With the graph open from the last example, select Probe Power In Device... from the schematic menu.
  2. Move the mouse over to the MOSFET Q1:
  3. Left-click the mouse.
    Result: A curve with label Power(Q1) is added to the waveform viewer. This curve is added to the selected grid, which is the upper grid on the waveform viewer.

Exercise #5: Difference of Two Graph Curves

At this point the waveform viewer has the two original curves, and the two curves you added, one created with the Define Curve Dialog, and one created with the Power In Device random probe. Because of the large magnitudes of these curves, comparing the difference between them is quite difficult. In this example, you will plot the difference of the two power curves.

  1. Zoom in on the power curves using the box select:
    1. Press and hold the left mouse button while dragging the mouse to create a box selection.
    2. Repeat until the two curves separate on the waveform viewer:
      Result: Your curves will appear differently than the image below depending on which portion of the curve you zoomed in on.
  2. Once you can distinctly see the two curves, you can add the difference curve. From the menu bar, select Graphs and Data Add Curve...
  3. In the waveform viewer, left-click on the beige curve with the label Power(Q1)
    Result: The Y expression is updated with cv(n), where n is an integer. The integer value is not important.
  4. Type a minus character (-) so that the expression is now cv(n)-.
  5. In the waveform viewer, left click on the blue curve with the label Power in Q1
    Result: The Y expression is updated with cv(m), where m is an integer. The dialog should be configured as below:
  6. Add a descriptive curve label, such as Delta Power
  7. As with the first two exercises, you should put the curve on a new grid above the existing grid. Select the Axis/Graph Options tab and select the Use new grid radio button as shown below:
  8. Click Ok.
    Result: A new curve is added to a new grid above the existing grids. This curve represents the difference in power dissipation between the two methods, and is calculated from the two existing power curves, which were themselves calculated from the raw voltage and current vectors.

You can now zoom on the waveform viewer and easily see that the power difference is the power coming into and out of the gate terminal.

Conclusions and Key Points to Remember