Help on Noise Power

6 次查看(过去 30 天)
Matt
Matt 2024-1-6
评论: Matt 2024-1-7
Chan_Loss = 1;
y_mod_am_chan = y_am_mod/Chan_Loss; % signal after channel attenuation/loss
% a_int_sig = 5e-2; % amplitude of interference signals
% f_int_sig = [10e3, 20e3, 25e3, 32e3, 40e3]; % frequencies of interference signals
% int_sig = a_int_sig*sin(2*pi*f_int_sig(1)*time');
% for f_int = f_int_sig(2:end)
% int_sig = int_sig + a_int_sig*sin(2*pi*f_int*time');
% end
signal_power = std(y_mod_am_chan); % Signal Power
noise_power = 0.01*signal_power; % noise power
noise_sig = randn(no_of_pnts, 1)*noise_power; % noise signal generated based on normal distribution
y_mod_am_int = y_mod_am_chan; % received signal with interference signals
You need to geneterate the same plots for all noise powers (0.01, 0.1, 0.5, and 1 times the received signal power at the receiver).
Basically you need to change the coefficient value in
noise_power = 0.01*signal_power; % noise power
line in your channel section.

采纳的回答

Sulaymon Eshkabilov
If understood correctly, what you are trying to attain is to generate a few different noise powers from the given signal. If so, then
t = (0:0.05:10)';
x = sin(t);
SNR = [0.01, 0.05, 0.1, 1, 10, 50];
LC = 'kbmgck';
for ii = 1:numel(SNR)
% White noise is generated with awgn():
y_noise = awgn(x,SNR(ii), 'Measured'); % Assumes that the input signal power value in dBW
figure(ii)
plot(t,x, 'r',"LineWidth",2, "DisplayName",'Measured data')
hold on
plot(t,y_noise, LC(ii), 'LineWidth', 1.25, "DisplayName",'Noise added signal')
title(['SNR Level is ' num2str(SNR(ii)) ' dB'])
legend('Show')
end
  6 个评论
Matt
Matt 2024-1-7
@Sulaymon Eshkabilov it still does the same issue
Matt
Matt 2024-1-7
@Sulaymon Eshkabilov nevermind, it completely works :)

请先登录,再进行评论。

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by