{"id":2983,"date":"2014-05-28T12:53:50","date_gmt":"2014-05-28T19:53:50","guid":{"rendered":"http:\/\/www.realhd-audio.com\/?p=2983"},"modified":"2017-07-18T17:52:18","modified_gmt":"2017-07-19T00:52:18","slug":"aliasing-and-foldover-a-primer","status":"publish","type":"post","link":"https:\/\/www.realhd-audio.com\/?p=2983","title":{"rendered":"Aliasing and Foldover: A Primer"},"content":{"rendered":"<p>Have you heard of &#8220;aliasing&#8221; or &#8220;foldover&#8221;? In a nutshell, these terms describe another potential problem area for PCM digital audio. We&#8217;ve talked about quantization noise and jitter in the past but I don&#8217;t think that I&#8217;ve explored the concept of aliasing. Consider today&#8217;s post an introduction to aliasing&#8230;or what happens when a frequency that is higher than half the sample rate reaches your analog to digital converter. <\/p>\n<p>The catalyst for today&#8217;s post came from yesterday&#8217;s post. As you may recall (you can <a href=\"http:\/\/www.realhd-audio.com\/?p=2974\" target=\"_blank\">click here<\/a> to read it), I did some spectra analysis of a DXD download and found the same sort of ultrasonic noise that is typical of 1-bit DSD type encoding&#8230;even though DXD is multibit PCM. The post I wrote about demo files also inspired today&#8217;s post (<a href=\"http:\/\/www.realhd-audio.com\/?p=2934\" target=\"_blank\">click here<\/a> to revisit that post). The spectra associated with most of the music bundled with a new high-resolution audio smartphone were full of unwanted ultrasonic noise. It turns out that the &#8220;out of band&#8221; noise that is unavoidable when recording and releasing music in DSD (even music that is then transcoded to high-resolution PCM) can be a very bad thing for a playback device. We&#8217;ll get that story tomorrow.<\/p>\n<p>First, we need to understand that there are some very rigid boundaries associated with digitizing audio. One of them is defined by the Nyquist frequency, which is equal to half of the sample rate. For example, if we take the 44.1 kHz sample rate of a Redbook CD, the Nyquist frequency is 22.050 kHz. That&#8217;s the absolute maximum frequency that can be captured by a PCM-based system&#8230;and that&#8217;s under ideal conditions. But what happens if a frequency of 25 kHz comes along. What does the AD converter do? It tries to digitize it. But it turns out that it doesn&#8217;t have enough samples available to do it correctly.<\/p>\n<p>A PCM system needs at least 2 samples for each cycle of a signal. They don&#8217;t have to match the top and bottom of the periodic waveform (a common mistake), but the converter does need 2 samples. Let&#8217;s take a look at an illustration that shows this:<\/p>\n<p><a href=\"http:\/\/www.realhd-audio.com\/wp-content\/uploads\/2014\/05\/140528_aliasing_illustration.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.realhd-audio.com\/wp-content\/uploads\/2014\/05\/140528_aliasing_illustration.jpg\" alt=\"140528_aliasing_illustration\" width=\"600\" height=\"500\" class=\"alignnone size-full wp-image-2984\" srcset=\"https:\/\/www.realhd-audio.com\/wp-content\/uploads\/2014\/05\/140528_aliasing_illustration.jpg 1314w, https:\/\/www.realhd-audio.com\/wp-content\/uploads\/2014\/05\/140528_aliasing_illustration-300x249.jpg 300w, https:\/\/www.realhd-audio.com\/wp-content\/uploads\/2014\/05\/140528_aliasing_illustration-1024x852.jpg 1024w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a> <\/p>\n<p>Figure 1 &#8211; A series of waveforms showing a 7 kHz and 13 kHz tone sampled in a 10 kHz system with the resulting &#8220;alias tones&#8221; that are generated and output. [Click to enlarge]<\/p>\n<p>Any frequency presented to an AD converter that is higher than half of the sampling rate cannot be accurately captured and a false frequency called an &#8220;alias&#8221; is stored or output instead. The green waveform is what we want but the 7 kHz tone is higher than 5 kHz (the Nyquist frequency or half the sample rate of 10 kHz). So the red 3 kHz alias tone is output as is the 13 kHz blue tone. This is obviously a problem and results in foldover. We could filter out the 13 kHz tone at the DAC but the 3 kHz tone is in the middle of the sound we want! Here&#8217;s another illustration:<\/p>\n<p><a href=\"http:\/\/www.realhd-audio.com\/wp-content\/uploads\/2014\/05\/140528_foldover_graphic.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.realhd-audio.com\/wp-content\/uploads\/2014\/05\/140528_foldover_graphic.jpg\" alt=\"140528_foldover_graphic\" width=\"600\" height=\"370\" class=\"alignnone size-full wp-image-2986\" srcset=\"https:\/\/www.realhd-audio.com\/wp-content\/uploads\/2014\/05\/140528_foldover_graphic.jpg 1297w, https:\/\/www.realhd-audio.com\/wp-content\/uploads\/2014\/05\/140528_foldover_graphic-300x185.jpg 300w, https:\/\/www.realhd-audio.com\/wp-content\/uploads\/2014\/05\/140528_foldover_graphic-1024x631.jpg 1024w, https:\/\/www.realhd-audio.com\/wp-content\/uploads\/2014\/05\/140528_foldover_graphic-208x128.jpg 208w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Figure 2 &#8211; An illustration showing how the 7 kHz frequency &#8220;folds over&#8221; around the Nyquist causing a tone that doesn&#8217;t belong. [Click to enlarge]<\/p>\n<p>So there you have it. And that&#8217;s why AD converters have very precise Low Pass Filters to make sure that any frequency that is greater than the sample rate divided by 2 is never allowed to arrive at the digitizer.<\/p>\n<p>Tomorrow, I&#8217;ll talk about the real world and how aliasing can be our friend or out enemy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you heard of &#8220;aliasing&#8221; or &#8220;foldover&#8221;? In a nutshell, these terms describe another potential problem area for PCM digital<\/p>\n","protected":false},"author":2,"featured_media":2987,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[50,596,83,40,172,53,57,80,593,594,85,87,119,82,597,70,26,289,42,251,227,169,595,598,599,150,179,347],"class_list":["post-2983","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-what-is-hd-audio","tag-aix-records","tag-aliasing","tag-analog-tape","tag-analog-vs-digital","tag-audio-resolution","tag-audio-shows","tag-audio-specifications","tag-benchmark-digital","tag-binary","tag-binary-counting","tag-cd","tag-compact-discs","tag-dsd-256","tag-dxd","tag-foldover","tag-hd-downloads","tag-hd-audio","tag-hdtracks","tag-high-resolution-audio","tag-high-resolution","tag-hra","tag-mark-waldrep","tag-merging-technologies","tag-nyquist-frequency","tag-nyquist-theorem","tag-pcm","tag-pyramix","tag-spectragram"],"_links":{"self":[{"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/posts\/2983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2983"}],"version-history":[{"count":3,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/posts\/2983\/revisions"}],"predecessor-version":[{"id":6031,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/posts\/2983\/revisions\/6031"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=\/wp\/v2\/media\/2987"}],"wp:attachment":[{"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.realhd-audio.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}