cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Working with dB (decibels)

ptc-4582115
1-Visitor

Working with dB (decibels)

dB_in_mathcad15.png

entering av1 and av2 in dB makes no diference:

dB_in_mathcad15_again.png

Any tip to avoid pitfalls using dB?.

ACCEPTED SOLUTION

Accepted Solutions

Axel Harris wrote:

How do you hide brackets sorrounding N1?

I use the prefix operator:

http://twt.mpei.ac.ru/ochkov/Mathcad_14/Chapter1/1_036_Prefix.png

View solution in original post

23 REPLIES 23

0+0=0

but 0dB+0dB is not equal 0dB

See the picture please

dB.png

math_hidebrackets.jpg

I colorized for clarity.

How do you hide brackets sorrounding N1?

Axel Harris wrote:

How do you hide brackets sorrounding N1?

I use the prefix operator:

http://twt.mpei.ac.ru/ochkov/Mathcad_14/Chapter1/1_036_Prefix.png

it worked!

you are a very master.

Thanks a lot

Nevertheless I managed to work this way it's a lot of work to change styles.

I thik it's easier to me to write

dB := 1 (dummy unit)

dB(x):=10*log(x) dB definition

using it:

a := 5 (times)

A := dB(5) = 6.989 dB

Valery Ochkov wrote:

0+0=0

but 0dB+0dB is not equal 0dB

See the picture please

dB.png

Is that right, Valery? It's a long time since I played with decibels with any degree of seriousness, but I thought that 0 dB + 0 dB does = 0 dB? What you appear to be doing is adding powers (W) and then treating their decibel equivalents as linearly scaled values (in a similar way to defining lengths in metres and then adding their feet equivalents). However, decibels are logarithmic quantities and, IIRC, adding them is equivalent to multiplying the underlying powers (ie, gain) not adding them, with 0 dB being the equivalent of multiplying by one?

Am I getting the wrong end of the stick here?

Stuart

collab - units 002.jpg

Stuart_Bruff wrote:

Valery Ochkov wrote:

0+0=0

but 0dB+0dB is not equal 0dB

Is that right, Valery?

See the picture:

dB0.png

RichardJ
19-Tanzanite
(To:ptc-4582115)

They are not wrong, although they are not necessarily correct either. There is not one way to add values expressed in dB, there are two. And the root of your problem is that you are not distinguishing a dB that represents power (e.g. dBm) and a dB that represents gain. They are not the same thing, and cannot be handled the same way.

nas0k
12-Amethyst
(To:RichardJ)

"Everything you ever wanted to know about decibels but were afarid to ask..."

Here is a good reference on dB & dBm:

http://www2.rohde-schwarz.com/file_5613/1MA98_4E.pdf

Mathcad is or was selled like a sheet of paper which makes the number crunching for you. This means: you write your formulas and equiationes as usual and MathCad makes the calculations for you. Well. But just when we work with dB such approach is no longer true. Intuition is not longer valid and what MathCad does is obscure and counterintuitive

As a matter of example: 0 dB + 0 dB = 0 dB in real paper but is 3.01 dB in MathCad "paper" Ochkov version (i.e using postfix operator)

Of course if you write 10*log(1)+10*log(1) on real paper or in MathCad paper you get 0 not 3.01

RichardJ
19-Tanzanite
(To:ptc-4582115)

Intuition is not longer valid and what MathCad does is obscure and counterintuitive

As a matter of example: 0 dB + 0 dB = 0 dB in real paper but is 3.01 dB in MathCad "paper" Ochkov version (i.e using postfix operator)

No, sorry, but you are wrong. If the dB values represent gain or attenuation then 0 dB + 0 dB = 0 dB. But if the dB values represent two uncorrelated powers, for example sound levels, then 0 dB + 0 dB = 3.01 dB. Mathcad calculates the second answer because of the way the values are stored internally. There are two possible ways to add values expressed in dB, depending no what they represent, so the only solution that can always be correct involves two summation (and two subtraction) operators, and an understanding of dB (for which read the excellent reference Norm pointed us to).

May be better to continue this discuss here

Richard Jackson escribió:

Intuition is not longer valid and what MathCad does is obscure and counterintuitive

As a matter of example: 0 dB + 0 dB = 0 dB in real paper but is 3.01 dB in MathCad "paper" Ochkov version (i.e using postfix operator)

No, sorry, but you are wrong. If the dB values represent gain or attenuation then 0 dB + 0 dB = 0 dB. But if the dB values represent two uncorrelated powers, for example sound levels, then 0 dB + 0 dB = 3.01 dB.

dB is 10*log(ratio) if you talk about energy expresed in lograitmic units you must not name those units dB. What electrical enginners do is to talk about dBm (reference 1 mW, so dBm = 10 log (P/mW)) and electoacustic people talks about dB of SPL when reference is certain pressure.

RichardJ
19-Tanzanite
(To:ptc-4582115)

dB is 10*log(ratio) if you talk about energy expresed in lograitmic units you must not name those units dB.

I agree. But people do (especially when talking about sound levels).

The fact is though, that if we take dB to always mean gain or attenuation then mathematically 0 dB + 0 dB = 0 dB is not correct. When you do this on paper you are actually first removing the units to get only the numerical values, then adding the numerical values, and then putting the units back again. That is not how the normal addition operator works, so you have to define a new operator that does this. In the worksheet I posted I could have defined the operators exactly that way, but since dB is a logarithmic scale it was easier just to define them as ratios.

GREAT file. Everyone suffering with dB should download ir

Actually, Tom Gutman had assisted me in creating a unit definition with the postfix operator a while ago. It is not obvious, but I was working with sound. I believe the thread is this one http://communities.ptc.com/message/133884

RichardJ
19-Tanzanite
(To:ELSID)

The unit definition for dB is in the tutorials. What the tutorial does not address is the fact that dB can be used to represent either a power or a gain, and dB cannot be handled the same way for both.

ELSID
8-Gravel
(To:RichardJ)

Richard,

dB is dB. In otherwords, "Decibels are not a proper unit. It is a scale." http://communities.ptc.com/message/60520#60520 In my sound calculations, I calculate for both sound pressure (L.p) and sound power (L.w) and differentiated that way. The scale of dB remains, it's how you calculate either the pressure (gain?) or power. Sorry, not as familiar on how it's used in electrical calculations. In my work, I defined dB, when I "adjusted" the scale to dB(A), I defined dB=dB(A) and explained right before the math. This allowed me to trace the reason for the "scale" redefinition, keep the correct scale, and continue to make the print out look like my hand calculations. It was quite the learning experience.

BTW, where is Tom?

RichardJ
19-Tanzanite
(To:ELSID)

dB can represent a power, or a pressure. But it can also represent a gain, i.e. an amplification factor. You can't handle that the same way. Read the wworksheet I posted, and the reference Norm pointed out in his post.

Tom didn't like the new forums, and disappeared.

ELSID
8-Gravel
(To:RichardJ)

Richard,

I agree with what you are saying and you have helped me more times than I care to count . Moreover, when I've used dB, in any calculation, I was taught a similar way to

Norm Schutzkus wrote:

http://www2.rohde-schwarz.com/file_5613/1MA98_4E.pdf

Bottom of pg 4 and top of pg 5 where the paper discusses the IEC 27 standard where levels are to be indicated with "L".

In my case, I use L.p (pressure) or L.w (power) and adjust the "unit" scale after the math ... where dB=dB(A) therefore L.p=???dB(A). This allows me to keep the math and scale consistent, yet the output scale is as expected on paper dB(A). Also, the "voltage" power decibel is the same as sound pressure for which I am accustomed to working in

Also, by using the levels as "L", I can diferentiate between dBA (dB Amps) vs. dB(A) (dB with an A-weight scale)

RichardJ
19-Tanzanite
(To:ELSID)

I do not lke that way of doing it. The unit on the right is always dB, even though not all dB are referenced to the same value (or, in the case of a gain, to any specific value at all). It then relies on the variable name on the left to indicate what that particular dB actually is. I don't even like that way of doing it on paper. What are you supposed to do if you want two different variables defined, but IEC 27 says they should be be called LP/1mW? I'm not familiar with IEC 27 though, so maybe I just miosunderstand their naming scheme. Regardless of that issue though, in Mathcad their scheme also means you lose one of Mathcad's great benefits: unit checking.

Actually, in Tom's worksheet (http://communities.ptc.com/servlet/JiveServlet/download/133885-15301/xx(165).xmcdz) in the first thread you referenced Tom also defines two diffferent dB units, one of which is a gain, and shows they can't be added. He solves it by multiplying instead. That works, but IMHO doesn't look as nice as when a extra "addition" operator (that is really a multiplication!) is used. I'm biased though, because that's in my worksheet

BTW, the postix operator does not work in Prime 2.0 at all and does not seem planned any time in the very near future!

Rick,

This is one of the many reasons my company has not converted ... sheets using functions features that are not yet supported in Prime

Rick Mason wrote:

BTW, the postix operator does not work in Prime 2.0 at all and does not seem planned any time in the very near future!

Yes, the postix operator does not work in Prime 2.0

See the item #5 in this poll

http://communities.ptc.com/polls/1134

Announcements

Top Tags