How to calculate 8-point FFT of data by hand












0












$begingroup$


Given the following data:



Two period sine; samples = [0, 1, 0, -1, 0, 1, 0, -1];



I am asked to calculate the FFT of the sampled data to find the complex coefficients.



I don't necessarily want the answer to the problem, just the general steps that are used to calculate FFT and why they are useful.



I've tried looking up ways to calculate these but I find them all to be very confusing and full of unrelated jargon.










share|cite|improve this question









$endgroup$

















    0












    $begingroup$


    Given the following data:



    Two period sine; samples = [0, 1, 0, -1, 0, 1, 0, -1];



    I am asked to calculate the FFT of the sampled data to find the complex coefficients.



    I don't necessarily want the answer to the problem, just the general steps that are used to calculate FFT and why they are useful.



    I've tried looking up ways to calculate these but I find them all to be very confusing and full of unrelated jargon.










    share|cite|improve this question









    $endgroup$















      0












      0








      0


      1



      $begingroup$


      Given the following data:



      Two period sine; samples = [0, 1, 0, -1, 0, 1, 0, -1];



      I am asked to calculate the FFT of the sampled data to find the complex coefficients.



      I don't necessarily want the answer to the problem, just the general steps that are used to calculate FFT and why they are useful.



      I've tried looking up ways to calculate these but I find them all to be very confusing and full of unrelated jargon.










      share|cite|improve this question









      $endgroup$




      Given the following data:



      Two period sine; samples = [0, 1, 0, -1, 0, 1, 0, -1];



      I am asked to calculate the FFT of the sampled data to find the complex coefficients.



      I don't necessarily want the answer to the problem, just the general steps that are used to calculate FFT and why they are useful.



      I've tried looking up ways to calculate these but I find them all to be very confusing and full of unrelated jargon.







      linear-algebra fourier-series fourier-transform fast-fourier-transform






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Dec 1 '18 at 16:19









      APorter1031APorter1031

      1507




      1507






















          2 Answers
          2






          active

          oldest

          votes


















          2












          $begingroup$

          If your signal is $sin(4pi t)$ sampled at $8$ Hz, and you compute the DFT with the formula



          $$ F_k = sum_{0 leq m < n} f_m e^{-i2pifrac{k}{n}{m}} enspace,$$



          you know right away that the DFT is



          $$[0, 0, -4i, 0, 0, 0, 4i, 0]^T enspace. $$



          The coefficients can only be $0$ for frequencies different from $2$ Hz and its conjugate $6$ Hz. The two remaining coefficients must be imaginary and conjugates, because the signal is a sine, with the negative sign coming from the negative sign in $e^{-i2pifrac{k}{n}{m}}$. The $n/2 = 4$ factor is there because there is no "scaling" in the direct transform. (The division is in the inverse transform.)



          Armed with these simple observations, you can transform simple signals for which you know the "recipe" (in this case, one sine wave at $2$ Hz) in a matter of seconds.



          If you've been asked to show the FFT computation, follow @rafa11111's answer, but even then, before you start, you'll find it convenient to know what should come out of the computation.






          share|cite|improve this answer











          $endgroup$





















            1












            $begingroup$

            Let $f = [0,1,0,-1,0,1,0,-1]^T$ be the sample values and $hat{f}$ be the transformed values. The DFT is given by $hat{f} = F_8 cdot f$, with $F_{8mn} = w_8^{mn}$, $w_8 = e^{-2pi i/8}$.



            We split the even and the odd components of $f$ as
            $$
            f_{ev} = [0,0,0,0]^T, f_{od} = [1,-1,1,-1]^T,
            $$

            And $hat{f}$ is given by
            $$
            hat{f}_n = hat{f}_{ev,n} + w_8^n hat{f}_{od,n}, hat{f}_{n+4} = hat{f}_{ev,n} - w_8^n hat{f}_{od,n}
            $$

            with
            $$
            hat{f}_{ev} =F_4 cdot f_{ev}, hat{f}_{od} =F_4 cdot f_{od}.
            $$





            We can split $f_{ev}$ as
            $$
            f_{ev}^{ev} = [0,0]^T, f_{ev}^{od} = [0,0]^T,
            $$

            and $f_{od}$ as
            $$
            f_{od}^{ev} = [1,1]^T, f_{od}^{od} = [-1,-1]^T.
            $$

            Therefore,
            $$
            hat{f}_{ev,n} = hat{f}_{ev,n}^{ev} + w_4^n hat{f}_{ev,n}^{od}, hat{f}_{ev,n+2} = hat{f}_{ev,n}^{ev} - w_4^n hat{f}_{ev,n}^{od},
            $$

            $$
            hat{f}_{od,n} = hat{f}_{od,n}^{ev} + w_4^n hat{f}_{od,n}^{od}, hat{f}_{od,n+2} = hat{f}_{od,n}^{ev} - w_4^n hat{f}_{od,n}^{od},
            $$

            with
            $$
            hat{f}_{ev}^{ev} = F_2 {f}_{ev}^{ev}, hat{f}_{ev}^{od} = F_2 {f}_{ev}^{od}, hat{f}_{od}^{ev} = F_2 {f}_{od}^{ev}, hat{f}_{od}^{od} = F_2 {f}_{od}^{od}
            $$





            $$
            F_2 = begin{bmatrix}w_2^0 & w_2^0\w_2^0 & w_2^1end{bmatrix} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix}
            $$

            Therefore, with $w_2 = e^{-2pi i/2}=-1$,
            $$
            hat{f}_{ev}^{ev} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}0 \0 end{bmatrix} = begin{bmatrix}0 \0 end{bmatrix}
            $$

            $$
            hat{f}_{ev}^{od} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}0 \0 end{bmatrix} = begin{bmatrix}0 \0 end{bmatrix}
            $$

            $$
            hat{f}_{od}^{ev} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}1 \1 end{bmatrix} = begin{bmatrix}2 \0 end{bmatrix}
            $$

            $$
            hat{f}_{od}^{od} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}-1 \-1 end{bmatrix} = begin{bmatrix}-2 \0 end{bmatrix}
            $$



            And, with $w_4 = e^{-2pi i/4} = -i$,
            $$
            hat{f}_{ev,0} = 0 + (-i)^0 0 = 0
            $$

            $$
            hat{f}_{ev,1} = 0 + (-i)^1 0 = 0
            $$

            $$
            hat{f}_{ev,2} = 0 - (-i)^0 0=0
            $$

            $$
            hat{f}_{ev,3} = 0 - (-i)^1 0=0
            $$



            $$
            hat{f}_{od,0} = 2 + (-i)^0 (-2) = 0
            $$

            $$
            hat{f}_{od,1} = 0 + (-i)^1 0 = 0
            $$

            $$
            hat{f}_{od,2} = 2 - (-i)^0 (-2) = 4
            $$

            $$
            hat{f}_{od,3} = 0 - (-i)^1 0 = 0
            $$

            Therefore,
            $$
            hat{f}_{ev} = [0,0,0,0]^T, hat{f}_{od} = [0,0,4,0]^T
            $$





            Finally, with $w_8=e^{-2pi i/8} = sqrt{2}/2 - isqrt{2}/2$,
            $$
            hat{f}_0 = hat{f}_{ev,0} + w_8^0 hat{f}_{od,0} = 0
            $$

            $$
            hat{f}_1 = hat{f}_{ev,1} + w_8^1 hat{f}_{od,1} = 0
            $$

            $$
            hat{f}_2 = hat{f}_{ev,2} + w_8^2 hat{f}_{od,2} = 0 + 4(sqrt{2}/2 - isqrt{2}/2)^2=-4i
            $$

            $$
            hat{f}_3 = hat{f}_{ev,3} + w_8^3 hat{f}_{od,3} = 0
            $$

            $$
            hat{f}_4 = hat{f}_{ev,0} - w_8^0 hat{f}_{od,0} = 0
            $$

            $$
            hat{f}_5 = hat{f}_{ev,1} - w_8^1 hat{f}_{od,1} = 0
            $$

            $$
            hat{f}_6 = hat{f}_{ev,2} - w_8^2 hat{f}_{od,2} = 0 - 4(sqrt{2}/2 - isqrt{2}/2)^2 = 4i
            $$

            $$
            hat{f}_7 = hat{f}_{ev,3} - w_8^3 hat{f}_{od,3} = 0
            $$

            Then, the Fourier transform of your signal is
            $$
            hat{f} = [0,0,-4i,0,0,0,4i,0].
            $$






            share|cite|improve this answer











            $endgroup$













              Your Answer





              StackExchange.ifUsing("editor", function () {
              return StackExchange.using("mathjaxEditing", function () {
              StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
              StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
              });
              });
              }, "mathjax-editing");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "69"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              noCode: true, onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3021522%2fhow-to-calculate-8-point-fft-of-data-by-hand%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2












              $begingroup$

              If your signal is $sin(4pi t)$ sampled at $8$ Hz, and you compute the DFT with the formula



              $$ F_k = sum_{0 leq m < n} f_m e^{-i2pifrac{k}{n}{m}} enspace,$$



              you know right away that the DFT is



              $$[0, 0, -4i, 0, 0, 0, 4i, 0]^T enspace. $$



              The coefficients can only be $0$ for frequencies different from $2$ Hz and its conjugate $6$ Hz. The two remaining coefficients must be imaginary and conjugates, because the signal is a sine, with the negative sign coming from the negative sign in $e^{-i2pifrac{k}{n}{m}}$. The $n/2 = 4$ factor is there because there is no "scaling" in the direct transform. (The division is in the inverse transform.)



              Armed with these simple observations, you can transform simple signals for which you know the "recipe" (in this case, one sine wave at $2$ Hz) in a matter of seconds.



              If you've been asked to show the FFT computation, follow @rafa11111's answer, but even then, before you start, you'll find it convenient to know what should come out of the computation.






              share|cite|improve this answer











              $endgroup$


















                2












                $begingroup$

                If your signal is $sin(4pi t)$ sampled at $8$ Hz, and you compute the DFT with the formula



                $$ F_k = sum_{0 leq m < n} f_m e^{-i2pifrac{k}{n}{m}} enspace,$$



                you know right away that the DFT is



                $$[0, 0, -4i, 0, 0, 0, 4i, 0]^T enspace. $$



                The coefficients can only be $0$ for frequencies different from $2$ Hz and its conjugate $6$ Hz. The two remaining coefficients must be imaginary and conjugates, because the signal is a sine, with the negative sign coming from the negative sign in $e^{-i2pifrac{k}{n}{m}}$. The $n/2 = 4$ factor is there because there is no "scaling" in the direct transform. (The division is in the inverse transform.)



                Armed with these simple observations, you can transform simple signals for which you know the "recipe" (in this case, one sine wave at $2$ Hz) in a matter of seconds.



                If you've been asked to show the FFT computation, follow @rafa11111's answer, but even then, before you start, you'll find it convenient to know what should come out of the computation.






                share|cite|improve this answer











                $endgroup$
















                  2












                  2








                  2





                  $begingroup$

                  If your signal is $sin(4pi t)$ sampled at $8$ Hz, and you compute the DFT with the formula



                  $$ F_k = sum_{0 leq m < n} f_m e^{-i2pifrac{k}{n}{m}} enspace,$$



                  you know right away that the DFT is



                  $$[0, 0, -4i, 0, 0, 0, 4i, 0]^T enspace. $$



                  The coefficients can only be $0$ for frequencies different from $2$ Hz and its conjugate $6$ Hz. The two remaining coefficients must be imaginary and conjugates, because the signal is a sine, with the negative sign coming from the negative sign in $e^{-i2pifrac{k}{n}{m}}$. The $n/2 = 4$ factor is there because there is no "scaling" in the direct transform. (The division is in the inverse transform.)



                  Armed with these simple observations, you can transform simple signals for which you know the "recipe" (in this case, one sine wave at $2$ Hz) in a matter of seconds.



                  If you've been asked to show the FFT computation, follow @rafa11111's answer, but even then, before you start, you'll find it convenient to know what should come out of the computation.






                  share|cite|improve this answer











                  $endgroup$



                  If your signal is $sin(4pi t)$ sampled at $8$ Hz, and you compute the DFT with the formula



                  $$ F_k = sum_{0 leq m < n} f_m e^{-i2pifrac{k}{n}{m}} enspace,$$



                  you know right away that the DFT is



                  $$[0, 0, -4i, 0, 0, 0, 4i, 0]^T enspace. $$



                  The coefficients can only be $0$ for frequencies different from $2$ Hz and its conjugate $6$ Hz. The two remaining coefficients must be imaginary and conjugates, because the signal is a sine, with the negative sign coming from the negative sign in $e^{-i2pifrac{k}{n}{m}}$. The $n/2 = 4$ factor is there because there is no "scaling" in the direct transform. (The division is in the inverse transform.)



                  Armed with these simple observations, you can transform simple signals for which you know the "recipe" (in this case, one sine wave at $2$ Hz) in a matter of seconds.



                  If you've been asked to show the FFT computation, follow @rafa11111's answer, but even then, before you start, you'll find it convenient to know what should come out of the computation.







                  share|cite|improve this answer














                  share|cite|improve this answer



                  share|cite|improve this answer








                  edited Dec 1 '18 at 18:20

























                  answered Dec 1 '18 at 18:06









                  Fabio SomenziFabio Somenzi

                  6,41321221




                  6,41321221























                      1












                      $begingroup$

                      Let $f = [0,1,0,-1,0,1,0,-1]^T$ be the sample values and $hat{f}$ be the transformed values. The DFT is given by $hat{f} = F_8 cdot f$, with $F_{8mn} = w_8^{mn}$, $w_8 = e^{-2pi i/8}$.



                      We split the even and the odd components of $f$ as
                      $$
                      f_{ev} = [0,0,0,0]^T, f_{od} = [1,-1,1,-1]^T,
                      $$

                      And $hat{f}$ is given by
                      $$
                      hat{f}_n = hat{f}_{ev,n} + w_8^n hat{f}_{od,n}, hat{f}_{n+4} = hat{f}_{ev,n} - w_8^n hat{f}_{od,n}
                      $$

                      with
                      $$
                      hat{f}_{ev} =F_4 cdot f_{ev}, hat{f}_{od} =F_4 cdot f_{od}.
                      $$





                      We can split $f_{ev}$ as
                      $$
                      f_{ev}^{ev} = [0,0]^T, f_{ev}^{od} = [0,0]^T,
                      $$

                      and $f_{od}$ as
                      $$
                      f_{od}^{ev} = [1,1]^T, f_{od}^{od} = [-1,-1]^T.
                      $$

                      Therefore,
                      $$
                      hat{f}_{ev,n} = hat{f}_{ev,n}^{ev} + w_4^n hat{f}_{ev,n}^{od}, hat{f}_{ev,n+2} = hat{f}_{ev,n}^{ev} - w_4^n hat{f}_{ev,n}^{od},
                      $$

                      $$
                      hat{f}_{od,n} = hat{f}_{od,n}^{ev} + w_4^n hat{f}_{od,n}^{od}, hat{f}_{od,n+2} = hat{f}_{od,n}^{ev} - w_4^n hat{f}_{od,n}^{od},
                      $$

                      with
                      $$
                      hat{f}_{ev}^{ev} = F_2 {f}_{ev}^{ev}, hat{f}_{ev}^{od} = F_2 {f}_{ev}^{od}, hat{f}_{od}^{ev} = F_2 {f}_{od}^{ev}, hat{f}_{od}^{od} = F_2 {f}_{od}^{od}
                      $$





                      $$
                      F_2 = begin{bmatrix}w_2^0 & w_2^0\w_2^0 & w_2^1end{bmatrix} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix}
                      $$

                      Therefore, with $w_2 = e^{-2pi i/2}=-1$,
                      $$
                      hat{f}_{ev}^{ev} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}0 \0 end{bmatrix} = begin{bmatrix}0 \0 end{bmatrix}
                      $$

                      $$
                      hat{f}_{ev}^{od} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}0 \0 end{bmatrix} = begin{bmatrix}0 \0 end{bmatrix}
                      $$

                      $$
                      hat{f}_{od}^{ev} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}1 \1 end{bmatrix} = begin{bmatrix}2 \0 end{bmatrix}
                      $$

                      $$
                      hat{f}_{od}^{od} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}-1 \-1 end{bmatrix} = begin{bmatrix}-2 \0 end{bmatrix}
                      $$



                      And, with $w_4 = e^{-2pi i/4} = -i$,
                      $$
                      hat{f}_{ev,0} = 0 + (-i)^0 0 = 0
                      $$

                      $$
                      hat{f}_{ev,1} = 0 + (-i)^1 0 = 0
                      $$

                      $$
                      hat{f}_{ev,2} = 0 - (-i)^0 0=0
                      $$

                      $$
                      hat{f}_{ev,3} = 0 - (-i)^1 0=0
                      $$



                      $$
                      hat{f}_{od,0} = 2 + (-i)^0 (-2) = 0
                      $$

                      $$
                      hat{f}_{od,1} = 0 + (-i)^1 0 = 0
                      $$

                      $$
                      hat{f}_{od,2} = 2 - (-i)^0 (-2) = 4
                      $$

                      $$
                      hat{f}_{od,3} = 0 - (-i)^1 0 = 0
                      $$

                      Therefore,
                      $$
                      hat{f}_{ev} = [0,0,0,0]^T, hat{f}_{od} = [0,0,4,0]^T
                      $$





                      Finally, with $w_8=e^{-2pi i/8} = sqrt{2}/2 - isqrt{2}/2$,
                      $$
                      hat{f}_0 = hat{f}_{ev,0} + w_8^0 hat{f}_{od,0} = 0
                      $$

                      $$
                      hat{f}_1 = hat{f}_{ev,1} + w_8^1 hat{f}_{od,1} = 0
                      $$

                      $$
                      hat{f}_2 = hat{f}_{ev,2} + w_8^2 hat{f}_{od,2} = 0 + 4(sqrt{2}/2 - isqrt{2}/2)^2=-4i
                      $$

                      $$
                      hat{f}_3 = hat{f}_{ev,3} + w_8^3 hat{f}_{od,3} = 0
                      $$

                      $$
                      hat{f}_4 = hat{f}_{ev,0} - w_8^0 hat{f}_{od,0} = 0
                      $$

                      $$
                      hat{f}_5 = hat{f}_{ev,1} - w_8^1 hat{f}_{od,1} = 0
                      $$

                      $$
                      hat{f}_6 = hat{f}_{ev,2} - w_8^2 hat{f}_{od,2} = 0 - 4(sqrt{2}/2 - isqrt{2}/2)^2 = 4i
                      $$

                      $$
                      hat{f}_7 = hat{f}_{ev,3} - w_8^3 hat{f}_{od,3} = 0
                      $$

                      Then, the Fourier transform of your signal is
                      $$
                      hat{f} = [0,0,-4i,0,0,0,4i,0].
                      $$






                      share|cite|improve this answer











                      $endgroup$


















                        1












                        $begingroup$

                        Let $f = [0,1,0,-1,0,1,0,-1]^T$ be the sample values and $hat{f}$ be the transformed values. The DFT is given by $hat{f} = F_8 cdot f$, with $F_{8mn} = w_8^{mn}$, $w_8 = e^{-2pi i/8}$.



                        We split the even and the odd components of $f$ as
                        $$
                        f_{ev} = [0,0,0,0]^T, f_{od} = [1,-1,1,-1]^T,
                        $$

                        And $hat{f}$ is given by
                        $$
                        hat{f}_n = hat{f}_{ev,n} + w_8^n hat{f}_{od,n}, hat{f}_{n+4} = hat{f}_{ev,n} - w_8^n hat{f}_{od,n}
                        $$

                        with
                        $$
                        hat{f}_{ev} =F_4 cdot f_{ev}, hat{f}_{od} =F_4 cdot f_{od}.
                        $$





                        We can split $f_{ev}$ as
                        $$
                        f_{ev}^{ev} = [0,0]^T, f_{ev}^{od} = [0,0]^T,
                        $$

                        and $f_{od}$ as
                        $$
                        f_{od}^{ev} = [1,1]^T, f_{od}^{od} = [-1,-1]^T.
                        $$

                        Therefore,
                        $$
                        hat{f}_{ev,n} = hat{f}_{ev,n}^{ev} + w_4^n hat{f}_{ev,n}^{od}, hat{f}_{ev,n+2} = hat{f}_{ev,n}^{ev} - w_4^n hat{f}_{ev,n}^{od},
                        $$

                        $$
                        hat{f}_{od,n} = hat{f}_{od,n}^{ev} + w_4^n hat{f}_{od,n}^{od}, hat{f}_{od,n+2} = hat{f}_{od,n}^{ev} - w_4^n hat{f}_{od,n}^{od},
                        $$

                        with
                        $$
                        hat{f}_{ev}^{ev} = F_2 {f}_{ev}^{ev}, hat{f}_{ev}^{od} = F_2 {f}_{ev}^{od}, hat{f}_{od}^{ev} = F_2 {f}_{od}^{ev}, hat{f}_{od}^{od} = F_2 {f}_{od}^{od}
                        $$





                        $$
                        F_2 = begin{bmatrix}w_2^0 & w_2^0\w_2^0 & w_2^1end{bmatrix} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix}
                        $$

                        Therefore, with $w_2 = e^{-2pi i/2}=-1$,
                        $$
                        hat{f}_{ev}^{ev} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}0 \0 end{bmatrix} = begin{bmatrix}0 \0 end{bmatrix}
                        $$

                        $$
                        hat{f}_{ev}^{od} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}0 \0 end{bmatrix} = begin{bmatrix}0 \0 end{bmatrix}
                        $$

                        $$
                        hat{f}_{od}^{ev} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}1 \1 end{bmatrix} = begin{bmatrix}2 \0 end{bmatrix}
                        $$

                        $$
                        hat{f}_{od}^{od} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}-1 \-1 end{bmatrix} = begin{bmatrix}-2 \0 end{bmatrix}
                        $$



                        And, with $w_4 = e^{-2pi i/4} = -i$,
                        $$
                        hat{f}_{ev,0} = 0 + (-i)^0 0 = 0
                        $$

                        $$
                        hat{f}_{ev,1} = 0 + (-i)^1 0 = 0
                        $$

                        $$
                        hat{f}_{ev,2} = 0 - (-i)^0 0=0
                        $$

                        $$
                        hat{f}_{ev,3} = 0 - (-i)^1 0=0
                        $$



                        $$
                        hat{f}_{od,0} = 2 + (-i)^0 (-2) = 0
                        $$

                        $$
                        hat{f}_{od,1} = 0 + (-i)^1 0 = 0
                        $$

                        $$
                        hat{f}_{od,2} = 2 - (-i)^0 (-2) = 4
                        $$

                        $$
                        hat{f}_{od,3} = 0 - (-i)^1 0 = 0
                        $$

                        Therefore,
                        $$
                        hat{f}_{ev} = [0,0,0,0]^T, hat{f}_{od} = [0,0,4,0]^T
                        $$





                        Finally, with $w_8=e^{-2pi i/8} = sqrt{2}/2 - isqrt{2}/2$,
                        $$
                        hat{f}_0 = hat{f}_{ev,0} + w_8^0 hat{f}_{od,0} = 0
                        $$

                        $$
                        hat{f}_1 = hat{f}_{ev,1} + w_8^1 hat{f}_{od,1} = 0
                        $$

                        $$
                        hat{f}_2 = hat{f}_{ev,2} + w_8^2 hat{f}_{od,2} = 0 + 4(sqrt{2}/2 - isqrt{2}/2)^2=-4i
                        $$

                        $$
                        hat{f}_3 = hat{f}_{ev,3} + w_8^3 hat{f}_{od,3} = 0
                        $$

                        $$
                        hat{f}_4 = hat{f}_{ev,0} - w_8^0 hat{f}_{od,0} = 0
                        $$

                        $$
                        hat{f}_5 = hat{f}_{ev,1} - w_8^1 hat{f}_{od,1} = 0
                        $$

                        $$
                        hat{f}_6 = hat{f}_{ev,2} - w_8^2 hat{f}_{od,2} = 0 - 4(sqrt{2}/2 - isqrt{2}/2)^2 = 4i
                        $$

                        $$
                        hat{f}_7 = hat{f}_{ev,3} - w_8^3 hat{f}_{od,3} = 0
                        $$

                        Then, the Fourier transform of your signal is
                        $$
                        hat{f} = [0,0,-4i,0,0,0,4i,0].
                        $$






                        share|cite|improve this answer











                        $endgroup$
















                          1












                          1








                          1





                          $begingroup$

                          Let $f = [0,1,0,-1,0,1,0,-1]^T$ be the sample values and $hat{f}$ be the transformed values. The DFT is given by $hat{f} = F_8 cdot f$, with $F_{8mn} = w_8^{mn}$, $w_8 = e^{-2pi i/8}$.



                          We split the even and the odd components of $f$ as
                          $$
                          f_{ev} = [0,0,0,0]^T, f_{od} = [1,-1,1,-1]^T,
                          $$

                          And $hat{f}$ is given by
                          $$
                          hat{f}_n = hat{f}_{ev,n} + w_8^n hat{f}_{od,n}, hat{f}_{n+4} = hat{f}_{ev,n} - w_8^n hat{f}_{od,n}
                          $$

                          with
                          $$
                          hat{f}_{ev} =F_4 cdot f_{ev}, hat{f}_{od} =F_4 cdot f_{od}.
                          $$





                          We can split $f_{ev}$ as
                          $$
                          f_{ev}^{ev} = [0,0]^T, f_{ev}^{od} = [0,0]^T,
                          $$

                          and $f_{od}$ as
                          $$
                          f_{od}^{ev} = [1,1]^T, f_{od}^{od} = [-1,-1]^T.
                          $$

                          Therefore,
                          $$
                          hat{f}_{ev,n} = hat{f}_{ev,n}^{ev} + w_4^n hat{f}_{ev,n}^{od}, hat{f}_{ev,n+2} = hat{f}_{ev,n}^{ev} - w_4^n hat{f}_{ev,n}^{od},
                          $$

                          $$
                          hat{f}_{od,n} = hat{f}_{od,n}^{ev} + w_4^n hat{f}_{od,n}^{od}, hat{f}_{od,n+2} = hat{f}_{od,n}^{ev} - w_4^n hat{f}_{od,n}^{od},
                          $$

                          with
                          $$
                          hat{f}_{ev}^{ev} = F_2 {f}_{ev}^{ev}, hat{f}_{ev}^{od} = F_2 {f}_{ev}^{od}, hat{f}_{od}^{ev} = F_2 {f}_{od}^{ev}, hat{f}_{od}^{od} = F_2 {f}_{od}^{od}
                          $$





                          $$
                          F_2 = begin{bmatrix}w_2^0 & w_2^0\w_2^0 & w_2^1end{bmatrix} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix}
                          $$

                          Therefore, with $w_2 = e^{-2pi i/2}=-1$,
                          $$
                          hat{f}_{ev}^{ev} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}0 \0 end{bmatrix} = begin{bmatrix}0 \0 end{bmatrix}
                          $$

                          $$
                          hat{f}_{ev}^{od} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}0 \0 end{bmatrix} = begin{bmatrix}0 \0 end{bmatrix}
                          $$

                          $$
                          hat{f}_{od}^{ev} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}1 \1 end{bmatrix} = begin{bmatrix}2 \0 end{bmatrix}
                          $$

                          $$
                          hat{f}_{od}^{od} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}-1 \-1 end{bmatrix} = begin{bmatrix}-2 \0 end{bmatrix}
                          $$



                          And, with $w_4 = e^{-2pi i/4} = -i$,
                          $$
                          hat{f}_{ev,0} = 0 + (-i)^0 0 = 0
                          $$

                          $$
                          hat{f}_{ev,1} = 0 + (-i)^1 0 = 0
                          $$

                          $$
                          hat{f}_{ev,2} = 0 - (-i)^0 0=0
                          $$

                          $$
                          hat{f}_{ev,3} = 0 - (-i)^1 0=0
                          $$



                          $$
                          hat{f}_{od,0} = 2 + (-i)^0 (-2) = 0
                          $$

                          $$
                          hat{f}_{od,1} = 0 + (-i)^1 0 = 0
                          $$

                          $$
                          hat{f}_{od,2} = 2 - (-i)^0 (-2) = 4
                          $$

                          $$
                          hat{f}_{od,3} = 0 - (-i)^1 0 = 0
                          $$

                          Therefore,
                          $$
                          hat{f}_{ev} = [0,0,0,0]^T, hat{f}_{od} = [0,0,4,0]^T
                          $$





                          Finally, with $w_8=e^{-2pi i/8} = sqrt{2}/2 - isqrt{2}/2$,
                          $$
                          hat{f}_0 = hat{f}_{ev,0} + w_8^0 hat{f}_{od,0} = 0
                          $$

                          $$
                          hat{f}_1 = hat{f}_{ev,1} + w_8^1 hat{f}_{od,1} = 0
                          $$

                          $$
                          hat{f}_2 = hat{f}_{ev,2} + w_8^2 hat{f}_{od,2} = 0 + 4(sqrt{2}/2 - isqrt{2}/2)^2=-4i
                          $$

                          $$
                          hat{f}_3 = hat{f}_{ev,3} + w_8^3 hat{f}_{od,3} = 0
                          $$

                          $$
                          hat{f}_4 = hat{f}_{ev,0} - w_8^0 hat{f}_{od,0} = 0
                          $$

                          $$
                          hat{f}_5 = hat{f}_{ev,1} - w_8^1 hat{f}_{od,1} = 0
                          $$

                          $$
                          hat{f}_6 = hat{f}_{ev,2} - w_8^2 hat{f}_{od,2} = 0 - 4(sqrt{2}/2 - isqrt{2}/2)^2 = 4i
                          $$

                          $$
                          hat{f}_7 = hat{f}_{ev,3} - w_8^3 hat{f}_{od,3} = 0
                          $$

                          Then, the Fourier transform of your signal is
                          $$
                          hat{f} = [0,0,-4i,0,0,0,4i,0].
                          $$






                          share|cite|improve this answer











                          $endgroup$



                          Let $f = [0,1,0,-1,0,1,0,-1]^T$ be the sample values and $hat{f}$ be the transformed values. The DFT is given by $hat{f} = F_8 cdot f$, with $F_{8mn} = w_8^{mn}$, $w_8 = e^{-2pi i/8}$.



                          We split the even and the odd components of $f$ as
                          $$
                          f_{ev} = [0,0,0,0]^T, f_{od} = [1,-1,1,-1]^T,
                          $$

                          And $hat{f}$ is given by
                          $$
                          hat{f}_n = hat{f}_{ev,n} + w_8^n hat{f}_{od,n}, hat{f}_{n+4} = hat{f}_{ev,n} - w_8^n hat{f}_{od,n}
                          $$

                          with
                          $$
                          hat{f}_{ev} =F_4 cdot f_{ev}, hat{f}_{od} =F_4 cdot f_{od}.
                          $$





                          We can split $f_{ev}$ as
                          $$
                          f_{ev}^{ev} = [0,0]^T, f_{ev}^{od} = [0,0]^T,
                          $$

                          and $f_{od}$ as
                          $$
                          f_{od}^{ev} = [1,1]^T, f_{od}^{od} = [-1,-1]^T.
                          $$

                          Therefore,
                          $$
                          hat{f}_{ev,n} = hat{f}_{ev,n}^{ev} + w_4^n hat{f}_{ev,n}^{od}, hat{f}_{ev,n+2} = hat{f}_{ev,n}^{ev} - w_4^n hat{f}_{ev,n}^{od},
                          $$

                          $$
                          hat{f}_{od,n} = hat{f}_{od,n}^{ev} + w_4^n hat{f}_{od,n}^{od}, hat{f}_{od,n+2} = hat{f}_{od,n}^{ev} - w_4^n hat{f}_{od,n}^{od},
                          $$

                          with
                          $$
                          hat{f}_{ev}^{ev} = F_2 {f}_{ev}^{ev}, hat{f}_{ev}^{od} = F_2 {f}_{ev}^{od}, hat{f}_{od}^{ev} = F_2 {f}_{od}^{ev}, hat{f}_{od}^{od} = F_2 {f}_{od}^{od}
                          $$





                          $$
                          F_2 = begin{bmatrix}w_2^0 & w_2^0\w_2^0 & w_2^1end{bmatrix} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix}
                          $$

                          Therefore, with $w_2 = e^{-2pi i/2}=-1$,
                          $$
                          hat{f}_{ev}^{ev} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}0 \0 end{bmatrix} = begin{bmatrix}0 \0 end{bmatrix}
                          $$

                          $$
                          hat{f}_{ev}^{od} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}0 \0 end{bmatrix} = begin{bmatrix}0 \0 end{bmatrix}
                          $$

                          $$
                          hat{f}_{od}^{ev} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}1 \1 end{bmatrix} = begin{bmatrix}2 \0 end{bmatrix}
                          $$

                          $$
                          hat{f}_{od}^{od} = begin{bmatrix}1 & 1\ 1 & -1end{bmatrix} begin{bmatrix}-1 \-1 end{bmatrix} = begin{bmatrix}-2 \0 end{bmatrix}
                          $$



                          And, with $w_4 = e^{-2pi i/4} = -i$,
                          $$
                          hat{f}_{ev,0} = 0 + (-i)^0 0 = 0
                          $$

                          $$
                          hat{f}_{ev,1} = 0 + (-i)^1 0 = 0
                          $$

                          $$
                          hat{f}_{ev,2} = 0 - (-i)^0 0=0
                          $$

                          $$
                          hat{f}_{ev,3} = 0 - (-i)^1 0=0
                          $$



                          $$
                          hat{f}_{od,0} = 2 + (-i)^0 (-2) = 0
                          $$

                          $$
                          hat{f}_{od,1} = 0 + (-i)^1 0 = 0
                          $$

                          $$
                          hat{f}_{od,2} = 2 - (-i)^0 (-2) = 4
                          $$

                          $$
                          hat{f}_{od,3} = 0 - (-i)^1 0 = 0
                          $$

                          Therefore,
                          $$
                          hat{f}_{ev} = [0,0,0,0]^T, hat{f}_{od} = [0,0,4,0]^T
                          $$





                          Finally, with $w_8=e^{-2pi i/8} = sqrt{2}/2 - isqrt{2}/2$,
                          $$
                          hat{f}_0 = hat{f}_{ev,0} + w_8^0 hat{f}_{od,0} = 0
                          $$

                          $$
                          hat{f}_1 = hat{f}_{ev,1} + w_8^1 hat{f}_{od,1} = 0
                          $$

                          $$
                          hat{f}_2 = hat{f}_{ev,2} + w_8^2 hat{f}_{od,2} = 0 + 4(sqrt{2}/2 - isqrt{2}/2)^2=-4i
                          $$

                          $$
                          hat{f}_3 = hat{f}_{ev,3} + w_8^3 hat{f}_{od,3} = 0
                          $$

                          $$
                          hat{f}_4 = hat{f}_{ev,0} - w_8^0 hat{f}_{od,0} = 0
                          $$

                          $$
                          hat{f}_5 = hat{f}_{ev,1} - w_8^1 hat{f}_{od,1} = 0
                          $$

                          $$
                          hat{f}_6 = hat{f}_{ev,2} - w_8^2 hat{f}_{od,2} = 0 - 4(sqrt{2}/2 - isqrt{2}/2)^2 = 4i
                          $$

                          $$
                          hat{f}_7 = hat{f}_{ev,3} - w_8^3 hat{f}_{od,3} = 0
                          $$

                          Then, the Fourier transform of your signal is
                          $$
                          hat{f} = [0,0,-4i,0,0,0,4i,0].
                          $$







                          share|cite|improve this answer














                          share|cite|improve this answer



                          share|cite|improve this answer








                          edited Dec 1 '18 at 17:47

























                          answered Dec 1 '18 at 17:28









                          rafa11111rafa11111

                          1,106417




                          1,106417






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Mathematics Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              Use MathJax to format equations. MathJax reference.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3021522%2fhow-to-calculate-8-point-fft-of-data-by-hand%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Probability when a professor distributes a quiz and homework assignment to a class of n students.

                              Aardman Animations

                              Are they similar matrix