+------------------------+
| Start Simulation |
+------------------------+
|
v
+------------------------+
| Read User Inputs: |
| - Signal Length |
| - Noise Std Dev |
| - Lag (Samples) |
+------------------------+
|
v
+------------------------+
| Generate Pilot Sequence | |
+------------------------+
|
v
+------------------------+
| Apply Random Channel |
| (Complex Gain h) |
+------------------------+
|
v
+------------------------+
| Add AWGN Noise |
+------------------------+
|
v
+------------------------+
| Apply Artificial Lag on Received signal|
| (Shift rx by n samples|
| with zeros) |
+------------------------+
|
v
+------------------------+
| Perform Correlation of Rx Signal and Pilot Signal | |
+------------------------+
|
v
+------------------------+
| Compute Magnitude of |
| Correlation Output |
+------------------------+
|
v
+------------------------+
| Find Peak Index |
| (Timing Offset) |
+------------------------+
|
v
+------------------------+
| Channel Estimation at |
| Peak Timing |
+------------------------+
|
v
+------------------------+
| Plot Signals & |
| Correlation Output |
+------------------------+
|
v
+------------------------+
| End |
+------------------------+
Correlation Online Simulator
In the simulation above, you can adjust the "Signal Lag (Samples)" parameter to observe how the correlation peaks shift with delayed reception. The simulation uses a baseband QPSK (Quadrature Phase Shift Keying) pilot sequence to demonstrate pilot correlation and timing offset detection. This setup illustrates key concepts in digital communications, including channel effects, noise impact, and peak detection in a sliding correlation receiver.