Keyboard Shortcuts
Likes
- LTspice
- Messages
Search
Re: 'SYMBOL ind X Y R90' directive in asc file, possible bug in 17.1.9 ?
rodv92,
Do you have access to another PC where you can test the same download of LTspice v17.1.9? Do you have a simpler schematic with just one or two inductors to test this with? What is the "strange look" of the inductors in sync_gen_v5_bridge3.asc? You say it was a "clean" LTspice installation.? Does this mean that there was no prior LTspice existing on the computer before the installation?? (e.g., you uninstalled or deleted anything prior to the install?) Andy |
||
Re: Multi-cycle current control
John asked, "What do you mean by 'push harder'?"
The short answer is to force the FFT to sample the waveform with many more timepoints.? That makes it slower but potentially more accurate. The somewhat complicated (and maybe unnecessary) explanation: When you ask LTspice to do an FFT, it re-samples your waveform with equally-spaced timepoints.? The default setting in View > FFT is 2^18 = 262144 points.? Starting with a simulation lasting 1.2 seconds = 60 cycles of 50 Hz, the FFT re-samples it every 4.6 us, giving you a Nyquist limit of 109 kHz. In the circuit I uploaded, I used a Gate signal with 1 us risetimes, chosen arbitrarily.? (I did try other values but saw no significant change.)? The falling edge of the Gate signal coincides with the zero-crossing of the 50 Hz sinewave, so that edge has minimal effect.? But the rising edge modulates the 50 Hz sinewave at its peaks.? Therefore, the output current waveform also has sharp 1 us edges, every third half-cycle of the sinewave. When sampling that waveform every 4.6 us for the FFT, clearly it can't preserve the shape or timing of the 1 us fast edges.? But does it matter? The pre-FFT samples and the fast waveform edges aren't synchronized.? Well, they are, but not by an integer relationship.? There are 6553.6 FFT samples for every fast edge which happens every 30 ms.? The 0.6 remainder causes the samples to drift relative to the fast edges.? Occasionally a sample point might fall within a 1 us edge, or they fall only outside it? The changing timing between samples and the fast edge cause what amounts to jitter (phase modulation) in the fast edge when it is re-sampled for the FFT. These effects are relatively small compared to the primary signal, which is the 50 Hz sinewave and its harmonics by having been amplitude-modulated. The spectrum of the Gate signal includes low-level components at 6.67 Hz and harmonics, which include the 7th and 8th at 46.667 Hz and 53.333 Hz.? When this signal modulates the 50 Hz sinewave, the difference frequencies (50.0-46.667 and 53.333-50.0) result in the 3.333 Hz component in the output spectrum.? It is about 0.01% (80 dB down) compared to the fundamental, but it's there.? Also there are odd harmonics of 3.333 Hz. Another way to look at it is in the frequency domain.? The Gate waveform has a piecewise-linear shape with sharp inflections, which has unlimited bandwidth.? When sampled for the FFT, the Nyquist limit is 109 kHz, so all that stuff above 109 kHz gets aliased or folded back down to lower frequencies. Now....??If I force the FFT to use many more samples (that's what I meant by "push harder"), such as 2^21 = 2097152, the magnitude of these spurious false signals is greatly reduced.? That's because it can sample the 1 us edges better. You can also "tune" the resampling to eliminate the drift.? Sampling 1.2 s with 240000 points works well even though the sample rate is 5 us which is too slow to capture the 1 us edges.? But it is synchronized with it. LTspice's FFT algorithm somehow works even when the data is not sampled into 2^n points.? (Mike Engelhardt has mentioned this, but never revealed how that works.) Andy |
||
Re: PWL as file (of PWM) make LTSPICE XVII hang
¿ªÔÆÌåÓýI haven't tried this one, but I ran my MCC
with REPEAT FOREVER ... ENDREPEAT for 12 s and it took
less time than I could notice. Of course, I wasn't using a .TXT
file, which would need to be accessed many times. On 2023-07-30 22:13, Andy I wrote:
FYI -- For me, it still hangs (or takes a VERY long time) when I include the REPEAT FOREVER ... ENDREPEAT around the PWL file.? I do not have experience with that particular format, so I can't tell you why it does not seem to like it |
||
Re: PWL as file (of PWM) make LTSPICE XVII hang
¿ªÔÆÌåÓýI suspect this is a function of CPU, disk, perhaps memory, and possibly LTspice/OS version.My figures were: 1m:??? ??? 0.187s 10m:??? ? 1.325s 100m:??? 12.8s 1:??? ??? ??? 126s So, once past the first step, the execution time remains approximately a linear function simulation time. I don't get any msg: "expanding repeating PWL()". Perhaps this is an improvement of 17.1.x? The figures were about the same whatever number of threads I limited LTspice to use (not surprisingly). --
Regards, Tony On 30/07/2023 23:13, Andy I wrote:
FYI -- For me, it still hangs (or takes a VERY long time) when I include the REPEAT FOREVER ... ENDREPEAT around the PWL file.? I do not have experience with that particular format, so I can't tell you why it does not seem to like it |
||
Re: PWL as file (of PWM) make LTSPICE XVII hang
¿ªÔÆÌåÓýThanks for the REPEAT FOREVER experiment. ?I repaired the algorithm now and took into account the trise/tfall times in the 100% duty cycle case.?Possibly i will dispense with the REPEAT option for the moment. -- Christoph
|
||
Re: PWL as file (of PWM) make LTSPICE XVII hang
FYI -- For me, it still hangs (or takes a VERY long time) when I include the REPEAT FOREVER ... ENDREPEAT around the PWL file.? I do not have experience with that particular format, so I can't tell you why it does not seem to like it
With .tran 10m, it's quick.? 0.7 seconds. With .tran 100m, it's much slower.? 16 seconds.? Most of the extra time is "expanding repeating PWL()". With .tran 1, it's MUCH MUCH slower.? It takes more than 18 minutes.? It did eventually finish. Apparently?the CPU time to assemble the repeating PWL is not proportional to the requested simulation time,?for whatever reason. Andy |
||
Re: PWL as file (of PWM) make LTSPICE XVII hang
Am 30.07.2023 um 22:30 schrieb Andy I <AI.egrps+io@...>:Thanks, indeed, that's the point. I have to do an iteration step in my script. -- Christoph |
||
Re: Triac model request (was: PWM as file make LTSPICE XVII hang)
Anirban asked about finding Triac models.
There are several Triac models already in the group's Files.? Finding them might be a challenge, because it's best to search for a part number, rather than the word "triac".? But you will have some success if you search for "triac" in the Files section.? (Searching for "triac" finds 131 files and folders.) ? ? "I am trying to simulate with ST?AC Switch but couldn't find a spice model for such." I do not know what "ST AC Switch" means, but if you mean ST Microelectronics, I am fairly sure that STMicro does have SPICE models for their parts.? They may be there, so look harder. ? ? "I am also open with LittleFuse triacs, ..." Note that their name is Littelfuse, not Littlefuse. ? ? "...?which I think I can find Spice Models online. Correct?" Well, gee, my first answer would be, "I give up.? Did you try?"? And "If not, why not?"? In other words, don't ask us questions like that.? Check for yourself!? Do you have a computer with internet access? But yes, I can tell you that Littelfuse does have triac SPICE models. By the way, LTspice has a Triac symbol already.? It's called "TRIAC".? It is just the symbol, it's not the model, but it is likely that you can use it directly with most Triac SPICE models. Andy |
||
Re: PWL as file (of PWM) make LTSPICE XVII hang
¿ªÔÆÌåÓýExcuses. I forgot to disable my message signing when posting the corresponding message. ANd the term from LTSPICE's view is PWL; of course. But I'm thinking in "PWM" at the moment since the data form a PWM :)Here is the data again: 0.000000000000us 0 +0.001us 5 +0.233262803819us 5 +0.001us 0 0.466525607639us 0 +0.001us 5 +0.247325838177us 5 +0.001us 0 0.933051215278us 0 +0.001us 5 +0.261329646618us 5 +0.001us 0 1.399576822917us 0 +0.001us 5 +0.275215466521us 5 +0.001us 0 1.866102430556us 0 +0.001us 5 +0.288925457598us 5 +0.001us 0 2.332628038194us 0 +0.001us 5 +0.302403152484us 5 +0.001us 0 2.799153645833us 0 +0.001us 5 +0.315593894728us 5 +0.001us 0 3.265679253472us 0 +0.001us 5 +0.328445260196us 5 +0.001us 0 3.732204861111us 0 +0.001us 5 +0.340907458017us 5 +0.001us 0 4.198730468750us 0 +0.001us 5 +0.352933707429us 5 +0.001us 0 4.665256076389us 0 +0.001us 5 +0.364480587091us 5 +0.001us 0 5.131781684028us 0 +0.001us 5 +0.375508353696us 5 +0.001us 0 5.598307291667us 0 +0.001us 5 +0.385981227015us 5 +0.001us 0 6.064832899306us 0 +0.001us 5 +0.395867638808us 5 +0.001us 0 6.531358506944us 0 +0.001us 5 +0.405140443407us 5 +0.001us 0 6.997884114583us 0 +0.001us 5 +0.413777088105us 5 +0.001us 0 7.464409722222us 0 +0.001us 5 +0.421759741900us 5 +0.001us 0 7.930935329861us 0 +0.001us 5 +0.429075381516us 5 +0.001us 0 8.397460937500us 0 +0.001us 5 +0.435715834039us 5 +0.001us 0 8.863986545139us 0 +0.001us 5 +0.441677775912us 5 +0.001us 0 9.330512152778us 0 +0.001us 5 +0.446962688450us 5 +0.001us 0 9.797037760417us 0 +0.001us 5 +0.451576770448us 5 +0.001us 0 10.263563368056us 0 +0.001us 5 +0.455530808849us 5 +0.001us 0 10.730088975694us 0 +0.001us 5 +0.458840008855us 5 +0.001us 0 11.196614583333us 0 +0.001us 5 +0.461523785236us 5 +0.001us 0 11.663140190972us 0 +0.001us 5 +0.463605516943us 5 +0.001us 0 12.129665798611us 0 +0.001us 5 +0.463112267508us 5 +0.001us 0 12.596191406250us 0 +0.001us 5 +0.464074474002us 5 +0.001us 0 13.062717013889us 0 +0.001us 5 +0.464525607639us 5 +0.001us 0 13.529242621528us 0 +0.001us 5 +0.464501809364us 5 +0.001us 0
|
||
Re: Triac model request (was: PWM as file make LTSPICE XVII hang)
Anirban,
Never "hijack" another message thread, the way you just did. If you have a new topic to send, send it as a NEW MESSAGE with a NEW SUBJECT line.? If you post from the group's website, click "New Topic".? If you post from email, send a new message (NOT a Reply) from your email program. Andy |
||
Triac model request (was: PWM as file make LTSPICE XVII hang)
Can any one help me with adding a Triac model in my schematic? I am trying to simulate with ST?AC Switch but couldn't find a spice model for such. Any idea where can I? I am also open with LittleFuse triacs, which I think I can find Spice Models online. Correct?
?
; Best Regards - Anirban.
On Sun, Jul 30, 2023 at 4:30?PM Andy I <AI.egrps+io@...> wrote:
Christoph uploaded another file (PWM_less_pulses.zip) but forgot to send a message about it.? The description with Christoph's newer file is: |
||
Re: PWL as file (of PWM) make LTSPICE XVII hang
Christoph uploaded another file (PWM_less_pulses.zip) but forgot to send a message about it.? The description with Christoph's newer file is:
? ? "Still don't find the culprit. It fails on last line. Removing last line makes it through." The last point of the next-to-last line is at 13.062717013889 us + 0.001 us + 0.464525607639 us + 0.001us = 13.529242621528 us.? The first point of the last line is at?13.529242621528 us which looks like exactly the "same" time, but there might be round-off errors in its binary format.? You should make sure that the first point of the last line exceeds the last point of the next-to-last line.? Adding one LSD to the last line's timepoint (to 13.529242621529us) fixes that.? It's a difference of 0.001 fs. By the way -- your files, and the subject line, are labeled "PWM" but I'm pretty sure you meant to write "PWL".? PWL = piece-wise linear.? PWM = pulse-width modulation.? I think what you are doing is using a PWL file of a PWM source, so both of them apply; but the question is really about the PWL file. Andy |
||
Re: Multi-cycle current control
¿ªÔÆÌåÓýMCC = Multi-Cycle Control, but also Marylebone
Cricket Club, the headquarters of English cricket. On 2023-07-30 20:59, ron davison wrote:
|
||
Re: Multi-cycle current control
That's how multilevel converters allow for lower switching losses & EMI to divide down V steps to suppress EMI. Sign waves allow higher PF, but if not AC 60 hz line based then not as helpful. Since a DC link is needed. I guess heating time constants are so long even to 60 Hz, the load modulation does not need?fast response for a single period, so the idea is a bit overkill within a period, but could still work for a smaller variable load step change over many cycles. Subtraction is also possible, but needs series multiplexing, vs additions with //ing loads What does MCC stand for? On Fri, Jul 28, 2023 at 9:10?AM John Woodgate <jmw@...> wrote:
--
Ron Davison principle Efficient Electronic Solutions 760.505.4380 ¡°What I cannot build, I do not understand¡±?Richard Feynman? |
||
Re: IGBT model example
Richard wrote, "Aren't IGBT's supported on version 4.23I?"
Yes and no.? Actually, the answer is yes, but with a twist.??This has no effect on the present discussion, but it might affect you if you find other IGBT models. All versions of LTspice (and all versions of any SPICE program) support subcircuits.? This model Udo uploaded that we're discussing, is a subcircuit model.? I think it works in every version of LTspice ever made -- and might even work in other SPICE programs too except that I think it has math operators that may be unique to LTspice. But, there was a change in the way that LTspice handled IGBTs and their symbols, which happened years ago? ?If I remember correctly: LTspice originally came with NIGBT and PIGBT symbols which were for subcircuits.? You had to provide your own IGBT model in the form of a subcircuit. Later, LTspice added its own internal IGBT device, which is a Z-element.? These models are described by a .MODEL statement instead of a .SUBCKT.? Ever since that change, LTspice accepts both .MODEL and .SUBCKT models for IGBTs -- exactly the same way that it does for diodes, BJT transistors, MOSFETs, etc. When did that change happen?? I don't know, but I think it was before version XVII (17.x).? Or maybe at the same time, which was 2016. The NIGBT and PIGBT symbols in LTspice changed to support the newer Z-elements.? In the symbols, Prefix went from X to Z.? But you can still use the symbols with .SUBCKT models, by changing the Prefix back to X.? That's easy to do. So, just be aware of the following:
I also want to add that IGBT modeling is not particularly good.? If you use LTspice's Z-models, there are problems.? If you use a .SUBCKT model, it is only as good as the model was made.? Maybe good, maybe not, but it is not because of LTspice. Andy |
||
Re: IGBT model example
¿ªÔÆÌåÓýI tell a lie. An intrinsic model for IGBTs was introduced some time since LTspiceXVII was introduced. From the Help:The LTspice IGBT implementation is based on original work by Robert Ritchie of Linear Technology Corporation. It uses device equations out of a series of papers by Allen Hefner of NIST et al. with some exceptions, e.g., the LTspice implementation includes subthreshold conduction and stochastic noise mechanisms. Old member analogspiceman did a lot of work on IGBTs including with the new intrinsic model. He found it somewhat lacking compared to a hybrid (.subckt) model of a VDMOS+PNP BJT. There is some discussion in #100309. It also seems that member Alex Bordodynov has done some work using the LTspice intrinsic model - see same message. Alex maintains a section on the ltwiki.org website where he lists some of his model collection. --
Regards, Tony On 30/07/2023 11:08, Tony Casey wrote:
There is no intrinsic SPICE IGBT device. This is why all IGBT models are .subckts. |
||
Re: IGBT model example
Richard wrote, "I have needs for these file too. I use them in the usual way, but I get an error. Please help."
Tony already explained what the main mistake was, and how to fix it.? The name of the component (next to the IGBT symbol) must be the name of the MODEL, not the name of any FILE.? You need to open the file to see what's the name of the model that it contains. But -- I want to recommend NOT placing your downloaded models into LTspice's "lib/cmp" directory.? That is the perfectly wrong place to put it.? The "lib/cmp" directory is where LTspice has its "standard.xxx" files, and nothing else.? Subcircuit (library) files would be in its "lib/sub" directory folder.? However, I strongly urge you NOT to add your models to LTspice's own library areas!? Yes you can do that, but once it's done, you have made your LTspice installation non-standard, different from everyone else's.? So a year from now when you tell someone that this model "came with LTspice" and it must be so because it is in LTspice's library, you'd be wrong. I strongly urge using your own library area. Putting anything into the "Program Files" area is a really bad idea. Andy |
||
Re: IGBT model example
R Clark wrote,:
? ? "Hello, does any boby have an example of IGBT model ?? ? ? ?No obvious to find !" Go to this group's homepage ().? Click "Files" in the left column.? Type "igbt" into the search box in the top right corner, and hit Enter or click the icon next to the search box. Voila. I see 142 matches.? They are probably spread over a few web screens, so be sure to scroll to the bottom and click the right-arrow to get to all of them. Now comes the challenging part.? What you find is every file that has "igbt" anywhere in the file itself, its filename, or its description.? Some are not IGBT models.? Furthermore, you can't directly see where (in the file structure) the file is located, and context matters.? For every model, there might be one or two other files that go along with it. Andy |