awgn,comm.awgn is almost same, you can enter snr in db format(reduces lot of coding).
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).
回答(0 个)
另请参阅
类别
在 Help Center 和 File 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!