In this exercise we’ll implement a closed-loop receiver sensitivity test using the DIGI WLAN device. This test would be used in a design characterization scenario; the production version of this test involves simply checking performance at a single power level. The flow of the test is as follows:
Configure the DUT for Rx Sensitivity testing. In this mode, the device will listen for WLAN packets. Each time the device is queried, it will respond with the number of packets it received since the last query.
Configure the RFSG to generate a specific number of identical packets that the DUT will receive. In this case, we’re going to generate 100 packets. This can be accomplished by creating a single packet, then generating it 100 times using script mode.
Iterate through a set of power levels, performing the following at each level:
The VI for this test is already partially completed. Open Exercise 12.2.vi to get started. There is already code for configuring the RFSG and DUT and creating the waveform. You’ll add the code inside the For loop to perform the test. When it’s done, it should look like the this:
Start by adjusting the power level. Insert niWLANG Set Power Level.vi to the inside of the For loop. Connect the output of the Add function at the bottom left of the loop to the Power Level terminal. (This block of arithmetic is iterating through the power levels based on the initial power level and step size.)
Next, add niWLANG RFSG Configure.vi. This VI reads the settings in the WLAN session (including the newly changed power level) and configures the RFSG hardware settings.
Next, add niRFSG Configuration Mode.vi. Add a constant to the Generation Mode terminal, and select Script. The WLAN Autoconfigure function sets the generator to Arb mode, and you’ll need to use the previously-written script to generate a finite number of packets.
Add niRFSG Initiate.vi. This will begin generation.
After generation is started, you’ll want to wait for it to complete before querying the DUT. Add a While loop, and inside the WHile loop, add niRFSG Check Generation Status.vi. This VI will monitor the RFSG hardware for any errors. It will also return True on the Done? terminal when finite generation is complete. Wire the done? value to a boolean Or along with the Status unbundled from the error cluster coming from the VI. Wire the output of the boolean Or to the stop condition of the loop. This will ensure that the loop will stop when generation completes or if there is an error. Add a Wait function to the loop, and give it a time of 50 ms.
After the While loop add the VI from the Exercise folder called Query Rx Packets.vi. This VI sends a serial command to the device to retrieve the number of received packets. Wire the Rx Packets terminal to the second input terminal of the Bundle Cluster function on the bottom right of the For loop.
The last VI to add to add inside the For loop is niRFSG Abort.vi. Even though generation has already completed, this VI returns the instrument to the configuration state so the power level can be changed for the next iteration.
Review the code before the For loop. The first two VIs on the bottom establish communication with the Digi WLAN device and put it into Rx Sensitivity mode. The next few VIs open sessions to the RFSG device and the WLAN toolkit, and they configure a few properties of the generation. The niWLAN Generation Property Node configures some specifics about the generated signal. niWLANG RFSG Configure Waveform.vi sets some properties of the waveform to be generated based on hardware settings (such as available/coerced IQ rates, etc). Immediately after that, niWLANG Create Single Channel Waveform.vi creates the waveform data that is then loaded into the RFSG with niRFSG Write Arb Waveform.vi. Finally, the script used for finite repeated generation is loaded with niRFSG Write Script.vi.
Switch over to the VI’s front panel. Set the starting power to something lower than -30 dBm. Experiment with different step sizes and iterations to isolate the sensitivity of the receiver. (Keep in mind that the 802.11 specification document defines sensitivity as <3% of packets dropped.)
Extra Credit: One of the advantages of NI’s RF test platform is measurement speed. This measurement, because of its multiple iterations, takes quite a while to execute. One way to increase speed is to reduce the number of packets to generate for each iteration. Cutting the number of packets from 100 to 50 should cut measurement time almost in half. Another way to improve this measurement time would be to make the iteration algorithm more intelligent. Try implementing a binary search or another method to reduce the time required to find the device sensitivity.