Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: zero phase low pass filter - filtfilt and IFIR
Replies: 9   Last Post: May 15, 2013 4:25 AM

 Messages: [ Previous | Next ]
 Yow Cheong Kok Posts: 36 Registered: 6/19/06
Re: zero phase low pass filter - filtfilt and IFIR
Posted: Dec 13, 2009 8:22 AM

hi,

i try the following, not much difference, the voice signal still have clear delay (lagging) effect. Any further idea to remove the delay effect ?

h=fdesign.lowpass('Fp,Fst,Ap,Ast',1000,1010,0.1,1,Fs);
d=design(h,'equiripple'); %Lowpass FIR filter
disp(d);
[y,y_tail]=filter(d.Numerator,1,x);
disp(['ok2']);
gd = (numel(d.Numerator)-1)/2;
disp(['ok3']);
disp(size(y));
disp(size(y_tail));
len_y = length(y);
len_y_tail = length(y_tail);
df=length(y)-length(y_tail);
disp(df);
if (df >0)
disp(sprintf('3.1 = %d', df));
for k=len_y_tail:len_y
%disp(sprintf('bk = %d', k));
y_tail(k) = 0;
disp(sprintf('k = %d', k));
end
end
%Then you obtain the whole y by concatenating y and y_tail
y = [y, y_tail.'];
disp(['ok4']);
y_nodelay = y(floor(gd)+(1:numel(x)));
disp(['ok5']);
wavwrite(y_nodelay, 'c:\wav\filter\sample_new.wav');
disp(['ok6']);

regards,
yow

Date Subject Author
9/12/09 hans
9/12/09 stefano Mangione
9/12/09 hans
9/12/09 stefano Mangione
9/12/09 hans
12/13/09 Yow Cheong Kok
12/13/09 Wayne King
12/18/09 Yow Cheong Kok
12/20/09 Yow Cheong Kok
5/15/13 Fernan