Hi all,
I managed to get a worse case function working for the most part just lifted from the article from analog.com. It works well.
LTspice: Worst-Case Circuit Analysis with Minimal Simulations Runs
Regulator Scaling WC.qsch (5.0 KB)
Unfortunately, it’s not a real worse case because it doesn’t include things like tempco. To make the issue worse, resistors are unpredictable as to having a pos or neg tempco. This can all be implemented with more code but lines like the two .func are about as complicated as can be designed and debugged by mere mortals because of the format. When I try to expand them, I quickly realize life is too short.
A pre-processor C-block would solve the problem very nicely.
- Only one instance allowed per file
- Limited to param inputs and outputs, any practical number
- Runs first to evaluate and assign params and before each .step iteration if present
- Could be limited to a single I/O data type, float/double
I think this would be a huge improvement to an already excellent spice program.
Regards,
Ken