Monte Carlo Simulation vs ML Models

In summary: We don't average the outputs of the MC SPICE simulations -- we use them to see what the worst-case performance can be.For example, when my first simulations of a particular anti-alias filter for an audio application showed that my passband ripple was too large, I explored other polynomials for the filter and ended up picking one that had fewer terms and was not as sharp at cutoff, but had much better passband ripple performance.There have been other times when I was not happy with what my simulations were showing me about another analog filter circuit, so I opted instead to do simple filtering with the analog front end, and digitize the waveform to implement the rest of the filtering digitally.
  • #1
fog37
1,549
107
Hello,

I have become familiar with ML and a number of ML models (supervised and unsupervised). I would like to now learn about Monte Carlo simulations since they are so ubiquitous in many fields.

When would we choose to do a Monte Carlo simulation instead of building a ML model (supervised, unsupervised, reinforcement learning)?
What kind of problems are more suitable for a MC simulation?

Thank you!
 
Technology news on Phys.org
  • #2
Others will give better answers, but I can give you an example where Monte Carlo simulation is very important. When EEs design analog circuits, you can get some very subtle interactions between slight variations in the values of the resistors, capacitors, inductors, transformers, etc. There are tolerances associated with the parameters for each of those components (and also temperature coefficients for those values), and the worst-case performance of the circuit will not necessarily be when all components are at their upper tolerance limit (or lower) at the same time.

So we use Monte Carlo SPICE simulations to vary the values of the components randomly within their tolerance bands, and look at the families of plots for the simulations to see if the topology we are using and the tolerances we are specifying will meet the overall performance specs for the circuit.

I can tell you from personal experience that it is very non-trivial to design a high-performance analog filter with specifications you want (filter passband ripple, cutoff frequency, stopband ripple, etrc.) when you are varying so many component values all at once.

Good times. :smile:
 
  • Like
Likes fog37
  • #3
berkeman said:
Others will give better answers, but I can give you an example where Monte Carlo simulation is very important. When EEs design analog circuits, you can get some very subtle interactions between slight variations in the values of the resistors, capacitors, inductors, transformers, etc. There are tolerances associated with the parameters for each of those components (and also temperature coefficients for those values), and the worst-case performance of the circuit will not necessarily be when all components are at their upper tolerance limit (or lower) at the same time.

So we use Monte Carlo SPICE simulations to vary the values of the components randomly within their tolerance bands, and look at the families of plots for the simulations to see if the topology we are using and the tolerances we are specifying will meet the overall performance specs for the circuit.

I can tell you from personal experience that it is very non-trivial to design a high-performance analog filter with specifications you want (filter passband ripple, cutoff frequency, stopband ripple, etrc.) when you are varying so many component values all at once.

Good times. :smile:
Thank you. I see how your are trying to optimize something (some variable) that depends on many other input variables and use randomization to get there.

I guess ML models are made for prediction (regression or classification) or clustering. Reinforcement learning is about making the right decisions inside a particular environment after some trial and error learning.

So would MC simulations instead be about running a model many many times using several inputs to which we randomly assign specific values at every different iteration with the resulting of getting many many generally different outputs which we will then average out together?
 
  • #4
fog37 said:
So would MC simulations instead be about running a model many many times using several inputs to which we randomly assign specific values at every different iteration with the resulting of getting many many generally different outputs which we will then average out together?
We don't average the outputs of the MC SPICE simulations -- we use them to see what the worst-case performance can be. For example, when my first simulations of a particular anti-alias filter for an audio application showed that my passband ripple was too large, I explored other polynomials for the filter and ended up picking one that had fewer terms and was not as sharp at cutoff, but had much better passband ripple performance. There have been other times when I was not happy with what my simulations were showing me about another analog filter circuit, so I opted instead to do simple filtering with the analog front end, and digitize the waveform to implement the rest of the filtering digitally.

Without using MC simulations, I doubt I would have seen how bad the passband ripple could get for that first circuit, and my first prototypes may have worked just fine. But if you are designing a circuit for volume production, all those tolerance variations will show up in some of the production units, which can cause performance problems in the field.
 
  • #5
fog37 said:
So would MC simulations instead be about running a model many many times using several inputs to which we randomly assign specific values at every different iteration with the resulting of getting many many generally different outputs which we will then average out together?
That is the idea, except the data is not always averaged. A complicated MC simulation can generate a massive amount of detailed data. What you do with that data depends on what question you are asking about the problem. You could be looking for averages, variation, extreme examples, etc.
It is often true that simple, standard analysis problems become much more difficult with the addition of a couple of "if .. then" conditions in the problem statement. The analysis can be a lot trickier than a simple MC model, where all you have to do is to add the "if ... then" condition into the simulation code. There have been threads in this forum where the mathematical analysis of a problem required a long, complicated, discussion and the easiest way to determine when the analysis was correct was to verify it with a relatively simple MC simulation.
 
  • Like
Likes fog37 and berkeman

1. What is the difference between Monte Carlo Simulation and ML Models?

Monte Carlo Simulation is a computational method that uses random sampling and statistical analysis to model and predict outcomes, while ML Models use algorithms and statistical techniques to learn from data and make predictions.

2. When should I use Monte Carlo Simulation and when should I use ML Models?

Monte Carlo Simulation is best suited for situations where the underlying system is complex and the data is limited or unavailable, while ML Models are better for situations where there is a large amount of data available and the system is relatively simple.

3. Which approach is more accurate, Monte Carlo Simulation or ML Models?

Both approaches have their own strengths and weaknesses, so it is difficult to say which is more accurate. Monte Carlo Simulation is better at handling uncertainty and randomness, while ML Models are better at recognizing patterns and making predictions based on large amounts of data.

4. Can Monte Carlo Simulation and ML Models be used together?

Yes, they can be used together in a hybrid approach. Monte Carlo Simulation can be used to generate data for training ML Models, and the predictions from ML Models can be used as inputs for Monte Carlo Simulation to account for uncertainty and randomness in the system.

5. Are there any limitations to using Monte Carlo Simulation or ML Models?

Both approaches have limitations. Monte Carlo Simulation can be computationally intensive and time-consuming, and it may not be suitable for complex systems with high-dimensional data. ML Models may suffer from bias and overfitting if the data is not representative of the true population.

Similar threads

  • Programming and Computer Science
Replies
4
Views
942
  • Programming and Computer Science
Replies
1
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
Replies
0
Views
2K
Replies
1
Views
1K
  • High Energy, Nuclear, Particle Physics
Replies
9
Views
1K
  • Atomic and Condensed Matter
Replies
3
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Replies
2
Views
5K
Back
Top