Main Content

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

レイズド コサイン フィルター処理

この例では、レイズド コサイン フィルターの符号間干渉 (ISI) 除去力を示します。また、レイズド コサイン送信および受信フィルター System object を使用して、送信側と受信側との間でレイズド コサイン フィルター処理を分割する方法も説明します。

レイズド コサイン フィルターの仕様

レイズド コサイン フィルターの主なパラメーターは、ロールオフ係数で、これは間接的にフィルターの帯域を指定します。理想的なレイズド コサイン フィルターの実現には、タップが無限に必要となります。したがって、実際のレイズド コサイン フィルターはウィンドウ関数がかけられます。ウィンドウ長は、FilterSpanInSymbols プロパティを使用して制御されます。この例では、フィルターが 6 つのシンボル区間にまたがるため、ウィンドウ長を 6 つのシンボル区間として指定します。また、そのようなフィルターにも 3 つのシンボル区間の群遅延があります。レイズド コサイン フィルターは、信号がアップサンプリングされるパルス整形で使用されます。したがって、アップサンプリング係数を指定することも必要です。この例では、以下のパラメーターを使用してレイズド コサイン フィルターを設計します。

Nsym = 6;           % Filter span in symbol durations
beta = 0.5;         % Roll-off factor
sampsPerSym = 8;    % Upsampling factor

レイズド コサイン送信フィルター System object™ を作成し、目的のフィルター特性を満たすようにそのプロパティを設定します。impz を使用してフィルター特性を可視化します。

rctFilt = comm.RaisedCosineTransmitFilter(...
  Shape='Normal', ...
  RolloffFactor=beta, ...
  FilterSpanInSymbols=Nsym, ...
  OutputSamplesPerSymbol=sampsPerSym)
rctFilt = 
  comm.RaisedCosineTransmitFilter with properties:

                     Shape: 'Normal'
             RolloffFactor: 0.5000
       FilterSpanInSymbols: 6
    OutputSamplesPerSymbol: 8
                      Gain: 1

% Visualize the impulse response
impz(rctFilt.coeffs.Numerator)

Figure contains an axes object. The axes object with title Impulse Response, xlabel n (samples), ylabel Amplitude contains an object of type stem.

このオブジェクトは、ユニット エネルギーで直接型ポリフェーズ FIR フィルターを設計します。フィルターには Nsym*sampsPerSym タップまたは Nsym*sampsPerSym+1 タップの次数があります。フィルター処理済みのデータとフィルター処理されていないデータが重ねられた時に一致するように、Gain プロパティを使ってフィルター係数を正規化できます。

% Normalize to obtain maximum filter tap value of 1
b = coeffs(rctFilt);
rctFilt.Gain = 1/max(b.Numerator);

% Visualize the impulse response
impz(rctFilt.coeffs.Numerator)

Figure contains an axes object. The axes object with title Impulse Response, xlabel n (samples), ylabel Amplitude contains an object of type stem.

レイズド コサイン フィルターを使ったパルス整形

バイポーラ データ シーケンスを生成します。さらに、レイズド コサイン フィルターを使用して、ISI を発生させずに波形を整形します。

% Parameters
DataL = 20;             % Data length in symbols
R = 1000;               % Data rate
Fs = R * sampsPerSym;   % Sampling frequency

% Create a local random stream to be used by random number generators for
% repeatability
hStr = RandStream('mt19937ar',Seed=0);

% Generate random data
x = 2*randi(hStr,[0 1],DataL,1)-1;
% Time vector sampled at symbol rate in milliseconds
tx = 1000 * (0: DataL - 1) / R;

プロットでデジタル データと内挿信号を比較します。フィルターの群遅延 (Nsym/(2*R)) によりフィルターのピーク応答が遅れるため、その 2 つの信号を比較することは困難です。有益なサンプルをすべてフィルターからフラッシュするために、入力 x の末尾に Nsym/2 個のゼロを追加していることに注意してください。

% Filter
yo = rctFilt([x; zeros(Nsym/2,1)]);
% Time vector sampled at sampling frequency in milliseconds
to = 1000 * (0: (DataL+Nsym/2)*sampsPerSym - 1) / Fs;
% Plot data
fig1 = figure;
stem(tx, x, 'kx'); hold on;
% Plot filtered data
plot(to, yo, 'b-'); hold off;
% Set axes and labels
axis([0 30 -1.7 1.7]);  xlabel('Time (ms)'); ylabel('Amplitude');
legend('Transmitted Data','Upsampled Data','Location','southeast')

Figure contains an axes object. The axes object with xlabel Time (ms), ylabel Amplitude contains 2 objects of type stem, line. These objects represent Transmitted Data, Upsampled Data.

入力信号を遅らせることで、レイズド コサイン フィルターの群遅延を補正します。これで、レイズド コサイン フィルターが信号をアップサンプリングし、信号にフィルター処理を行うようすが確認しやすくなりました。フィルター処理された信号は、入力サンプル時の遅延入力信号と同一です。これは、ISI を回避しながらも信号を帯域制限するレイズド コサイン フィルターの機能を示しています。

% Filter group delay, since raised cosine filter is linear phase and
% symmetric.
fltDelay = Nsym / (2*R);
% Correct for propagation delay by removing filter transients
yo = yo(fltDelay*Fs+1:end);
to = 1000 * (0: DataL*sampsPerSym - 1) / Fs;
% Plot data.
stem(tx, x, 'kx'); hold on;
% Plot filtered data.
plot(to, yo, 'b-'); hold off;
% Set axes and labels.
axis([0 25 -1.7 1.7]);  xlabel('Time (ms)'); ylabel('Amplitude');
legend('Transmitted Data','Upsampled Data','Location','southeast')

Figure contains an axes object. The axes object with xlabel Time (ms), ylabel Amplitude contains 2 objects of type stem, line. These objects represent Transmitted Data, Upsampled Data.

ロールオフ係数

ロールオフ係数を 0.5 (青い曲線) から 0.2 (赤い曲線) に変更することによってフィルター処理された出力に見られる効果を示します。ロールオフ値が低いほど、フィルターの遷移帯域は狭くなります。その結果、フィルター処理済みの信号のオーバーシュートは、青い曲線より赤い曲線の方が大きくなります。

% Set roll-off factor to 0.2
rctFilt2 = comm.RaisedCosineTransmitFilter(...
  Shape='Normal', ...
  RolloffFactor=0.2, ...
  FilterSpanInSymbols=Nsym, ...
  OutputSamplesPerSymbol=sampsPerSym);
% Normalize filter
b = coeffs(rctFilt2);
rctFilt2.Gain = 1/max(b.Numerator);
% Filter
yo1 = rctFilt2([x; zeros(Nsym/2,1)]);
% Correct for propagation delay by removing filter transients
yo1 = yo1(fltDelay*Fs+1:end);
% Plot data
stem(tx, x, 'kx'); hold on;
% Plot filtered data
plot(to, yo, 'b-',to, yo1, 'r-'); hold off;
% Set axes and labels
axis([0 25 -2 2]);  xlabel('Time (ms)'); ylabel('Amplitude');
legend('Transmitted Data','beta = 0.5','beta = 0.2',...
    'Location','southeast')

Figure contains an axes object. The axes object with xlabel Time (ms), ylabel Amplitude contains 3 objects of type stem, line. These objects represent Transmitted Data, beta = 0.5, beta = 0.2.

ルート レイズド コサイン フィルター

通常、レイズド コサイン フィルター処理は、送信側と受信側の間でフィルター処理を分割する際に使用されます。送信側と受信側の両方とも、ルート レイズド コサイン フィルターを採用しています。送信側のフィルターと受信側のフィルターを組み合わせたものが、レイズド コサイン フィルターです。これにより ISI は最小化されます。形状を 'Square root' として設定することによりルート レイズド コサイン フィルターを指定します。

% Design raised cosine filter with given order in symbols
rctFilt3 = comm.RaisedCosineTransmitFilter(...
  Shape='Square root', ...
  RolloffFactor=beta, ...
  FilterSpanInSymbols=Nsym, ...
  OutputSamplesPerSymbol=sampsPerSym);

設計されたフィルターを使用して、送信側でデータ ストリームがアップサンプリングおよびフィルター処理されます。このプロットは、ルート レイズド コサイン フィルター使用してフィルター処理された送信信号を示します。

% Upsample and filter.
yc = rctFilt3([x; zeros(Nsym/2,1)]);
% Correct for propagation delay by removing filter transients
yc = yc(fltDelay*Fs+1:end);
% Plot data.
stem(tx, x, 'kx'); hold on;
% Plot filtered data.
plot(to, yc, 'm-'); hold off;
% Set axes and labels.
axis([0 25 -1.7 1.7]);  xlabel('Time (ms)'); ylabel('Amplitude');
legend('Transmitted Data','Sqrt. Raised Cosine','Location','southeast')

Figure contains an axes object. The axes object with xlabel Time (ms), ylabel Amplitude contains 2 objects of type stem, line. These objects represent Transmitted Data, Sqrt. Raised Cosine.

送信信号 (マゼンタ色の曲線) は受信側でフィルター処理されます。完全な波形を示すため、フィルター出力の間引きは行いませんでした。既定のユニット エネルギー正規化処理により、送信側フィルターと受信側フィルターの組み合わせのゲインは、正規化されたレイズド コサイン フィルターのゲインと同じになります。単一のレイズド コサイン フィルターを使用してフィルター処理された信号と結局同じとなるフィルター処理された受信信号は、受信側で青い曲線によって描かれます。

% Design and normalize filter.
rcrFilt = comm.RaisedCosineReceiveFilter(...
  'Shape',                  'Square root', ...
  'RolloffFactor',          beta, ...
  'FilterSpanInSymbols',    Nsym, ...
  'InputSamplesPerSymbol',  sampsPerSym, ...
  'DecimationFactor',       1);
% Filter at the receiver.
yr = rcrFilt([yc; zeros(Nsym*sampsPerSym/2, 1)]);
% Correct for propagation delay by removing filter transients
yr = yr(fltDelay*Fs+1:end);
% Plot data.
stem(tx, x, 'kx'); hold on;
% Plot filtered data.
plot(to, yr, 'b-',to, yo, 'm:'); hold off;
% Set axes and labels.
axis([0 25 -1.7 1.7]);  xlabel('Time (ms)'); ylabel('Amplitude');
legend('Transmitted Data','Rcv Filter Output', ...
    'Raised Cosine Filter Output','Location','southeast')

Figure contains an axes object. The axes object with xlabel Time (ms), ylabel Amplitude contains 3 objects of type stem, line. These objects represent Transmitted Data, Rcv Filter Output, Raised Cosine Filter Output.

計算コスト

次の表は、ポリフェーズ FIR 内挿フィルター、ポリフェーズ FIR 間引きフィルターの計算コストを比較したものです。

C1 = cost(rctFilt3);
C2 = cost(rcrFilt);
------------------------------------------------------------------------
                    Implementation Cost Comparison
------------------------------------------------------------------------
                        Multipliers  Adders  Mult/Symbol  Add/Symbol
Multirate Interpolator      49         41          49         41
Multirate Decimator         49         48           6.125      6