Keyboard Shortcuts
Likes
- LTspice
- Messages
Search
Re: timestep size effect (surprising?)
¿ªÔÆÌåÓýI don't want to spread the problem all over
the list. I sent Helmut a screenshot by private email, and you
can have it too, if you want. Best wishes John Woodgate OOO-Own Opinions Only J M Woodgate and Associates Rayleigh, Essex UK On 2018-11-28 22:27, Andy
ai.egrps@... [LTspice] wrote:
? |
Re: timestep size effect (surprising?)
¿ªÔÆÌåÓýI have not said that Helmut is wrong, but if
you don't set N and simulate for longer, even with
.plotwinsize=0, you (or at least I ) get very strange results. Best wishes John Woodgate OOO-Own Opinions Only J M Woodgate and Associates Rayleigh, Essex UK On 2018-11-28 22:06, Andy
ai.egrps@... [LTspice] wrote:
? |
Re: timestep size effect (surprising?)
I meant to say, Helmut is correct about the original problem that Eamon had. It's not clear to me what's happening with John's case with 400 pulses. Narrowing the Maximum Timestep does help, somewhat.? So does tightening some of the SPICE *TOL options (reltol, trtol). I don't know what you mean about a 12uV DC offset. Andy |
Re: timestep size effect (surprising?)
Helmut is correct.? The unexpected behavior is due to LTspice's waveform viewer trying to "connect the dots" using curves, and when it does that, the trace appears to go negative. If you take the original simulation (without "plotwinsize=0") and right-click > View > Mark Data Points, you'll see that the actual data points don't go negative (*).? But the curve LTspice draws between the dots does swing negative.? Note that LTspice doesn't use a linear interpolation between points.? It uses curves.? If it used only linear interpolation, it would have avoided the problem of swinging negative, but it makes things look somewhat "ragged" so the curves are preferred. (*)? Actually, one of the savedpoints did go negative, just a little, but I think that is another artifact of LTspice's waveform compression algorithm.? LTspice does not only discard waveform points it doesn't need, it apparently also modifies the values that it stores at the points that it keeps.? This was news to me. Regards, Andy |
Re: 74hc_v.lib file
Hi Andy,
toggle quoted message
Show quoted text
Thanks again. I think I did that so far on the mc34072 and it worked. Best regards, Eric Sent from my Huawei Mobile -------- Original Message -------- Subject: Re: [LTspice] 74hc_v.lib file From: "Andy ai.egrps@... [LTspice]" To: "[LTspice] group" CC: ? |
Re: 74hc_v.lib file
Eric wrote: ? ? "I'm not sure how the symbols on the sym directory will be able to locate their matching?? ? ? ?.lib models in the sub directory." By filename.? If a symbol is supposed to automatically include a model file, it does that by having the filename in one of its attributes.? As long as a file with that filename exists in either the lib\sub directory, or in the directory that has your schematic, then LTspice loads it. To see a symbol's attributes, open the symbol file in LTspice and press Ctrl-A. Regards, Andy |
Re: schematic erorr download from internet
goy123t wrote, "anybody can explain to me?what's it?" It's an LTspice schematic!? That is what the schematic's file actually looks like. You just opened it in the wrong program (a text editor instead of LTspice).? As John says, that probably happened because it got downloaded with a ".txt" filename extension added to it.? So, rename it to get rid of the .txt.? If you can't see the .txt, then you must have your Windows set up to "Hide extensions for known file types", which is a really BAD (in my opinion) Windows setting. Regards, Andy |
Re: fft of sine wave
goy123t, your waveform was not very sinusoidal, so it was no surprise that the FFT came out badly.? Always use a whole integer number of cycles. Imagine doing this:? Take your simulated waveform, and glue the end of the waveform and ithe beginning of the waveform to each other.? That's the thing that the FFT effectively operates on.? If you splice your original waveform like that, you wouldn't get a sine wave. Please see the FFT example in LTspice's Help: ? ? Help: Waveform Viewer > Waveform Arithmetic Notice the use of ".options plotwinsize=0" which you should ALWAYS have when preparing to do an FFT. Using .options numdgt=15 is "icing on the cake" and not normally needed. Total time (= Stop time - Time to start saving data) should always be a whole number of cycles of your signal.? I recommend starting with about 10 whole cycles.? 1 is bare minimum but not very satisfactory in the FFT display.? 100 cycles is OK but you be the judge on that.? If two or more signals are present, find a time interval that works for both frequencies, which is also related to the difference in frequencies. Time_step is best being "as small as possible."? Ideally, waveforms would be continuous, so the closer together the time points are, the better.? But very small time_step makes the simulation run slowly.? There's your main trade-off.? And always combine it with ".options plotwinsize=0" so that you aren't throwing away most of those time steps. Number of samples?? Which one do you mean? If it's "Number of data point samples in time", experiment with that.? More samples gives you an FFT that goes up higher in frequency, but it might be meaningless data at that end of the spectrum.? When the time interval between those "data point samples in time" becomes smaller than the simulated time_step, then the FFT is just interpolating between the available data, which is not real. If it's "Number of points" of Binomial Smoothing, I usually change that to 1.? This setting does a bit of smoothing before calculating the FFT.? If your waveforms are noisy, then bigger numbers may help; but it causes the high frequency end of the FFT to fall off more. ? ? "third question : if fft used the values from transient analysis, the time step in tran. analysis effect result of fft and how?" I think this was already answered.? The smaller the time_step, the more continuous the data is, that gets sent to the FFT.? There is no waveform data between time_steps, so the FFT has to guess what the waveform would have been, between those time_steps.? Smaller time_steps means the guesses are probably more accurate because they are closer to the actual simulated points in time. So, the time_step will mainly affect the harmonics at higher frequencyes; but not the fundamental. Regards, Andy |
Re: timestep size effect (surprising?)
Hello John, I think the simulation is precise. The measured average value is 20.182uV whereas the ideal value would be 20uV. The pulsewidth is effectively 2fs due to its 1fs rise time, 1fs wdth and 1fs fall time. When I force the timestep to 1n, the average will be 20.032us which is very close to 20uV. .tran 0 50u 0 1n .options plotwinsize=0 Best regards, Helmut ---In LTspice@..., <jmw@...> wrote : I still see very odd behaviour of the voltage
across C? with 400 cycles and 50 ?s simulation time. But the
attenuation of these very short pulses is huge (1 kV down to 20
?V), so are there 'rounding errors'? The 12 ?V DC offset is
notable. Best wishes John Woodgate OOO-Own Opinions Only J M Woodgate and Associates Rayleigh, Essex UK On 2018-11-28 19:17,
helmutsennewald@... [LTspice] wrote: ? |
Re: timestep size effect (surprising?)
¿ªÔÆÌåÓýI still see very odd behaviour of the voltage
across C? with 400 cycles and 50 ?s simulation time. But the
attenuation of these very short pulses is huge (1 kV down to 20
?V), so are there 'rounding errors'? The 12 ?V DC offset is
notable. Best wishes John Woodgate OOO-Own Opinions Only J M Woodgate and Associates Rayleigh, Essex UK On 2018-11-28 19:17,
helmutsennewald@... [LTspice] wrote:
? |
Re: encapsulating a long set of spice directives
Steph, you probably know this already, but I'll mention it anyway, just in case. The long list of .PARAM statements can also be shortened by combining multiple parameter assignments into the same line. Of course you lose the ability to document each one with a comment.? And it makes them generally less readable. Regards, Andy |
Re: Is it possible to dynamically change a part's location in one simulation ?
LTspice has a limited ability to .STEP through different models for the same part.? But it's somewhat risky. You can use .STEP to change a transistor's (or diode's) .MODEL, if you define those .MODELs with numeric names: ? ? .MODEL 1 NPN (...) ? ? .MODEL 2 NPN (...) and so on. The same thing SOMETIMES works for subcircuits too, if you're careful, using numeric subcircuit names.? However, if the subcircuits differ in a substantial way, then it fails, without warning.? I believe the problem is that LTspice reserves memory for the network's matrix once, and uses the same memory space for all .STEPped runs.? So if the subcircuits use a different amount of memory, or structure it differently, LTspice may end up walking all over its own memory and it corrupts the data. I think it is much safer to either run consecutive simulations (each with their own schematic or netlist), or combine circuits into the same schematic.? You make it sound like combining circuits is very inefficient.? Often it is not.? Don't dismiss it if it may work. Regards, Andy |
Re: timestep size effect (surprising?)
Hello Eamon, LTspice use data compression by default to reduce the size of the output file (.raw). This makes sense for the simulation of DC/DC converters. One should turn off data compression for analog simulations. See the SPICE-directive below. Now the simulation looks OK. .options plotwinsize=0 Best regards, Helmut |
Re: 74hc_v.lib file
Hi Bordodynov, Thank you for your instructions. I think I'm still not up to speed right now on these kinds of operation. I was able to locate the ZZZ files and just added it to the sym directory of my LTspice XVII. So I could see all the symbols that is in there. I also added the .lib files to my LTspice XVII sub directory.? I'm not sure how the symbols on the sym directory will be able to locate their matching?? .lib models in the sub directory. So far what I have done for symbol mc34072 is to add MC34071.lib to the model file attributes and it works. I still have to chew a lot to be able to digest what is? in front of me. I'll just take on the parts that are of interest to me one piece at time and see how it goes. And I wouldn't want to bother you any further but may ask for future help.again. Thanks and best regards, Eric On Wed, Nov 28, 2018 at 1:23 AM §¡§Ý§Ö§Ü§ã§Ñ§ß§Õ§â §¢§à§â§Õ§à§Õ§í§ß§à§Ó BordodunovAlex@... [LTspice] <LTspice@...> wrote:
|
Re: schematic erorr download from internet
¿ªÔÆÌåÓýThat's because it has had a .TXT extension
added in error, possibly by your browser, like: foobar.asc.txt.?
Don't try to open it directly from the web site. Save it and
then open it in LTspice. Of course, if the real filename is
foobar.net.txt, it really is a netlist, not a schematic. Best wishes John Woodgate OOO-Own Opinions Only J M Woodgate and Associates Rayleigh, Essex UK On 2018-11-28 16:30, goy123t@...
[LTspice] wrote:
? |
timestep size effect (surprising?)
Could someone please have a look at the extremely simple simulation I?uploaded as "pulse charge accumulation.asc" and tell me what you think. It's a transient analysis of a positive pulse voltage source followed by an RC filter. The notable oddity is that in the aftermath of the 10 (very short) pulses, the capacitor voltage shows a few more inflection points than I would expect, and actually goes negative for a little bit of time.? The issue goes away when I make the pulses wider, or when I set the max timestep to 100pS, but I really wonder why the simulator has problems with an RC discharge. (If the problem is that the timestep is too large, why would this be brought on by simulating extremely FAST pulses?) Best regards, Eamon |
schematic erorr download from internet
hi sometimes when in site i search i see some link to schematic in ltspice, but when i download? it seems like: ersion 4 SHEET 1 1224 680 WIRE 176 -64 0 -64 WIRE 304 -64 176 -64 WIRE 512 -64 384 -64 WIRE 0 -16 0 -64 WIRE 176 -16 176 -64 WIRE 0 112 0 48 WIRE 0 112 -176 112 WIRE -176 160 -176 112 WIRE -176 304 -176 240 WIRE 176 304 176 48 WIRE 176 304 -176 304 WIRE 0 368 0 112 WIRE 176 368 176 304 WIRE 0 496 0 432 WIRE 176 496 176 432 WIRE 176 496 0 496 WIRE 256 496 176 496 WIRE 512 496 512 -64 WIRE 512 496 256 496 WIRE 256 528 256 496 FLAG 256 528 0 SYMBOL current 304 -64 R270 WINDOW 0 32 40 VTop 2 WINDOW 3 -32 40 VBottom 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName I1 SYMATTR Value PWL file=Quasi.txt SYMBOL voltage -176 144 R0 WINDOW 123 0 0 Left 2 WINDOW 39 24 124 Left 2 SYMATTR SpiceLine Rser=0.05 SYMATTR InstName V1 SYMATTR Value SINE(0 325.2 50) SYMBOL diode 16 48 R180 WINDOW 0 24 64 Left 2 WINDOW 3 24 0 Left 2 SYMATTR InstName D2 SYMATTR Value MUR460 SYMBOL diode 192 48 R180 ?anybody can explain to me?what's it? thanks a lot. |