¿ªÔÆÌåÓý

Date

Re: Good settings for RIAA square wave

 

On Fri, Mar 28, 2025 at 12:32 PM, Carlos E. Mart¨ªnez wrote:
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?
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:
On Thu, Mar 27, 2025 at 12:16 PM, Jim Wagner wrote:
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. ?
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: Model of BF970 ?

 

Thank you.
?
On Fri, Mar 28, 2025 at 09:05 AM, §¡§Ý§Ö§Ü§ã§Ñ§ß§Õ§â §¢§à§â§Õ§à§Õ§í§ß§à§Ó wrote:

See
* BF970 PNP model


Re: Model of BF970 ?

 

See
* BF970 PNP model
* created using Parts release 6.3a on 09/06/96 at 10:34
* Parts is a MicroSim product.
.MODEL BF970 PNP
+ IS=10.000E-15
+ BF=50
+ VAF=100
+ IKF=10.000E-3
+ VAR=100
+ IKR=10.000E-3
+ CJE=2.0000E-12
+ CJC=2.0000E-12
+ TF=134.28E-12
+ XTF=10
+ VTF=10
+ ITF=1
+ TR=10.000E-9


Re: FFT spectrum calculation algorithm ?

 

On Thu, Mar 27, 2025 at 12:16 PM, Jim Wagner wrote:
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. ?
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:
My question is: Why inductance value didn't respect the table ?
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
?


Model of BF970 ?

 

BF970 is an PNP transistor for UHF band (fT=1000 MHz) from Vishay.

I visited Vishay site but there was no sign of BF970 (very old).

I hope its spice model exists somewhere or of equivalent UHF PNP transistor.

Thank you.


Re: Singular matrix

 

¿ªÔÆÌåÓý

On 27/03/2025 18:24, pilou via groups.io wrote:
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 :)
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

On 03/27/2025 1:00 AM PDT ericsson.sunshine via groups.io <ericsson.sunshine@...> wrote:
?
?
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: 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.

Go to the web page: /g/LTspice/topics. Click on Files in the list on the left. Then click on Temp. Then click on New Upload in the blue box at top left. Click on Upload File in the drop-down menu. Then send a message to tell us that you did that.

On 2025-03-27 14:14, Tintari Dumitru via groups.io wrote:
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?
this is how inductance need to be changed with bias current.
?
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 ?
?
?
?
?
?
?
?
--
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

Virus-free.


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 ?

 

Of course you know this, but the FFT of a short segment Tx of a signal assumes that the segment repeats with period Tx.
There are special algorithms that give 'useful' output in such cases (e.g. SFFT for sound processing).

-marcel


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:

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.

--
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

Virus-free.


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:
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.
--
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

Virus-free.


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:

On Wed, Mar 26, 2025 at 04:46 AM, <ericsson.sunshine@...> wrote:
It looks like, different modeling topology of OPA will maybe show different behavior.
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
?