LT spice, leakage inductance

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.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin
Loading thread data ...

You have to use Mikey's idealized components... fast, but... ...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

formatting link
| 1962 |

I'm looking for work... see my website.

Thinking outside the box...producing elegant & economic solutions.

Reply to
Jim Thompson

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.

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

Using a discrete inductor to simulate the leakage inductance is no faster. Nice try, JL.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

So we simulate more complex stuff and give all that saved time back.

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.

--

John Larkin         Highland Technology, Inc 
picosecond timing   precision measurement  

jlarkin att highlandtechnology dott com 
http://www.highlandtechnology.com
Reply to
John Larkin

What happened to LTspice's "fastest simulator ever" ?>:-} ...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.
Reply to
Jim Thompson

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.

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.

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg
[snip]
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.

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 ...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.
Reply to
Jim Thompson

I don't want to either!

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
Reply to
John Larkin

But it works :-)

Yup. The defaults or usually too tight.

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

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.

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/
Reply to
Joerg

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.

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
Reply to
Tim Williams

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/
Reply to
Joerg

High Q (RF) circuits are notoriously bad at that. Sure, there are better approaches to nonlinear RF, but none cheaper than SPICE.

My concern comes mainly when I want to know current consumption and power dissipation accurately. Most of the power is burned on the edges, so the edges need to be known precisely, to have the subtraction in the efficiency calculation come out accurate.

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
Website: http://seventransistorlabs.com
Reply to
Tim Williams

With K < 1 the leakage inductor will resonate with the switch node capacitance. When there is no snubber, this will be a very high-frequency oscillation, driving down the time step and thus increasing simulation time. LTspice is very actively looking for such behavior -- some other simulators can be fooled into not seeing it.

-marcel

Reply to
mhx

You should always include realistic stray capacitances in the inductor model. Also, the default ESR is 1 milliohm when you do not specify it yourself. This default value does not occur for capacitors. You can end up with a high-Q resonance at very high frequencies that slow down the sim.

Always check to see the Spice -> Netlist Options -> Default Integration Method is set to Modified Trap. This is Mike Englehardt's creation and is described in "SPICE Differentiation" in

formatting link
Another factor is Schottky diodes used as rectifiers. Some models have components that greatly slow the simulation. Try another diode or just use the default D.

Reply to
Steve Wilson

You also get more accurate efficiency and output ripple with an accurate inductor model, one that includes skin effect and core loss.

If you happen to use Coilcraft parts, you're in luck, because they make such detailed models!

Unfortunately, they're completely unusable in transient mode. Until this, that is:

formatting link

Which, if you have impedance data for a part, can also be used to create a new model... :)

I often find it's useful to put an R+C across schottky diodes, and add ESL (with some R in parallel with that). I have package models for that.

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
Website: http://seventransistorlabs.com
Reply to
Tim Williams

I have a snubber on the primary side, and the correct copper resistances, but adding a snubber on the secondary helps.

No leakage L, sim speed is 600 us/sec

K = 0.995, 100 us/sec

Added secondary snubber, 330 us/sec.

formatting link

But I won't actually need a secondary snubber.

--

John Larkin         Highland Technology, Inc 

lunatic fringe electronics
Reply to
John Larkin
[snip]

Actually most colleges and universities use PSpice as their preferred simulation instructional tool.... with the OrCAD GUI... gag me with a spoon ;-) ...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

formatting link
| 1962 |

I'm looking for work... see my website.

Thinking outside the box...producing elegant & economic solutions.

Reply to
Jim Thompson

It's funny how this thread has become an LTspice 'love fest', when the original post (above) was concerning LTspice CHOKING over leakage inductance >:-}

Bwahahahahahahaha! ...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.
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.