Engee documentation

dB Conversion

Converting magnitude data to decibels (dB or dBm)

blockType: dBConversion

Path in the library:

/Signal Operations/Math Functions/Math Functions/dB Conversion

Description

Block dB Conversion converts linearly scaled power or voltage to dB or dBm. The base capacity is 1 Watt to convert to dB and 1 MW to convert to dBm.

The Input signal parameter sets which signal comes to the input of the unit — power or voltage, and the Convert to parameter controls the scaling of the output.

When checking the box Add eps to input to protect against "log(0) = −inf" value eps is added to the value at the input. When this parameter is unchecked, the null values in the input are converted to values −Inf at the exit.

Ports

Entrance

Port_1 — input data
scalar

The input data is in the form of a scalar.

When the Input signal parameter is set to:

  • Power — The input is processed as a power signal specified in watts.

  • Amplitude — the input is processed 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 of
scalar

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

When the Input signal parameter is set to Power, and the Convert to parameter is set to:

  • dB — the block performs the following transformation:

  • dBm — the block performs the following transformation:

Conversion to dBm equivalent to performing an operation dB after recalculating the input signal in milliwatts.

Input u is a non—negative power signal expressed in watts.

When the Input signal parameter is set to Amplitude, and the Convert to parameter is set to:

  • dB — the block performs the following transformation:

  • dBm — the block performs the following transformation:

Input u is a non—negative voltage signal expressed in volts.

Transformation dBm equivalent to performing an operation dB after recalculation the result is in milliwatts. The scaling factor R is specified in ohms.

Data types: Float64

Parameters

Convert to — pass filter structure:q[<br>] dB (default) | dBm

A logarithmic scale for converting the input signal, dB or dBm. The base capacity is 1 Watt to convert to dB and 1 MW to convert to dBm.

When converting the amplitude, the scale factor set in ohms by the parameter Load resistance (ohms), R is used to convert the input voltage into power units (watts) before converting to dB or dBm.

When the Input signal parameter is set to Power, and the Convert to parameter is set to:

  • dB — the block performs the following transformation:

  • dBm — the block performs the following transformation:

Transformation dBm equivalent to performing an operation dB after recalculating the input signal in milliwatts.

Input u is a non—negative power signal expressed in watts.

When the Input signal parameter is set to Amplitude, and the Convert to parameter is set to:

  • dB — the block performs the following transformation:

  • dBm — the block performs the following transformation:

Input u is a non—negative voltage signal expressed in volts.

Transformation dBm equivalent to performing an operation dB after recalculation the result is in milliwatts. The scaling factor R is specified in ohms.

Input signal — input signal type
Amplitude (by default) | Power

Type of input signal Power or Amplitude.

When the Input signal parameter is set to:

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

  • Amplitude — input u is processed as a voltage signal expressed in volts.

Load resistance (ohms) — scale factor of
1 (default)

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

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

Check the box to add eps to all input values (power or voltage).