PCs Let You Gamble on Component Tolerances
You can run computationally intensive tasks such as Monte Carlo analyses on PCs, but they can use a boost from higher performance servers.
Rick Nelson, Senior Technical Editor -- Test & Measurement World, 10/15/1999
In our June issue, I reported my experiences simulating and building a circuit.1 A combination of PC simulations and breadboarding efforts yielded a working design. A root-summed-square (RSS) analysis helped me estimate worst-case performance based on specified component tolerances. In this article, I investigate the probability of measuring certain performance levels in a production-test environment.
Today, even modestly powered PCs can run simulation software that lets you investigate the effect of parameter variations on circuit performance. I applied the Monte Carlo analysis capabilities of Intusoft’s ICAP/4 Spice simulator to the input stages (Fig. 1) of the circuit I presented in June. The relevant output parameters and nominal values are as follows:
- output voltage-gain magnitude |VOUT|, 4.79 dB,
- center frequency fC, 288 Hz, and
- half-power bandwidth f–3-dB, 457 Hz.
![]() |
| Figure 1. Monte Carlo analysis can indicate the effect of component tolerances on this circuit’s output. A differential amplifier comprising X1 and R1 through R4 rejects common-mode noise (Vcm), delivering a clean version of the input voltage (Vin) to a bandpass filter centered around X2. |
Monte Carlo analysis subjects a design to repeated simulations, randomly varying component values for successive simulations and logging them for subsequent analysis. You might ask, “What’s the point? Why not simply substitute high and low worst-case component variations into the circuit and calculate the worst-case output range?” Indeed, such substitution should be easy and quick for a computer to perform, and most simulators include RSS and other worst-case analysis tools to do so.
But there are two key reasons to employ Monte Carlo analysis:
1. If you rely on worst-case analysis, you’ll end up specifying high-cost close-tolerance parts, even though worst-case combinations of component values may seldom occur in the production of high-parts-count circuits. Probability analysis could show that it’s cheaper to use parts with less stringent tolerances, throwing away or reworking the few production units that fail functional test.
2. You might have trouble determining the effect that varying a component’s value will have on circuit performance. In Figure 1, it’s easy to see that lowering R1 and R2 values will increase the differential amplifier’s gain. But quick: How do changes in R5 affect the bandpass filter’s center frequency and bandwidth?2 A Monte Carlo analysis won’t be fooled by incorrect assumptions about the relationships between component values and circuit output.
Estimating Worst Case
Although convinced of the value of Monte Carlo analysis, I wasn’t ready to plunge right in without some idea of the results I could expect. For the Figure 1 circuit, I chose high-tolerance parts (10% resistors and 20% capacitors) so the graphical results would be readily apparent in figures on a magazine page. I manually varied components C1, C2, R5, and R7 (the four that have most effect on the filter’s gain, center frequency, and bandwidth) between their low and high extremes. Examination of the results of the 16 cases (C1, C2, R5, and R7 all low; C1, C2, and R5 low, and R7 high; and so on through C1, C2, R5, and R7 all high) yielded these filter-output ranges:
- 2.18 dB m |VOUT| m 7.17 dB,
- 219 Hz m fC m 398 Hz, and
- 346 Hz m f–3-dB m 634 Hz.
As a check on these values, I ran ICAP/4’s RSS and WCS (worst-case simulation) tools to determine |VOUT| and got similar, though not exact, results; for instance, WCS reported |VOUT| max as 6.92 dB. Note that I am assuming—but haven’t proven—that some combination of intermediate values won’t provide worse performance. The built-in tools, too, make assumptions; for example, that a circuit’s output varies linearly with variations in a component’s value.
My assumption and the WCS tool’s assumptions were good ones for my bandpass filter. But consider a circuit that sums two sine waves. The results depend on the phase relationships between the two input signals. If a capacitor that is 20% high shifts one input wave 2p radians, the output would appear correct, whereas a capacitor closer to spec could introduce a fractional-cycle phase shift and poorer circuit performance.
Checking Monte Carlo Data

Figure 2. Monte Carlo analysis runs a user-specified number of simulations, varying component values randomly for each simulation. Users can specify component lot numbers and tolerances in the simulator’s Part Properties dialog box. The Simulation Control box enables selection of Monte Carlo simulation, the part lot to use, and the number of simulations to run. The Remote Spice function (whose check box is hidden behind the Advanced Settings dialog) prepares the simulations to run on remote servers.
You can get a visual representation of your data using Intusoft’s IntuScope waveform-display tool. You can also apply statistical-analysis techniques to the Monte Carlo output data to determine the mean and standard deviation you can expect in the value of the output parameter you are investigating.
I reported in June that RSS is a computationally intensive algorithm that taxes garden-variety PCs. So, too, is Monte Carlo analysis, particularly in interactive mode. (Perhaps I should say the analysis taxes the user; the computer seems content to crunch away, but the long execution times can make developing a Monte Carlo data-reduction program interactively a frustrating experience.)
Intusoft lets you access its servers (which populate what it calls the Spice Farm) to run computationally intensive simulations in batch mode. Rather than opt for that approach, I chose to experiment interactively with my simplified circuit.
To use the ICAP/4 Monte Carlo algorithm to analyze the effects of component tolerances on the ac response of the bandpass filter of Figure 1, I first specified my component tolerances within the simulator (Fig. 2, rear dialog box). I was plagued by my ICAP/4 version’s inability to run using default tolerance values in the Lot and Case dialog-box inputs, and I had to type the values in by hand for each component. My circuit files simulated normally, with default values, at Intusoft, and why my version functions abnormally on my PC remains a mystery.
After tolerance specification, a simulation-control dialog (also shown in Fig. 2) allows you to choose Monte Carlo analysis by clicking a radio button. A check box in that dialog also lets you farm out the simulation to Intusoft, if you’ve established an account, or to your own server farm. An additional dialog, labeled Advanced Settings, lets you enter the number of cases—the number of simulations you want to run.

Figure 3. This IntuScope waveform display tracks 250 Monte Carlo simulations. The upper (green) and lower (red) traces represent worst-case values calculated by hand. A built-in waveform calculator lets you locate waveform maximums and calculate parameters such as bandwidth. Here, the cursors (vertical green lines) are positioned at the points 3-dB below the top curve’s 7.17-V maximum; the accumulator (upper right) displays the x-axis difference—the –3-dB bandwidth—in Hz.
The analysis routine dumps ASCII values of parameters you specify into a file that you can manipulate with any numerical-analysis program or spreadsheet. Within ICAP/4 you can program the IntuScope feature to acquire and display waveforms and make measurements as the simulation takes place. Figure 3 represents 250 cases of Monte Carlo simulation of the Figure 1 circuit. Note that none of the simulation results approach my calculated worst-case limits, denoted approximately by the upper (green) and lower (red) traces.
Interactive Calculations
IntuScope includes a waveform calculator that lets you interactively calculate parameters like –3-dB bandwidth; a few keystrokes let you locate a waveform’s y-axis maximum (voltage gain in decibels), storing the value in an accumulator displayed within the scope’s window. An RPN calculator lets you quickly subtract 3 to determine the –3-dB level. Arrow and function keys then move the cursors to the corresponding points on each side of the maximum. A final function key calculates the x-axis (frequency) difference between them, putting the value in the accumulator.
I used the calculator and cursor-manipulation functions in IntuScope’s “Record a Program” mode to measure maximum output magnitude, center frequency, and bandwidth, ending each measurement with an output command that writes the result to an output text file. During Monte Carlo simulation, IntuScope repeats the calculations for each simulation, sending results to the text output file, called Monte.out, for later analysis.
Figure 3 is attractive but doesn’t provide a lot of useful information, other than that the simulated results lie well within my calculated worst-case limits. ICAP/4 includes tools that provide a more meaningful picture of the data. Figure 4, for example, provides a histogram showing the distribution of filter bandwidth data stored in the Monte.out file. It indicates that if my filter’s bandwidth specification is 450 Hz 650 Hz, I can expect 21 filters to fail—15 because their bandwidths are too low and six because their bandwidths are too high—for every 250 I produce.

Figure 4. A histogram display of Monte Carlo data groups results in 0.5s cells. For a bandwidth specification of 450 Hz 650 Hz, parts represented by data lying outside the region defined by the vertical cursor lines would fail.
Whether or not that’s a tolerable reject/rework rate is a matter for design, test, and production engineers to evaluate as a team. My experiences indicate that PCs have the power to make relevant data available to that team. But my experiences also suggest that, along with a PC, you’ll benefit from your simulator provider’s technical-support staff, and for repetitive simulations of large circuits, external high-powered servers. T&MW
FOOTNOTES
1. Nelson, Rick, “Simulator Test Tools Speed Circuit Design, ” Test & Measurement World, June 1999, p. 34.
2. Increasing R5 reduces center frequency but leaves bandwidth unchanged.
FOR FURTHER READING
1. Meiser, Verena (ed.), Introduction to Monte Carlo Methods, The Computational Science Education Project, 1995, www.csep1.phy.ornl.gov/mc/mc.html.



















