DFT zero-padding of signals starting before n=0












1












$begingroup$


If a signal starts before n=0, what part of the signal should be used to compute DFT after zero-padding? For example, x(n) = {1, 2, 3, 4, 5}, where x(-2) = 1 and x(0) = 3. If this signal is zero-padded to N=8, the new signal would be x'(n) = {1, 2, 3, 4, 5, 0, 0, 0}, where, again, x'(-2) = 1 and x'(0)=3. However, to compute the DFT of this zero-padded signal x'(0), should I use {1, 2, 3, 4, 5, 0, 0 , 0}, which starts with x'(-2), or should I use {3, 4, 5, 0, 0, 0, 1, 2}, which starts with x'(0) with the first few terms (n<0) folded over? In terms of the DFT X(k), I think its magnitude would be the same for the two approaches, but its phase would be different, right?










share|improve this question







New contributor




tony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$












  • $begingroup$
    but remember, since the DFT is circular, you can zero pad it on either end (or both ends) and the only difference in the DFT result will be a linear phase term corresponding to a rotation or circular-shift.
    $endgroup$
    – robert bristow-johnson
    45 mins ago
















1












$begingroup$


If a signal starts before n=0, what part of the signal should be used to compute DFT after zero-padding? For example, x(n) = {1, 2, 3, 4, 5}, where x(-2) = 1 and x(0) = 3. If this signal is zero-padded to N=8, the new signal would be x'(n) = {1, 2, 3, 4, 5, 0, 0, 0}, where, again, x'(-2) = 1 and x'(0)=3. However, to compute the DFT of this zero-padded signal x'(0), should I use {1, 2, 3, 4, 5, 0, 0 , 0}, which starts with x'(-2), or should I use {3, 4, 5, 0, 0, 0, 1, 2}, which starts with x'(0) with the first few terms (n<0) folded over? In terms of the DFT X(k), I think its magnitude would be the same for the two approaches, but its phase would be different, right?










share|improve this question







New contributor




tony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$












  • $begingroup$
    but remember, since the DFT is circular, you can zero pad it on either end (or both ends) and the only difference in the DFT result will be a linear phase term corresponding to a rotation or circular-shift.
    $endgroup$
    – robert bristow-johnson
    45 mins ago














1












1








1





$begingroup$


If a signal starts before n=0, what part of the signal should be used to compute DFT after zero-padding? For example, x(n) = {1, 2, 3, 4, 5}, where x(-2) = 1 and x(0) = 3. If this signal is zero-padded to N=8, the new signal would be x'(n) = {1, 2, 3, 4, 5, 0, 0, 0}, where, again, x'(-2) = 1 and x'(0)=3. However, to compute the DFT of this zero-padded signal x'(0), should I use {1, 2, 3, 4, 5, 0, 0 , 0}, which starts with x'(-2), or should I use {3, 4, 5, 0, 0, 0, 1, 2}, which starts with x'(0) with the first few terms (n<0) folded over? In terms of the DFT X(k), I think its magnitude would be the same for the two approaches, but its phase would be different, right?










share|improve this question







New contributor




tony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




If a signal starts before n=0, what part of the signal should be used to compute DFT after zero-padding? For example, x(n) = {1, 2, 3, 4, 5}, where x(-2) = 1 and x(0) = 3. If this signal is zero-padded to N=8, the new signal would be x'(n) = {1, 2, 3, 4, 5, 0, 0, 0}, where, again, x'(-2) = 1 and x'(0)=3. However, to compute the DFT of this zero-padded signal x'(0), should I use {1, 2, 3, 4, 5, 0, 0 , 0}, which starts with x'(-2), or should I use {3, 4, 5, 0, 0, 0, 1, 2}, which starts with x'(0) with the first few terms (n<0) folded over? In terms of the DFT X(k), I think its magnitude would be the same for the two approaches, but its phase would be different, right?







dft zero-padding






share|improve this question







New contributor




tony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




tony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




tony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 6 hours ago









tonytony

82




82




New contributor




tony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





tony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






tony is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • $begingroup$
    but remember, since the DFT is circular, you can zero pad it on either end (or both ends) and the only difference in the DFT result will be a linear phase term corresponding to a rotation or circular-shift.
    $endgroup$
    – robert bristow-johnson
    45 mins ago


















  • $begingroup$
    but remember, since the DFT is circular, you can zero pad it on either end (or both ends) and the only difference in the DFT result will be a linear phase term corresponding to a rotation or circular-shift.
    $endgroup$
    – robert bristow-johnson
    45 mins ago
















$begingroup$
but remember, since the DFT is circular, you can zero pad it on either end (or both ends) and the only difference in the DFT result will be a linear phase term corresponding to a rotation or circular-shift.
$endgroup$
– robert bristow-johnson
45 mins ago




$begingroup$
but remember, since the DFT is circular, you can zero pad it on either end (or both ends) and the only difference in the DFT result will be a linear phase term corresponding to a rotation or circular-shift.
$endgroup$
– robert bristow-johnson
45 mins ago










1 Answer
1






active

oldest

votes


















3












$begingroup$

Use the second one Tony... It yields the correct implied phase relationship.






share|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: "295"
    };
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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
    });


    }
    });






    tony is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdsp.stackexchange.com%2fquestions%2f55139%2fdft-zero-padding-of-signals-starting-before-n-0%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3












    $begingroup$

    Use the second one Tony... It yields the correct implied phase relationship.






    share|improve this answer









    $endgroup$


















      3












      $begingroup$

      Use the second one Tony... It yields the correct implied phase relationship.






      share|improve this answer









      $endgroup$
















        3












        3








        3





        $begingroup$

        Use the second one Tony... It yields the correct implied phase relationship.






        share|improve this answer









        $endgroup$



        Use the second one Tony... It yields the correct implied phase relationship.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 6 hours ago









        Fat32Fat32

        14.8k31229




        14.8k31229






















            tony is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            tony is a new contributor. Be nice, and check out our Code of Conduct.













            tony is a new contributor. Be nice, and check out our Code of Conduct.












            tony is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Signal Processing 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%2fdsp.stackexchange.com%2fquestions%2f55139%2fdft-zero-padding-of-signals-starting-before-n-0%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

            الفوسفات في المغرب

            Four equal circles intersect: What is the area of the small shaded portion and its height

            جامعة ليفربول