MIMOOFDM Wireless Communications with MATLAB 2 SISO Channel
MIMO-OFDM Wireless Communications with MATLAB 2. SISO Channel Models (2. 1~2. 2. 2) 2020. 02. 12.
2. 1. 1 General Indoor Channel Models § 2 /. 29.
2. 1. 1 General Indoor Channel Models § 3 /. 29.
2. 1. 2 IEEE 802. 11 Channel Model § 4 /. 29.
2. 1. 3 Saleh-Valenzuela (S-V) Channel Model § 5 /. 29.
2. 1. 3 Saleh-Valenzuela (S-V) Channel Model § 6 /. 29.
2. 1. 3 Saleh-Valenzuela (S-V) Channel Model § 7 /. 29.
2. 1. 3 Saleh-Valenzuela (S-V) Channel Model § SV_model_ct 함수 function [h, t, t 0, np]=SV_model_ct(Lam, lam, Gam, gam, num_ch, b 002, sdi, nlos) % % % % % Inputs Lam Gam lam gam num_ch b 002 sdi nlos : : : : Cluster arrival rate in GHz (avg # of clusters per nsec) Cluster decay factor (time constant, nsec) Ray arrival rate in GHz (avg # of rays per nsec) Ray decay factor (time constant, nsec) Number of random realizations to generate Power of first ray of first cluster Standard deviation of log-normal shadowing of entire impulse response in d. B Flag to specify generation of NLOS channels % % % Outputs h t t 0 np : : a matrix with num_ch columns, each column having a random realization of channel model (impulse response) Time instances (in nsec) of the paths whose signed amplitudes are stored in h Arrival time of the first cluster for each realization number of paths for each realization. • 함수의 입력 인수의 개수에 따른 정의 if nargin<8 nlos=0; end % LOS environment if nargin<7 sdi=0; end % 0 d. B if nargin<6 b 002=1; end % Power of 1 st ray of 1 st cluster 8 /. 29.
2. 1. 3 Saleh-Valenzuela (S-V) Channel Model h_len=1000; for k=1: num_ch % Loop over number of channels tmp_h = zeros(h_len, 1); tmp_t = zeros(h_len, 1); if nlos Tc = exprnd(1/Lam); else Tc = 0; % first cluster arrival occurs at time 0 end t 0(k) = Tc; path_ix = 0; while (Tc<10*Gam) % Cluster loop Tr=0; while (Tr<10*gam) % Ray loop t_val = Tc+Tr; % time of arrival of this ray bkl 2 = b 002*exp(-Tc/Gam)*exp(-Tr/gam); % ray power, Eq. (2. 14) r = sqrt(randn^2+randn^2)*sqrt(bkl 2/2); h_val=exp(1 j*2*pi*rand)*r; % Uniform phase path_ix = path_ix+1; % Row index of this ray tmp_h(path_ix) = h_val; tmp_t(path_ix) = t_val; Tr = Tr + exprnd(1/Lam); % Ray arrival time based on Eq. (2. 11) end Tc = Tc + exprnd(1/lam); % Cluster arrival time based on Eq. (2. 10) end np(k)=path_ix; % Number of rays/paths for this realization [sort_tmp_t, sort_ix] = sort(tmp_t(1: np(k))); % in ascending order t(1: np(k), k) = sort_tmp_t; h(1: np(k), k) = tmp_h(sort_ix(1: np(k))); % Log-normal shadowing on this realization fac = 10^(sdi*randn/20)/sqrt(h(1: np(k), k)'*h(1: np(k), k)); h(1: np(k), k) = h(1: np(k), k)*fac; % Eq. (2. 15) end 9 /. 29.
2. 1. 4 UWB Channel Model § 10 /. 29.
2. 1. 4 UWB Channel Model § 11 /. 29.
2. 1. 4 UWB Channel Model § UWB_model_ct 함수 function [h, t, t 0, np] = UWB_model_ct(Lam, lam, Gam, gam, num_ch, nlos, sdi, sdc, sdr) % IEEE 802. 15. 3 a UWB channel model for PHY proposal evaluation % continuous-time realization of modified S-V channel model % Inputs % Lam : Cluster arrival rate in GHz (avg # of clusters per nsec) % lam : Ray arrival rate in GHz (avg # of rays per nsec) % Gam : Cluster decay factor (time constant, nsec) % gam : Ray decay factor (time constant, nsec) % num_ch: number of random realizations to generate % nlos : Flag to specify generation of Non Line Of Sight channels % % % sdi sdc sdr : Standard deviation of log-normal shadowing of entire impulse response : Standard deviation of log-normal variable for cluster fading : Standard deviation of log-normal variable for ray fading % Outputs % h : a matrix with num_ch columns, each column having a random realization of the channel model (impulse response) % t : organized as h, but holds the time instances (in nsec) of the paths whose signed amplitudes are stored in h % t 0 : the arrival time of the first cluster for each realization % np : the number of paths for each realization. % Thus, the k'th realization of the channel impulse response is the sequence of (time, value) pairs given by (t(1: np(k), h(1: np(k), k)) 12 /. 29.
2. 1. 4 UWB Channel Model % Initialize and precompute some things sd_L = 1/sqrt(2*Lam); % std dev (nsec) of cluster arrival spacing sd_l = 1/sqrt(2*lam); % std dev (nsec) of ray arrival spacing mu_const = (sdc^2+sdr^2)*log(10)/20; % pre-compute for later h_len = 1000; % there must be a better estimate of # of paths than this for k = 1: num_ch % loop over number of channels tmp_h = zeros(h_len, 1); tmp_t = zeros(h_len, 1); if nlos Tc = (sd_L*randn)^2+(sd_L*randn)^2; % First cluster random arrival else Tc = 0; % First cluster arrival occurs at time 0 end t 0(k) = Tc; path_ix = 0; while (Tc<10*Gam) % Determine Ray arrivals for each cluster Tr = 0; % first ray arrival defined to be time 0 relative to cluster ln_xi = sdc*randn; % set cluster fading (new line added in rev. 1) while (Tr<10*gam) t_val = Tc+Tr; % time of arrival of this ray mu = (-10*Tc/Gam-10*Tr/gam)/log(10) - mu_const; % (2. 19) ln_beta = mu + sdr*randn; pk = 2*round(rand)-1; h_val = pk*10^((ln_xi+ln_beta)/20); path_ix = path_ix + 1; % row index of this ray tmp_h(path_ix) = h_val; tmp_t(path_ix) = t_val; Tr = Tr + (sd_l*randn)^2; end Tc = Tc + (sd_L*randn)^2; end np(k) = path_ix; % number of rays (or paths) for this realization [sort_tmp_t, sort_ix] = sort(tmp_t(1: np(k))); % sort in ascending time order t(1: np(k), k) = sort_tmp_t; h(1: np(k), k) = tmp_h(sort_ix(1: np(k))); % now impose a log-normal shadowing on this realization fac = 10^(sdi*randn/20)/sqrt(h(1: np(k), k)'*h(1: np(k), k)); h(1: np(k), k) = h(1: np(k), k)*fac; end 13 /. 29.
2. 1. 4 UWB Channel Model § MATLAB 14 /. 29.
2. 2 Outdoor Channel Models § outdoor channel • channel gain의 시간 변화에 따라 특성이 나타남 Ø 단말기의 mobile speed에 영향을 받음 Ø mobile speed에 따라서, channel gain의 시간 변이는 Doppler spectrum에 의해 결정됨 § 2. 2. 1 FWGN(Filtered With Gaussian Noise) Model • 다양한 유형의 Doppler Spectrum 을 실현할 수 있음. • 가장 인기있는 outdoor channel model • Clarke/Gans model은 baseline FWGN model 이다. 15 /. 29.
2. 2. 1. 1 Clarke/Gans Model § mobile station 주변의 산란 components가, 각 components에 대해 동일한 power로 분배된다는 가정하에 고안됨 § Block diagram • 주파수 도메인에서 complex Gaussian noise가 생성됨. (Real, Imaginary part : 켤레 대칭) • Doppler filter에 의해 filtering 됨. Ø 주파수 성분이 Doppler shift 가 적용됨. • Doppler-shifted Gaussian noise 는 IFFT 를 통해 시간 도메인으로 변환됨. • Imaginary part의 출력에 real part를 추가하여 complex channel gain을 구성 Ø Rayleigh distributed-magnitude의 채널이 생성됨. 16 /. 29.
2. 2. 1. 1 Clarke/Gans Model function [h, Nfft, Nifft, doppler_coeff]=FWGN_model(fm, fs, N) % Input % fm= Maximum Doppler frquency % fs= Sampling frequency % N = Number of samples % Output % h = Complex fading channel ceil : 올림 % Make them simple by taking a FFT with some 2^n points. % tone spacing df=2 fm/Nfft = 2^max(3, nextpow 2(2*fm/fs*N)); % Nfft=2^n Nifft = ceil(Nfft*fs/(2*fm)); % Generate the inependent complex gaussian random process. GI = randn(1, Nfft); GQ = randn(1, Nfft); % take FFT of real signal in order to make hermitian symmetric CGI = fft(GI); CGQ = fft(GQ); % Nfft sample Doppler spectrum generation doppler_coeff = Doppler_spectrum(fm, Nfft); % Do the filtering of the gaussian random variables here. f_CGI = CGI. *sqrt(doppler_coeff); f_CGQ = CGQ. *sqrt(doppler_coeff); % adjusting sample size to take IFFT by (Nifft-Nfft) sample zero-padding tzeros= zeros(1, Nifft-Nfft); Filtered_CGI=[f_CGI(1: Nfft/2) tzeros f_CGI(Nfft/2+1: Nfft)]; Filtered_CGQ=[f_CGQ(1: Nfft/2) tzeros f_CGQ(Nfft/2+1: Nfft)]; h. I = ifft(Filtered_CGI); h. Q= ifft(Filtered_CGQ); % Take the magnitude squared of the I and Q components and add them together. ray. Envelope = sqrt(abs(h. I). ^2 + abs(h. Q). ^2); % Compute the Root Mean Squared Value and Normalize the envelope. ray. RMS = sqrt(mean(ray. Envelope(1: N). *ray. Envelope(1: N))); h = complex(real(h. I(1: N)), -real(h. Q(1: N)))/ray. RMS; 17 /. 29.
2. 2. 1. 1 Clarke/Gans Model § MATLAB 18 /. 29.
2. 2. 1. 2 Modified Frequency-Domain FWGN Model § 19 /. 29.
2. 2. 1. 2 Modified Frequency-Domain FWGN Model § 20 /. 29.
2. 2. 1. 3 Time-Domain FWGN Model § 21 /. 29.
2. 2. 1. 2 Modified Frequency-Domain FWGN Model 2. 2. 1. 3 Time-Domain FWGN Model § Modified Frequency-Domain FWGN channel Matlab code function [Fad. Time, tf] = FWGN_ff(Np, fm_Hz, Nfading, Nfosf, Fading. Type, varargin) fmax= max(fm_Hz); % Doppler frequency spacing respect to maximal Doppler frequency dfmax= 2*Nfosf*fmax/Nfading; if isscalar(fm_Hz) fm_Hz= fm_Hz*ones(1, Np); end % To get a funtion corresponding to Doppler spectrum of "Fading. Type" Fading. Type= lower(Fading. Type); ftn_psd= Doppler_PSD_function(Fading. Type); err_msg= 'The difference between max and min Doppler frequencies is too large. n increase the IFFT size'; if strcmp(Fading. Type(1: 2), 'la') % Laplacian constrained PAS for i=1: Np Nd= floor(fm_Hz(i)/dfmax)-1; % Nd=fm_Hz/dfmax=Nfading/(2*Nfosf) if Nd<1 error(err_msg); %Fadng generation based on FWGN method end % Fad. Time= FWGN_ff(Np, fm_Hz, Nfading, Nfosf, Fading. Type, sigma, phi) tmp= ftn_psd([-Nd: Nd], varargin{1}(i), varargin{2}(i)); % Inputs: tmpz= zeros(1, Nfading-2*Nd+1); % Np : # of multipath Fad. Freq(i, : )= [tmp(Nd+1: end-1) tmpz tmp(2: Nd)]; % fm_Hz : A vector of max. Doppler frequency of each path[Hz] end % Nfading : Doppler filter size (IFFT size) else % symmetric Doppler spectrum % Nfosf : Oversampling factor of Doppler bandwith for i=1: Np % Fading. Type : Doppler type, 'laplacian'/'class'/'flat' Nd= floor(fm_Hz(i)/dfmax)-1; % sigma : Angle spread of UE in case of if Nd<1 'laplacian' Doppler type error(err_msg); % phi : Do. M-Ao. A in case of 'laplacian' Doppler type end % Outputs: tmp= ftn_psd([0: Nd]/Nd); % Fad. Time : Np x Nfading, fading time matrix tmpz= zeros(1, Nfading-2*Nd+3); Fad. Freq(i, : )= [tmp(1: Nd-1) tmpz fliplr(tmp(2: Nd-1))]; end % Add a random phase to the Doppler spectrum Fad. Freq = sqrt(Fad. Freq). *exp(2*pi*1 j*rand(Np, Nfading)); Fad. Time = ifft(Fad. Freq, Nfading, 2); % Normalization to 1 Fad. Time= Fad. Time. /sqrt(mean(abs(Fad. Time). ^2, 2)*ones(1, size(Fad. Time, 2))); tf=1/(2*fmax*Nfosf); %fading sample time=1/(Doppler BW*Nfosf) isscalar(A) : A가 스칼라이면 1, 아니면 0 lower(A) : 문자열 A를 모두 소문자로 변환 strcmp(A, B) : 문자열 A와 B를 비교하여 동일하면 1, 아니면 0을 반환 22 /. 29.
2. 2. 1. 2 Modified Frequency-Domain FWGN Model 2. 2. 1. 3 Time-Domain FWGN Model § Time-Domain FWGN channel Matlab code function [Fad. Mtx, tf]=FWGN_tf(Np, fm_Hz, N, M, Nfosf, type, varargin) % fading generation using FWGN with fitering in the time domain % Inputs: % Np : number of multipath % fm_Hz : A vector of maximum Doppler frequency of each path[Hz] % N : number of independent random realization % M : Length of Doppler filter, i. e, size of IFFT % Nfosf : Fading oversampling factor % type : Doppler spectrum type % 'flat'=flat, 'class'=calssical, 'sui'=spectrum of SUI channel % '3 gpprice'=rice spectrum of 3 GPP % Outputs: % Fad. Mtx : Np x N fading matrix % generates scatter components having CN(0, 1) if isscalar(fm_Hz) fm_Hz= fm_Hz*ones(1, Np); end fmax= max(fm_Hz); path_wgn= sqrt(1/2)*complex(randn(Np, N), randn(Np, N)); for p=1: Np filt=gen_filter(fm_Hz(p), fmax, M, Nfosf, type, varargin{: }); path(p, : )=fftfilt(filt, [path_wgn(p, : ) zeros(1, M)]); %filtering WGN end Fad. Mtx= path(: , M/2+1: end-M/2); tf=1/(2*fmax*Nfosf); %fading sample time=1/(Max. Doppler BW*Nfosf) % Normalization to 1 Fad. Mtx= Fad. Mtx. /sqrt(mean(abs(Fad. Mtx). ^2, 2)*ones(1, size(Fad. Mtx, 2))); 23 /. 29.
2. 2. 1. 2 Modified Frequency-Domain FWGN Model 2. 2. 1. 3 Time-Domain FWGN Model § Generation of two different paths with FWGN channel model. 24 /. 29.
2. 2. 2 Jakes Model § 25 /. 29.
2. 2. 2 Jakes Model § 26 /. 29.
2. 2. 2 Jakes Model § 27 /. 29.
2. 2. 2 Jakes Model function [h, tf]=Jakes_Flat(fd, Ts, Ns, t 0, E 0, phi_N) % Inputs: % fd : Doppler frequency % Ts : sampling period % Ns : number of samples % t 0 : initial time % E 0 : channel power % phi_N : inital phase of the maximum doppler frequency sinusoid % Outputs: % h : complex fading vector % t_state: current time if nargin<6 phi_N=0; end if nargin<5 E 0=1; end if nargin<4 t 0=0; end if nargin<3 error('More arguments are needed for Jakes_Flat()'); end N 0=8; % As suggested by Jakes N=4*N 0+2; % an accurate approximation wd=2*pi*fd; % Maximum doppler frequency[rad] t = t 0+[0: Ns-1]*Ts; % Time vector tf = t(end)+Ts; % Final time coswt = [sqrt(2)*cos(wd*t); 2*cos(wd*cos(2*pi/N*[1: N 0]')*t)]; % Eq. (2. 26) h = E 0/sqrt(2*N 0+1)*exp(1 j*[phi_N pi/(N 0+1)*[1: N 0]])*coswt; % Eq. (2. 23) 28 /. 29.
2. 2. 2 Jakes Model § MATLAB 29 /. 29.
- Slides: 30