please describe this loop
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
for i=1 : length(SNR_V) SNR=SNR_V(i); for k=1 : nIteration % generating random channel coefficients h(1:L,1)=random('Normal',0,1,L,1) + ... j * random('Normal',0,1,L,1); h=h./sum(abs(h)); % normalization
% Tr Data TrDataBit=randint(N,1,M); TrDataMod=qammod(TrDataBit,M); TrDataMod(Ip)=Ep * TrDataMod(Ip); TrDataIfft=ifft(TrDataMod,N); TrDataIfftGi=[TrDataIfft(N- GI + 1 : N);TrDataIfft];
% tx Data TxDataIfftGi=filter(h,1,TrDataIfftGi); % channel effect % adding awgn noise TxDataIfftGiNoise=awgn(TxDataIfftGi, SNR - db(std(TxDataIfftGi))); % normalization to signal power db
TxDataIfft=TxDataIfftGiNoise(GI+1:N+GI); TxDataMod=fft(TxDataIfft,N);
% Channel estimation Spilot=TrDataMod(Ip); % trnasmitted pilots Ypilot=TxDataMod(Ip); % received pilots
G=(Ep * length(Ip))^-1* ctranspose(sqrt(Ep)*diag(Spilot)*ctranspose(F(1:L, Ip)));%ctranspose(F(1:L, Ip))=(F(1:L, Ip))'
hHat=G*Ypilot; % estimated channel coefficient in time domain
TxDataBit=qamdemod(TxDataMod./(fft(hHat,N)),M);
% bit error rate computation [nErr bErr(i,k)]=symerr(TxDataBit(Is),TrDataBit(Is)); end end
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Propagation and Channel Models dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!