piel.units.power#

Functions#

dBm2watt(→ piel.types.NumericalTypes)

Converts power from dBm (decibel-milliwatts) to Watts.

watt2dBm(→ piel.types.NumericalTypes)

Converts power from Watts to dBm (decibel-milliwatts).

watt2vrms(→ piel.types.NumericalTypes)

Converts power in Watts to Vrms (root mean square voltage) for a given impedance.

dBm2vrms(→ piel.types.NumericalTypes)

Converts power from dBm to Vrms (root mean square voltage) in a specified impedance network.

vrms2vpp(→ piel.types.NumericalTypes)

Converts Vrms (root mean square voltage) to Vpp (peak-to-peak voltage).

vrms2watt(→ piel.types.NumericalTypes)

Converts Vrms (root mean square voltage) to power in Watts for a given impedance.

vrms2dBm(→ piel.types.NumericalTypes)

Converts Vrms (root mean square voltage) to dBm in a specified impedance network.

dBm2vpp(→ piel.types.NumericalTypes)

Converts power from dBm to Vpp (peak-to-peak voltage) in a specified impedance network.

vpp2vrms(→ piel.types.NumericalTypes)

Converts Vpp (peak-to-peak voltage) to Vrms (root mean square voltage).

vpp2dBm(→ piel.types.NumericalTypes)

Converts Vpp (peak-to-peak voltage) to dBm in a specified impedance network.

Module Contents#

dBm2watt(dBm: piel.types.NumericalTypes) piel.types.NumericalTypes[source]#

Converts power from dBm (decibel-milliwatts) to Watts.

The conversion is performed using the following equation:

\[P_{ ext{Watt}} = 10^{\left(\]

rac{P_{ ext{dBm}}}{10} ight)} imes 10^{-3}

Args: - dBm (NumericalTypes): Power level in dBm (can be int, float, or numpy array).

Returns: - NumericalTypes: Power level in Watts, in the same type as the input.

watt2dBm(watt: piel.types.NumericalTypes) piel.types.NumericalTypes[source]#

Converts power from Watts to dBm (decibel-milliwatts).

The conversion is performed using the following equation:

\[P_{ ext{dBm}} = 10 imes \log_{10}\left(\]

rac{P_{ ext{Watt}}}{10^{-3}} ight)

Args: - watt (NumericalTypes): Power level in Watts (can be int, float, or numpy array).

Returns: - NumericalTypes: Power level in dBm, in the same type as the input.

watt2vrms(watt: piel.types.NumericalTypes, impedance: piel.types.NumericalTypes = 50.0) piel.types.NumericalTypes[source]#

Converts power in Watts to Vrms (root mean square voltage) for a given impedance.

The conversion is performed using the following equation:

\[V_{ ext{rms}} = \sqrt{P_{ ext{Watt}} imes Z}\]

Args: - watt (NumericalTypes): Power level in Watts. - impedance (float): The network impedance in ohms. Defaults to 50.0 Ohms.

Returns: - NumericalTypes: Vrms in the same type as the input.

dBm2vrms(dBm: piel.types.NumericalTypes, impedance: piel.types.NumericalTypes = 50.0) piel.types.NumericalTypes[source]#

Converts power from dBm to Vrms (root mean square voltage) in a specified impedance network.

The conversion is performed using the following steps:

  1. Convert dBm to Watts: .. math:

    P_{  ext{Watt}} = 10^{\left(
    

rac{P_{ ext{dBm}}}{10} ight)} imes 10^{-3}

  1. Convert Watts to Vrms: .. math:

    V_{  ext{rms}} = \sqrt{P_{   ext{Watt}}      imes Z}
    

Args: - dBm (NumericalTypes): Power level in dBm (can be int, float, or numpy array). - impedance (float): The network impedance in ohms. Default is 50 ohms.

Returns: - NumericalTypes: Vrms value, in the same type as the input.

vrms2vpp(vrms: piel.types.NumericalTypes) piel.types.NumericalTypes[source]#

Converts Vrms (root mean square voltage) to Vpp (peak-to-peak voltage).

The conversion is performed using the following equation:

\[V_{ ext{pp}} = V_{ ext{rms}} imes \sqrt{2} imes 2\]

Args: - vrms (NumericalTypes): Vrms value.

Returns: - NumericalTypes: Vpp in the same type as the input.

vrms2watt(vrms: piel.types.NumericalTypes, impedance: piel.types.NumericalTypes = 50.0) piel.types.NumericalTypes[source]#

Converts Vrms (root mean square voltage) to power in Watts for a given impedance.

The conversion is performed using the following equation:

\[P_{ ext{Watt}} =\]

rac{V_{ ext{rms}}^2}{Z}

Args: - vrms (NumericalTypes): Vrms value. - impedance (float): The network impedance in ohms.

Returns: - NumericalTypes: Power level in Watts, in the same type as the input.

vrms2dBm(vrms: piel.types.NumericalTypes, impedance: piel.types.NumericalTypes = 50.0) piel.types.NumericalTypes[source]#

Converts Vrms (root mean square voltage) to dBm in a specified impedance network.

The conversion is performed using the following steps:

  1. Convert Vrms to Watts: .. math:

    P_{  ext{Watt}} =
    

rac{V_{ ext{rms}}^2}{Z}

  1. Convert Watts to dBm: .. math:

    P_{  ext{dBm}} = 10  imes \log_{10}\left(
    

rac{P_{ ext{Watt}}}{10^{-3}} ight)

Args: - vrms (NumericalTypes): Vrms value. - impedance (float): The network impedance in ohms. Default is 50 ohms.

Returns: - NumericalTypes: Power level in dBm, in the same type as the input.

dBm2vpp(dBm: piel.types.NumericalTypes, impedance: piel.types.NumericalTypes = 50.0) piel.types.NumericalTypes[source]#

Converts power from dBm to Vpp (peak-to-peak voltage) in a specified impedance network.

The conversion is performed using the following steps:

  1. Convert dBm to Watts: .. math:

    P_{  ext{Watt}} = 10^{\left(
    

rac{P_{ ext{dBm}}}{10} ight)} imes 10^{-3}

  1. Convert Watts to Vrms: .. math:

    V_{  ext{rms}} = \sqrt{P_{   ext{Watt}}      imes Z}
    
  2. Convert Vrms to Vpp: .. math:

    V_{  ext{pp}} = V_{  ext{rms}}       imes \sqrt{2}   imes 2
    

Args: - dBm (NumericalTypes): Power level in dBm (can be int, float, or numpy array). - impedance (float): The network impedance in ohms. Default is 50 ohms.

Returns: - NumericalTypes: Vpp value, in the same type as the input.

vpp2vrms(vpp: piel.types.NumericalTypes) piel.types.NumericalTypes[source]#

Converts Vpp (peak-to-peak voltage) to Vrms (root mean square voltage).

The conversion is performed using the following equation:

\[V_{ ext{rms}} =\]

rac{V_{ ext{pp}}}{sqrt{2} imes 2}

Args: - vpp (NumericalTypes): Vpp value.

Returns: - NumericalTypes: Vrms value, in the same type as the input.

vpp2dBm(vpp: piel.types.NumericalTypes, impedance: piel.types.NumericalTypes = 50.0) piel.types.NumericalTypes[source]#

Converts Vpp (peak-to-peak voltage) to dBm in a specified impedance network.

The conversion is performed using the following steps:

  1. Convert Vpp to Vrms: .. math:

    V_{  ext{rms}} =
    

rac{V_{ ext{pp}}}{sqrt{2} imes 2}

  1. Convert Vrms to Watts: .. math:

    P_{  ext{Watt}} =
    

rac{V_{ ext{rms}}^2}{Z}

  1. Convert Watts to dBm: .. math:

    P_{  ext{dBm}} = 10  imes \log_{10}\left(
    

rac{P_{ ext{Watt}}}{10^{-3}} ight)

Args: - vpp (NumericalTypes): Vpp value. - impedance (float): The network impedance in ohms. Default is 50 ohms.

Returns: - NumericalTypes: Power level in dBm, in the same type as the input.