{"id":925,"date":"2022-11-06T15:27:34","date_gmt":"2022-11-06T14:27:34","guid":{"rendered":"https:\/\/localdab.org\/?page_id=925"},"modified":"2023-10-22T09:01:56","modified_gmt":"2023-10-22T07:01:56","slug":"24-ms-timing","status":"publish","type":"page","link":"https:\/\/localdab.org\/index.php\/glossary\/q-t\/24-ms-timing\/","title":{"rendered":"24 ms Timing"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Prerequisite:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Understanding the DAB clock of 2048 kHz is necessary to understand the 24 ms timing. In the following text there will be a lot of references to T (the period of the clock 0,48828125 \u00b5s). See &#8220;<a href=\"https:\/\/localdab.org\/?page_id=1904\">The magical number 2048<\/a>&#8220;<\/em><\/p>\n\n\n\n<h2 class=\"has-large-font-size wp-block-heading\">How to fit <span style=\"text-decoration: underline;\">different<\/span> types of audio compression in the same 24ms frame?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To understand DAB\/DAB+ audio transport, one must know that audio streams consist of a continuous sequence of so-called audio frames. The audio frames follow one after another to guarantee the continuity of the transported audio. Each frame hauls a chunk of audio of a specific duration. For the transport mechanism in DAB\/DAB+, the duration time of an audio frame is<strong> 24ms<\/strong>. As a result these audio frames (with the audio bits) have to be transported every <strong>24ms<\/strong>.<br><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>How does 24 ms fit in DAB timing<\/strong>?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>24 ms is four times 96 ms (the length of the DAB transmission frame. <\/em><br><em>Or 196608 T (clock periods).<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>1 CIF being 196608 \/ 4 = 49152 T or 49152 T\/2048 kHz = 24 ms <\/em><em>&nbsp;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Audio frames will be sent every<strong> 24ms<\/strong> by the multiplexer and will arrive at the  transmitter input as ETI(LI) frames.<\/li><li>Common Interleave Frames (CIF&#8217;s) are transmitted every <strong>24ms<\/strong><\/li><li>The DAB\/DAB+ transmission frame is always a multiple of <strong>24 ms<\/strong>! <\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>DAB Mode I    <strong>96 ms<\/strong> (transmit 4 CIF&#8217;s per transmission frame)<\/li><li>DAB Mode II   <strong>24 ms<\/strong> (transmit 1 CIF per transmission frame)<\/li><li>DAB Mode III  <strong>24 ms<\/strong> (transmit 1 CIF per transmission frame)<\/li><li>DAB Mode IV  <strong>48 ms<\/strong> (transmit 2 CIF&#8217;s per transmission frame)<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">A DAB Mode I transmitter will need to receive four ETI frames of <strong>24 ms<\/strong> to transmit one transmission frame of <strong>96ms<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It shows already the importance of the <strong>24 ms<\/strong> timing in the DAB equipment. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"has-large-font-size wp-block-heading\">What&#8217;s the origin of the 24ms timing?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This timing period originates from the audio encoding which is based on a conversion from time domain to frequency domain. Converting time to frequency domain can not be done sample per sample. To make the conversion you need a large number of samples (called a window) to be processed at once. The number of samples and their sampling rate define the timing of the window. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The original DAB uses the MPEG 1\/2-layer II audio codec, which converts <strong>1152<\/strong> <strong>input samples <\/strong>per frame (PCM)from time to frequency domain. Layer II uses always 1152 samples per frame to make the conversion from time to frequency domain.<br> <br>At that time two sample rates were available in DAB <strong>48kHz<\/strong> and <strong>24 kHz<\/strong>.<br><br>At a sample rate of <strong>48 kHz<\/strong> it gives us a frame duration of <strong>24 ms<\/strong>.<\/p>\n\n\n\n<p class=\"has-text-align-center has-medium-font-size wp-block-paragraph\"><em>1152 samples \/ 48kHz = <strong>24 ms<\/strong><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> This is where we find the origin of the 24 ms.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At a sample rate of 24 kHz it gives us a frame duration of <strong>48 ms<\/strong>.<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><em>1152 samples \/ 24kHz = <strong>48 ms<\/strong><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So we will put one 24 kHz sampled frame in two consecutive DAB-frames of 24 ms. <\/p>\n\n\n\n<h2 class=\"has-large-font-size wp-block-heading\">What about transporting MPEG 2 Layer III (MP3) over DAB?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">MPEG 2 layer 3 is a special case with 576 samples per frame. At 48 kHz sample rate it brings us at frames with 12 ms duration.  <\/p>\n\n\n\n<p class=\"has-text-align-center has-medium-font-size wp-block-paragraph\"><em>Calculation:  576 samples \/ 48kHz = <strong>12 ms<\/strong><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It means you can transport MP3 frames with the DAB-system you just need two consecutive MP3 frames to fill the DAB frame of 24 ms.<br>However, it is unlikely that DAB(+) receivers can reproduce the audio, as this is not supported in the DAB(+) specifications .<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"has-large-font-size wp-block-heading\">What about transporting HE-AAC over DAB? <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In order to make DAB ready for DAB+ (using HE-AAC) it became a bit more complicated. Depending on the sample rate HE-AAC frames have a different number of samples to convert to the frequency domain.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In AAC each block decodes to 1024 time-domain samples. 1024 samples at 48kHz sample rate result in a time lapse of 1024\/48 =  21,3333&#8230; ms. Houston we have a problem!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The AAC frame duration of 21,3333&#8230; does not fit into the DAB 24 ms frame duration. <\/p>\n\n\n\n<h2 class=\"has-large-font-size wp-block-heading\">Solving the frame duration problem  for DAB+  <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First the number of samples\/frame for 48 kHz sample rate will be <strong>reduced from 1024 samples to 960 samples<\/strong>.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\" style=\"font-size:1.2rem\"><p><\/p><p><strong>Standard AAC use to use 1024 samples per frame <\/strong><\/p><p><strong>DAB+ will use only <span style=\"text-decoration: underline;\">960<\/span> samples per frame<\/strong>!<\/p><p><strong>HE-AAC coding we know is not the HE-AAC coding used for DAB+<\/strong>!<\/p><p><strong> <\/strong><\/p><\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">The number of samples per frame for 48 kHz results in a frame duration of exactly 20ms.<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><em>960 samples \/ 48 kHz = <strong>20 ms<\/strong><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The number of samples \/frame for 32 kHz sample rate will also be reduced to 960 samples. Which result in a frame duration of exactly 30ms.<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><em>960 samples \/ 32 kHz = <strong>30 ms<\/strong><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The HE-AAC option SBR will divide the sampling rate by 2. It means that 48kHz with SBR  the basic sample rate becomes 24 kHz. <\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><em>960 samples \/ 24 kHz = <strong>40ms<\/strong>  <\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also the sampling rate of 32 kHz will result in a basic sample rate of 16 kHz. Or a frame duration of 60ms.<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\"><em>960 samples \/ 16 kHz = <strong>60 ms <\/strong> <\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Apparently the reduction of the AAC frame from 1024 samples to 960 did not solve the problem of the 24 ms frames used in DAB! <br>However, <strong>120<\/strong> <strong>ms<\/strong> is a common multiple of 24 ms and all the AAC frame durations 20, 30, 40 and 60 ms. This is the key to solve the problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">DAB+ will work with superframes being 5 consecutive 24 ms frames or superframes of <strong>120 ms<\/strong>. All the AAC frame durations will fit the superframe.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>960 samples at <strong>48 kHz<\/strong> will put <strong>6 DAB-frames<\/strong> in one DAB superframe for DAB+<\/li><li>960 samples at <strong>32 kHz<\/strong> will put <strong>4 DAB-frames<\/strong> in one DAB superframe for DAB+<\/li><li>960 samples at <strong>24 kHz<\/strong> (48 kHz + SBR) will put <strong>3 DAB-frames<\/strong> in one DAB superframe for DAB+<\/li><li>960 samples at <strong>16 kHz<\/strong> (32 kHz + SBR) will put <strong>2 DAB-frames<\/strong> in one DAB superframe for DAB+ <\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Nevertheless <strong>24 ms<\/strong> remains an important the key  to complete the DAB frame puzzle.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>The 24ms is also related with the clock period of DAB (2048 kHz) being <\/em><br><em>24 ms = <strong>49 152 *<\/strong> <strong>T<\/strong>  (with 1 ms = 2048 T)<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/localdab.org\/index.php\/glossary\">Back<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prerequisite: Understanding the DAB clock of 2048 kHz is necessary to understand the 24 ms timing. In the following text there will be a lot of references to T (the period of the clock 0,48828125 \u00b5s). See &#8220;The magical number 2048&#8220; How to fit different types of audio compression in the same 24ms frame? To [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":1266,"menu_order":200,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-925","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/pages\/925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/comments?post=925"}],"version-history":[{"count":33,"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/pages\/925\/revisions"}],"predecessor-version":[{"id":1942,"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/pages\/925\/revisions\/1942"}],"up":[{"embeddable":true,"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/pages\/1266"}],"wp:attachment":[{"href":"https:\/\/localdab.org\/index.php\/wp-json\/wp\/v2\/media?parent=925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}