Worst-Case Analysis: Save Time And Get Reliable Results With Python - Page 1
Forum section: electronics / projects

author: amosborne
author_rank: Contributor
timestamp: November 10, 2021, 02:58:08 pm
content: Hello EEVblog!I am an electrical engineer working in the aerospace industry. Often times I find myself performing or reviewing worst-case circuit analyses (WCCA).WCCA is fairly notorious for being difficult to perform with an adequate amount of rigor. As a result, the WCCA often doesn't get performed until late in the design process when adverse findings can have a big impact.I recently wrote about a Python tool I developed to make it easier to perform WCCA. Check it out!https://www.osborneee.com/worstcase/I would also recommend the series of blogs at EDN by Charles Hymowitz.https://www.edn.com/the-worst-case/I am happy to answer to any questions, comments, or suggestions here.Best, Alex

author: amosborne
author_rank: Contributor
timestamp: January 16, 2023, 09:01:21 pm
content: Yesterday I made an update to this software to support RSS (root-sum-square) in addition to extreme value and Monte Carlo methods.https://github.com/amosborne/worstcaseI have been using this software A LOT personally and professional over the last 1.5 years, and have found it enormously useful. Perhaps others will as well!

author: Bud
author_rank: Super Contributor
timestamp: January 16, 2023, 09:45:03 pm
content: Alex,Python is a dog when it comes version compatibility. I recommend you test and make a statement about versions of Python and libraries used in your project. This will save users time guessing why the job not runs on their setup.

author: amosborne
author_rank: Contributor
timestamp: January 16, 2023, 10:28:18 pm
content: Hi Bud, are you having an issue with the installation? Or are you making a general statement?

author: Someone
author_rank: Super Contributor
timestamp: January 16, 2023, 10:52:49 pm
content: That is a general statement. I'm not going to try installing some arbitrary module unless it is mentioned up front what it was tested on. For example going in and inspecting your code we see networkx, not a trivial dependency! and not an expected dependency.Also noting that worst case tolerance and sensitivity analysis DO NOT always capture the full envelope of resulting circuit performance. They are a quick guide or applicable to simple circuits.For most problems, it is quicker to throw a simulator (in the design environment) and Monte Carlo at the problem, than to work out the idealised equations by hand. Either method may miss important characteristics if they were not included but adding more complexity is much much easier in SPICE or some other simulator that does all the calculations for you.

author: amosborne
author_rank: Contributor
timestamp: January 16, 2023, 11:05:51 pm
content: Cool. Well I actually think the dependencies are pretty clear as far as Python packages go. You can see on PyPI it is published for Python >=3.9, and if you want to know the nitty gritty you can read the pyproject.toml file. As far as I can tell from my experience, this is the standard way of documenting dependencies.I agree that extreme value analysis does not always yield the worst case result (particularly for non-linear systems), this software supports Monte Carlo as well. This project is geared more towards PCB-level design and analysis where you are considering bounding values specified in datasheets (varying, say, up to ~10 quantities at a time), rather than integrated circuit design where you would be running spice-level Monte Carlo analysis that can vary hundreds of parameters. It's another tool in the toolbox.

author: Bud
author_rank: Super Contributor
timestamp: January 16, 2023, 11:34:41 pm
content: Quote from: amosborne on January 16, 2023, 10:28:18 pmGeneral statement based on personal experience as a user who wanted to replicate published Python projects.