Skip to content
Guilherme Brondani Torri edited this page Sep 30, 2014 · 1 revision

Table of Contents

How to sweep design variables

The example guides the reader through the process of setting up a parameter sweep. It is especially useful for analyzing the influence of component properties to circuit response.

Introduction

In the DC Simulation tutorial it was shown how to setup a schematic including a simple DC simulation. A very similar schematic is now used to introduce the concept of parametric analyses, the use of post-processing equations and how to use markers in x/y-plots.

In the following figure a circuit schematic is depicted consisting of a generator with an internal resistance of 75<math>\Omega</math> on the left hand side and a resistive load of 50<math>\Omega</math> on the right hand side.

The current probe "IProbe" has been taken from the "Components" tab in the "probes" category and the dashed line separating generator and load side and the describing texts are taken from the "paintings" category.

Simulating the schematic gives us 6V at the "out" node and 120mA through the "IProbe" current probe resulting in a power of 720mW on the load side as depicted in the result table below.

Adding post-processing equations

The user can add computation formulas on a schematic in order to let the simulator perform e.g. such power calculations. An equation block is inserted on the schematic area using the icon or using the "Insert" menu by activating the "Insert Equation" item. In order to compute the DC power in the load resistor the following equation is added.

Setting the load resistors resistance value to R=25<math>\Omega</math> and adding the "DCpower" result to the table we obtain the following diagram.

As expected we get a higher current and a lower voltage at the load side since we decreased the resistance. The power decreased also.

Sweeping a design variable

With these results at hand it seems that lowering the load resistance increases the current, but decreases the power we obtain from the generator. Thus, increasing the load resistance would decrease the current and increase the voltage. But does it also increase the DC power on the load side infinitely? With an infinite high load resistance there would be no current at all. This means there is no power consumed as well. Lets answer this question by a parametric analysis of the given circuit.

The parameter should be the load resistance value. Let's name it "Rload" and putting this variable name into the "R" property of the load resistor. Afterwards place the "Parameter sweep" from the "simulations" category on the schematic as shown in the below figure.

The parameter sweep box in the figure has been setup to

  • sweep the DC simulation "DC1"
  • linearily
  • the parameter "Rload" which is the same we put into the "R" property of the load resistor
  • from 5<math>\Omega</math>
  • to 505<math>\Omega</math>
  • in 101 steps

Also another equation block has been placed on the schematic. It obtains the maximum value of the computed DC power and then evaluates the value of load resistor value which causes the maximum power on the load side.

Evaluating the results

Once simulated let us now look at the voltage, current and power on the load side. All three quantities are now functions of the "Rload" variable. It makes sense to display these in a x/y-plot called "Cartesian". It can be found in the "diagrams" category where also the table can be found.

As expected in the upper left diagram is shown that voltage continuously increases and in the upper right diagram that current decreases with rising load resistance value. The DC power has a maximum at 75<math>\Omega</math> of 750mW.

This is not by accident but a concept called "power matching". The maximum power of a generator is delivered to a load resistance with the same value as the internal resistance of the generator.

Working with markers in diagrams

Markers in diagrams are a very convenient feature for looking at values in diagrams. A marker can be placed on a diagrams curve by the icon or using the "Set Marker on Graph" item in the "Insert" menu. In the below figure the marker has been set to the maximum value of the obtained "DCpower" curve.

Double-clicking the marker issues the marker dialog where the user can edit the number notation of the markers displayed values. By selecting the marker on the schematic and using the arrow keys on keyboard the markers position on the diagrams curve can be easily changed in order to view adjacent values within the curve.

End note

Parameter sweeps are a very powerful for design analysis, especially when hand-calculation formulas are not available or device properties unknown. Resulting waveforms help on visualize component property influences on circuit performance in a convenient way.

It can be added that parameter sweeps can be nested. Defining a second and more sweep variables and setting up parameter sweep boxes to sweep another parameter sweep gets you three and more dimensional simulation data results. Also parameter sweep parameters are not limited to reside in component parameter values, but also in equations.


Original author: Stefan Jahn (2009)
Clone this wiki locally