Using awgn and snr functions in matlab

26 ビュー (過去 30 日間)
Rohan Chhibba
Rohan Chhibba 2019 年 8 月 29 日
コメント済み: Rohan Chhibba 2019 年 9 月 20 日
In matlab, I create a sawtooth signal, add noise to it using 'awgn' function, and then measure the SNR using 'snr' function.
x = sawtooth(0:0.1:10);
y = awgn(x,10,'measured');
SNR = snr(y,y-x);
My question is that snr doesn't give SNR equal to 10. Rather, it gives something near to 10, but still not close enough.
Is there any other way to add noise accurately with predetermined snr, to a signal?

採用された回答

Jyothis Gireesh
Jyothis Gireesh 2019 年 9 月 17 日
Here are a few pointers which may be able to help you.
  • Since SNR is the ratio of Signal Power to noise power it should be computed using the following method SNR = snr (x,y-x) since x is the original signal and y is the noise corrupted signal.
  • The signal “y” is generated by using awgn()” function with a random seed there may be some cases where the SNR may not match closely with the pre-defined value.
As a possible workaround you may use any of the following methods:
  • Specify the ‘seed’ attribute of the awgn()” function for repetitive generation of noise samples.
  • Use Monte-Carlo method to generate different awgn()” noise samples and average over all the SNR values. As the number of Monte- Carlo simulations increase the average SNR closely approximates the predefined SNR.
Please refer to the following documentation link on awgn()” function
  1 件のコメント
Rohan Chhibba
Rohan Chhibba 2019 年 9 月 20 日
Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePropagation and Channel Models についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by