Forums

Re: matlab code required for ofdm

Started by munt...@yahoo.com May 12, 2010
hi friend

check out this code:

clc;
clear all;
close all;
%% specification of data parameters
% fft length
fftlength%6;
%Modulation order M
M;
% data generation;
mydata=randint(1000,1,2);
%% Modulation (mapping bits to symbols) each symbol = 4 bits

modulatedData=modulate(modem.pskmod('M',16,'SymbolOrder','binary','InputType','bit'),mydata);

%% zero pading

paddedData=zeros(256 , 1 ) ;
dataLength=length(modulatedData);
paddedData(1 : dataLength/2 ) = modulatedData( 1 : dataLength /2 ) ;
paddedData( dataLength/2+6 : end ) = modulatedData (dataLength /2 : end ) ;
%% IFFT block
ifftData=ifft( paddedData , fftlength ) ;
lengthd=length(ifftData);

%% Parallel to Serial

serialtoparallel=reshape(ifftData,1,lengthd);
%% transmit through channel
noisyData=awgn(serialtoparallel,20,'measured' ) ;

%% receive the data

fftDatat(noisyData , fftlength );
%% remove the zeros

recievedData1(1 : dataLength/2 )tData(1 : dataLength/2 );
recievedData2(1 : dataLength/2)tData(dataLength/2+7: end);
rData=[recievedData1,recievedData2];

%% serial to parallel

stpdata=reshape(rData,length(rData),[]);

%% demodulate the recieved data
demodulatedDataodulate(modem.pskdemod('M',16,'SymbolOrder','binary','OutputType','bit'),stpdata);
[number,ratio]=biterr(demodulatedData,mydata)
hi all
>
> I have work as a telecommunication engineer. I have been making research and preparing thesis regarding with OFDM and its applications for my work . To understand OFDM more and more, I want to simulate it with Matlab.
>
> If it is possible, could you supply me a matlab code or codes which are able to simulate OFDM (for example matlab program which may simulate BER performance prediction, modelling, implementation, time and frequency domain spectrum offset, channel response,channel estimation,ICI,ISI and PAPR etc is very god for understanding OFDM and its concept).
>I look forward to your reply.
>yhanks in advance
>
> Regards
>dhruva
>d...@indiatimes.com