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?
0 个评论
回答(2 个)
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 个评论
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 个评论
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 Center 和 File Exchange 中查找有关 Filter Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!