필터 지우기
필터 지우기

convert from linear units to dBm and dB

조회 수: 90 (최근 30일)
yusra Ch
yusra Ch 2019년 1월 4일
댓글: TJ Plummer 2020년 3월 18일
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 ?
Star Strider
Star Strider 2020년 3월 17일
Subtracting logs = dividing linear

댓글을 달려면 로그인하십시오.


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에서 Numbers and Precision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by