SNR (dB) conversion formula

SNR(dB) = 10*lg(SNR);

1. Example:

0(dB) = 1 =10^0;

10(dB) = 10 =10^1;

20(dB) = 100 =10^2;

30(dB) = 1000 =10^3;

That is, 10*n (dB) = 10^n;

2. The meaning of converting to dB

Squeeze the axes.

3. Comparison of image SNR (dB) and SNR

It can be seen that the SNR ranges from 0-1000, and the maximum value of SNR (dB) only needs to reach 40 

4. If SNR (dB) is plotted as an independent variable, plot can no longer be used

semilogx(X,Y) plots x and y coordinates using a logarithmic base-10 scale on the x-axis and a linear scale on the y-axis.

That is, the unit of the horizontal axis is (dB), and the vertical axis is a normal linear coordinate.

Meaning: Compress the horizontal axis.

(1) To draw a set of coordinates connected by line segments, specify X and Y as vectors of the same length.

(2) To plot multiple sets of coordinates on the same set of axes, specify at least one of X or Y as a matrix.

When drawing, it is stipulated that X is a logarithmic scale with a base of 10, but when defining and marking the X range in the figure, the normal linear value is used, but the linear value is rehearsed with a dB scale.

Supporting function:

y = logspace(a,b,n) generates n points between powers of 10 10^a and 10^b (10 to the Nth power).

x = logspace(-1,2);%X的范围:0.1——100
y = x;
semilogx(x,y)&作图,X的坐标是dB
grid on

 5. Application

Take the two ways to increase channel capacity as an example:

5.1 Increase the bandwidth. The increase in bandwidth will increase the channel capacity, but it is not unlimited, because the increase in bandwidth will also increase the noise power. When the bandwidth tends to infinity, the channel capacity tends to 1.44*S/n0

code:

clc;
clear;
W=logspace(-2,10);%信道带宽范围:0.01—10^10,不用化成dB
S=3;%信号平均功率
N0=0.00001;%单位带宽噪声功率
SNR=S./(N0*W);%信噪比
C=W.*log2(1+SNR);%香农公式
semilogx(W,C),xlabel('W(Hz)'),ylabel('C'),title('带宽对信道容量影响'),grid on;%作图

5.2 Increase the signal-to-noise ratio, without limit, the signal-to-noise ratio is infinite, and the channel capacity is infinite.

 code:

clc;
clear;
SNR = logspace(-4,2);%信噪比范围:不用化成dB
W = 3000;%信道带宽
C=W.*log2(1+SNR);%香农公式
semilogx(SNR,C),xlabel('SNR'),ylabel('C'),title('带宽对信道容量影响'),grid on;%作图

Guess you like

Origin blog.csdn.net/marujie123/article/details/121732501