メインコンテンツ

MIMO シミュレーションでの OFDM の適用

単純な 2×2 シングルユーザー MIMO のエラー レート シミュレーションで OFDM 変調器と復調器を使用します。OFDM パラメーターは 802.11n 標準に基づいています。

ユーザー指定のパイロット インデックス、挿入された DC null、2 つの送信アンテナおよび 2 つの受信アンテナを使用する OFDM 変調器と復調器のペアを作成します。アンテナによって異なるパイロット インデックスを指定します。

ofdmMod = comm.OFDMModulator(FFTLength=128, ...
    PilotInputPort=true, ...
    NumSymbols=3, ...
    PilotCarrierIndices= ...
    cat(3,[12; 40; 54; 76; 90; 118],[13; 39; 55; 75; 91; 117]), ...
    InsertDCNull=true, ...
    NumTransmitAntennas=2);
ofdmDemod = comm.OFDMDemodulator(ofdmMod);
ofdmDemod.NumReceiveAntennas = 2;

各送信アンテナのパイロット サブキャリアのリソース マッピングを表示します。図のグレーの線は、パイロット信号の干渉を最小限にするための null サブキャリアの挿入を示しています。

showResourceMapping(ofdmMod)

Figure OFDM Subcarrier Mapping for Tx Antenna 1 contains an axes object. The axes object with title OFDM Subcarrier Mapping for Tx Antenna 1, xlabel OFDM Symbols, ylabel Subcarrier Indices contains an object of type image.

Figure OFDM Subcarrier Mapping for Tx Antenna 2 contains an axes object. The axes object with title OFDM Subcarrier Mapping for Tx Antenna 2, xlabel OFDM Symbols, ylabel Subcarrier Indices contains an object of type image.

info メソッドを使用して、OFDM 変調器の次元を決定します。

ofdmModDim = info(ofdmMod);
numDataSc = ofdmModDim.DataInputSize(1); % Number of data subcarriers
numSym = ofdmModDim.DataInputSize(2);    % Number of OFDM symbols
numTxAnt = ofdmModDim.DataInputSize(3);  % Number of transmit antennas

QPSK 変調を使用して 100 個の OFDM フレームが生成されるようにパラメーターを設定します。

nframes = 100;
M = 4; % Modulation order to QPSK

エラー レート カウンターを作成します。

errorRate = comm.ErrorRate;

2×2 のフラット レイリー フェージング チャネルを想定して、100 フレームにわたって OFDM システムのシミュレーションを実行します。単純な最小二乗解を使用してマルチパス フェージングの影響を取り除き、OFDM 波形と QPSK データを復調します。元のデータを復調されたデータと比較して、誤り統計を生成します。

for k = 1:nframes

    % Generate a frame of user data
    dataIn = randi([0 M-1],numDataSc*numSym*numTxAnt,1);

    % Split the user data into two different streams and map to QPSK
    % symbols
    streamDataOut = reshape(dataIn,numTxAnt,[]).';
    mapperOut = pskmod(streamDataOut,M,pi/4);

    % Generate random OFDM pilot symbols
    pilotData = complex(rand(ofdmModDim.PilotInputSize), ...
        rand(ofdmModDim.PilotInputSize));

    % Reshape the modulated data streams to match the OFDM modulator
    % requirements and modulate the symbols using OFDM
    ofdmModData = reshape(mapperOut,numDataSc,numSym,numTxAnt);
    dataOFDM = ofdmMod(ofdmModData,pilotData);

    % Create flat, i.i.d., Rayleigh fading channel 2-by-2 channel
    chGain = complex(randn(2,2),randn(2,2))/sqrt(2); 

    % Pass OFDM signal through Rayleigh and AWGN channels
    receivedSignal = awgn(dataOFDM*chGain,30);

    % Apply least squares solution to remove effects of fading channel
    rxSigMF = chGain.' \ receivedSignal.';

    % Demodulate OFDM data
    receivedOFDMData = ofdmDemod(rxSigMF.');

    % Form the received streams
    receivedOFDMStreams = reshape(receivedOFDMData,[],numTxAnt);

    % Demodulate QPSK data
    receivedStreams = pskdemod(receivedOFDMStreams,M,pi/4);

    % Demap the data from each rx stream back to the user data
    receivedData = reshape(receivedStreams.',[],1);

    % Compute error statistics
    errors = errorRate(dataIn,receivedData);
end

誤りの統計を表示します。

fprintf('\nSymbol error rate = %d from %d errors in %d symbols\n',errors)
Symbol error rate = 8.996795e-02 from 5614 errors in 62400 symbols

参考

関数

オブジェクト

トピック