Code covered by the BSD License  

Highlights from
Near Perfect Reconstruction Polyphase Filterbank

image thumbnail

Near Perfect Reconstruction Polyphase Filterbank



03 Aug 2007 (Updated )

a near perfect reconstruction polyphase filterbank with two times oversampling

%NPR_SYNTHESIS Near perfect reconstruction synthesis
%  Y = NPR_SYNTHESIS(C,X) synthesizes a wideband signal Y from a
%  number of subbands stored in X. Each subband is a row in X.
%  C is a two dimensional array, containing the filter coefficients.
%  The number of rows in X must be twice the number of rows in C. 
% (c) 2007 Wessel Lubberhuizen

function [y] = npr_synthesis(coeff,x)

% number of channels

% number of slices

% split into even and odd channels
x = reshape(x,2,N,M);

y1 = squeeze(x(1,:,:));
y2 = squeeze(x(2,:,:));

% apply dft
y1 = fft(y1,[],1)*N;
y2 = fft(y2,[],1)*N;

% apply channel filters
for i=1:N
    y1(i,:) = filter(coeff(i,:),1,y1(i,:));
    y2(i,:) = filter(coeff(i,:),1,y2(i,:));

% apply frequency shift
for i=1:N;
    y2(i,:) = y2(i,:) * exp(-sqrt(-1)*pi*(i-1)/N);
    y2(i,2:2:M) = -y2(i,2:2:M);

% combine filter results
y = reshape(y1-y2,1,M*N);

Contact us