wiki:802.11/wlan_exp/examples/chan_est_viewer

802.11 Reference Design: Channel Estimate Viewer

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.

This examples demonstrates how to:

  • Read raw log data from an HDF5 file
  • Process and filter the log data to construct an array of OFDM Rx events
  • Save the Rx events to a MATLAB-compatible HDF5 file
  • Load the Rx data into MATLAB
  • View the OFDM channel estimates in a MATLAB GUI

This example requires a log file that contains OFDM Rx events. You can generate your own log file (see the Tx/Rx Log Example) or use one of our sample log files.

There are two steps for this example:

  • Python: to convert raw log data to OFDM Rx data
  • MATLAB: to read OFDM Rx data and display channel estimates

Python

The first step is to use Python to create a MATLAB-compatible file of OFDM Rx events.

This 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 the sample data page of this guide for details.

The instructions below assume you are using the raw_log_one_flow.hdf5 sample log file.

  1. Open a terminal and CD to the Python_Reference/examples/chan_est_viewer directory in the expanded reference design archive
  2. Run python chan_ests_to_HDF5.py raw_log_one_flow.hdf5

The chan_ests_to_HDF5.py script runs a simple processing flow:

  • Reads every OFDM Rx event from the log file
  • Counts the number of receptions from each unique MAC address
  • Identifies the MAC address with the most receptions
  • Creates a new NumPy array containing all the OFDM Rx events from that address
  • Saves this NumPy array to an HDF5 file

The script output will be similar to:

WLAN Exp Log Example: OFDM Rx Entry Exporter
Reading sample log file 'raw_log_one_flow.hdf5' (  5.0 MB)

Found 8519 receptions from fe:ff:ff:00:00:00
Genereating HDF5 file np_rx_ofdm_entries.hdf5

A new local file will be created named np_rx_ofdm_entries.hdf5. This is an HDF5 file suitable for import into MATLAB.

MATLAB

The 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.

To run the GUI:

  1. Start MATLAB (tested with R2011b or later)
  2. CD to the Python_Reference/examples/chan_est_viewer directory in the expanded reference design archive
  3. Run the MATLAB script ofdm_chan_est_viewer('np_rx_ofdm_entries.hdf5')

This will read the data file np_rx_ofdm_entries.hdf5 and display a GUI:

Click on any of the OFDM Rx events in the list to plot their channel estimate magnitudes and phase:

Last modified 10 years ago Last modified on Oct 23, 2014, 9:24:24 PM

Attachments (2)

Download all attachments as: .zip