**In the previous post, some single examples of the Monte Carlo method were shown. In this post it will be deeply analyzed, making a statistical analysis on a more complex system, analyzing its output variables and studying the results so that they will be quite useful. The advantage of simulation is that it is possible to get a random generation of variables, and also a correlation between variables can be set, achieving different effects in the analysis of the system performance. Thus, any system not only can be analyzed statistically using a random generation of variables, but also this random generation can be linked in a batch analysis or failures in production and in a post-production recovery.**

The circuits studied in the previous post were very simple circuits, allowing to see the allocation of random variables and their results when these random variables are integrated a more complex system. With this analysis, it is possible to check the performance and propose corrections which would limit statistically the variations in the final system.

In this case, the dispersive effect of the tolerances will be studied on one of the circuits where it is very difficult to achieve an stability in its features: an electronic filter. An electronic filter, passband type, will be designed and tuned to a fixed frequency, with a certain bandwidth in passband and stopband, and several statistical analysis will be done on it, to check its response with the device tolerances.

**DESIGN OF THE BANDPASS FILTER**

A bandpass filter design is done, with a 37,5MHz center frequency, 7MHz pass bandwidth (return losses ≥14dB) and a 19MHz stopband bandwidth (stopband attenuation >20dB). When the filter is calculating, three sections are got, and its schematic is

With the calculated values of the components, standard values which can make the filter transfer function are found, and its frequency response is

where it is possible to check that the center frequency is 37.5 MHz, the return losses are lower than 14dB at ± 3.5Mhz of the center frequency, and the stopband width is 18,8MHz, with 8,5MHz from the left of the center frequency and 10,3MHz to the right of the center frequency.

Then, once the filter is designed, a first statistical analysis is done, considering that the capacitor tolerance is ± 5% and the inductors are adjustable. In addition, there is not any correlation between the random variables, being able to take an random value independently.

**STATISTICAL ANALYSIS OF THE FILTER WITHOUT CORRELATION BETWEEN VARIABLES**

As it could be seen in the previous post, when there are random variables there is an output dispersion, so limits to consider a valid filter must be defined, from these limits, to analyze its valid frequency response. Yield analysis is used. This is an analysis using the Monte Carlo algorithm that it allows to check the performance or effectiveness of the design. To perform this analysis, the limits-for-validation specifications must be defined. The chosen specifications are return losses >13,5dB at 35÷40MHz, with a 2 MHzreduction in the passband width and an attenuation >20dB at frequencies ≤29MHz and ≥48MHz. By statistical analysis, it is got

whose response is bad: only 60% of possible filters generated by variables with a ±5% tolerance could be considered valid. The rest would not be considered valid by a quality control, which would mean that 40% defective material should be returned to the production, to be reprocessed.

It can be checked in the graph that the return loss are the primarily responsible for this bad performance. What could it be done to improve it? In this case, there are 4 random variables. However, two capacitors have of the same value (15pF), and when they are assembled in a production process, usually belong to the same manufacturing batch. If these variables show no correlation, variables can take completely different values. When they are not correlated, the following chart is got

However, when these assembled components belong to the same manufacturing batch, their tolerances vary always to the same direction, therefore there is correlation between these variables.

**STATISTICAL ANALYSIS OF THE FILTER WITH CORRELATION BETWEEN VARIABLES**

When the correlation is used, the influence of tolerances is decreased. In this case, it is not a totally random process, but manufacturing batches in which the variations happen. In this case, it is possible to put a correlation between the variables C1 and C3, which have the same nominal value and belong the same manufacturing batch, so now the correlation graph is

where the variation trend in each batch is the same. Then, putting a correlation between the two variables allows studying the effective performance of the filter and get

that it seems even worse. But what happens really? It must be taken into account that the variable correlation has allowed analyzing complete batches, while in the previous analysis was not possible to discern the batches. Therefore, 26 successful complete manufacturing processes have been got, compared to the previous case that it was not possible to discern anything. Then, this shows that from 50 complete manufacturing processes, 26 processes would be successful.

However, 24 complete processes would have to be returned to production with the whole lot. And it remains really a bad result. But there is a solution: the post-production adjustment.

**STATISTICAL ANALYSIS WITH POST-PRODUCTION ADJUSTMENT**

As it was said, at this point the response seems very bad, but remembering that the inductors had set adjustable. What happens now? Doing a new analysis, allowing at these variable to take values in ±10% over the nominal value, and setting the post-production optimization in the Monte Carlo analysis and voilà! Even with a very high defective value, it is possible to recover 96% of the filters within the valid values.

So an improvement is got, because the analysis is showing that it is possible to recover almost all of the batches with the post-production adjustment, so this analysis allows showing not only the defective value but also the recovery posibilities.

It is possible to represent the variations of the inductors (in this case corresponding to the serial resonances) to analyze what is the sensitivity of the circuit to the more critical changes. This analysis allows to set an adjustment pattern to reduce the adjustment time that it should have the filter.

So, with this analysis, done at the same time design, it is possible to take decisions which set the patterns of manufacturing of the products and setting the adjustment patterns for the post-production, knowing previously the statistic response of the designed filter. This analysis is a very important resource before to validate any design.

**CONCLUSIONS**

In this post, a more grade in the possibilities of using Monte Carlo statistical analysis is shown, using statistical studies. The algorithm provides optimal results and allows setting conditions for various analysis and optimizing more the design. Doing a post-production adjustment, it is possible to get the recovery grade of the proposed design. In the next post, another example of the Monte Carlo method will be done that allows seeing more possibilities over the algorithm.

**REFERENCES**

- Castillo Ron, Enrique,
*“Introducción a la Estadística Aplicada”,*Santander, NORAY, 1978, ISBN 84-300-0021-6. - Peña Sánchez de Rivera, Daniel,
*“Fundamentos de Estadística”,*Madrid, Alianza Editorial, 2001, ISBN 84-206-8696-4. - Kroese, Dirk P., y otros, “Why the Monte Carlo method is so important today”, 2014, WIREs Comp Stat, Vol. 6, págs. 386-392, DOI: 10.1002/wics.1314.