{"id":319,"date":"2010-03-18T12:57:05","date_gmt":"2010-03-18T16:57:05","guid":{"rendered":"https:\/\/blogs.mathworks.com\/steve\/2010\/03\/18\/no-units-in-the-dtft\/"},"modified":"2019-10-29T13:24:22","modified_gmt":"2019-10-29T17:24:22","slug":"no-units-in-the-dtft","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/steve\/2010\/03\/18\/no-units-in-the-dtft\/","title":{"rendered":"No units in the DTFT"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <p>OysterEngineer (I love that name!) <a href=\"https:\/\/blogs.mathworks.com\/steve\/2010\/03\/15\/the-dft-and-the-dtft\/#comment-22862\">asked some interesting questions<\/a> in response to my <a href=\"https:\/\/blogs.mathworks.com\/steve\/2010\/03\/15\/the-dft-and-the-dtft\/\">last Fourier transform post<\/a>, which concerned the relationship between the discrete-time Fourier transform (DTFT) and the discrete Fourier transform (DFT).\r\n   <\/p>\r\n   <p>I'd like to first tackle OE's comments about units. Or, more specifically, the lack of units in my DTFT plots, such as this\r\n      one:\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/dft_samples_dtft_01.png\"> <\/p>\r\n   <p>OE guesses that the units for my unlabeled horizontal axis above are radians\/second.<\/p>\r\n   <p>The DTFT is unitless; there are no units of time or frequency. If I were going to label the horizontal axis, I would label\r\n      it \"radians.\"  Because it is harder than it should be in MATLAB to label an axis in fractions of <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/no_units_in_dtft_eq11731.png\"> , I might do it like this:\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">M = 8;\r\nw = linspace(-2*pi, 2*pi, 800);\r\nX_dtft = (sin(w*M\/2) .\/ sin(w\/2)) .* exp(-1j * w * (M-1) \/ 2);\r\nplot(w\/pi, abs(X_dtft))\r\ntitle(<span style=\"color: #A020F0\">'|X(\\omega)|'<\/span>)\r\nxlabel(<span style=\"color: #A020F0\">'\\omega (radians\/\\pi)'<\/span>)<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/no_units_in_dtft_01.png\"> <p>There is a scaling relationship between <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/no_units_in_dtft_eq84050.png\">  (radians) of the DTFT and the physical frequency <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/no_units_in_dtft_eq17683.png\">  (radians\/second or Hz). I mentioned (cryptically) this scaling relationship in my <a href=\"https:\/\/blogs.mathworks.com\/steve\/2010\/01\/18\/relationship-between-continuous-time-and-discrete-time-fourier-transforms\/\">post on the relationship between the DTFT and continuous-time Fourier transform<\/a>, but I did not really explain it very well.\r\n   <\/p>\r\n   <p>Here's how I recommend that you remember it: <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/no_units_in_dtft_eq80022.png\">  corresponds to the sampling frequency, and <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/no_units_in_dtft_eq98833.png\">  corresponds to half the sampling frequency.  If the sampling frequency is 4 kHz, then <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/no_units_in_dtft_eq98833.png\">  corresponds to the physical frequency 2 kHz.\r\n   <\/p>\r\n   <p>I learned digital signal processing (DSP) theory beginning in my senior year at Georgia Tech in 1986 and continuing through\r\n      my graduate studies there.  My impression is that a significant notational shift was occurring at around that time in DSP.\r\n       You could see this shift in two books by Oppenheim and Schafer written at different times.  In my first graduate DSP course\r\n      in 1987 we used the book <a href=\"http:\/\/www.amazon.com\/Digital-Signal-Processing-Alan-Oppenheim\/dp\/0132146355\/\"><i>Digital Signal Processing<\/i><\/a>, which was published in 1975.  In the 1970s, DSP notation was all about sampled systems and Fourier transforms and Fourier\r\n      series, virtually every equation was filled with T and Fs terms, and there was nothing called the discrete-time Fourier transform.\r\n   <\/p>\r\n   <p>But later in my graduate studies I earned spare change by writing a couple of chapters of the solutions manual for the first\r\n      edition of <a href=\"http:\/\/www.amazon.com\/Discrete-Time-Signal-Processing-Prentice-Hall\/dp\/0131988425\/\"><i>Discrete-Time Signal Processing<\/i><\/a> by the same authors.  In this book the discrete-time Fourier transform is fundamental and very few of the equations in the\r\n      book have T and Fs terms.  Notationally this is <b>much<\/b> more convenient. The mathematics of designing a half-band lowpass filter are identical whether your sampling frequency is\r\n      4 kHz or 200 GHz.\r\n   <\/p>\r\n   <p>But it does mean that you have to remember what <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/steve\/2010\/no_units_in_dtft_eq11731.png\">  means when you're looking at a DTFT plot.\r\n   <\/p>\r\n   <p>I will try to be more careful in the future in labeling my plots.<\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_494a608dca0b4a53ba039adaa5905e49() {\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='494a608dca0b4a53ba039adaa5905e49 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 494a608dca0b4a53ba039adaa5905e49';\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_494a608dca0b4a53ba039adaa5905e49()\"><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\n494a608dca0b4a53ba039adaa5905e49 ##### SOURCE BEGIN #####\r\n%%\r\n% OysterEngineer (I love that name!) \r\n% <https:\/\/blogs.mathworks.com\/steve\/2010\/03\/15\/the-dft-and-the-dtft\/#comment-22862 \r\n% asked some interesting questions> in\r\n% response to my <https:\/\/blogs.mathworks.com\/steve\/2010\/03\/15\/the-dft-and-the-dtft\/ \r\n% last Fourier transform post>, which concerned the relationship between the\r\n% discrete-time Fourier transform (DTFT) and the discrete Fourier transform\r\n% (DFT).\r\n%\r\n% I'd like to first tackle OE's comments about units. Or, more specifically, the\r\n% lack of units in my DTFT plots, such as this one:\r\n%\r\n% <<https:\/\/blogs.mathworks.com\/images\/steve\/2010\/dft_samples_dtft_01.png>>\r\n%\r\n% OE guesses that the units for my unlabeled horizontal axis above are\r\n% radians\/second.\r\n%\r\n% The DTFT is unitless; there are no units of time or frequency. If I were going\r\n% to label the horizontal axis, I would label it \"radians.\"  Because it is\r\n% harder than it should be in MATLAB to label an axis in fractions of $\\pi$, I\r\n% might do it like this:\r\n\r\nM = 8;\r\nw = linspace(-2*pi, 2*pi, 800);\r\nX_dtft = (sin(w*M\/2) .\/ sin(w\/2)) .* exp(-1j * w * (M-1) \/ 2);\r\nplot(w\/pi, abs(X_dtft))\r\ntitle('|X(\\omega)|')\r\nxlabel('\\omega (radians\/\\pi)')\r\n\r\n%%\r\n% There is a scaling relationship between $\\omega$ (radians) of the DTFT\r\n% and the physical frequency $\\Omega$ (radians\/second or Hz). I mentioned (cryptically) this\r\n% scaling relationship in my \r\n% <https:\/\/blogs.mathworks.com\/steve\/2010\/01\/18\/relationship-between-continuous-time-and-discrete-time-fourier-transforms\/ \r\n% post on the relationship between the DTFT and\r\n% continuous-time Fourier transform>, but I did not really explain it very well.\r\n%\r\n% Here's how I recommend that you remember it: $\\omega=2\\pi$ corresponds to the sampling\r\n% frequency, and $\\omega=\\pi$ corresponds to half the sampling \r\n% frequency.  If the sampling frequency is 4 kHz, then $\\omega=\\pi$ corresponds\r\n% to the physical frequency 2 kHz.\r\n%\r\n% I learned digital signal processing (DSP) theory beginning in my senior year at Georgia\r\n% Tech in 1986 and continuing through my graduate studies there.  My impression\r\n% is that a significant notational shift was occurring at around that time in DSP.  You\r\n% could see this shift in two books by Oppenheim and Schafer written at\r\n% different times.  In my first graduate DSP course in 1987 we used the book\r\n% <http:\/\/www.amazon.com\/Digital-Signal-Processing-Alan-Oppenheim\/dp\/0132146355\/ \r\n% _Digital Signal Processing_>, which was published in 1975.  In the 1970s, DSP\r\n% notation was all about sampled systems and Fourier transforms and Fourier\r\n% series, virtually every equation was filled with T and Fs terms, and there was\r\n% nothing called the discrete-time Fourier transform.\r\n%\r\n% But later in my graduate studies I earned spare change by writing a couple of\r\n% chapters of the solutions manual for the first edition of \r\n% <http:\/\/www.amazon.com\/Discrete-Time-Signal-Processing-Prentice-Hall\/dp\/0131988425\/ \r\n% _Discrete-Time Signal Processing_> by the same authors.  In this book the\r\n% discrete-time Fourier transform is fundamental and very few of the equations\r\n% in the book have T and Fs terms.  Notationally this is *much* more convenient.\r\n% The mathematics of designing a half-band lowpass filter are identical whether\r\n% your sampling frequency is 4 kHz or 200 GHz.\r\n%\r\n% But it does mean that you have to remember what $\\pi$ means when you're\r\n% looking at a DTFT plot.\r\n%\r\n% I will try to be more careful in the future in labeling my plots.\r\n\r\n##### SOURCE END ##### 494a608dca0b4a53ba039adaa5905e49\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   OysterEngineer (I love that name!) asked some interesting questions in response to my last Fourier transform post, which concerned the relationship between the discrete-time Fourier transform... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/steve\/2010\/03\/18\/no-units-in-the-dtft\/\">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":[208,508,32,532,68,34,52,94],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/319"}],"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=319"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/319\/revisions"}],"predecessor-version":[{"id":3671,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/319\/revisions\/3671"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media?parent=319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/categories?post=319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/tags?post=319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}