2 simulation of 16qam systems - aalto simulation of 16qam systems.pdf · in the simulation, you may...
TRANSCRIPT
![Page 1: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/1.jpg)
1
Lecture 2: Simulation of 16QAM systems
March 28 – April 19 2008
Yuping Zhao (Doctor of Science in technology)
Professor, Peking UniversityBeijing, China
![Page 2: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/2.jpg)
2
What we learn here?• How to simulate the continues signals
using discrete samples of the signals• How to design the Matched filters that
fulfill Nyquist conditions• How to add the noise signals for given
SNR, sampling rate, modulation level ?• How to simulation Eye diagram• How to evaluate the BER, Symbol error
rate (theory and simulations)
![Page 3: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/3.jpg)
3
Block diagram of the communication system
![Page 4: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/4.jpg)
4
5 10 15 20 25 30 35-0.2
0
0.2
0.4
0.6
0.8
1
random binary data)
Generate binary data
x=randint(1,N), randomly generate binary data of length N
As the starting point, we suggest N=2000
![Page 5: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/5.jpg)
5
-4 -3 -2 -1 0 1 2 3 4-4
-3
-2
-1
0
1
2
3
4the constellation diagram of 16QAM
I
Q
-4 -3 -2 -1 0 1 2 3 4-4
-3
-2
-1
0
1
2
3
4
I
Q
0000
0001
0101
0100 0110
0111
0011
0010
1110
1111
1011
1010
1100
1101
1001
1000
Each symbol contains 4 bits, the values in real and imaginary are 3,-1,1,3. The bits 1,3 corresponds to real part, the bits 2,4 corresponds to the imaginary part.
16QAM Modulation module
![Page 6: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/6.jpg)
6
You may modulate real and imaginary parts separately
The real part corresponds to bits 1,3, using Gray mapping, the constellation is as follows
00 01 11 10
-3 -1 1 3
Binary data
Modulated symbol
The imaginary part do the same way.
The modulated symbols are x = a + jb, or x = I + jQ
![Page 7: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/7.jpg)
7
-4 -3 -2 -1 0 1 2 3 4-4
-3
-2
-1
0
1
2
3
4the constellation diagram of 16QAM (no noise added)
I
Q
Transmitted signal constellation
![Page 8: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/8.jpg)
8
4. Up-sampling module
The reason for up sampling:
• The samples are impulse signals, its spectrum is extremely wide.
• The signals should pass the lowpass filters before transmission.
• In the hardware implementation, the continues signals is transmitted
![Page 9: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/9.jpg)
9
Hardware process for the transmitted signals
Modulatedsamples
Up sampling
DigitalFilter
AnalogFilter
CarrierModulation
Digital process Analog process
Anatenna
![Page 10: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/10.jpg)
10
Implementation
Assume the up-sampling rate is
ratesample _
Then we place zeros after each sample
ratesample _ -1
•In the simulation, you can chose any up-sampling values, for example: 8•In the hardware implementation, the typical value is 4•For real and imaginary parts, do the up-sampling separately
![Page 11: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/11.jpg)
11
0 10 20 30 40 50 60 70 80-4
-2
0
2
4Signal after up-sampling in tx system (sample rate=8)
I
0 10 20 30 40 50 60 70 80-4
-2
0
2
4
Q
The values can be +3,+1,-1,-3,0
![Page 12: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/12.jpg)
12
Low-pass filtering
To limit the transmitted signal within a certain bandThe filtering is performed for real and imaginary parts separately
After the lowpass filtering, the time domain signal is not the impulse. It becomes continues signal shape.The filter function and time domain signal shape is a pair of Fourier transform
![Page 13: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/13.jpg)
13
The design of lowpass filter
![Page 14: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/14.jpg)
14
( ) ( )( )
( ) ⎟⎠⎞
⎜⎝⎛==
⎩⎨⎧ <
=
Tt
tTttx
otherwiseWfT
fX
πππ sincsin
,,0,
Rectangular filter in frequency band
![Page 15: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/15.jpg)
15
![Page 16: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/16.jpg)
16
Sinc Filter in time and frequency domain
-5 -4 -3 -2 -1 0 1 2 3 4 5-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
t /s
Sinc Filter in Time Domain
-4 -3 -2 -1 0 1 2 3 40
2
4
6
8
10
f /Hz
Sinc Filter in Frequency Tomain
![Page 17: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/17.jpg)
17
Square root Cosine Filter in time and frequency domain
-5 -4 -3 -2 -1 0 1 2 3 4 5-0.1
0
0.1
0.2
0.3
0.4
0.5
0.6
t /s
Sqrt-Rcosine Filter in Time Domain
-4 -3 -2 -1 0 1 2 3 40
0.5
1
1.5
2
2.5
3
f /Hz
Sqrt-Rcosine Filter in Frequency Domain
![Page 18: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/18.jpg)
18
• Impulse response of Sinc and Sqrt_Cosine filter
Sinc Filter
Sqrt_Cosine_Filter
ttSinth )()( =
2
sin((1 ) / )cos((1 ) / )4
( ) 4(1 (4 / ) )
R t TR t T tRTh t R
T Rt T
ππ
π
−+ +
=−
![Page 19: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/19.jpg)
19
-4 -3 -2 -1 0 1 2 3 4-100
-90
-80
-70
-60
-50
-40
-30
-20
-10
0
三种成型滤波后信号功率谱比较
f /hz
dB矩形函数滤波器
Sinc函数滤波器
根升余弦滤波器
Simulation Spectrum of 3 filters
![Page 20: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/20.jpg)
20
Symbols after up-sampling and lowpass filtering
The transmitted signal
![Page 21: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/21.jpg)
21
0 10 20 30 40 50 60 70 80-4
-2
0
2
4Signal after up-sampling in tx system (sample rate=8)
I
0 10 20 30 40 50 60 70 80-4
-2
0
2
4
Q
-5 -4 -3 -2 -1 0 1 2 3 4 5-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
t /s
Sinc Filter in Time Domain
-4 -3 -2 -1 0 1 2 3 40
2
4
6
8
10
f /Hz
Sinc Filter in Frequency Tomain
convolution
![Page 22: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/22.jpg)
22
you can use the filter function in matlab
rcosflt(X,Fd,Fs,'fir/sqrt',R,delay)Example: rcosflt(X,1,fs,'fir/sqrt',R,delay)
• X: input signal without up sampling• The sample frequency for the input, X, is Fd (Hz). • The sample frequency for the output, Y, is Fs (Hz). Fs must be an integer multiple of Fd. (note: if it is N times up-sampling, we can use Fd=1, Fs=N )• The TYPE_FLAG gives specific filter design or filtering options. • R: The rolloff factor, the value is from 0 to 1 • DELAY is number of sidelobs
Note: If the input signal X is up-sampled, the filter type should be 'fir/sqrt/fs',For details, please use “help rcosflt” in MATLAB window
![Page 23: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/23.jpg)
23
function data_filtered=my_sqrt_filter(data_in,R,delay,sample_rate)%data_in: up-sampled data; R: roll off factor; delay: number of sidelobe of each side% sample_rate: up-sample rate% give the time response of sqrt rcosine filter
len_filter=delay*2*sample_rate+1;n=0:len_filter-1;n=-1*delay*sample_rate:delay*sample_rate;part1=cos((1+R)*pi*n/sample_rate);part2=sin((1-R)*pi*n/sample_rate)./(4*R*n/sample_rate);part3=1-(4*R*n/sample_rate).^2;hn=4*R*(part1+part2)./(pi*part3);% deal with the Inf pointshn(delay*sample_rate+1)=4*R/pi+1-R; index=find(n==sample_rate/4/R | n==-1*sample_rate/4/R);hn(index)=(R*sqrt(2)/2/pi)*((2+pi)*sin(pi/4/R)+(pi-2)*cos(pi/4/R));% change the maximum value to make the raised cosine filter's maximum value=1max_value=max(conv(hn,hn));hn=hn/sqrt(max_value);
% the input data pass through the filterdata_filtered=conv(data_in,hn);
You may also program you own filter codes according to the given equation
![Page 24: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/24.jpg)
24
0 20 40 60 80 100 120 140-4
-2
0
2
4
Signal after sqrtrcosine filter in tx system
(roll-factor=0.5 ,delay=3)
I
0 20 40 60 80 100 120 140-4
-2
0
2
4
Q
The signal after the filter
![Page 25: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/25.jpg)
25
Discussions
1. Why the amplitude of the original samples are not same as filtered one2. can we have inter-symbol interference free transmission
![Page 26: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/26.jpg)
26
Carrier modulation
Lowpass signal is
)()()( tjQtItZ +=
The carrier modulation is
)}2exp()(Re{)( fctjtZtS π=
![Page 27: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/27.jpg)
27
X(t)
( ) ( ) ( )( ) ( )[ ]( ) ( ) ( ) ( )tftytftx
tfjtjytxts
cc
c
πππ
2sin2cos2expRe
−=+=
The carrier modulated signal
Y(t)
X
X
( )tfcπ2cos
( )tfcπ2sin-
+ s(t)
![Page 28: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/28.jpg)
28
In the simulation, you may chose 10 times carrier modulation
10fc fs=
Note: The resolution of the baseband signals is not enough since it has only 8 time up sampling. However the carrier frequency modulation needs more resolutions
To solve problem you need make the interpolation for the baseband signals
![Page 29: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/29.jpg)
290 200 400 600 800 1000 1200 1400
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2signal mudulated by carrier (fc=10fs)
The carrier modulated signals
![Page 30: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/30.jpg)
30
0 20 40 60 80 100 120 140-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6show signal mudulated by carrier in Ts(fc=10fs)
The carrier modulated signals
![Page 31: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/31.jpg)
31
Add the AWGN signal in baseband
• Using awgn() function• y = awgn(x, snr, 'measured');
0
0
( )
( ) 10 lg( )
( ) 10 lg( ) 10 lg( )
S
b
snr dBE dB NsampNE dB k NsampN
= − ×
= + × − ×
• For 16QAM, k = 4• Nsamp is the over sampling rate, here is 8• “Measured” means the function first measure
the signal power, and then add the noise
![Page 32: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/32.jpg)
32
Question : if transmitted same signal twice, at the receiver side make the combination of the signals, how the SNR of the received signals will change compare with transmit one time
1 1 2 2 y x n y x n= + = +
The SNR for each transmission
2σSESNR =
The received signals are
Why consider the up-sampling rate when add AWGN signals?
![Page 33: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/33.jpg)
33
Variance of the sum of random variables
Assume Xi, i=1,2,…n is iid random variables, its mean value is mx ,variance is σx
2。Define Y is the sum of X,
∑=
=n
iiX
nY
1
1
[ ] xE Y m= ⇒均值不变Then2
2 1xy n n
σσ = ⇒方差减小到
1xy n n
σσ = ⇒标准差减小到
![Page 34: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/34.jpg)
34
Therefore the SNR of transmit twice becomes
SNRERSN S 224
2 ==′σ
22σ
Conclusion: In AWGN Channel, transmit one signal twice will make SNR increase 3dB (two times)
1. Transmit one time, the signal energy is
2. Transmit twice and add the received signal together
signal power noise power
2 2 2 2| | / | | /s sE x SNR E xσ σ= = =
1 2 1 22y y x n n+ = + +' 2 2| 2 | 4 | | 4s sE x x E= = = '2 22σ σ=
Answer:
![Page 35: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/35.jpg)
35
Received signal with noise
0 10 20 30 40 50 60 70 80-2
-1
0
1
2实部
0 10 20 30 40 50 60 70 80-2
0
2
4虚部
Real part
Imaginary part
![Page 36: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/36.jpg)
36
Filter at the receiver side
Use the matched filter as the transmitter side
Signal power
Noise power
f
2⎟⎠⎞⎜
⎝⎛ fH
![Page 37: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/37.jpg)
37
0 2 4 6 8 10 12 14 16 18 20-5
0
5经过AWGN信道的信号经匹配滤波后与原信号比较-I路
原信号
经过AWGN信道
0 2 4 6 8 10 12 14 16 18 20-4
-2
0
2
4经过AWGN信道的信号经匹配滤波后与原信号比较-Q路
SNR=5dB
原信号
经过AWGN信道
Real part signals
Imaginary part signals
OriginalWith AWGN
OriginalWith AWGN
![Page 38: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/38.jpg)
38
0 2 4 6 8 10 12 14 16 18 20-5
0
5经过AWGN信道的信号经匹配滤波后与原信号比较-I路
原信号
经过AWGN信道
0 2 4 6 8 10 12 14 16 18 20-4
-2
0
2
4经过AWGN信道的信号经匹配滤波后与原信号比较-Q路
SNR=20dB
原信号
经过AWGN信道
Real part signals
Imaginary part signals
OriginalWith AWGN
OriginalWith AWGN
![Page 39: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/39.jpg)
39
250 300 350 400 450-4
-3
-2
-1
0
1
2
3
Signal after match filter in rx system(roll-factor=0.5 ,delay=3)
I
250 300 350 400 450
-4
-2
0
2
4
Q
The signal after the receiver filter (without noise)
![Page 40: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/40.jpg)
40
Eye diagram without noise
-0.5 0 0.5-5
-4
-3
-2
-1
0
1
2
3
4
5
Time
Am
plitu
de
不加噪声时在接收端通过低通滤波器后的眼图Without AWGN signals
![Page 41: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/41.jpg)
41
0 20 40 60 80 100 120 140 160 180-4
-2
0
2
4
Signal after match filter in rx system(roll-factor=0.5 ,delay=3)
I
0 20 40 60 80 100 120 140 160 180-5
0
5
Q
The signal after the receiver filter (with noise)
![Page 42: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/42.jpg)
42
Eye diagram
-0.5 0 0.5-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
Time
Am
plitu
de发送端通过低通滤波后的眼图With AWGN signals
![Page 43: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/43.jpg)
43
Down sampling (sampling rate is 8)
-4 -3 -2 -1 0 1 2 3 4-4
-3
-2
-1
0
1
2
3
4the constellation diagram of 16QAM after down-sample in rx system
![Page 44: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/44.jpg)
44
demodulation
Method 1• Get the distances of the received samples to each signal point• Chose the signal with minimum distance
Method 2Bit by bit decision
01010101decision
Q>1 or Q<-1
1>Q>-1
I>1 or I<-1
1>I>-1
Q<0
Q>0
I<0
I>0
threshould
Bit 4Bit 3Bit 2Bit s
![Page 45: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/45.jpg)
45
Get bit values after demodulation
5 10 15 20 25 30 35-0.2
0
0.2
0.4
0.6
0.8
1
binary data after demodulation in rx system
10 20 30 40 50 60 70 80 90 100-0.5
0
0.5
1
1.5判决后的二进制序列
样点
信号幅度
判决后的序列
原始发送序列
Binary data after decision
After decisionOriginal data
Samples
![Page 46: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/46.jpg)
46
BER comparison
Make the theoretical curve and simulated curve at same figure
2
0
2
00
13211
134
134
⎥⎥⎦
⎤
⎢⎢⎣
⎡⎟⎟⎠
⎞⎜⎜⎝
⎛
−−−≤
⎟⎟⎠
⎞⎜⎜⎝
⎛⎟⎟⎠
⎞⎜⎜⎝
⎛
−−⎟⎟
⎠
⎞⎜⎜⎝
⎛
−=
NMQ
NMQ
NMQP
av
avavM
ε
εε
The relation between Q function and erfc() fuction
( ) ⎟⎠
⎞⎜⎝
⎛=2
erfc21 xxQ
Qfunc( ) and erf( ) in Matlab can be used
![Page 47: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/47.jpg)
47
Simulation results
Theorysimulation
![Page 48: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/48.jpg)
48
Block diagram of the communication system
Fig.1 Fig.2 Fig.3 Fig.4 Fig.5
Fig.7
Fig.6Fig.8Fig.9
Fig.10
![Page 49: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/49.jpg)
49
Description for each figure• Fig.1: Show the binary data• Fig.2: Show the transmitted signal constellation• Fig.3: Show the up-sampled signals (real and imaginary parts)• Fig.4: Show the filtered baseband signals (real and imaginary parts)• Fig.5: Show the carrier modulated signals (Real signals)• Fig.6: Show the baseband signals with AWGN together with Fig.4• Fig.7: Show the filtered baseband signals together with Fig.4• Fig.8: Show eye diagram (Real or imaginary part)• Fig.9: Show the constellation of the received signals• Fig.10:Show the BER curve with respect to different SNR or Eb/No
(Draw the theoretical and simulation curves at the same figure)
![Page 50: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/50.jpg)
50
Further discussions
• Problem 1: Sqrt_Rcosine Filter & ISI
• Problem 2: Decision & BER under Gray Code
• Problem 3: Speed up your Simulation
![Page 51: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/51.jpg)
51
Problem 1• Does Square Rcosine Filter has ISI?• Simulation:
0 10 20 30 40 50 60 70 80 90-0.2
0
0.2
0.4
0.6
0.8
1
1.2
采样点
串扰点 串扰点
(1)
(-0.093) (-0.093)
Normalize the value to 1 at the sampling point
![Page 52: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/52.jpg)
52
• Pass the data sequence [-3,1,-1,3] after insertion into the filter:
0 20 40 60 80 100 120-4
-3
-2
-1
0
1
2
3
4
(-3)
(1)
(-1)
(3)
(-3.1372)
(3.1372)
(1.4923)
(-1.492)
![Page 53: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/53.jpg)
53
• Pass the filtered data into the same filter once more (Matched filter)
0 20 40 60 80 100 120 140 160 180 200-4
-3
-2
-1
0
1
2
3
4
(-2.999)
(1.0004)
(-1.0004)
(2.999)
![Page 54: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/54.jpg)
54
• Conclusion1• Sqrt_Rcosine Filter has ISI, a pair of them does not have
ISI, equals to a Rcosine Filter
• Similarly, Sinc Filter has no ISI, can also be implemented
in pairs
• Rcosine Filter has no ISI, but a pair of them has ISI, thus
we seldom use two in our system
![Page 55: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/55.jpg)
551 2 3 4 5 6 7 8 9 10 11 1210-4
10-3
10-2
10-1
100
SNR (Eb/N0)
BE
R
16 QAM BER Performance
Theory BERSimulated BER
Cause: we made an approximation under Gray coding.
Problem 2: Why simulated curve is bit above the theory one under lower SNR?
![Page 56: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/56.jpg)
56
2logk M=
Assume the number of k information bits are mapped to one symbol
Using gray mapping, the BER and symbol error rate PER becomes
PERBERk
=
![Page 57: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/57.jpg)
57
• Decision under Gray Coding
-5 -4 -3 -2 -1 0 1 2 3 4 5-5
-4
-3
-2
-1
0
1
2
3
4
516 QAM Astrology
![Page 58: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/58.jpg)
58
Standard 16 QAM Astrology
-5 -4 -3 -2 -1 0 1 2 3 4 5-5
-4
-3
-2
-1
0
1
2
3
4
5
16QAM的星座图
(0000)
(0001)
(0011)
(0010)
(0100)
(0101)
(0111)
(0110)
(1100)
(1101)
(1111)
(1110)
(1000)
(1001)
(1011)
(1010)
Answer:When the SNR is very low, one symbol error might cause more than one bit error
![Page 59: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/59.jpg)
59
Problem 3• Speed up your Simulation• 1. Try to re-use the defined variables or arrays, use functions
• 2. How to calculate the proper number of simulated data?
• Method 1:
• First, estimate the BER from theoretical curve under each SNR
• Then multiply it by 100 or more to get the proper number of data for
each snr
Weak point: as SNR goes high, the simulation data will increase
dramatically, and may finally exceed your computer memory limit
![Page 60: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/60.jpg)
60
Easy way to determine the number of simulation data
First calculate the theoretical BER _Error theory
According to rule method 1, then number is1 100_Error theory
×
For a very high SNR, give a fixed number, assume it is 5000, then
1 100 5000_Error theory
× <
![Page 61: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/61.jpg)
61
Stop condition for simulating BER
• When the simulation fulfills either of the following conditions, the simulation should be stopped:– The number of error bits reach to a certain
value (in AWGN channel, 100 is enough)– The number of simulated bits reach to N (The
N can decided according to the simulation requirement and the speed of computer, or based on the simulation time)
![Page 62: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/62.jpg)
62
• Speed up your Simulation (Cont.)• Method 2:
• Divide the total number of data need to be simulated into smaller groups, for
example, N=1000
• Repeat the whole program and accumulate the error bits in each round
• When the accumulated error bits exceed 100 or the maximum number of
data reached, stop the simulation
The reasons:
• Save computer memory: Since each variable will occupy some memory
place, too many variables will slow down the operation
• The value of N is also cannot be too small, otherwise the it will always
change the commends during the running
• Some compromise need to be considered
![Page 63: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/63.jpg)
63
• Simulation carried out in method 2
1 2 3 4 5 6 7 8 9 10 1110-4
10-3
10-2
10-1
100
SNR (Eb/N0)
BE
R
16 QAM BER Performance (N=1000)
Theory BER
Simulated BER
![Page 64: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/64.jpg)
64
Let’s see the effect of N with different value
If you DIY the noise, the N should not be too small to keep the noise precise.
1 2 3 4 5 6 7 8 9 10 1110-4
10-3
10-2
10-1
100
SNR Eb/N0
BE
R
16 QAM BER Performance (N=100)
![Page 65: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/65.jpg)
65
1 2 3 4 5 6 7 8 9 10 1110-4
10-3
10-2
10-1
100
SNR (Eb/N0)
BE
R
16 QAM BER Performace (N=10000)
In consideration of efficiency, N may not be too large.
Anyway, the value of N is just a trade off.
![Page 66: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/66.jpg)
66
The way to speed up the Matlab simulate (2)
• Avoid to use “loop”, instead using matrix calculation
• Using the function provided Matlab rather than function written by yourself
• Using c language to build a function and inserted to the MATLAB
![Page 67: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/67.jpg)
67
Exampleclear;tica (1:20000) = ones;for i=1:20000b(i)=a(20001-i);endtoc“-- Elapsed time is 0.405912 seconds.--”---------------------------------------------------------------------------------------------------------clear;tica (1:20000) = ones;b=a(20000:-1:1);toc“-- Elapsed time is 0.004444 seconds.--”
![Page 68: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/68.jpg)
68
Other Problems: Simulation results are not accurate
Simulation samples are not enoughSampling points are not correctThe Gray mapping condition is not fulfilled
The way to locate your simulation errors:1. Remove the AWGN module or set SNR be a very large value, check the corresponding figures at both transmitter and receiver side.
![Page 69: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/69.jpg)
69
The way to locate your simulation errors:
•Step 1: If BER = 0.5: Remove the AWGN module or set SNR be a very large value, check the corresponding figures at both transmitter and receiver side. Sometimes the delay between transmitted and received data cause error
•Figure 2 and Figure 9 should be the same•Figure 3 and Figure 8 should be the same•Transmitted and received binary data should be same•Transmitted and received 16QAM data should be same
•Step 2: If BER is not same as theoretical value•Check if the symbol error rate is correct
•Symbol error rate is not OK, check the constellation•Symbol error rate in OK, check the gray mapping
•Step 3:If the BER is not accurate if SNR is high•Check if the number of simulation point is enough
![Page 70: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/70.jpg)
70
Possible problems in adding the AWGN
Add the AWGN only at the real part The AWGN at the real and imaginary parts are the same
![Page 71: 2 Simulation of 16QAM systems - Aalto Simulation of 16QAM systems.pdf · In the simulation, you may chose 10 times carrier modulation fcfs=10 Note: The resolution of the baseband](https://reader033.vdocument.in/reader033/viewer/2022051304/5a728e717f8b9ac0538dbc60/html5/thumbnails/71.jpg)
71