Sunday, August 13, 2017

Calculate harmonics using DFT from real points


I have a real data of 144 points, when I perform a 144-point DFT on this data, I get $X$ with real and complex values. I want to calculate harmonics using these $X$'s.



  • The $X[0]$ and $X[72]$, added together and divided by 144, would give me the DC component?

  • And can I just use the next 71 $X$'s and their conjugates (Euler's identity), to calculate the harmonics? I believe it's $(X[i] + X^*[i])/144 $?



Sorry about that, but I have this problem to solve, I'll try and explain it and what I'm supposed to do with it. Thanks for being patient.


I have a data set of 144 points. I want to express this in terms of a DC component and it's harmonics. So, I was asked to perform a DFT operation on this and get the harmonics that would represent this data in frequency domain. I performed a 144 point DFT on this data and got 144 $X[k]$'s with real and imaginary parts. As, per my understanding these 144 $X[k]$'s ($X[0]$ being the DC) represent the time domain signal in frequency domain, but I'm still being asked for the DC(apparently ($X[0]+X[72])/2$) and the 71 harmonics, which I'm not sure how to go about.


I apologize if this still doesn't makes sense, but it's what I'm supposed to do, probably you can give me some reference where I can get such concept or anything related.



Answer



The DFT will express your time sequence as a weighted some of complex exponential (basically a set of orthogonal functions, if that's a helpful concept for you). DC is simply a special case of a complex exponential with the frequency being 0.


Let's assume a sample rate of 1440 Hz (to make the math simple). Then the DFT coefficients mean the following:


X[0]: amplitude at 0 Hz
X[1]: amplitude & phase at 10 Hz
X[2]: amplitude & phase at 20 Hz

...
X[71]: amplitude and phase at 710 Hz
X[72]: amplitude at 720 Hz (Nyquist frequency)

Nyquist is a little bit of an odd-ball. It's a real number so the phase is 0. The value should also be small or close to 0, otherwise you have potentially aliasing.


Since your input is real, you have complex conjugate symmetry as follows


X[73] = X[71]';
X[74] = X[70]';
....
X[143] = X[1]';


Just a quick comment: (X[0] + X[72)/2 is NOT the DC value. X[0] is.


No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...