Electronics-Related.com
Forums

LT spice, leakage inductance

Started by John Larkin July 20, 2017
On Thu, 20 Jul 2017 14:25:43 -0700, Joerg <news@analogconsultants.com>
wrote:

>On 2017-07-20 12:31, John Larkin wrote: >> On Thu, 20 Jul 2017 12:14:06 -0700, Joerg <news@analogconsultants.com> >> wrote: >> >>> On 2017-07-20 11:39, John Larkin wrote: >>>> >>>> >>>> I'm simulating a flyback switcher and noticed that any K < 1 in the >>>> transformer radically slows down the sim, which is annoyingly slow >>>> already... 90 seconds to sim 60 ms of startup and a little pulsed load >>>> blip. Maybe 6:1 slower with a little leakage inductance. So I only >>>> include leakage inductance to tweak the snubber. >>>> >>> >>> That's probably what we all do. Leakage only on a cycle-by-cycle basis >>> but not for a whole load change reaction run. Besides, it would cause >>> global warming :-) >>> >>> Ever since I bought a PC with an Intel i7 in there things have greatly >>> accelerated in SPICE. >> >> So we simulate more complex stuff and give all that saved time back. >> > >Not really. I try to be frugal with resources. It's just that for >whatever reason I get to design switch-mode converters all the time and >those are sim-hungry. So now the job goes faster. I don't particularly >enjoy it but it seems hardly anyone else wants to design switchers these >days. >
I don't want to either!
> >> I've got a radically weird PLL that would probably Spice in 1 PPB of >> real time. We may sim it in Python, or just build it and tweak. >> >> Actually, PowerBasic would be better than Python. >> > >For analog SPICE always rules, except where it doesn't and then it means >bench time, soldering iron, coffee or maybe a Pale Ale. > >It can help to change precision parameters such as RELTOL in SPICE for a >faster run but I rarely do that. That was different in the days when all >I had was a 80386 running a 25MHz and a Cyrix Math processor.
I can top that. I used to run ECA on an 8088. ' THERMAL SIMULATION OF THERMALLY CONTROLLED ALUMINUM BLOCK ' ' BY JOHN LARKIN 23 APR 1991 ' ' WE ASSUME A SOLID ALUMINUM PLATE 10x10x1 CM, LOGICALLY DIVIDED INTO ' 10 REGIONS EACH 1x1x10 CM. THE HEATER IS GENERALLY LOCATED ON SECTION 2, ' AND WE TYPICALLY PROBE SECTION 6. THIS SIMULATES AN M472-STYLE ' HEATER/THERMISTOR CONTROL LOOP GEOMETRY. ' ' ELECTRICAL : THERMAL EQUIVALENCES ARE... ' ' 1 AMP == 1 WATT HEAT FLOW ' 1 VOLT == 1 DEGREE C TEMP RISE ABOVE AMBIENT ' 1 FARAD == 1 GRAM OF ALUMINUM THERMAL MASS ' 1 SECOND == 1 SECOND ' ' AMAZINGLY, THESE EQUIVALENCES ARE NEARLY EXACT! ' HERE'S THE CURRENT SOURCE / HEATER... ' ASSUME 1 WATT DUMPED INTO NODE 2 ' I1 0 0 10 RI 2 0 1M ' NOW SIMULATE 10 FINITE SECTION-SLICES. EACH SLICE HAS THERMAL CONDUCTIVITY ' OF 0.05 K/W ACROSS ITS FACES. WE ASSUME 100 K/W HEAT LOSS TO AMBIENT ' EXCEPT FOR THE TWO ENDS, WHICH ARE 70. ' ' EACH SLICE HAS VOLUME 10 CM^3, OR 27 GRAMS OF ALUMINUM. C1 1 0 27 R1 1 0 70 R12 1 2 .05 C2 2 0 27 R2 2 0 100 R23 2 3 .05 C3 3 0 27 R3 3 0 100 R34 3 4 .05 C4 4 0 27 R4 4 0 100 R45 4 5 .05 C5 5 0 27 R5 5 0 100 R56 5 6 .05 C6 6 0 27 R6 6 0 100 R67 6 7 .05 C7 7 0 27 R7 7 0 100 R78 7 8 .05 C8 8 0 27 R8 8 0 100 R89 8 9 .05 C9 9 0 27 R9 9 0 100 R910 9 10 .05 C10 10 0 27 R10 10 0 70 ' END OF NETLIST -- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On 2017-07-20 14:36, Jim Thompson wrote:
> On Thu, 20 Jul 2017 14:25:43 -0700, Joerg <news@analogconsultants.com> > wrote: > > [snip] >> >> For analog SPICE always rules, except where it doesn't and then it means >> bench time, soldering iron, coffee or maybe a Pale Ale. >> >> It can help to change precision parameters such as RELTOL in SPICE for a >> faster run but I rarely do that. That was different in the days when all >> I had was a 80386 running a 25MHz and a Cyrix Math processor. > > 386/387, now those were the good old days... start a simulation and > check back tomorrow about lunch time ;-) > > RELTOL _usually_ is _not_ the option to tweak. >
But it works :-)
> Instead... > > Be sure to set "Step gmin" > > vntol doesn't need to be 1uV, 100uV is fine, or even 1mV for switchers > > abstol at 1nA is usually quite sufficient > > nominal gmin=1n is also adequate >
Yup. The defaults or usually too tight. -- Regards, Joerg http://www.analogconsultants.com/
On 2017-07-20 14:39, John Larkin wrote:
> On Thu, 20 Jul 2017 14:25:43 -0700, Joerg <news@analogconsultants.com> > wrote: > >> On 2017-07-20 12:31, John Larkin wrote: >>> On Thu, 20 Jul 2017 12:14:06 -0700, Joerg <news@analogconsultants.com> >>> wrote: >>> >>>> On 2017-07-20 11:39, John Larkin wrote: >>>>> >>>>> >>>>> I'm simulating a flyback switcher and noticed that any K < 1 in the >>>>> transformer radically slows down the sim, which is annoyingly slow >>>>> already... 90 seconds to sim 60 ms of startup and a little pulsed load >>>>> blip. Maybe 6:1 slower with a little leakage inductance. So I only >>>>> include leakage inductance to tweak the snubber. >>>>> >>>> >>>> That's probably what we all do. Leakage only on a cycle-by-cycle basis >>>> but not for a whole load change reaction run. Besides, it would cause >>>> global warming :-) >>>> >>>> Ever since I bought a PC with an Intel i7 in there things have greatly >>>> accelerated in SPICE. >>> >>> So we simulate more complex stuff and give all that saved time back. >>> >> >> Not really. I try to be frugal with resources. It's just that for >> whatever reason I get to design switch-mode converters all the time and >> those are sim-hungry. So now the job goes faster. I don't particularly >> enjoy it but it seems hardly anyone else wants to design switchers these >> days. >> > > I don't want to either! >
And then usually they need to be 95% efficient where the glitzy datasheet barely shows more than 90%. However, that always makes for a nice challenge, makes it less boring.
>> >>> I've got a radically weird PLL that would probably Spice in 1 PPB of >>> real time. We may sim it in Python, or just build it and tweak. >>> >>> Actually, PowerBasic would be better than Python. >>> >> >> For analog SPICE always rules, except where it doesn't and then it means >> bench time, soldering iron, coffee or maybe a Pale Ale. >> >> It can help to change precision parameters such as RELTOL in SPICE for a >> faster run but I rarely do that. That was different in the days when all >> I had was a 80386 running a 25MHz and a Cyrix Math processor. > > I can top that. I used to run ECA on an 8088. >
So did I. ECA224 I think it was called. I probably still have the original 5-1/4" floppies. My first PC had an 8086 I think. 5MHz or 8MHz, don't remember. [netlist] With ECA and also the first years with SPICE I typed the netlist by hand, there was no GUI. My first programming experiences were via punch card. We had three "public" punching machines at the university in various states of disrepair. Since I always carry tools on my bicycles I had an advantage. Often a machine was unoccupied and a piece of paper said "out of order". So I fixed it, punched my stack and cycled home. Maybe all that is what turned me off from programming. I still don't like it, rgardless of programming language. -- Regards, Joerg http://www.analogconsultants.com/
On 2017-07-20 14:38, Jim Thompson wrote:
> On Thu, 20 Jul 2017 14:31:49 -0700, John Larkin > <jjlarkin@highland_snip_technology.com> wrote: > >> On Thu, 20 Jul 2017 13:02:23 -0700, Jim Thompson >> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >> >>> On Thu, 20 Jul 2017 12:26:42 -0700, John Larkin >>> <jjlarkin@highland_snip_technology.com> wrote: >>> >>>> On Thu, 20 Jul 2017 12:05:52 -0700, Jim Thompson >>>> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >>>> >>>>> On Thu, 20 Jul 2017 11:39:25 -0700, John Larkin >>>>> <jjlarkin@highland_snip_technology.com> wrote: >>>>> >>>>>> >>>>>> >>>>>> I'm simulating a flyback switcher and noticed that any K < 1 in the >>>>>> transformer radically slows down the sim, which is annoyingly slow >>>>>> already... 90 seconds to sim 60 ms of startup and a little pulsed load >>>>>> blip. Maybe 6:1 slower with a little leakage inductance. So I only >>>>>> include leakage inductance to tweak the snubber. >>>>> >>>>> You have to use Mikey's idealized components... fast, but... >>>>> >>>>> ...Jim Thompson >>>> >>>> Using a discrete inductor to simulate the leakage inductance is no >>>> faster. Nice try, JL. >>> >>> What happened to LTspice's "fastest simulator ever" ?>:-} >>> >>> ...Jim Thompson >> >> I have no idea how fast this would run in some other simulator, or if >> the leakage L would matter as much. But since I'm using an LTC3803, >> probably no other software would work. > > That's the problem with LT, and Analog Devices and sometime TI... if > your model will run on only your proprietary simulator, what the f**k > good is it? >
The beauty is that there _is_ a model and it usually is a good compromise between "real" and behavioral simulation. With other mfgs you eitehr get no model at all or one that has no behavioral parts and where you can have an extensive dinner in town and the sim still won't be past 5%. I am certain that LTSpice has brought LTC more profits than any of their marketing efforts. [...] -- Regards, Joerg http://www.analogconsultants.com/
On Thu, 20 Jul 2017 14:56:32 -0700, Joerg <news@analogconsultants.com>
wrote:

>On 2017-07-20 14:38, Jim Thompson wrote: >> On Thu, 20 Jul 2017 14:31:49 -0700, John Larkin >> <jjlarkin@highland_snip_technology.com> wrote: >> >>> On Thu, 20 Jul 2017 13:02:23 -0700, Jim Thompson >>> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >>> >>>> On Thu, 20 Jul 2017 12:26:42 -0700, John Larkin >>>> <jjlarkin@highland_snip_technology.com> wrote: >>>> >>>>> On Thu, 20 Jul 2017 12:05:52 -0700, Jim Thompson >>>>> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >>>>> >>>>>> On Thu, 20 Jul 2017 11:39:25 -0700, John Larkin >>>>>> <jjlarkin@highland_snip_technology.com> wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> I'm simulating a flyback switcher and noticed that any K < 1 in the >>>>>>> transformer radically slows down the sim, which is annoyingly slow >>>>>>> already... 90 seconds to sim 60 ms of startup and a little pulsed load >>>>>>> blip. Maybe 6:1 slower with a little leakage inductance. So I only >>>>>>> include leakage inductance to tweak the snubber. >>>>>> >>>>>> You have to use Mikey's idealized components... fast, but... >>>>>> >>>>>> ...Jim Thompson >>>>> >>>>> Using a discrete inductor to simulate the leakage inductance is no >>>>> faster. Nice try, JL. >>>> >>>> What happened to LTspice's "fastest simulator ever" ?>:-} >>>> >>>> ...Jim Thompson >>> >>> I have no idea how fast this would run in some other simulator, or if >>> the leakage L would matter as much. But since I'm using an LTC3803, >>> probably no other software would work. >> >> That's the problem with LT, and Analog Devices and sometime TI... if >> your model will run on only your proprietary simulator, what the f**k >> good is it? >> > >The beauty is that there _is_ a model and it usually is a good >compromise between "real" and behavioral simulation. With other mfgs you >eitehr get no model at all or one that has no behavioral parts and where >you can have an extensive dinner in town and the sim still won't be past 5%. > >I am certain that LTSpice has brought LTC more profits than any of their >marketing efforts. > >[...]
Suppose that LT parts are only a percentage of those parts in my system, and there are parts from AD and TI, models of which won't run on LTspice? Now what? I think it's a universally DUMB marketing strategy. If I was in the jelly-bean-user business I wouldn't buy any part whose model wasn't Berkeley-Spice-compliant. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | STV, Queen Creek, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I'm looking for work... see my website. Thinking outside the box...producing elegant & economic solutions.
"Joerg" <news@analogconsultants.com> wrote in message 
news:etcmdlFhg7pU1@mid.individual.net...
>> RELTOL _usually_ is _not_ the option to tweak. >> > > But it works :-)
For certain values of "work". I find RELTOL = 10^-3 (default) gives unsatisfying curve fitting, even on GEAR 2 (TRAP gives mediocre to horrible waveforms most of the time, so I never use it). I often set it to 10^-4.
>> vntol doesn't need to be 1uV, 100uV is fine, or even 1mV for switchers >> >> abstol at 1nA is usually quite sufficient >> >> nominal gmin=1n is also adequate > > Yup. The defaults or usually too tight.
And RSHUNT = 1e9 or thereabouts, and TRTOL higher or lower depending on what you're doing (lower --> better accuracy (timestep slows down sooner and faster around high derivatives), higher --> faster). Tim -- Seven Transistor Labs, LLC Electrical Engineering Consultation and Contract Design Website: http://seventransistorlabs.com
On 2017-07-20 15:02, Jim Thompson wrote:
> On Thu, 20 Jul 2017 14:56:32 -0700, Joerg <news@analogconsultants.com> > wrote: > >> On 2017-07-20 14:38, Jim Thompson wrote: >>> On Thu, 20 Jul 2017 14:31:49 -0700, John Larkin >>> <jjlarkin@highland_snip_technology.com> wrote: >>> >>>> On Thu, 20 Jul 2017 13:02:23 -0700, Jim Thompson >>>> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >>>> >>>>> On Thu, 20 Jul 2017 12:26:42 -0700, John Larkin >>>>> <jjlarkin@highland_snip_technology.com> wrote: >>>>> >>>>>> On Thu, 20 Jul 2017 12:05:52 -0700, Jim Thompson >>>>>> <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >>>>>> >>>>>>> On Thu, 20 Jul 2017 11:39:25 -0700, John Larkin >>>>>>> <jjlarkin@highland_snip_technology.com> wrote: >>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I'm simulating a flyback switcher and noticed that any K < 1 in the >>>>>>>> transformer radically slows down the sim, which is annoyingly slow >>>>>>>> already... 90 seconds to sim 60 ms of startup and a little pulsed load >>>>>>>> blip. Maybe 6:1 slower with a little leakage inductance. So I only >>>>>>>> include leakage inductance to tweak the snubber. >>>>>>> >>>>>>> You have to use Mikey's idealized components... fast, but... >>>>>>> >>>>>>> ...Jim Thompson >>>>>> >>>>>> Using a discrete inductor to simulate the leakage inductance is no >>>>>> faster. Nice try, JL. >>>>> >>>>> What happened to LTspice's "fastest simulator ever" ?>:-} >>>>> >>>>> ...Jim Thompson >>>> >>>> I have no idea how fast this would run in some other simulator, or if >>>> the leakage L would matter as much. But since I'm using an LTC3803, >>>> probably no other software would work. >>> >>> That's the problem with LT, and Analog Devices and sometime TI... if >>> your model will run on only your proprietary simulator, what the f**k >>> good is it? >>> >> >> The beauty is that there _is_ a model and it usually is a good >> compromise between "real" and behavioral simulation. With other mfgs you >> eitehr get no model at all or one that has no behavioral parts and where >> you can have an extensive dinner in town and the sim still won't be past 5%. >> >> I am certain that LTSpice has brought LTC more profits than any of their >> marketing efforts. >> >> [...] > > Suppose that LT parts are only a percentage of those parts in my > system, and there are parts from AD and TI, models of which won't run > on LTspice? Now what? I think it's a universally DUMB marketing > strategy. >
Au contraire. When cost isn't critical but R&D time is of the essence I always default to LTC parts. Just like everyone around me does. Mission accomplished, I'd say.
> If I was in the jelly-bean-user business I wouldn't buy any part whose > model wasn't Berkeley-Spice-compliant. >
If you work in super-jelly-bean mode you will. Because the 10c switcher chip from Asia will only come with a skimpy datasheet and there is no model at all but it costs less than the 18c domestic IC. -- Regards, Joerg http://www.analogconsultants.com/
On 2017-07-20 15:26, Tim Williams wrote:
> "Joerg" <news@analogconsultants.com> wrote in message > news:etcmdlFhg7pU1@mid.individual.net... >>> RELTOL _usually_ is _not_ the option to tweak. >>> >> >> But it works :-) > > For certain values of "work". > > I find RELTOL = 10^-3 (default) gives unsatisfying curve fitting, even > on GEAR 2 (TRAP gives mediocre to horrible waveforms most of the time, > so I never use it). I often set it to 10^-4. >
A lot of times all one needs to know is how far a certain circuitry is from the point of going unstable. There it doesn't really matter. [...] -- Regards, Joerg http://www.analogconsultants.com/
On Thu, 20 Jul 2017 14:38:33 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

>On Thu, 20 Jul 2017 14:31:49 -0700, John Larkin ><jjlarkin@highland_snip_technology.com> wrote: > >>On Thu, 20 Jul 2017 13:02:23 -0700, Jim Thompson >><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >> >>>On Thu, 20 Jul 2017 12:26:42 -0700, John Larkin >>><jjlarkin@highland_snip_technology.com> wrote: >>> >>>>On Thu, 20 Jul 2017 12:05:52 -0700, Jim Thompson >>>><To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote: >>>> >>>>>On Thu, 20 Jul 2017 11:39:25 -0700, John Larkin >>>>><jjlarkin@highland_snip_technology.com> wrote: >>>>> >>>>>> >>>>>> >>>>>>I'm simulating a flyback switcher and noticed that any K < 1 in the >>>>>>transformer radically slows down the sim, which is annoyingly slow >>>>>>already... 90 seconds to sim 60 ms of startup and a little pulsed load >>>>>>blip. Maybe 6:1 slower with a little leakage inductance. So I only >>>>>>include leakage inductance to tweak the snubber. >>>>> >>>>>You have to use Mikey's idealized components... fast, but... >>>>> >>>>> ...Jim Thompson >>>> >>>>Using a discrete inductor to simulate the leakage inductance is no >>>>faster. Nice try, JL. >>> >>>What happened to LTspice's "fastest simulator ever" ?>:-} >>> >>> ...Jim Thompson >> >>I have no idea how fast this would run in some other simulator, or if >>the leakage L would matter as much. But since I'm using an LTC3803, >>probably no other software would work. > >That's the problem with LT, and Analog Devices and sometime TI... if >your model will run on only your proprietary simulator, what the f**k >good is it?
It sells a lot of parts. LT Spice is great, and free. It works with non-LT parts, too!
> >> >>It is a nice chip, the 3803. At around a minute per run, it's not too >>terrible to iterate the compensation and such. 6 minutes was a bit >>much. >> >>I'm making a DAC-programmable flyback supply, 0 to +70 volts out, a >>few watts. Gotta pervert the usual feedback scheme. > > ...Jim Thompson
-- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On Thu, 20 Jul 2017 15:30:20 -0700, Joerg <news@analogconsultants.com>
wrote:

>On 2017-07-20 15:02, Jim Thompson wrote:
[snip]
>> >> Suppose that LT parts are only a percentage of those parts in my >> system, and there are parts from AD and TI, models of which won't run >> on LTspice? Now what? I think it's a universally DUMB marketing >> strategy. >> > >Au contraire. When cost isn't critical but R&D time is of the essence I >always default to LTC parts. Just like everyone around me does. Mission >accomplished, I'd say. > > >> If I was in the jelly-bean-user business I wouldn't buy any part whose >> model wasn't Berkeley-Spice-compliant. >> > >If you work in super-jelly-bean mode you will. Because the 10c switcher >chip from Asia will only come with a skimpy datasheet and there is no >model at all but it costs less than the 18c domestic IC.
Duh! What happened with your "mission accomplished"? You bought a cheapy rip-off instead ?;-) ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | STV, Queen Creek, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I'm looking for work... see my website. Thinking outside the box...producing elegant & economic solutions.