フィルターのクリア

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
Sulaymon Eshkabilov 2024 年 1 月 6 日
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 Center および File ExchangeMathematics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by