Triggering on peak of ECG waveform
Hey,
Basically, Ive got to simulate an ECG waveform within labview and then use it to trigger solenoid valves. For now, I am trying to use the highest peak (Point R) to turn on an LED. Firstly, I could only find an ECG simulator on NI which just returns the shape, and not a continuous wave. So with a lot of help from a member of university staff, I have attached a VI where the data was transformed into dynamic and then the amplitude and data number is constantly being read.
I have the following problems:
How can I make the proccess start again after the end of the waveform, as it eventually gives an amplitude of 0 after the data point where the wave finishes.
How Can I make the led come on from the time the graph is at the middle of the 2nd highest peak till it turns off at the middle of the lowest peak, and stays off untill it reaches the middle of the 2nd highest peak again, and so on....?
I thought of 2 ways, firstly to find the highest peak and use equations based on the BPM (note: the vi given is for 60BPM) to offset the triggers on the 2nd and lowest peaks. And a much simpler,; to find the requied peaks by finding peaks within a certain threshold range. But how can i look for a peak within a range of amplitudes? The find peaks and valleys function only has one threshold input.
Thanks in advance
Attachments:
Untitled 1.vi 60 KB
Thanx for the reply. the data is attachted.
I got it from exporting data from a graph using the vi from http://zone.ni.com/devzone/cda/epd/p/id/6188
What im stuck on is triggering/ turning an LED on (for example), by triggering from the highest peak. Also the other problem, which I need to tackle first is how do I make the ECG wave continuous. I couldnt find a continuous waveform ECG, so I used that one, and converted it like i have, but after that wave finishes then the amplitude is zero, but i want the wave to continue, or restart, in order to be able to trigger on the peak, and then keep the led on until the 2nd highest peak, when it is turned off.
Let me know if I have not explained something properly.
And I have now taken off the overall while while loop, but theres no point me attaching that, thers no change to the output.
Attachments:
Datacsv.csv 654 KB
Data.xlsx 575 KB
Similar Messages
-
How can I label the peak in the waveform graph!
Hello, my question is a little vague. I try to narrate it clearly.
Thank you for your patience!
I work with Labview 7.1. At a word, My question is how to label the
peaks when using the while loop and the event structure with
the dobule click event!
1.Open the Why.VI and execute it.
2.Click in the 'Acquire signal', then you will find two modes to upload
the signals, press the 'Read' button and ignore the 'Sample',since 'Sample'
mode need the support from the hardware, while 'Read' mode just upload file
from disk, select the 'Signal.txt'(inluded in the attachment), you will
find two waveform shown in waveform graph,just like 'Pic1.jpg'. Up to now,
there is no problem.
3.Press on the 'Analysis' button and enter a new interface. Amplify the plot
and selet the the a piece of waveform between about 3.02 and 3.06. Set the
x coordinate of the 'Cursor 0' as 3.03 and set the width as 0.01. Move the cursor
you will find two cursors(one vertical lines in yellow and another in blue).
Double click the graph and select 'valley', two x coordinate values corresponding
to the x coordinate of the two valleys are listed in the listbox. All above
mentioned is shown in 'Pic2.jpg'.
4.Let me explain my idea and my question now. What I have done is plot the waveform
when clicking in 'Analysis' interface;then, amplify the waveform, select
a certain area and move the cursors;at last, double click the graph, the waveform
between the two cursors are selected and the peaks are identified.But, what I need
next is to label the peaks in the graph as soon as I double click the graph,I
can not realize this idea because the waveform is out of the while event, the coordinates
of the peaks can not output until the while event is stopped. If I move the graph
into the while loop,the selected area can not be keeped because the while loop will
run continuously and will renovate the plot area to original area, but I want to keep
the selected area for got the peaks conveniently. In short, My question is about how
to label the peaks in the graph and keep the seleced area freely.
This problem has puzzled me for a long time. May anyone give me some advice.
Thank you for patience and really appreciate your help!
BTWlease let me know if the VI can not run well!
Attachments:
Calculate velocity.vi 271 KB
why.llb 389 KB
Acquire.vi 213 KBSorry, I try to compress the files in '.rar' ,but it is compatible with the web,I have to
upload them in reply file.
Attachments:
signal.txt 684 KB
Save file.vi 103 KB
Get Waveform Time Array(0).vi 46 KB -
IMovie volume meter shows much red peaking but audio waveform shows none
When I play my movie, the volume meter in iMovie shows peaking in the red (distortion) all over the place, but in the audio waveform there is not one place where it peaks into the red (or even the yellow). The whole wave is very close to the 0db line. It sounds great when I play it and still great after I export it. But, once I upload it to YouTube, there is awful distortion all over the place just like the volume meter in iMovie indicates. I can't find any place to turn down output so the volume meter doesn't peak and I don't want to turn my audio waveform down below 0db and lose all of my volume. I already tried clicking on the Normalize Clip Volume in Audio Adjustments and that didn't seem to change anything, still peaking like crazy in the volume meter. What can I do to get rid of the red peaking and distortion?
Here's a little more info for anyone who can help with my problem. I am using iMovie 11 on an i7 iMac with Lion. I turned the audio of my video all the way down and imported another audio that had been compressed in Pro Tools to show no red peaks whatsoever. Can someone please help?
Thanks,
LoribellaWhen I play my movie, the volume meter in iMovie shows peaking in the red (distortion) all over the place, but in the audio waveform there is not one place where it peaks into the red (or even the yellow). The whole wave is very close to the 0db line. It sounds great when I play it and still great after I export it. But, once I upload it to YouTube, there is awful distortion all over the place just like the volume meter in iMovie indicates. I can't find any place to turn down output so the volume meter doesn't peak and I don't want to turn my audio waveform down below 0db and lose all of my volume. I already tried clicking on the Normalize Clip Volume in Audio Adjustments and that didn't seem to change anything, still peaking like crazy in the volume meter. What can I do to get rid of the red peaking and distortion?
Here's a little more info for anyone who can help with my problem. I am using iMovie 11 on an i7 iMac with Lion. I turned the audio of my video all the way down and imported another audio that had been compressed in Pro Tools to show no red peaks whatsoever. Can someone please help?
Thanks,
Loribella -
Peak detection from waveform data
Hi Folks.
This is probably an obvious one but I cant figure it out. In the sine wave detector VI attached the peaks are determined from a simulated signal. I want to be able to do the same with a waveform data (DBL) but it wont let me. How can I extract the signal from the DBL to feed to the rest and make the waveform peak detector VI work right??
Thanks,
Mark.
Solved!
Go to Solution.
Attachments:
Sine Wave Detector 2009.vi 140 KB
waveform peak detector.vi 40 KBUse From DDT, found on the Signal Manipulation Palette, to change the Dynamic wire into a Waveform.
Bob Schor -
Acquisition of ECG waveform and HRV algorithm
Presently I am working on Heart Rate Variability by ECG data acquisition. How can labview help in the work. We have labview 7.0 in our institution and NI DAQ Max.
Several people have done that kind of work with LV.
Do you have specific questions?
WARNING! You should not use standard DAQ hardware without isolated signal conditioning between the electrodes and the computer. Leakage currents could be dangerous, possibly lethal, to the subject whose ECG is being measured.
There are 3 main segments to this application. One is the data acquisition. Second is the heart rate extraction from the raw ECG data. Third is the HRV analysis. Each of these can be relatively straightforward or quite complex depending on the specifications you must meet and the conditions under which the measurements and analysis are done.
Lynn -
How to get information about time of triggering and entire time waveform
I have been trying to capture a certain portion of waveform from Textronix DPO2024 using triggering in Labview. Further, I want to save the the entire triggered waveform (triggered time as one array and triggered signal amplitude as second array) in .xlxs format.
With the present setup (screenshot, and output of program attached). I only get the triggered portion of signal, I get time stamp (that I do not want) but require the time array, instead.
I know there are methods to convert the timestamp to time array. I do not want to use this, as I need to capture the data every 10 ms or even faster, and this slows the acquisition process.
Any help will be much appreciated.
ThanksHi Dennis,
Thank you for the response.
Please find the .vi attached. In the case - without triggered, with the information of dt and length of Y, we can determine the time waveform (as calculated using matlab script on right). But in the presence of triggering, neither the length of waveform nor the start time of triggering is known, so calculating the time waveform is tricky. In addition, since the waveform is continuously changing, and keeping trigger fixed at a particular level, the length of waveform is also changing in some of the acquisition. So I wanted a 'simple' method where I can get the time information about the triggered waveform in each acquisition.
More specifically, I wanted help in regard to getting time array of the triggered signal and save it as a column in excel file.
Thanks -
Is labview able to record the peak to peak value from an ECG wave automatically?
need some help here. i am a new user of labview and i do not know much about labview. i want to ask if labview is able to read and record an ECG waveform? if yes can someone teach me how is it done? thanx!!
Here is an attachement.
Labview user
Attachments:
gg.JPG 102 KB -
Trying to Isolate Waveform peaks
Labview 6i
I am trying to isolate the peaks of a waveform. The attached image shows generally the type of waveform that I will be using. I need to know the max value at each peak and the number of peaks.
The path that I am currently following is to reduce the over all value of the graph until 0 passes through the peaks. (This has already been done in the image). I would then remove any data which is below 0. This is the second graph on the image. I have been able to sucessfully determine the beginning and end of each peak but am unable to use that data to cause the program to store this section of data into its own array.
I know that I need to seperate the peaks somehow, so each peak is in its own column of an array and then I can go back and find the max and min.
I have this done in 8.0 using the Trigger and Gate function but unfortunatley I am required to make this work in 6i.
Any advice would greatly be appreciated.
Christianforgot the images
Attachments:
Image 1.JPG 96 KB
Image 2.JPG 59 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 KBHi,
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 -
I want to measure te time between the peaks
I need to measure the time between each peaks (QRS peak) in an ECG waveform continuously and plot on the chart.
Can u please help me with this.Hello kok,
Here is an example. I am using a sine wave instead but it will still work. Just put in the threshold to be above the itnermediate peaks that you want to ignore but below the peaks you want to get. The VI will then tell you what location inside of the array the peak occured. You can subtract each location from each other to find how many elements pass between peaks. You can then multiply the number of elements between peaks by the amount of time between each sample. I hope this helps.
Steven T.
Attachments:
rrmeter.vi 16 KB -
Hello,
I am doing an assignment on an ECG analyzer. First, I have "generated" an ECG signal by just making it read from data points because I figured this would be the easiest transition for when I have to actually test my program with actual hardware later.I am pretty much just looping the same signal over and over, would it be better to make my own signal?
My question is, I am having problems with my filter when I am using my datapoints for the waveform. The filtered signal doesn't look too clean. Is it because I am using a butterworth filter? I am not sure which frequency and order I should be using. Also, does anyone have any suggestions on using a heartbeat detector? I figure that I can use the peak to peak detector, and then feed that into a program that will then do the analysis based on the number of beats per minute. Please advise...attached is my current VI with the two data points that I am using. Thanks.
Also, is the way that I am reading in my data efficient? I sometimes find it difficult to read certain datapoints into my program.
Attachments:
ECG Waveform Copy.vi 33 KB
funFiltros.vi 20 KB
ECGdata.txt 86 KBGo to this post http://forums.ni.com/ni/board/message?board.id=170&message.id=412111&query.id=9546898#M412111 and find the accepted solution. Follow the instructions. Since you use LAbview 8.5, you must change the 8.6 part of the install directory to fit your Labview version. Download the VI I have posted here. And insert the ECG simulator as shown in the picture inside the VI I have posted here. You can configure the Express VI by double clicking on it
Good luck
Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Attachments:
ECG Waveform Copy_2.zip 33 KB -
Peak detection( take 100 ms samples?)
Hi...
I have a problem using peak detection under Analysis=>waveform monitoring.
I want to get the real data (ECG data), and detect the peak of the data. Then i want to store the index of the peak into array so that i can measure the time difference between two peaks.
my problem is that when i use peak detection, i cannot get the result as above mentioned. Before this i have tried to test the peak detector and found that if it will detect the peak for 100 ms time interval only. SO if i have waveform with f=100 Hz, then it will detect only 10 peaks..Is it correct that this vi takes 100 ms sample for detection? *correct me if i'm wrong
And since i want to get the real data from ECG hardware, is there any method to measure index of the occurence of all peaks and store it into array? (not only for 100 ms)
-I saw the formula in peak detector help :
To view the locations in terms of time, use the following equation.
Time Locations[i] = t0 + dt*Locations[i]
What does [i] here represent?
Thanks for the help...
Regards,
Rismi *newbie...:dHi...
Thanks, now i can understand about peak detection for simulate signal...
Then if i use this vi to detect peak of ECG data(data from DAQ or recorded data)..This vi will detect the locations of peak of current block of data. what "current block of data" in this case represents..??
i attach my simple program to detect the index of peak of my data. But i cannot get my desired result. And when i detect the number of the peak, the values is either 0 or 1. I don't know how to fix this problems.Can anyone give me advice?
Attachments:
retrieveSunday22.vi 161 KB -
Hello LabVIEW Users,
I am trying to acquire ECG signal using a CONTONIUS ANALOG SINGLE CHANNEL INPUT VI in LabVIEW. I would like to know that will I be able to acquire the ECG waveform using this VI or will I need a CRO for this purpose I have not considered CRO because I understand that the heart beats at the rate of 96 beats / min so the signal is very slow varying. If you agree that the ECG can be acquired using the above mentioned VI then I would like to know about the scan rate which will be fit to do so. I must also tell you that the sampling rate for ECG is 300 samples / sec. So it would be nice if some one could please tell me about which VI will be perfect for acquiring the ECGhhjjj --
Don't know what a CRO is but I will try my best to answer your question. Two things to consider when acquireing an ECG signal: 1. Resolution and 2. Sample Rate.
1. The output from standard ECG leads is in the milliVolt range (~1 to 3 if i remember correctly). The smallest voltage change the average NI data acquisition board will be able to detect is ~1 milliVolt. So, you will have to amplify and filter the signal from the leads to have a good enough signal to visualize in your VI.
2. The peak Hz in a ECG signal, the QRS complex, is around 17 Hz (again, my memory is a little fuzzy here) so, theoretically, you can sample data around ~34 samples/sec and get away with it. However, I would recommend a x10 sampling rate (~170 Hz). 300 sample
s/sec should be fine but don't oversample or you will introduce unwanted noise in your signal.
So, I think the VI you are using to display the ECQ signal should be fine. But, I think an emphasis should be placed on how you acquire the signal.
Hope this helps.
Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect -
I am looking for labview examples related to ECG
Hi, everyone!
I need your help.
I am looking for labviews examples, which are related
to ECG for my thesis .
I wait for your answer.
thanks in advanceBurcu;
I am not sure what type of examples are you looking, so this is a start:
Searching at the LabVIEW Discussion forum I found:
Example
calculate heart rate from ECG
how to design a suitable vi to acquire ECG waveform?
Doing a search with Google:
LabView Exercise to model and analysis ECG/EKG data
EE 206 MINI-PROJECT I CARDIAC MONITOR VI
Searching an NI.com:
PC-Based ECG Monitoring and Analysis Using BioBench (LabVIEW VIs at bottom - not sure if link is dead)
Regards;
Enrique Vargas
www.visecurity.com
www.vartortech.com -
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 KBI 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)
Maybe you are looking for
-
How to optimize the select query that is executed in a cursor for loop?
Hi Friends, I have executed the code below and clocked the times for every line of the code using DBMS_PROFILER. CREATE OR REPLACE PROCEDURE TEST AS p_file_id NUMBER := 151; v_shipper_ind
-
Dear all, Workflow 2.6.4 The below procedure consumes lot of time and oracle advises the below : Recommendation 1: SQL Tuning Estimated benefit is .58 active sessions, 29.74% of total activity. Action Tune the PL/SQL block with SQL_ID "6bd4fvsx8n42v"
-
Hi, first off let me begin by saying no, it's not a problem with firmware 2.2, because I'm using firmware 2.1. Secondly, no, updating to firmware 2.2 will not fix this problem as most people with this problem are using firmware 2.2. The problem is wh
-
Blacklist application for Nokia X3
Hi all. I'd like to know if there is a blacklist application for Nokia X3 and where I can buy or download this application. I want to reject calls from specific numbers and I think the blacklist application is the only way .. Am I correct ? I'm from
-
Flash won't work on my Windows User
When I go to any site that requires Flash, I get a message that I need to download flashplayer. When I download it, i get a message that the installer can't find the source folder and creates a new one. When I go to the Adobe site and test the plugin