Peak detection thresholding

I devised an laser interferometer which measures the amplitude of a vibrating object. The vibration is in microns and around 100 kHz. I am planning to make a program that analyze that look like carrier wave, the peaks inside the wave envelope are counted. At each node or at minimum or which I call the turning point of vibration, theres an abrupt change of amplitude. I want it that after the turning point is detected, it will return and start counting the next set of wave. 2 set of waves corresponds for one period of vibration. I am having problem on on detecting the peaks then start counting the next group of wave.
After this, I am planning to create a spectrum analyzer, the next problem is to translate each group in a sign wave so that it will be easier to fourier transform. I am using Labview 5.0 and 7.0. It would be either one of this version I will be using for this application. Around 100kHz (rise and fall) frequency of vibration, is it capable of measuring this freq range?

Hi Emta,
There isn't anything in Measurement Studio explicitly set up for On the
Fly filtering - however you can call these analysis functions whenever
you want on whatever dataset you have available. So as you bring in
your data you can certainly apply whatever filters you would like and
get results on-the-fly. It's all dependant on how and when you apply
the analysis to your acquired data.
Hope this helps Emta, let me know if you have any more questions.
Dan Weiland
Applications Engineer
National Instruments
Dan Weiland

Similar Messages

  • Peak detection (threshold detector) from spreadsheets.

    Hello!
    I am working on VI that reads two signals, detects peaks that are above a specific treshold and then estimates time difference between these peaks in samples and in seconds.
    Recently I have obtained two waveforms using an oscilloscope in a laboratory. Then I saved these two graphs in a spreadsheet in Excel format (first number is time, second is amplitude). Time difference between them is really small, just a few nanoseconds according to the oscilloscope. I think treshold should be 0.3.
    My question is how to make Threshold Detector.vi read values from two excel files? Or maybe I need to use another instrument for this purpose. I am quite confused.
    I attached all materials I have.
    Any help is highly appreciated!
    Thank you.
    Attachments:
    Inception 2.vi ‏55 KB
    position S1-S2a.jpg ‏3004 KB

    I tried Read From Spreadsheet File.vi, but have not got any positive result. Probably it reads my spreadsheets, but peak detection does not work properly. When I set up any threshold in Threshold Detector.vi that is more than zero (for example, 0.01), final results turn to zero. The same occurs when indexes in Index Array  are not zeroes. 
    I attached my vi saved for LV2009. Please, have a look.
    Thanks.
    Attachments:
    Inception 2.vi ‏49 KB
    Peak detection.jpg ‏108 KB

  • Peak detection with two thresholds

    Dear colleagues!
    Excuse me, but I need example or any help for peak detection with two thresholds. Namely two adjustable thresholds with standard peak detector for creating a detection's bandwith or range. 
    Peak detector have only one level threshold... But why only one...
    Solved!
    Go to Solution.

    If I understand correctly, you want to set two thresholds as shown in the image below.
    The top peak is easy, so no need to go into details for that one.
    The peak for the second threshold (red) will be a bit more difficult to do.
    You would need to filter out the signals that cross the top threshold (blue).  This would be done by identifying the values as they cross the top threshold boundary.  You would then need to build a "window" around them (we'll come back to this one).
    You would need to define a range of valid values for the 2nd peak, which are from the bottom threshold to the top threshold. Search for the number of values that cross the top threshold plus one.  The "plus one" is the one you will want to search. With all the other peaks that you do not want, you can create windows around them.  The remaining one is the peak of interest.
    Message Edited by Ray.R on 10-23-2009 08:21 AM
    Attachments:
    2Thresholds.PNG ‏6 KB

  • Fetch and peak detection all channels of PXI-5105 with 4M record... HELP!

    Dear collegaues!
    Please help me to improve performance my application, see attachment, and sorry for my English.
    So, my task is to fetch and peak detection all (eight) channels of PXI-5105 with 4M record and sample rate 4M with loop 1 sec...
    Inputs of all my channels are wiring to NaI detectors with 0,5...1 microsec of pulse width (really) and freq from 0 kHz to no more than 40 kHz.
    Why I've selected 4M record and 4M sample rate namely? Answer is that I've tested PXI-5105 previously by generator 40 kHz and 0,5 microsec width pulse. It is working fine and peak detection indicate for me 40000 pulses/sec. If I set lower than 4M record and 4M sample rate it is no working. In my honest opinion 4M record and 4M sample rate are very min settings.
    In the present time peak detection working only 6 channels... When I've connected to diagram more than 6 "peak detector.vi" - I see the error "...out of memory...".
    Please advise me, what is to be done for that is all working fine.
    Solved!
    Go to Solution.
    Attachments:
    consumer-producer7.vi ‏44 KB

    What you are running into is an out of memory error in LabVIEW.  You have enough onboard memory to capture 4M samples per channel on the digitizer.  The issue is with fetching and manipulating that data in your LabVIEW application.  You will want to step back and take a look at how you are handling your data to understand why that is happening.
    1) 4M samples/ch = 4M Samples x 2Bytes/sample/ch = 8M Bytes/ch
    2) Expanding to 8 channels creates 64M Bytes of data in the raw binary format
    3) You are scaling your data by fetching in a 1D WDT format.  This stores each sample in a 32 bit double, expanding the memory to 256M Bytes (in addition to timing information)
    4) By splitting up the array of waveforms and branching data it you can easily create copies of this data, and if your consumer loop is not completed with the last data, you may be trying to capture a whole new set, creating yet another copy.
    So you can see that while you have 1.5GB of controller memory, when dealing with large arrays of data you can easily eat up that memory.  There are several things you can try to make your application more efficient.  You could work with an unscaled binary data format, you can wire the array of waveform directly to the peak detect vi (instead of creating 8 copies, you will have a single copy with arrays of output) or you could revisit the record size you have chosen (experimenting with your threshold and width settings might help you to get the results you want with smaller record lengths).
    -Jennifer O.

  • Peak detection in a xy graph

    Hi,
    I have plotted the spectral data in XY graph indicator using a .txt file. Now I need to detect the peaks present in this spectrum, their locations and amplitude. I have used Peak Detector .vi in the code. However, it is not generating relevant peaks but displaying approximated values with wrong locations(x values). Is there a better and accurate way to detect the peaks? Please refer attachments for the code.
    Let me know.
    Thank you.
    Attachments:
    data1.txt ‏28 KB
    read_spectrum_1.vi ‏62 KB

    Have you read the LabVIEW Help file (when looking at the BD, type Ctrl-H, then go to the "Detailed help" at the bottom of the popup) about the peak detection function?
    "Locations contains the index locations of all peaks or valleys detected in the current block of data. Because the peak detection algorithm uses a quadratic fit to find the peaks, it actually interpolates between the data points. Therefore, the indexes are not integers. In other words, the peaks found are not necessarily actual points in the input data but may be at fractions of an index and at amplitudes not found in the input array.
    To view the locations in terms of time, use the following equation.
    Time Locations[i] = t0 + dt*Locations[i] ...
    ... This Peak Detector VI is based on an algorithm that fits a quadratic polynomial to sequential groups of data points. The number of data points used in the fit is specified by width."
    Your input data is so noisy that getting as results the actual points from this function that visually seem to be "peaks" is virtually impossible. Not to mention that there is such an offset at the begining of the data that you are getting gazillions of false positives here. You really need to clean things up before you let LabVIEW loose (at least the Peak Detector VI) on it if you want meaningful answers.
    BTW, setting "the threshold slightly below [7379.18]" would not necessarily result in a peak depending on your definition of "slightly," because your data has no points below 180.041, making the highest possible peak 7199.139.
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Peak detection in C

    Hi All,
    I am looking at implementing or using the peak detection function in C. I require the same in C since, I would be later porting this application on microcontroller.
    However, the function implemented in LabVIEW calls the lvanlys.dll for performing the peak or valley detection. Hence, I would not be in position to use the same and later port it on the controller.
    Essentially I am looking for similar function inputs (threshold and width) implemented in C.
    Thanks in advance.
    Regards.

    http://www.nr.com/
    http://en.wikipedia.org/wiki/Numerical_Recipes
    Numerical Recipes in C. The Art of Scientific Computing, 2nd Edition, 1992, ISBN 0-521-43108-5.
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Peak Detection with Base package

    Hello,
    I'm constrained by a budget so I can't purchase the analysis package
    just for peak detection. Does anyone have any hints on how to search a
    1-D array for peaks without using the pre-made VI's? I've been pulling
    my hair out over this one for a week!
    Thanks in advance.

    Labviewguru wrote in message news:<[email protected]>...
    > Jason,
    >
    > I would suggest looking online for a "peak detection" algorithm.
    > There are a number of ways to do it. The LabVIEW peak detector using
    > a least squares quadratic fit to find the peaks, with a filter of
    > amplitude and width. This can also be done much simpler ways. You
    > can try applying a smoothing filter (use a moving or windowed average)
    > and then look for peaks that way.
    >
    > Please post if you need more assistance. Also, what are you trying to
    > do with the peak detection. This would be helpful in providing
    > further assistance.
    >
    > Good luck
    Labviewguru
    Thanks for the advice. Yeah, the NI home page tells me that th
    ey use a
    least square quadratic fit to find the peaks. I'm not sure on how to
    implement that. I'll do a web search on that one. I'm not dealing with
    a very noisy signal so I don't think that I need to do a moving
    average. The amplitude filter seems pretty easy, I just compare each
    point to a preset threshold. However my peaks are composed of more
    than one sample so each peak gives me a bunch of "true" values. I only
    want one count per peak. The way I thought of doing it was using
    hysteresis and starting a subroutine when the upper limit boolean went
    hi, then resetting the subroutine when the lower limit boolean went
    hi. So essentially i need to have labview look for a high, THEN look
    for a low, THEN reset over and over again until the sample array is
    finished. I'd love to work on this for days but I've already put too
    much thought into it.

  • Problem in peak detection

    Respected sir/madam,
    i am actually processing human radial artery pulse signal... i acquired that signal and linearised that by using filter...
    there is a problem in peak amplitude detection and location...by manually we can say there is more number of peaks ..but peak detector shows only 25 peak's amplitude and their locations...i can't understand about locations that shows..i attached the data which is in .lvm extension and the vi
    please help me to rectify the problem..
    thank you
    Attachments:
    Untitled 2.vi ‏100 KB
    Untitled 2.vi ‏100 KB

    Once again the Dynamic Data Type (DDT) generated by the Express VIs hides the real problem.
    The data segments are too short to reliably detect the peaks - not every segment has a peak and some peaks may be partly in one segment and partly in the next. By combining all the data into one waveform before filtering and peak detecting, it is possible to get reliable matching between the "eyeball" peak detector and the software peak detector.
    Note that the large transients at the beginning of the data set are detected as peaks. These transients are due to the real transient in the data and the transients of the filters. I did not attempt to remove them. You could use Array Subset with either manual selection of the end of the transient or some automated process based on the larger amplitude and lower frequency of the transient compared to the real signal.
    There is  a lot of "stuff" in this VI - things I tried and did not remove and multiple ways of doing things.  The enabled diagrm of the Diagram Disable structure has a constant with the data from your file so that I did not need to read and process the file repeatedly while working on the filters and peak detector.
    Comments in no particular order regarding what I did and how the posted VI works.
    1. The DDT data from Read from Measurement File.vi is converted to an array of waveforms. The Waveform data type is well docmuented and the internal data structure is readliy accessible.
    2. Each element of the array of waveforms from Read from Measurement File.vi is appended to the corresponding element from the previous iteration to form one array of waveforms containing all the data in the file. This is displayed on Array of Waveform, Array of Waveform 4, and Signals total. Note that these are graphs, not charts.  The data is also put into 2D arrays as Array of Waveform 2 and Array of Waveform 3.
    3. I do not have Advanced Peak Detector PtByPt.vi, but I think the data is not truly point by point so this may be a poor choice.
    4. I used the standard filter VIs (rather than Express VIs) to stay away from DDT. The outputs are slightly different, but the Express VIs do not give you complete control or knowledge of what the filter setup is. I used Butterworth filters for both filters and adjusted the cutoff frequencies slightly to get similar waveforms.
    5. I used the standard Peak Detector.vi from the Signal Processing >> Signal Operations palette. It reliably finds 104 peaks over a wide range of widths and some variation in thresholds.  That count includes the transients at the beginning as mentioned above.
    The .2 VI contains all the junk code I described above. The .3 VI is a cleaned up version.
    Lynn
    Attachments:
    Untitled 2-9.2.vi ‏760 KB
    Untitled 2-9.3.vi ‏183 KB

  • Waveform peak detection ...Please have a look

    Hi folks,
               I am trying to acquire 2 signals and then detect the peaks of each of them and divide the peaks and display it in a waveform chart.But my Peak detection doesnt work at all...I tried plugging in values from 3 to 10000 but it just doesnt work...Please have a look at my VI and feel free to point out any errors in my VI..
    Thanks
    Attachments:
    slope 2 channels3.vi ‏51 KB

    Hi,
    Had a look at ur VI
    tell me, do u need a single peak for every iteration or a series of peaks above a certain threshold?
    If it is a single peak for each acquired waveform , then extract y array from the waveform cluster( you have already done it in ur VI) and connect it  to 'find array min max' function found in array functions palette and u get the single peak for each waveform.
    If it is a series of peaks u are interested in, then compare all these values inside a for loop.
    Index each element inside a 'for' loop, check it for threshold using a conditional case structure and put it inside a shift register.
    regards
    Dev

  • Peak Detect

    Hello,
    I am trying to make a heart rate monitor using LabVIEW and arduino. The basic hardware uses an LED and a photocell. You place your finger on the LED, with the photocell above, and the photocell detects changes in the amount of light in your finger whenever your heart beats.
    My design work okay and is able to detect changes in light. However, I am having trouble calculating those changes and converting the data into a heart rate. One of the problems is the peak detect, into which you set a threshold value and the detector looks for amplitudes above or below that value. The problem is, the amount of light coming through one's finger varies wildly, so even though a pulse is clearly observable, you can't just set a value for the threshold to look for.
    I tried to solve this by making the threshold vary, so that it would be slightly below the average, however my code still fails to detect a pulse. Does anyone have any idea how I could resolve this issue, or if there is a better method than using the default peak detect?
    I have attached a copy of my code, and would be very grateful if anyone could provide input. Thank you very much!
    Solved!
    Go to Solution.
    Attachments:
    A-LV HR Prototype.vi ‏982 KB

    For example, here it detected a significant drop in light intensity 6 times over a 6 second period, so BPM should be 60, but it doesn't display anything.
    Other times the BPM shoots up to 200 in a second then just stays there. I can't figure out why, or if there's a better way to do it.
    Attachments:
    HR Graph.png ‏122 KB

  • Peak detection

    Hello,
    I am currently using Labview 8.0. In that i am facing problems in detecting the peaks of an acquired waveform graph. I tried using the threshold peak detector.vi in the function palette but it doesnot work for me.I also tried filtering the waveform and detecting the peaks but still there was no result. I have uploaded the text file of my waveform here. Can anyone tell me how to detect the peaks of this waveform.
    Regards,
    Nitzy
    Attachments:
    hhaft.TXT ‏723 KB

     I guess the "Peak Detection and Display" example will give you a push in the right direction. But I have to admit I did not look at your example file
    Here is some useful tips for the Labview beginner (we have all been there some time)
    1)Then starting a new Labview session enable context help (Ctrl+h). Do not be afraid to use the detailed help option
    2)Then stuck, go to help in the toolbar then select find examples
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Simple peak detect

    I have a waveform that I need to detect peaks & valleys on. I use the peak detector VI.
    Attached is my VI with an indicative array of values that I will
    encounter. The peak detector correctly finds the 3 peaks but doesn't
    find the 2 valleys in the middle - I don't undertand why.
    Those are the 2 I'm most interested in  - the first & last are just tails of the waveform.
    Any help would be greatly appreciated,
    thanks
    ak
    Attachments:
    peak detect.vi ‏22 KB

    If I open your vi and set the peak threshold and valley threshold to 100, the peaks and valleys seem to be found.
    Randall Pursley

  • Need Help with peak detection

    Hello,
    I am in need of some help using the peak detection. I have an array of values that I need to find the centroid (peak) of. I am only interested in finding the centroid of a large peak. The problem I keep having is that the peak detection VI finds every little peak above the threshold when I really want the overall average peak. Please look at the graph in the picture file to see what I mean.You can see that the main peak has jagged edges. The peak detection in Labview will find every one of these jagged edges and report the location back as a peak. I am only interested in the overall shape of the peak. How can I filter out the multiple peaks and only report the centroid of the desired shape? There is an example program in the labview package called "advanced peak detection point by point" but I cannot figure out how to employ it in this application.
    Thanks in advance for any help.
    -Mark
    Attachments:
    Array values.PNG ‏9 KB

    If I were you, I wouldn't even use peak detection.
    The point of peak detection is to find multiple peaks, like in a sine wave, etc.
    If you just want the maximum:
    Just use 'Array Max & Min'
    The 'max value' equates to your y-value.
    The 'max index' can be used to find your x-value
    Message Edited by Cory K on 05-07-2009 11:52 AM
    Cory K
    Attachments:
    Peak.PNG ‏3 KB

  • Peak Detection Specifics

    A part of a fatigue testing data acquisition program requires peak detection. I've read the other peak questions on here, but mine seems to be different.
    Each cycle, I collect n points. Within that, there are x peaks. The data between peaks 1 and 2 is extracted, potentially saved to disk, and always inserted into a circular buffer. This continues for each peak found. Of course, there is always data left after the last peak that does not get included into a cycle. So, I shift register it back to the next data collection loop, and append it to the beginning of the next set of data.
    My problem is that peak detect doesn't seem to find the peak if it's the first point in a data set. This seems to happen regardless of settings that I use. I c
    an't change threshold values, and any width seems to have the same result - skipping the first point. Consequently, all the data that got held over from the last cycle gets discarded because the first peak is ignored.
    Anyone have any ideas? I'm reinitializing the peak detection system each cycle because if I don't, it screws up the location indicies. I may put together a picture later, the whole problem makes more sense graphically.
    Thanks!

    The peak detection requires a peak (data on both sides of peak). Since the first point of the data does not have points on the other side of the peak... I would suggest that you keep more points before the peak as your remainder waveform and it will then pick up the peak. The number will depend upon your peak width spec.
    Stu
    Stu McFarlane
    Viewpoint Systems, Inc.

  • WA Multiscale Peak Detection VI

    Dear users,
    using "WA Multiscale Peak Detection VI', I would expect that peaks detected for a waveform Y are the same as valleys detected for the waveform -Y (y-values multiplied by -1, i.e., waveform flipped upside-down), see the snippet, please. This is not the case, when doing the analysis on some data.
    Opening and examining the subVIs, I only see reversing the synthesis and analysis filter frequencies and changing "greater" for "lower", as for the difference between "peaks" and "valleys" setting.
    The documentation does not state any substantial difference between "peaks" and "valleys".
    Any thoughts on it?
    Solved!
    Go to Solution.

    OK, so after some more analysis:
    One has to "y-flip" the threshold for the valleys. I.e., if one searches for peaks with a threshold T and want to search for similar looking valleys, then there are two solutions:
    a) flip the data (*(-1)) and keep the threshold
    b) flip the threshold (*(-1)) and keep the data.
    Having no option for searching the valleys offered by this VI, I'd came up with the a) solution quickly, most probably -- it's hypothetical, right? Having this options and seeing the results, confused me highly.

Maybe you are looking for

  • Change windows software for MAC or run with windows

    Hi I have a new macbook pro and unopened versions of Photoshop elements 8 and Serif pageplus and Serif webplus. I am wondering if I should 1.buy windows 7 to run these applications (serif don't have a mac compatible version) 2. Return the elements fo

  • Oracle 10g Express Edition XE

    i have windows 7 and 64 bit OS. i am install the oracleXE .it was successfull but i cannt access database home page but i am connect using SQL command Line.How to access the database home page

  • Stock overview using navigation profile in MD04

    Hi, after excuting MD04 when i using the navigation profile for the first time to view the the stock , its show all the stock batches. In between when i view the any one of the batch in MSC3n and while  again excuting the MD04 and viewing stock views

  • Can I share stuff between two different Itunes accounts?

    My wife and I each have an Itunes account.  We find it crazy that we have to potentially purchase the same stuff twice.  We do have most of the music on my account, but most of the business apps on her account.  We each have ipods, each have ipads, i

  • No images showing in Mavericks MAIL

    In Mavericks 9.0.1 MAIL, I can't see any images in HTML emails - only attachment images. I have selected MAIL Preferences/Viewing/Display remote images in HTML messages.