Tutorials‎ > ‎

Lesson 6: Statistical Design


In a perfect world, measured data would match up with the model. Unfortunately, even the best set-up model will run into problems with manufacturing tolerances. Mason provides two mechanisms to help deal with these tolerances: statistical analysis and statistical optimization.

Section 1: Statistical Analysis

The circuit described in Figure 6.1 will simulate a typical Wilkinson combiner. For a meaningful statistical analysis, the variables need to have some statistical variation defined (Figure 6.2). By simulating the variation caused by manufacturing tolerances, we can estimate what our likely yield is (which assumes we know our process variation... that's another show). The yield is displayed in the console; hit the “C” button in TinyCAD to see what the yield is.

Figure 6.1: Circuit used for statistical analysis

Important note: the “stat_output=true” setting in the flag block is important. It outputs the data files for all of the Monte Carlo runs so that the data can be plotted. You only need to set this flag if you want to plot the data, simple yield analysis does not require stat_output. 

The statistical analysis is performed using a Monte Carlo run, and the statistical block defines how many iterations to use for this run. A larger number of iterations provides a more precise prediction of the yield. Additionally, a higher expected yield translates to a need for greater precision. 

If your yield is running around 50%, you could run twenty iterations and get a good approximation of the actual yield. If your yield is expected to be 99.99%, such that you need to run 10000 iterations just to expect one failure, then twenty iterations is not especially helpful. As a general rule of thumb, try to set the number of iterations such that you expect ten failures: for 99.99% yield, 100000 iterations should average ten failures. This isn't the most rigorous mathematical setting, but in practice is a good starting place.
Figure 6.2: Variable settings for statistical analysis

Besides defining the number of iterations we will run for the Monte Carlo, we also need to describe some yield goals- what does it mean to “pass”? In general, yield goals should be relaxed from the optimization goals. Generally the circuit will not perform better than the optimization goals (the optimizer is not rewarded for doing better than the optimization goals). The yield goals should be set as the minimum desired performance; the optimization goals should be set as something much more stringent. In reality, it takes much experience to learn to balance these goals. 

After Mason is run using the above circuit, run Mason Plot. You will now see a Statistics option in the lower left. Click on “Use Stats” and “Refresh”. Change the Plot Type to “Log” and you should see the plot in Figure 6.3.

Figure 6.3: Mason Plot with the statistics option unlocked

Mason Plot uses a modified concept of a Box Plot. The five lines plotted include: the maximum and minimum values (no value was found among any circuit that was higher or lower than these). The plots include the median value over frequency (the median over all circuits simulated). The plots also include a lower percentile and a higher percentile plot: 50% equates to 50% of the population is within the upper and lower percentile curves, 25% are between the higher percentile curve and the maximum, and 25% are between the lower percentile and the minimum. The “Box Plot % Included” can range from 0% (which is the median) to 100% (which is the maximum and minimum lines).

The Box Plot is a useful way to bundle yield with data; in the above plot, 75% of the values are between the Upper Percentile and the Minimum curves (50% between the percentiles, 25% below the percentile). An important thing to remember is that the lines in the Box Plot are not necessary plots of an actual circuit. The median plot shows the median value for all of the circuits evaluated at each frequency, but there probably is not an actual “median” circuit.

Be advised that Mason Plot may take a minute to process large statistical runs. For runs of 10000, it can take a literal minute to process and calculate that much data.


6.1: The yield is a function of more than just the design- it's a function of the frequency and yield goals. Change the frequency range to 1.5 GHz to 1.7 GHz. What is the new yield?

6.2: Keeping the more narrow frequency range, adjust the “max” value from of the goal for Stat1 from “-15” to “-20” and record the new yield. Plot the yield numbers when -20 to -30 in 1dB increments.

Main Point

Performing a statistical analysis on a circuit before moving into production provides a sense of how many devices should actually work (the yield). A highly optimized design that has a low yield is likely unprofitable, and therefore undesirable.

Section 2: Statistical Optimization

Statistical optimization uses a simplex algorithm (a non-linear gradient search), but instead of optimizing on something like match or gain, it optimizes on the yield. Since all of the optimizers used by Mason are technically minimizing functions, the optimizer is set to minimize the failure rate for a series of Monte Carlo Runs. 

The Statistical Optimizer requires two inputs: the number of iterations to run the simplex for yield optimization, and the size of the Monte Carlo to run during that iteration. Per a rough understanding, consider that 10 iterations of yield optimization, with each iteration requiring a Monte Carlo run to determine the failure rate (let's say 100 random samples), means no fewer than one thousand circuits need to be evaluated. In practice, the numbers are much larger.

Figure 6.4: Settings for statistical analysis

In reality, the circuit described above is too simple to get much value out of yield optimization. More complex designs, however, can benefit greatly from this technique.

Main Point

The yield optimizer can tweak the circuit design to maximize the number of devices fabricated which will pass a minimum criteria. This is valuable for more than just high quantity production runs- even if only one circuit is being built, having a design shifted from 50% yield to 90% yield can relieve a lot of frustration down the line. In high production runs, having a yield improve from 90% to 99.9% can mean the difference between getting unpaid overtime or getting bonuses.