Use/Advantages of comm.AWGNChannel
1 view (last 30 days)
Show older comments
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
on 2 Dec 2015
awgn,comm.awgn is almost same, you can enter snr in db format(reduces lot of coding).
Answers (0)
See Also
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!