Chap 4 Sampling of Continuous-Time Signals Introduction

 4.1 Periodic Sampling  4.2 Frequency-Domain Representation of Sampling  4.3 Reconstruction of a Bandlimited Signal from its Samples  4.4 Discrete-Time Processing of Continuous-Time Signals  4.5 Continuous-Time Processing of Discrete-Time Signals  4.6 Changing the Sampling Rate Using Discrete-Time Processing  4.7 Multirate  4.8 Digital Processing of Analog Signals  4.9 and Noise Shaping in A/D and D/A Conversion

2018/9/18 DSP 2 Periodic Sampling

 Sequence of samples x[n] is obtained from a continuous-time signal xc(t) :  x[n] = xc(nT), - infinity < n < infinity  T : sampling period

 fs = 1/T : sampling frequency, samples/second

C/D Continuous-to-discrete-time Xc(t) converter X[n] = Xc(nT)

T  In a practical setting, the operation of sampling is often implemented by an analog-to-digital (A/D) converter which can be approximated to the ideal C/D converter.  The sampling operation is generally not invertible.  The inherent ambiguity in sampling is of primary concern in signal processing.

2018/9/18 DSP 3 Sampling with a Periodic Impulse Train

s(t) C/D Converter Conversion from impulse train x[n] = x (nT) x (t) X C C xS(t)to discrete-time sequence

xC(t) xC(t) xS(t) 2 Sampling Rates xS(t)

-4T 0 2T -4T 0 2T

x[n] 2 Output Sequences x[n]

-4 0 2 -4 0 2

2018/9/18 DSP 4 Frequency-domain representation of sampling

 The conversion of xc(t) to xs(t) through modulating signal s(t)

which is a periodic impulse train s(t)   (t  nT ) n  xs (t)  xc (t)s(t)  xc (t)  (t  nT ) n by shifting property of the impulse  xs (t)   xc (nT)(t  nT) n  The Fourier transform of a periodic impulse train is a periodic impulse train.

2  {s(t)}  S( j)  (  ks ) T k

where  s 2/  T : sampling frequency in radians/sec

2018/9/18 DSP 5 Frequency-domain representation of sampling 1 1  X s ( j)  X c ( j)S( j)   X c ( j  kjs ) 2 T k

 xc(t) can be recovered from xs(t) with an ideal lowpass filter with frequency response Hr(j ).  Xr(j ) = Hr(j )Xs(j )

where  s > 2  N  If Hr(j ) is an ideal lowpass filter with gain T and cutoff frequency such that

  N <  c < ( s -  N ) then Xr(j ) = Xc(j )  ALIASING is the distortion in reconstruction process due to

 s  2  N  Nyquist Sampling Theorem : Let xc(t) be a bandlimited signal with Xc(j ) = 0 for |  | >  N . Then xc(t) is uniquely determined by its samples

xc[n] = xc(nT), n = 0,  1,... if  s 2/  T > 2  N  N: and 2  N:

2018/9/18 DSP 6 Nyquist Sampling Theorem

2018/9/18 DSP 7 Effect in the frequency domain of sampling in the time domain

XC(j) 1 Spectrum of the original

-N N S(j) Spectrum of the sampling function 2/T

-S 0 S X (j) S = 2N Effect S  > 2 S N S < 2N

-S -N N S Spectrum of the sampled signal

2018/9/18 DSP 8 2018/9/18 DSP 9 Example 4.1

 If we sample the continuous-time signal

xc ( t ) cos(4000 t ) with a sampling period T=1/6000

 In this case, s 212000/T  The conditions of the Nyquist sampling theorem are satisfied.

 The Fourier transform of xc(t) is

Xjc( )  ()   40004000 ()  

2018/9/18 DSP 10 Figure 4.6 (a) Continuous-time and (b) discrete-time Fourier transforms for sampled cosine signal with frequency

Ω0 = 4000π and sampling period T = 1/6000. Relation between Continuous and Discrete- Time Domains

2018/9/18 DSP 12 Relation between Continuous and Discrete-Time Domains

2018/9/18 DSP 13 Relation between Continuous and Discrete-Time Domains

2018/9/18 DSP 14 Aliasing

2018/9/18 DSP 15 Frequency-domain representation of sampling 3  The discrete Fourier transform of the sequence x[n] is  X(e j )   x[n]e jn n

where x[n] = xc(nT). But

   jTn X s ( j)  {xs (t)}  {  xc (nT) (t  nT)}   xc (nT)e n n so 1  X ( j)  X(e j )|  X(e jT )  X ( j  jk ) s T T  c s or k

 j 1  2k X(e )   Xc ( j  j ) T k T T

2018/9/18 DSP 16 2018/9/18 DSP 17 Reconstruction of a Bandlimited Signal from its samples

 Samples of a continuous-time bandlimited signal taken frequently enough are sufficient to represent the signal exactly in the sense that the signal can be recovered from the samples and from the knowledge of the sampling period.

 If Hr(j W) has gain T and cutoff frequency pi/T then sin(t / T) h (t)  r t / T and   sin[(t  nT) / T] xr (t)   x[n]hr (t  nT)   x[n] n n (t  nT) / T

This means that the ideal lowpass filter interpolates between the impulses of xs(t) to construct a continuous-time signal xr(t).   jTn jT Xr ( j)   x[n]Hr ( j)e  Hr ( j)X(e ) n

2018/9/18 DSP 18 Block diagram, frequency response, and impulse response of an ideal bandlimited signal reconstruction system

Ideal reconstruction system

Convert the Ideal xS(t) sequence to reconstruction x[n] impulse train filter Hr(j) x r (t) Sampling period T

H (j) h r(t) r 1 T

t   -/T /T -3T -T 0 T 3T

2018/9/18 DSP 19 2018/9/18 DSP 20 Ideal bandlimited interpolation

2018/9/18 DSP 21 Discrete-time processing of continuous-time signal

2018/9/18 DSP 22 Discrete-Time Processing of Continuous- Time Signals 2  C/D converter produces a discrete-time signal

x[n]  xc (nT)  j 1  2k X(e )   Xc ( j  j ) T k T T  Linear Time-Invariant Discrete-Time Systems Y(ej) = H(ej)X(ej) jT jT and Yr(j) = Hr(j)H(e )X(e ) with  = /T

 D/C converter creates a continuous-time output signal  sin[(t  nT) / T] yr (t)   y[n] n (t  nT) / T jT Yr ( j)  Hr ( j)Y(e )

2018/9/18 DSP 23 2018/9/18 DSP 24 Example of Ideal Continuous-Time Lowpass Filtering Using a Discrete-Time Lowpass Filter a) Fourier transform of a bandlimited input signal b) Fourier transform of the sampled input c) Discrete-time Fourier transform of sequence of samples and frequency response of the discrete-time system d) Fourier transform of output of the discrete-time system e) Fourier transform of output of the discrete-time system and frequency response of ideal reconstruction filter f) Fourier transform of output

2018/9/18 DSP 25 Discrete-Time Processing of Continuous-Time Signals

Example 4.4 Discrete-Time Implementation of an Ideal Continuous-Time Bandlimited Differentiator d eq. 4.43 y ( t )  x ( t ) ccdt

eq. 4.44 Hc ( j )  j  Discrete-Time Processing of Continuous-Time Signals

 jT ,/   eq.4.45() Hjeff  0,/  T j eq. 4.46(), Hej  T 0,0 n   eq. 4.47 hn   cos n ,0n   nT Figure 4.13 (a) Frequency response of a continuous-time ideal bandlimited differentiator Hc (jΩ) = jΩ, |Ω| < π/T. (b) Frequency response of a discrete-time filter to implement a continuous-time bandlimited differentiator. Discrete-Time Processing of Continuous- Time Signals: Impulse Invariance  The LTI behavior of the system depends on 2 factors: discrete-time system must be linear and time-invariant input signal must be bandlimited and the sampling rate must be high enough so that any aliased components are removed by the discrete-time system  Discrete-time system is said to be an impulse- invariant version of the continuous-time system when

h[n] = Thc(nT) j and H(e ) = Hc(j/T), || < and = 

2018/9/18 DSP 29 Impulse Invariance

Figure 4.14 (a) Continuous-time LTI system. (b) Equivalent system for bandlimited inputs.

30 Impulse Invariance

j eq. 4.48()(/), H eHjTc 

eq. 4.49()0,/ HjTc    

eq. 4.50 h n  Thc ( nT )

31 Impulse Invariance

From sampling depicted in Eq. (4.16)

eq. 4.51 h n  hc ( nT )  j 12k eq. 4.52() H eHj  c  TTTk  

j 1  eq. 4.53 H ( e ) Hc  j ,  TT Modifying Eqs (4.51) and (4.53) to account for the scale factor of T, we have

eq. 4.54 h n  Thc ( nT ) j  eq. 4.55 H ( e ) Hc  j ,  T 32 Impulse Invariance Example 4.5 A Discrete-time Lowpass Filter obtained by Impulse Invariance

1,   c Hjc () 0,   c

sin( t ) ht() c c  t

sin( nT ) sin( n ) h n  Th() nT  T cc  c nT n

1,  j  c He()  0, c   

33 Continuous-Time Processing of Discrete- Time Signals

2018/9/18 DSP 34 2018/9/18 DSP 35 Continuous-Time Processing of Discrete- Time Signals

 For ideal D/C : Xc(jW) and Yc(jW) are zero for ||/ T  We can express D/C as follows.  sin[(t  nT) / T] xc (t)   x[n] n (t  nT) / T  sin[(t  nT) / T] yc (t)   y[n] n (t  nT) / T where x[n] = xc(nT) and y[n] = yc(nT) , and frequency-domain : jT Xc ( j)  TX(e ),......    / T

Yc ( j)  Hc ( j)Xc ( j),....    / T 1 Y(e j )  Y ( j / T),......    T c Overall system behaves as a discrete-time system whose j H(e )  Hc ( j / T),......    and if frequency response of continuous-time system is jT Hc ( j)  H(e ),......    / T

2018/9/18 DSP 36 Continuous-Time Processing of Discrete-Time Signals Example 4.7 Noninteger Delay

eq. 4.61(), H eejj 

eq. 4.62 ynx  n  

j Tj  T  eq. 4.63()() HjHc  ee

eq. 4.64( )()ytxtTcc Continuous-Time Processing of Discrete-Time Signals

eq. 4.65( y )() n  ycc nT  x nT T  sin ()t / TkT   T    xk  k   ()t / TkT   T t nT  sin ()nk     xk  k   ()nk   Figure 4.16 (a) Continuous-time processing of the discrete-time sequence (b) can produce a new sequence with a “half-sample” delay. Example 4.8

2018/9/18 DSP 40 Example 4.8

1 sin(1) /M 2   eq. 4.66(), H eejj M /2  (1)sin(M  / 2) 

If M is an even integer, then the linear-phase term corresponds to an integer delay eq. 4.67/ 2 y nn  M  Figure 4.18 Illustration of moving-average filtering. (a) Input signal x[n] = cos(0.25πn). (b) Corresponding output of six-point moving-average filter. Changing The Sampling Rate Using Discrete-Time Processing  Sampling Rate Reduction by an Integer Factor  Increasing the Sampling Rate by an Integer Factor  Changing the Sampling Rate by a Noninteger Factor

 Sampling Rate Reduction  Increase period  Decrease frequency

2018/9/18 DSP 43 Sampling Rate Reduction by an Integer Factor  Sampling Rate Reduction by an Integer Factor

xd[n] = x[nM] = xc(nMT) system called Sampling Rate Compressor or Compressor operation called Downsampling

 xd[n] is an exact representation of xc(t) if /(MT) > N  sampling rate can be reduced by a factor of M without aliasing if the original sampling rate was at least M times the Nyquist rate or if the bandwidth of the sequence is first reduced by a factor of M by discrete-time filtering

 Fourier transform of discrete-time sampled sequence xd[n] is

 j 1  2r Xd (e )   Xc ( j  j ) MT r MT MT where r = i+kM, -infinity < k < infinity and 0 < and = i < and = M-1 M1 j 1 j(/ M2i/ M) Xd (e )   X(e ) M i0  Lowpass filter+Compressor = Decimator 2018/9/18 DSP 44 2018/9/18 DSP 45 2018/9/18 DSP 46 General system for sampling rate reduction by integer factor M

x[n] Lowpass filter x~[n] ~ ~ xd [n] = x [nM] Gain = 1 M Cutoff = /M

Sampling Sampling Sampling period T period T period T’ = MT

2018/9/18 DSP 47 Sampling rate reduction by 2

2018/9/18 DSP 48 Downsampling with aliasing (a to c) and with prefiltering to avoid aliasing (d to f).

2018/9/18 DSP 49 Increasing the Sampling Rate by an Integer Factor

 Increasing the Sampling Rate by an Integer Factor

xi[n] = x[n/L] = xc(nT/L), n = 0, ±L, ± 2L, ...  system called Sampling Rate Expander or Expander  operation called or Interpolation  xe[n]   x[k][n  kL] and k   jj nj Lkj L  Xe ( ex k)[ ] n [][ kL ]( ex ) k  eX (4.85) e n kk 

j j  Xi(e ) can be obtained from Xe(e ) by correcting the amplitude scale from 1/T to L/T and by removing all the frequency-scaled images of Xc(j) except at integer multiples of 2  sin[(n  kL) / L] xi [n]   x[k] k (n  kL) / L

2018/9/18 DSP 50 General system for sampling rate increase by integer factor L

x[n] xe[n] Lowpass filter xi[n] L Gain = L Cutoff = /L Sampling Sampling Sampling period T period T’ = T/L period T’ = T/L

2018/9/18 DSP 51 Increasing sampling rate (Interpolation) by 2

2018/9/18 DSP 52 Linear Interpolation

 In practice, ideal lowpass cannot be implemented exactly.  In some case, very simple interpolation procedures are adequate.  Linear interpolation can be accomplished by the system below if the filter has impulse response

x[n] x [n] x [n] e Lowpass filter i L Gain = L Sampling Sampling Cutoff = /L Sampling period T period period T’ = T/L T’ = T/L

hlin[n] = 1 - |n|/L, |n| ≦ L; 0, otherwise.

2018/9/18 DSP 53 Linear Interpolation by Filtering

 Impulse response for linear interpolation:

hlin[n] = 1-|n|/L, n < and = L 0 , otherwise

 Illustration of linear interpolation by filtering.

 Frequency response of linear interpolator compared with ideal lowpass interpolation filter.

2018/9/18 DSP 54 2018/9/18 DSP 55 Changing the Sampling Rate by a Noninteger Factor

 If the filter has impulse response hlin[n] = 1-|n|/L, |n| ≦ L = 0, otherwise the interpolated output will be

  xlin[n]   xe[k]hlin[n  k]   x[k]hlin[n  kL] k k

 Changing the Sampling Rate by a Noninteger Factor  If x[n] was obtained by sampling at the Nyquist rate, the

sequence xn d [] will represent a lowpass-filtered version of the original underlying bandlimited signal if we are to avoid aliasing.  If M < L, then p/L is the dominant cutoff frequency and there will be no need to further limit the bandwidth of the signal below the original Nyquist frequency

2018/9/18 DSP 56 Interpolator Decimator

x[n] xe[n] Lowpass filter xi[n] Lowpass filter xo[n] xd[n] L Gain = L Gain = 1 M Cutoff = /L Cutoff = /M

T T/L T/L T/L TM/L

Lowpass filter x[n] xe[n] Gain = L xo[n] xd[n] L Cutoff = M min(/L, /M)

T T/L T/L TM/L 2018/9/18 DSP 57 2018/9/18 DSP 58 2018/9/18 DSP 59 2018/9/18 DSP 60 Multirate Signal Processing

 Changing sampling rate  requires large amount of computation  Concepts of multirate signal processing  Classical technique: to change the sampling rate of a digital signal is to convert it back into analog and then re-digitize it at the new rate.  Disadvantage of this classical technique: quantization and aliasing errors will degrade the signal.  Better technique: to process digital signal in a digital form until conversion to analog is necessary.  Multirate processing is basically an efficient technique for changing the sampling frequency of a signal digitally.  The processes of decimation and interpolation are the fundamental operations in multirate signal processing, and they allow the sampling frequency to be decreased or increased without significant, undesirable effects of errors.

2018/9/18 DSP 61 Multirate Signal Processing Techniques

Normally, there are many techniques because of their widespread applicability. Two basic techniques are as follow: Interchange of filtering and downsampling/upsampling Polyphase decomposition Polyphase decomposition of a sequences is obtained by representing it as a superposition of M subsequences, each consisting of every Mth value of successively delayed versions of the sequence.

2018/9/18 DSP 62 Interchange of Filtering and Downsampling/Upsampling

 In the figures Two equivalent systems

j j  M j  Xb ( e ) H ( e ) X ( e ) (4.98) M From Eq. (4.77), we have H(z ) M x[n] x [n] y[n] M 1 b jj M1  i M ( / 2 / ) Y ( eX )() e (4.99) b M i0 Substituting Eq. (4.98) into Eq. (4.99) gives M H(z) x[n] x [n] y[n] 1 M 1 a Y ( eHjj )( e  i ) X j  e(). M ( (  i 2 M ) ( / 2 / ) 4.100) M i0 Since H ( ej( 2  i ) ) H ( e j  ), Eq. (4.100) reduces to M 1 j jj  M1  i M(  / 2j / ) j Y ( e ) H ( e ) X () eH e ( X ) e ( ) (4.101)a M i0

2018/9/18 DSP 63 Interchange of Filtering and Downsampling/Upsampling

Similarly, we have from Eq. (4.85) jj Lj Lj L Y( eX )()() eXa eH () e (4.102) Since from Eq. (4.85) jj L Xb ( eX )(), e it follows that Eq. (4.102) is, jj Lj Y( eH )() eX ( e ), b which corresponds to Fig. 4.32(b)

H(z) L L H(zL) x[n] xa[n] y[n] x[n] xb[n] y[n] Two equivalent systems

2018/9/18 DSP 64 Polyphase Decompositions

 The polyphase decomposition of a sequence is obtained by representing it as a superposition of M subsequences.  Consider an impulse response h[n] that we decompose

into M subsequences hk[n] h[], nkn integer multiple of M, hnk []   0, otherwise  We can reconstruct the original impulse response h[n]

M 1 h[ nhnk ][] k k0  In Fig. 4.32 and 4.33,

ekk[][][] n h nM  k  h nM

2018/9/18 DSP 65 2018/9/18 DSP 66 Polyphase Decompositions

 The polyphase representation corresponds to expressing H(z) as

M 1 MkMnM H[ zEzzEzh ]();  ()[]kkk nM z kn0

2018/9/18 DSP 67 Polyphase Implementation of Decimation Filters  To obtain a more efficient implementation of filters whose output is then downsampled, we can exploit polyphase decomposition of the filter.  Suppose we express h[n] in polyphase form with polyphase components

ekk[ nh ][][] nMkh nM

M 1  From Eq. (4.105), Mk H[ zE ](  z ) zk k0

H(z) M x[n] y[n] w[n]=y[nM] 2018/9/18 DSP 68 Figure 4.39 Implementation of decimation filter using polyphase decomposition. Figure 4.40 Implementation of decimation filter after applying the downsampling identity to the polyphase decomposition. Polyphase Implementation of Decimation Filters Suppose that the input x[n] is clocked at a rate of 1 sample per unit time and that H(z) is an N-point FIR filter. Straightforward implementation N multiplications and N-1 additions per unit time

Polyphase: each of the filters Ek(z) is of length N/M and their inputs are clocked at a rate of 1 per M units of time Each filter requires (1/M)(N/M) multiplications per unit time and (N/M-1)+(M-1) additions per unit time.

2018/9/18 DSP 71 Digital Processing of Analog Signals

Prefiltering to avoid aliasing Analog-to digital (A/D) conversion Analysis of quantization errors Digital-to-analog (D/A) conversion

2018/9/18 DSP 72 Prefiltering to Avoid Aliasing

Ideal C/D converter (approximation) analog-to-digital (A/D) converter Ideal D/C converter (approximation) digital-to-analog (D/A) converter

Anti- Discrete- xC(t) xa(t) x[n] y[n] yr(t) aliasing C/D Time D/C filter System

Haa(j) T T Discrete-time filtering of continuous-time signals

xc(t) xa(t) xo(t) x^[n] y^[n] yDA(t) yr^(t) Anti- Sample Compensated Discrete-time aliasing and A/D D/A reconstruction system filter hold filter ~  Haa(j) Hr (j ) T T T

Digital processing of analog signals 2018/9/18 DSP 73 Prefiltering to Avoid Aliasing

1, | |/   , c   T Hjaa ()  0, | |  c jT He( ), | |  c , Hjeff ()  0, | |  c jT Heffaa( jH )(  j ) H ( e )

2018/9/18 DSP 74 Using oversampled A/D conversion to simplify a continuous-time antialiasing filter

Sampling rate reduction by M

Sharp x (t) Simple x (t) x^[n] x [n] C a antialiasing d antialiasing C/D filter M filter cutoff = /M

T = (1/M)(/N)

2018/9/18 DSP 75 Using oversampled A/D conversion to simplify a continuous-time antialiasing filter Idealized filter  for preventing aliasing Such sharp-cutoff analog filters can be realized using active networks and integrated circuits. Sharp-cutoff filters are difficult and expensive to implement, and if the system is to operate with a variable sampling rate, adjustable filters would be required.

2018/9/18 DSP 76 Use of oversampling followed by decimation in C/D conversion

2018/9/18 DSP 77 Analog-to-Digital (A/D) Conversion

 An ideal C/D converter converts a continuous-time signal into a discrete-time signal, where each sample is known with infinite precision.  An approximation to ideal C/D converter for digital signal processing, the system below converts a continuous-time (analog) signal into a digital signal, i.e., a sequence of finite-precision or quantized samples.

Physical configuration for analog-to-digital conversion. Sample xa(t) xO(t) A/D xB^[n] and Converter Hold

T T

2018/9/18 DSP 78 Ideal Sample-and-Hold System

 s ( t )  ( t  nT ) n 

x Zero-order xa(t) xS(t) hold hO(t) xO(t)

Sample-and-Hold System x (t) a xO(t)

-3T -2T -T 0 T 2T 3T 4T 5T

2018/9/18 DSP 79 Sample and Hold

 Normally, "sample and hold" is a ADC term, in which an analog signal is "sampled" by charging a capacitor to voltage of the signal, and then "held", by disconnecting the charge circuitry and giving the convertor stage some time to digitize the (now constant) held sample.

2018/9/18 DSP 80 Sample and Hold

 In terms of DACs. You can output a sampled waveform by writing each (digital) sample to the DAC at a fixed interval. If the DAC has a fast settling time relative to the frequency that you write to it, this method will produce a "staircase" form of output.

 In the case where the DAC settling time is fast, sometimes it can be filtered digitally by computing (interpolating) one or more points between each sample pair and outputting them at a rate faster than the "sample and hold" case. The waveform will then appear to be comprised of a series of ramps rather than steps. So it will appear "smoother" (more continuous).

2018/9/18 DSP 81  x00( tx )[ n ] h () t nT n

x[ nx ]() nTa  1, 0 tT ht0 ()  0, otherwise  x00( th )( )() tx nTt()  nTa  n

2018/9/18 DSP 82 Physical system and its conceptual representation

Physical configuration for analog-to-digital conversion. Sample xa(t) xO(t) A/D xB^[n] and Converter Hold

T T

Conceptual representation of the physical system

xa(t) x[n] x^[n] xB^[n] C/D Quantizer Coder

T

2018/9/18 DSP 83 Typical Quantizer for A/D Conversion

2018/9/18 DSP 84 Typical Quantizer for A/D Conversion

 If we have a (B+1)-bit binary two’s-complement

fraction of the form aaaa012 ... B

0 1  2 B Then its value is a02  a 1 2  a 2 2  ...  aB 2

 Xm is the full-scale level of the A/D converter.  The step size of the quantizer is 2XX   mm 22BB1  The numeric relationship between the code words and the quantized samples is

xˆ[[[] n XmB xˆ n

1 xnˆB [ ]  1 (for two's complement) 2018/9/18 DSP 85 Sampling, Quantization, Coding, and D/A Conversion with a 3-bit Quantizer

2018/9/18 DSP 86 Analysis of Quantization Errors

 The difference between the quantized sample x^[n] and true sample value x[n] is the quantization error: e[n] = x^[n] – x[n].  If linear round-off (B+1)-bit quantizer is used, then -D/2 < e[n] < = D/2 which holds whenever

(-Xm – D/2) < x[n] < = (Xm – D/2) where D is step size of the quantizer: B D = Xm/2  If x[n] is outside the range mentioned above, then the qunatization error is larger in magnitude than D/2 and such samples are said to be clipped.

2018/9/18 DSP 87 Additive Noise Model for Quantizer

x[n] Quantizer x^[n] = Q{x[n]} Q{.}

x[n] x^[n] = x[n] + e[n] +

e[n]

2018/9/18 DSP 88 Analysis of Quantization Error 2

 The statistical representation of quantization errors is based on the following assumptions:  The error sequences e[n] is a sample sequence of a stationary random process.  The error sequence is uncorrelated with the sequence x[n].  The random variables of the error process are uncorrelated; i.e., the error is a white-noise process.  The probability distribution of the error process is a uniform over the range of quantization error.

/2 1 2 22B X  22e de   m e   /2  12 12

2018/9/18 DSP 89 Example of Quantization Noise for a Sinusoidal Signal

2018/9/18 DSP 90 Conclusion of Quantization Error

 In low number-bit case, the error signal is highly correlated with the unquantized signal.  The quantization error for high number-bit quantization is assumed to vary randomly and is uncorrelated with the unquantized signal.

2 2 SNR= 10log10(sx /se ) 2B 2 2 = 10log10(12*2 sx /Xm ) for rounding quantizer = 6.02B + 10.8 –20log10(Xm/sx)

 The SNR ratio increases approximately 6 dB for each bit added to the word length of the quantized samples.

2018/9/18 DSP 91 2018/9/18 DSP 92  For analog signals such as speech or music, the distribution of amplitudes tends to be concentrated about zero and falls off rapidly with increasing amplitude.  The probability that the magnitude of a sample will exceed 3 or 4 times the RMS value is very low.  For example, obtaining a signal-to-noise ratio of about 90~96 dB for use in high quality music recording and playback requires 16- bit quantization.  But it should be remembered that such performance is obtained only if the input signal is carefully matched to the full-scale range of the A/D converter.  The trade-off between peak signal amplitude and absolute size of the quantization noise is fundamental to any quantization process.

2018/9/18 DSP 93 D/A Conversion

x (t) x^[n] D/A DA Converter

Convert xB^[n] Scale by x^[n] Zero-order xDA(t) to X hold m impulses

2018/9/18 DSP 94 D/A Conversion

2018/9/18 DSP 95 D/A Conversion

2018/9/18 DSP 96 D/A Conversion

2018/9/18 DSP 97 Frequency response of zero-order hold compared with ideal interpolating filter and ideal compensated reconstruction filter for use with a zero-order-hold output

T Ideal interpolating

Filter Hr(j) Zero-order

Hold |HO(j)|

-2/T -/T 0 /T 2/T 

~ |Hr (j)|

1

-/T 0 /T 

2018/9/18 DSP 98 D/A Conversion

j Yja()()()()()()  HjHjHeHjXj r 0  aa  c  j Heff()()()()() j  H r j  H0 j  H e H aa j 

2018/9/18 DSP 99 Project of Chapter 4

Download an audio signal file with a sampling rate of 16 KHz from the course Web site and process the signal as follows. Change the sampling rate to 12 KHz for the audio signal.  Please upload your program and the results to the ftp site within two weeks after the date of project assignment. The audio signal files can be downloaded from the website. The ftp site can be found at the course website.

2018/9/18 DSP 100