introduction to dab receiver (nctu)(good~~~!!!)

150
Introduction to DAB Introduction to DAB Receiver Receiver 尤信程 尤信程 國立台北科技大學資訊工程系 國立台北科技大學資訊工程系

Post on 12-Mar-2015

195 views

Category:

Documents


1 download

TRANSCRIPT

Introduction to DAB Receiver

ContentsDAB broadcasting in Taiwan ETSI 300 401 (Eureka-147) standard Analog/Digital front end OFDM demodulation Time/Frequency synchronization Channel decode MPEG-1/2 audio decode Conclusions

DAB broadcasting in Taiwan (1) 1995

1998 1999

DAB Eureka-147VHF Band III

2000

2323

2005

DAB broadcasting in Taiwan (2) () (1) (1)(3) (1)(2)(3) (1)(2)(3) 220.352MHz 222.064MHz 211.648MHz 213.360MHz 215.072MHz

DAB broadcasting in Taiwan (3)2005.06.26: : ()() : (&: IC) : : ()

DAB broadcasting in Taiwan (4)50 % (audio 192 kbps or speech 96 kbps)

30 %

DAB broadcasting in Taiwan (5) (HD radio or IBOC)FM(Simulcast)

(DRM, Digital Radio Mondale)(short wave) 9 kHz DAB MPEG-4 AAC

ETSI 300 401 standard (1)Also known as Eureka-147 system Developed jointly by EBU, CENELEC, and ETSI Edition-1 standard available in 1995 Mainly for terrestrial broadcasting (Band I-V, Lband). It can also be used for satellite broadcasting. Widely used in lots of areas, including Taiwan and China

ETSI 300 401 standard (2)Four different modes available with different FFT lengths: 2048, 512, 256, and 1024 Transmission bandwidth around 1.5 MHz Multiple audio and data services in an ensemble Streaming mode and packet mode for data transmission Many stations may construct a single frequency network (SFN)

ETSI 300 401 standard (3)Ensemble

UFO DAB ENSEMBLE

Services

MUSIC 1

MUSIC 2

NEWS 98

Services components MCI SI

AUDIO

AUDIO

AUDIO

FIC

SubCh SubCh SubCh a b c Main Service Channel

Fast Information Channel

ETSI 300 401 standard (4)Source Encoder Channel Encoder Digital Modulator

Source encoder: MPEG 1/2 Layer II Channel encoder: energy dispersal, convolutional encode, time interleaving Digital modulator: - DQPSK, frequency interleaving, OFDM

ETSI 300 401 standard (5)Transmission Frame (TF): Sync Channel (SC), Fast Info Channel (FIC), and Main Service Channel (MSC) Mode I example (used in Taiwan): TF = 96 ms, SC ~ 2.5 ms, FIC ~ 3.7 ms, MSC ~ 89.7 ms Mode I example: FIC = 12 FIB (Fast Info Block) MSC = 4 CIF (Common Interleaved Frame) One CIF = 24 ms is a logical frame

ETSI 300 401 standard (6)TF Transmission Frame Synchronization Channel Fast Information Channel(non time interleaved) Main Service Channel(MSC) (time interleaved) 3 symbols 72 symbols=4 CIF 1 CIF =55296 bits

Fast Information Blocks (FIB) Phase Reference Symbol Null Symbol Guard Interval Symbol k

Ts

ETSI 300 401 standard (7)FIDC MCI Multiplex Controller Fast Information Block Assembler Energy Dispersal Scrambler Convolutional FIC Data Encoder

Service Information Assembler Audio Stream MPEG 1/2 Layer II Audio PAD Encoder SI

CIFs Freq. Sync. Interleaving Channel and Signal Symbol Generation Generation OFDM Signal Generator DAB Transmission Signal

Data Packet Multiplex Assembler Stream Data Service Data

Energy Dispersal, Convolutional Encoding, Packet and Time Data Interleaving

Main Service Multiplexer

Introduction to OFDM (1)OFDM = Orthogonal Frequency Division Multiplexing FDM: Different channels use different carrier frequencies. EX: AMPS (1G mobile) system

f1 Guard band

f2

f3

Introduction to OFDM (2)In OFDM, we use multiple carriers to transmit different bits (symbols) of the same bitstream. Some questions: Why multiple carriers? How to get rid of the guard band? Is it easy to implement?

Introduction to OFDM (3)nK W2N

SerialD-QPSK Symbol

n(K W2N -2)OFDM Symbol

to Parallel

-nK W2N

Introduction to OFDM (4)If a single carrier is used to transmit data, then the symbol duration is inversely proportional to the symbol rate. High symbol rate = short symbol duration Multiple paths in transmission introduces interference.

Introduction to ISI (1)Multiple paths is common in nature environment If the time diff between the direct and the echo signals is larger than symbol duration, then ISI (Inter-Symbol Interference) may occur.

Tx

t2

Rx

t1

Introduction to ISI (2)Severe ISI is difficult to cope with. One simple method to deal with multiple paths is to add guard interval between two adjacent symbols. Guard interval > (t2 t1) For short symbol duration (in the order of s), guard time may be too large to use (in the order of ms).Time domain Guard Interval Symbol i Guard Interval Symbol (i+1)

Introduction to ISI (3)Transmit data using multiple carriers: total symbol rate = symbol rate in one carrier x number of carriers used Therefore, we may use slow symbol rate with many carriers to attain high-speed data transfer. With low symbol rate in a carrier, it is OK to use guard interval.

Introduction to ISI (4)Multiple paths also introduce Frequency-selective fading Location-selective fading To cope with these difficulties, DAB uses Frequency interleaving Time interleaving (mobile reception)

Introduction to SFN (1)Conventional TV/Radio systems cannot be used to build a SFN (Single Frequency Network). There are Interferences between different transmitters (stations) of the same TV/Radio company. We need to change the frequency of the radio in order to keep listening to the traffic info in a highway.

Introduction to SFN (2)Since multiple carriers with guard interval can deal with the ISI, the same tech is also used to overcome the interference due to different transmitters. Therefore, with proper design, OFDM tech may be used to build the SFN.

Introduction to SFN (3)In a SFN, the max distance between two transmitters is determined by the guard interval. Precise time sync between transmitters is implemented by using the signal from GPS. Currently, TV/Radio companies have constructed their SFNs for digital TV and digital radio.

Introduction to SFN (4)With the SFN of a radio station, we dont need to change the dial of the radio from Taipei to Kaohsiung. Constructing SFNs actually improve the spectrum efficiency. For example, ICRT uses 100.7 in Taipei and 100.1 in central Taiwan. With SFN tech, ICRT needs only 100.7 and 100.1 can be allocated to some one else.

OFDM mod and demod (1)We have answered the question: why bother to use multiple carriers. We now try to answer the second question: how to get rid of the guard band ? Answer: By orthogonal carriers. Two exp functions are orthogonal because

2,m= n 2 jmt jnt e e dt= 0 0,m n

OFDM mod and demod (2)But how much time is 2 (in the unit of sec)? If e j m t = e m ( j 0 t ) , then all the carriers are integer multiple of 0. Define T0 = 2 /0, then the previous equation becomes:

T0 jm0t e 0

e

jn0t

2 , m = n dt = 0, m n

OFDM mod and demod (3)Let the symbol modulating ejm0t be zm for t [t0, t0+T0] At transmitter side, the signal is

s(t ) =

z m e jm 0 t

Spectrums of different carriers are overlapped. No guard band!

OFDM mod and demod (4)To recover the zk, we can multiply e-jk0t to s(t) and then integrate over [t0, t0+T0]. Recall that ejm0t and ejk0t are orthogonal, therefore

s (t ) et 0 + T0

jk 0 t

dt

jm 0 t = z m e e jk 0 t dt t0 m = 2 z k

OFDM mod and demod (5)The above equation reveals that we need a perfect frequency and time sync for symbol recovery. Exact time sync may be relaxed by other means (to be mentioned later). Some kind of freq sync is, in fact, required. Freq sync = coarse sync + fine sync. Allowed fine sync error is about 2 % of the subcarrier spacing. That is 20 Hz in mode I.

Guard interval (1)Guard interval is used to control ISI. Blank is not good in guard interval. It is obvious that A and B are orthogonal, but A and B are not!A = Delayed version of A Original version of A Original version of B

Guard interval (2)Better choice: copy the last part of A to guard interval. This tech is called cyclic prefix. With cyclic prefix, A and B are orthogonal, too. (easy to verify) => Preserving orthogonalization without ISI. It is a common practice in all kinds of OFDM systems.

Guard interval (3)copy

symbol M-1

guard interval

symbol M

symbol M+1

504 T 2552 TT = 1 / (2.048 M) sec

OFDM generation (1)Previously we show how to generate s(t) by using many isolated carriers. In fact, this is not necessary if digital tech is used. jm0t Recall s(t ) = zm e If we use the identity T0 = 2 /0 then,

s (t ) =

M 1 m =0

z

m

e

j

2 mt T0

OFDM generation (2)If the data is sampled by N points in the T0 interval, then the equation becomes

s(n t ) =

M 1 m=0

zm e

2 j mn t N t

=

M 1 m=0

zm e

2 j mn N

This is similar to the IDFT equation.Z0 Z1 Z1535 Same time IDFT Time axis

S0

S1

S1535

OFDM generation (3)In DAB mode I, M = 1536, N = 2048. Why M is not equal to N? Sampling theorem: sampling rate >= 2 BW (base band) To allow for some safe margin, we usually use a sampling rate of more than 2 BW. With N = 2048 and 0 / 2 = 1 kHz, fs = 2.048 MHz. Thus, BW in base band < 1.024 MHz.

OFDM generation (4)The OFDM signal has a BW of 1.536 MHz. Its composed of I and Q in base band with BW = 0.768 MHz.1.536 MHz

Carrier Spectrum of I and Q

0

Carrier

0 0.768 MHz

OFDM generation (5)To be efficient, we let M = N and zm = 0 for (M 1) < m < N We then can use IFFT to implement the OFDM generation. (Use k to replace m)

s( n ) =

N 1 k =0

zk e

j

2 kn N

Format of transmit signal : s m(t) = Re {e 2 jc t s ( t )}

OFDM generation (6)The same ideal applies to OFDM demodulation. We may use summation to replace integral. Thus, the equation becomes DFT. Since we use M = N, care must be taken to deal with this.

s (t )e

jk 0 t

dt

M 1 n=0

s ( n )en=0

j

2 kn N

s (n )e

N 1

j

2 kn N

OFDM generation (7)FFT B1 768+1 2048-768

A2048

A-768 0

B768

D-QPSK symbol0 1536

/4-DQPSK (1)qn=1/ 2[(1-2pn)+j(1-2pn+1536)]Im (Pn,Pn+1536) (1,0) (0,0)

Re

(1,1)

(1,0)

3072 vector->1536 QPSK symbol

/4-DQPSK (2)Using differential modulation relaxes the time synchronization requirements.zl,k = zl-1,kyl,kIm

yl,k =(1/2 , 1/2) zl-1,k=(1/2 , 1/2)

Re

Sync channel (1)Sync channel contains null symbol and Phase Reference Symbol (PRS). Null symbol has a much lower energy. It contains nothing but TII (Transmitter Identification Information)

Null

PRS

FIC

MSC

Sync Channel

Sync channel (2)PRS has 4 blocks with each block having 32 values. The allowed values are {+1,-1,+j,-j}. For DAB in mode 1, there are 1536 carriers. The carriers are divided into 12 groups. Each group has a constant bias (i.e., n). The equation of z1,k (i.e., PRS) isz1, k e j k , 768 k < 0 and 0 < k 768 = 0, k = 0

k =

2

(hi ,k k ' + n )

Sync channel (3)There is a table providing the relationship between k and k, i, and n. (Table 44 47) There is another table for hi,j. (Table 48) Example of Table 44 (first 2 entries) -768 k -737 k = -768, i = 0, n = 1 -736 k -705 k = -736, i = 1, n = 2 Example of Table 48 h0,0 = 0, h0,1 = 2, h0,2 = 0, h1,0 = 0, h1,1 = 3, h1,2 = 2,

Sync channel (4)Define the autocorrelation function R(m) of z(n) as (-8 m 8) 15

R(m) = z(n)z < (n + m) >16* n=0

Let R1(m) is for z1,k Let R2(m) is for z1,k Let R3(m) is for z1,k Let R4(m) is for z1,k

with -768 k -753 with -736 k -721 with -704 k -689 with -672 k -657

Sync channel (5)The summation of R1(m) to R4(m) is an impulse with the only peak at m = 0. This can be used as a reference signal for receivers. The receiver must have a copy of the PRS inside it. To use PRS, time sync is required although the DQPSK does not! Usually we use PRS for coarse freq sync.

OFDM synchronization (1)OFDM needs to synchronize the followings Receiver frequency Symbol position (time) Sampling rate

OFDM synchronization (2)Local Oscillator offset (Freq. Sync.)1.536 MHz

-2.048MHz

0

2.048MHz

?? kHz offset

OFDM synchronization (3)Time sync to avoid incorrect position of FFT window.

symbol M-1

guard interval

symbol M

FFT window

OFDM synchronization (4)Sampling rate synchronization.

OFDM symbol n OFDM symbol n+1 OFDM symbol n+2 OFDM symbol n+3

Frequency sync (1)Recall that OFDM requires freq synch Frequency synchronization can be divided into two classes: Coarse freq sync (integer multiple of 0) Fine freq sync (less than 0.5 0 ) Incorrect coarse freq sync causes incorrect indexing of QPSK symbols Incorrect fine freq sync causes Inter-Carrier Interference (ICI)

Frequency sync (2)Consider coarse freq sync problem. Want to get zk but receiver freq is (k+k0) 0 where k0 is an integer. Thus,

z =' k

s ( n )en=0

N 1

j

2 n ( k + k0 ) N

=

zn=0 m =0

N 1 N 1

m

e

2 j nm N

e

2 j n ( k + k0 ) N

= N z ( k + k0 )

Frequency sync (3)Previous equation says that QPSK symbols are not correctly indexed. Need to re-assign. One way to find the coarse freq offset is via PRS. If position of OFDM symbol in TF (Transmit Frame) is correct (usually not the case), then offset can be estimated via performing correlation between received PRS and build-in PRS.

Frequency sync (4)Influence of fine frequency offset. To recover zk, but use (k+) 0 where [0.5,0.5]. The result becomes2 n ( k + ) N

z =' k

s ( n )en=0

N 1

j

=

zn=0 m =0 N 1

N 1 N 1

m

e

j

2 nm N

e

j

2 n ( k + ) N

1 e = zm j ( 2 / N )( m k ) 1 e m =0

j 2 ( m k )

Frequency sync (5)The second term of the above equation is like a sinc function. It says that zk is contaminated by other QPSK symbols (ICI). Usually 2 % of inaccuracy is allowed. DAB mode I uses 2 0 = 1 kHz. So, 20 Hz offset is allowed.

Frequency sync (6)One simple way to find the fine offset of frequency is by searching. A brute-force method. It is robust, but slow. Other methods available. EX: By using correlation between guard interval and corresponding part of OFDM symbol. (cf. IEEE trans SP, vol. 45, no. 7, pp 1800-1805, 1997)

Frequency sync (7)If is obtained, then it is easy to cancel the offset by multiplying s(n) by ej(2/)n before FFT.

z =' k

s ( n )en=0 N 1 n=0

N 1

2 j n N

e

2 j n ( k + ) N

=

s(n) e

j

2 nk N

= zk

Time synchronization (1)Exact time sync is not required for DQPSK. But it is needed to use PRS and to perform sampling-rate sync. Coarse time sync (in TF) is done via null symbol. Fine time sync is done via correlation in the time domain (i.e., before FFT).

Time synchronization (2)Detection of null symbol via envelope energy.

About 30-sample error

1 2656 2 rn 2656 n = 0

Average Energy

Time synchronization (3)Why time synchronization is a must for PRS? Let s[] = s[N-n0],..s[N-1],s[0],. s[N-n0+1], instead of s[0],.. .s[N-1], be feed to FFT for OFDM demod. Then, FFT result is phase shifted. FFT(x[n-n0])e-j(2k/N)n0X(k) It is obvious that time sync is required, or correlation wont work!

Time synchronization (4)Suppose the build-in PRS is called zk. The received PRS (after FFT) is xk. Correlating both signals and then taking IFFT, yields an impulse if no frequency offset. Use it to find time offset.

Time synchronization (5)If xk is a time-shifted version of zk before FFT, then xk = zk e-j(2k/N)n0 Recall assuming no freq offset.

1 N

N 1 k =0

* xk zk e

j

2 nk N 2 n0 k N 2 nk N

1 = zk e N k =0 = ( n n0 )

N 1

j

* zk e

j

Time-freq sync (1)If freq is not synchronized, then we wont see any impulse. Instead, we see noise-like spectrum. Simple rule: If peak of IFFT < threshold, then circular-shifting zk by one. Once a peak is observed, then a fine freq sync can be carried out by MPY s(n) with ej(2/)n till the peak is max. ( = 0.04 * p, p = 0..24)

Time-freq sync (2)Coarse Fine

Coarse sync. shift (1 kHz)N

Is peak obtained ?Y

Fine sync. exp{j} (0.04 kHz)

Time-freq sync (3)Once freq sync is done, time sync can be done by shifting FFT window till impulse occurs at origin. Location of previously obtained peak is a helpful hint. Again, the method is not optimized for speed. Time sync can be used for sampling-rate sync.

Time-freq sync (4)Time sync.

Use the peak Location first time. Then, shift 1 sample later time if needed.

N

Is peak at origin ?Y

Phase syncIm Re Differential Demod. ( a + jb ) Is FIC CRC correct ?Y

N

Im

(/40) rotate

Re

Sampling-rate sync (1)The number of samples between peaks of two consecutive TFs should be 196608 (mode I). If not, it is due to async between local sampling clock and transmitter sampling clock. Use a numerically-controlled oscillator for A/D sampling.

Sampling-rate sync (2)Some sort of sampling-rate sync is a must. If local sampling-rate is fixed, use software to adjust the actual sampling rate. Software approach is time-consuming. Not recommend for simple receivers. In addition, sampling-rate of audio CODEC must also be synchronized.

Receiver block diagram (1)An example of receiver block diagram.Digital BasebandRF Front End Channel Demodulation OFDM And QPSK Demod Time and Frequency De-interleave And Viterbi Decode Source Decoder MPEG Audio Decode

IF and Digital Down Converter

Synchronization

Receiver block diagram (2)RF front-end is a commercially-available module. Taiwan uses Band III = 174 ~ 240 MHz. IF center frequency is 43.008 MHz (or 38.912 MHz). IF signal is sampled at 8.192 MHz. These two values should match to each other. FFT N = 2048 for OFDM demod. Sampling rate of audio CODEC = 48 or 24 kHz.

Digital Down Converter (1){1, 0,-1,0} ( cosine )LPF H(k)

4

I (real)

IF BPF O/P

A/D

Decimation by 4

8.192 MHz

LPF H(k)

4

Q (imag)

{0,-1,0,1} ( -sine )

Digital Down Converter (2)43.008 MHz - 5 * 8.192 MHz = 2.048 MHz. The basic time unit in DAB is T = 1/(2.048 MHz) The center frequency of sampled IF is at 2.048 MHz. Sine and cosine in DDC (Digital Down Converter) use 4 samples. Equivalent frequency is 2.048 MHz. Digital IF becomes digital base band after MPY sine and cosine waves.

Digital Down Converter (3)1.536MHz

IF spectrum-2.048MHz 0 2.048MHz

Cosine spectrum-2.048MHz 0 2.048MHz

-4.096MHz

-2.048MHz

0

0.768

2.048

4.096MHz

Digital Down Converter (4)The bandwidth of baseband I and Q is 0.768 MHz. It can be sampled at 2.048 MHz. Therefore, decimation by 4 is OK. 0.768 MHz 0.1875 . 1.024 MHz 0.25 . If IF signal is sampled using 8 bits, around 48 dB attenuation is enough. Filter spec: Pass band = 0.1875 , stop band = 0.25 , stop band attenuation = 48 dB.

Channel demodulator (1)Treat I and Q signals from DDC as the real and imaginary part of complex numbers. They are OFDM symbols. Use previous tech for OFDM synchronization. Remember to skip guard interval. Time sync is no longer needed after initialization if sampling-rate sync is achieved. Then, freq sync can be done faster. FIC must be obtained first as it contain info about where to and how to demod MSC.

Channel demodulator (2)Channel demodulation procedure (after sync): FFT of I and Q => OFDM symbol Differential demod Frequency de-interleaving QPSK de-mapper Block re-partitioning Time de-interleaving (MSC) Viterbi decode (FIC,MSC) Energy dispersal (FIC,MSC)

Differential DemodDQPSK symbol k of OFDM symbol (l-1) = zl-1,k DQPSK symbol k of OFDM symbol l = zl,k QPSK symbol k of OFDM symbol l = yl,k Then, yl,k= zl,kzl-1,k* Differential demod cancels the common phase difference. Thus, phase shift due to time delay is killed.

Frequency Interleaving (1)Frequency interleaving is used to overcome frequency-selective fading. Recall multiple paths introduce frequencyselective fading. Neighboring bits should not use neighboring sub-carriers, as convolutional codes cannot deal with bursty errors. Frequency interleaving randomly assign the sub-carrier frequencies to each bit in an OFDM symbol.

Frequency Interleaving (2)Frequency interleaving detailed in Table 49. The concept is illustrated here:

{v0,v1,v2,v3,..,v1534,v1535}

{..,v511,..,v1010 ,.., v1221 ,..,v1353,..,v1630,..,v1716,..}dn range[ 256,1792 ]excluding 1024

QPSK De-mapper (1)QPSK de-mapper is used to quantize the differential demod (continuous) values for Viterbi decoder. The simplest case is to use +1 for positive number and 1 for negative number. Use 0 for depuncturing (to be discussed later). This is called hard decision. More than one level of quantization is possible, called soft decision.

QPSK De-mapper (2)Example of hard decision:O/P+1

0 -1

I/Q of yl,k

For de-puncturing

1536 QPSK symbols ->3072 values

Block Partitioning (1)Block partitioning is used to put FIC and MSC data in the unit of 3072 bits for OFDM to carry. For DAB mode I: 4 FIC are transmitted using 3 OFDM symbols. MSC (= 4CIF) uses 72 OFDM symbols.

Block Partitioning (2)

FICb

FICb+1

FICb+2

FICb+3

FIC = 2304 bits

OFDM symbol = 3072 bitsOFDM symbol Index=2 OFDM symbol Index=3 OFDM symbol Index=4

Block Partitioning (3)SubChId=1 SubChId=2 .. SubChId=6 Padding

CU = 64 bits 0 1 2 140141142143 280 . 862863

CIFd

CIFd+1

CIFd+2

CIFd+3

CIF = 55296 bits

OFDM symbol = 3072 bitsOFDM symbol OFDM symbol Index=5 Index=6 OFDM symbol Index=76

Convolutional codes (1)There are two types of error correction codes: block codes and convoultional codes Famous block code: Reed-Soloman code, used in CD and DVB-T, but not in DAB Convolutional codes are used in DAB as well as in DVB-T Convolutional codes are good for correct sparse errors, but not contiguous errors.

Convolutional codes (2)The generated codeword is punctured to meet the different levels of protection requirements as well as the available bit rate. Usually the Viterbi algorithm is used for decoding. Sometimes referred to as a Viterbi decoder. We give only a very brief introduction in the following. You can find references from most textbooks for error correction codes.

Convolutional codes (3)A two-FF convolutional encoder is shown below. Input is m(x) and outputs are c0(x) and c1(x). It is obvious c(k) is related to m(k-2), m(k-1), and m(k). Constraint length = 3.c0(x)

m(x)

F.F.

F.F.

c1(x)

Convolutional codes (4)Represent the behavior of the encoder by a state diagram. The diagram has 4 states, with the states to be the contents of the FFs.s1 10 1/11 1/01

0/00 m/c0c1

00 1/00 s0 0/11 01 s2

0/10 11 s3 0/01

1/10

Convolutional codes (5)The state diagram can be expanded to the Trellis diagram. It describes the path of the encoding process.S0 0/00, 1/11 00 S1 0/10, 1/01 10 00 10 00 10 00 10

S2 0/11, 1/00 01 S3 0/01, 1/10 11 t

01 11 t+1

01 11 t+2

01 11 t+3

Convolutional codes (6)The decoding process is much more difficult. We need to compare all the possible paths to find the best (max likelihood) answer. Distance is measured by Euclidean or Hamming, depending on the quantization process. The minimum cumulative distance after receiving the entire codeword is the winner. Back tracing the winner, the decoded answer is obtained.

Viterbi Decoder (1)Exhaustive search is not possible. Complexity (calculating the distance) is exponential growth with respect to (w.r.t.) the codeword length. Greedy algorithm does not work, as it may find the local minimum. Viterbi algorithm: preserve only the path with shortest cumulative distance, and discard the rest. The complexity becomes linear w.r.t. the codeword length. A major advantage.

Viterbi Decoder (2)Example: cumulative distance (cd) of a state is P, and another state is Q, both are shown inside the circles. The number associated with a path is the incremental distance. If (P+1) < (Q+2), then path with dotted line is discarded. If both are tie, either path can be chosen.P 1 P+1

Q

2

Example of distance calculation (Hamming). Assume for a moment, the received data = 00. Path with shorter cd into a state is chosen. Discard all dotted paths!S0 00/0, 11/1 S1 10/0, 01/1 d=0,cd = 0 0 d=2 1 2 d=0,cd=2 S2 11/0, 00/1 2 d=2 S3 01/0, 10/1 3 t 0

Viterbi Decoder (3)

2 2 t+1

Viterbi Decoder (4)Input : 10 S0 S1 S2 S3 t t+10 1

102

002

013

014

012

1

2

1

3

4

2 1

1

3

3

1

3

3

1

3

3

t+2

t+3 t+3

t+4

t+5

t+6

Output : 1011 00 (Maximum Likelihood)

DAB conv encoder (1)DAB uses a six-FF encoder. One input bit produces 4 output bits. Input to the encoder FIC = 768 bits. MSC = # of bits in one audio frame = 1152 * bitrate / sampling-rate Output from the encoder: 4 * input bits + tail zero (= 24 bits).

DAB conv encoder (2)All zero initial state , All zero final state

ai

x0,i x1,i {MSC}1152*bit rate/sampling freq*4+tail zero. {F I C}768*4+tail zerotail zero = 24

x2,i x3,i

Puncturing Procedure (1)Some bits of the encoded codeword are not transmitted. Its called puncturing. Different levels of protection is achieved by puncturing different number of the encoded bits. FIC has a higher protection level. Fewer bits of encoded codeword are punctured. MSC has a lower protection level. Lots of bits in the codeword are discarded.

Puncturing Procedure (2)Codeword is divided into 128-bit blocks, and each block has four 32-bit sub-blocks. Each sub-block in the same block uses the same puncturing rule. The rule is listed in Table 24. It has totally 24 different rules, one for each value of Puncturing Index (PI). The PI for FIC is fixed, while that for MSC is variable. We must use the info in FIC to find the PI of MSC.

Puncturing Procedure (3)

{v0,v1,v2,v3,.,v28,v29,v30,v31}32PI=16 , {1110 1110 1110 1110 1110 1110 1110 1110}

{v0,v1,v2,.,v28,v29,v30}24{F I C}768*4+tail zeroPunctured Rate 4/3

{F I C}2304

{MSC}4608*4+tail zero UEP( bit rate=192 kbit/s , P = 3) {MSC} 8960

Energy Dispersal (1)Energy dispersal is used to make the encoded bits to be random. Method: XOR the information bits with Pseudo Random Binary Sequence (PRBS). To recovery the original info, XOR the scrambled bits with the same PRBS again. Length of PRBS FIC = 768 bits MSC = # of bits in one audio frame

Energy Dispersal (2)Initialization Word1 1 1 1 1 1 1 1 1

PRBS for encode and decode

{MSC}1152*bit rate/sampling freq. PRBS {F I C}256*3 PRBS

Time Interleaving (1)Multiple paths produces location-selective fading. For mobile reception, it is equivalent to time-varying fading. Use time-interleaving to make bursty errors sparse over a wider range. Time interleaving is not helpful for home (fixed location) reception. Interleaving unit: one bit, not one byte. Interleaving is based on frame (CIF) count. Need 16 frames to construct 1 frame. Delay time = 0.153 s

Time Interleaving (2)0 8 rm,n(mod16)CIF

4

rm+#,n(mod16)Frame 0 {a0 ,.. ,.. ,} Frame 8 {x , a1 ,.. ,} Frame 4 {x, x, a2 ,}

11 7

Frame 0 {a0 , a1 , a2 ,}

5# frame delays

Table 42

Fast Info Channel (1)Fast Information Channel contains all necessary information for decoding MSC. It may also be used as data service, such as traffic information. However, capacity is limited. FIC has a higher level of protection. FIC is not time-interleaved for fast information. For DAB mode I, one TF has 12 FIBs. One FIB = 256 bits.

Fast Info Channel (2)Contents of FIC: Multiplex Configuration Information (MCI, including start address, size (CU), protection level, etc.) Service Organization (SubChId) Date and Time Country Id Service Label (UFO ENSEMBLE) Program Label (MUSIC1,NEWS 98,) Data service

Fast Info Channel (3)One FIB has one or many FIGs (Fast Information Group). Currently, FIG type 0, 1, and 5 are used. FIG 0 is for MCI and service info FIG 1 is for labeling (i.e., text info) FIG 5 is for data service such as paging, traffic message, and emergency warning.

Fast Info Channel (4)FIB data = 30 bytes 16-bit CRC

FIG V

More FIGs here

End marker

Padding

FIG type (3 bits)

Length of data field (5 bits)

FIG data field

Fast Info Channel (5)FIG type has many extensions. FIG 0/V is the V-th extension of FIG 0. We need FIG 0/0, FIG 0/1, and FIG 0/2 to decode one service (something like a program). Example: UFO ensemble uses the following FIGs: FIG 0/0, FIG 0/1, FIG 0/2, FIG 0/8, FIG 0/10, FIG 1/0, and FIG 1/4.

Fast Info Channel (6)The first byte in FIG 0 data field has the following info: C/N: info is for current or next configuration OE: info is for this or other ensemble P/D: for 16 or 32 bits Service Identifier. 16-bit version for programme service, 32-bit version for data service. Extension: 0 31 for different applications. Not all of them are defined now. FIG 0/0 and FIG 0/1 to be given next.

Fast Info Channel (7)FIG 0/0 contents: Country ID Ensemble reference (ensemble ID) Change flag: whether a change will occur AL: whether alarm msg accessible CIF count: # of current CIF. Value from 0 ~ 4999, adding for each successive CIF. Used for time interleaving. Occurrence change: when change will occur.

Fast Info Channel (8)FIG 0/1 contains repeated pieces of info about sub-channels. Each piece has the following: Subch ID (FIG 0/2 relates this and services) Start address of the subch Short or Long protection form (short for audio stream. Used in this example.) Table switch: Only Table 7 available now. Table index: for finding size, protection level, and bitrate of the subch.

Fast Info Channel (9)The DAB ensemble (TF) contains many services. One service may be considered as a radio station in conventional FM. One service has one or more service components, which may include audio bitstream and data (e.g., traffic info). Audio bitstream is transmitted using streaming mode. One bitstream usually is carried by one subch. Packet-mode transmission is omitted here.

Main Service Channel (1)The audio bitstreams are MUXed in CIF. Usually six audio programs can be transmitted in one DAB ensemble. MSC has 4 CIF in DAB mode I. To obtain the bitstream of a programme, use FIG 0/1 to find start addr, size, and protection level of the subch. Size is in the unit of CU (Capacity Unit = 64 bits)

Main Service Channel (2)With start addr and size from FIG 0/1, we can find the corresponding OFDM symbols to demod and decode. Due to DQPSK, demod from half-way of a TF is OK. We also need CIF count for time deinterleaving. Except time de-interleaving, the whole channel decoding procedure for MSC is the same as that for FIC.

Intro to audio coding (1)Audio coding uses MPEG-1/2 (part 3) Layer II, originally developed by Philips MPEG-1 Layer III audio is known as MP-3 (by FhG-IIS) Sampling rate: MPEG-1 = 48 ks/s, MPEG-2 = 24 ks/s Each audio frame encodes 1152 PCM samples per channel. Audio frame duration: MPEG-1 = 24 ms, MPEG-2 = 48 ms.

Intro to audio coding (2)MPEG-1 audio for higher bitrate, MPEG-2 for lower bitrate (lower audio quality). Contrary to common believing! Lower sampling freq for low bitrate coding: common practice in audio society MPEG-2 Multi-Channel (MC) extension not currently used in Taiwan MPEG-2 AAC could be a future coding scheme

Intro to audio coding (3)Features of MPEG-1/2 audio standard psychoacoustic model 32-subband filterbank Bit allocation table SCaleFactor Selection Info (SCFSI) Data grouping Bitrate range: 32 kbps ~ 384 kbps

Intro to audio coding (4)Brief intro to psychoacoustics Absolute hearing threshold Frequency masking (main factor) Temporal masking Layer I/II uses psychoacoustic model I Layer III uses psychoacoustic model II

Intro to audio coding (5)Absolute hearing threshold is the minimum level of sound human beings can hear Every one has (slightly) different threshold SPL (Sound Pressure Level) = 20 log (P/P0) dB. P0 = 2 x 105 N/m2SPL

Freq

Intro to audio coding (6)Frequency masking: Human ears can be modeled as many bandpass filters. Different signals within the passband of one filter will interfere each other. Stronger one masks weaker one.SPL

Freq

Intro to audio coding (7)Passband of a bandpass filter is known as one critical band. There are around 25 critical bands. Noise Masks Tone (NMT) ~ -6 dB Tone Masks Noise (TMN) ~ -18 dB Inter-critical-band masking also exists Frequency masking assumes stationary signals. Not correct for transient signals.

Intro to audio coding (8)Temporal masking Pre-masking (5 ms) Simultaneous masking Post-masking (200 ms) Pre-masking can be used to mask pre-echoes. In general, temporal masking is more difficult to use.

Audio encoding (1)Simple block diagram of MPEG-1/2 encoding.Digital Audio Input Filter Bank Quantized Bit allocation Samples and scalefactor calculation Bitstream Formatting Encoded Bitstream

Signal to Mask Ratio Psychoacoustic Model

Audio encoding (2)Filter-bank, also called subband analysis, has 32 bandpass filters with the same proto-type. Let g(n) be the impulse response of proto-type. Filter i in the filter bank is obtained by

(2i + 1)(n 16) hi (n) = g (n) cos( ) 64Recall MPY in time domain is convolution in frequency domain. Center frequency is shifted according to cosine term.

Audio encoding (3)The proto-type filter is a 512-coefficient FIR filter. Coefficients are in the spec. Since the BW of each BPF is (1/32) of full BW, decimate its output samples by 32.h0(n) 32 Subband output h31(n) 32

PCM input

Audio encoding (4)Number of bits to quantize a subband sample based on PSY model is recorded in Bit Allocation (BA). 3 X 12 = 36 samples from the same subband share one BA info. 12 samples of one subband = 1 part. The amplification ratio of a subband sample in encoding is called SCaleFactor (SCF). Its shared by 12 subband samples.

Audio encoding (5)Its possible to use one, two, or three SCFs for 36 output samples of one subband. This info is called SCaleFactor Selection Information (SCFSI). Four different cases identified: Three different SCFs First-two parts share one SCF Last-two parts share one SCF All three parts share one SCF

Audio encoding (6)1152 PCM samples per ch is packed in one audio frame. Subband samples in bitstream: 3 samples from L ch of SB 0 3 samples form R ch of SB 0 Same for SB 1 till SB 31 Repeat the above 12 times Remember SCF scope is 12 samples from the same SB.

Audio encoding (7)Quantized subband samples may be grouped together into one codeword. The following quantization levels use grouping in packing subband samples. 3 levels: use 5 bits 5 levels: use 7 bits 9 levels: use 10 bits

Audio frame structure (1)The audio frame in MPEG-1/2 has the following fields: header, CRC, audio data, and ancillary. Audio data has BA field, SCFSI field, SCF field, and sb sample field. DAB uses ancillary to pack F-PAD (Fixed Program Associated Data), X-PAD (Extended PAD), and SCF-CRC.

Audio frame structure (2)CRC field in MPEG-1/2 is optional, but is mandatory in DAB.Header CRC Audio data Ancillary

BA

SCFSCI

SCF

Subband samples

Stuffing

X-PAD

SCF CRC

F-PAD

Audio frame structure (3)SCF CRC = CRC for next frames SCF. F-PAD contains the following Dynamic Range Control (DRC) X-PAD info (no, short, long) Music/Speech flag ISRC (Intl Standard Recording Code)

Audio frame structure (4)X-PAD has many application types, including label data ITTS (Interactive Text Transmit System) MOT (Multimedia Object Transfer protocol) etc.

Audio frame structure (5)Frame header has 32 bits, arranged as follows:AAAAAAAA AAAABCCD EEEEFFGH IIJJKLMM

A = sync word = 11111111 1111 B = ID. 0 = MEPG-2, 1 = MPEG-1 C = layer ID. 10 = Layer 2. (DAB uses it only) D = protection bit. Use 0 (with CRC) for DAB. E = bitrate index. From 32 kbps ~ 384 kbps. F = Sampling frequency. 01 = 48/24 kHz. G = padding = 0. No padding required H = private bit. Not used.

Audio frame structure (6)AAAAAAAA AAAABCCD EEEEFFGH IIJJKLMM. I = mode. 00 = stereo, 01 = joint stereo, 10 = dual channel, 11 = mono. J = mode extension. Used only if mode = 01. 00 = bound @ 4, 01 = bound @ 8, 10 = bound @12, 11 = bound @16. K = copyright. 0 = no, 1 = yes L = original/copy. 0 = copy, 1 = org. M = emphasis. Use 00 = no emphasis.

Audio Decoding (1)Sync frame header by finding 1111 1111 1111 Parse frame header to know the coding mode. Bitrate info can also be obtained from FIC. Use assigned BA table to parse BA. Parse SCFSI. No SCFSI for BA field of a SB = 0 Parse SCF based on SCFSI and BA. Parse SB samples. Watch out grouping codeword.

Audio Decoding (2)Check if frame CRC and SCF CRC are OK. Do error concealment if necessary. Re-quantize SB samples. Performe subband synthesis via better algorithms than ISOs. Synchronize CODEC Fs if necessary.

Audio Decoding (3)

Audio Decoding (4)Brief introduction to de-grouping and requantize the SB samples. 1. De-grouping: for i = 0 to 2 S[i] = c % nlevel c = c div nlevel 2. S = Invert MSB of S. S is 2scomplement fractional number. 3. S= C * (S + D). C & D in tables of spec. 4. S = S * SCF

Audio Decoding (5)Subband synthesis from ISOs spec: Input 32 new subband samples, Si, i = 0,.., 31 Shifting: for i =1023 down to 64 do V[i] = V[i-64] Matrixing: for i = 0 to 63 do 31 (16 + i )(2k + 1) V[i] = cos Sk 64 k =0

Audio Decoding (6)Build a 512 vector U: for i = 0 to 7 do for j = 0 to 31 do U[i*64+j] = V[i*128+j] U[i*64+32+j] = V[i*128+96+j] Window by 512-coefficient matrix D: for i = 0 to 511 do W[i] = U[i] * D[i]

Audio Decoding (7)Calculate 32 PCM samples: for j = 0 to 31 dos j = W[ j + 32i]i =0 15

Output 32 reconstructed PCM samples sj.

Audio Decoding (8)Subband synthesis algorithm mentioned previously is slow We can avoid data shifting by using circular queue. Matrixing can be more efficient if DCT is in use. Cf. IEEE SPL, vol. 1, no. 2, pp. 26 28, 1994. A fully optimized code can be at least five times faster!

Conclusions (1)Present status of DAB broadcasting in Taiwan ETSI 300 401 standard OFDM principle Synchronization techniques: why and how Implementation of digital down converter Concept of channel demod and decoding Frequency interleaving Time interleaving

Conclusions (2)Error correction codes and Viterbi algorithm Contents of FIC Decoding of MSC Brief intro to psychoacoustics Audio encoding flow Audio frame structure Audio decoding, including subband synthesis