Changes between Version 1 and Version 2 of 802.11/wlan_exp/examples/chan_est_viewer


Ignore:
Timestamp:
Apr 14, 2014, 2:09:49 PM (10 years ago)
Author:
murphpo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 802.11/wlan_exp/examples/chan_est_viewer

    v1 v2  
    1818This 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].
    1919
    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)
     20There are two steps for this example:
     21 *'''Python''': to convert raw log data to OFDM Rx data
     22 *'''MATLAB''': to read OFDM Rx data and display channel estimates
    2123
    2224== Python ==
    2325
    24 The Python script is
     26The first step is to use Python to create a MATLAB-compatible file of OFDM Rx events.
    2527
     28This process requires a raw log file from an 802.11 Reference Design node. You can generate your own log file, or use one of our sample log files. To use a sample log file you must first download the sample data files. Please refer to [wiki:../../sample_data the sample data] page of this guide for details.
    2629
     30The instructions below assume you are using the {{{raw_log_one_flow.hdf5}}} sample log file.
    2731
    28  will execute the Python script to process the raw log data. By default this script:
     321. Open a terminal and CD to the {{{Python_Reference/examples/chan_est_viewer}}} directory in the expanded reference design archive
     331. Run {{{python chan_ests_to_HDF5.py raw_log_one_flow.hdf5}}}
     34
     35The {{{chan_ests_to_HDF5.py}}} script runs a simple processing flow:
    2936 * Reads every OFDM Rx event from the log file
    3037 * 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
     38 * Identifies the MAC address with the most receptions
     39 * Creates a new NumPy array containing all the OFDM Rx events from that address
    3240 * Saves this NumPy array to an HDF5 file
    3341
     42The script output will be similar to:
     43{{{
     44WLAN Exp Log Example: OFDM Rx Entry Exporter
     45Reading sample log file 'raw_log_one_flow.hdf5' (  9.6 MB)
    3446
     47Found 18625 receptions from ff:ff:ff:ff:00:00
     48Genereating HDF5 file np_rx_ofdm_entries.hdf5
     49}}}
    3550
    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
     51A new local file will be created named {{{np_rx_ofdm_entries.hdf5}}}. This is an HDF5 file suitable for import into MATLAB.
    4352
     53== MATLAB ==
     54The second phase of this example uses the HDF5 file containing OFDM Rx events which was generated by the Python script above. We have created a simple MATLAB GUI that reads this file, shows the list of OFDM Rx events and displays the OFDM channel estimates for selected packets.
    4455
     56To run the GUI:
     571. Start MATLAB (tested with R2011b or later)
     581. CD to the {{{Python_Reference/examples/chan_est_viewer}}} directory in the expanded reference design archive
     591. Run the MATLAB script {{{ofdm_chan_est_viewer('np_rx_ofdm_entries.hdf5')}}}
    4560
     61This will read the data file {{{np_rx_ofdm_entries.hdf5}}} and display a GUI:
    4662
    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
     63[[Image(chan_est_gui.png, width=800)]]
    5064
     65Click on any of the OFDM Rx events in the list to plot their channel estimate magnitudes and phase:
    5166
     67[[Image(chan_est_gui_sel.png, width=800)]]
    5268
    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.
     69== Next Steps ==