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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

frequency of signal from anemometer

hello,

I 've to the output of an anemometer, an AC voltage whose frequency is related to the wind speed. unfortunately I did not get my signal frequency. I'm using the CompactRIO 9074 with NI9221 module. I see my good signal but I can not seem to extract its frequency. Have you any idea of VI? This is urgent.

Thank you.

 

0 Kudos
Message 1 of 17
(2,998 Views)

Hi levla,

 

count zero crossings (per time unit) to calculate frequency…

 

What have you done until now? Where exactly do you have problems?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 17
(2,991 Views)

Are you trying to calculate this in the FPGA or in the RT?

 

If in the FPGA, you need to count the zero crossings to get the period and then invert.

 

If in the RT, then there is a bunch of FFT and frequency analysis VIs in the Signal Processing palette.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 17
(2,980 Views)

hi  ,
I have a signal like the attachment picture. My problem is that I can not seem to extract the signal frequency. My frequency must be multiplied by a coefficient to match the speed of the wind.
I work in RT.

thank you

0 Kudos
Message 4 of 17
(2,974 Views)

What is your timing resolution?

How do you read the signal?

What is the expected AC voltage frequency for your sensors measurement range?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 17
(2,969 Views)
 Hi,
 

I put a screen capture of the code as an attachment. I read my signal from the anemometer on the AI2 port NI 9221. For my range-measuring sensor, I have to measure frequencies from 0 Hz to 125 Hz. Documentation of the anemometer is attached too.

 

Thanks

Download All
0 Kudos
Message 6 of 17
(2,961 Views)

Hi levla,

 

you want to measure frequencies upto 125Hz, but you sample your data with just 10Hz (100ms loop time).

 

Have you ever heard of Shannon-Nyquist?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 17
(2,958 Views)

I forgot Shannon-Nyquist. I put a frequency of 350 Hz Sample Rate (285ms) but I still can not get my signal frequency. Is my code is right according to you? thanks

0 Kudos
Message 8 of 17
(2,947 Views)

Hi levla,

 

you wired a 3ms wait for an expected 333Hz sample rate. Don't know where your numbers are coming from.

 

BUT:

How did you configure your scan engine? Does it work that fast?

 

All of your data analysis is also highly flawed. How do you expect meaningful results when you try to measure frequencies from just single samples? Those functions expect an array of samples (or a waveform) for a reason…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 17
(2,940 Views)

Hello ,

 

I work in RT and attachments you have documentation of the anemometer and my code screenshot.
thank you

Download All
0 Kudos
Message 10 of 17
(2,935 Views)