Keyboard Shortcuts
Likes
- LTspice
- Messages
Search
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:
|
Re: Sawtooth waveform by simple BJTs, but dips at the top.
Hi, Andy:
?
Sorry, forgot it.
?
May I ask, how old are you ? |
Re: Sawtooth waveform by simple BJTs, but dips at the top.
Hi, Andy:
?
Thank you for the reply.
At the first, the purpose is to seek a good C/P solution, to generate a varying, mostly sawtooth or triangle waveform and inject it into some Vref pin of PWM IC.
The Vref which I think, is utilized for the internal reference voltage of comparators of the IC. Thus to give the varying frequency of PWM in a fixed frequency designed IC.
?
So, the instant change of frequency means, the duty cycle or period will significantly vary , if consider the load, mostly inductance loading, this peak , I think , normally, would be likely avoided.
?
And, while talking about the good choice of C/P, I think the more choices considered , the better solutions should come out.
?
Thank you very much for the helpful opinions.
?
Best regards.
?
On Thu, Mar 27, 2025 at 07:06 AM, Andy I wrote:
|
Re: Sawtooth waveform by simple BJTs, but dips at the top.
On Wed, Mar 26, 2025 at 04:46 AM, <ericsson.sunshine@...> wrote:
Quite probably not. ?
Let's consider what makes these two integrators different.? ?I'm talking about U1 = LT1220 in "Lab 4 Integrator Square 500us with PWL.asc", versus U1 = MCP6001 in "triangle_gear.asc".
?
In the first case, the square wave comes from a PWL voltage source with Tr = Tf = 10 ns.? In the second case, the square wave comes from a saturated op-amp comparator, with Tr = Tf = 7.7 us, nearly 1000 times slower.? One sends a 10 ns, 10 mA (1 MegAmp/us) current step to the integrator.? The second sends a 7.7 us, 10 uA (0.0000013 MegAmp/us) current step to its integrator.? That is 770 times slower and 1000 times smaller amplitude, or nearly 1,000,000 times smaller di/dt.? The slower speed gives the op-amp more chance to respond and recover.? If you plot the second integrator's d(V(tri_1)), you can see a combination of BOTH a ramp in its dv/dt (causing the peak to round), and smaller glitches at the start and end of the square wave's edges.? It is a mixture of effects.
?
It should also be noted that the two circuits employ vastly different op-amps.? One uses a high-speed op-amp with 45 MHz GBP and SR = 250 V/us, and the other is a low-power op-amp with 1 MHz GBP and SR = 0.6 V/us.? It's like apples and oranges.? They do not compare well.
?
I think it is likely that "different modeling topology" of the op-amps is not related to the different behaviors of the two circuits.
?
Andy
? |