MATLAB分析レイズドコサインフィルター



Matlab Analysis Raised Cosine Filter






効果

レイズドコサインフィルターは、帯域放射外の信号を抑制するための送信側シェーピングフィルターとしてよく使用されます。

MATLABの実装

maltabでは、主に関数rcosdesignFIRパルス整形フィルターおよびその他の関連関数を実装するために使用されますcomm.RaisedCosineTransmitFilter、comm.RaisedCosineTransmitFilter。



文法:
b = rcosdesign(beta,span,sps) b = rcosdesign(beta,span,sps,shape)
説明:

b = rcosdesign(beta、span、sps)は、ルートレイズドコサインベータFIRフィルターのロールオフ係数に対応する係数bを返します。フィルタは2つのシンボルにまたがるように切り捨てられ、各シンボルはspsサンプリングポイントを構成します。フィルタの順序は、sps * spanである必要があります。エネルギーフィルター。

b = rcosdesign(beta、span、sps、shape)は、ルートレイズドコサインフィルター(「sqrt」の形状)またはレイズドコサインフィルター(「normal」の形状)を返します。



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

レイズドコサインは、符号間干渉を抑制し、送信フィルターと受信フィルターを分離することができます。

レイズドコサインフィルターのロールオフ係数の主なパラメーターは、ロールオフ係数がフィルターの帯域幅を直接決定することです。レイズドコサインの無限の数のフィルタータップ。したがって、実際には、フィルターはレイズドコサインウィンドウ処理です。ウィンドウの長さは、FilterSpanInSymbolsの特性によって制御されます。この例では、ウィンドウの長さを6シンボルの長さに設定します。このようなフィルターには、3つのシンボル群遅延があります。信号サンプルで使用されるレイズドコサインパルス整形フィルター。したがって、サンプリング時間も指定する必要があります。次のようにコサインフィルターパラメーターを上げました。

Nsym = 6



ベータ= 0.5

samsPerSym = 8

レイズドコサインフィルターとフィルター特性fvtoolを使用して構築された発光フィルターシステム構造を視覚化します。

rctFilt = comm.RaisedCosineTransmitFilter(...  
'Shape', 'Normal', ...
'RolloffFactor', beta, ...
'FilterSpanInSymbols', Nsym, ...
'OutputSamplesPerSymbol', sampsPerSym)
% Visualize the impulse response
fvtool(rctFilt, 'Analysis', 'impulse')

この構造は、多項式FIRフィルターユニットエネルギーの直接設計です。フィルタ順序Nsym * sampsPerSym、タップ数Nsym * sampsPerSym + 1.フィルター処理されていないデータとフィルター処理されたデータが一致するように、正規化されたゲインフィルター係数を使用できます。

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

%インパルス応答を視覚化する
fvtool(rctFilt、'分析'「衝動」)。

The raised cosine filter time domain impulse response represents

8回のオーバーサンプリングなので、シンボル0のサンプリングポイントが最大値、他のnTの値0のサンプリング。

  
The raised cosine filter group delay is a constant value, because the impulse response is symmetrical. Which is the difference between the size of the group delay time and the initial response time of the peak, as follows:  



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

バイポーラデータシーケンスを生成した後、波形整形でレイズドコサインフィルターが発生した場合、ISIは導入されません。

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')


レイズドコサインフィルター群遅延の次のステップは、遅延入力信号によって補償されます。これで、レイズドコサインフィルターとフィルター処理された信号のサンプリング方法を簡単に確認できます。

% 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')


ロールオフファクター

このステップは、ロールオフ係数(0.5> 0.2)を変更した場合の効果を示しています。ロールオフ係数が小さいため、フィルターの帯域が狭くなり、フィルター処理された信号の変化が大きくなります。

これは、ロールオフ係数が理論上のナイキスト帯域幅を帯域幅として超えていることを表します。ロールオフ係数が0で長方形になると、ロールオフ係数はレイズドコサインフィルター1のナイキスト帯域幅の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')


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

レイズドコサインフィルターの一般的なアプリケーションは、送信フィルターと受信フィルターに分けられます。送信側と受信側は、ルートレイズドコサインフィルターを使用します。送信フィルターと受信フィルターは、レイズドコサインフィルターの組み合わせと同等であり、ISIを除外しても無視できます。

% 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')


送信信号の受信側でフィルタリングされます。送信フィルターと受信フィルターを確保するための正規化された単位エネルギーと、同じコサインフィルターの正規化された単位エネルギーリットル。別のレイズドコサインフィルターを介して直接信号と同等の受信信号をフィルタリングします。

% 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')


これは切り替わりました: https://blog.csdn.net/lovehua365/article/details/79594580