 |
|
| Science Forum Index » Electronics - Design Forum » wrapper around Spice... |
|
Page 1 of 2 Goto page 1, 2 Next |
|
| Author |
Message |
| John Larkin... |
Posted: Sun Nov 01, 2009 7:16 pm |
|
|
|
Guest
|
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 |
|
|
| Back to top |
|
|
|
| langwadt at (no spam) fonz.dk... |
Posted: Sun Nov 01, 2009 7:16 pm |
|
|
|
Guest
|
On 2 Nov., 01:16, John Larkin
<jjSNIPlar... at (no spam) highTHISlandtechnology.com> wrote:
[quote]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
[/quote]
scad3 -ascii -b -run test.asc
silently runs and produces a quite readable test.raw output file
-Lasse |
|
|
| Back to top |
|
|
|
| Martin Riddle... |
Posted: Sun Nov 01, 2009 7:16 pm |
|
|
|
Guest
|
"John Larkin" <jjSNIPlarkin at (no spam) highTHISlandtechnology.com> wrote in message
news:ug8se51vdpfao8iblfm3n5q591059dq1p8 at (no spam) 4ax.com...
[quote]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
[/quote]
Check the manual, there is a command line mode with batch support.
Cheers |
|
|
| Back to top |
|
|
|
| Phil Hobbs... |
Posted: Sun Nov 01, 2009 7:16 pm |
|
|
|
Guest
|
John Larkin wrote:
[quote]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
There's an LTSpice to Matlab converter, http://preview.tinyurl.com/yzbc9sl.[/quote]
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
http://electrooptical.net |
|
|
| Back to top |
|
|
|
| Jim Thompson... |
Posted: Sun Nov 01, 2009 7:45 pm |
|
|
|
Guest
|
On Sun, 01 Nov 2009 16:16:04 -0800, John Larkin
<jjSNIPlarkin at (no spam) highTHISlandtechnology.com> wrote:
[quote]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
[/quote]
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 |
|
|
| Back to top |
|
|
|
| John Larkin... |
Posted: Sun Nov 01, 2009 11:41 pm |
|
|
|
Guest
|
On Sun, 1 Nov 2009 15:34:04 -0800 (PST), "langwadt at (no spam) fonz.dk"
<langwadt at (no spam) fonz.dk> wrote:
[quote]On 2 Nov., 01:16, John Larkin
jjSNIPlar... at (no spam) highTHISlandtechnology.com> wrote:
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
scad3 -ascii -b -run test.asc
silently runs and produces a quite readable test.raw output file
-Lasse
[/quote]
Cool. Thanks.
The thing I have in mind might run for a month or so.
John |
|
|
| Back to top |
|
|
|
| MooseFET... |
Posted: Mon Nov 02, 2009 4:48 am |
|
|
|
Guest
|
On Nov 1, 4:16 pm, John Larkin
<jjSNIPlar... at (no spam) highTHISlandtechnology.com> wrote:
[quote]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?
[/quote]
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. |
|
|
| Back to top |
|
|
|
| John Larkin... |
Posted: Mon Nov 02, 2009 3:20 pm |
|
|
|
Guest
|
On Mon, 2 Nov 2009 06:48:27 -0800 (PST), MooseFET <kensmith at (no spam) rahul.net>
wrote:
[quote]On Nov 1, 4:16 pm, John Larkin
jjSNIPlar... at (no spam) highTHISlandtechnology.com> wrote:
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?
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.
[/quote]
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 |
|
|
| Back to top |
|
|
|
| Jim Thompson... |
Posted: Mon Nov 02, 2009 4:46 pm |
|
|
|
Guest
|
On Mon, 02 Nov 2009 12:20:07 -0800, John Larkin
<jjlarkin at (no spam) highNOTlandTHIStechnologyPART.com> wrote:
[quote]On Mon, 2 Nov 2009 06:48:27 -0800 (PST), MooseFET <kensmith at (no spam) rahul.net
wrote:
On Nov 1, 4:16 pm, John Larkin
jjSNIPlar... at (no spam) highTHISlandtechnology.com> wrote:
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?
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.
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
[/quote]
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 |
|
|
| Back to top |
|
|
|
| Jim Thompson... |
Posted: Mon Nov 02, 2009 5:02 pm |
|
|
|
Guest
|
On Mon, 02 Nov 2009 14:46:03 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon at (no spam) My-Web-Site.com> wrote:
[quote]On Mon, 02 Nov 2009 12:20:07 -0800, John Larkin
jjlarkin at (no spam) highNOTlandTHIStechnologyPART.com> wrote:
On Mon, 2 Nov 2009 06:48:27 -0800 (PST), MooseFET <kensmith at (no spam) rahul.net
wrote:
On Nov 1, 4:16 pm, John Larkin
jjSNIPlar... at (no spam) highTHISlandtechnology.com> wrote:
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?
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.
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
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
[/quote]
A few years ago I was doing a project for company [...], a fancy PLL
for a wireless networking scheme.
Along came some "schmuck" touting an "optimization" software that
would take any netlist and "optimize" it for multiple parameters.
"Schmuck" insisted I provide him with a cell he could demonstrate his
technique on.
I gave him a WORKING bandgap design (proven multiple times in other
processes), suggesting optimization over temperature, while minimizing
power.
"Schmuck" optimized my design. It then wouldn't even start up, let
alone act like a bandgap.
Company [...] bought "schmuck's" software and fired me.
Company [...] has failed... even Obamanization couldn't save 'em
...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!" |
|
|
| Back to top |
|
|
|
| Joerg... |
Posted: Mon Nov 02, 2009 5:24 pm |
|
|
|
Guest
|
John Larkin wrote:
[quote]On Mon, 2 Nov 2009 06:48:27 -0800 (PST), MooseFET <kensmith at (no spam) rahul.net
wrote:
On Nov 1, 4:16 pm, John Larkin
jjSNIPlar... at (no spam) highTHISlandtechnology.com> wrote:
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?
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.
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.
[/quote]
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. |
|
|
| Back to top |
|
|
|
| Joel Koltner... |
Posted: Mon Nov 02, 2009 6:42 pm |
|
|
|
Guest
|
"Jim Thompson" <To-Email-Use-The-Envelope-Icon at (no spam) My-Web-Site.com> wrote in
message news:mhkue590hlb9355dm6r87nmom4js970rft at (no spam) 4ax.com...
[quote]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.
[/quote]
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 |
|
|
| Back to top |
|
|
|
| Jim Thompson... |
Posted: Mon Nov 02, 2009 6:52 pm |
|
|
|
Guest
|
On Mon, 2 Nov 2009 15:42:36 -0800, "Joel Koltner"
<zapwireDASHgroups at (no spam) yahoo.com> wrote:
[quote]"Jim Thompson" <To-Email-Use-The-Envelope-Icon at (no spam) My-Web-Site.com> wrote in
message news:mhkue590hlb9355dm6r87nmom4js970rft at (no spam) 4ax.com...
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.
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
[/quote]
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!" |
|
|
| Back to top |
|
|
|
| Joel Koltner... |
Posted: Mon Nov 02, 2009 7:06 pm |
|
|
|
Guest
|
"Jim Thompson" <To-Email-Use-The-Envelope-Icon at (no spam) My-Web-Site.com> wrote in
message news:h3sue59ovutj0b8oaipja68jsubvctnfef at (no spam) 4ax.com...
[quote]TO me an "optimizer" would run all process corners, power supplies and
temperature variations and center the "spreads".
[/quote]
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.  |
|
|
| Back to top |
|
|
|
| John Larkin... |
Posted: Mon Nov 02, 2009 8:36 pm |
|
|
|
Guest
|
On Mon, 2 Nov 2009 15:42:36 -0800, "Joel Koltner"
<zapwireDASHgroups at (no spam) yahoo.com> wrote:
[quote]"Jim Thompson" <To-Email-Use-The-Envelope-Icon at (no spam) My-Web-Site.com> wrote in
message news:mhkue590hlb9355dm6r87nmom4js970rft at (no spam) 4ax.com...
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.
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
[/quote]
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 |
|
|
| Back to top |
|
|
|
|
|
All times are GMT - 5 Hours
The time now is Tue Dec 15, 2009 6:16 am
|
|