120 likes | 190 Views
Scanning FM Demodulator. Marc Chiesa. 12/8/2010. Concept. Use an FFT to find spectral areas of interest in FM broadcast band and attempt to demodulate signals at the interpolated channel interval. Demodulate and filter just the mono audio data. Implementation . Xilinx FFT Core
E N D
Scanning FM Demodulator • Marc Chiesa 12/8/2010
Concept • Use an FFT to find spectral areas of interest in FM broadcast band and attempt to demodulate signals at the interpolated channel interval. • Demodulate and filter just the mono audio data.
Implementation • Xilinx FFT Core • Running at ADC rate. • Takes both real and imaginary waves to calculate magnitude accurately (ADC data shifted with DDS). • Outputs bins in numeric order
RF Interface • The RF interface comes from a WJ-8665 Microceptor receiver. • Selectable IF bandwidth based on a bank of internal filters (5MHz BW used for this project). • IF comes out at 70MHz. • Broadcast FM band is inverted at IF. • Uses RS232 for command-and-control.
Finding peaks in FFT • Use a simple algorithm and real bin measurements to find spectral peaks in the FFT, complex magnitude tells where to look:Do it in microblaze with FFT data from FSL! binright - binleft delta = 2binmid - binright - binleft fs fint = ( binmid + delta) x N
Finding a channel • Use frequency data to make a best guess for location of FM channel (for broadcast, they occur every 200kHz). • FM broadcast has a deviation of 75kHz, but only has roughly 15kHz of mono audio data near the base. • How do we get that audio without aliasing a bunch of junk in?
Filtering the data • Use DDS to bring channel down to baseband. • Use two filters to recover the audio with a demod in between • First stage FIR decimates by 128 with a passband of 75kHz. • Second stage FIR deciments by 4 using output of first stage, giving us audio at approximately 48kHz sampling rate for our DAC. • Last major complexity at the point is the demod prior to the second stage filtering.
Demodulating the channel • Various ways to perform demodulation. • CORDIC is easy and has a Xilinx core. • But by calculating the arctan derivative that the CORDIC requires we get the result with a couple of multipliers and subtractions with a result in fewer cycles. • This is not really important because we can still get data at desired interval with CORDIC, but it saves the conversion to xQn format the CORDIC wants if you data doesn’t already fit.
Microblaze • Running the Xilkernel RTOS with priority scheduling. • POSIX interface for Microblaze • Handles the tasks that are better suited for software, like calculating the bin centers and figuring out the phase increments for the DDS cores. • Uses semaphores to share data/resources amongst tasks and wake up tasks when there is work to be done.
Audio Data • Data out of the second filter is mono channel audio. • Send it to the DAC and listen to the radio! • Also send the data via FSL to MB and push it out over Ethernet as in previous labs.
Conclusion • FM demod can be done quite inexpensively in FPGA hardware, a good front end is the hard part. • The uses for an FM SDR are far-reaching, not limited to just broadcast channels. • Sometimes the best filter is two filters with a little something in between.
Questions? • I doubt I have the answer, but you might get lucky.