Fourier Transformations

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.

here's one of the EKG graph data:
> pastebin.com/dya4r4L5

Attached: 87v583co9h98bk.jpg (540x378, 30K)

Other urls found in this thread:

mathworld.wolfram.com/FourierTransformGaussian.html
blogs.mathworks.com/steve/category/fourier-transforms/
blogs.mathworks.com/steve/2009/11/23/fourier-transforms/
ccrma.stanford.edu/~jos/mdft/
analog.com/en/content/scientist_engineers_guide/fca.html
ws.binghamton.edu/fowler/fowler personal page/EE301.htm
mathworks.com/help/symbolic/fourier.html
twitter.com/NSFWRedditGif

>implement my dataset to the algorithm

I'll take statements that make sense to dumb people for $100 Alex

>having to be spoon fed
never gonna make it

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

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

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

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?

could someone do a short demonstration?

it kinda helps, but I knew this. thanks though

here's your example
mathworld.wolfram.com/FourierTransformGaussian.html
Just integrate bro

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.

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:

blogs.mathworks.com/steve/2009/11/23/fourier-transforms/

Even if you aren't using matlab you can use the info for the language you are using.

Some other links:
ccrma.stanford.edu/~jos/mdft/
analog.com/en/content/scientist_engineers_guide/fca.html
ws.binghamton.edu/fowler/fowler personal page/EE301.htm

Good luck.

Attached: F1.png (304x304, 55K)

I'm poor AF because I haven't graduated from my PhD just yet.
I'll do your homework for money

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

the problem I have is applying my data to the FFT

and is there some reason you've decided to use an FFT here instead of some other method?

thanks I check the pagesyou linked

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.

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.

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.

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?

thank you user, yes I need to convert the EKG to a BPS.
I will ddg it (matlab stuff)

>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

Honest question OP, are you from India?

y u tink so?

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.

Search for an already made fft. Nunpy has one implementation.
If you dont want to do that, making one isnt very hard

Just use fft on matlab

there are a lot of dumb people in here...

there are peaks at ~1 Hz and ~1.85 Hz

Attached: Graph0.png (1922x1134, 114K)

>or some quasi form of amplitude modulation
What do you mean by that?

>what is rejecting outliers

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.

mathworks.com/help/symbolic/fourier.html

If it's 1 Hz, than the second harmonic is at 2Hz, not 1.85.

The period of the pulses is not completely constant. This can be seen in the broadening of the peaks in Fourier space.