Ask your own question, for FREE!
Mathematics 7 Online
OpenStudy (anonymous):

How to find fourier series coefficient : x(n)=1+sin(πn/N)+2cos(πn/N)+cos(4πn/N+π/4)

OpenStudy (unklerhaukus):

is that your function? is n a discreet or continuous variable?

OpenStudy (anonymous):

yeah this is the function. actually that is what i am confused about, the question doesnt clearly state as to what kind of function this is. i guess it is a discrete one because the continuous ones are denoted as x(t)

OpenStudy (unklerhaukus):

only know this \[\begin{equation*} f(x) \sim S(x) =\frac{a_0}2+\sum\limits_{n=1}^\infty a_n\cos\left(\frac{n\pi x}l\right)+b_n\sin\left(\frac{n\pi x}l\right) \end{equation*}\] \[\begin{align} a_0 &=\frac1l\int\limits_a^{a+2l} f(x)\,\text dx \\ a_n &=\frac1l\int\limits_a^{a+2l}f(x)\cos(nx)\,\text dx \\ b_n &=\frac1l\int\limits_a^{a+2l} f(x)\sin(nx)\,\text dx \\ \end{align}\] I'm not sure how it would work with discrete variables...

OpenStudy (anonymous):

thanku. but i think these equations work only for continuous.

OpenStudy (unklerhaukus):

yeah ok, sorry i dont think I can help.

OpenStudy (anonymous):

no problem sir :)

OpenStudy (phi):

The complex coefficients of the fourier series of a discrete function are given by \[ X[k] = \frac{1}{N} \sum_{n=0}^{N-1} x[n] e^{-i k n \Omega_0} \] where \(\Omega_0= \frac{2 \pi}{N} \) to avoid confusion, re-name N to M in your function \[ x[n]=1+\sin\left(\frac{ \pi n}{M}\right)+2\cos\left(\frac{ \pi n}{M}\right)+\cos\left(\frac{ 4\pi n}{M}+\frac{\pi}{4}\right) \] In this case N= 2M and \(\Omega_0= \frac{2 \pi}{N} = \frac{2 \pi}{2M}\)

OpenStudy (anonymous):

ohkay, this is the method i have used. how do we know that N=2M? and sometimes we use 'j' along with the coefficient, what does that represent? as in, 1/2j. secondly, along with sine, do we use a negative coefficient?

OpenStudy (phi):

j= sqrt(-1) in electrical engineering, i stands for current, so they use j to stand for sqrt(-1)

OpenStudy (phi):

***how do we know that N=2M?*** a sinusoid y= \(\sin( \theta)\) repeats every 2 pi radians for a signal, we typically have \( \theta \) a function of time "t" and let \( \theta= 2 \pi f \cdot t\) where f represents the frequency If "t" is at discrete times, every \(\Delta t\) seconds, we could write this as \( \theta= 2 \pi f \cdot n \cdot \Delta t \) where n is an integer 0,1,2... The frequency "f" is 1 over the period, f= 1/T Let's say we sample this sinusoid N times in one period; then the period of the sine wave T is N \(\cdot \Delta t \) seconds long. i.e. N samples spaced \(\Delta t \) seconds apart. substituting f with 1/N \(\Delta t\), the signal, sampled N times generates a sequence \[ y = \sin\left( \frac{2 \pi }{N} \cdot n\right)\] for n=0,1,…N-1 if we are given sin(πn/M) and pattern match it to sin(2πn/N) we must have sin(2πn/(2M) ) (multiply top and bottom by 2 to get a 2π up top) matching this with the standard form, we see the period is 2M samples

OpenStudy (phi):

Let's find the fourier series coefficients for sin(2πn/(2M) ) where n is the "time index" First, use Euler's Identity \( e^{\pm jA}= \cos(A) \pm j \sin(A) \) to re-write the sin as a combination of complex exponentials: \[ e^{jA} - e^{-jA} = \cos(A) + j \sin(A) - \left(\cos(A) - j \sin(A) \right)\\ = 2 j \sin(A) \\ \sin(A)= \frac{e^{jA} - e^{-jA}}{2j}\] using 1/j = j/j*j (mult top and bottom by j) = j/(-1)= -j \[ \sin(A)= \frac{j}{2}\left(e^{-jA}- e^{jA} \right) \] using this identity in the formula to find the fourier coefficients \[ c[k] = \frac{1}{2M} \sum_{n=0}^{2M-1} x[n] e^{-j \frac{2 \pi k n}{2M} } \\ c[k] = \frac{j}{4M} \sum_{n=0}^{2M-1} \left(e^{-j\frac{2 \pi n}{2M}}- e^{-j\frac{2 \pi n}{2M}} \right) e^{-j \frac{2 \pi k n}{2M} } \] distribute the exponential factor: \[ c[k] = \frac{j}{4M} \sum_{n=0}^{2M-1} \left(e^{-j\frac{2 \pi n(1+k)}{2M}}-e^{-j\frac{2 \pi n(1-k)}{2M}} \right) \] now consider the case k=1 the second exponential \[ -e^{-j\frac{2 \pi n(1-k)}{2M}} = -e^0 = -1 \] and \[ \sum_{n=0}^{2M-1} -1 = -2M \] to evaluate the first exponential we note that (with k=1) \[ e^{-j\frac{2 \pi n(1+k)}{2M}}= \left(e^{-j\frac{4 \pi}{2M}}\right)^n = r^n\] use the closed form solution to a sum of a geometric series \[ \sum_{n=0}^{N-1} r^n= \frac{1-r^N}{1-r} \] See http://en.wikipedia.org/wiki/Geometric_series#Formula to find \[ \sum_{n=0}^{2M-1}\left(e^{-j\frac{4 \pi}{2M}}\right)^n = \frac{1-e^{-j\frac{4\cdot 2M\pi}{2M}}}{1-e^{-j\frac{4 \pi}{2M}}}= \frac{1-e^{-j 4\pi}}{1-e^{-j\frac{4 \pi}{2M}}}\] \[ e^{-j 4 \pi}= \cos(4 \pi) - j \sin(4 \pi) = 1 \] and \[ \frac{1-1}{1-e^{-j\frac{4 \pi}{2M}}}= 0 \] we find that \[ c[1]= \frac{j}{4M} \cdot -2M = -\frac{1}{2} j \] we can use a similar process to evaluate k= 2M-1 (which also corresponds to k= -1. These coefficients repeat every 2M values) we will find c[k] = -½ j k=1 +½ j k= 2M-1 0 otherwise

OpenStudy (phi):

Consider, we start with a "signal" x[n] which is a sequence of numbers (typically the amplitudes of a continuous waveform sampled at equal time intervals), indexed by n The idea of a fourier series is that this sequence x[n] can be represented as the linear combination of a set of complex exponential sequences: \[ x[n]= \sum c_k \exp(j \Omega_0 k n) \] For certain signals, we can identify the fourier coefficients "by inspection" for example x[n]= 1 for all n , (a "d.c. or direct current component) can be represented by the complex exponential \(e^{j 2 \pi n \cdot k /N}\) at k=0 we see immediately that the coefficient is 1 (the amplitude of the exponential) at k=0, and 0 for all other harmonics (i.e. for all other k's) similarly, knowing the signal is A \( \cos( 2 \pi k \cdot n/N) \), we can say \[ = \frac{A}{2} \left( e^{j 2 \pi n \cdot k/N} + e^{-j 2 \pi n \cdot k/N} \right)\] that is, a cosine is the linear combination of the kth and (N-k)th (or -kth) harmonics of the fundamental frequency c[k]= A/2 c[-k]= c[N-k]= A/2 = 0 otherwise

OpenStudy (anonymous):

thank you PhI :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!