Use/Advantages of comm.AWGNChannel

4 次查看(过去 30 天)
Hi,
I'm currently optimizing some of my code for speed and found an extreme performance bottleneck: comm.AWGNChannel. Now I wonder where this comes from (how is it implemented?), ie., why is it so slow and are there any advantages of it? Is it ever superior to other approaches?
Here is my testcode for simple BPSK transmission:
EbN0 = 10;
noiseVar = 0.5 * 10^(-0.1 * EbN0);
len = 1e5;
dataSignal = randi([0 1], 1, len);
dataSignal = 1 - 2 * dataSignal;
hAWGN = comm.AWGNChannel('EbNo', EbN0);
recvSignal = step(hAWGN, dataSignal);
recvSignal2 = awgn(dataSignal, EbN0 + 3);
noise = recvSignal - dataSignal;
noise2 = recvSignal2 - dataSignal;
noise3 = sqrt(noiseVar) * randn(1, len);
There are three different creations of the AWGN: Via comm.AWGNChannel, via awgn() and manually created via randn(). The variance of all noises is equal (given a long enough signal), yet the comm.AWGNChannel almost takes a factor of 100 longer to run (using the MATLAB Profiler).
  1 个评论
sudheesh pai
sudheesh pai 2015-12-2
awgn,comm.awgn is almost same, you can enter snr in db format(reduces lot of coding).

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by