# calculate FFT based on an oscillogram

Hi,

I'd like to understand the context in between an oscillogramm and the resulting FFT. My example is a full-wave rectifier and I am try to calculate some harmonics.

Because the function is symmetric I only need to calculate the an-values: $$A_n = a_n = \frac{2}{\pi}\int_0^{2\pi} \! f(t) * cos(nt) \, \mathrm{d}t \\ a_n = \frac{2}{\pi}\int_0^{2\pi} \! |sin(t)| * cos(nt) \, \mathrm{d}t$$ dividing up for integrating $$a_n = \frac{2}{\pi} \left( \int_0^{\pi} \! sin(t) * cos(nt) \, \mathrm{d}t + \int_{\pi}^{2\pi} \! (-sin(t)) * cos(nt) \, \mathrm{d}t \right) \\$$ result of the integral $$a_n = \frac{2}{\pi} \left( -\frac{cos(\pi n) + 1}{n^2 - 1} - \frac{cos(2\pi n) + cos(\pi n)}{n^2 - 1} \right)$$ My question is whether my way was right up to here and how I have to transfer this into the fft?

• You can check your results with that in almost any textbook on Fourier transforms. However, your equation shown in your question blows up when n=1 so it can't be correct. Commented Jun 12, 2016 at 11:54
• ok you are right, but i still not see my failure. Commented Jun 12, 2016 at 12:22
• $\pi n+1$ in the cosinus is an strange result (adding 1 radian?), it should be something like $(n+1)\pi$. Commented Jun 12, 2016 at 12:57
• Your question is a bit confusing... Are you really trying to calculate Fast Fourier Transform based on a real oscillogram? To me it looks like you're trying to do Fourier series on a graph of a function and not on an oscillogram from a device. There are no integrals in FFT and you feed FFT with a time-series, not a function. Commented Jun 12, 2016 at 13:55
• @AndrejaKo the oscillogram and FFT are from a real rectifier and I like to calculate the amplitudes of some harmonics. Commented Jun 12, 2016 at 16:18

If it helps, you have a sine wave multiplied by a square wave added to a phase shifted sine wave multiplied by another phase shifted square wave.

So what you're going to get is the FT of a square wave shifted along the w axis and with an imaginary component, I think.

• That confuses me. Where do you see any square waves? Commented Jun 29, 2016 at 9:18
• @C-Jay Think of a square wave as an on-off; apply it to a sine wave to get half the rectified output. Commented Jul 5, 2016 at 20:35

For understanding FFT, first you need to link continuous time to discrete time (which happens in most digital oscilloscopes - take into account the sampling frequency and the cut-off frequency):

https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem

Then try to understand a discrete time fourier transform:

https://en.wikipedia.org/wiki/Discrete-time_Fourier_transform

After understanding all this, you should be able to follow up the FFT easily.

If you are good with Matlab, you can simulate with a lot of signals (search fft).