Radio Communication Radio Communication Channels Channels Section 2.4 of Hiroshi Harada Section 2.4 of Hiroshi Harada Book Book Khurram Masood Khurram Masood (200806100) (200806100) Electrical Engineering Department Electrical Engineering Department [email protected]
14
Embed
Radio Communication Channels Section 2.4 of Hiroshi Harada Book
Radio Communication Channels Section 2.4 of Hiroshi Harada Book. Khurram Masood (200806100) Electrical Engineering Department [email protected]. Generate Additive White Gausian Noise. function [iout,qout] = comb (idata,qdata,attn) %****************** variables ************************* - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Radio Communication ChannelsRadio Communication ChannelsSection 2.4 of Hiroshi Harada BookSection 2.4 of Hiroshi Harada Book
for SNR = 0:2:10 npow = Es/10^(SNR/10); attn = 1/2*sqrt(npow); [iout,qout] = comb(idata,qdata,attn); scatterplot(iout+1i*qout) end
04/22/23 3
Generate Additive White Generate Additive White Gausian NoiseGausian Noise
04/22/23 4
-1 -0.5 0 0.5 1
-1
-0.5
0
0.5
1
Qua
drat
ure
In-Phase
Scatter plot, SNR = 10dB
-2 -1 0 1 2
-2.5
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
2.5
Qua
drat
ure
In-Phase
Scatter plot, SNR = 0dB
Generate Rayleigh fadingGenerate Rayleigh fading
04/22/23 5
Generate Rayleigh fadingGenerate Rayleigh fading
function [iout,qout,ramp,rcos,rsin]=fade(idata,qdata,nsamp,tstp,fd,no,counter,flat) %****************** variables *************************% idata : input Ich data % qdata : input Qch data % iout : output Ich data % qout : output Qch data% ramp : Amplitude contaminated by fading% rcos : Cosine value contaminated by fading % rsin : Cosine value contaminated by fading% nsamp : Number of samples to be simulated % tstp : Minimum time resolution % fd : maximum doppler frequency % no: number of waves in order to generate fading
% counter : fading counter % flat : flat fading or not % (1->flat (only amplitude is fluctuated),0->nomal(phase and amplitude are fluctutated) %******************************************************•
04/22/23 6
Generate Rayleigh fadingGenerate Rayleigh fading
ac0 = sqrt(1.0 ./ (2.0.*(no + 1))); % power normalized constant(ich) as0 = sqrt(1.0 ./ (2.0.*no)); % power normalized constant(qch) ic0 = counter; % fading counter pai = 3.14159265; wm = 2.0.*pai.*fd; n = 4.*no + 2; ts = tstp; wmts = wm.*ts; paino = pai./no; xc=zeros(1,nsamp); xs=zeros(1,nsamp); ic=[1:nsamp]+ic0; for nn = 1: no% cwn = cos( cos(2.0.*pai.*nn./n).*ic.*wmts ); cwn = cos( cos(2.0.*pai.*nn./no).*ic.*wmts ); % Changed xc = xc + cos(paino.*nn).*cwn; xs = xs + sin(paino.*nn).*cwn; end •
% Time resolutiontstp = 0.5*1.0e-6; % Number of waves to generate fading for each multipath.n0 = 6; % Number of fading counter to skip (50us/0.5us)itnd0=50e-6/tstp; % Initial value of fading counteritnd1=1000; % Maximum Doppler frequency [Hz]fd=200; % (1->flat (only amplitude is fluctuated),0->nomal(phase and amplitude are fluctutated)flat =0; [iout,qout,ramp,rcos,rsin]=fade(idata,qdata,nsamp,tstp,fd,n0,itnd0,flat);plot(tstp*1e3*[1:length(ramp)],ramp,'.-')xlabel('Time [msec]‘);title('Rayleigh Fading Amplitude');
04/22/23 9
Flat FadingFlat Fading
04/22/23 10
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50.8
1
1.2
1.4
1.6
1.8
2
2.2
Time [msec]
Rayleigh Fading Amplitude
Flat FadingFlat Fading
04/22/23 11
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50
0.5
1
1.5
2
2.5
Time [msec]
Rayleigh Fading Amplitude
Frequency Selective FadingFrequency Selective Fadingfunction[iout,qout,ramp,rcos,rsin]=sefade(idata,qdata,itau,dlvl,th,n0,itn,n1,nsamp,tstp,fd,flat) %****************** variables *************************% idata input Ich data % qdata input Qch data % iout output Ich data % qout output Qch data% ramp : Amplitude contaminated by fading% rcos : Cosine value contaminated by fading % rsin : Cosine value contaminated by fading% itau : Delay time for each multipath fading% dlvl : Attenuation level for each multipath fading% th : Initialized phase for each multipath fading% n0 : Number of waves in order to generate each multipath fading% itn : Fading counter for each multipath fading% n1 : Number of summation for direct and delayed waves % nsamp : Total number of symbols % tstp : Mininum time resolution% fd : Maxmum doppler frequency% flat flat fading or not % (1->flat (only amplitude is fluctuated),0->nomal(phase and amplitude are fluctutated) %******************************************************
04/22/23 12
Frequency Selective FadingFrequency Selective Fading