|
Jakes' Sum-of-Sinusoids Model Visualization
This interactive tutorial demonstrates Jakes' sum-of-sinusoids model, which is the mathematical foundation for generating Rayleigh fading in wireless communication systems. Unlike black-box fading generators, this visualization shows exactly how multiple sinusoids combine to create the characteristic fading patterns observed in real-world channels.
The tutorial features three synchronized visualization panels that work together to explain the physics and mathematics of Jakes' model. The Spatial View shows the physical world: incoming rays from different angles arriving at a receiver. The Phasor Sum panel visualizes the mathematical operation: adding complex vectors tip-to-tail in the complex plane, with two complementary views (tip-to-tail and all from origin). The Time Domain panel shows the resulting magnitude envelope, revealing the deep fades (notches) characteristic of Rayleigh fading.
The key insight is that Jakes' model generates fading by summing N sinusoids, each representing a multipath component arriving from a different angle. Each path has a different Doppler shift based on its angle of arrival, creating constructive and destructive interference. As you increase the number of paths (N), you can observe the transition from a simple sine wave (N=1) to a beating pattern (N=2) to chaotic Rayleigh fading (N≥10).
NOTE : The visualization uses a simplified Jakes model where each path contributes equally. In the full Jakes model, paths are typically weighted, but this simplified version captures the essential physics. The tip-to-tail vector addition in the complex plane is the key to understanding why fading occurs: when many vectors point in different directions, their sum can be very small (deep fade) or very large (peak), creating the random envelope characteristic of Rayleigh fading.
Mathematical Model
Jakes' model generates the time-varying channel coefficient H(t) by summing N complex exponentials:
H(t) = (1/√N) Σn=1N ej(2πfdcos(αn)t + φn)
where:
- N: Number of paths (multipath components)
- αn: Angle of arrival for path n, uniformly distributed: αn = 2πn/N
- fd: Maximum Doppler frequency (controlled by Doppler Speed slider)
- φn: Initial phase for path n (random, uniformly distributed in [0, 2π])
- ωn: Doppler shift for path n = 2πfdcos(αn)
Physical Interpretation: Each term in the sum represents a multipath component arriving from angle αn. The Doppler shift ωn depends on the angle of arrival because the relative velocity between transmitter and receiver varies with direction. Components arriving from the direction of motion experience maximum Doppler shift, while components arriving perpendicular to motion experience zero Doppler shift.
Tip-to-Tail Addition: In the complex plane, each path contributes a rotating vector (phasor). The total channel H(t) is the vector sum of all N phasors. The tip-to-tail visualization shows how adding these vectors creates constructive interference (when vectors align) and destructive interference (when vectors cancel), resulting in the random magnitude envelope characteristic of Rayleigh fading.
Rayleigh Distribution: When N is large (N≥10), the magnitude |H(t)| follows a Rayleigh distribution, and the phase is uniformly distributed. This matches the statistical properties observed in real-world multipath channels with no dominant Line of Sight component.
Usage Example
Follow these steps to explore Jakes' model:
-
Initial State: When you first load the simulation, you'll see three visualization panels stacked vertically. The top panel shows the Spatial View (incoming rays), the middle panel shows the Phasor Sum with two side-by-side plots (tip-to-tail and all from origin), and the bottom panel shows the Time Domain (magnitude envelope). By default, N=1 path is selected, showing a single rotating vector. Click "Play" to start the animation.
-
Observe N=1 (Pure Sine Wave): With N=1, you'll see one ray in the Spatial View, one vector in both Phasor Sum plots, and a flat line in the Time Domain (constant magnitude). This demonstrates that a single sinusoid produces no fading - the magnitude remains constant. The vector simply rotates in a circle. Notice how both phasor plots show the same vector, but from different perspectives.
-
Observe N=2 (Beating Pattern): Increase N to 2 using the slider. You'll see two rays arriving from opposite sides (180° apart), two vectors in the Phasor Sum plots, and a sinusoidal beating pattern in the Time Domain. This shows how two sinusoids with different frequencies create a periodic envelope (beating). The left plot shows tip-to-tail addition, while the right plot shows both vectors starting from the origin.
-
Observe N=10+ (Rayleigh Fading): Increase N to 10 or more. You'll see many rays uniformly distributed around the circle, a complex tip-to-tail chain in the left Phasor Sum plot (like a snake), all vectors radiating from the origin in the right plot, and chaotic deep fades in the Time Domain. This demonstrates how many sinusoids create the random envelope characteristic of Rayleigh fading. Notice how the red dot (total H) follows a random walk in the complex plane. The plots automatically rescale to keep all vectors visible.
-
Understand Tip-to-Tail Addition: Watch the left Phasor Sum plot carefully. Each colored vector represents one path. The vectors are added tip-to-tail: V₁ starts at origin, V₂ starts at the tip of V₁, V₃ starts at the tip of V₂, etc. The red dot at the final tip is the total channel H(t). When many vectors point in different directions, their sum can be very small (deep fade) or very large (peak), creating the random envelope.
-
Compare with Origin Plot: The right Phasor Sum plot shows all vectors starting from the origin (traditional phasor diagram). This makes it easier to see how vectors combine to form the total H(t). Compare this with the tip-to-tail plot to understand both visualization methods. The red vector in the origin plot shows the total H(t) directly from the origin.
-
Observe Deep Fades: In the Time Domain panel, watch for deep notches (negative dB values). These occur when the tip-to-tail chain loops back near the origin, causing destructive interference. The magnitude drops dramatically, which is why Rayleigh fading is so problematic for wireless communication.
-
Use Step Controls: Use the "Step Back" and "Step Forward" buttons to move through the simulation frame by frame. This allows you to carefully examine how vectors change at each time step. The step buttons automatically pause the animation if it's playing. Use "Play" for continuous animation.
-
Adjust Doppler Speed: Use the Doppler Speed slider to control how fast the vectors rotate. Higher values make the vectors spin faster, creating more rapid fading. Lower values create slower, more gradual changes. Observe how this affects both Phasor Sum plots (faster rotation) and the Time Domain (more frequent deep fades).
-
Pause and Examine: Click "Pause" to freeze the animation. You can examine the current state of all vectors and see exactly how they add up to create the current channel value. Click "Play" again to resume.
-
Compare Different N Values: Try different values of N to see the transition: N=1 (constant), N=2 (beating), N=5 (moderate fading), N=20 (strong Rayleigh fading). This demonstrates how the number of paths affects the fading statistics. Notice how the plots automatically rescale to keep all vectors visible regardless of N.
Tip: The key insight is that Rayleigh fading is not truly random - it's the deterministic sum of many sinusoids. The randomness comes from the random initial phases and the complex interactions between many rotating vectors. The tip-to-tail visualization (left plot) is crucial: it shows that when many vectors point in different directions, their sum follows a random walk in the complex plane, creating the characteristic Rayleigh distribution. The origin plot (right plot) provides a complementary view, showing all vectors from a common starting point. Use the step controls to move frame-by-frame and see exactly how vectors combine. Try pausing at different moments to see how the vectors align or cancel, and observe how this correlates with peaks and fades in the Time Domain plot. The plots automatically rescale based on the number of paths, ensuring all vectors remain visible.
Parameters
Followings are short descriptions on each parameter
-
Number of Paths (N): Controls how many multipath components are included in the Jakes model (range: 1 to 50, default: 1). Each path represents a signal arriving from a different angle. When N=1, you get a pure sine wave with constant magnitude (no fading). When N=2, you get a beating pattern (periodic envelope). When N≥10, you get chaotic Rayleigh fading with deep notches. This parameter directly controls the complexity of the fading pattern.
-
Doppler Speed (fd): Controls the maximum Doppler frequency (range: 0.1 to 5.0, default: 1.0). This determines how fast each path's phase rotates. Higher values create faster rotation, leading to more rapid fading. The actual Doppler shift for each path n is calculated as ωn = 2πfdcos(αn), where αn is the angle of arrival. Paths arriving from the direction of motion (α=0°) experience maximum Doppler shift. Paths arriving perpendicular (α=90°) experience zero Doppler shift.
-
Angle of Arrival (αn): For each path n, the angle of arrival is uniformly distributed: αn = 2πn/N. This ensures that paths arrive from all directions uniformly around the receiver. In the Spatial View, you can see these angles as rays pointing toward the center receiver.
-
Initial Phase (φn): Each path starts with a random initial phase, uniformly distributed in [0, 2π]. This randomness, combined with the different Doppler shifts, creates the chaotic behavior characteristic of Rayleigh fading. The phases are fixed at initialization and do not change during the simulation.
-
Channel Coefficient H(t): The total channel is the sum of all N complex exponentials: H(t) = (1/√N) Σ ej(ωnt + φn). The normalization factor 1/√N ensures that the average power remains constant regardless of N. The magnitude |H(t)| follows a Rayleigh distribution when N is large, and the phase is uniformly distributed.
-
Automatic Scaling: The phasor plots automatically rescale based on the number of paths to ensure all vectors remain visible within the canvas boundaries. The scaling formula uses 1/(numPaths/4) to provide optimal visibility. When you change the number of paths, the scale updates automatically, so vectors are always properly sized regardless of whether you have 1 path or 50 paths.
Controls and Visualizations
Followings are short descriptions on each control
-
Number of Paths Slider: Adjustable slider (range: 1 to 50, default: 1) that controls how many multipath components are included in the Jakes model. The current value is displayed next to the slider. Increasing N adds more paths, each arriving from a different angle. This directly affects the complexity of the fading pattern: N=1 (constant), N=2 (beating), N≥10 (Rayleigh fading).
-
Doppler Speed Slider: Adjustable slider (range: 0.1 to 5.0, default: 1.0) that controls the maximum Doppler frequency fd. The current value is displayed next to the slider. Higher values make the vectors rotate faster, creating more rapid fading. Lower values create slower, more gradual changes. Each path's actual Doppler shift depends on its angle of arrival.
-
Step Backward Button: Steps the simulation backward by a small time increment (0.01 seconds). This allows you to move through the simulation frame by frame in reverse. The button automatically pauses the animation if it's playing. Useful for carefully examining how vectors change over time.
-
Step Forward Button: Steps the simulation forward by a small time increment (0.01 seconds). This allows you to move through the simulation frame by frame. The button automatically pauses the animation if it's playing. Useful for carefully examining how vectors combine at each time step.
-
Play/Pause Button: Toggles the animation on and off. When playing, all panels update in real-time. When paused, you can examine the current state of all vectors and the channel value. This is useful for understanding how the tip-to-tail addition works at a specific moment.
-
Spatial View Panel: The top panel shows the physical world: a central receiver (Rx) point with incoming rays (arrows) from different angles. Each ray represents one multipath component. The rays are color-coded based on their current phase, creating a cycling color effect as the waves propagate. The angle of arrival (αn) is labeled for the first few paths. This visualization connects the physical geometry (angles) to the mathematical model.
-
Phasor Sum Panel: The middle panel contains two side-by-side plots showing the complex plane (Real vs Imaginary axes):
- Left Plot (Tip-to-Tail): Shows the tip-to-tail vector addition. Each colored vector represents one path's contribution. The vectors are added sequentially: V₁ starts at origin, V₂ starts at V₁'s tip, V₃ starts at V₂'s tip, etc. The red dot at the final tip represents the total channel H(t). This visualization is the key to understanding why fading occurs: when many vectors point in different directions, their sum can be very small (deep fade) or very large (peak).
- Right Plot (All from Origin): Shows all vectors starting from the origin (traditional phasor diagram). Each colored vector represents one path, and all vectors radiate from the center. The red vector shows the total H(t) directly from the origin. This complementary view makes it easier to see how vectors combine to form the total channel.
Both plots use the same color coding for vectors and automatically rescale based on the number of paths to ensure all vectors remain visible. The first few vectors are labeled (V₁, V₂, etc.) for clarity.
-
Time Domain Panel: The bottom panel shows a scrolling line graph of the magnitude |H(t)| in decibels (20 log₁₀). The X-axis represents time, and the Y-axis represents magnitude in dB. As the simulation runs, the graph scrolls from left to right, showing the magnitude envelope. Deep fades appear as notches (negative dB values), while peaks appear as high positive values. This demonstrates the characteristic Rayleigh fading pattern with random deep fades that are problematic for wireless communication.
Key Concepts
-
Sum of Sinusoids: Jakes' model generates fading by summing N complex exponentials (sinusoids), each representing a multipath component. Each sinusoid has a different frequency (Doppler shift) based on its angle of arrival. The key insight is that fading is not truly random - it's the deterministic sum of many rotating vectors.
-
Tip-to-Tail Vector Addition: In the complex plane, each path contributes a rotating vector (phasor). The total channel H(t) is found by adding these vectors tip-to-tail. The left Phasor Sum plot visualizes this: it shows that when many vectors point in different directions, their sum follows a random walk, creating the characteristic Rayleigh distribution. When vectors align (constructive interference), the magnitude is large. When vectors cancel (destructive interference), the magnitude is small (deep fade). The right plot shows all vectors from the origin, providing a complementary view that makes it easier to see how vectors combine.
-
Automatic Scaling: Both phasor plots automatically rescale based on the number of paths. The scaling formula (1/(numPaths/4)) ensures that all vectors remain visible within the canvas boundaries, regardless of whether you have 1 path or 50 paths. The scale is calculated once when the number of paths changes, ensuring optimal visibility without manual adjustment.
-
Step-by-Step Analysis: The step forward and step backward buttons allow you to move through the simulation frame by frame (0.01 second increments). This is invaluable for understanding exactly how vectors combine at each moment. When stepping, the animation automatically pauses, allowing you to carefully examine the current state before proceeding.
-
Angle-Dependent Doppler Shift: Each path's Doppler shift depends on its angle of arrival: ωn = 2πfdcos(αn). Paths arriving from the direction of motion (α=0°) experience maximum Doppler shift. Paths arriving perpendicular (α=90°) experience zero Doppler shift. This creates different rotation speeds for different paths, leading to complex interference patterns.
-
Transition from Simple to Complex: As N increases, the behavior transitions: N=1 (pure sine wave, constant magnitude), N=2 (beating pattern, periodic envelope), N=5-10 (moderate fading), N≥10 (strong Rayleigh fading with deep notches). This demonstrates how the number of paths affects fading statistics.
-
Deep Fades (Notches): In the Time Domain panel, deep fades appear as notches where the magnitude drops dramatically (negative dB values). These occur when the tip-to-tail chain loops back near the origin in the complex plane, causing destructive interference. The depth and frequency of these notches increase with N, making Rayleigh fading problematic for wireless communication.
-
Rayleigh Distribution: When N is large (N≥10), the magnitude |H(t)| follows a Rayleigh distribution, and the phase is uniformly distributed. This matches the statistical properties observed in real-world multipath channels with no dominant Line of Sight component. The Jakes model is specifically designed to produce these statistics.
-
Random Walk in Complex Plane: The red dot (total H) in the Phasor Sum panel follows a random walk in the complex plane. This is not true randomness - it's the deterministic result of adding many rotating vectors. However, the complexity makes it appear random, which is why Rayleigh fading is often modeled as a random process.
-
Real-Time Synchronization: All three panels update simultaneously in real-time. The Spatial View shows the physical rays, the Phasor Sum shows the mathematical addition, and the Time Domain shows the resulting magnitude. This synchronization helps you understand the connection between the physical world (angles), the mathematics (vector addition), and the result (fading envelope).
|
|