Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

FFT ベースでオーバーサンプリングした場合の OFDM

この例では、OFDM+CP 信号を変更して、OFDM 変調器からオーバーサンプリングされた波形を効率的に出力します。サブキャリア間隔と FFT 長に関連付けたサンプル レートを使用して単純なケースを構成します。

k = 4;       % Number of bits per symbol 
M = 2^k;     % Modulation order
nFFT = 128;  % Number of FFT bins
cplen = 8;   % CP length
txsymbols = randi([0 M-1],nFFT,1);
txgrid = qammod(txsymbols,M,UnitAveragePower=true);
txout = ifft(txgrid,nFFT);
txout = txout(:); % Vectorize matrix if processing multiple symbols
txcp = txout(nFFT-cplen+1:nFFT);
txout = [txcp; txout];

scs = 20e3;        % Subcarrier spacing in Hz
Fs = scs * nFFT/2; % Sampling rate (1.28e6 Hz)
Ts = 1 / Fs;       % Sample duration in seconds  

Tend = Ts * (length(txout)-1);
subplot(211)
hold off
plot(0:Ts:Tend,real(txout),"*")
title("Real component of transmitter output")
subplot(212)
hold off
plot(0:Ts:Tend,imag(txout),"*")
title("Imaginary component of transmitter output")

時間領域でオーバーサンプリングを発生させるために、nFFT よりも長い FFT 長を定義します。後で比較しやすいように、txgrid の中央にゼロを挿入し、元の信号とアップサンプリングされた信号についてビンの中心間の対応を維持します。以下のコントロールを使用すると、OFDM 変調器の出力と復調器の入力で使用される整数のオーバーサンプリング レートを調整できます。

upFactor = 3;
nFFTUp  = upFactor * nFFT;
fftgrid = [txgrid(1:nFFT/2); ...
    zeros((upFactor-1)*nFFT,1); ...
    txgrid((nFFT/2+1):nFFT)];
% Each column of fftgrid is one OFDM symbol
txout = upFactor * ifft(fftgrid,nFFTUp);
% Vectorize the matrix to process multiple OFDM symbols
txout = txout(:);
cplenUp = cplen * upFactor;
txcp = txout(nFFTUp-cplenUp+1:nFFTUp);
txout = [txcp; txout];
Ts = 1 / (upFactor*Fs);
Tend = Ts * (length(txout)-1);
subplot(211)
hold on
plot(0:Ts:Tend,real(txout))
legend ("Original","Upsampled","Location","southeast")
subplot(212)
hold on
plot(0:Ts:Tend,imag(txout))
legend ("Original","Upsampled","Location","southeast")

Figure contains 2 axes objects. Axes object 1 with title Real component of transmitter output contains 2 objects of type line. One or more of the lines displays its values using only markers These objects represent Original, Upsampled. Axes object 2 with title Imaginary component of transmitter output contains 2 objects of type line. One or more of the lines displays its values using only markers These objects represent Original, Upsampled.

受信信号にノイズ、周波数依存性、および遅延を追加するチャネルを通して送信をフィルター処理します。

hchan = [0.4 1 0.4].';
rxin = awgn(txout,40);       % Add noise   
rxin = conv(rxin,hchan);     % Add frequency dependency
channelDelay = dsp.Delay(1); % Could use fractional delay
rxin = channelDelay(rxin);   % Add delay

CP 長未満のランダムなオフセットを追加します。オフセットをゼロに設定すると、送信信号と受信信号の間の完全な同期をモデル化します。CP 長未満の任意のタイミング オフセットは、追加の線形位相によるイコライズによって補正できます。異なるレートで信号を直接比較するには、FFT 処理の前に、同期信号をアップサンプリング係数で正規化します。

offset = (randi(cplenUp) - 1); % random offset less than length of CP
% Remove CP and synchronize the received signal
rxsync = rxin(cplenUp+1+channelDelay.Length-offset:end);

rxgrid = fft(rxsync(1:nFFTUp),nFFTUp)/upFactor;

実際のシステムでは、信号再生プロセスの一部としてチャネルの推定が必要です。OFDM と CP の組み合わせにより、各周波数ビンの複素数スカラーへのイコライズが簡素化されます。レイテンシが CP 長の範囲内に収まっている限り、同期はチャネル推定器によって実行されます。以下のコントロールを使用すると、受信機のフロント エンドでイコライズを無効にして実験できます。

useEqualizer = true;
if useEqualizer
    hfchan = fft(hchan,nFFTUp);
    % Linear phase term related to timing offset
    offsetf = exp(-1i * 2*pi*offset * (0:nFFTUp-1).'/nFFTUp);
    rxgrideq = rxgrid ./ (hfchan .* offsetf);
else % Without equalization errors occur
    rxgrideq = rxgrid;
end
rxgridNoZeroPad = [rxgrideq(1:nFFT/2); ...
    rxgrideq((1+(upFactor-0.5)*nFFT):end)];
rxsymbols = qamdemod(rxgridNoZeroPad,M,UnitAveragePower=true);
if max(txsymbols - rxsymbols) < 1e-8
    disp("Oversampled receiver output matches transmitter input.");
else
    disp("Received symbols do not match transmitted symbols.")
end
Oversampled receiver output matches transmitter input.

参考

関数

関連するトピック

外部の Web サイト