|
||
|
This tutorial visualizes the relationship between Gaussian and Rayleigh distributions in radio communications by simulating a complex baseband signal affected by Additive White Gaussian Noise (AWGN). The Gaussian distribution describes the noise on the Real (I) and Imaginary (Q) components; the Rayleigh distribution describes the envelope (magnitude R) when there is no line-of-sight (NLOS). Adding a direct path yields the Rician distribution. Mathematical FoundationComplex baseband. The received sample is z = I + j Q. With no LOS, I and Q are independent Gaussian random variables with mean 0 and variance σ2. The magnitude R = √(I2 + Q2) then follows a Rayleigh distribution, and the phase θ = atan2(Q, I) is uniform on [0, 2π). The component (Gaussian) and envelope (Rayleigh) densities are: Gaussian (I or Q): p(x) = (1 / (σ√(2π))) exp(−x2/(2σ2))
Rayleigh (R): p(r) = (r/σ2) exp(−r2/(2σ2)), r ≥ 0
The Rayleigh density is the distribution of the distance from the origin when (I, Q) is circular-symmetric Gaussian. Rician (LOS present). When a line-of-sight component of amplitude A is added (I = A + nI, Q = nQ), the magnitude follows a Rician distribution, parameterized by the K-factor (ratio of LOS to scattered power): p(r) = (r/σ2) exp(−(r2 + A2)/(2σ2)) I0(rA/σ2), K = 10 log10(A2/(2σ2)) dB
where I0 is the modified Bessel function of the first kind. As K → 0 the Rician becomes Rayleigh; as K → ∞ the envelope approaches a Gaussian around A. Box–Muller transform. Gaussian samples are generated from two uniforms U1, U2 on (0, 1]: I = σ√(−2 ln U1) cos(2πU2), Q = σ√(−2 ln U1) sin(2πU2)
SimulationThe interactive simulator is below. Use the controls to explore the concepts described above. Constellation: R density (top-left), I distribution (top), Q distribution (left), 2D I/Q cloud; red vector R, θ
Time domain: I (red), Q (blue), Envelope R (yellow)
PDF: Gaussian (I) and Rayleigh/Rician (R) with theoretical curves
Usageσ (sigma): Standard deviation of the Gaussian noise on I and Q. Increasing σ spreads the constellation cloud and widens the Rayleigh/Rician PDF. K (dB): K-factor (0–20 dB). At 0 dB the channel is Rayleigh (NLOS); as K increases, a line-of-sight component is added and the constellation shifts right; the magnitude PDF changes from Rayleigh to Rician. Freeze: Pause sampling to inspect the current frame; click again to resume. Constellation: Composite plot: top-left shows R density (envelope histogram, real-time); top strip shows I distribution (marginal, real-time); left strip shows Q distribution (marginal, real-time, S-curve); center is the 2D I/Q scatter and density. The red vector and dot mark the latest sample (magnitude R and phase θ). With K = 0 the cloud is centered at the origin (Rayleigh); with K > 0 it shifts toward (A, 0) (Rician). I/Q axes use a fixed scale so σ effect is visible. Time domain: Auto-scrolling trace of I (red), Q (blue), and envelope R (yellow); always shows the most recent 400 samples. Deep fades (R near zero) are common in Rayleigh and rarer in Rician. PDF: Left histogram is the I component with the theoretical Gaussian curve overlay; right histogram is the magnitude R with the theoretical Rayleigh (K = 0) or Rician (K > 0) curve. Histograms are normalized so area under bars is 1. Key Concepts
Limitations
|
||