07-17-2014 04:43 AM
Hello,
I serched in the forum to get realted posts of finding time interval between two consecuitve valleys of an analog signal and was understood that converting analog signal into digital will give the reuired.But I don’t want to convert them into digital signal by giving out some threshold value.
Can someone explain of how to find the time interval between two consecutive valley points of an incoming analog signal(as shown in the attached image) and store them in an array.
Thanks.
07-17-2014 04:47 AM
Hi GoviRe,
What do you mean by "consecutive valley points" ?
Doesn't it match your frequency acquisiton ?
BR,
Vincent
07-17-2014 05:09 AM
Hi Vincent,
Yes,you are right teh simplest way to do it is to find the frequency.
But is there any way to find the time intervals between the two consecutive valley points(as illustrated in the attached image) as I want to calculate,collect them over a period of time and to calculate the standard deviation for time intervals obtained for a particualr duration of time.
thanks.
07-17-2014 07:40 AM
Hi,
Try to use threshold detector.vi
You are going to get your signal derivative. Each time it reaches 0, save the time.
Hope it helps
BR,
Vincent
07-17-2014 09:04 AM
In recent versions of LV the Peak Detector VI has an option to detect peaks or valleys. In earlier versions you need to negate the signal and then find peaks.
Lynn
07-17-2014 11:06 AM
signal is what ? anyways. here is example, signal is a sine wave withouth time information. Very rough code, but it seems to work,
07-28-2014 10:12 AM
Hello,
I used the Peak detection.VI for finding the peaks but I don’t understand of1) how to get the time intervals between two consecutive peaks for every 5mins duration and 2)how does the peak detector works if a signal peak has its first half part in the first sample interval and next half part in the next sample interval.
Can anyone help me with these.
Thanks.
07-28-2014 04:57 PM
1. The values in the Peak Locations array are the interpolated indexes in the input array where the peaks occur. So the time between peaks is the difference between the locations multiplied by the sampling period dt.
2. The peak detector cannot accurately detect "partial" peaks. You need extract the portion of the array following the last valid peak in the data set and then prepend that to the next dataset acquired. You may also need to keep track of the locations in some time frame referred to the beginning of the acquisition.
Lynn
07-29-2014 11:50 AM
Hi Lynn,
Thanks for the explanation.But I dont understand of how to implement them in Labview.Could please post some related example programmes or help me to make this vi implementation.
thanks.
07-29-2014 12:39 PM
I do not have time now to put together an example.
Take some time to think it through and design what you need before you start writing code.
If you need to keep all the raw data, make one big array to hold it. Then analyze that by segments.
If you do not need to keep the entire array, then keep a shorter array which contains all the data after the last identified peak. You may also need to keep track of the index in the array relative to what it would have been if you kept the entire data set in one array. Each time a complete peak is found, remove that portion of the data and all baseline data older than the peak from the shorter array. Every time new data is acquired append it to the shorter array.
In either case the array (large or small) will be in a shift register. The index for the shorter array would be in a separate shift register.
Lynn