Version 4 (modified by murphpo, 10 years ago) (diff) |
---|
WARPLab 7
- Downloads
Getting Started
- Sample Buffer Sizes
- Automatic Gain Control
- Examples
- Extending WARPLab
- Debugging Errors
- Porting Code
- Benchmarks
WARPLab 7 Framework
WARPLab 7 Reference Design
Reference Design Modules
- Node
Interface Group
Baseband
Transport
Trigger Manager
Hardware
WARPLab 7 Example: SISO OFDM
File: wl_example_siso_ofdm_txrx.m
This WARPLab example implements a SISO OFDM transmitter and receiver.
Transmitter
The OFDM transmitter code implements the following functions:
- Random data generation
- Modulation of random data to complex constellation symbols
- Mapping of symbols to data-bearing subcarriers
- Insertion of pilot tones in pilot subcarriers
- Inverse fast Fourier transform (IFFT)
- Cyclic prefix insertion
- Preamble construction and insertion
- Interpolation by 2x
Receiver
The OFDM receiver code implements the following functions:
- LTS correlation for synchronization
- CFO estimation and correcting use time-domain estimation from LTS
- Cyclic prefix removal
- Fast Fourier transform (FFT)
- Channel estimation from frequency-domain LTS
- Residual phase error estimation from frequency-domain pilot tones
- Equalization of data-bearing subcarriers using channel estimates and phase error estimates
- Demodulation of complex symbols to data values
Running the Example
The WARPLab OFDM example can be used in simulation only mode and in hardware-in-the-loop mode.
Simulation
To use the example in simulation mode set the top-level param USE_WARPLAB_TXRX = 0;, then run the m-script. When the script finishes 6 plots will show:
Transmitted waveform | Received waveform | Preamble correlation results (peaks indicate locations of preamble LTS) |
Channel estimate per subcarrier (I/Q components and complex magnitude) | Phase error per OFDM symbol based on pilot tones | Tx and Rx constellations |
By default the simulation script applies AWGN with an arbitrary fixed SNR. You can change the simulated propagation characteristics in the m-code. Search for AWGN and apply whatever Tx->Rx degradations you like.
For example to simulate a perfect (noiseless) link, set the noise power to zero: rx_vec_air = tx_vec_air + 0*complex(randn(1,length(tx_vec_air)), randn(1,length(tx_vec_air))); .
The script also prints statistics about the experiment to the MATLAB command prompt:
Results: Num Bytes: 4560 Sym Errors: 0 (of 9120 total symbols) Bit Errors: 0 (of 36480 total bits) EVM: 3.912% LTS CFO Est: -0.26 kHz
Hardware in the Loop
To use the example with WARP hardware you will need two WARP nodes each running WARPLab 7.3 (or later) and a WARPLab environment setup on your PC. Refer to the WARPLab Quick Start? if you have not yet setup WARPLab.
To target WARP hardware set the top-level param USE_WARPLAB_TXRX = 1;, then run the m-script. When the script finishes 6 plots will show:
Transmitted waveform | Received waveform | Preamble correlation results (peaks indicate locations of preamble LTS) |
Channel estimate per subcarrier (I/Q components and complex magnitude) | Phase error per OFDM symbol based on pilot tones | Tx and Rx constellations |
Limitations
This example is intended as a staring point for researchers wishing to use WARPLab to prototype a wireless communications link. This examples does not implement some some blocks common in deployed OFDM systems, such as scrambling, interleaving and error correcting coding. For an example of a real-time OFDM implementation that implements all of these subsystems, please see the PHY in the 802.11 Reference Design.
Attachments (28)
- wl_ofdm_plots_hw_rxIQ.png (21.5 KB) - added by murphpo 10 years ago.
- wl_ofdm_plots_hw_txIQ.png (21.1 KB) - added by murphpo 10 years ago.
- wl_ofdm_plots_hw_chanEst.png (13.6 KB) - added by murphpo 10 years ago.
- wl_ofdm_plots_hw_constellations.png (18.8 KB) - added by murphpo 10 years ago.
- wl_ofdm_plots_hw_ltsCorr.png (27.6 KB) - added by murphpo 10 years ago.
- wl_ofdm_plots_hw_phaseError.png (14.4 KB) - added by murphpo 10 years ago.
- wl_ofdm_plots_hw_rxIQ.2.png (21.0 KB) - added by murphpo 10 years ago.
- wl_ofdm_plots_hw_txIQ.2.png (21.1 KB) - added by murphpo 10 years ago.
- wl_ofdm_plots_sim_chanEst.png (13.0 KB) - added by murphpo 10 years ago.
- wl_ofdm_plots_sim_constellations.png (17.0 KB) - added by murphpo 10 years ago.
- wl_ofdm_plots_sim_ltsCorr.png (25.9 KB) - added by murphpo 10 years ago.
- wl_ofdm_plots_sim_phaseError.png (14.7 KB) - added by murphpo 10 years ago.
- wl_ofdm_plots_sim_rxIQ.png (21.4 KB) - added by murphpo 10 years ago.
- wl_ofdm_plots_sim_txIQ.png (21.1 KB) - added by murphpo 10 years ago.
- wl_ofdm_blkDiag_Rx.png (15.6 KB) - added by murphpo 10 years ago.
- wl_ofdm_blkDiag_Tx.png (9.7 KB) - added by murphpo 10 years ago.
- Cy_PEy_Sy_phaseError.png (16.2 KB) - added by chunter 9 years ago.
- Cy_PEy_Sy_evm.png (33.3 KB) - added by chunter 9 years ago.
- Cy_PEy_Sy_constellations.png (18.2 KB) - added by chunter 9 years ago.
- Cy_PEy_Sn_phaseError.png (10.4 KB) - added by chunter 9 years ago.
- Cy_PEy_Sn_evm.png (40.3 KB) - added by chunter 9 years ago.
- Cy_PEy_Sn_constellations.png (39.2 KB) - added by chunter 9 years ago.
- Cn_PEy_Sy_phaseError.png (16.9 KB) - added by chunter 9 years ago.
- Cn_PEy_Sy_evm.png (42.8 KB) - added by chunter 9 years ago.
- Cn_PEy_Sy_constellations.png (21.7 KB) - added by chunter 9 years ago.
- Cn_PEn_Sy_phaseError.png (14.1 KB) - added by chunter 9 years ago.
- Cn_PEn_Sy_evm.png (64.8 KB) - added by chunter 9 years ago.
- Cn_PEn_Sy_constellations.png (53.0 KB) - added by chunter 9 years ago.
Download all attachments as: .zip