Engee documentation

dB Conversion

Converting magnitude data to decibels (dB or dBm)

db conversion

Description

The dB Conversion unit converts linearly scaled power or voltage to dB or dBm. The base power is 1 W for conversion to dB and 1 mW for conversion to dBm.

The Input signal parameter specifies whether the input signal to the unit is power or voltage, and the Convert to parameter controls the scaling of the output.

When Add eps to input to protect against "log(0) = −inf " is checked, the eps value is added to the value at the input. When unchecked, zero values on input are converted to -Inf values on output.

Ports

Input

Port_1 - input data
scalar

The input data is in the form of a scalar.

When Input signal is set to:

  • Power - the input is treated as a power signal specified in watts.

  • Amplitude - the input is treated as a voltage signal specified in volts.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Output

Port_1 - output data
scalar

The output is in the form of a scalar. The output has the same size and data type as the input. Output data is calculated as follows.

When Input signal is set to Power and Convert to is set to:

  • dB - the block performs the following conversion:

  • dBm - the block performs the following conversion:

The conversion to dBm is equivalent to performing the dB operation after recalculating the input signal into milliwatts.

The input u is a non-negative power signal expressed in watts.

When Input signal is set to Amplitude and Convert to is set to:

  • dB - the block performs the following conversion:

  • dBm - the block performs the following conversion:

The input u is a non-negative voltage signal expressed in volts.

The dBm conversion is equivalent to performing the dB operation after recalculating the result into milliwatts. The scaling factor R is specified in ohms.

Data types: Float64.

Parameters

Convert to - filter structure
dB (by default) | dBm

Logarithmic scale for converting the input signal, dB or dBm. The base power is 1 W to convert to dB and `1 mW to convert to `dBm.

The amplitude conversion uses a scaling factor specified in ohms by the Load resistance (ohms) parameter, R to convert the input voltage to power units (watts) before converting to dB or dBm.

When Input signal is set to Power and Convert to is set to:

  • dB - the block performs the following conversion:

  • dBm - the block performs the following conversion:

The dBm conversion is equivalent to performing the dB operation after recalculating the input signal into milliwatts.

The input u is a non-negative power signal expressed in watts.

When Input signal is set to Amplitude and Convert to is set to:

  • dB - the block performs the following conversion:

  • dBm - the block performs the following conversion:

The input u is a non-negative voltage signal expressed in volts.

The dBm conversion is equivalent to performing the dB operation after recalculating the result into milliwatts. The scaling factor R is specified in ohms.

Input signal is the type of input signal
Amplitude (By default) | Power

The input signal type is Power or Amplitude.

When Input signal is set to:

  • Power - the u input is treated as a non-negative power signal expressed in watts.

  • Amplitude - the u input is treated as a voltage signal expressed in volts.

Load resistance (ohms) - scaling factor
1 (By default).

The R scaling factor, specified in ohms. The unit uses the scaling factor to convert the input voltage into units of power (watts) before converting to dB or dBm.

Add eps to input to protect against "log(0) = −inf " - add eps
false (by default) | true.

Tick the checkbox to add eps to all input values (power or voltage).