How can I obtain the time domain signal of the IFFT results.
1 次查看(过去 30 天)
显示 更早的评论
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/167067/image.png)
THanks for any help!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Modulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!