Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Decade to Octave Conversion

Status
Not open for further replies.

dknguyen

Well-Known Member
Most Helpful Member
Filter-wise...Does anyone know how to convert a slope of dB/decade to dB/octave?

Another thing that just occured to me, I always just took for granted than 3dB represented doubling the power and that 6dB was doubling the amplitude. But it seems this is incorrect. Just like power, a 3dB increase in amplitude still respresents a doubling of the amplitude. However, a 3dB increase (x2) in amplitude results in a 6dB increase (x4) in power.

If you are interested in power, that's great and all. But as far as many filters go, aren't we often more interested in the amplitude rather than the power? For example, you might say "if the frequency doubles I want the amplitude to drop by half". You don't say "I want the power in the signal to drop by half." So why does it seem that we seem to speak power-wise for such situations? For example, the cutoff frequency is defined as the -3dB point for POWER...not amplitude. Why was it defined in terms of power rather than amplitude (rather than 0.707% of the original amplitide, or half the original amplitude?) Wouldn't have that been more useful/practical?

I'm starting to see why the one forum member finds decibels to be too vague (was it Duffy?)...or rather people are too vague when using it. I've edited this post about 12 times so far because I thought I found an answer to something and put it in the post which raised another question, but it turns out to be wrong so I removed it.
 
Last edited:
32 db/dec = 2.84 db/oct

Take the logs of 32 and 10, and of 2.84 and 2. Solve for the ratio in the general case.
 
Hi there,


History dictates many practices like this. Radio and audio came before
general signal processing so the practice was to find the 3db point
because in those arenas power means everything. This is still the
case until you move to different applications such as signal measurement.
This in no way means you shouldnt allow yourself to think in other
terms, in fact it's a good example of how you should not allow everything
in the past to force you to do things one way and one way only, and
that sometimes it is a very good idea to deviate from the norm.
You only have to remember that much literature is based on certain
standards and practices and that when you read someone elses
work you have to be aware of these standards.

Note that we could also ask the question why is the mile defined to
be such an unusual number of feet? Why not 5000 exactly, which
would make conversion so much easier. History doomed us to work
with unusual quantities in some cases and that's just the way things
evolved. Free free to vary as long as you remember where you are
going and how to get back.
 
Yeah, like MATLAB's filter builder is a bit vague too. The magnitude response chart graphs power. If you select "dB" for the specifications then that's dB for power so it translates diretly to the graph. But if you select "linear" a stop band of 0.5 will translate to -6dB or 0.25 will translate to -12dB on the graph which means when "linear" is chosen, it is interpreted in terms of amplitude...

and there is nothing else to indicate otherwise.
 
If you think of db as a ratio, it will be clearer. 0db can be referenced to almost anything and is meaningless without this info. You cannot quote db's without specifying the reference level. Hence abbreviations like dbm, dbV, dbuV, etc.
 
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.

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.
 
Last edited:
There are 3.32 octaves in a decade, so
dB/decade = 3.32 * dB/octave

example: 3dB/octave = 10dB/decade

note: 3.32 = log2(10)
 
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.

Sorry, but I think you're mistaken. It's not dB_power. It's dB. dB is a ratio, whether it be a ratio between amplitudes, or a ratio between powers.

so dB = 10*log10(ratio of powers) = 20*log10(ratio of amplitudes)

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.


Refresh the log laws in your mind, e.g. **broken link removed**

Especially the part about log(AB) = log(A) + log(B)

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)

Hope this clears up your dB confusion.
 
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.

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

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.
 
You said so yourself.
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)
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.

And that would make these equations in incorrect:
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.

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


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

I 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.
dB and linear are only the same information if you are talking about the same physical quantity. As shown above, the
dB = 20log10(A)
has different units on the LHS than the RHS and that makes a difference.

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

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.

0.436V is indeed useless, but you could say that the output would be 4.36% of the input on a linear scale.
 
Last edited:
You said so yourself.
dB = 20log10(A)
has different units on the LHS than the RHS and that makes a difference.
No, if the units were different, the LHS and RHS would not be equal.

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

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).
Not sure what this means. log10 is the defined transform for dB.

dB and linear are only the same information if you are talking about the same physical quantity.
yes.

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

0.436V is indeed useless, but you could say that the output would be 4.36% of the input on a linear scale.
No, for -5dB the output is 56.2% of the input. ( i.e. 10^(-5/20) = 0.562 )
 
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 am just using the FilterBuilder in MATLAB. Just type in "filterbuilder" into MATLAB and it launches.

No, if the units were different, the LHS and RHS would not be equal.
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, 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?

THis is what doesn't make sense. You said that the dB representation for amplitude or intensities is 20log10(A). But then you say:
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)
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.

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

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.

Isn't the purpose of the log scale defined so that every increase/decrease in the order of magnitude on the linear scale equates to a change of +/-10 on the logarithmic scale? Because that's not what happens with 20log10(A). That's what I mean when I'm say that the the dB = 20log10(A) is the change in power in dB that results from a change in amplitude on the linear scale (ie. linear amplitude to dB power). And that 10log10(A) is the formula that actually converts one physical quantity from the linear scale to the same physical quantity for the dB scale (ie. linear power to dB power, or linear amplitude to dB amplitude).

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? It would make more sense if every x10 increase in amplitude also works out to be a +10dB increase in amplitude, just like power, and that a x10 increase in amplitude results in a +20dB increase in power (since power is proportional to the squared of amplitude like you said).
 
Last edited:
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.
 
I am just using the FilterBuilder in MATLAB. Just type in "filterbuilder" into MATLAB and it launches.
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'm not talking about units.
then why were you talking about units:
has different units on the LHS than the RHS and that makes a difference.

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.
Yes, dB is unitless. As I said before, dB and linear scales are representing the same information (i.e. ratios or gains).


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

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

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?
Read above re what has been stated re +10dB, +20dB.

You might find it easier if you treat dB as a representation of ratio of amplitude. Then you might like to think think that 20log10(A) converts A(amplitude ratio) into this scale, and that 10log10(P) converts P (power ratio) into the same scale. You can have both A and P displayed on the graph using the same dB scale. Every 10dB represents a order of magnitude of power, while every 20dB represents 2 orders of magnitude of power, not to mention that it also represents an order of magnitude of the amplitude.


As I tried to explain using the resistor (without success), if you double the amplitude of the signal (current or voltage, it doesn't matter), the power quadruples. If you want to convert this to the dB scale, you'll get the same dB value whether you use the amplitude or power (and obviously the correct transform): 20log10(doubling amplitude) = 10log10(quadrupling power)
 
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.
 
I think that's incorrect. There seems to be websites that go both ways. Or rather, there seem to be websites that just state the formula without explaning it, but the ones that do explain it are saying that the 20log formula gets you the power gain (not amplitude gain) in dB that results from a linear amplitude increase.
The Decibel
http://openlearn.open.ac.uk/mod/resource/view.php?id=285778

Unless dB is only a scale for power gain and never for amplitude gain, then using 20log would make sense. It seems very few people actually ever refer to dB for amplitude gain, only power gain.
 
Last edited:
You would do well to read and understand the words at that link you posted.

THen please explain to me what this extract is saying, because it seems to say that Gdb is power gain, not voltage gain. What I'm basically looking for is an explanation of dB that refers explicitly specifically to amplitude gain in dB rather than power gain.

Someone said earlier than until the advent digital signal processing, power gain has almost always been more important and that's why definitions are the way they are. So far it seems that the 10log power and 20log amplitude formulas only allow me to say that the the power gain is X dB from the input and output power of X, or that the amplitude gain has resulted in a power increase of X dB. I'm looking for the formula that would let me say the voltage gain is X dB.
 

Attachments

  • dB.pdf
    14.3 KB · Views: 665
Last edited:
If it would help, I can change the wording of the wikipedia article for you.

All the best with you endevours.
 
Now repeat carefully after me:

a dB is a dB is a dB

There are no such things as power dBs or amplitude dBs.

The thing that makes it possible to measure dBs using either amplitude or power ratios is that the number of dBs is 10 log a power ratio or 20 log an amplitude ratio. It's that simple.

It sounds like Matlab presents this in some confusing way, I don't have it so can't test it.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top