Rev | Line | |
---|
[2088] | 1 | function PLCP_Preamble = PLCP_Preamble_gen() |
---|
| 2 | |
---|
| 3 | % Preamble definition (802.11-2007 17.3.3) |
---|
| 4 | |
---|
| 5 | %STS for AGC convergence and coarse CFO |
---|
| 6 | % STS is derived from 64 points in frequency domain, only 16 non-zero |
---|
| 7 | % STS is defined as 16 points in time domain |
---|
| 8 | %% |
---|
| 9 | sts_f = zeros(1,64); |
---|
| 10 | sts_f(1:27) = [0 0 0 0 -1-1i 0 0 0 -1-1i 0 0 0 1+1i 0 0 0 1+1i 0 0 0 1+1i 0 0 0 1+1i 0 0]; |
---|
| 11 | sts_f(39:64) = [0 0 1+1i 0 0 0 -1-1i 0 0 0 1+1i 0 0 0 -1-1i 0 0 0 -1-1i 0 0 0 1+1i 0 0 0]; |
---|
| 12 | sts_t = ifft(sqrt(13/6).*sts_f, 64); |
---|
| 13 | sts_t = sts_t(1:16); |
---|
| 14 | |
---|
| 15 | %% |
---|
| 16 | sts_t_norm = 1;%max(abs([real(sts_t) imag(sts_t)])); |
---|
| 17 | sts_t = sts_t .* 1/sts_t_norm; |
---|
| 18 | |
---|
| 19 | %LTS for CFO and channel estimation |
---|
| 20 | lts_f = [0 1 -1 -1 1 1 -1 1 -1 1 -1 -1 -1 -1 -1 1 1 -1 -1 1 -1 1 -1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 -1 -1 1 1 -1 1 -1 1 1 1 1 1 1 -1 -1 1 1 -1 1 -1 1 1 1 1]; |
---|
| 21 | lts_t = ifft(lts_f, 64); |
---|
| 22 | |
---|
| 23 | %% |
---|
| 24 | lts_t_norm = 1;%max(abs([real(lts_t) imag(lts_t)])); |
---|
| 25 | lts_t = lts_t .* 1/lts_t_norm; |
---|
| 26 | |
---|
| 27 | preamble = [repmat(sts_t, 1, 10) lts_t(33:64) lts_t lts_t]; |
---|
| 28 | |
---|
| 29 | PLCP_Preamble = struct(); |
---|
| 30 | PLCP_Preamble.STS_t = sts_t; |
---|
| 31 | PLCP_Preamble.LTS_t = lts_t; |
---|
| 32 | PLCP_Preamble.LTS_f = lts_f; |
---|
| 33 | PLCP_Preamble.Preamble_t = preamble; |
---|
Note: See
TracBrowser
for help on using the repository browser.