Component tolerances contribute to variations in electrical behavior in linear and nonlinear circuits.
When dealing with a large number of components in complicated circuits, Monte Carlo analysis is a simple but powerful method for examining how component tolerances affect electrical behavior.
Monte Carlo techniques are preferable to manual calculations because they are useful in linear and nonlinear circuits and because they can be easily performed in a SPICE-based simulator.
Both cards and electronic components can be measured by the same area of mathematics.
Whether you’re trying your hand at circuit design or blackjack, you’re governed by the laws of probability. Random draws from a deck of cards and random components selected from a tape-and-reel can be analyzed with the same area of mathematics: probability theory. Within probability theory, there are many techniques to extract expected values of observed quantities in the presence of randomness. One very powerful technique is known as Monte Carlo simulation, which is where a system is created and simulated repeatedly to generate expected results for a system.
As part of circuit design and analysis, this computationally powerful technique gives designers a way to examine how component tolerances affect a design in terms of electrical behavior. Because Monte Carlo tolerance analysis is a simple technique, it is present in some circuit simulators. Here’s how this technique works and how you can use it to examine variations in electrical behavior.
What Is Monte Carlo Tolerance Analysis in Circuit Design?
A Monte Carlo simulation can be used to examine how tolerances in component values affect electrical behavior and measurements within a circuit. By generating many possible component values from the tolerance values for components, the circuit’s electrical behavior can be calculated for each set of component values. The results can be analyzed statistically, just as one would do with a large number of measurements.
Monte Carlo tolerance analysis involves defining each component value as a random variable. This means each component needs to be given a mean, standard deviation, and governing probability distribution. The mean component value (μ) can be taken as the nominal value from a datasheet, and the standard deviation (𝜎) can be calculated using the tolerance in the component value. Based on the central limit theorem (CLT), the underlying probability distribution for the component value can be constructed as a normal distribution.
Standard methods for generating random variables on a computer normally involve transforming a uniformly distributed random variable into a standard normal random variable (e.g., Box-Muller method). The underlying random variable for the component value can be converted from a standard normal random variable to a normal random variable using the following formula:
The normally distributed random variable for an electrical component value can be calculated using the nominal value (mean, or μ) and standard deviation (𝜎, calculated using the component’s tolerance value).
With this definition, we can use the following process to perform Monte Carlo tolerance analysis:
Determine the parameters in the normal distribution governing your component values from the tolerance and nominal value.
Generate a random component value for each component in the design using the normal distribution you defined from the nominal (mean) component value and standard deviation.
Use these random component values to calculate the relevant electrical parameter (transient analysis, frequency sweep/transfer function, impedance, output voltage waveform, etc.).
Repeat steps 1-3 a total of N times and save the data from each repetition.
Calculate statistics on the data for your desired electrical parameter. You can also plot the data from all repetitions to visualize the effects of component tolerances on your design.
This method is a very simple way to generate results for a massive number of possible component values within specified tolerances. This method can also be used with nonlinear circuits as you’re simply using standard SPICE simulations to calculate results for each randomly generated circuit. To see how Monte Carlo tolerance analysis results can be generated and further analyzed, it helps to look at a simple example.
Example: Parallel RLC Circuit
A parallel RLC circuit (resistor, capacitor, and inductor all in parallel with a voltage source) is a simple LTI circuit with resonance, as long as the resistor value is small enough (i.e., the transient response is underdamped). To see how tolerances can affect the resonant frequency, consider a simple situation where we have a parallel RLC circuit with the following component values:
R = 10 Ohms ± 5%
L = 5 nH ± 5%
C = 10 nF ± 5%
Here, we’ve taken the tolerances to be covered up to the 99th percentile, so zp = 2.576 in the above standard deviation formula. The graph below shows how Monte Carlo tolerance analysis results can be visualized. Random draws for component values were simulated using the Box-Muller transformation, and the impedance of the parallel RLC circuit was calculated for each generation. The results from 22 Monte Carlo simulations are shown below.
Monte Carlo tolerance analysis results for a parallel RLC circuit. This circuit is highly sensitive to component tolerances.
From this graph, we see significant variation in the resonant frequency (up to 20 MHz variation, or over 10% of the nominal 141 MHz resonant frequency) even with only 5% tolerance up to the 99% quantile. As a result, the impedance at the desired 141 MHz resonance has significant variation. This occurs because our nominal 5% tolerances add together in quadrature, so the total impedance tolerance in the circuit can reach far beyond 5%. This may be unacceptable in many applications that require high precision, such as in RF circuits.
The result above also illustrates a simple way to validate what one would expect to see in a large number of builds for this circuit. By simply taking the average and standard deviation of the data at the intended resonant frequency, we can determine the average impedance and standard deviation, or any other statistical quantity. Here we find that the average is somewhat lower than 10 Ohms at resonance (8.576 Ohms, standard deviation = 1.324 Ohms).
Monte Carlo Tolerance Analysis in Your Circuit Simulator
Instead of writing out your own scripts for performing Monte Carlo tolerance analysis, the best SPICE-based circuit simulator will include these analysis features. This gives a simple way to perform Monte Carlo tolerance analysis for a very large circuit, rather than doing all the statistical calculations by hand. Most circuit simulators do not include these types of features, leaving you to learn statistical programming on your own.
When you want to perform Monte Carlo tolerance analysis directly from your circuit schematics, try using the industry’s best PCB layout and design software with a complete set of analysis tools. With the PSpice Simulator package, you can build circuits, run a variety of simulations, and easily move on to create your PCB layout. You’ll also have access to advanced design verification tools and field solver utilities to analyze the behavior of advanced electronics.
If you’re looking to learn more about how Cadence has the solution for you, talk to us and our team of experts.