LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Noise Peak and Frequency Detector with time occurance

Hi Community

I am using a peak detector algorithm for detecting the peaks of the signals having noise by calculating their magnitude and the time of occurance along with the corresponding frequency. But in the algorithm when data is received. The values keep on changing when the peaks moves on but I want it to work in that way that  the data of each peak receive should be saved  at once still if the peak keep on moving. Any one having some good idea. Thanks in advance.

The code file is attached with the Post.

0 Kudos
Message 1 of 5
(3,053 Views)

Unfortunately, if you need to modify the peak detector subvi you can't because it is a dll call.  So you will have to write your own peak detection function.  

 

Why do you need it to work that way?

0 Kudos
Message 2 of 5
(3,007 Views)

Hi

Thanks for your reply. Actually I am  new user of Labview and I have to detect the peaks of random noise received from sensor  and then saving the magnitude, frequency and time of occurance of all the peaks detected by using array. Do you have any clue to use some specific function for this specific job. 

Thanks in advance.

 

0 Kudos
Message 3 of 5
(2,996 Views)

YousafAli,

 

I am not certain that I understand what you are trying to do.

 

From the VI you posted (which I suspect simulates your real process) it appears that you have some kind of signal with noise superimposed on it and that you want to find the locations of the peaks of the signal while ignoring or suppressing the noise.  Is this what you want?

 

If your signal to noise ratio is only about 3 as in your simulated data, it may be very difficult to get good results. If the frequency of the signal is constant and the amplitude changes slowly (over many cycles of the signal), then you may be able to do some smoothing and averaging to get usable outputs. 

 

Because you have a random component (the noise) you must specify the quality of your required results in terms of probabilities.  Then you can analyze how many cycles of the desired signal will need to be averaged to meet the requirements for a given signal to noise ratio.

 

I like to use the Savistky-Golay filter to smooth and differentiate noisy data. For your signal and noise I needed ~45 side points and 100 cycles of the input to get the standard deviation of the peak locations (in units of samples) to less than 1.

 

Lynn

0 Kudos
Message 4 of 5
(2,988 Views)

HI Lynn

Thanks for your reply. Actually I have modified the algorithm from the below algorithm attached by changing the input signal. if you run the below attached algorithm it is detecting the peaks of the signals and showing their amplitude and location.  My actual signal source is not the one which I am using in algorithm its just to make algorithm. because its a real time data of noise receiving from sensor. Now what I want to do is to save all the location and amplitudes values of all the peaks which this algorithm is detecting and showing but if you see this algorithm it keep on changing all the values as the signal keep on going. 

I hope you got my point. Thanks 

0 Kudos
Message 5 of 5
(2,970 Views)