User Tools

Site Tools


Sidebar

Go Back

Refresh

You are not allowed to add pages

Direct Link

library:matlab:pulseshapingfilter

Pulse-shaping filter


with upsample rate U, a Pulse-shaping filter should be as follow.

FDAtool 的 order值为 N, 实际设计出的滤波器系数为 N+1 个

滤波器系数个数(N+1), 过采样倍数 Fs,截止频率Fc的关系:

设源信号采样率为 1 symbol/s, 则 Fc = 0.5 Matlab的raised-cosine滤波器不允许设置奇数order

当 N = Fs 的偶数倍(k),共有系数 N+1 个, 此时系数中, 中间值(Fs*k/2+1)为最大值,左右两边各有k/2个0系数,系数两端均为0. 无论Fs是奇数还是偶数,选择N为Fs的偶数倍(即k为偶数),可以使系数左右两边均有整数个周期(Fs*t)的系数,导致第一和最后一个系数为0.

例如: Fs = 3, k = 4 时,N = 12, 13个系数,其中:
       第7系数为最大值
       第1,4 和 10,13系数为 0

例如: Fs = 2, k = 6 时,N = 12, 13个系数,其中:
       第7系数为最大值
       第1,3,5 和 9, 11,13系数为 0

若N是Fs的偶数倍以外的数值(N必须是偶数),则左右两边的系数个数不是Fs的整数倍,第1和最后一个系数不等于0.

% It is a raised-cosine filter, which can be used to upsample a signal U times, to generate an U times sample rate signal.

function b = raisedCosine(U)
Fs   = U;            % Sampling Frequency
N    = U*4;         % Order
Fc   = 0.5;          % Cutoff Frequency
TM   = 'Rolloff';  % Transition Mode
R    = 0.25;       % Rolloff
DT   = 'Normal';   % Design Type
Beta = 0.5;        % Window Parameter

% Create the window vector for the design algorithm.
win = kaiser(N+1, Beta);

% Calculate the coefficients using the FIR1 function.
b  = firrcos(N, Fc/(Fs/2), R, 2, TM, DT, [], win);
end

Fc = 0.5 is a MUST!!

library/matlab/pulseshapingfilter.txt · Last modified: 2022/05/02 00:32 (external edit)