So Jow Forums I need to do a FT (Fourier Transformation) of a EKG graph to get the pulse, so I will use DFT (Discrete Fourier Transformation), but I am not sure how to implement my dataset to the algorithm.
I'll take statements that make sense to dumb people for $100 Alex
James Stewart
>having to be spoon fed never gonna make it
Jose Gonzalez
It's not like that, I just don't know how to implement my data.
so I am asking how I should do it, and the data is to easily explain how I should do by taking like the first 4 lines or something
Camden Wilson
99% of programming is finding out solutions on your own, either through google-fu or just being smart and working out the problem in your head
Andrew Adams
Data set should be extended to complex numbers with imaginary values set to 0. You'll get complex values out, for which you'll want to find the largest magnitude in the new set. Assuming that's what you were asking, that is
Kayden Cooper
Okay let me be clear what I mean.
How tf do I do a Fourier Transformation? How should the data set syntax look like when I implement it?
Again, it's not rocket science dude. Look up a DSP library, apply a band pass filter to your data, and measure the time between the peaks. How to convert between time between peaks to frequency is left as an exercise to the reader. Alternatively if you insist on doing it with FFT, segment your signal so as to capture a few pulses with a moving window that moves as often as you want to generate the output data, apply FFT to a segment, gently scale the frequency plot in a pyramid patter centered around, say, 80 bpm to remove outliers, and find the highest peak in the graph.
Gavin Stewart
1) Learn how to do the continuous time fourier transform (ctft) by hand 2) Learn how to do the discrete time fourier transform (dtft) by hand 3) Learn how to do the discrete fourier transform (dft) by hand 4) Learn how to do the fast fourier transform (fft)
5) Figure out what the hell "implement my dataset" means
6) Decide what language you want to use (if this is a programming assignment) then Google some examples. If you are using Matlab then one place I used for info was: blogs.mathworks.com/steve/category/fourier-transforms/
The link has changed since the last time I used it. He had a tutorial back in 2009/2010 on FTs. Start with Nov. 23rd, 2009:
I'm poor AF because I haven't graduated from my PhD just yet. I'll do your homework for money
Aaron Ramirez
this. OP gives so little context it's almost impossible to help him. are you allowed to use libraries? do you have trouble actually implementing the FFT or actually applying it to your data? going by his previous posts it seems it's homework and he's supposed to implement it from scratch
Gavin Foster
the problem I have is applying my data to the FFT
Parker Myers
and is there some reason you've decided to use an FFT here instead of some other method?
Andrew Bailey
thanks I check the pagesyou linked
Ian Butler
some user said I could get the pulse with Fourier transformation, and I have like a ton of EKG's I need to get the Pulse from.
Elijah Phillips
A Discrete Fourier Transform will return a series of harmonic components that comprise the signal you have analyzed. They will increase in frequency linearly as the odd multiples of the base harmonic component and will decrease exponentially in energy the higher the component is with respect to the base harmonic. Taking the first five or seven components should give you the majority of the spectral composition of the signal. I'm not sure exactly sure what you are trying to do since taking the DFT of a signal by itself only tells you so much.
Juan Morales
After re-reading the OP and the original thread, I honestly don't know what you're trying to do. The links I provided will help if you want to learn about signal processing. But I don't know what "ekg to pulse" means.
I typed it into Google...and then I tried "matlab convert ekg to pulse". So...I think given an EKG signal (txt file) you want to calculate the beats per minute (or second). When I read "pulse" in your OP I was thinking DSP...which made no sense to me. But now I understand...I think.
You want to write a program that will calculate the BPS of a given signal. If you take the fourier transform of the signal you will have the frequency component of the signal....and thus the pulse.
Google "matlab convert ekg to pulse" or "matlab convert ekg to heart rate". You haven't provided how you are supposed to do this task. So use the matlab examples then make it more specific.
You can just ignore my first post as I don't think you are really looking to understand signal processing theory.
Good luck.
Nolan Turner
My question is what situation is OP in that requires this but didn't give them an intro to any of the tools necessary for a job? Is this a bad school course or a job?
Luke Young
thank you user, yes I need to convert the EKG to a BPS. I will ddg it (matlab stuff)
Bentley Reed
>If you take the fourier transform of the signal you will have the frequency component of the signal yeah but you'll get the average BPS for the whole thing I believe what he wants is one BPS reading say each second I told him to apply a band pass and individually count the peaks using a threshold but he ignores my suggestion for some reason
Andrew Williams
Honest question OP, are you from India?
Michael Brooks
y u tink so?
Brandon Murphy
This is the best solution that OP should follow. Taking the DFT of the EKG won't exactly give the beats per second. It will give the harmonic components that make up the EKG signal. It sounds like doing peak detection or some quasi form of amplitude modulation would get OP what he wants. I think another approach would be to apply some rolling integration and determine a heart beat by checking when the integration gets close to zero.
Colton Scott
Search for an already made fft. Nunpy has one implementation. If you dont want to do that, making one isnt very hard
>or some quasi form of amplitude modulation What do you mean by that?
Michael Harris
>what is rejecting outliers
Michael Jones
If you did peak detection to determine the period and thus frequency that is somewhat similar to how amplitude modulation works. Amplitude modulation works by modulating a lower frequency by the amplitude of a high frequency carrier frequency.