norte101nortenorte2k4 4k para acelerar el cálculo de DFT a través de FFT.
x = ( x[0],x[1],x[2],…,x[N- 1 ] ) de norte
los puntos de datos se definen como una secuencia X = ( X[0],X[1],X[2],…,X[N−1]) where
X[m]=∑n=0N−1x[n](exp(−j2πmN))n,m=0,1,…,N−1
where
j=−1−−−√.
It will be obvious that
X is, in general
a
complex-valued sequence
even when
x is a
real-valued sequence. But note that
when
x is a real-valued
sequence,
X[0]=∑n=0N−1x[n] is a real number.
Furthermore, if
N is an
even number, then, since
exp(−jπ)=−1,
we also have that
X[N2]=∑n=0N−1x[n](exp(−j2πN/2N))n=∑n=0N−1x[n](−1)n
is a real number. But, regardless of whether
N is odd or even,
the DFT
X of a real-valued sequence
x
has
Hermitian symmetry property that you have mentioned in
a comment. We have for any
fixed m,
1≤m≤N−1,
X[m]X[N−m]=∑n=0N−1x[n](exp(−j2πmN))n=∑n=0N−1x[n](exp(−j2πN−mN))n=∑n=0N−1x[n](exp(−j2π+j2πmN))n=∑n=0N−1x[n](exp(j2πmN))n=(X[m])∗
Thus, for
1≤m≤N−1,
X[N−m]=(X[m])∗. As a
special case of this, note that if we choose
m=N/2 when
N is even,
we get that
X[N/2]=(X[N/2])∗, thus confirming our
earlier conclusion that
X[N/2] is a real number.
Note that an effect of the Hermitian symmetry property is that
the m-th bin in the
DFT of a real-valued sequence has the same magnitude as the (N−m)-th bin.
MATLABi people will need to translate this to account for the
fact that MATLAB arrays are numbered from 1 upwards.
Turning to your actual data, your x is a DC value of 1 plus
slightly more than one period of a sinusoid of frequency 1 Hz.
Indeed, what you are getting is
x[n]=1+sin(2π(0.01n)), 0≤n≤100
where
x[0]=x[100]=1. Thus, the first and the last of
101 samples
has the same value. The DFT that you are computing is thus given by
X[m]=∑n=0100(1+sin(2π(n100)))(exp(−j2πm101))n
The mismatch between
100 and
101 causes clutter in the DFT: the values of
X[m] for
2≤m≤99 are nonzero, albeit small. On the other hand,
suppose you were to adjust the array
t
in your MATLAB program
to have
100 samples taken at
t=0,0.01,0.02,…,0.99 so that
what you have is
x[n]=1+sin(2π(0.01n)), 0≤n≤99.
Then the DFT is
X[m]=∑n=099(1+sin(2π(n100)))(exp(−j2πm100))n,
you will see that your DFT will be
exactly
X=(100,−50j,0,0,…,0,50j) (or at least
within round-off error), and the
inverse DFT will give
that for
0≤n≤99,
x[n]=1100∑m=099X[m](exp(j2πn100))m=1100[100−50jexp(j2πn100)1+50j(exp(j2πn100))99]=1+12j[exp(j2πn100)−exp(j2π−n100)]=1+sin(2π(0.01n))
which is precisely what you started from.