DSP Blockset | ![]() ![]() |
Convert magnitude data to decibels (dB or dBm).
Library
Math Functions / Math Operations
Description
The dB Conversion block converts a linearly scaled power or amplitude input to dB or dBm. The Input signal parameter specifies whether the input is a power signal or a voltage signal, and the Convert to parameter controls the scaling of the output. When selected, the Add eps to input to protect against "log(0) = -inf" parameter adds a value of eps
to all power and voltage inputs. When this option is not enabled, zero-valued inputs produce -
inf
at the output. The size and frame status of the output are the same as the input.
Power Inputs
Select Power as the Input signal parameter when the input, u
, is a real, nonnegative, power signal (units of watts). When the Convert to parameter is set to dB, the block performs the dB conversion
When the Convert to parameter is set to dBm, the block performs the dBm conversion
The dBm conversion is equivalent to performing the dB operation after converting the input to milliwatts.
Voltage Inputs
Select Amplitude as the Input signal parameter when the input, u
, is a real voltage signal (units of volts). The block uses the scale factor specified in ohms by the Load resistance parameter, R
, to convert the voltage input to units of power (watts) before converting to dB or dBm. When the Convert to parameter is set to dB, the block performs the dB conversion
When the Convert to parameter is set to dBm, the block performs the dBm conversion
The dBm conversion is equivalent to performing the dB operation after converting the (abs(u)^2/R)
result to milliwatts.
Dialog Box
eps
to all input values (power or voltage). Tunable.Supported Data Types
To learn how to convert to the above data types in MATLAB and Simulink, see Supported Data Types and How to Convert to Them.
See Also
dB Gain |
DSP Blockset |
Math Function |
Simulink |
log10 |
MATLAB |
Also see Math Operations for a list of all the blocks in the Math Operations library.
![]() | Cumulative Sum | dB Gain | ![]() |