| 1 | {{{#!comment |
| 2 | [[Include(wiki:802.11/beta-note)]] |
| 3 | }}} |
| 4 | |
| 5 | [[TracNav(802.11/TOC)]] |
| 6 | |
| 7 | = 802.11 Reference Design: Channel Estimate Viewer = |
| 8 | |
| 9 | This example of the Experiments Framework translates OFDM Rx events from a node log to a MATLAB-compatible format, then displays the logged channel estimates in a MATLAB GUI. |
| 10 | |
| 11 | This examples demonstrates how to: |
| 12 | * Read raw log data from an HDF5 file |
| 13 | * Process and filter the log data to construct an array of OFDM Rx events |
| 14 | * Save the Rx events to a MATLAB-compatible HDF5 file |
| 15 | * Load the Rx data into MATLAB |
| 16 | * View the OFDM channel estimates in a MATLAB GUI |
| 17 | |
| 18 | This example requires a log file that contains OFDM Rx events. You can generate your own log file (see the [wiki:../txrx_log Tx/Rx Log Example]) or use one of our [wiki:../ sample log files]. |
| 19 | |
| 20 | There are two steps for this example- Python (to convert raw log data to OFDM Rx data) and MATLAB (to read OFDM Rx data and display channel estimates) |
| 21 | |
| 22 | == Python == |
| 23 | |
| 24 | The Python script is |
| 25 | |
| 26 | |
| 27 | |
| 28 | will execute the Python script to process the raw log data. By default this script: |
| 29 | * Reads every OFDM Rx event from the log file |
| 30 | * Counts the number of receptions from each unique MAC address |
| 31 | * Creates a new NumPy array containing the OFDM Rx events from the most common source |
| 32 | * Saves this NumPy array to an HDF5 file |
| 33 | |
| 34 | |
| 35 | |
| 36 | To run this example: |
| 37 | * Setup wlan_exp (see [wiki:../../GettingStarted Getting Started] for details) |
| 38 | * Open a Python shell |
| 39 | * CD to the '''Python_Reference/Examples/chan_est_viewer''' directory from the expanded 802.11 Reference design archive |
| 40 | * Run {{{python chan_ests_to_HDF5.py LOG_HDF5_FILE OUTPUT_HDF5_FILE}}} |
| 41 | * Replace {{{LOG_HDF5_FILE}}} with the raw log file name ({{{XXX}}} if using our sample data) |
| 42 | * Replace {{{OUTPUT_HDF5_FILE}}} with the name for the new Rx-events-only HDF5 file |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | * Open MATLAB |
| 48 | * CD to the '''Python_Reference/Examples/chan_est_viewer''' directory from the expanded 802.11 Reference design archive |
| 49 | * Run {{{ofdm_chan_est_viewer('OUTPUT_HDF5_FILE')}}}, using the OUTPUT_HDF5_FILE name you chose above |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | ---- |
| 56 | |
| 57 | The [source:/ReferenceDesigns/w3_802.11/python/examples/throughput_two_nodes.py latest version of the throughput_two_nodes.py script] is also shown below. |