Electronics-Related.com
Forums

Spice is great!

Started by John Larkin August 16, 2023
On Fri, 18 Aug 2023 15:42:26 -0700 (PDT), Lasse Langwadt Christensen
<langwadt@fonz.dk> wrote:

>l&#4294967295;rdag den 19. august 2023 kl. 00.17.55 UTC+2 skrev John Larkin: >> On Fri, 18 Aug 2023 15:05:16 -0700 (PDT), Lasse Langwadt Christensen >> <lang...@fonz.dk> wrote: >> >> >fredag den 18. august 2023 kl. 22.56.56 UTC+2 skrev John Larkin: >> >> On Fri, 18 Aug 2023 22:02:36 +0200, jeroen <jer...@nospam.please> >> >> wrote: >> >> >On 2023-08-18 20:52, John Larkin wrote: >> >> >> On Fri, 18 Aug 2023 11:29:17 -0700, John Larkin >> >> >> <jlarkin@highland_atwork_technology.com> wrote: >> >> >> >> >> >>> On Fri, 18 Aug 2023 10:42:16 -0700 (PDT), Fred Bloggs >> >> >>> <bloggs.fred...@gmail.com> wrote: >> >> >>> >> >> >>>> On Friday, August 18, 2023 at 10:25:58?AM UTC-4, John Larkin wrote: >> >> >>>>> On Fri, 18 Aug 2023 05:59:38 -0700 (PDT), Fred Bloggs >> >> >>>>> <bloggs.fred...@gmail.com> wrote: >> >> >>>>>> On Thursday, August 17, 2023 at 11:04:11?AM UTC-4, John Larkin wrote: >> >> >>>>>>> On Thu, 17 Aug 2023 06:18:11 -0700 (PDT), Fred Bloggs >> >> >>>>>>> <bloggs.fred...@gmail.com> wrote: >> >> >>>>>>>> On Thursday, August 17, 2023 at 6:47:11?AM UTC-4, John Larkin wrote: >> >> >>>>>>>>> On Thu, 17 Aug 2023 00:11:11 -0000 (UTC), Phil Hobbs >> >> >>>>>>>>> <pcdhSpamM...@electrooptical.net> wrote: >> >> >>>>>>>>> >> >> >>>>>>>>>> John Larkin <jlarkin@highland_atwork_technology.com> wrote: >> >> >>>>>>>>>>> >> >> >>>>>>>>>>> >> >> >>>>>>>>>>> While my sim is running, I can do all sorts of things. Grocery shop, >> >> >>>>>>>>>>> prowl the web, take a nap. >> >> >>>>>>>>>>> >> >> >>>>>>>>>>> https://xkcd.com/303/ >> >> >>>>>>>>>>> >> >> >>>>>>>>>>> Same idea. My alternator simulator simulation (!) takes about 25 >> >> >>>>>>>>>>> minutes to rev up, running 10 or so PPM of real time. It's nicely >> >> >>>>>>>>>>> settled in about an hour. >> >> >>>>>>>>>>> >> >> >>>>>>>>>>> >> >> >>>>>>>>>> >> >> >>>>>>>>>> It&#4294967295;s probably pretty linear, so you could solve the DE by hand. Then you&#4294967295;d >> >> >>>>>>>>>> have more info than a stack of sims. >> >> >>>>>>>>> It's a mess of PWM modulators, mosfet half-bridges, cycle-by-cycle >> >> >>>>>>>>> current limiters, 3-phase common-mode chokes, ferrite beads, about 50 >> >> >>>>>>>>> bypass caps. I'm not smart enough to do that analytically. >> >> >>>>>>>> >> >> >>>>>>>> Unless all those subelements interact, it's insane to simulate the whole shebang at once. >> >> >>>>>>> Of course they interact! >> >> >>>>>>> >> >> >>>>>>> The 200 watt floating dc/dc conveter is reasonably independent so >> >> >>>>>>> that's a separate sim. Ditto my soft-start circuit that ramps up the >> >> >>>>>>> raw 48v bus in to the dc/dc. >> >> >>>>>>> >> >> >>>>>>> High school trig was some time ago, so I have a couple of sims to >> >> >>>>>>> verify the basic 3-phase math. Spice could eventually destroy all our >> >> >>>>>>> math skills; I use it for voltage dividers and RC timing circuits too. >> >> >>>>>>> >> >> >>>>>>> Is there an anlytical way to express delay lines? I think I saw the >> >> >>>>>>> delay case once, in a test for PE registration as a Controls Engineer. >> >> >>>>>> >> >> >>>>>> f(t) delayed by Td is f(t-Td). Now how that works in LTSpice is another question. They do have some kind of delay function for digital subcircuits. So maybe analog->digital-> delay-> analog is the way to squeeze that into a realistic simulation. >> >> >>>>> LT Spice has both ideal and lossy transmission lines. A lossy line is >> >> >>>>> a decent model for a diffusive thing, like a thermal delay or a really >> >> >>>>> terrible PCB trace. >> >> >>>>> >> >> >>>>> I think conductors inside digital ICs are essentially all diffusive, R >> >> >>>>> and C and not much L. That's terrible for rise time. >> >> >>>> >> >> >>>> By diffusive I take it to mean frequency dependent time delay. That's much more complicated than a simple time shift. No wonder your runtime is taking forever. Do you really need to model these diffusive delays for a relay driver board??? Seems overkill. >> >> >>> >> >> >>> My super slow sim now is the PM alternator simulator board, which >> >> >>> doesn't have any delay lines. >> >> >>> >> >> >>> https://www.dropbox.com/scl/fi/atrtd0s0euasg0jkq3p8p/P942_23.jpg?rlkey=sis6iqz3e8uiovk3qnmvjr3gd&raw=1 >> >> >>> >> >> >>> That took a half hour or so to run. Even zooming on a slice of time >> >> >>> takes something like a minute. I guess I need to tell it to not save >> >> >>> so much stuff. >> >> >>> >> >> >> >> >> >> I tried .save of a few nodes and it didn't change the sim time much. >> >> >> I'm compute bound. >> >> >> >> >> >> Zooming should improve if I don't save gigabytes of data. >> >> >> >> >> > >> >> >The way you go about it, no amount of computing power is ever going >> >> >to be enough. >> >> The way *I* go about it? How would you sim a polyphase switching >> >> supply, simulating an alternator, driving a FADEC shorting regulator? >> >> >> >> My old Win7 computer and LT Spice is a bit leisurely. But good enough. >> > >> >check how bad the cpu is >> > >> >https://www.cpubenchmark.net/singleCompare.php >> My computer at home died but luckily we had an identical oldish box at >> work and the RAID drives moved and worked in the old box. >> >> One of these years I'll need three new Win10 boxes, and maybe a spare, >> with all the tools and junk installed. I'm not looking forward to >> that. Win10 is terrible and 11 is probably worse. > >win10/11 is fine, and they can run linux too much easier when deveping for e.g. rpi or Zyng > >> More RAM and more compute power would be nice. > >single core performance haven't improved much for years
They are E5 1603 quad core 2.8 GHz. 8G ram isn't enough, considering that Firefox alone can run maybe 20 processes. Maybe the sim will run faster if I close Firefox. I use to run the ECA circuit simulator on an 8088 at a couple of MHz!
l&oslash;rdag den 19. august 2023 kl. 01.27.06 UTC+2 skrev John Larkin:
> On Fri, 18 Aug 2023 15:42:26 -0700 (PDT), Lasse Langwadt Christensen > <lang...@fonz.dk> wrote: > > >l&oslash;rdag den 19. august 2023 kl. 00.17.55 UTC+2 skrev John Larkin: > >> On Fri, 18 Aug 2023 15:05:16 -0700 (PDT), Lasse Langwadt Christensen > >> <lang...@fonz.dk> wrote: > >> > >> >fredag den 18. august 2023 kl. 22.56.56 UTC+2 skrev John Larkin: > >> >> On Fri, 18 Aug 2023 22:02:36 +0200, jeroen <jer...@nospam.please> > >> >> wrote: > >> >> >On 2023-08-18 20:52, John Larkin wrote: > >> >> >> On Fri, 18 Aug 2023 11:29:17 -0700, John Larkin > >> >> >> <jlarkin@highland_atwork_technology.com> wrote: > >> >> >> > >> >> >>> On Fri, 18 Aug 2023 10:42:16 -0700 (PDT), Fred Bloggs > >> >> >>> <bloggs.fred...@gmail.com> wrote: > >> >> >>> > >> >> >>>> On Friday, August 18, 2023 at 10:25:58?AM UTC-4, John Larkin wrote: > >> >> >>>>> On Fri, 18 Aug 2023 05:59:38 -0700 (PDT), Fred Bloggs > >> >> >>>>> <bloggs.fred...@gmail.com> wrote: > >> >> >>>>>> On Thursday, August 17, 2023 at 11:04:11?AM UTC-4, John Larkin wrote: > >> >> >>>>>>> On Thu, 17 Aug 2023 06:18:11 -0700 (PDT), Fred Bloggs > >> >> >>>>>>> <bloggs.fred...@gmail.com> wrote: > >> >> >>>>>>>> On Thursday, August 17, 2023 at 6:47:11?AM UTC-4, John Larkin wrote: > >> >> >>>>>>>>> On Thu, 17 Aug 2023 00:11:11 -0000 (UTC), Phil Hobbs > >> >> >>>>>>>>> <pcdhSpamM...@electrooptical.net> wrote: > >> >> >>>>>>>>> > >> >> >>>>>>>>>> John Larkin <jlarkin@highland_atwork_technology.com> wrote: > >> >> >>>>>>>>>>> > >> >> >>>>>>>>>>> > >> >> >>>>>>>>>>> While my sim is running, I can do all sorts of things. Grocery shop, > >> >> >>>>>>>>>>> prowl the web, take a nap. > >> >> >>>>>>>>>>> > >> >> >>>>>>>>>>> https://xkcd.com/303/ > >> >> >>>>>>>>>>> > >> >> >>>>>>>>>>> Same idea. My alternator simulator simulation (!) takes about 25 > >> >> >>>>>>>>>>> minutes to rev up, running 10 or so PPM of real time. It's nicely > >> >> >>>>>>>>>>> settled in about an hour. > >> >> >>>>>>>>>>> > >> >> >>>>>>>>>>> > >> >> >>>>>>>>>> > >> >> >>>>>>>>>> It&rsquo;s probably pretty linear, so you could solve the DE by hand. Then you&rsquo;d > >> >> >>>>>>>>>> have more info than a stack of sims. > >> >> >>>>>>>>> It's a mess of PWM modulators, mosfet half-bridges, cycle-by-cycle > >> >> >>>>>>>>> current limiters, 3-phase common-mode chokes, ferrite beads, about 50 > >> >> >>>>>>>>> bypass caps. I'm not smart enough to do that analytically. > >> >> >>>>>>>> > >> >> >>>>>>>> Unless all those subelements interact, it's insane to simulate the whole shebang at once. > >> >> >>>>>>> Of course they interact! > >> >> >>>>>>> > >> >> >>>>>>> The 200 watt floating dc/dc conveter is reasonably independent so > >> >> >>>>>>> that's a separate sim. Ditto my soft-start circuit that ramps up the > >> >> >>>>>>> raw 48v bus in to the dc/dc. > >> >> >>>>>>> > >> >> >>>>>>> High school trig was some time ago, so I have a couple of sims to > >> >> >>>>>>> verify the basic 3-phase math. Spice could eventually destroy all our > >> >> >>>>>>> math skills; I use it for voltage dividers and RC timing circuits too. > >> >> >>>>>>> > >> >> >>>>>>> Is there an anlytical way to express delay lines? I think I saw the > >> >> >>>>>>> delay case once, in a test for PE registration as a Controls Engineer. > >> >> >>>>>> > >> >> >>>>>> f(t) delayed by Td is f(t-Td). Now how that works in LTSpice is another question. They do have some kind of delay function for digital subcircuits. So maybe analog->digital-> delay-> analog is the way to squeeze that into a realistic simulation. > >> >> >>>>> LT Spice has both ideal and lossy transmission lines. A lossy line is > >> >> >>>>> a decent model for a diffusive thing, like a thermal delay or a really > >> >> >>>>> terrible PCB trace. > >> >> >>>>> > >> >> >>>>> I think conductors inside digital ICs are essentially all diffusive, R > >> >> >>>>> and C and not much L. That's terrible for rise time. > >> >> >>>> > >> >> >>>> By diffusive I take it to mean frequency dependent time delay. That's much more complicated than a simple time shift. No wonder your runtime is taking forever. Do you really need to model these diffusive delays for a relay driver board??? Seems overkill. > >> >> >>> > >> >> >>> My super slow sim now is the PM alternator simulator board, which > >> >> >>> doesn't have any delay lines. > >> >> >>> > >> >> >>> https://www.dropbox.com/scl/fi/atrtd0s0euasg0jkq3p8p/P942_23.jpg?rlkey=sis6iqz3e8uiovk3qnmvjr3gd&raw=1 > >> >> >>> > >> >> >>> That took a half hour or so to run. Even zooming on a slice of time > >> >> >>> takes something like a minute. I guess I need to tell it to not save > >> >> >>> so much stuff. > >> >> >>> > >> >> >> > >> >> >> I tried .save of a few nodes and it didn't change the sim time much. > >> >> >> I'm compute bound. > >> >> >> > >> >> >> Zooming should improve if I don't save gigabytes of data. > >> >> >> > >> >> > > >> >> >The way you go about it, no amount of computing power is ever going > >> >> >to be enough. > >> >> The way *I* go about it? How would you sim a polyphase switching > >> >> supply, simulating an alternator, driving a FADEC shorting regulator? > >> >> > >> >> My old Win7 computer and LT Spice is a bit leisurely. But good enough. > >> > > >> >check how bad the cpu is > >> > > >> >https://www.cpubenchmark.net/singleCompare.php > >> My computer at home died but luckily we had an identical oldish box at > >> work and the RAID drives moved and worked in the old box. > >> > >> One of these years I'll need three new Win10 boxes, and maybe a spare, > >> with all the tools and junk installed. I'm not looking forward to > >> that. Win10 is terrible and 11 is probably worse. > > > >win10/11 is fine, and they can run linux too much easier when deveping for e.g. rpi or Zyng > > > >> More RAM and more compute power would be nice. > > > >single core performance haven't improved much for years > They are E5 1603 quad core 2.8 GHz. 8G ram isn't enough, considering > that Firefox alone can run maybe 20 processes. > > Maybe the sim will run faster if I close Firefox.
something like an i9-13900K is more than 2x single , 12x multi performance
On 8/17/2023 11:03 AM, John Larkin wrote:

> Of course they interact! > > The 200 watt floating dc/dc conveter is reasonably independent so > that's a separate sim. Ditto my soft-start circuit that ramps up the > raw 48v bus in to the dc/dc. > > High school trig was some time ago, so I have a couple of sims to > verify the basic 3-phase math. Spice could eventually destroy all our > math skills; I use it for voltage dividers and RC timing circuits too. > > Is there an anlytical way to express delay lines? I think I saw the > delay case once, in a test for PE registration as a Controls Engineer. >
High school trig was great, they manage to stretch sin^2(x) + cos^2(x) = 1 into a full semester of material.