forked from stpaine/FERS
-
Notifications
You must be signed in to change notification settings - Fork 1
WGN Generator
David Young edited this page Apr 30, 2025
·
1 revision
The WgnGenerator class provides a mechanism for generating a continuous stream of Additive White Gaussian Noise (WGN) samples. It conforms to the common NoiseGenerator interface defined in noise_generators.h. This allows it to be plugged into various parts of the simulation where a sequence of random noise values following a Gaussian (Normal) distribution is required, most commonly for simulating thermal noise effects in receivers.
- Gaussian Model Appropriateness: Assumes that a Gaussian (Normal) distribution is the correct statistical model for the noise phenomenon being simulated (e.g., thermal noise).
-
Standard Deviation Accuracy: Assumes the standard deviation (
stddev) parameter provided during its construction or use accurately represents the desired noise power or amplitude scale. -
Underlying Distribution Quality: Assumes the
std::normal_distributionimplementation within the C++ standard library provides a statistically sound approximation of a true Gaussian distribution for simulation purposes. -
RNG Quality: Assumes the underlying pseudo-random number generator (RNG), initialized via
ensureInitialized(likelystd::mt19937), provides sufficiently high-quality and statistically random bits for thestd::normal_distributionto function correctly.
- Pseudo-Randomness: As with all standard software generators, this produces pseudo-random numbers based on a deterministic algorithm initialized by a seed. The sequence is repeatable if the same seed is used, and not truly random.
-
Finite Precision: The generated noise samples are represented using floating-point numbers (
RealType), which have inherent precision limitations. - Statistical Imperfections: For any finite number of samples generated, the sequence may exhibit minor statistical deviations from a perfect theoretical Gaussian distribution.
- 'White' Noise Spectrum: This generator produces samples intended to be uncorrelated ('white' noise). It does not inherently model frequency-dependent noise characteristics (colored noise) β that requires different generator types (like Multirate (1-over-f alpha) Noise Model).
- Code:
noise_generators.h::WgnGenerator(Class Definition) - Code:
noise_generators.h::NoiseGenerator(Interface Definition) - Code:
noise_utils.cpp::ensureInitialized(Handles RNG Initialization) - Code:
noise_utils.cpp::normal_dist - Feature: RNG Initialization and Seeding
- External: C++
<random>library (std::normal_distribution)
- Needs Verification: The statistical properties of the generated noise stream from this class instance require explicit validation. Basic usage confirmed, but output distribution not formally tested.
-
Key Areas for Validation:
- Confirm the mean of a large number of generated samples is statistically close to zero.
- Confirm the variance of a large number of generated samples matches the square of the input standard deviation parameter used during construction/use.
- Analyze the distribution shape of generated samples (e.g., using histograms, statistical normality tests) to verify it approximates a Gaussian distribution.
- Verify the 'whiteness' property by checking that the autocorrelation of the generated sequence is negligible for lags greater than zero.
- Test and document the behavior when the input standard deviation is very close to or equal to zero.
- Priority: Medium (Fundamental for accurate noise floor simulation, but relies on standard library components assumed to be reasonably correct).