Keyboard Shortcuts
Likes
- LTspice
- Messages
Search
Re: Good settings for RIAA square wave
On Fri, Mar 28, 2025 at 12:32 PM, Carlos E. Mart¨ªnez wrote:
Un, what are you asking?? ?
What is an "RIAA square wave"?
?
What is your PULSE waveform intended for?? That should lead you in the direction of answering your own question.
?
We can not read your mind.? I have no idea whether your PULSE waveform is "fine" or not.
?
However, here is one little point about it:? Your "square wave" is not a square wave.? I am not referring to the fact that the rising and falling edges aren't instantaneous, which is of course impossible.? I refer to the fact that it does not have a 50% duty cycle.? The pulse is high for 25.01 microseconds, and low for 24.99 microseconds.? To correct that, change the "Ton" time to 24.99 us, which is 25 us minus your 10 ns rise and fall time.? Then it will be symmetrical, 50% high and 50% low.
?
Also, do you really need to limit the PULSE train to only 10 cycles?? If you don't want to limit the number of cycles, leave that field (Ncycles) blank.
?
Andy
? |
Good settings for RIAA square wave
Hi,
?
This should be the first time I will be using a SW to test a RIAA preamp response.
?
I was thinking of copying the settings I use for testing power amps, but I am not sure it's correct.
?
They are: PULSE(-.4 .4 0 10n 10n 25u 50u 10)
?
Would they be fine for this new test?
?
Thanks!
?
Carlos |
Re: Inductance modeling using table issue.
FYI -
?
I replicated your table() function by copy-and-paste, and it works correctly, as far as I can see.
?
So if a problem remains, it is not in the table() function; it must be something else in your circuit.
?
The odd behavior you mentioned versus time suggests that you might not have used a proper behavioral inductor.? Doing it wrongly leads to wrong results.
?
Andy |
Re: FFT spectrum calculation algorithm ?
Because?the series of sidebands extend infinitely, a radio receiver will truncate the sidebands that?extend beyond its bandwidth. An interesting consequence of this is that the demodulated signal will be distorted. Perhaps not greatly distorted because the sidebands quickly grow smaller. I have long speculated that the way that narrow band FM sounds is due to this distortion. A few years ago I wrote?some matlab code that allows one to observe this distortion. Gavrik On Thu, Mar 27, 2025 at 9:37?PM Andy I via <AI.egrps+io=[email protected]> wrote:
|
Re: Model of BF970 ?
Thank you.
?
On Fri, Mar 28, 2025 at 09:05 AM, §¡§Ý§Ö§Ü§ã§Ñ§ß§Õ§â §¢§à§â§Õ§à§Õ§í§ß§à§Ó wrote:
|
Re: FFT spectrum calculation algorithm ?
On Thu, Mar 27, 2025 at 12:16 PM, Jim Wagner wrote:
Indeed, if the frequency is always changing, you won't get a clean FFT and interpretation could be challenging.? I suppose you could try the FFT of only one cycle, or as few cycles as possible, to minimize the amount of frequency change over that interval.? If the frequency were linearly changing and you sampled a portion of that for the FFT, the FFT would show the spectrum of a signal having a sharp sawtooth FM modulation (where it ramps up or down and then instantly switches back down or up, and repeats), and its spectrum could be quite messy.? ?Even using it to find harmonic levels would be challenging because the spectrum at each harmonic spreads out, forcing you to add up the components in several frequency "bins" to tell what is the amplitude of each harmonic. ?
The spectrum of an FM radio signal is actually interesting in the limited case where the modulation signal is a single frequency sine wave.? Then you have a series of sidebands, extending infinitely far in both directions away from the carrier frequency.? LTspice's FFT is very good at showing that, when set up correctly.? But that works only for a single frequency sine wave for modulation.? Just about anything else turns it into a mess of sidebands.? A signal with any kind of frequency modulation actually resolves to a band of discrete frequencies, which do not necessarily match the amount of FM deviation.? That's why FM signals occupy more bandwidth than twice the deviation.
?
Andy
? |
Re: Inductance modeling using table issue.
On Thu, Mar 27, 2025 at 10:43 AM, Tintari Dumitru wrote:
Since you did not upload a schematic, it is really hard to tell.
?
It is possible that your line with the table is too long.? Did you enter the line (the one starting with B1) as a SPICE Directive (SPICE Netlist)?? Or was it a Bv-symbol with the table's data entered in the Value, Value2, SpiceLine, and SpiceLine2 lines?? I am aware of (I think) a 255 character limit when going from LTspice symbols to Netlist code, which is caused by a Microsoft Windows limit.
?
If the line was in Netlist code or SPICE Directive, was there any line-wrap in the editor you used?
?
Can you diagnose the circuit yourself?? Does the B-source correctly map the input current I(V2) to the voltage V(tb)?
?
Did you correctly implement the behavioral inductance with the FLUX=... formula?? How did you determine the effective inductance as a function of time?? (I'm assuming from your question that this was not an .AC simulation.)
?
Andy
?
|
Re: Singular matrix
¿ªÔÆÌåÓýOn 27/03/2025 18:24, pilou via
groups.io wrote:
The clue was that LTspice always failed to find the initial solution, i.e. the matrix state at time=0, rather than failure mid-way through the analysis, which is what happens in some problems. From the point of view of this schematic, the difference is that with the "startup" switch, all DC voltage sources start at 0 and ramp up over the initial 20¦Ìs just like a real power supply (well, much faster, really), whereas if you use a "virtual" startup condition by using a pulse specification, you can do this one DC source at a time. Obviously, "startup" is much simpler to do. I don't know where the exact problem was, since you say that all parts tested OK on their own. Sometimes the solution to a problem is more important than a complete understanding of the problem itself.? ;-) -- Regards, Tony |
Re: Singular matrix
Hello Tony,
I hope you're doing well ?
Thanks you so much for your help, indeed it works on my side too with "startup" option.
How did you find that ? It's almost magic for me :)
However, I didn't try yet with PULSE(0 13 0 100u 0 1 2 1)
I tried with another PTC model and it does the "singular matrix" error again.
But it was worth a try !
Thanks you so much, I keep on :) |
Re: FFT spectrum calculation algorithm ?
If the frequency constantly changes (so that no cycle of the signal is the same as the cycle before or after), then the FFT will NOT show discrete frequencies. ?At best it will be difficult to interpret. ?It will be very much like the spectrum of an FM radio signal. ?
?
Jim
|
Re: Inductance modeling using table issue.
¿ªÔÆÌåÓýNone of your links (blobs???) work. They all
return 404 - Page not found. ?Upload your .ASC file AND all the other files
required to run the simulation, but not .RAW? and .LOG files or
pictures,? in a ZIP archive to Files => Temp. On 2025-03-27 14:14, Tintari Dumitru
via groups.io wrote:
--
OOO - Own Opinions only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Inductance modeling using table issue.
Hi!
I try to model an inductor using table.
When i simulate this inductor, inductance value initially is changed according to the table that i include, but close to end off table inductance value didn't respect value from table. I try to change simulation time, and this make a negative effect on inductance (i don't know why!). Can someone help me with this? blob:/29cb438c-88fc-4eab-81d2-06d860dc8640 this is how inductance need to be changed with bias current.
blob:/906f8161-46e1-4558-a50a-630d24f881b5? ? ?-- Circuit blob:/c5224e18-4379-40dd-b2de-90c8572811c4? ?-- Simulation result
?
Text in InductorTable.txt:
B1 tb 0 V = Table(I(V2), -70, 30u, -50.24, 30u, -49.75, 32u, -48.48, 37u, -46.35, 42u, -43.83, 45u, -41.60, 50u, -39.46, 57u, -37.51, 63u, -35.57, 69u, -33.52, 79u, -31.57, 86u, -29.52, 96u, ?-27.67, 107u, -26.10, 119u, -24.54, 127u, -23.26, 138u, -21.79, 149u, -20.13, 162u, -18.95, 173u, -17.67, 184u, -16.69, 195u, -15.50, 208u, -14.13, 222u, -12.94, 237u, ?-11.76, 250u, -10.67, 263u, -9.39, 276u, -8.20, 292u, -7.02, 305u, -6.13, 318u, -5.04, 330u, -3.86, 344u, -2.88, 351u, -1.80, 357u, -0.83, 362u, 0, 364u, 0.83, 362u, 1.80, 357u, 2.88, 351u, 3.86, 344u, 5.04, 330u, 6.13, 318u, ?7.02, 305u, 8.20, 292u, 9.39, 276u, 10.67, 263u, 11.76, 250u, 12.94, 237u, 14.13, 222u, 15.50, 208u, 16.69, 195u, 17.67, 184u, 18.95, 173u, 20.13, 162u, 21.79, 149u, 23.26, 138u, 24.54, 127u, 26.10, 119u, 27.67, 107u, 29.52, 96u, 31.57, 86u, 33.52, 79u, 35.57, 69u, 37.51, 63u, 39.46, 57u, 41.60, 50u, 43.83, 45u, 46.35, 42u, 48.48, 37u, 49.75, 32u, 50.24, 30u, 70, 30u) My question is: Why inductance value didn't respect the table ?
Thanks for your help ? ?
?
?
?
?
?
? |
Re: FFT spectrum calculation algorithm ?
Always remember that whatever time interval you choose, if the "ends" don't meet, it compromises the FFT.? In other words, MUST have an exact whole number of cycles, or FFT suffers.
?
Also, if the frequency varies, it needs to be stabilized and unvarying over the time interval used for the FFT.? Choose each of your time intervals carefully.
?
In cases like this, applying a Window might help.
?
Sndy |
Re: FFT spectrum calculation algorithm ?
Hi, John:
?
I didn't see it in the help, but I saw it in the pop-up menu when doing FFT.
?
I upload the screenshot of this pop-up menu.
?
?
Thank you very much.
Best regards.
?
On Thu, Mar 27, 2025 at 04:15 PM, John Woodgate wrote:
|
Re: FFT spectrum calculation algorithm ?
¿ªÔÆÌåÓýYes. Look at the Help for Waveform Arithmetic.
At the end you can see an FFT set-up pane that allows start and
end times for the FFT to be set up. On 2025-03-27 08:00, ericsson.sunshine
via groups.io wrote:
--
OOO - Own Opinions only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
FFT spectrum calculation algorithm ?
Hi, :
?
May I ask about FFT feature ?
?
If in a waveform viewer, I want to do FFT analysis of a chosen node, which may has multiple frequency components varying during whole simulation time interval.
Can it be done to separate the whole simulation time into several intervals by eg: zoom-in feature, then run the FFT feature only for the "zoom-in"ed waveform data, to see what's the freq component in these data ?
I say so, because, some applications , eg: OFDM modulation, may have the multiple freq components in modulated signal, and may vary the amplitude depending on transmitted data in different time interval.
?
It helps to analyze if FFT could do analyzing of separated time interval in a single waveform.
?
Is this feature supported ?
?
Thank you very much.
Best regards. |
Re: Sawtooth waveform by simple BJTs, but dips at the top.
Hi, Andy:
?
Your suggestions are absolutely correct!
?
I just tried,?
1. Modify the PWL's Trise = 1u (from 10n), Tfall = 1u (from 10n), the peaks are eliminated.
2. modify R1 = 5.1K, C1=10nf with unchanged Trise, Tfall, the V(vout) has no peaks phenomemon ,too.
?
Both works . Heil ! Viva! Banzai! Hooray! Live Looooooooong!
?
Wish you happy & good healthy!
Best regards.
?
On Thu, Mar 27, 2025 at 09:48 AM, Andy I wrote:
|