LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT using USB6009

Hello,

 

I´m new to Labview and have a problem.

 

What i want to do: I have a wind tunnel with a vertical cylinder. To measure the speed of the air behind this cylinder i'm using a hot wire probe which is connected to a USB 6009 at analog input. I want to get to know the frequency of the vortex shedding behind this Cylinder. I know where i should position the hot wire probe, because i'm using a very easy probe to hear, where the vortex shedding is.

The Frequency of this vortex shedding should be at about 120 Hz (i know this from calculating it).

 

How my Labview programm looks like: In Labview (v8.5 on WinXP) i'm using the daq assistant (RSE; sample rate: 1k; samples: 1k up to 8k) to get the signal from the probe. Afterwards i'm skaling (express VI "Express skaling") the signal to get the speed of the air. The skaling works properly, because the average speed you can see on a graph is the same you get via counterpressure measurement. After that I'm using the express VI spectrum measurement and a while loop to encompass these parts. (I'm sorry, but I'm not able to upload the .vi right now. I'll do that later).

 

My problem is: i don't see any peaks at the expected frequency nor any other peak that stays at one frequency, not even a peak, that is signifficantly bigger than the rest of the signal.

I changed the number of samples and the sample rate to measure for a longer time and to increase the accuracy. The Accuracy may has grown, but there was no result, too.

 

Can anyone of you please help me. If I forgot something to mention please tell me.

 

Lorenz

0 Kudos
Message 1 of 8
(3,504 Views)

I think we're pretty much going to need to see the code. If you believe the problem is with the analysis portion then to make things easier for us do this:

  1. Run the VI so you get data on the graphs.
  2. Stop the VI.
  3. Right-click on the graphs and/or arrays that are displaying the captured data and select Data Operations -> Make current value default.
  4. Save the VI under a new name.
  5. Upload this new VI.

This will allow us to convert the graph and/or arrays to controls, and eliminate all of the DAQ stuff, since we don't have your hardware.

Message 2 of 8
(3,501 Views)

I hopefully can do this tomorrow, because I don't have access to the lab today. But instead I'll upload the VI and a excel file to which I think I stored the graph though there is only one column. The samples rate was 1k and the number of samples was 5000.

 

Thank you!

Download All
0 Kudos
Message 3 of 8
(3,495 Views)

Hi Lorenz,

 

some thoughts:

- Why do you have those graphs outside the loop? Wouldn't it be better to put them in the loop to actually see what's going on?

- You have some weird stop logic: When STOPP is TRUE then the loop will run but the DAQ-Assi will stop!?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 8
(3,488 Views)

Your saved data is after the analysis, which kind of defeats the whole purpose...

 

I also don't get why you have the graphs outside the loop.

Message 5 of 8
(3,474 Views)

Hi Lorenz,

 

I think your code needs to be optimized!

But where is the problem of your application? You acquire data and the FFT returns a result.

 

(picture)

 

Why do you have customized the X-axsis to 17Hz? Have you calculated this? Shouldn't be there peaks in a further range thhan +/- 0,1Hz. You've mentioned 120Hz.

 

 

 

Kind Regards

 

Philipp K.

AE | NI Germany

Message 6 of 8
(3,443 Views)

The VI I uploaded was n old one, the only one I had at home. In the newer ones the graphs were inside the loop and the the stop butten was in a "usual" way.

 

@ P. Kost: I had a customized x-axis at 17 Hz because I tried to find the vortex shedding at lower air speeds first.

 

Thank all of you, I solved the problem and saw the vortex shedding, not in the way I wanted to, but good enough. That's what I did:

 

- I changed the x- and the y-axis to logarthmic skaling.

- For searching (moving the hot wire probe behind the cylinder) the vortex sheddding I changed the DAQ settings to a sample rate of 1k and a number of samples of 500 to have two pictures per second.

- I moved the hot wire probe slightly and found a place, where the vortex shedding could be seen better.

- When I found the vortex shedding I increased the number of samples first to 1k and 2k, later to more than 10k, what brought me to a  new problem:

 

The new problem:

The DAQ-Assistent has an error when I measure for more than 10 seconds. I tried different settings:

 

sample rate     number of samples      time until new picture     error

1k                  1k                              1 s                                no

1k                  10k                            10 s                              no

1k                  11k                            > 10  s                           yes

5k                  5k                              1 s                                no

5k                  50k                            10 s                              no

5k                  51k                            > 10 s                           yes

 

I want to measure for longer time, because the FFT's resolution is f_min = 1 / t.

 

Thank you!

0 Kudos
Message 7 of 8
(3,425 Views)

Hi Lorenz,

 

I took a USB6009 and used the MAX to test your specification. I've choosen a sample rate of 5.000Hz and 100.000 samples  to read. I don't get an error. (unbenannt_2.png)

 

Which errror do you get? (-200361)

 

Regards,

 

Philipp

 

 

0 Kudos
Message 8 of 8
(3,417 Views)