Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

RPI technical problem with sound source localization

user770

New Member
Hi all,

Im working on a project related to localization and tracking through digital signal processing with the generalized cross-correlation phase transform (GCC-PHAT) algorithm and facing a problem of not knowing what to do.

my system consists of 6 microphones with amplifiers and low pass filters to remove aliasing, a Raspberry Pi, two servos.

the raspberry pi has no analog inputs so i thought of using ADCs, the samples must be synchronized so im looking for a simultaneous sampling ADC with 4-6 channels and 10-12 bits resolution, the maximum sampling frequency per channel must be low lets say about 8ksps/channel ( i dont know if i can control the sampling rate and if i can then how to do it? if a chip has 480ksps/channel can i control this value? )

im a newbie in hardware and embedded systems, but alot of people told me that the raspberry pi wont work at those rates (something about the SPI driver of the raspberry pi and its latency) and told me to use a DSP chip but i dont know which one is suitable for my application.

im looking for an ADC with those specifications and a suitable DSP chip to perform the processing(FFT, IFFT and least square estimation) and pass the data to the raspberry pi to control the motors , if the pi cant handle those data rates then any DSP chip is suitable as long it can process those signals and control the two servos

regards,

Tareq
 
I would first work through the theory first and then choose a suitable microcontroller.
- Is 8ksps enough to get the spatial resolution you want? What kind of resolution you need to accomplish?
- Do you need 3D or 2D localization?
- Can you record fixed length audio samples and then do the correlation and other math offline, how long samples you need from the 4 or 6 microphone?
....Or does the system need to be real-time?
- How simultaneous the ADC samples from different channels need to be? Can you compensate for known misalignment?

Worst case scenario is that you need a good ADC chip, powerful (DSP) processor and external memory. Best case scenario is that you can do everything with single (8 bit) microcontroller with 10bit adc channels and enough memory.
 
I would first work through the theory first and then choose a suitable microcontroller.
- Is 8ksps enough to get the spatial resolution you want? What kind of resolution you need to accomplish?
- Do you need 3D or 2D localization?
- Can you record fixed length audio samples and then do the correlation and other math offline, how long samples you need from the 4 or 6 microphone?
....Or does the system need to be real-time?
- How simultaneous the ADC samples from different channels need to be? Can you compensate for known misalignment?

Worst case scenario is that you need a good ADC chip, powerful (DSP) processor and external memory. Best case scenario is that you can do everything with single (8 bit) microcontroller with 10bit adc channels and enough memory.

8ksps is enough based on some research.
just 2D
I cant do a simulation up to now i have not done any programming or doing any kind of software.
Samples must be synchronized since i will be comparing time delay values between those signals and conventional ADCs ( sampling one channel at a time) wont work.
 
Texas and Instruments and Analog Devices both make numerous versions of DSP chips. You could contact them to see what would be best for your requirements. For that you need an estimate of the number of processing operations that the algorithm needs to perform per second.

Here's an example of a 12-bit, 6-channel, each channel simultaneously converted at 100ksps. There is a CONV pin that you control to start each conversion cycle. There is also a SCK clock input whose frequency you can arbitrarily change to determine the conversion rate.
 
Samples must be synchronized since i will be comparing time delay values between those signals and conventional ADCs ( sampling one channel at a time) wont work.

Actually, I think that they do not need to be exactly synchronized. If you have ADC1 and ADC2 sampling audio from two different microphones and you know that ADC2 conversion is done 1 us after ADC1. You can just correlate the signals and get some delay, say signal 2 is delayed 72 microseconds compared to signal 1. Then you know that the actual Differential Time Of Arrival (DTOA) is 73 microseconds. Of course, it is better to have the adc conversions synchronized.

Couple of more questions about the math.. Why you need to do FFT and IFFT? Isn't correlation enough to get the DTOA values, and then calculate the location of the sound source?
Could you explain the steps of the calculations.. or methods and ideas used to get the location? Or links to some papers etc.
 

Latest threads

Back
Top