How can I obtain the time domain signal of the IFFT results.
조회 수: 2 (최근 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!