Use/Advantages of comm.AWGNChannel

5 views (last 30 days)
Christoph
Christoph on 12 Aug 2014
Commented: sudheesh pai on 2 Dec 2015
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 Comment
sudheesh pai
sudheesh pai on 2 Dec 2015
awgn,comm.awgn is almost same, you can enter snr in db format(reduces lot of coding).

Sign in to comment.

Answers (0)

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!