|
|
|
 | |  | |
 | |  | |
THE SWEEPER
This is only available in SUMO-EXPERT .
A system whereby values of components can be linearly swept through a defined range.

Both sweeping and Monte-Carlo use the same simulation-setup menu. For each pass of either type, a circuit netlist is output that contains the component values for that pass, and the simulation details. The sweep will sweep the whole simulation, so if AC and TR are both specified, both will be swept.
Sweeping a component value
The target of a sweep has to be the value of a component. This value may be used elsewhere in the circuit as a variable in an expression. Set the component that requires sweeping first (The swept component must have a regular value, it cannot be an expression), and then select the start and stop value.
The number of slices is one less than the number of simulations. This is to make the maths easy.
Example of values in a sweep:
R1 = 10K, R2 = 10k-R1, R1 is swept from 1k to 5k in 4 slices
| Sweep | R1 | R2
|
| 0 | 1k | 9k
|
| 1 | 2k | 8k
|
| 2 | 3k | 7k
|
| 3 | 4k | 6k
|
| 4 | 5k | 5k
|
Simulation and viewing
Simulation is a two stage process. First as many netlists as there are passes are written out, under the filename SWP_<pass>.CIR. Then a .SWP file is constructed, containing a record of all the relevant component values..
Once the simulations are running, do not interrupt them as the consequences may not be predictable. If a simulation error occurs (usually as a result of a transient simulation not converging or values exceeding legal bounds) the simulation should stop and the output file is displayed, which should allow the fault to be identified.
After every simulation, the results of that pass are concatenated onto the results file. Sweeps and Monte-Carlo runs are all run in batch mode . This is for speed and simplicity. The data is then read into the viewer after all passes are complete.
After simulation, the viewer recognises the traces as repeats and displays them correctly. Each trace has the number of the simulation run associated with it. For instance, a trace called out now becomes out:0, out:1 ... out:n in the Create menu and for cursor values.
Clicking-on SWP in the viewer menu puts up a list of all component values for all sweeps.

By using the cursors and the list, the circumstances that produced that particular trace can be identified.
Example using the TONES circuit
Firstly, simulate this circuit normally. Having now got some output from the simulation, we can now sweep the angle of the potentiometers. In the graphing screen, click on EXIT to return to the schematic.
To examine the sweep parameters, open the SIMULATION menu as before, and click on SETUP. The sweep variable must be a component. In this case, the special component PARAMETER, has been used. A PARAMETER has a name and a value, but does not form any part of the circuit. It is used merely for convenience.

PARAMETERs are square purple boxes with a P inside them. Here the component/parameter is called angle, which is an arbitrary name chosen to reflect the angle of the potentiometer.
If you select one of the potentiometers and press PARAM (or double-click on the potentiometer on the circuit, which has the same effect), you will see the parameter for setting its value is assigned not to a number, but to angle, so on netlisting the value of the component/parameter called angle will be used.
Exit from the SWEEP/M.CARLO SETUP menu, and select SWEEP. The logo on the SWEEP button varies, if it says M/CARLO, go into the sweep setup menu again, and ensure that the SWEEP option is selected. Now press SIMULATE, and the sweep will begin. Sweeps perform the full range of selected simulations many times, in this case just the AC or frequency plot is being done.
The results appear as a series of traces which show the effect of adjusting the angle of both treble and bass potentiometers simultaneously.

Measurement
Below the graphs, you will see that CURSORS is selected.
- Click on a graph, and the cursor measuring system will appear.
-
At the bottom of the swept graph there is a number, referring to the number of the sweep. By pressing SWP in the bottom menu, a table appears relating this sweep or pass number to the actual value of the swept value.
| |  | |  |
| |  | |  |
|
|