08-24-2006 04:43 PM
08-24-2006 05:38 PM
08-25-2006 05:48 PM
First of all, make sure that you really need to sample at 44.1 kS/s. At 50 kS/s, all of the signal information that you would have gotten at 44.1k is still there, and any of the analysis VIs that you would want to apply to the data (spectral analysis, finding a single tone, THD, etc.) all still apply regardless of the input sample rate.
If you really need to have the data at 44.1 kS/s (for example, to output to a standard audio file) try using the "Resample Waveforms" VI in LabVIEW under the "Signal Processing >> Waveform Conditioning" pallette. On this VI you need to choose the interpolation mode; you should choose either "Spline" or "FIR". Don't use "Linear".
If your primary signal amplitudes are below 2 kHz, the Spline method will not degrade your signal and will be faster (expect over 500,000 pts resampled per second on a 2GHz Pentium 4). Above 2 kHz, you may start seeing intermodulation distortion between the input signal (Fin) and harmonics of 5.9 kHz (50k-44.1k); in otherwords, you'll get tones at Nx5.9kHz + Fin and at |Nx5.9kHz - Fin|. The worst of these tones will be about 110 dB below the input signal (or 0.0003% of the input signal's amplitude) with Fin = 2kHz, and 60 dB down (0.1%) at Fin = 8kHz. Above 8 kHz you'll also start to see some attenuation of the input signal.
If you have higher than 2 kHz signals with enough amplitude that these IMD distortion levels could be a concern, you should pick the FIR option for interpolation. Leaving the FIR parameters at their defaults (which are fine for the 9233) you should be in great shape up to 20 kHz signals- the drawback is that it takes more CPU time; expect in the neighborhood of 6 to 8 times slower than the Spline option.
08-25-2006 06:26 PM
10-30-2006 03:02 AM
Hi
I am having the same problem using a 9233. The sampling as discussed is an integer division of 50kS/s. I wish to write the input channels to Microsoft ".wav" files using the standard SV Toolkit vi however it writes asumming the waveform is 44.1kS/s !
I have used the resampling vi and this does not help since regardless of which "dt" value is used in the resampling the timescale is "respected" and the resulting waveform is still wrong.
I have a 1000 Hz microphone calibrator playing into a high quality microphone connected to the 9233 and all the realtime S&V vi's are showing correct amplitude and frequency. The recorded wave file is written with RIFF header information saying 44,100 Hz using various RIFF reading software and therefore it always plays back on all players at 88.2 % of the speed or frequency!
Has anybody managed to solve this problem yet?
Can NI please correct the S&V Toolkit vi's since they are intended to be used with the DAQmx?
I have posted on the DAQ hardware forum last week but there has been no response, there may be more traffic here and I have to issue this as a working tool.
Many thanks for any help that you can offer.
10-30-2006 09:54 AM
10-31-2006 02:40 AM
Thank you Chris,
Does your application correct the RIFF file header to play back at the correct higher rate?
I have not been able to find your e-mail in your profile information.
mine is: alistair_plowman(remove this anti-spam text)@mactag(...and remove this).com
10-31-2006 10:17 AM
10-31-2006 12:09 PM
Thanks,
It seems that the Wave Recorder is not capable of having the error corrected using the resampling technique as shown below:
There is no diference in the Probe between the before and after signal conditioning with 2e-5 and 2.27e-5 step size.
I think that Chris is writting the sample data to hard disk and then recompiling a correct wave file form the resampled information.
10-31-2006 01:33 PM - edited 10-31-2006 01:33 PM
Message Edited by Garritt on 10-31-2006 01:37 PM