{"id":5676,"date":"2019-09-17T13:20:03","date_gmt":"2019-09-17T11:20:03","guid":{"rendered":"http:\/\/www.tonmeister.ca\/wordpress\/?p=5676"},"modified":"2019-09-17T13:43:52","modified_gmt":"2019-09-17T11:43:52","slug":"dfts-part-6-windowing-artefacts","status":"publish","type":"post","link":"https:\/\/www.tonmeister.ca\/wordpress\/2019\/09\/17\/dfts-part-6-windowing-artefacts\/","title":{"rendered":"DFT&#8217;s Part 6: Windowing artefacts"},"content":{"rendered":"\n<p>Links to:<br><a href=\"https:\/\/www.tonmeister.ca\/wordpress\/2019\/08\/08\/dfts-part-1-some-introductory-basics\/\">DFT\u2019s Part 1: Some introductory basics<\/a><br><a href=\"https:\/\/www.tonmeister.ca\/wordpress\/2019\/08\/12\/dfts-part-2-its-a-little-complex\/\">DFT\u2019s Part 2: It\u2019s a little complex\u2026<\/a><br><a href=\"https:\/\/www.tonmeister.ca\/wordpress\/2019\/08\/19\/dfts-part-3-the-math\/\">DFT\u2019s Part 3: The Math<\/a><br><a href=\"https:\/\/www.tonmeister.ca\/wordpress\/2019\/08\/24\/dfts-part-4-the-artefacts\/\">DFT\u2019s Part 4: The Artefacts<\/a><br><a href=\"https:\/\/www.tonmeister.ca\/wordpress\/2019\/09\/14\/dfts-part-5-windowing\/\">DFT&#8217;s Part 5: Windowing<\/a><\/p>\n\n\n\n<p>In Part 5, we talked about the idea of using a windowing function to &#8220;clean up&#8221; a DFT of a signal, and the cost of doing so. We talked about how the magnitude response that is given by the DFT is rarely &#8220;the Truth&#8221; &#8211; and that the amount that it&#8217;s not True is dependent on the interaction between the frequency content of the signal, the signal envelope, the windowing function, the size of the FFT, and the sampling rate. The only real solution to this problem is to know what-not-to-believe when you look at a DFT output.<\/p>\n\n\n\n<p>However, we &#8220;only&#8221; looked at the artefacts on the magnitude response in the previous posting. In this last posting, we&#8217;ll dig a little deeper and NOT throw away the phase information. The problem is that, when you&#8217;re windowing, you&#8217;re not just looking at a screwed up version of the magnitude response, you&#8217;re also looking at a screwed up phase response as well.<\/p>\n\n\n\n<p>We saw in <a href=\"https:\/\/www.tonmeister.ca\/wordpress\/2019\/08\/08\/dfts-part-1-some-introductory-basics\/\">Part 1<\/a> and <a href=\"https:\/\/www.tonmeister.ca\/wordpress\/2019\/08\/12\/dfts-part-2-its-a-little-complex\/\">Part 2<\/a> how the phase of a sinusoidal waveform can be converted to the sum of a real and an imaginary component. (In other words, if you add a cosine and a sine of the same frequency with very specific separate gains applied to them, the result will be a sinusoidal waveform with any amplitude and phase that you want.) For this posting, we&#8217;ll be looking at the artefacts of the same windowing functions that we&#8217;ve been working on &#8211; but keeping the real and imaginary components separate.<\/p>\n\n\n\n<p>Rectangular windowing<\/p>\n\n\n\n<p>We&#8217;ll start by looking at a plot from the previous post, which I&#8217;ve duplicated below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_error_zoom-1024x768.png\" alt=\"\" class=\"wp-image-5855\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_error_zoom-1024x768.png 1024w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_error_zoom-300x225.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_error_zoom-768x576.png 768w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_error_zoom.png 1120w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Figure 1: The magnitude responses calculated by a DFT for 6 different frequencies. Note that the bin centre frequency is 1000.0 Hz. <\/figcaption><\/figure>\n\n\n\n<p>The way I did the plot in Figure 1 was to create a sine wave with a given frequency, do a DFT of that, and plot the magnitude of the result. I did that for 6 different frequencies, ranging from 1000 Hz (exactly on a bin centre frequency) to 999.5 Hz (halfway to the adjacent bin centre frequency).<\/p>\n\n\n\n<p>There&#8217;s a different way to plot this, which is to show the result of the DFT output, bin by bin, for a sinusoidal waveform with a frequency relative to the bin centre frequency. This is shown below in Figure 2.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_magnitude.png\" alt=\"\" class=\"wp-image-5875\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_magnitude.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_magnitude-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_magnitude-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 2:<strong> Rectangular window: <\/strong><br>The relationship between the frequency of the signal, the frequency centres of the DFT bin, and the resulting magnitude in dB. Note that the X-axis is frequency, measured in distance between bin frequencies or &#8220;bin widths&#8221;.<\/figcaption><\/figure>\n\n\n\n<p>Now we have to talk about how to read that plot&#8230; This tells me the following (as examples):<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>If the bin centre frequency EXACTLY matches the frequency of the signal (therefore, the \u2206 Freq. = 0) then the magnitude of that bin will be 0 dB (in other words, it will give me the correct answer).<\/li><li>If the bin centre frequency is EXACTLY an integer number of bin widths away from the frequency of the signal (therefore, the \u2206 Freq. = &#8230; -10, -9, &#8211; 8&#8230; -3, -2, -1, 1, 2, 3, &#8230; 8, 9, 10, &#8230;) then the magnitude of that bin will be -\u221e dB (in other words, it will have no output).<\/li><li>These two first points are why the light blue curve is so good in Figure 1.<\/li><li>If the frequency of the signal is half-way between two bins (therefore, the \u2206 Freq. = -0.5 or +0.5), then you get an output of about -4 dB (which is what we also saw in the blue curve in Figure 25 in <a href=\"https:\/\/www.tonmeister.ca\/wordpress\/2019\/09\/14\/dfts-part-5-windowing\/\">Part 5<\/a>.<\/li><li>If the frequency of the signal is an integer number away from half-way between two bins (for example, \u2206 Freq. =  -2.5, -1.5, 1.5, or 2.5, etc&#8230; ) then the output of <em>that<\/em> bin will be the value shown at the tops of those bumps in the plots&#8230; (For example, if you mark a dot at each place where \u2206 Freq. = \u00b1x.5 on that curve above, and you join the dots, you&#8217;ll get the same curve as the curve for 999.5 Hz in Figure 1.)<\/li><\/ul>\n\n\n\n<p>So, Figure 2 shows us that, unless the signal frequency is exactly the same as the bin centre frequency, then the DFT&#8217;s magnitude will be too low, and there will be an output from all bins.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_phase.png\" alt=\"\" class=\"wp-image-5876\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_phase.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_phase-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_phase-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 3: <strong> Rectangular window: <\/strong><br>The relationship between the frequency of the signal, the frequency centres of the DFT bin, and the resulting phase in degrees.<\/figcaption><\/figure>\n\n\n\n<p>Figure 3 shows us the same kind of analysis, but for the phase information instead. The important thing when reading this plot is to keep the magnitude response plot in mind as well. For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>when the bin frequency matches the signal frequency (\u2206 Freq. = 0) then the phase error is 0\u00ba.<\/li><li>When the signal frequency is an integer number of bin widths away from the bin frequency, then it appears that the phase error is either 0\u00ba or \u00b1180\u00ba, but neither of these is true, since the output is -\u221e dB &#8211; there is no output (remember the magnitude response plot).<\/li><li>There is a gradually increasing error from 0\u00ba to \u00b1180\u00ba (depending on whether you&#8217;re going up or down in frequency)( as the signal frequency moves from being adjacent to one bin or the next.<\/li><li>When you signal frequency crosses the bin frequency, you get a polarity flip (the vertical lines in the sawtooth shape in the plot).<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_real_imag.png\" alt=\"\" class=\"wp-image-5877\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_real_imag.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_real_imag-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular_real_imag-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 4. <strong> Rectangular window: <\/strong><br>The top two plots show the same relationship as in Figures 2 and 3, but divided into the various components, as explained below.<\/figcaption><\/figure>\n\n\n\n<p>Figure 4, above, shows the same information, plotted differently. <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The bottom right plot shows the magnitude response (exactly the same as shown in Figure 2) on a linear scale instead of in dB.<\/li><li>The top two plots show the Real and Imaginary components, which, combined, were used to generate the Magnitude and Phase plots. (Remember from Parts 1 and 2 that the Real component is like looking at the response from above, and the Imaginary component is like looking at the response from the side.)<\/li><li>The Nyquist plot is difficult, if not impossible to understand if you&#8217;ve never seen one before. But looking at the entire length of the animation in Figure 5, below, should help. I won&#8217;t bother explaining it more than to say that it (like the Real vs. Freq. and the Imaginary vs. Freq. plots) is just showing two dimensions of a three-dimensional plot &#8211; which is why it makes no sense on its own without some prior knowledge.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/rectangular.gif\" alt=\"\" class=\"wp-image-5878\" width=\"800\" height=\"800\"\/><figcaption>Figure 5. <strong> Rectangular window:<\/strong><br>The Real, Imaginary, and Nyquist plots from Figure 4, viewed from different angles.<\/figcaption><\/figure>\n\n\n\n<p>Hopefully, I&#8217;ve said enough about the plots above that you are now equipped to look at the same analyses of the other windowing functions and draw your own conclusions. I&#8217;ll just make the occasional comment here and there to highlight something&#8230;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Hann Window<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hann_magnitude.png\" alt=\"\" class=\"wp-image-5897\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hann_magnitude.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hann_magnitude-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hann_magnitude-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 6: <strong>Hann window<\/strong>: magnitude response error<\/figcaption><\/figure>\n\n\n\n<p>Generally, the things to note with the Hann window are the wider centre lobe, but the lower side lobes (as compared to the rectangular windowing function).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hann_phase.png\" alt=\"\" class=\"wp-image-5898\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hann_phase.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hann_phase-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hann_phase-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 7: <strong>Hann window<\/strong>: Phase response error<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hann_real_imag.png\" alt=\"\" class=\"wp-image-5899\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hann_real_imag.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hann_real_imag-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hann_real_imag-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 8: <strong>Hann window<\/strong>: Real, Imaginary, and Nyquist plots<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"800\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hann.gif\" alt=\"\" class=\"wp-image-5900\"\/><figcaption>Figure 9: <strong>Hann window<\/strong>: Real, Imaginary, and Nyquist plots in all three dimensions.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Hamming window<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hamming_magnitude.png\" alt=\"\" class=\"wp-image-5893\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hamming_magnitude.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hamming_magnitude-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hamming_magnitude-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 10: <strong>Hamming window<\/strong>: Magnitude response error.<\/figcaption><\/figure>\n\n\n\n<p>The interesting thing about the Hamming window is that the lobes adjacent to the main lobe in the middle are lower. This might be useful if you&#8217;re trying to ignore some frequency content next to your signal&#8217;s frequency.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hamming_phase.png\" alt=\"\" class=\"wp-image-5894\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hamming_phase.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hamming_phase-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hamming_phase-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 11: <strong>Hamming window<\/strong>: Phase response error.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hamming_real_imag.png\" alt=\"\" class=\"wp-image-5895\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hamming_real_imag.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hamming_real_imag-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hamming_real_imag-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 12: <strong>Hamming window<\/strong>: Real, Imaginary, and Nyquist plots<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"800\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/hamming.gif\" alt=\"\" class=\"wp-image-5896\"\/><figcaption>Figure 13: <strong>Hamming window<\/strong>: Real, Imaginary, and Nyquist plots in all three dimensions<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Blackman Window<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackman_magnitude.png\" alt=\"\" class=\"wp-image-5885\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackman_magnitude.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackman_magnitude-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackman_magnitude-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 14: <strong>Blackman window<\/strong>: Magnitude response error.<\/figcaption><\/figure>\n\n\n\n<p>The Blackman window has a wider centre lobe, but the side lobes are lower in level.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackman_phase.png\" alt=\"\" class=\"wp-image-5886\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackman_phase.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackman_phase-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackman_phase-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 15: <strong>Hamming window<\/strong>: Magnitude response error.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackman_real_imag.png\" alt=\"\" class=\"wp-image-5887\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackman_real_imag.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackman_real_imag-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackman_real_imag-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 16: <strong>Blackman window<\/strong>: Real, Imaginary, and Nyquist plots<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"800\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackman.gif\" alt=\"\" class=\"wp-image-5888\"\/><figcaption>Figure 17: <strong>Blackman window<\/strong>: Real, Imaginary, and Nyquist plots in all three dimensions.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Blackman Harris window<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackmanharris_magnitude.png\" alt=\"\" class=\"wp-image-5889\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackmanharris_magnitude.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackmanharris_magnitude-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackmanharris_magnitude-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 18: <strong>Blackman-Harris window<\/strong>: Magnitude response error.<\/figcaption><\/figure>\n\n\n\n<p>Although the Blackman-Harris window results in a wider centre lobe, as you can see in Figure 18, the side lobes are all at least 90 dB down from that&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackmanharris_phase.png\" alt=\"\" class=\"wp-image-5890\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackmanharris_phase.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackmanharris_phase-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackmanharris_phase-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 19: <strong>Blackman-Harris window<\/strong>: Phase response error.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"556\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackmanharris_real_imag.png\" alt=\"\" class=\"wp-image-5891\" srcset=\"https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackmanharris_real_imag.png 833w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackmanharris_real_imag-300x200.png 300w, https:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackmanharris_real_imag-768x513.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><figcaption>Figure 21: <strong>Blackman-Harris window<\/strong>: Real, Imaginary, and Nyquist plots<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"800\" src=\"http:\/\/www.tonmeister.ca\/wordpress\/wp-content\/uploads\/blackmanharris.gif\" alt=\"\" class=\"wp-image-5892\"\/><figcaption>Figure 22: <strong>Blackman-Harris window<\/strong>: Real, Imaginary, and Nyquist plots in all three dimensions.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping up<\/h2>\n\n\n\n<p>I know that there&#8217;s lots left out of this series on DFT&#8217;s. There are other windowing functions that I didn&#8217;t talk about. I didn&#8217;t look at the math that is used to generate the functions&#8230; and I just glossed over lots of things. However, my intention here was not to do a complete analysis &#8211; it was a just an introductory discussion to help instil a lack of trust &#8211; or a healthy suspicion about the results of a DFT (or FFT &#8211; depending on how fast you do the math&#8230;.).<\/p>\n\n\n\n<p>Also, a reason I did this series was as a set-up, so when I write about some other topics in the future (like the actual resolution of 16-bit LPCM audio in a fixed point world, or the implications of making a volume control in the digital domain as just two examples&#8230;), I can refer back to this, pointing out what you can and cannot believe is the plots that I haven&#8217;t even made yet&#8230; <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Links to:DFT\u2019s Part 1: Some introductory basicsDFT\u2019s Part 2: It\u2019s a little complex\u2026DFT\u2019s Part 3: The MathDFT\u2019s Part 4: The ArtefactsDFT&#8217;s Part 5: Windowing In Part 5, we talked about the idea of using a windowing function to &#8220;clean up&#8221; a DFT of a signal, and the cost of doing so. We talked about how [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[63,4,59,43],"tags":[],"class_list":["post-5676","post","type-post","status-publish","format-standard","hentry","category-analysis","category-audio","category-digital-audio","category-dsp"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p48hIM-1ty","_links":{"self":[{"href":"https:\/\/www.tonmeister.ca\/wordpress\/wp-json\/wp\/v2\/posts\/5676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tonmeister.ca\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tonmeister.ca\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tonmeister.ca\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tonmeister.ca\/wordpress\/wp-json\/wp\/v2\/comments?post=5676"}],"version-history":[{"count":13,"href":"https:\/\/www.tonmeister.ca\/wordpress\/wp-json\/wp\/v2\/posts\/5676\/revisions"}],"predecessor-version":[{"id":5902,"href":"https:\/\/www.tonmeister.ca\/wordpress\/wp-json\/wp\/v2\/posts\/5676\/revisions\/5902"}],"wp:attachment":[{"href":"https:\/\/www.tonmeister.ca\/wordpress\/wp-json\/wp\/v2\/media?parent=5676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tonmeister.ca\/wordpress\/wp-json\/wp\/v2\/categories?post=5676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tonmeister.ca\/wordpress\/wp-json\/wp\/v2\/tags?post=5676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}