Fd=1; Fs=8; Delay=3; R=0.5; [yf,tf]=rcosine(Fd,Fs,'fir/sqrt',R,Delay); figure(1); plot(yf); grid;title('根升余弦滤波器时域波形') x=randint(100,1)*2-1;%原始输入信号为+1,-1码 xt=zeros(1,800); xt(1:8:end)=x; %%插值后信号 y1=filter(yf,tf,xt); %%成型滤波 y2=filter(yf,tf,y1); %%用与发送端相同的根升余弦匹配滤波 yt=y2((size(yf)+1)/2:8:end);%%匹配滤波后抽取 figure(2); stem(x(1:40)); grid;title('原始信号输出'); figure(3); plot(y1(1:100));grid;title('成型信号输出'); figure(4); plot(y2(1:100));grid;title('匹配滤波信号输出'); figure(5); stem(yt(1:40)); grid;title('抽取后信号输出') ;
滤波器的截止频率是Fd/2;Fs/Fd 是内插倍数; 其频响可以由滚降系数和窗长(FIR阶数)确定。
delay * (Fs / Fd) * 2 + 1 就是滤波器的阶数