필터 지우기
필터 지우기

Channel Estimation in OFDM using Neural Networks.

조회 수: 5 (최근 30일)
Shireen Shah
Shireen Shah 2018년 5월 17일
댓글: Sajid Sarwar 2020년 9월 19일
I am trying to implement the following code, but i get lots of fluctuations in MSE vs SNR of Neural networks. Could anyone please help me in getting a smoother response.
The code is give below:
clc clear all
nCP = 8; %round(Tcp/Ts); nFFT = 32; NT = nFFT + nCP; F = dftmtx(nFFT)/sqrt(nFFT); MC = 2; EsNodB = 0:1:31; snr = 10.^(EsNodB/10); beta = 17/9; M = 16; modObj = modem.qammod(M); demodObj = modem.qamdemod(M); L = 5; for ii = 1:length(EsNodB) disp('EsN0dB is :'); disp(EsNodB(ii)); tic; ChMSE_LS = 0; error=zeros(1,32); err2=[] err1=[] for mc = 1:MC % Random channel taps g = randn(L,1)+1i*randn(L,1); g = g/norm(g); H = fft(g,nFFT); % generation of symbol X = randi([0 M-1],nFFT,1); %BPSK symbols XD = modulate(modObj,X)/sqrt(10); % normalizing symbol power x = F'*XD; %loading xout = [x(nFFT-nCP+1:nFFT);x]; % channel convolution and AWGN y = conv(xout,g); nt =randn(nFFT+nCP+L-1,1) + 1i*randn(nFFT+nCP+L-1,1); No = 10^(-EsNodB(ii)/10); y = y + sqrt(No/2)*nt; % Receiver processing y = y(nCP+1:NT); Y = F*y; % frequency doimain LS channel estimation HhatLS = Y./XD; ChMSE_LS = ChMSE_LS + ((H -HhatLS)'*(H-HhatLS))/nFFT; %for l=1:32 x1=abs(x); x2=x1'; y1=abs(Y); y2=y1'; net=newff(minmax(y2), [4,1], {'logsig','purelin', 'trainlm'}); net=init(net) net.trainparam.epochs=600; %No. of iterations net.trainparam.lr=0.01; [net,tr]=train(net,y2,x2) x_net = net(y2); error=(x2-x_net); %err1=sum(err) %err2(l)=err1/MC; dbstop if error % end end %inp=rand(1,4) %v=sim(net,inp) %plot(v); %l= v-inp;
ChEstLS(ii) = ChMSE_LS/MC; %error1(ii)=err/MC; err=error/MC; end toc figure, plot(err,'g'); legend('Error'); figure, % Channel estimation semilogy(EsNodB,abs(err),'b','LineWidth',2); hold on semilogy(EsNodB,ChEstLS,'r','LineWidth',2); hold on;grid on;xlabel('EsNodB'); ylabel('Channel MSE');
legend('NN', 'LS');
  댓글 수: 3
Joswa
Joswa 2020년 3월 4일
can you provide the dataset for this code??
Sajid Sarwar
Sajid Sarwar 2020년 9월 19일
Where to get dataset for this simulation?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Pattern Recognition and Classification에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by