{"id":312,"date":"2010-01-18T20:50:59","date_gmt":"2010-01-18T20:50:59","guid":{"rendered":"https:\/\/blogs.mathworks.com\/steve\/2010\/01\/18\/relationship-between-continuous-time-and-discrete-time-fourier-transforms\/"},"modified":"2010-03-02T13:16:36","modified_gmt":"2010-03-02T13:16:36","slug":"relationship-between-continuous-time-and-discrete-time-fourier-transforms","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/steve\/2010\/01\/18\/relationship-between-continuous-time-and-discrete-time-fourier-transforms\/","title":{"rendered":"Relationship between continuous-time and discrete-time Fourier transforms"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <p>Previously in my <a href=\"https:\/\/blogs.mathworks.com\/steve\/category\/fourier-transforms\/\">Fourier transforms series<\/a> I've talked about the continuous-time Fourier transform and the discrete-time Fourier transform. Today it's time to start\r\n      talking about the relationship between these two.\r\n   <\/p>\r\n   <p>Let's start with the idea of <i>sampling<\/i> a continuous-time signal, as shown in this graph:\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_sampling.png\"> <\/p>\r\n   <p>Mathematically, the relationship between the discrete-time signal and the continuous-time signal is given by:<\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq97429.png\"> <\/p>\r\n   <p>(When I write equations involving both continuous-time and discrete-time quantities, I will sometimes use a subscript \"c\"\r\n      to distinguish them.)\r\n   <\/p>\r\n   <p>The <i>sampling frequency<\/i> is <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq17384.png\">  (in Hz) or <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq99007.png\">  (in radians per second).\r\n   <\/p>\r\n   <p>The discrete-time Fourier transform of <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq17606.png\">  is related to the continuous-time Fourier transform of <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq38695.png\">  as follows:\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq40143.png\"> <\/p>\r\n   <p>But what does that mean? There are two key pieces to this equation. The first is a scaling relationship between <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq84050.png\">  and <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq17683.png\"> : <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq22903.png\"> . This means that the sampling frequency in the continuous-time Fourier transform, <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq97000.png\"> , becomes the frequency <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq03041.png\">  in the discrete-time Fourier transform. The discrete-time frequency <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq98833.png\">  corresponds to half the sampling frequency, or <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq21995.png\"> .\r\n   <\/p>\r\n   <p>The second key piece of the equation is that there are an infinite number of copies of <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq14026.png\">  spaced by <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq03041.png\"> .\r\n   <\/p>\r\n   <p>Let's look at a graphical example.  Suppose <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq43622.png\">  looks like this:\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_ctft_example.png\"> <\/p>\r\n   <p>Note that <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq43622.png\">  equals zero for all frequencies <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq91957.png\"> .  This is what we mean when we say a continuous-time signal is <i>band-limited<\/i>.  The frequency <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq42343.png\">  is called the <i>bandwidth<\/i> of the signal.\r\n   <\/p>\r\n   <p>The discrete-time Fourier transform of <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq97429.png\">  looks like this:\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_dtft_example.png\"> <\/p>\r\n   <p>where <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq80664.png\"> . As I mentioned before, normally only one period of <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq30711.png\">  is shown:\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_dtft_example_one_period.png\"> <\/p>\r\n   <p>For this example, then, <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq30711.png\">  between <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq11410.png\">  and <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq11731.png\">  looks just like a scaled version of <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq43622.png\"> .\r\n   <\/p>\r\n   <p>Next time we'll consider what happens when <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq30711.png\">  <b>doesn't<\/b> look like <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_eq43622.png\"> .  In other words, we're about to tackle <i>aliasing<\/i>.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_f5d79caeb95b4ce0b1e45d7acd3f8b30() {\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='f5d79caeb95b4ce0b1e45d7acd3f8b30 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' f5d79caeb95b4ce0b1e45d7acd3f8b30';\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 = '';\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_f5d79caeb95b4ce0b1e45d7acd3f8b30()\"><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.9<br><\/p>\r\n<\/div>\r\n<!--\r\nf5d79caeb95b4ce0b1e45d7acd3f8b30 ##### SOURCE BEGIN #####\r\n%%\r\n% Previously in my <https:\/\/blogs.mathworks.com\/steve\/category\/fourier-transforms\/ \r\n% Fourier transforms series> I've talked about the\r\n% continuous-time Fourier transform and the discrete-time Fourier transform.\r\n% Today it's time to start talking about the relationship between these two.\r\n%\r\n% Let's start with the idea of _sampling_ a continuous-time signal, as shown in\r\n% this graph:\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_sampling.png>>\r\n%\r\n% Mathematically, the relationship between the discrete-time signal and the\r\n% continuous-time signal is given by:\r\n%\r\n% $x[n] = x_c(nT)$\r\n%\r\n% (When I write equations involving both continuous-time and discrete-time\r\n% quantities, I will sometimes use a subscript \"c\" to distinguish them.)\r\n%\r\n% The _sampling frequency_ is $f_s = 1\/T$ (in Hz) or $\\Omega_s = 2\\pi\/T$ (in\r\n% radians per second).\r\n%\r\n% The discrete-time Fourier transform of $x[n]$ is related to the\r\n% continuous-time Fourier transform of $x_c(t)$ as follows:\r\n%\r\n% $$X(\\omega) = \\frac{1}{T} \\sum_{k=-\\infty}^{\\infty} X_c\\left(\\frac{\\omega}{T} + \\frac{2\\pi\r\n% k}{T}\\right)$$\r\n%\r\n% But what does that mean? There are two key pieces to this equation. The first\r\n% is a scaling relationship between $\\omega$ and $\\Omega$: $\\omega = \\Omega T$.\r\n% This means that the sampling frequency in the continuous-time Fourier\r\n% transform, $\\Omega_s$, becomes the frequency $2\\pi$ in the discrete-time\r\n% Fourier transform. The discrete-time frequency $\\omega=\\pi$ corresponds to\r\n% half the sampling frequency, or $\\Omega_s\/2$.\r\n%\r\n% The second key piece of the equation is that there are an infinite number of copies of\r\n% $X_c(\\omega\/T)$ spaced by $2\\pi$.\r\n%\r\n% Let's look at a graphical example.  Suppose $X_c(\\Omega)$ looks like this:\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_ctft_example.png>>\r\n%\r\n% Note that $X_c(\\Omega)$ equals zero for all frequencies $|\\Omega| \\geq\r\n% \\Omega_0$.  This is what we mean when we say a continuous-time signal is\r\n% _band-limited_.  The frequency $\\Omega_0$ is called the _bandwidth_ of the signal.\r\n%\r\n% The discrete-time Fourier transform of $x[n] = x_c(nT)$ looks like this:\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_dtft_example.png>>\r\n%\r\n% where $\\omega_0 = \\Omega_0 T$. As I mentioned before, normally only one period of $X(\\omega)$ is shown:\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/steve\/2010\/cft_dtft_relationship_dtft_example_one_period.png>>\r\n%\r\n% For this example, then, $X(\\omega)$ between $-\\pi$ and $\\pi$ looks just like a\r\n% scaled version of $X_c(\\Omega)$.\r\n%\r\n% Next time we'll consider what happens when $X(\\omega)$ *doesn't* look like\r\n% $X_c(\\Omega)$.  In other words, we're about to tackle _aliasing_.\r\n\r\n##### SOURCE END ##### f5d79caeb95b4ce0b1e45d7acd3f8b30\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   Previously in my Fourier transforms series I've talked about the continuous-time Fourier transform and the discrete-time Fourier transform. Today it's time to start\r\n      talking about the... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/steve\/2010\/01\/18\/relationship-between-continuous-time-and-discrete-time-fourier-transforms\/\">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":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/312"}],"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=312"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/312\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media?parent=312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/categories?post=312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/tags?post=312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}