convert from linear units to dBm and dB

95 次查看(过去 30 天)
I have this equation:
y_linear=10.^((x_dbm-30)/20);
I have the value of y_linear and I want to get the value of x_dbm in dBm and dB units. can anyone help me with this?

回答(2 个)

Star Strider
Star Strider 2019-1-4
This is relatively straightforward. To solve it analytically, take of both sides, then rearrange to get:
x_dbm = 20*log10(y_linear) + 30;
However if you want to use the fzero function to solve it:
y_linear = 42
y_linfcn = @(xdbm) 10.^((xdbm-30)/20);
x_dbm = fzero(@(xdbm) y_linfcn(xdbm)-y_linear, 1)
x_dbm =
62.464985807958
  2 个评论
yusra Ch
yusra Ch 2020-3-17
编辑:yusra Ch 2020-3-17
Hi again ,
If I have values of X in dBm and Y in dBm too.
XLinear=10.^((X_dbm-30)/20);
YLinear=10.^((Y_dbm-30)/20);
ZLinear=XLinear-YLinear;
ZdBm=X_dbm-Y_dbm;
ZLinear=10.^((ZdBm-30)/20);
why the result of this two operations is diffrent ?

请先登录,再进行评论。


TJ Plummer
TJ Plummer 2020-3-17
编辑:TJ Plummer 2020-3-17
So dB is a measure of power relative to 1 Watt and dBm is measure of power relative to 1 Milliwatt.
x_in = 5.3; % Volts
Covert input (linear) level, typically an rms Volt value to Power levels.
X_dB = 20 * log10(x_in);
x_in = 10^(X_dB / 20);
X_dBm = X_dB + 30; % 30dB is 10 * log10(1W/1mW)
x_in = 10^((X_dBm - 30) / 20);
x_in_dBm = x_in * 10^(30 / 20);
To recap, it is easier to add and subtract in dB space than divide or multiply in linear. dB is a unit to measure power where input is the amplitude units (rms Volts in my example). Going from dB to dBm is an 30dB difference in power. This is a factor of 1000 in linear Power. To convert to linear amplitude units, this becomes a scaling of sqrt(1000).
  2 个评论
yusra Ch
yusra Ch 2020-3-18
In my case, the input is the loss attenuation (in dBm). My prof told me that it is acceptable to do the substruction in log units in this case. But I dont understand why ?? Could you plz axplain to me ?
ANd if it is acceptable why the result of this two operations is diffrent (first Zlinear is not equal to the econd Zlinear)?
If I have values of X in dBm and Y in dBm too.
XLinear=10.^((X_dbm-30)/20);
YLinear=10.^((Y_dbm-30)/20);
ZLinear=XLinear-YLinear;
ZdBm=X_dbm-Y_dbm;
ZLinear=10.^((ZdBm-30)/20);
TJ Plummer
TJ Plummer 2020-3-18
Sure, where you have:
ZdBm=X_dbm-Ydbm;
This is incorrect. A difference in any dB units is simply dB. Recall that subtraction is a ratio. Therefore, your units get cancelled, which leaves you with regular dB:
ZdB = X_dbm - Ydbm;
Now the 30 is not needed in the conversion back to linear. Remember the m in dBm denotes units of miliwatt.
ZLinear=10.^((ZdB)/20);

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Filter Analysis 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by