User Input
+---------------------------+
| # Subcarriers (Nsc) |
| # OFDM Symbols (Nsym) |
| DMRS length (Ldmrs) |
| # Channel taps |
| Noise std deviation |
+---------------------------+
|
v
Generate DMRS Pilot Sequence
+---------------------------+
| QPSK symbols of length Ldmrs
| e.g., [1+j, -1+j, ...]
+---------------------------+
|
v
Frequency-Domain Mapping
+---------------------------+
| Zero-pad DMRS to all Nsc <-- Pilot insertion
| DMRS on first Ldmrs, rest 0
| X[k] = [DMRS, 0, 0, ..., 0]
+---------------------------+
|
v
OFDM Modulation (IFFT)
+---------------------------+
| Time-domain OFDM symbol
| Each subcarrier → sinusoid
+---------------------------+
|
v
Add Cyclic Prefix (CP)
+---------------------------+
| Prepend CP to symbol
| Prevents ISI in multipath
+---------------------------+
|
v
Transmit Through Channel
+---------------------------+
| Frequency-selective multipath
| Complex channel taps (amplitude + phase)
| Add AWGN noise
+---------------------------+
|
v
Receiver
+---------------------------+
| Remove CP
| Apply FFT → Frequency-domain received symbols
| Y[k] = FFT(received symbol)
+---------------------------+
|
v
Channel Estimation Using DMRS
+---------------------------+
| For DMRS subcarriers only:
| H_hat[k] = Y[k] / X[k]
| Gives per-subcarrier complex channel
+---------------------------+
|
v
Optional: Interpolation to non-pilot subcarriers
|
v
Plots & Visualization
+---------------------------+
| Time-domain: Tx & Rx signals
| Frequency-domain: Rx FFT magnitude
| Channel estimate: |H_hat[k]|
+---------------------------+
5G NR DMRS-Based OFDM Simulator (QPSK)
5G NR DMRS-Based OFDM Simulation Workflow
- User Input: Set number of subcarriers, OFDM symbols, DMRS length, channel taps, and noise level.
- DMRS Generation: Create a QPSK pilot sequence for channel estimation.
- Frequency-Domain Mapping: Insert DMRS pilots into subcarriers; zero-pad remaining subcarriers.
- OFDM Modulation: Apply IFFT to produce time-domain symbols, then add cyclic prefix (CP).
- Channel Transmission: Pass the signal through multipath channel taps and add AWGN noise.
- Receiver Processing: Remove CP and perform FFT to recover frequency-domain symbols.
-
Channel Estimation: Estimate per-subcarrier complex gain using DMRS:
Ĥ[k] = Y[k] / X[k]. - Visualization: Plot transmitted and received signals, correlation magnitude, and estimated channel.
Note: Current demo transmits only DMRS pilots (no data) for simplicity. Adding data symbols enables a full PHY-level simulation.