Communication System Simulation IEEE 802.11a 程式報告

You might also like

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

Communication System Simulation

IEEE 802.11a 程式報告

指 老師: 劉宗 老師

學生:曾泓源

日期: 2018/03/22

Reference

J. Heiskala and J. Terry, OFDM Wireless LANs: A Theoretical and Practical

Guide. Sams Publishing, 2002, pp. 129-139 (version B: pp. 130-142)

CCU Comm.

Smart Antenna Lab


MATLAB Main Program Architecture

ui_start.m

transmitter.m channel.m receiver.m

CCU Comm.

Smart Antenna Lab


Transmitter Architecture

transmitter.m

tx_ tx_
tx_make_
tx_ tx_ tx_ tx_add_ tx_freqd_ tx_add_ tx_gen_
tx_

conv_ Puncture
int_num_
Interleaver Modulate Diversity pilot_ to_ cyclic_ Preamble
power_
Encoder ofdm_ Amplifier

.m .m
syms.m
.m .m .m syms.m timed.m prefix.m .m
.m

CCU Comm.

Smart Antenna Lab


通道的不確定性有好有 壞

Channel Fading ⽤diversity对抗厷ding

xcnntnscnnnn

Fading with time Fading with space


(use error correction (use space-time block code
code to provide time or precoded MIMO to
CCU Comm.
diversity) provide spatial diversity)
Smart Antenna Lab
⽤多⼤線

Space-Time Block Code


, s6* , s5 , s4* , s3 , s2* , s1
h1,1
, s6 , s5 , s4 , s3 , s2 , s1 Alamouti STBC h1,2 , r6 , r5 , r4 , r3 , r2 , r1
Encoder
r1 h1,1 h1,2 s1 w1
r2 h1,2 h1,1 s2 w2 , s5* , s6 , s3* , s4 , s1* , s2
Orthogonal Matrix

r1 h1,1s1 h1,2 s2 w1 ; r2 h1,1s2* h1,2 s1* w2


Either the channel gain h1,1 or h1,2 may be small due to fading. However, it is least probable
that both h1,1 and h1,2 are small. When only h1,1 or h1,2 is small, s1 or s2 is received with good r1 or r2 .
Either s1 or s2 is transmitted through the two antennas, and this technique is called the transmit diversity.
The transmit (spatial) diversity is a method to fight against spatial fading channels.
The space-time coded symbols, s1 and s2 , are transmitted over 2 time instants;
CCU Comm.
thus, the receiver collects signals over 2 time instants, r1 and r2 . Smart Antenna Lab
tx_diversity.m
function div_ofdm_syms = tx_diversity(ofdm_symbols, sim_options)
經過調 後的訊號,
if sim_options.UseTxDiv 具有相同的symbol
rate。
% Radon-Hurwitz or Alamouti tx diversity
div_ofdm_syms = tx_radon_hurwitz(ofdm_symbols);
else
% No diversity
div_ofdm_syms = ofdm_symbols;
end

an hi nlnkhnSMHWin

rzlnkhz1SMH
Way
ha
CCU Comm.
Smart Antenna Lab
Why same symbol rate (1/2)
information bits d k ,n
data bits coded bits ek , n
14 bits
010101010101...1 bit 1 bit Convolutional 2 bits 2 bits Bit to symbol Mapping
Scrambler Interleaving 12Mbps Add Pilot and Make Up
PLCP DATA Encoder (digital modulation)
6Mbps 12Mbps
12Mbps 24Mbps
Full OFDM Symbol
9Mbps 1/2 . . 1/1
24Mbps
. . same 12Msps 48/64
12Mbps 3/4 . . 2/1
.
2/3 72Mbps 72Mbps .
.
.
.
6/1 symbols per second
.
54Mbps
Frequency 器
Divider(/2) 12MHz
bits per second

El ,n
器 Frequency
80MHz Divider(/4)
G (t ) 14 bits
10 bits 8 bits 8 bits 8 bits 14 bits
DAC Up Sampling Add PLCP 14Bits to IFFT & Add
Output to RF Pulse Shaping
DAC By 4 Preamble 8 Bits Cyclic Prefix
20Msps 64/80 16Msps

D/C 80 Samples samples per second


= 20Msps
4 s
T =50ns
IEEE802.11a 發射機架構圖(Data Rate = 6,9,…,54 Mbps)

CCU Comm.
Smart Antenna Lab
Why same symbol rate (2/2)

CCU Comm.
Smart Antenna Lab
set_sim_consts.m

tx_radon_hurwitz.m (1/3)
function ofdm_syms_out = tx_radon_hurwitz(mod_ofdm_syms)

global sim_consts;
Modulation後的data string長度
新的column數
num_symbols = length(mod_ofdm_syms)/sim_consts.NumDataSubc;
mod_syms = reshape(mod_ofdm_syms, sim_consts.NumDataSubc, num_symbols);
元素個數與 重新對矩陣做排列
mod_ofdm_syms
一樣
A 1 2 3 4 25 1 25
B = reshape(A,5,5)

1 6 11 16 21
2 7 12 17 22
B 3 8 13 18 23
4 9 14 19 24
5 10 15 20 25 5 5

CCU Comm.
Smart Antenna Lab
Example (1/3)
function ofdm_syms_out = tx_radon_hurwitz(mod_ofdm_syms)
1632 symbols

global sim_consts;

num_symbols = length(mod_ofdm_syms)/sim_consts.NumDataSubc;
% num_symbols = 1632 / 48 = 34
48 34 symbols

mod_syms = reshape(mod_ofdm_syms, sim_consts.NumDataSubc, num_symbols);


a11 a12 a1n


a21 a22 a2 n
mod_ syms

am1 am 2 amn 48 34

CCU Comm.
Smart Antenna Lab
tx_radon_hurwitz.m (2/3)

0 0 0
ant1_syms = zeros(sim_consts.NumDataSubc, num_symbols); 0 0 0
ant2_syms = zeros(sim_consts.NumDataSubc, num_symbols);
0 0 0 NumDataSubc num _ symbols
等差數列: 從1開始,
等差為2,
% unchanged symbols 直到num_symbols為止
ant1_syms(:,1:2:num_symbols) = mod_syms(:,1:2:num_symbols); s1
ant2_syms(:,1:2:num_symbols) = mod_syms(:,2:2:num_symbols); s2
% transformed symbols 取共軛
ant1_syms(:,2:2:num_symbols) = -conj(mod_syms(:,2:2:num_symbols)); s2
ant2_syms(:,2:2:num_symbols) = conj(mod_syms(:,1:2:num_symbols));
s1

CCU Comm.
Smart Antenna Lab
Example (2/3)
% unchanged symbols
ant1_syms(:,1:2:num_symbols) = mod_syms(:,1:2:num_symbols);
ant2_syms(:,1:2:num_symbols) = mod_syms(:,2:2:num_symbols);

% transformed symbols
ant1_syms(:,2:2:num_symbols) = -conj(mod_syms(:,2:2:num_symbols));
ant2_syms(:,2:2:num_symbols) = conj(mod_syms(:,1:2:num_symbols));
num _ symblos 6
mod_ syms s1 s2 s3 s4 s5 s6

ant1_ syms s1 s2 s3 s4 s5 s6
ant 2 _ syms s2 s1 s4 s3 s6 s5

Time diversity and Space diversity


CCU Comm.
2個時間傳2個symbol Smart Antenna Lab
tx_radon_hurwitz.m (3/3)

0 0 0
ofdm_syms_out = zeros(2, length(mod_ofdm_syms));
0 0 0 2 length ( mod _ ofdm _ syms )
各有
ofdm_syms_out(1,:) = ant1_syms(:).'; length(mod_ofdm_syms)
個元素
ofdm_syms_out(2,:) = ant2_syms(:).';
只有 置

s1 s2
s2 s1
s3 s4
ant1_ syms (:) ant 2 _ syms (:)
s4 s3
s5 s6
s6 s5

CCU Comm.
Smart Antenna Lab

You might also like