Filter löschen
Filter löschen

How can I obtain the time domain signal of the IFFT results.

2 Ansichten (letzte 30 Tage)
desword jacky
desword jacky am 7 Sep. 2017
Recently, I am learning the OFDM in matlab. And here is the example code for using comm.OFDMModulator.
clear all;
close all;
M = 4; % Modulation alphabet
k = log2(M); % Bits/symbol
numSC = 16; % Number of OFDM subcarriers
cpLen = numSC/4; % OFDM cyclic prefix length
maxBitErrors = 100; % Maximum number of bit errors
maxNumBits = 1e7; % Maximum number of bits transmitted
qpskMod = comm.QPSKModulator('BitInput',true);
qpskDemod = comm.QPSKDemodulator('BitOutput',true);
ofdmMod = comm.OFDMModulator('FFTLength',numSC,'CyclicPrefixLength',cpLen, 'NumSymbols',1 );% numDC = numSC -11; (guardband num)
ofdmDemod = comm.OFDMDemodulator('FFTLength',numSC,'CyclicPrefixLength',cpLen, 'NumSymbols', 1);
channel = comm.AWGNChannel('NoiseMethod','Variance', ...
'VarianceSource','Input port');
errorRate = comm.ErrorRate('ResetInputPort',true);
ofdmDims = info(ofdmMod);
numDC = ofdmDims.DataInputSize(1);
frameSize = [k*numDC 1];
EbNoVec = (0:10)';
snrVec = EbNoVec + 10*log10(k) + 10*log10(numDC/numSC);
berVec = zeros(length(EbNoVec),3);
errorStats = zeros(1,3);
snr = snrVec(1);
dataIn = randi([0,1],frameSize); % Generate binary data
qpskTx = qpskMod(dataIn); % Apply QPSK modulation
txSig = ofdmMod(qpskTx); % Apply OFDM modulation
Now that I have obtain the IFFT results of the qpsk modulated signal, I want to plot the seperation of each subcarrier symbol and the final combination of the signal in time domain to better understand the OFDM modulation. However, I just don't know how to plot the time domain signal of the IFFT results that it has 20 complex values.
Here is an example picture that I want to have.
THanks for any help!

Antworten (0)

Community Treasure Hunt

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

Start Hunting!