How can I pass the OFDM signal through a Rayleigh channel based on this example?
8 ビュー (過去 30 日間)
古いコメントを表示
Example:
Command window code:
openExample('comm/QPSKandOFDMwithSysObjectsExample')
This example passes the modulated OFDM signal through a AWGN channel.But how can I pass this OFDM signal through a Rayleigh channel?
I tried to modify the code in the example like this but failed:
1. Set the Rayleigh channel object:
rayChan = comm.RayleighChannel('SampleRate',1e3,'MaximumDopplerShift',0);
2. Add a line of code in the while loop:
txSig = step(rayChan, txSig);
after this line:
txSig = step(hOFDMmod,qpskTx);
The changed while loop is like this:
while errorStats(2) <= maxBitErrors && errorStats(3) <= maxNumBits
dataIn = randi([0,1],frameSize); % Generate binary data
qpskTx = step(hQPSKMod,dataIn); % Apply QPSK modulation
txSig = step(hOFDMmod,qpskTx); % Apply OFDM modulation
txSig = step(rayChan, txSig); % I added
powerDB = 10*log10(var(txSig)); % Calculate Tx signal power
noiseVar = 10.^(0.1*(powerDB-snr)); % Calculate the noise variance
rxSig = step(hChan,txSig,noiseVar); % Pass the signal through a noisy channel
qpskRx = step(hOFDMdemod,rxSig); % Apply OFDM demodulation
dataOut = step(hQPSKDemod,qpskRx); % Apply QPSK demodulation
errorStats = step(hError,dataIn,dataOut,0); % Collect error statistics
end
The simulation result is:
The result is wrong obviously. But why? How should I modify the code to let the OFDM signal pass through Rayleigh channel and get the right results?
2 件のコメント
Yasantha Samarawickrama
2021 年 1 月 21 日
Hi anybody could sort out this issue? Is it because not using any equalization?
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Propagation and Channel Models についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!