关于升余弦滤波器应用的一个小例子
clcclear all
close all hidden
M = 4; % The order for modulate of DPSK
nPacket = 5000; % The signal length
x = randint(nPacket,1,M); % Signal for modulate
h = modem.dpskmod('M',M); % Creat an object of DPSK modulation
y = modulate(h,x); % modulate x get y
scatterplot(y);
%% Process raised cosine filter pulse shaping
Nsamp = 4; % Oversampling rate
num = rcosine(1,4);
ypulse = rcosflt(y,1,4);
ynoisy = awgn(ypulse,15,'measured');
ynoisy = ynoisy(3/1*4+1:end-3/1*4);
ydownsamp = downsample(ynoisy,Nsamp);
scatterplot(ydownsamp);
reset(h);
h = modem.dpskdemod('M',M);
z = demodulate(h,ydownsamp);
= symerr(x,z)这里需要注意的是rcosin的参数设置问题,第一个参数是码速率fd,第二个参数采样频率fs,默认的滚降系数是0.5,那么滤波器的时延可以delay=3/fd×fs,这样在降采样之前需要对数据进行处理,去除时延ynoisy = ynoisy(3/1*4+1:end-3/1*4);然进行降采样处理。
希望能对需要的朋友有点参考价值!
滤波器的时延可以用
转自:http://blog.sina.com.cn/s/blog_5def5a660100mhru.html
页:
[1]