LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tracking filter

Hello,
 
I want to use tracking filter methods but I have no access to a device, so I need to use software algorithms. I made a search on tracking filters but it did not give me much help. I read on http://sine.ni.com/csol/cds/item/vw/p/id/187/nid/124100 that some people made this already but I need some more explanation and an example.
 
I am desperate for any help and an example VI.
 
Thank you very much in advance...
 
ilter
 
ps.I have a data signal that the frequency is slightly changing. I used bandpass filtering before tone measurements but it was not sufficient enough. I need accurate frequency information.
0 Kudos
Message 1 of 9
(3,995 Views)

Hello Ilter,

I wanted to know more about tracking filter and what do you mean by it? What is the application you are working with and what is it that you are looking for?

Regards,

 

Juan Galindo

Juan Galindo
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(3,954 Views)

Hello,

Thank you for your response and sorry for not being clear.

I am looking for a Labview code that will extract frequency from a noisy data stream that looks like a sine wave. I am monitoring vortex shedding behind bluff bodies. I need a PLL (phase locked loop) or tracking filtering code to extract the frequency since it is slightly changing. By tracking filter, I was trying to say that the frequency I am after is changing and the algoritm to be used needs to follow it. I mean shedding frequency is changing slightly and regular filtering and tone measurements are not helping that much.

I have voltage data taken by the help of a hotwire probe, ie velocity information behind the model in a wind tunnel.

I do not have access to a an external device to do it, so I am looking for a code to do it. AN example code would help  a lot.

Thank you very much for your help.

0 Kudos
Message 3 of 9
(3,948 Views)
How fast does the frequency change? In particular approximately how many cycles of the sine wave occur at one frequency before it changes to another? Does the frequency vary continuously or does it change in discrete jumps? If it jumps, does the signal remain phase coherent? What is the range of frequencies you expect? What is the signal to noise ratio? How often do you need a frequency update?

Lynn
0 Kudos
Message 4 of 9
(3,945 Views)
Hello,
 
The vortex shedding is O(100 hz) , it is usually 93 hz and it changes around 1 cycle/s per second.
 
Frequency changes continuously, so I do not know how many sine wave occurs.
 
The range of the frequency is 80-110 hz.
 
I do not know the exact signal to noise ratio, but is not that bad. (I am very sorry for not being able to answer exactly)
 
I need a frequency update every a few seconds.
 
Thank you very much once more.
 
ilter
0 Kudos
Message 5 of 9
(3,929 Views)
OK. I have an idea I am working on. What is your sampling rate? What version of LV are you using?

Lynn
0 Kudos
Message 6 of 9
(3,915 Views)

Hello Lynn,

I have Labview 7.1 and Labview 8.2.

My sampling rate is 300Hz.

 

Thank you very much.

ilter

0 Kudos
Message 7 of 9
(3,904 Views)
Here is a demo of the idea I mentioned. If you can locate the zero crossings without too much jitter caused by noise, you can calculate the frequency of each cycle of the 93 Hz signal. I have attached a demo in LV8.20. It simulates the generation of a noisy sine wave which can be varied in frequency from 80 to 110 Hz. It then locates the zero crossings by looking for polarity changes in the smoothed signal. I used 5 point smoothing with a shift register. I then calculate the difference between successive zero crossings and take the reciprocal to get the frequency.

Notes: 1. The array building is not a good practice if the arrays can get large due to memory allocation issues. Initializing an array and using Replace Array Subset is better.
2. Big spikes can appear in the frequency output if there is any disruption of the data, for example gaps between sample sets. Attention to initialization and putting limits on acceptable values can get around some of this.
3. The frequency resolution of this technique is dependent on the sampling rate. My demo uses 10000 samples/second which yields 0.1 Hz resolution. With your 300 Hz rate (3.3 ms between samples)you will not find this technique useful since the periods range from 12.5 ms at 80 Hz to 9.1 ms at 110 Hz.
4. The frequency graph X axis is in units of cycles of the sinusoidal data (actually the zero crossings detected). So it increases with time but not in a simple manner. An XY plot of frequency against tx (time of zero crossing) might be more meaningful.

See if this gives you some ideas. This is fairly simple and fast. It does not require a tracking filter or PLL. It has the disadvantage of being nosiy and requiring a much higher sampling rate.

Lynn
Message 8 of 9
(3,900 Views)

Dear Lynn,

Thank you very much for the VI. I will work on it and try on my setup. I will think about sampling rate issue as well.

Thanks once more.

ilter

 

 

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