Azzera filtri
Azzera filtri

Channel Estimation in OFDM using Neural Networks.

5 visualizzazioni (ultimi 30 giorni)
Shireen Shah
Shireen Shah il 17 Mag 2018
Commentato: Sajid Sarwar il 19 Set 2020
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 Commenti
Joswa
Joswa il 4 Mar 2020
can you provide the dataset for this code??
Sajid Sarwar
Sajid Sarwar il 19 Set 2020
Where to get dataset for this simulation?

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by