Numerical Optimizer (Solver) for LTSpice

I have written a numerical optimizer (solver) for LTSpice. It automaticall= y adjusts component values to meet circuit performance targets you set. Fo= r example maximum power output and minimum supply current. It uses a fast = evolutionary algorithm to get good results quickly. You can get good result= s in anything from 5 minutes to a few hours depending on the complexity of = the circuit. It is much faster and better than using any of the genetic al= gorithms available or the Simplex method. =20 Anyway I have provided a free trial usable until 5 August with a 3000 itera= tion limit. I am thinking about providing a 3 month trial with an iteratio= n limit of about 500 afterwards. You can try it here:

formatting link
Best Regards, Sean O'Connor

Reply to
bitterlemon40
Loading thread data ...

Is this the same one you annnounced in the LTspice forum last Saturday?

If so, Helmut says it is slow, cannot optimize multiple variables, and is at least 10 times over-prized.

formatting link

Reply to
Mike

Sounds to me like fast evolutionary algorithmic bullshit :-)

Plus I feel any circuit subject to such a tool wouldn't qualify as having been properly designed in the first place. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Worried? While I agree that AI has been a big flop in general I think you h= ad better know that Evolutionary Algorithms are starting to show human comp= etitive results. There is a lot of 'Robot' trading on the financial market= s for example. There are human competitive results in engineering (antennas= for example) and science (drug design). Do some of your designers spend e= ntire days playing around component values trying to find some elusive swee= t-spot? That time wasting can be stopped, the number of designers can be re= duced. If you equate evolutionary algorithms to animal droppings then your = company will be left behind while others take your business.

Reply to
bitterlemon40

Hi Mike, Yes that is right. Unfortunately he could not get it to work right. I have= updated the documentation to make it easier to understand. It is very simp= le to set up. I will provide some example files in the next few weeks whic= h will make it even easier to understand. Best Regards, Sean O'Connor

Reply to
bitterlemon40

adjusts component values to meet circuit performance targets you set. For example maximum power output and minimum supply current. It uses a fast evolutionary algorithm to get good results quickly. You can get good results in anything from 5 minutes to a few hours depending on the complexity of the circuit. It is much faster and better than using any of the genetic algorithms available or the Simplex method.

iteration limit. I am thinking about providing a 3 month trial with an iteration limit of about 500 afterwards.

Is there a manual for it? If it's any good, $50 is a gift. If not, it's too expensive.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510
845-480-2058

hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

There is only the short built-in help file at the moment. Most of the compl= exity is in setting up the measurements (.measure, .meas) you require withi= n LTSpice itself. The LTSpice help file is a bit Spartan in words about how= exactly to do measurements but you can figure it out anyway. =20 Regards, Sean O'Connor

Reply to
bitterlemon40

Can you run some time comparisons on different circuit complexity between your program and the solver Helmut referred to? Any differences in the results should be resolved.

Also include on a BandGap as suggested by Jim.

Reply to
Mike

I don't know about circuit design, but in the area of antenna design, the optimizer is a key part of the design process. With circuit design, there may be a few parts that affect each other. In antenna design, everything affects everything else, making every length, spacing, and value a compromise between the various parameters (gain, bandwidth, vswr, pattern, etc). For example, in 4NEC2, I set the target values, establish weighing factors for the lengths and spacings that will change, and let the program grind most of the night trying to find an optimal compromise. I could probably get close doing all this manually, but it's so much better and easier using an optimizer. At the least, it allows mediocre antenna designers (like me) to do better than mediocre work. I suspect that might also apply to optimizers in circuit design.

"Antenna simulation tutorial 3 - 4NEC2 optimizer and impedance matching"

Examples of some of my antennas (not all are mine), most of which were fed to an optimizer for the final tweaks:

--
# Jeff Liebermann 150 Felker St #D Santa Cruz CA 95060
# 831-336-2558
# http://802.11junk.com               jeffl@cruzio.com
# http://www.LearnByDestroying.com               AE6KS
Reply to
Jeff Liebermann

adjusts component values to meet circuit performance targets you set. For example maximum power output and minimum supply current. It uses a fast evolutionary algorithm to get good results quickly. You can get good results in anything from 5 minutes to a few hours depending on the complexity of the circuit. It is much faster and better than using any of the genetic algorithms available or the Simplex method.

iteration limit. I am thinking about providing a 3 month trial with an iteration limit of about 500 afterwards.

Looks interesting - I have been playing with similar ideas, though not via LTSpice. I'm a bit more interested in topology evolution than parameter optimization, though it seems to be a somewhat more difficult problem to adapt to GA methods. Do you have plans for your software to be able to match AC analysis parameters as well?

I'll certainly give it a try.

Reply to
bitrex

You mean genetic algorithms? Those are not suitable for problems with only one solution.

Wouldn't it be easier to calculate the proper values and include their real life tolerances? Can you give one practical example where your algorithm would solve a problem quicker than a good EE could?

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
Reply to
Nico Coesel

My EM simulator code uses the Nelder-Mead downhill simplex method to optimize over completely arbitrary user-defined parameters. I couldn't have done my infrared antenna gizmos without it--the materials don't have nice simple metal and dielectric behaviour at 200 THz.

I thought about using a response-surface optimizer, but FDTD results aren't continuous functions of the parameters in general, and Nelder-Mead does a lot better at that than more sophisticated algorithms do. You just have to restart it a few times to make sure it hasn't got wedged, which it sometimes does.

There are a couple of things I could use a SPICE optimizer for, but if I were writing it myself, I'd probably just use Nelder-Mead or simulated annealing again, because I really like being able to use arbitrary parameters.

Genetic algorithms can be pretty useful for some things, especially antennas, but despite the cool name, they're just another wrench in the toolbox.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510
845-480-2058

hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

There may be better algorithms where a unique global maximum is guaranteed for example conjugate gradients, but that doesn't prevent genetic algorithms or simulated annealing from working it just means they are not the quickest way to a solution. Methods that exploit a well defined gradient structure are almost always preferable.

I would not use that as a favourable example. High speed computer based trading is responsible for most of the insane market volatility these days - that and herd instinct. It is only a matter of time before some idiot crashes a major bank into the ground with a sophisticated double or quits bet that fails many hundreds of times in a millisecond. Last one was in 2010:

formatting link

Antenna design would be an obvious example where everything is a design tradeoff and multiple optima exist. You do have to worry about a design with such elusive sweet spots that an engineer cannot see how to optimise it without computer aid.

The advantage of a computer optimisation algorithm is that it prevents poor engineers from cluelessly altering parameters and never making progress. A classic case would be where an optimum occurs in a steep valley at 45 degrees to two of the available tuning parameters.

The same is true of focussing ion optics (where simplex is good enough) very often pairs (or more) of classical potentiometer controls have to be moved together in some well defined ratio. Computer optimisation wins because after a while it finds the eigenvectors of the matrix.

I suspect the future lies with engineers defining the topology of a circuit and optimising tools adjusting things to work best.

Where "best" is some subjective mixture of minimum current, cost to build and maximum efficiency.

--
Regards,
Martin Brown
Reply to
Martin Brown

My point exactly. I _so_ much enjoyed the "optimization" of my bandgap even if my derision and laughter directed at the manager cost me a project. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Unless you're Lan Jen Chu, one of my Professors :-)

Most decent Spice simulators can do at least two dimensional parameterization (and thus search for an optimum) without any particular effort on the user's part.

But more degrees of freedom requires cleverness. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Back in the dark ages, we were using Touchstone in our MW circuits class. Several of the guys had found the optimiser in it, and they would set it up and run it all night to try and find the best solutions. Me? I could never bother with it. Instead, I found there was also a parameter 'tune' function where you adjust a parameter, and then run a simulation and look at the graph of the result.

I would set up almost all my values as parameters, and then Play! You take this length or that width, and start playing with the values, and then watch what the output does. Extremely educational, as you could see the effects in almost real time, giving you a great 'feel' for what values did what.

Once I had a handle on it, I could optimize a filter in a few minutes, just adjusting first this parameter, and then this one.

The guys using the optimiser? My favorite was the guy that was programming for a band pass filter, and forgot to put in the stop bands. His result? A single transmission line... ;-)

Charlie

Reply to
Charlie E.

Does it run under Wine, in Linux?

-- "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." (Richard Feynman)

Reply to
Fred Abse

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.