| 43 | 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. |
| 44 | |
| 45 | For example to simulate a perfect (noiseless) link, set the noise power to zero: |
| 46 | [{{ |
| 47 | rx_vec_air = tx_vec_air + 0*complex(randn(1,length(tx_vec_air)), randn(1,length(tx_vec_air))); |
| 48 | }}} |
| 49 | |
| 50 | The script also prints statistics about the experiment to the MATLAB command prompt: |
| 51 | {{{ |
| 52 | Results: |
| 53 | Num Bytes: 4560 |
| 54 | Sym Errors: 0 (of 9120 total symbols) |
| 55 | Bit Errors: 0 (of 36480 total bits) |
| 56 | EVM: 3.912% |
| 57 | LTS CFO Est: -0.26 kHz |
| 58 | }}} |
| 59 | |
| 60 | |
| 61 | === Hardware in the Loop === |
| 62 | 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 [wiki:../QuickStart WARPLab Quick Start] if you have not yet setup WARPLab. |
| 63 | |
| 64 | 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: |
| 65 | |
| 66 | |
| 67 | || [[Image(wl_ofdm_plots_sim_txIQ.png,nolink)]][[BR]]Transmitted waveform || [[Image(wl_ofdm_plots_sim_rxIQ.png,nolink)]] [[BR]]Received waveform || [[Image(wl_ofdm_plots_sim_ltsCorr.png,nolink)]] [[BR]]Preamble correlation results (peaks indicate locations of preamble LTS) || |
| 68 | || [[Image(wl_ofdm_plots_sim_chanEst.png,nolink)]] [[BR]]Channel estimate per subcarrier (I/Q components and complex magnitude) || [[Image(wl_ofdm_plots_sim_phaseError.png,nolink)]] [[BR]]Phase error per OFDM symbol based on pilot tones || [[Image(wl_ofdm_plots_sim_constellations.png,nolink)]] [[BR]]Tx and Rx constellations || |
| 69 | |