MarkF Senior Heliman Location: Palo Alto, CA
| Hi, Gang!
Things are coming along very nicely. I'd mentioned previously that Analog Devices hadn't responded to my original request for a 32-bit FFT, so I tried it through Digi-Key. Delightfully, I received the source code for a very fast 32-bit 1024 point complex FFT the very next day! I'm certainly impressed with the quality of support that Digi-Key's offering, and again, special thanks to Paul Fuchs, their Application Engineer!
Why a 1024-point FFT? On the 72 MHz band, the receiver's analog input bandpass filter will be 1 MHz wide. Including filter skirts, let's call it ~2 MHz of RF input bandwidth. The QuickSwitch commutator will then be passing along that 2 MHz bandwidth to a baseband audio amplifier, with response nulls at even harmonics, and peaks at odd harmonics of 96 KHz. The audio amp will be configured as an active filter that will roll off the signal beyond 96 KHz, to prevent out of band interferers from inducing clipping in the A/D converter. After that, the A/D converter will sample the complex signal at 96 KHz.
If we pass 960 of the A/D samples to a 1024-point FFT (zero-filling the last 64 entries), then the output will be a series of 960 frequency bins, each of which is 100 Hz wide. This level of precision will mean that it'll be possible to build an accurate tracking filter that will remove the gross frequency error from the QPSK signal's 24 KHz intermediate carrier frequency. To remove frequency error in the frequency domain, we'll literally just move the FFT bins around until the signal's peak amplitude is centered on 24 KHz! After this error is reduced to within a few hundred Hz, then the existing carrier recovery block (from the S/W Architecture Diagram) will serve to perform the final frequency and phase alignment prior to demodulation.
There's another terrific benefit of this routine. I'd initially planned on using the 16-bit sampling mode of the Crystal A/D converter. However, a 32-bit, 1024-point FFT routine means that we'll have 22 bits of available dynamic range! As a result, it'll be possible to change to use the 24-bit sampling mode of the A/D converter. Now, 22 bits of dynamic range is theoretically ~134 dB, which is way more than we'll need. So, the limits of this receiver will definitely be determined by the analog circuitry, not by the digital processing!
So, how fast is this "fast" FFT? The only timing information included with the source code claims 6,677 CPU clocks for the 128-point FFT routine. Since FFTs scale as N*log(N), the 1024-point FFT should take about 11.4X longer, or about 76,300 CPU clocks. Considering that we'll be running the Blackfin at 400 MHz, that means that the CPU can perform about 5,200 32-bit 1024-point complex FFTs per second!
How many FFTs will we need? Since the receiver will be using a 96 KHz sampling rate, with 960 of those samples consumed per FFT, there would normally be 100 "input groups" per second. However, to prevent "leakage" (distortion caused by finite FFT lengths), we'll use "overlap-add" processing, where 480 new samples are combined with the previous 480 samples for each input group. Thus, there'll be 200 input groups/second. For each input group, we'll need to perform a forward FFT to get into the frequency domain, the filtering will be performed, and then we'll need to perform an inverse FFT to get the final 24 KHz QPSK carrier. So, all told, we'll perform 400 FFTs/second, which will only require about 8% of the CPU! To put this all in perspective, everything listed here will be performed prior to the conventional demodulation functions shown in the S/W Architecture Diagram.
So, with this in hand, the decision is made! We'll be using frequency domain processing somewhat along the lines described above. Unfortunately, there's one important point I haven't figured out how to do yet. If you'll remember back to the point where I described converting the baseband QPSK signal to a carrier-based signal, the output was a real signal, not a complex one. However, the approach shown here will require a conversion from a complex 24 KHz signal to a complex baseband signal - I'll have to do some more research to figure out how to accomplish this efficiently. In fact, I'm going to see if it might be possible to move the Square Root Raised Cosine filter into the frequency domain, as well. Time to go learn more...
All in all, this is good progress. Thanks again to Digi-Key and Analog Devices!
Have Fun!
MarkF |