{"id":330,"date":"2010-05-27T14:14:47","date_gmt":"2010-05-27T18:14:47","guid":{"rendered":"https:\/\/blogs.mathworks.com\/steve\/2010\/05\/27\/negative-frequencies\/"},"modified":"2019-10-29T13:28:34","modified_gmt":"2019-10-29T17:28:34","slug":"negative-frequencies","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/steve\/2010\/05\/27\/negative-frequencies\/","title":{"rendered":"Negative frequencies"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <p>I <a href=\"https:\/\/blogs.mathworks.com\/steve\/2010\/05\/10\/fourier-transforms-where-to-go-from-here\/\">recently asked for your advice<\/a> about how to continue my <a href=\"https:\/\/blogs.mathworks.com\/steve\/category\/fourier-transforms\/\">Fourier transform series<\/a>. I appreciate all the enthusiastic and helpful responses. I'd like to continue focusing on some basic points that confuse\r\n      folks who don't have an extensive signal processing background:\r\n   <\/p>\r\n   <div>\r\n      <ul>\r\n         <li>Negative frequencies<\/li>\r\n         <li>Use of fftshift<\/li>\r\n         <li>Complex-valued outputs from fft function<\/li>\r\n         <li>DTFT plotting procedure<\/li>\r\n         <li>Physical units on DTFT plots<\/li>\r\n         <li>Revisit two-dimensional frequency domain visualization for images<\/li>\r\n         <li>Significance of frequency-domain phase for images<\/li>\r\n         <li>Two-image magnitude-phase swapping experiment<\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <p>I will leave the more advanced signal processing topics for a later time.<\/p>\r\n   <p>Now, onto negative frequencies. Here are the plots of a cosine signal and its continuous-time Fourier transform (reproduced\r\n      from my <a href=\"https:\/\/blogs.mathworks.com\/steve\/2009\/12\/11\/continuous-time-fourier-transform-basics\/\">December 11, 2009 post.<\/a>)\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2009\/cos_t.png\"> <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2009\/F_cos_t.png\"> <\/p>\r\n   <p>What's that impulse at -1 all about, anyway?<\/p>\r\n   <p>Imagine that you gathered 10 people, all knowledgeable about signal processing and Fourier transforms, into a room and asked\r\n      them to explain about negative frequencies.  It is a well-established fact that you will get 27.4 different explanations.\r\n       And three of the experts will get into a shouting match over which explanations are correct.  (This experiment can be dangerous;\r\n      please don't try it at home.)\r\n   <\/p>\r\n   <p>So it is with some trepidation that I offer you a couple of different ways to think about negative frequencies.<\/p>\r\n   <p>1. Let's start with a simple cosine signal, <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/negative_frequencies_eq67681.png\"> . The frequency <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/negative_frequencies_eq17683.png\">  can be positive or negative (e.g., <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/negative_frequencies_eq08721.png\">  or <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/negative_frequencies_eq93039.png\"> ). This is a useful distinction to make.  (Is that wheel thingy turning forward or backward?)\r\n   <\/p>\r\n   <p>2. The Fourier transform uses a kind of complex exponential signal for its basis functions, not real-valued sinusoids. The\r\n      complex exponential used is <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/negative_frequencies_eq68252.png\"> , where <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/negative_frequencies_eq29182.png\">  (as all electrical engineers know), real-valued <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/negative_frequencies_eq84050.png\">  is the frequency in radians per second, and <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/negative_frequencies_eq07064.png\">  is time. This function is related to the real-valued cosine and sine functions as follows:\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/negative_frequencies_eq27816.png\"> <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/negative_frequencies_eq50499.png\"> <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/negative_frequencies_eq46528.png\"> <\/p>\r\n   <p>So you can see that when you express <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/negative_frequencies_eq88919.png\">  in terms of complex exponentials, there is both a positive frequency and a negative frequency term.\r\n   <\/p>\r\n   <p>3. Finally, if you think the whole idea of complex-valued time-domain signals is just weird, they are actually quite useful\r\n      in many domains. In the area of communications, for example, some systems transmit information as two different signals (the\r\n      in-phase component and the quadrature-phase component). It is very convenient to model these signals mathematically as the\r\n      real and imaginary parts of a single complex-valued signal. These complex-valued signals might have only positive (or only\r\n      negative) frequency components.\r\n   <\/p>\r\n   <p>Do you have your own favorite way to explain negative frequencies? Please share it with us here by posting a comment.<\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_5238382d446b4a98ae1bc49dd3c30287() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='5238382d446b4a98ae1bc49dd3c30287 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 5238382d446b4a98ae1bc49dd3c30287';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Steve Eddins';\r\n        copyright = 'Copyright 2010 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \r\n-->\r\n<\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_5238382d446b4a98ae1bc49dd3c30287()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; 7.10<br><\/p>\r\n<\/div>\r\n<!--\r\n5238382d446b4a98ae1bc49dd3c30287 ##### SOURCE BEGIN #####\r\n%%\r\n% I \r\n% <https:\/\/blogs.mathworks.com\/steve\/2010\/05\/10\/fourier-transforms-where-to-go-from-here\/ \r\n% recently asked for your advice> about how to continue my \r\n% <https:\/\/blogs.mathworks.com\/steve\/category\/fourier-transforms\/ Fourier transform\r\n% series>. I appreciate all the enthusiastic and helpful responses. I'd like to\r\n% continue focusing on some basic points that confuse folks who don't have an\r\n% extensive signal processing background: \r\n%\r\n% * Negative frequencies\r\n% * Use of fftshift\r\n% * Complex-valued outputs from fft function\r\n% * DTFT plotting procedure\r\n% * Physical units on DTFT plots\r\n% * Revisit two-dimensional frequency domain visualization for images\r\n% * Significance of frequency-domain phase for images\r\n% * Two-image magnitude-phase swapping experiment\r\n%\r\n% I will leave the more advanced signal processing topics for a later time.\r\n%\r\n% Now, onto negative frequencies. Here are the plots of a cosine signal and its\r\n% continuous-time Fourier transform (reproduced from my\r\n% <https:\/\/blogs.mathworks.com\/steve\/2009\/12\/11\/continuous-time-fourier-transform-basics\/ December 11, 2009 post.>)\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/steve\/2009\/cos_t.png>>\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/steve\/2009\/F_cos_t.png>>\r\n%\r\n% What's that impulse at -1 all about, anyway?\r\n%\r\n% Imagine that you gathered 10 people, all knowledgeable about signal processing and\r\n% Fourier transforms, into a room and asked them to explain about negative\r\n% frequencies.  It is a well-established fact that you will get 27.4 different\r\n% explanations.  And three of the experts will get into a shouting match over\r\n% which explanations are correct.  (This experiment can be dangerous; please\r\n% don't try it at home.)\r\n%\r\n% So it is with some trepidation that I offer you a couple of different ways to think\r\n% about negative frequencies.\r\n%\r\n% 1. Let's start with a simple cosine signal, $y(t) = \\cos(\\Omega t)$. The\r\n% frequency $\\Omega$ can be positive or negative (e.g., $2\\pi 60$ or $-2\\pi\r\n% 60$). This is a useful distinction to make.  (Is that wheel thingy turning\r\n% forward or backward?)\r\n%\r\n% 2. The Fourier transform uses a kind of complex exponential signal for its basis\r\n% functions, not real-valued sinusoids. The complex exponential used is\r\n% $e^{j\\omega t}$, where $j=\\sqrt{-1}$ (as all electrical engineers know), real-valued $\\omega$ is the frequency \r\n% in radians per second, and $t$ is time. This function is related to the\r\n% real-valued cosine and sine functions as follows:\r\n%\r\n% $$e^{j\\omega t} = \\cos(\\omega t) + j \\sin(\\omega t)$$\r\n%\r\n% $$cos(\\omega t) = \\frac{1}{2} e^{j\\omega t} + \\frac{1}{2} e^{-j\\omega t}$$\r\n%\r\n% $$sin(\\omega t) = \\frac{1}{2j} e^{j\\omega t} - \\frac{1}{2j} e^{-j\\omega t}$$\r\n%\r\n% So you can see that when you express $\\cos(\\omega t)$ in terms of complex\r\n% exponentials, there is both a positive frequency and a negative frequency\r\n% term.\r\n%\r\n% 3. Finally, if you think the whole idea of complex-valued time-domain signals\r\n% is just weird, they are actually quite useful in many domains. In the area of\r\n% communications, for example, some systems transmit information as two\r\n% different signals (the in-phase component and the\r\n% quadrature-phase component). It is very convenient to model these signals\r\n% mathematically as the real and imaginary parts of a single complex-valued\r\n% signal. These complex-valued signals might have only positive (or only\r\n% negative) frequency components. \r\n%\r\n% Do you have your own favorite way to explain negative frequencies? Please\r\n% share it with us here by posting a comment.\r\n##### SOURCE END ##### 5238382d446b4a98ae1bc49dd3c30287\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   I recently asked for your advice about how to continue my Fourier transform series. I appreciate all the enthusiastic and helpful responses. I'd like to continue focusing on some basic points... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/steve\/2010\/05\/27\/negative-frequencies\/\">read more >><\/a><\/p>","protected":false},"author":42,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[20],"tags":[400],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/330"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/comments?post=330"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/330\/revisions"}],"predecessor-version":[{"id":3683,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/330\/revisions\/3683"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media?parent=330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/categories?post=330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/tags?post=330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}