04-21-2015 02:05 PM
I'm currently working on my senior design project for biomedical engineering. We are creating a piezoelectric sensor in order to measure respiration on a bed non-invasively. The sensor lays on bed under subject and records movement due to respiration. We currently have figured out how to detect peaks. However, now we want to count number of peaks detected within a 1 min time period and output that result with a 'timestamp'. We would like the output to be into excel as two columns, rate(number peaks in 1 min) and time. Time in minutes and not actual time is fine. Sampling rate was 500Hz.
My current VI has peak detection criteria and can output total number of peaks and their locations.
Any help would be greatly appreciated as this is our last step before verification and have been stuck on it for awhile.
It won't allow me to attach a tdms file in which our data is stored as, so I can't upload the data currently.
Also attached is our current VI for peak detection labeled 3.26.Resp.PeakDetect.
Thanks for any and all help!!
04-21-2015 02:13 PM
I put my data into an excel file by hand incase it's needed. The file is only a minute and a half long due to it being preliminary testing data.
04-21-2015 02:22 PM
Well, 500Hz*60sec/min = 3000 samples. So you want to read 3000 samples and do your math.
If you want relative time, then each data point you put in your new file will add 1 minute to the time.
04-22-2015 10:10 AM
so I would need to create a case structure to read 30,000 samples at a time then output the math into an array? I'm relatively new to labview so I'm having trouble setting something like that up. I've looked over other examples but they don't fit with my data
04-22-2015 11:59 AM
I see no need for a case structure. Or did you set up a state machine that I missed?
I recommend making a VI that does nothing but read your 30,000 samples and process it (counting the peaks and what not). From there, you create the array for the number of peaks and the time (in minutes). Then you can call that VI inside of a loop to build up the array of data points.