Skip to content
Snippets Groups Projects
Commit d6d617c7 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Clarify FIR part and upsampling of synthesis filterbank.

parent 269637cc
Branches
No related tags found
1 merge request!419Resolve RTSD-265
...@@ -27,15 +27,17 @@ end ...@@ -27,15 +27,17 @@ end
outData = (1:nof_blocks*Nstep + Ncoefs) * 0; outData = (1:nof_blocks*Nstep + Ncoefs) * 0;
for n = 1:nof_blocks for n = 1:nof_blocks
% Copy the data at each tap % Copy the FFT data at each FIR tap
temp2 = (1:Ncoefs) * 0; temp2 = (1:Ncoefs) * 0;
for m = 0:Ntaps-1 for m = 0:Ntaps-1
temp2((1:Nfft) + m*Nfft) = temp(n, 1:Nfft); temp2((1:Nfft) + m*Nfft) = temp(n, 1:Nfft);
end end
% Filter input using bfir as window % Apply the FIR coefficients by using bfir as window
temp2 = temp2 .* bfir; 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; range = (1:Ncoefs) + (n-1)*Nstep;
outData(range) = outData(range) + temp2; % for continuous time output outData(range) = outData(range) + temp2; % continuous time output
%outData(n,:) = temp2; % for output in blocks
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment