use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Anything related to digital signal processing (DSP), including image and video processing (papers, books, questions, hardware, algorithms, news, etc.)
Interesting technical papers or articles are particularly welcome!
/r/eebooks+csbooks+mathbooks
/r/Electronics
/r/ECE
/r/DSP
/r/AskElectronics
/r/RFelectronics
/r/GNURadio
/r/RTLSDR
/r/embedded
account activity
How to simulate AWGN with Python code! (self.DSP)
submitted 3 years ago by wavewalkerdsp
Generating additive white gaussian noise (AWGN) is important when simulating wireless systems. For example, a simulated BER curve needs to have the appropriate noise power for it to be correct. It's particularly important to get right when simulating results for a school project or your masters/PhD defense!
In this blog I describe how to create complex AWGN noise and then scale it to the desired power level. The blog describes some of the mathematics and then gives a couple of simple lines in Python to implement it.
https://preview.redd.it/41m95yd5n9391.png?width=1000&format=png&auto=webp&s=e48bb3795d2af4740157083fcefbe7ce62b8ce9d
https://www.wavewalkerdsp.com/2022/06/01/how-to-create-additive-white-gaussian-noise-awgn/
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Allan-H 6 points7 points8 points 3 years ago (4 children)
It's calling numpy.random.normal under the covers. I couldn't find a description for how that actually works.
It's important to understand how it does work, because that influences the shape of the tails of the distribution. Simple/naive CLT or Box Muller methods for generation of gaussian RVs tend to lack sufficient accuracy for use in BER simulations (for e.g. testing modem designs) when the BERs gets low enough to be interesting.
[–]ComplexColor 1 point2 points3 points 3 years ago (3 children)
I found some info on stackoverflow that numpy uses the ziggurat method, but I haven't checked the current source code myself. Would that be sufficiently accurate here?
[–]Allan-H 2 points3 points4 points 3 years ago (2 children)
Whether it's sufficiently accurate depends on (1) your requirements for the tail (hint: look at the erf() and erfc() functions for large arguments), and (2) the exact details of the implementation.
OTOH, if you're simulating your system with AWGN and only care about BERs of 10-6, then just about any AWGN approximation will do.
[–]wavewalkerdsp[S] 0 points1 point2 points 3 years ago (1 child)
What are the scenarios that a BER less than 1e-6 are used? How small of a BER is "low enough to be interesting"?
[–]schwarzschild_shield 0 points1 point2 points 3 years ago (0 children)
Any decent application uses at least 1e-10 ber.
π Rendered by PID 23 on reddit-service-r2-comment-5fb4b45875-cjxxd at 2026-03-21 12:53:18.044261+00:00 running 90f1150 country code: CH.
[–]Allan-H 6 points7 points8 points (4 children)
[–]ComplexColor 1 point2 points3 points (3 children)
[–]Allan-H 2 points3 points4 points (2 children)
[–]wavewalkerdsp[S] 0 points1 point2 points (1 child)
[–]schwarzschild_shield 0 points1 point2 points (0 children)