EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: eev_carl on November 28, 2018, 12:48:51 pm

Title: -3dB and an LPF
Post by: eev_carl on November 28, 2018, 12:48:51 pm
Hi,

I have a simple passive LPF and was trying out the loss at fc.  I'm using the equation 20log(Vout/Vin) but wasn't getting the -3dB as I expected and was wondering if I had applied this incorrectly or was missing something like the effect of the phase shift.

My Vin peak-to-peak is 2V and Vout is 1.5V.  I get 20log(1.5/2) = -2.5dB.  The source of the formula is here: https://www.electronics-tutorials.ws/filter/filter_2.html (https://www.electronics-tutorials.ws/filter/filter_2.html) .

Thanks,
Carl

Title: Re: -3dB and an LPF
Post by: ogden on November 28, 2018, 01:16:56 pm
LTspice can do calculation for you. Easy way: make sure simulation have at least 100 sine periods (.tran 10s) and run FFT which gives signal magnitudes in dB.
Title: Re: -3dB and an LPF
Post by: aneevuser on November 28, 2018, 01:27:55 pm
Hi,

I have a simple passive LPF and was trying out the loss at fc.  I'm using the equation 20log(Vout/Vin) but wasn't getting the -3dB as I expected and was wondering if I had applied this incorrectly or was missing something like the effect of the phase shift.

Are you sure that you're measuring the 3dB point? The two signals should have a 45 degree phase shift at that frequency, and I'm not sure that your image shows that (though it could be my eyesight)
Title: Re: -3dB and an LPF
Post by: eev_carl on November 28, 2018, 01:54:52 pm
Hi,

I have a simple passive LPF and was trying out the loss at fc.  I'm using the equation 20log(Vout/Vin) but wasn't getting the -3dB as I expected and was wondering if I had applied this incorrectly or was missing something like the effect of the phase shift.

Are you sure that you're measuring the 3dB point? The two signals should have a 45 degree phase shift at that frequency, and I'm not sure that your image shows that (though it could be my eyesight)

I was measuring the ratio (1.5V/2.0V) at 159Hz which is the cutoff frequency.  I expected this to =3dB but was getting -2.5dB.
Title: Re: -3dB and an LPF
Post by: tggzzz on November 28, 2018, 01:55:35 pm
I have a simple passive LPF and was trying out the loss at fc.

You don't have a simple passive LPF, you have a simulation of a simple passive LPF.

Use the simulator's different types of analysis; in this case AC (i.e. frequency domain) simulation is enlightening.
Title: Re: -3dB and an LPF
Post by: eev_carl on November 28, 2018, 01:59:34 pm
I have a simple passive LPF and was trying out the loss at fc.

You don't have a simple passive LPF, you have a simulation of a simple passive LPF.

Use the simulator's different types of analysis; in this case AC (i.e. frequency domain) simulation is enlightening.


I also breadboarded the circuit and got a similar ratio (520mv / 700mv) for Vin/Vout.

Does this FFT analysis look correct?  I see a 0dB value at 159Hz but am not sure how this relates to the -3dB of a cutoff frequency.

Title: Re: -3dB and an LPF
Post by: mvs on November 28, 2018, 02:13:49 pm
I was measuring the ratio (1.5V/2.0V) at 159Hz which is the cutoff frequency.  I expected this to =3dB but was getting -2.5dB.
Your measurement is not correct. You have measured first positive peak, that is 0.1V higher then all others.
Title: Re: -3dB and an LPF
Post by: tggzzz on November 28, 2018, 02:39:58 pm
I have a simple passive LPF and was trying out the loss at fc.

You don't have a simple passive LPF, you have a simulation of a simple passive LPF.

Use the simulator's different types of analysis; in this case AC (i.e. frequency domain) simulation is enlightening.


I also breadboarded the circuit and got a similar ratio (520mv / 700mv) for Vin/Vout.

Does this FFT analysis look correct?  I see a 0dB value at 159Hz but am not sure how this relates to the -3dB of a cutoff frequency.

If you are using a solderless breadboard, then expect to spend more time debugging the solderless breadboard than your circuit. For alternatives, see http://bristol.hackspace.org.uk/wiki/doku.php?id=pcb#avoiding_solderless_breadboards (http://bristol.hackspace.org.uk/wiki/doku.php?id=pcb#avoiding_solderless_breadboards)

Those spikes lead me to believe your graph is a measurement rather than an analysis. Since we have no idea what you measuring, nor how, there's no point in us speculating about what the graph shows.
Title: Re: -3dB and an LPF
Post by: eev_carl on November 28, 2018, 02:42:20 pm
I was measuring the ratio (1.5V/2.0V) at 159Hz which is the cutoff frequency.  I expected this to =3dB but was getting -2.5dB.
Your measurement is not correct. You have measured first positive peak, that is 0.1V higher then all others.


Thanks.  I measured a few peaks down and found the ratio was more like 1.4/2 and that's -3.09dB.
Title: Re: -3dB and an LPF
Post by: eev_carl on November 28, 2018, 03:03:58 pm
I have a simple passive LPF and was trying out the loss at fc.

You don't have a simple passive LPF, you have a simulation of a simple passive LPF.

Use the simulator's different types of analysis; in this case AC (i.e. frequency domain) simulation is enlightening.


I also breadboarded the circuit and got a similar ratio (520mv / 700mv) for Vin/Vout.

Does this FFT analysis look correct?  I see a 0dB value at 159Hz but am not sure how this relates to the -3dB of a cutoff frequency.

If you are using a solderless breadboard, then expect to spend more time debugging the solderless breadboard than your circuit. For alternatives, see http://bristol.hackspace.org.uk/wiki/doku.php?id=pcb#avoiding_solderless_breadboards (http://bristol.hackspace.org.uk/wiki/doku.php?id=pcb#avoiding_solderless_breadboards)

Those spikes lead me to believe your graph is a measurement rather than an analysis. Since we have no idea what you measuring, nor how, there's no point in us speculating about what the graph shows.


I'm measuring gain in decibels at the cutoff frequency.  Another poster pointed out that I was looking at the first peak and that subsequent peaks were lower, bringing me to that -3dB value I was asking about.


On the breadboard side, I'm forming the ratio with different scope settings (peak-to-peak, RMS, average).  I've also tried cursors but don't see the peaks getting lower the way I did with LT Spice.  Since it's such a simple circuit, I just clipped everything together and ditched the breadboard, but I'm still getting a ratio of 1.48/2.02 (Vpp).  Is there a better scope setting to measure Vpp?
Title: Re: -3dB and an LPF
Post by: tggzzz on November 28, 2018, 03:06:48 pm
I was measuring the ratio (1.5V/2.0V) at 159Hz which is the cutoff frequency.  I expected this to =3dB but was getting -2.5dB.
Your measurement is not correct. You have measured first positive peak, that is 0.1V higher then all others.


Thanks.  I measured a few peaks down and found the ratio was more like 1.4/2 and that's -3.09dB.

Your next task is to understand why that phenomenon occurred in simulation, and whether it would also be seen in a real circuit.
Title: Re: -3dB and an LPF
Post by: tggzzz on November 28, 2018, 03:14:02 pm
I have a simple passive LPF and was trying out the loss at fc.

You don't have a simple passive LPF, you have a simulation of a simple passive LPF.

Use the simulator's different types of analysis; in this case AC (i.e. frequency domain) simulation is enlightening.


I also breadboarded the circuit and got a similar ratio (520mv / 700mv) for Vin/Vout.

Does this FFT analysis look correct?  I see a 0dB value at 159Hz but am not sure how this relates to the -3dB of a cutoff frequency.

If you are using a solderless breadboard, then expect to spend more time debugging the solderless breadboard than your circuit. For alternatives, see https://entertaininghacks.wordpress.com/2020/07/22/prototyping-circuits-easy-cheap-fast-reliable-techniques/

Those spikes lead me to believe your graph is a measurement rather than an analysis. Since we have no idea what you measuring, nor how, there's no point in us speculating about what the graph shows.


I'm measuring gain in decibels at the cutoff frequency.  Another poster pointed out that I was looking at the first peak and that subsequent peaks were lower, bringing me to that -3dB value I was asking about.


On the breadboard side, I'm forming the ratio with different scope settings (peak-to-peak, RMS, average).  I've also tried cursors but don't see the peaks getting lower the way I did with LT Spice.  Since it's such a simple circuit, I just clipped everything together and ditched the breadboard, but I'm still getting a ratio of 1.48/2.02 (Vpp).  Is there a better scope setting to measure Vpp?

You are measuring far more than "gain in decibels at the cutoff frequency" - the graph goes from 0.1Hz to 20kHz with a measurement at all those frequencies.

Now I could hazard a guess at your experimental setup (signal source, UUT, measurement tools and techniques), but that's a waste of my time.
Title: Re: -3dB and an LPF
Post by: mvs on November 28, 2018, 03:23:55 pm
On the breadboard side, I'm forming the ratio with different scope settings (peak-to-peak, RMS, average).  I've also tried cursors but don't see the peaks getting lower the way I did with LT Spice.  Since it's such a simple circuit, I just clipped everything together and ditched the breadboard, but I'm still getting a ratio of 1.48/2.02 (Vpp).  Is there a better scope setting to measure Vpp?
You may improve your measurement by selecting high resolution mode and/or selecting another V/div range. But in general scope is not a precision instrument.
Title: Re: -3dB and an LPF
Post by: eev_carl on November 28, 2018, 03:30:01 pm
Thanks all.  My components were off.  My R was actually 9.88k and C was 94.5nF.  This gave me a fc of 170Hz, not 159Hz so my function generator wasn't set correctly.  The ratio, measured as V peak-to-peak was 1.42/2.02 and this brought me to -3.06dB.
Title: Re: -3dB and an LPF
Post by: tggzzz on November 28, 2018, 03:34:43 pm
On the breadboard side, I'm forming the ratio with different scope settings (peak-to-peak, RMS, average).  I've also tried cursors but don't see the peaks getting lower the way I did with LT Spice.  Since it's such a simple circuit, I just clipped everything together and ditched the breadboard, but I'm still getting a ratio of 1.48/2.02 (Vpp).  Is there a better scope setting to measure Vpp?
You may improve your measurement by selecting high resolution mode and/or selecting another V/div range. But in general scope is not a precision instrument.

.. or rather it is a precision instrument as defined in the handbook - which is rather less precise than beginners imagine :)

A scope's prime function is to observe a signal's shape, and it does that well - within limitations.
Title: Re: -3dB and an LPF
Post by: Berni on November 28, 2018, 03:51:54 pm
Just use AC simulation instead:

https://www.youtube.com/watch?v=fziUQaVQxA4 (https://www.youtube.com/watch?v=fziUQaVQxA4)
Title: Re: -3dB and an LPF
Post by: tggzzz on November 28, 2018, 04:24:24 pm
Just use AC simulation instead:

As mentioned above :)

Plus he could give the resistor a 1% tolerance and the capacitor a 10% tolerance, and run a monte carlo analysis to see a range of possible cutoff frequencies:
(https://www.eevblog.com/forum/beginners/3db-and-an-lpf/?action=dlattach;attach=582830)
(https://www.eevblog.com/forum/beginners/3db-and-an-lpf/?action=dlattach;attach=582836)