802.11b PHY Simulink Model

Simulink® model of 802.11b baseband physical layer.
33.4K Downloads
Updated 1 Sep 2016

View License

Simulink® model of 802.11b wireless LAN physical layer (baseband), supporting 1Mbps, 2Mbps, 5.5Mbps, and 11Mbps modes. Model includes framing, long and short preamble, DBPSK and DQPSK modulation, Barker code spreading, Complementary Code Keying (CCK), root raised-cosine pulse shaping, channel number selection (frequency shift) and an AWGN channel.
NOTE: A version of this model which works with the current release of MATLAB® and Simulink is shipped with the Communications Blockset™.

The model makes extensive use of configurable subsystems, swapping in and out required components for chosen parameters. Set system parameters by double-clicking the "System Parameters" block in the top left. Toggle instrumentation (eye-diagram, scatter plot and spectrum scope) by double-clicking the switch. The BER subsystem contains error meters. Instruments slow down the simulation considerably.

Instructions:
Unzip to a new folder, change the MATLAB current directory to this folder, then open the 'WiFi' mdl file.

Errata:
There is a mistake in the pulse shaping filter:
wlan80211b/Transmitter/Upsample and pulse shape/Pulse Shaping Filter

Go into the mask editor > Initialization of the pulse shaping block, change:
h=N*firrcos(numTaps,5e6,beta,88e6,'rolloff','sqrt',numTaps/2,kaiser(numTaps+1,1));

To:
h=N*firrcos(numTaps,11e6,beta,88e6,'rolloff','sqrt',numTaps/2,kaiser(numTaps+1,1));

Model Files:
WiFi.mdl - Model file
WiFi_lib.mdl - Library
WiFi_init.m - System initialization code. Configure subsystems and calculate delays. (Run by 'System parameters' mask)
cck_codes.mat - CCK codes data file

Test files (open wifi.mdl, turn off instrumentation and run these):
ber_test.m - Simulation and plot BER for each mode (2 minutes to run of 800MHz machine)
test_level_1.m - Simulate and check many parameter combinations to ensure 0 BER for no-noise case (3 mins on 800MHz machine)

Cite As

Stuart McGarrity (2024). 802.11b PHY Simulink Model (https://www.mathworks.com/matlabcentral/fileexchange/2262-802-11b-phy-simulink-model), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on WLAN Toolbox in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

R13 Original Version/

Version Published Release Notes
1.8.0.1

Updated license

1.8.0.0

n/a

1.7.0.0

Copyright work.

1.5.0.0

Trademark work.

1.3.0.0

Remove title trademark.

1.1.0.0

Added trademakrs.

1.0.0.0

Add note saying that a version which works with the current release of MATLAB/Simulink is shipped with the Communications Blockset.