wrapper around Spice

There's an LTSpice to Matlab converter,

formatting link

Cheers

Phil Hobbs- Dr Philip C D Hobbs Principal ElectroOptical Innovations

55 Orchard Rd Briarcliff Manor NY 10510 845-480-2058 hobbs at electrooptical dot net
formatting link
Reply to
Phil Hobbs
Loading thread data ...

Check the manual, there is a command line mode with batch support.

Cheers

Reply to
Martin Riddle

scad3 -ascii -b -run test.asc

silently runs and produces a quite readable test.raw output file

-Lasse

Reply to
langwadt

Suppose I have a fairly complex circuit that includes, say, 10 or 20 DACs to set up some parameters. I can simulate each DAC with a fixed voltage source.

If I create an LT Spice model, I'd like to write a top-level program that tweaks the DACs and evaluates the circuit output for some sort of goodness, using some algorithm. So, how do I essentially use LT Spice as a subroutine?

I could always have the upper-level program edit a netlist, call Spice (command line?) and analyze the results somehow?

How is this sort of higher-level optimization done?

John

Reply to
John Larkin

Parameterization and Performance Analysis. But I don't know if you can handle it ;-) ...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     |
             
              With Half My Brain Tied Behind My Back
              Still More Clever Than Mr.Prissy Pants
Reply to
Jim Thompson

Cool. Thanks.

The thing I have in mind might run for a month or so.

John

Reply to
John Larkin

Others have given good answers for what is asked. There is another option:

I have made a few cases of circuits that optimize as they go by using BV sources and a bunch more model to tune them. Since Spice components don't have to be reasonable, you can make integrators with times in the many minutes. It only works for things that you can judge in the transient case. You can't tune for a combination of noise and bandwidth.

Reply to
MooseFET

That is one interesting way to do it... stay within Spice and include the solution-space searcher and the result evaluator. The other possibility is to not use Spice at all, but do a PowerBasic program that does everything. That's reasonable in the situation I'm considering, namely a nonlinear transmission line.

John

Reply to
John Larkin

To me, "optimization" is a smelly word. It denotes to me that you don't have a firm handle on your design, and you need to "tweak" it to get it to work.

However, most "Spice derivatives" can handle a tabular text output (ala Spice 2G6) or CSDF which is similar. Thus automating such an optimization loop should be trivial except for those with a "prissy issue" ;-) ...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     |
             
              With Half My Brain Tied Behind My Back
              Still More Clever Than Mr.Prissy Pants
Reply to
Jim Thompson

A client of mine does all this stuff in Excel. Huge files. For folks like me who are used to schematic-style representation it's sort of hard to decipher if someone else did it.

Soon I'll be faced with a similar challenge. Modeling arc-over situations in AC power circuitry. Not looking forward to that one.

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

"Jim Thompson" wrote in message news: snipped-for-privacy@4ax.com...

You have a valid point, Jim, but look at it from a slightly different point of view: For any design of given specs that you've be able to create based on having a firm handle on how the thing works, if you take that design and toss it into an optimizer and apply it intelligently, you can often get another, say, 10% improvement in GBW or phase margin or whatever. You might as well take that "free" improvement when you can get it...

The big caveat there is the "intelligent" use -- I've seen cases where an optimizer provides the desired result, but it makes the circuit much more sensitive to component value variations or whatever... and Monte-Carlo simulations weren't run to investigate such problems.

Somewhere I once read a quote that said something like, "of people doing microwave design, those who claim they don't use an optimizer are either wet-behind-the-ears or liars." :-) (Note that *all* the major RF simulators out there -- ADS, Microwave Office, Genesys, Ansoft, etc. -- contain built-in optimizers, whereas only *some* SPICE simulators seem to...)

---Joel

Reply to
Joel Koltner

TO me an "optimizer" would run all process corners, power supplies and temperature variations and center the "spreads". ...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     |

  Obama says, "I AM NOT a cry baby, Fox REALLY IS out to get me!"
Reply to
Jim Thompson

"Jim Thompson" wrote in message news: snipped-for-privacy@4ax.com...

If someone hands you iron-clad specs (i.e., something to center around) that sounds like a great idea, but even with stuff like op-amps isn't the goal usually something like, "at least 325MHz GBW w/45 degrees PM, and 350MHz is even better so long as yield is still at least 99%?"

Do you happen to know what sort of yield the big guys like ADI/Linear/TI/etc. consider acceptable for their leading-edge op-amps? (I'm mainly curious if it is >99% vs. the, say, sometimes 50-70% that the digital guys will accept for their leading-edge CPUs/GPUs/etc. that they can still sell for a high enough margin to make it worthwhile.)

At many of the places I've worked the spec keeps getting revised to reflect what we've actually been able to accomplish. :-)

Reply to
Joel Koltner

Yes. Some nonlinear solution spaces can be explored only with numerical methods.

I am basically facing the deconvolution problem, namely to tune the transfer function of a very, very messy NLTL network such as to turn an available input waveform into a target output waveform. The ideal instrument will be able to tune itself to produce a range of precise customer-specified output pulse shapes, all faster than the available input drive. This is an adaptive equalizer on steroids. My initial simulation will be just to see what's possible; can I make both a 20 ps Gaussian pulse and a 240 ps sin^2 pulse with this network?

I'm not talking about designing some simple linear circuit and tweaking its component values to optimize its static performance. Anybody can do that.

John

Reply to
John Larkin

That is the big issue - can you set up the optimizer to perform all the necessary tests that you want to optimize for! I remember when I was taking microwave circuits, and some of the guys would set up an optimization run for overnight on a filter design. Came in the next morning to find a single transmission line... they had only programmed the pass bands, not the stop bands! ;-)

Charlie

Reply to
Charlie E.

of

That's always the problem... defining what you want/need. ...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     |

  Obama says, "I AM NOT a cry baby, Fox REALLY IS out to get me!"
Reply to
Jim Thompson

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.