Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21611 Discussions

OFDM symbol generation

Altera_Forum
Honored Contributor II
1,408 Views

It occurred to me that this Matlab code snippet may be helpful for those of us working on testing implementations of OFDM/COFDM carrier based systems, I had already posted this on dsprelated.com as well: 

 

It generates vector tx, made up of ofdm symbols. You can change modulation scheme to any of qpsk,16qam or 64qam.  

With some effort, you can also change the bandwidth to suit your case. 

 

The output scaling is not normalised, you can adjust it at will. 

 

%bandwidth = 1200/2048 of sampling frequency clear all; nData = 100832; %vector length ModulationType = '64QAM'; nFFT = 2048; %fft size nCar = 1200; %number of active carriers nPrefix = 144; %compute number of ofdm symbols nSymbols = ceil(nData/(nFFT+nPrefix)); %generate random data symbols switch ModulationType case 'QPSK', alphabet = ; case '16QAM', alphabet = ; case '64QAM', alphabet = ; end tx = ; for k = 1:nSymbols QAM = complex(randsrc(nCar,1,alphabet),randsrc(nCar,1,alphabet)); fft_in = zeros(1,nFFT); fft_in(1:600) = QAM(1:600); fft_in(end-600+1:end) = QAM(601:end); fft_out = ifft(fft_in); %concatenate ofdm symbol plus its prefix into tx vector prefix = fft_out(nFFT-nPrefix+1:nFFT); tx = ; end
0 Kudos
0 Replies
Reply