clear; %Routine to calculate the number of operations per baseband sample numFilterTaps = 32; decimation = 64; %IF to baseband decimation for numChannels = 1:decimation %Wideband DDC Calculation %At IF, 2 multiplies, 2 pointer increments, 2 DDS table look ups, 64 filter multiplies, 64 filter adds, 64 shifts %Note that decimation of 64 is not realistic here, but is done to maintain the integrity of the comparison WB_DDCOps(numChannels) = numChannels *(2 + 2 + 2 + 64 + 64 + 64) * decimation; %Narrowband DDC Calculation (3 stage CIC filter) %At IF, 2 multiplies, 2 pointer increments, 2 DDS table look ups, 2 shifts, %18 CIC ops, 1 pointer increment, 1 compare (for decimate counter) %At baseband: 18 CIC ops, 64 filter multiplies, 64 filter adds, 64 shifts NB_DDCOps(numChannels) = numChannels *(((2 + 2 + 2 + 2 + 2 + 18 + 1 + 1) * decimation) + 18 + 64 + 64 + 64); %FDF Calculation FFTSize = 4096; overlap = .5; %baseFFTCalcs = FFTSize * log2(FFTSize) * (1 + overlap); %baseFFTCalcs = FFTSize * log4(FFTSize) * (1 + overlap); baseFFTCalcs = FFTSize * 6 * (1 + overlap); iFFTSize = FFTSize/decimation; sampsPerBlock = iFFTSize * overlap; %Number of ops = base number of ops for FFT, plus number of channels times %the size of the filter (32 taps plus zeros to reach iFFT size) plus the inverse %FFT all deviced by the number of samples per block (frequency and phase corrections %can be integrated in with the carrier recovery algorithm FFTOps(numChannels) = baseFFTCalcs + (numChannels * ( iFFTSize + (iFFTSize * log2(iFFTSize))/ sampsPerBlock)); %ZIF Calculation end %Polyphase FFT calculation %assume 32 pole filter for each phase in polyphase filter FFTSize = numChannels; PolyOps(1:numChannels) = numChannels * (32 + 32 + 32) + FFTSize * log2(FFTSize); WB_DDCOps(1) NB_DDCOps(1) FFTOps(1) PolyOps(1) plot((1:numChannels), WB_DDCOps, '-', (1:numChannels), NB_DDCOps, ':', (1:numChannels), FFTOps, '-.', (1:numChannels), PolyOps, '--'); axis([1 64 1 200000]); ylabel('Operations per Baseband Sample') xlabel('Number of Channels') Legend('Wideband DDC', 'Narrowband DDC', 'Frequency Domain Filtering', 'Polyphase Filter Bank');