Skip to content

QUCS math functions #18

@faustdownunder

Description

@faustdownunder

Hi
I noticed today that the two functions related to the decibel pseudo-unit require some work.

dB(x) is declared as "voltage decibel".

Decibel is however always related to a power ratio.
If we have two voltages measured across the same resistor, the power ratio is then the square of the voltage ratio because P = ( V^2)/R or P_dB = 20 x log10 (V2/V1).

I believe the definition is dB(x) = dB(V2/V1) where both voltage are across the same resistor. The function should therefore probably be called "voltage ratio to decibel (R1 = R2)" denoting a limitation to identical resistors. A bit pedantic for some but definitely correct and necessary. I would not call this function dB(x) for the reasons explained above. Instead, it should perhaps be

dBv(x).

Secondly, I see

"dBm(x) converts voltage into power in dBm"

We can convert a voltage ratio (R1 = R2) to a power ratio by squaring the voltage ratio.

dBm(x) = 20 x log10(V/V_1mW) (R1 = R2)

which makes clear what the function does. Otherwise, less experienced users might take two voltages measured across different resistances and get the wrong answer.

Since dBm is always defined as 10 x log10(P2/1mW), we should probably call the function

dBmv(x).

with best regards

Dieter

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions