Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Communication System Simulation

IEEE 802.11a 式 告

指 : 宗
生:林侑佳
日 :2018/3/15
Reference
• J. Heiskala and J. Terry, OFDM Wireless LANs: A Theoretical
and Practical Guide. Sams Publishing, 2002, pp. 109-111.
IEEE 802.11a T a mi e Block Diagram

Convolutional
Encoder 2 bits Interleaving 2 bits 14 bits Add Pilot and Make Up
1 bit 1 bit Bit to Symbol Mapping
Scrambler (tx_conv_encoder.m) (tx_interleaver.m) Full OFDM Symbol
PLCP DATA (tx_modulate.m)
(tx_conv_encoder.m) (tx_add_pilot_syms.m)
14 bits

Frequency 盪器
Divider(/2) 12MHz

Only PLCP 1 bit Convolutional 2 bits 2 bits Two Bits To 1 bit BPSK
Interleaving
SIGNAL Encoder One Bits Mapping

盪器 Frequency
40MHz Divider(/2)
10 bits 8 bits 8 bits 8 bits 14 bits 14 bits
14Bits to
Output to RF DAC Pulse Shaping Up Sampling Add PLCP IFFT & Add
8 Bits
10 bits 8 bits 8 bits Preamble 8 bits Cyclic Prefix 14 bits
14 bits (tx_add_cyclic_prefix.m)
(tx_gen_preamble.m)

IEEE802.11a 發射機架構圖(Data Rate = 6Mbps)


IEEE 802.11a 式流

ui_start.m

transmitter.m channel.m Receiver.m


transmitter.m流

transmitter.m

tx_ tx_make_ tx_add_ tx_


tx_ tx_ tx_ tx_ tx_add_ tx_freqd_ tx_gen_
conv_ int_num_ cyclic_ power_
Puncture Interleaver Modulate Diversity Pilot_ to_ Preamble
Encoder ofdm_ Prefix.m Amplifier
.m .m .m .m Syms.m Timed.m .m
.m Syms.m .m
9 23
puncturing 打洞
Puncturing is a very useful technique to generate additional rates from a
single convolutional code.
The basic idea behind puncturing is not to transmit some of the bits
output by the convolutional encoder, thus increasing the rate of the code.
This increase in rate decreases the free distance of the code.
The receiver inserts dummy bits to replace the punctured bits in the
receiver. P.114

Table. Free Distances of the 64 State Convolutional Codes Used in IEEE 802.11a

Code Rates Punctured Free Punctured Optimum Free Optimum


Distance Coding Gain Distance Coding Gain
kln
1 - - 10 7.0 dB
2
2 6 6.0 dB 7 6.7 dB
3
3 5 5.7 dB 6 6.5 dB
4

愈低保護能⼒愈強 通道差⽤ 通道好就不⽤那麼好的保護


會慢
速度 會浪費 bit
Puncturing for rate 3/4

個⼀組
⼸45打洞 Rate ½ convolutional code

fttt
Rate ¾ convolutional code

Did
transmitter

receiver

插入假 bit 亂填
dt
Puncturing for rate 2/3

Rate ½ convolutional code

Rate 2/3 convolutional code

transmitter

receiver
tx_puncture.m (1/2)

% puncturing
function punctured_bits = tx_puncture(in_bits, code_rate)

[punc_patt, punc_patt_size] = get_punc_params(code_rate);

% Remainder bits are the bits in the end of the packet that are not integer multiple of the puncture window size
num_rem_bits = rem(length(in_bits), punc_patt_size); rem(A,B) : A/B取

puncture_table = reshape(in_bits(1:length(in_bits)-num_rem_bits), punc_patt_size, fix(length(in_bits)/punc_patt_size));

reshape(X,M,N) : X 列的元 由左到右由上到下 列成M*N的

tx_table = puncture_table(punc_patt,:); 取出punc_patt所有的行元


tx_puncture.m (2/2)
%puncture the remainder bits
rem_bits = in_bits(length(in_bits)-num_rem_bits+1:length(in_bits));

rem_punc_patt = find(punc_patt<=num_rem_bits); 找出 列小於num_rem_bits的元

rem_punc_bits = rem_bits(rem_punc_patt)';

punctured_bits = [tx_table(:) rem_punc_bits]; 取出所有行元 成一列


get_punc_params.m
function [punc_patt, punc_patt_size] = get_punc_params(code_rate)

if strcmp(code_rate,'R3/4') strcmp(S1,S2) : 比 s1,s2 回 為1(true)


% R=3/4, Puncture pattern: [1 2 3 x x 6], x = punctured
punc_patt=[1 2 3 6];
punc_patt_size = 6;
elseif strcmp(code_rate, 'R2/3')
% R=2/3, Puncture pattern: [1 2 3 x], x = punctured
punc_patt=[1 2 3];
punc_patt_size = 4;
elseif strcmp(code_rate, 'R1/2')
% R=1/2, Puncture pattern: [1 2 3 4 5 6], x = punctured
punc_patt=[1 2 3 4 5 6];
punc_patt_size = 6;
else
error('Undefined convolutional code rate');
end

You might also like