From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

swept sine measurement

Hello,
I would like to have some confirmation in order to be sure that I am not taking a wrong way.
 
I worked on the following example delivered with the Sound and Vibration Module : Swept Sine measurement (SVXMPL_Getting Started with Swept Sine (DAQmx).vi
Stimulus is played with a speaker connected to 9263 module.
Stimulus channel is measured on the 9233 with a microphone and the response channel is measured with the analog input 9215 with an other microphone.
If I want to use this VI correctly, I suppose I need to correct the propagation delay for the synchronisation, right ?
It means :
1) I have to measure acoustic delay between speaker and stimulus microphone, with the MLS method described in SVS Measure Propagation Delay VI. Correct ??
2) I have to know if there are different delays between 9233 A/D conversion and 9215 A/D conversion. (due to internal AC and anti-aliasing filterings of the 9233). How can measure it ??
3) I add the acoustic and electric delay, convert it in samples and modify the propagation delay in the swept sine VI.
 
Is it the good way ??
 
Thanks in advance for your help.
 
Mathieu
0 Kudos
Message 1 of 9
(9,526 Views)

Hi Mathieu,

 

I've got a question for you and a few ideas.

 

1) Are you only using one channel on the 9233? And only one channel on the 9215? Could you use two channels on the 9233? That would shorten the synchronization work if that was a possibility and it would allow for very tight synchronization due to the parallel and synchronous nature of a DSA type board.

 

2) The SAR converter on the 9215 basically waits for a command to take a sample, and when it gets that command it starts to make a sample. According to the 9215 datasheet on page 18 http://www.ni.com/pdf/manuals/371568e.pdf,  when only sampling on one channel, it will take 4.4uS to get a sample.

 

The Sigma Delta converter on the 9233 on the other hand is sampling all the time. It has a filter that it keeps filled up with a history of the past samples. At any time when a sample is available, it is a filtered sample made from the whole history of stored samples. Because there is a history of samples that it relies on, that means that every time you request a sample from a sigma delta ADC, you end up with a sample that is delayed by the length of the history. Unlike a SAR, increasing the sample rate of a sigma delta will actually lessen the delay. That's why the datasheet for the 9233 on page 16 http://www.ni.com/pdf/manuals/371569d.pdf, when it mentions delay time it shows it as proportional to 1/fs (fs is the sample rate).

 

 

That being said, I recommend using two channels on the 9233 if possible. This reduces the complexity of trying to account for different delays on the different modules. It also allows for tighter synchronization. If you are interested in phase matching this could be especially important. If that's not possible, then try to account for the differences in delay by using something like:

 

this KB

http://digital.ni.com/public.nsf/allkb/74EB238E1BCADD528625735300681A7D

 

or this KB which I mentioned inyour post from earlier today

http://digital.ni.com/public.nsf/allkb/CAE12AA9BCAA51A48625722C004866F8

0 Kudos
Message 2 of 9
(9,520 Views)

Hi Dousley,

once again, thanks ! 🙂

 

In fact, what I need to measure is such signal between Output and Ground (cf attached picture). Term 1 and Term2 are the 2 pins of an electret microphone.(polarisation voltage : 3V) Then, the DC is filtered with the condenser (low cut frequency around 70 Hz), and on the signal output, there is the voice signal.

 

As the 9233 is made for IEPE sensors, I am not sure that I can directly connect my output on the 9233 input. I saw that I can adjust the current level delivered by the 9233 to supply sensors, but  for me it was impossible to desactivate this IEPE mode. I asked this point to our french NI contact, and he tolded me that to desactivate the IEPE mode we had to wait for the 9234 module...

 

What is your opinion ? Do you think I can use 9233 for electret microphone too ? For me it would be much more simple. I would also take advantage of internal AC mode, anti-aliasing filter, 24 bits...

 

 Mathieu

 

 

 

0 Kudos
Message 3 of 9
(9,501 Views)

Hi Mathieu,

 

This is a little bit difficult. It is true that IEPE on the 9233 is always on. The 9234 is ideal in this situation because IEPE is software configurable. Perhaps purchasing a 9234 would be the easiest and fastest solution for you. However it may still be possible to use the 9233 with that microphone.

 

The problem with directly connecting the microphone would be that the IEPE excitation current would have no where to go. So it would force the internal circuitry to saturate, preventing any useful readings at the ADC. However, if you place a resistor across the terminals this would allow the IEPE excitation to flow, and given an appropriate sized resistor, prevent saturation.

 

For example, if you use a 3k resistor, that would create (3k * 2.2mA Iepe current = 6.6V). This is small enough of a voltage to give you more than 10V of headroom before saturation. This resistor would also work as a filter in conjunction with the 1uF capacitor that you have shown as a coupling capacitor in the diagram. With the 3k resistor, that would form a high pass filter with a corner frequency of (2pi*RC)^(-1) = 53Hz. Since you are only interested in 70Hz and up, this filter would probably not be a problem.

 

So, even though this resistor would allow you to interface to the 9233 even with IEPE on, and it wouldn't cause a filter problem, it would have an additional effect of changing the input impedance of the 9233. The published specification is greater than 300k Ohms input impedance for the 9233. Putting this 3k resistor there would drop the input impedance to about 3k. Depending on the output impedance of your microphone this could have a significant impact on the magnitude of the readings taken on that channel. I'm not sure of the details of your application, so that might or might not be a problem for you.

 

All that being said, it ought to be simple to try this solution. All you need is a resistor somewhere around 3k to 5k.

 

Another option would be to use some active circuitry if you can't afford to have the input impedance changed. You could build your own current sink, or there are some vendors like PCB Piezotronics which sell sinks, one that I've seen around here is called a source follower.

 

Of course, there is also the option of working on the synchronization of the system that you already have set up just like you had originally mentioned. 

 

 

Hope this helps.

 

DanO

Conditioned Measurements Hardware

0 Kudos
Message 4 of 9
(9,488 Views)

Hi,

thanks for your solution, it looks more complicated...:), I keep it in mind, I am just affraid because I am not hardware specialist :).

I think I will firstly try the software solution, because I am not sure I really need a perfect synchronisation...

 

For my application, I would like to be able to measure FRF (Magnitude and Phase) between a measurement microphone (IEPE) and electret microphone. These FRFs would be then implemented in software which are sampled at 8kHz. So, 1 sample @ 8kHz is 0.125 millisecond, so if I am right, it means that I could accept an "unsynchronisation" if the delay of this synchronisation is always smaller than 1 sample so 0.125 ms. 

 

I read that the internal delay of NI9233 is 9.8/Fs, so at 50kHz, delay is 196 microseconds. For the 9215, internal delay is 4.4microseconds. 

 

So, if I add a software delay of around 192 microseconds (so 10 samples), on the 9215 signal in Labview, I should obtain 2 signals which are not perfectly synchronised, but with a delay around 8 microseconds.

8µs is much smaller than 0.125 ms (1 sample at 8kHz), so I suppose my approximation would be ok...

 

Is my analyse true ?

I suppose that maybe the internal delays in the 9215/9233 are not constant. Is there variations ?

Is there any other problem that I don't see ?

 

Thanks.

Mathieu

0 Kudos
Message 5 of 9
(9,470 Views)

Hi Mathieu,

I'll try to answer some of these questions.

1) I suppose that maybe the internal delays in the 9215/9233 are not constant. Is there variations ? As long as you use a hardware trigger to start the acquisition, the delay should be pretty systematic. Triggering from software would mean that your timing is dependent on when the O/S finally decides to run your code.

2)  so I suppose my approximation would be ok... Is my analyse true ? I'm not sure if your requirement for less than one sample/0.125ms is correct or not. That's up to you and how perfect you want phase matching to be. As a reference, one sample at 8kS/s would correspond to 45 degrees of phase lag when comparing two 1kHz tones. But that's up to you and your requirements (which I would be interested in hearing about).

Your method of calculating the amount of delay to add to the 9215 acquisition here seems correct to me. Another way that you could do this is to use the S&V T oolkit to measure phase delay in a typical case. That would let you skip calculation and go straight to compensation. If you were to compensate for phase lag in your measurement system in this way, it would be like normalizing time delay to the time delay seen in your typical case.

 

For example, you could use the SVT Measure Propagation Delay VI to measure delay between your AO and your 9233, and then do it again to measure delay between AO and your 9215. The difference between those two measurements would give you the time delay between the two boards. Then you could use the SVFA Compensate Phase for Time Delay VI to add the delay to your 9215 side. Then you could do the rest of your frequency response processing.

 

The attached VI shows an example of using the SVFA Compensate Phase for Time Delay VI.

 

Hopefully this is helpful.

 

DanO
Conditioned Measurements Hardware

Message 6 of 9
(9,435 Views)

Hello Dousley,

 

thanks a lot for your indications.It is very helpfull for me. I will try your VI in order to compensate phase delay.

 

 "For example, you could use the SVT Measure Propagation Delay VI to measure delay between your AO and your 9233 "

Is it really possible to do that ? I mean : Will the AO9263 accept the 2.2 mA coming from the IEPE current source of the 9233 ? If possible, I would like to avoid to damage the 9263 🙂

Or maybe I can just put a resistor (10kohm?) between AO and AI9233 ?

 

Have a nice week end !

 

Mathieu

0 Kudos
Message 7 of 9
(9,430 Views)

Hi Mathieu,

 

I meant that you could measure propagation delay including the microphones and the propagation delay of sound in air etc... that are in your system. Not directly connecting AO to AI with a wire.

 

Hopefully I'm barking up the right tree (idiom of the day).

 

-DanO
0 Kudos
Message 8 of 9
(9,426 Views)

Ok.

In fact, I tried it last week but I obtained curious results.I 'll test it again next week.

 

I measured a delay of 334 samples with the 9233 and a delay of 343 samples with 9215.

2 microphones (one IEPE and one electret mic) were put on the same place at 1 meter from the loudspeaker. So the delay difference between the boards is 9 samples (@50kHz). I expected this time difference by reading the spec sheet of the boards. However, I found that the 9233 is faster than 9215...That's why I suppose there is somewhere a mistake.

 

Mathieu

0 Kudos
Message 9 of 9
(9,424 Views)