diff --git a/applications/lofar2/model/pfb_bunton_annotated/polyphase_synthesis_b.m b/applications/lofar2/model/pfb_bunton_annotated/polyphase_synthesis_b.m index 3e1ae4f3660abc79e726da267af901ef472228a0..c13e920b95c837b9ba14ebc9d32ea9ed39c81284 100644 --- a/applications/lofar2/model/pfb_bunton_annotated/polyphase_synthesis_b.m +++ b/applications/lofar2/model/pfb_bunton_annotated/polyphase_synthesis_b.m @@ -27,15 +27,17 @@ end outData = (1:nof_blocks*Nstep + Ncoefs) * 0; for n = 1:nof_blocks - % Copy the data at each tap + % Copy the FFT data at each FIR tap temp2 = (1:Ncoefs) * 0; for m = 0:Ntaps-1 temp2((1:Nfft) + m*Nfft) = temp(n, 1:Nfft); end - % Filter input using bfir as window + % Apply the FIR coefficients by using bfir as window temp2 = temp2 .* bfir; - % Overlap add to sum the taps, with upsampling rate Nstep + + % Sum the FIR taps by overlap add the weighted input to the output. + % Progress with Nstep per block of Nfft to upsample by Nstep, to match + % the downsample by Nstep of the analysis filterbank. range = (1:Ncoefs) + (n-1)*Nstep; - outData(range) = outData(range) + temp2; % for continuous time output - %outData(n,:) = temp2; % for output in blocks + outData(range) = outData(range) + temp2; % continuous time output end