I also just realized that the dB = 20log(Ratio) formula makes no sense since
dB = 10log(Ratio) should always hold true. It seems that it's supposed to be
dB_power = 20log(Amplitude Ratio)
and is used to figure to convert the Amplitude Ratio into a Power dB rating, not an equivelant dB rating of the amplitude
while
dBx = 10log(ratio of x)
is the regular one that actually converts a ratio of something into it's equivelant decibel rating.
Bleh! Must have missed this the entire time I was at the U.
I do think of it as a ratio, but the fact that MATLAB interprets them differently in the same field is confusing (all the numbers in "linear" being ratios relative to the normalized signal level). It would help a lot if MATLAB used dB_ for that. It would help if everybody used dB_ instead of just dB.
If I have a filter, and inject audio at a level of 10dBu and the filter outputs 5dBu, my filter gain is -5dB. I specify it as a ratio; I wouldn't say my filter have a gain of -5dBu : which is 0.436V; now that is meaningless, especially if I change my input level.It would help a lot if MATLAB used dB_ for that. It would help if everybody used dB_ instead of just dB.
That's exactly my point You said so yourself - the LHS ratio represents output:input power while the RHS ratio represents the output:input amplitude.Because power is proportional to amplitude (A) squared, the above can be applied to the dB formula:
10*log10(A^2) = 10*log10(A) + 10*log10(A) = 20*log10(A)
For example, I have a 1 ohm resistor passing 2 amps. It has 2 volts across it, and is dissipating 4 watts. Now if I increase the current to 4 amps, what is the ratio of the new : old values in dB?
The resistors passes 4 amps, has 4 volts across it and dissipates 16 watts.
ratio amps (dB): 20*log10(4 / 2) = 6.02 dB
ratio volts (dB): 20*log10(4 / 2) = 6.02 dB
ratio power (dB): 10*log10(16 / 4) = 6.02 dB
Note that the reference is the old value in each case.
dB and linear are only the same information if you are talking about the same physical quantity. As shown above, theI don't understandwhat you mean. You were talking about signals passing through filters right? The filter response is specified as the ratio between the filter output and it's input; either linear or dB: it's the same info. Both the linear and dB scales for the filters are referenced to 1: i.e. no change between the input signal amplitude at the filter output signal amplitude. The linear scale is the ratio out/in, while the dB scale is the logarithm of that same ratio.
If I have a filter, and inject audio at a level of 10dBu and the filter outputs 5dBu, my filter gain is -5dB. I specify it as a ratio; I wouldn't say my filter have a gain of -5dBu : which is 0.436V; now that is meaningless, especially if I change my input level.
No, if the units were different, the LHS and RHS would not be equal.You said so yourself.
dB = 20log10(A)
has different units on the LHS than the RHS and that makes a difference.
No, for working out the dB representation of a ratio of powers, use 10*log10(ratio of powers). For working out the dB representation of the ratio of amplitudes or intensities etc., use 20*log10(ratio of amplitudes).Is that a typo above?Instead they would be:
ratio power(dB): 20*log10(4A/ 2A) = 6.02 dB_power
ratio power(dB): 20*log10(4V / 2V) = 6.02 dB_power
ratio power (dB): 10*log10(16W / 4W) = 6 dB_power
and by extension these equations:
ratio power(dB): 10*log10(4W / 2W) = 3 dB_power
ratio amps (dB): 10*log10(4A / 2A) = 3 dB_amperage
ratio voltage (dB): 10*log10(4V / 2V) = 3 dB_voltage
Not sure what this means. log10 is the defined transform for dB.Since you are using base 10 for the logarithm, the factor must be 10 or else the LHS and RHS when converted to the linear scale won't scale linearily (the LHS would scale linearily to the squared of the RHS if dB = 20log10(A) is used).
yes.dB and linear are only the same information if you are talking about the same physical quantity.
Can you give an example of the MATLAB function you're using, I'll have a look to see if I've got any idea what's going on. It might have something to do with the low order of the filter.As shown above, the MATLAB is changing the interpretation of the units when you change the scale between linear and dB. When specifying the passband ripple and stopband attenuation, MATLAB FilterBuilder is using power output-to-input when dB scale is used and ampiltude output:input when linear scale are used. It only indicates that it is changing the scale, not the units themselves.
For example, MATLAB always graphs the magnitude response of the POWER of the filter in dB. So if I enter -6dB stopband attenuation, then it will graph a stopband of 6dB. But if I enter 0.5 for the stopband attenuation, instead of graphing the stopband as the expected -3dB (which represents 50% power attenuation) it graphs -6dB (which represents the 25% power attenuation that would result from 50% amplitude attenuation). This means that for dB, it is taking the stopband value as power attenuation, but for linear units it is taking the stopband value as amplitude attenation. It does the same thing for passband ripple.
If it said dB_power or dB_amplitude, then there would be no mistake as to the change in physical quantities that the ratio represents between the LHS and RHS of the dB equation (whether a factor 10 or 20 is used).
No, for -5dB the output is 56.2% of the input. ( i.e. 10^(-5/20) = 0.562 )0.436V is indeed useless, but you could say that the output would be 4.36% of the input on a linear scale.
I am just using the FilterBuilder in MATLAB. Just type in "filterbuilder" into MATLAB and it launches.Can you give an example of the MATLAB function you're using, I'll have a look to see if I've got any idea what's going on. It might have something to do with the low order of the filter.
I'm not talking about units. THe untis are already different since they cancel out on the RHS and since dB is a relative change that is unit-less. I am talking about the physical quantity that the linear ratio represents, and the phsyical quantity that the dB represents.No, if the units were different, the LHS and RHS would not be equal.
No, for working out the dB representation of a ratio of powers, use 10*log10(ratio of powers). For working out the dB representation of the ratio of amplitudes or intensities etc., use 20*log10(ratio of amplitudes).Is that a typo above?
Right here you suddenly relate the amplitude and power when converting from linear to dB. If I wanted to associate a amplitude increase on the linear scale with it's corresponding power increase on the dB scale, then the 20log10(A) would make sense, since power is proportional to the amplitude squared. But I didn't ask for the power increase in dB that would result from an increase in amplitude on the linear scale. I asked for a conversion between the amplitude increase on the linear scale to the amplitude increase on the dB scale. And amplitude is proportional to amplitude, not the squared.Because power is proportional to amplitude (A) squared, the above can be applied to the dB formula:
10*log10(A^2) = 10*log10(A) + 10*log10(A) = 20*log10(A)
Sorry, I can't, I only have an old version of MATLAB. When you enter your values for passband ripple and stopband attenuation, they should be positive units; e.g. for a stopband 6dB below the passband, enter 6 for the stopband attenuation, not -6. You may be doing that already.I am just using the FilterBuilder in MATLAB. Just type in "filterbuilder" into MATLAB and it launches.
then why were you talking about units:I'm not talking about units.
has different units on the LHS than the RHS and that makes a difference.
Yes, dB is unitless. As I said before, dB and linear scales are representing the same information (i.e. ratios or gains).THe untis are already different since they cancel out on the RHS and since dB is a relative change that is unit-less. I am talking about the physical quantity that the linear ratio represents, and the phsyical quantity that the dB represents.
No. +20dB is always a 10x increase in amplitude; irrespective of whether we calculated our dB scale from power or amplitude. +20dB is a 100x increase in power. Likewise +10dB is always is a 3.16x increase in amplitude. +10dB is a 10x increase in power.For example, if I had a x10 increase in amplitude and I wanted to find out how much this would cause the power to increase in dB, then I would use the 20log10(A), and the +20dB would represent be the change in POWER (not the change in amplitude).
No. For a 10x increase in amplitude in dB, it's 20log10(10)=20. For a 10x increase in power in dB, it's 10log10(10)=10.But it I just wanted to find out how much this x10 increase in amplitude would be on the dB scale, I would use 10log10(A) and work out to be +10dB change in amplitude. Just like if I had a x10 increase in power and wanted to find the dB change in power.
Read above re what has been stated re +10dB, +20dB.DOes it not strike you as inconsistent in that every x10 increase in power is a +10dB increase in power, but every x10 increase in amplitude is a +20dB increase in amplitude?
Hmm, whoever wrote the wikipedia page seems to agree with what I'm saying about 10log(A) being a conversion from linear to dB scale, while 20log(A) converts between amplitude gain on the linear scale to power gain on the dB scale.
Decibel - Wikipedia, the free encyclopedia
This is the first I've ever seen anything else like that.
You would do well to read and understand the words at that link you posted.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?