MeowLucian / SDR_Matlab_OFDM_802.11a

:satellite: Using Software Designed Radio to transmit OFDM QPSK signals at 5 GHz
MIT License
151 stars 72 forks source link

Parameter Settings in file "OFDM_RX.m" #2

Open sunffshine opened 7 years ago

sunffshine commented 7 years ago

Recently, I am reading the core code about the frame detection described in your repository called SDR_Matlab_OFDM_802.11a_2.4GHz. But some parameters setting confuse me. To be exact, i do not understand the intention of parameter Length_over_Threshold and why the value of Length_over_Threshold should be 230.

For another, the nexe code block confuses me.

for x=1:length(Packet_Front_idx)-1
    if M_n(Packet_Front_idx(x)+Length_over_Threshold)>Threshold;
        idx=Packet_Front_idx(x)+L+1; 
    end 
end 

If you are free, I would be more than thankful to receive your answers to my questions.

MeowLucian commented 7 years ago

Hi there !

Length_over_Threshold = 230 was decided by my experience for this environment.

Using "Delay and Correlate" algorithm to find the end of short preamble for packet detection in IEEE 802.11a.

I will update Readme.md for more information next day.

sunffshine commented 7 years ago

The array Packet_Front_idx represents frame start position detected by the algorithm, but there exists some indexes of false detection due to the effect of noise. Therefore, we must delete false indexes by setting Length_over_Threshold. I wonder if my understanding is right? thank you again

MeowLucian commented 7 years ago

The reason for Length_over_Threshold = 230 is that the imperfect packet with noise won't be selected.

I have updated Readme.md for more information.

You may consult it.

Best regards.

sunffshine commented 7 years ago

OK, thanks a lot

liiso7 commented 6 months ago

Hello, when I run this code, it will produce the following error. CODE: for x=1:length(Packet_Front_idx)-1 if M_n(Packet_Front_idx(x)+Length_over_Threshold)>Threshold; idx=Packet_Front_idx(x)+L+1; end end ERROR: Error Message : message: '函数或变量 'idx' 无法识别。' identifier: 'MATLAB:UndefinedFunction' stack: [2×1 struct] After checking, I know that length(Packet_Front_idx)=0 causes "for... end" part of the code is not executed. May I ask what causes this? How can I improve it? In addition, my SDR hardware is bladerf, so I chose the communication support package of bladeRF and made some changes to the code.