How to add Preamble/Long Training sequence and Scrambler within OFDM 802.11a Simulink?

13 views (last 30 days)
Originally the goal of my experiment is to be able to transmit a jpeg file through the attached OFDM 802.11a simulink model. While the simulation works when SNR is 20, the whole thing falls apart when i try to lower the SNR, which suggests me to believe that my model is not synchronized. I believe the main reason for that is the absense of the preamble/training sequence within the model itself. Is there anyway i can add the training sequence/preamble within the simulink model/codes attached? also, since this model used a random bernoulli generator, there was no need for a scrambler since the data is already randomized. Would you need to add a scrambler for data that comes from a jpg file?
Any and all help is greatly appreciated!

Answers (1)

Saurav
Saurav on 22 Jul 2025
I understand that you want to know how to transmit a JPEG file using an OFDM 802.11a Simulink model, and you are observing failure at lower SNRs, likely due to missing synchronization mechanisms such as preambles/training sequences.
Yes, you are absolutely right in your analysis, lowering the SNR in a Simulink-based 802.11a OFDM simulation typically causes synchronization (timing and frequency offset) to fail, especially if the model does not include a proper training sequence/preamble.
1. Why the simulation fails at low SNR:
At high SNR (e.g., 20 dB), synchronization errors (like symbol timing or frequency offset) are minimal, so the model may appear to work. However, at lower SNRs, the absence of proper synchronization leads to packet loss and demodulation failure. The 802.11a standard uses a preamble that includes both the Short Training Field (STF) and Long Training Field (LTF) for reliable synchronization and channel estimation.
To add this to your Simulink model, you can use MATLAB functions from the WLAN Toolbox or implement the sequences manually. The functions "wlanLSTF" and "wlanLLTF" generate these fields in compliance with the standard.
The legacy short training field (L-STF) is the first field of the 802.11 OFDM PLCP legacy preamble. Since the sequence has good correlation properties, receivers use it for start-of-packet detection, coarse frequency correction, and setting the AGC.
The L-LTF is the second field in the 802.11 OFDM PLCP legacy preamble. Channel estimation, fine frequency offset estimation, and fine symbol timing offset estimation rely on the L-LTF. The L-LTF is composed of a cyclic prefix (CP) followed by two identical long training symbols (C1 and C2). The CP consists of the second half of the long training symbol.
The following code demonstrates how to configure and generate the short training field using "wlanLSTF" :
cfg = wlanNonHTConfig('ChannelBandwidth','CBW80','SignalChannelBandwidth',true, ...
'BandwidthOperation','Static');
y = wlanLSTF(cfg);
Please refer to these documentations to learn more about L-STF and L-LTF and how to implement them in your model:
2. Whether a scrambler is needed for JPEG file transmission:
Yes, you should ideally use a scrambler when sending real data such as JPEG images. Unlike random bits from a Bernoulli generator, JPEG files contain structured and repetitive byte patterns like long sequences of identical bits (e.g., many zeros) that can degrade spectral properties and synchronization.
Without scrambling:
  • You can get spectral peaks (bad spectral efficiency)
  • It can confuse synchronization logic
  • It might degrade demodulation due to bias in bitstream
This can be implemented using the "Scrambler" block in the Communications Toolbox. Make sure the receiver includes a matching "Descrambler" block to recover the original data.
Adding these elements will help your model perform reliably across varying SNR levels and allow successful JPEG transmission.
Please refer the following documentations to learn more details on the "Scrambler" and "Descrambler" blocks and their configuration:
I hope this helps.

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!