Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Oversampling an audio waveform

Hi all,

 

I'm using a PCI-6154 DAQ to play and record some audio waveforms. With my current setup, I've seen that playing a 48 kHz waveform on the analog output results in some aliasing (I'm using a 4th order low pass filter with cutoff frequency set to 20kHz). There are mainly two solutions to remove this aliasing : Use a brick wall filter or use a higher sampling rate. As it would be difficult to improve my filter, I've tried to use a higher sampling rate. I'm now resampling my input waveform from 48kHz to 96kHz (using LabVIEW) but this takes a lot of processing time. Is there any way to do a hardware oversampling with the PCI-6154 DAQ ?

 

Thanks and best regards,

Alex

0 Kudos
Message 1 of 5
(3,393 Views)

Hi,

 

I was able to reduce processing time by upsampling + filtering (instead of resampling which is upsampling + filtering + downsampling) from 50kHz to 100kHz. 100kHz is used to get a match with the DAQ master clock. The processing is now faster but it would be great to do this on the hardware side. Any possibility to achieve this ?

 

Thanks and best regards,

Alex

0 Kudos
Message 2 of 5
(3,380 Views)

Hey Alex,

 

I hope that I understood your problem right. Of course you get aliasing when you try to read a signal using the same sample frequency as the signal has. So you'll have to go up with you sampling rate at least 4-5 times higher than the actual signal frequency to get a good looking read.

What I believe to be the problem is, that you try to aquire and process data in the same while loop -> the Buffer on your card is not read from fast enough.

To solve this, you should use a queue. "producer consumer template"

That way, your data aquisition is not beeing affected by the performance need of your data processing.

(see: File->new->design patterns)

I hope this helps

 

Regards

Chresten

0 Kudos
Message 3 of 5
(3,373 Views)

Hi Chresten,

 

It seems that my explanation was not clear enough. I'm playing (on DAQ analog out) an audio signal (bandwidth from 20 Hz to 20 kHz). This audio signal is sampled at 48 kHz and I have hardware 4th order filter with cutoff frequency set to 20 kHz. However, this is not enough to remove the aliasing completely. The best is, as you said, to increase sampling rate. So I need to increase the sampling rate of my source audio signal (the one which will be sent to the DAQ analog out). My main problem is that resampling or upsampling a long waveform takes a lot of processing time when done in software. What I would like to know is if there is any way to tell the DAQ card to use a waveform which has a a sampling rate of 48 kHz but to play it at a higher sampling  rate (this way I wouldn't have to resample it in software).

 

Best regards,

Alex

0 Kudos
Message 4 of 5
(3,365 Views)

Sorry Alex,

all this might make total sence to you, but I am still not convinced what you are actually doing.

If possible please provide the important labview code and show me what your set up looks like, as I am still not convinced whether or not you also have some data aquisition in your project. ( Until now I believe you only create a sound signal from a sound file you have on your computer)

 

Then I will be able to help you out with this

 

Regards

Chresten

0 Kudos
Message 5 of 5
(3,351 Views)