+
tx.m X
□
[function y = ofdm_tx(ref)
□ %OFDHTX OFDH modulate a frequency-domain input over [0,Fs)
k Y = OFDHTX(REF) interleaves the input signal REF, uhich is a k 50-element vector of real or complex values, uith a QPSK-modulated k reference signal, then performs OFDH rnodulation. Input is assumed k to represent freąuencies ordered from 0 to Fs. Y is a 640-element te complex column vector that has been modulated by a 512-point IFFT k and prepended uith a 128-length cyclic prefix.
k number of QPSK symbols tc QPSK rnodulation order * OFDH FFT size tc cyclic prefix length
tc Initializations Nsymbols = 250; modOrder = 4; nfft = 512; cpLen = nfft/4;
tc Generate QPSK-modulated message data msg = randi([0 nnodOrder-1] , Nsymbols, 1); qpskSig = pskmod(msg, modOrder, pi/4);
k Interleave reference and message data qpskSig = reshape(qpskSig, Nsymbols/50, Nsymbols/5); temp = [ref(:)‘; qpskSig]; intlvOut = reshape(temp, numel(temp), 1);
tc OFDH modulate
yFreq = [zeros (106,1); intlvOut(1:150,1); 0; ...
intlvOut (151:end, 1) ; zeros (105,1) ] ; tc data uith nulls yTime = ifft(yFreq,nfft); k rnodulation to time domain
y = [yTime(end-cpLen+1:end,1); yTime]; k cyclic prefix insertion
ofdm_tx
1
Col 2