Forums

Problem with rcosflt(Raised cosine filter) in Matlab 6.5 version

Started by Zebunnessa Laizu June 1, 2004
Hi,

In a LAB experiment of digital communication system
where rcosflt is used as channel, the error is
produced due to extended length of output of the
filter. When I ran the program in Matlab 5.1, its
giving perfect result but when running in 6.5, its
giving error due to group delay of the rcosflt.
Can anyone suggest how can I remove this error? i
tried to truncate, but its giving much error without
noise which should be zero.
Here is my program

%Typical Answer for lab exp 3

% 1.
M;
modmap('qask',M);

% 2.
N 0;
x=randint(N,1,M);

%3
Fd=1;
Fs;
y = dmodce(x, Fd, Fs,'qask',M);
figure(2);
plot(y);
title('QASK modulated signal');

% 4
y1=rcosflt(y,Fd,Fs,'Fs/fir');

%5
n=[0:1/Fs:N-1/Fs];
figure(3);
subplot(2,1,1);
plot(n,real(y),'r',n,real(y1),'b');
title('The comparision of real part of channel input
and output signal');
subplot(2,1,2);
plot(n,imag(y),'r',n,imag(y1),'b');
title('The comparision of imaginary part of channel
input and output signal');

% 6 --- Channel output ---
Dpoint;
offset=Fs;
figure (4);
subplot(2,1,1);
eyescat(y1,Fd,Fs,offset,Dpoint);
Dpoint='*';
subplot(2,1,2);
eyescat(y1,Fd,Fs,offset,Dpoint);

% 7 --- Demodulated signal ---
figure(5);
y2modce(y1,Fd,Fs,'qask/eye',M);

% 8 --- symbol error rate ---
[numb,SER]=symerr(x,y2) % --- Gaussian noise ---
noise_var=0.2;
if noise_var>0

noise=(randn(length(y1),1)+j*randn(length(y1),1))*(noise_var)^0.5;
y1=y1+noise;
end

%5(Noise)
n=[0:1/Fs:N-1/Fs];
figure(6);
subplot(2,1,1);
plot(n,real(y),'r',n,real(y1),'b');
title('The comparision of real part of channel input
and output signal with noise');
subplot(2,1,2);
plot(n,imag(y),'r',n,imag(y1),'b');
title('The comparision of imaginary part of channel
input and output signal with noise');

% 6(Noise) --- Channel output ---
Dpoint;
offset=Fs;
figure (7);
subplot(2,1,1);
eyescat(y1,Fd,Fs,offset,Dpoint);
Dpoint='*';
subplot(2,1,2);
eyescat(y1,Fd,Fs,offset,Dpoint);

% 7 --- Demodulated signal ---
figure(8);
y2modce(y1,Fd,Fs,'qask/eye',M);

% 8 --- symbol error rate ---
[numb,SER]=symerr(x,y2)

numb
SER
__________________________________