Data Converter Overview Introduction Pietro Andreani Dept. of Electrical and Information echnology Lund Univerity, Sweden Introduction he ideal A/D and D/A data converter Sampling Amplitude quantization in A/D converion Quantization noie Sampled thermal noie (k/c noie) Dicrete Fourier ranform (DF) and Fat Fourier ranform (FF) he D/A converter Dicrete-time tranform: the z-tranform Data Converter Introduction he ideal data converter Sampling A ampler tranform a continuou-time ignal x t into a ampled-data equivalent, x t : () () () ( ) () δ ( ) x t x n x t t n ranformation from continuou-time and continuou-amplitude to dicrete-time and dicrete-amplitude (and vicevera) Only the value at the ampling intant matter! Data Converter Introduction 3 Data Converter Introduction 4
Sampling i a non-linear proce ime and frequency domain I Sampled ignal: f () t f () t δ ( t n) n We define: () δ ( ) () () () g t t n f t f t g t n with Laplace/Fourier tranform we obtain n δ ( ) ( ) ( ) L t n e F x n x n e jnω n and alternatively (hown in the next lide) 1 π F x ( n) X ( ω nω), ω n It i well-known that the tranform of the product of two function of time i given by the convolution of the repective tranform: ( ) ( ) ( ω) ( ω) f t g t F G rain of delta with period can be repreented, a any -periodic function, with a Fourier erie: g () t jk t k ( t n ) a e k, π ω + δ φ ω n k Data Converter Introduction 5 Data Converter Specification 6 ime and frequency domain II Uing the complex Fourier erie, we obtain: 1 1 1 a g t e dt t e dt k ω () δ () jk t jkωt 0 0 I it poible to recover the original ignal from F*(ω)? bilateral pectrum of continuou-time ignal which mean that the pectrum G(ω) of g(t) i a erie of line at frequencie kω, all with amplitude 1/. hi mean that we can write G(ω) a Finally: G 1 ( ω ) δ ( ω k ω ) k F F G F 1 k 1 F k k k ( ω ) ( ω ) ( ω ) ( ω ) δ ( ω ω ) ( ω ω ) 1 F ( ω nω ) aliaing! pectrum of ampled ignal, f / > f B pectrum of ampled ignal, f / < f B Data Converter Specification 7 Data Converter Introduction 8
Nyquit theorem Proof of Nyquit theorem Original ignal recovered via brick-wall LP filter rect A band-limited ignal x(t), whoe pectrum X(jω) vanihe for ω > ω /, i fully decribed by a uniform ampling x(n), where π/ω. he band-limited ignal x(t) i recontructed by: () x( n) x t ( ω ( t n) ) ( t n) / in / ω Half the ampling frequency, f / 1/, i referred to a the Nyquit frequency. he frequency interval 0.. f / i referred to a the Nyquit band (or bae-band), while the interval f /..f, f..3f / etc are called econd, third etc Nyquit zone. 1 F F k F F rect k ( ω) ( ω ω) ( ω) ( ω) ( ω, ω ) ( ) ( ω t ) ( ω ( t n) ) ( t n) / ( ω t ) 1 in / π 1 in / xt () x ( n) xt () δ ( t n) π t/ ω π t/ x n in / ω ω / Data Converter Introduction 9 Data Converter Introduction 10 More about aliaing I More about aliaing II An infinite number of higher-frequency ignal contribute to the low-frequency ampled data the deired low-frequency ignal may well be detroyed! (in fact, conidering the unbound frequency pectrum, the Nyquit condition i urely not fulfilled!) Signal are mirrored around the Nyquit frequency f / ω ω in t in ωt 10 5 ω ω 3 in + t in ωt 10 5 Data Converter Introduction 11 Data Converter Introduction 1
Anti-aliaing filter I Anti-aliaing filter II Signal folding! he anti-alia filter protect the information content of the deired ignal Ue an anti-aliaing filter in front of the ampler to reject unwanted interference from outide the band of interet Complexity depend on band-pa ripple, tranition-region teepne, and top-band attenuation. Data Converter Introduction 13 Data Converter Introduction 14 Under-ampling I Under-ampling II Exploit the bae-band folding of ignal at frequencie higher than the Nyquit limit (f /) bring high-frequency pectra into bae band mirrored Alo known a harmonic ampling, bae-band ampling, IF ampling, RF-to-digital converion, etc At firt ight, attractive a RF demodulator, but: bandwidth, ditortion, and jitter performance mut till meet the pec at RF! Further, wide-band noie i alo ampled! non-mirrored Data Converter Introduction 15 Data Converter Introduction 16
Under-ampling III Sampling-time jitter Any clock ignal i affected by jitter (noie on the zero croing ) Alo under-ampling require an anti-aliaing filter Large error with teep ignal lope Remove unwanted ignal occurring at bae-band or in any other Nyquit zone In the cae of under-ampling, the anti-aliaing filter i a band-pa filter around the ignal band Data Converter Introduction 17 Data Converter Introduction 18 Sampling error caued by jitter For a ine wave x t Ain ω t in () ( in ) ( ), the jitter-induced error Δx n i ( ) ωδ( ) co( ω ) Δ x n A n n in δ ( ) () Aume that n i the ampling of a random variable δ ji t ; we obtain: A ω x ji t A in inn n n in () ω co( ω ) δ ( ) δ ( ) in Maximum jitter v. input frequency and SNR SNR he jitter-limited SNR i therefore: S SNR 10 log 0 log in N ( ω δ ( n ) ) Jitter may be the limiting factor in data converion: if SNR90dB and f in 100MHz, then the clock jitter mut be below 50f Data Converter Introduction 19 Data Converter Introduction 0
Amplitude quantization quantization error Quantization noie N M N # of bit Y Xin + εq nδ< Xin < ( n+ 1) Δ Δ ε Δ Q X FS Δ M XFS Xmax Xmin M # of quantization level he quantization error i a form of data corruption fundamentally unavoidable in A/D data converion (unle N i infinite) he quantization error can be viewed a a form of noie Frequent code tranition decorrelate ucceive ample of the quantization error, preading it pectrum and making it reemble white noie Neceary condition for thi very convenient aumption are: 1. A large number of quantization level are ued (uually true, except for ΔΣ converter). he quantization tep are uniform (uually true) 3. All quantization level are exercied with equal probability (true if input ignal i large) 4. he quantization error i not correlated with the input (uually true, with ome care) Data Converter Introduction 1 Data Converter Introduction An example Quantization noie propertie he quantization error i confined between -Δ/ and Δ/, and may aume any value between -Δ/ and Δ/ with equal probability p p ( εq ) 1 Δ Δ if - < εq < Δ 0 otherwie quantized ignal (10 bit) quantization error (f 150f in ) Notice that in thi cae (f multiple of f in ) the quantization error i obviouly correlated with the input ine wave he average power of the quantization error become: ε P p d d Δ Q Δ Q εq ( εq) εq εq Δ 1 Δ Data Converter Introduction 3 Data Converter Introduction 4
Quantization noie and SNR Equivalent number of bit (ENOB) Within a dynamic range of X FS, the power of a maximum-amplitude ine wave i X FS P in and for a triangular wave i he maximum SNR become: 0 n ( Δ) 1 XFS XFS in ( t) dt ω 4 8 8 P trian FS n ( Δ) X 1 1 P SNR n db SNR ( ) in in 10 log 6.0 + 1.76 PQ trian Ptrian 10 log ( 6.0 n) db P Q he effective SNR i the real meaure of the reolution of a data converter. Meaured in bit, it i called the ENOB: ENOB in SNReff 1.76 db 6.0 If, for example, there i a ampling jitter δ ji, the effective SNR become SNR eff X 8 1 10log Δ 1 + 8 8 1 + FS 10log N ( ωδ in ji X FS ) ( ωδ in ji ) Data Converter Introduction 5 Data Converter Introduction 6 ENOB with jitter Quantization noie noie power pectrum, p ε (f) p ( f ) ε i the Laplace tranform of the auto-correlation function of the quantization noie: jπ fτ jπ fn ε ( ) ε ( τ) τ ε ( ) p f R e d R n e R ε ( τ ) We aume that goe rapidly to zero for n >0, i.e., that only R ε ( 0) i different from zero. hu, R ε ( τ ) i a delta in the time domain, and a contant-valued function in the frequency domain. he unilateral power pectrum become therefore p ε ( f ) Δ 1 Δ f 6f ince the total noie power i uniformly pread over the unilateral Nyquit interval. Δ 1 0... f Data Converter Introduction 7 Data Converter Introduction 8
Bilateral noie power pectrum A remark about quantization noie In a bilateral repreentation, we have (in order to keep the total noie power contant): p ε ( f ) Δ 1 f We have een that the ampled ignal i band-limited between f / and f / (of coure, there i an infinite number of replica centered around multiple of ±f ) After quantization, the original band-limited ignal i expreed a the um of the band-limited quantized ignal and quantization noie; therefore, the bandwidth of the quantization noie mut be the ame a that of the original ampled ignal, i.e., between f / and f / Data Converter Introduction 9 Data Converter Introduction 30 Sampled thermal noie k/c noie ENOB limitation from k/c noie An unavoidable limit to the SNR come from the thermal noie aociated with a ampling witch, and depend only on the ampling capacitance (and not on the witch reitance!) hermal noie v. ampling capacitance, compared to the quantization noie Δ 1 (reference 1V). If both noie ource have the ame power, the SNR decreae by 3dB 0.5LSB v ( ω) 4kR + nc, 1 ( ωrc ) 4kR 1 k P df kr df C 4 ( ) ωrc ( ωrc ) nc, 01+ 01+ k C C 1pF k C 64.5μV Data Converter Introduction 31 Data Converter Introduction 3
hermal noie: an example I hermal noie: an example II A pipeline A/D ue a cacade of two S/H circuit in the firt tage. he jitter i 1p, X FS i 1V, f in i 5MHz. Determine the minimum C for ENOB 1 bit. Δ 1 he q-noie power i. We aume that an extra 50% total noie due to k/c + jitter noie i ok (SNR decreae by 1.76dB 0.9LSB). he noie budget for k/c and jitter noie together i then: v 1 1 Δ X 1 1 4 4 FS 9 n, budget vq.48 10 V N 4 he jitter affect only the firt tage (the econd tage ample the ignal held by the firt). he jitter noie i v 1 X FS 10 n, ji π finδ ji 1.3 10 V hu, the total noie power that can be tolerated by the ampler i 9 v nampler,.36 10 V Auming equal capacitance in both S/H circuit, the noie for each i 9 v nc, 1.18 10 V and the minimum ampling capacitance value i 1 k 4.14 10 C 3.51pF 9 v 1.1 10 nc, Notice that the jitter noie etablihe a maximum achievable reolution independently of C ; thi limit i, in thi cae, 14.7 bit Data Converter Introduction 33 Data Converter Introduction 34 Dicrete and Fat Fourier ranform I he pectrum of a ampled-data ignal i etimated uing n ( ) ( ) L x n x n e j n ( ) ( ω ) ( ) F x n X j x n e ω hi require an infinite number of tep; a convenient approximation i the Dicrete Fourier ranform (DF), which aume the input to be N-periodic: N 1 jπ kn ( N 1) X f x n e ( ) ( ) n 0 Spectrum made of N line (bin) located at where i DC and f i equal to f f f0 N 1 k k fk k N N Nyq ( ), 0 1 1 Dicrete and Fat Fourier ranform II he DF i (of coure) a complex function: ( ) Re ( ) ( ) Im ( ( )) X f X f + X f k k k Im ϕ ( X ( fk )) arctan Re ( X ( fk )) X ( f ) ( k ) he DF algorithm require N computation. For long ample erie, the Fat Fourier ranform (FF) algorithm i more effective, a it only require N log (N) computation. In the FF cae, N mut be a power of (which i therefore the uual choice). Data Converter Introduction 35 Data Converter Introduction 36
Periodicity aumption in DF/FF DF and FF aume the input i N-periodic. Real ignal are never periodic, and the N-periodicity aumption may lead to dicontinuitie between the lat and firt ample of ucceive equence! Spectral leakage If the number of ampled ignal period i NO exactly an integer number, a in the example below the Fourier coefficient are nonzero at all harmonic! hi i referred to a pectral leakage it look a if the ignal ha long kirt thi i NO to be confued with a proper noie floor! 0-10 -0-5 -10 dicontinuity Spectrum SNR db (db) -30-40 -50-60 -70 Spectrum SNR (db) db -15-0 -5-30 -35-40 -80 1010 1015 100 105 1030 1035 Input frequency (bin) -90 0 500 1000 1500 000 500 3000 3500 4000 4500 Input frequency (bin) Data Converter Introduction 37 Data Converter Introduction 38 Windowing Ueful tip Windowing addree thi problem by tapering the ending of the erie w ( ) ( ) ( ) x k x k W k When uing DF or FF, make ure that the equence of the ample i N-periodic; otherwie ue windowing With ine-wave input, avoid repetitive pattern in the equence: the ratio between the ine-wave period and the ampling period hould be a prime number (otherwie, noie will appear concentrated in only a few bin, in a non-white fahion) Data Converter Introduction 39 Data Converter Introduction 40
Windowing example Hann window Hann window ignal bin he Hann window greatly reduce the impact of pectral leakage Spectrum with rectangular window (previou example) Spectrum with Hann window (far from the ignal bin, it would be below a reaonable noie floor) Rectangular window + integer number of ignal period the ignal i found over a ingle frequency bin (a expected) Hann the ignal i pread over three bin ignal + two ideband Further, the amplitude of the central bin i 6dB lower than with rectangular windowing 0-50 0-5 Spectrum SNR db (db) -100-150 -00-50 Spectrum (db) -10-15 -0-5 -30-300 0 500 1000 1500 000 500 3000 3500 4000 4500 Input frequency (bin) -35 996 996.5 997 997.5 998 Input frequency (bin) Data Converter Introduction 41 Data Converter Introduction 4 More on windowing I ime-domain input (two ine-wave) before and after windowing (Blackman window) dicontinuity More on windowing II FF on ignal in previou lide: Rectangular window Blackman (or other) window pectral leakage (Notice: reduced amplitude, but amplitude i NO in db) contant ratio ok for comparion between tone Data Converter Introduction 43 Data Converter Introduction 44
I windowing avoidable? Windowing i an amplitude modulation of the input produce undeired effect a well A pike at the beginning/end of the equence i completely maked A we have een, windowing give rie to a kind of pectral leakage of it own (i.e., if the input i a ine wave, the pectrum i not a pure tone) he SNR meaurement can be accurate, but ee the previou point For input ine wave ue coherent ampling, for which an integer number k of ignal period fit into the ampling window; moreover, k mut be choen with care ampling period Coherent ampling: Contraint on k m k If: m a b and k a c a b a c in i.e., the q-noie equence repeat itelf a time, identically q-noie i not white (i.e., it i not (more or le equally) ditributed over all bin) o avoid thi, m and k hould be prime to each other; in particular, if m N, k hould be odd: odd number k ampling freq. ine-wave freq. fin f N in ignal period ( ) ( ) # of ample Data Converter Introduction 45 Data Converter Introduction 46 k and q-noie If k in f N in f k i not odd, the quantization noie repeat itelf in exactly the ame way two or more time acro the ampling equence q-noie i not white, but how repetitive pattern q-noie i concentrated at certain frequencie (bin)! he two imulation below ue the ame amount of ample, but notice how in the plot to the left the q-noie i much le white, with much higher peak (poibly hiding the higher harmonic) 0-0 -40 Spectrum, 16 ample ( 16 repetition) 1 ample, repeated 16 time 0-0 -40 Spectrum, 16 16 ample About the FF I he FF of an N-ample equence i made of N dicrete line equally paced in the frequency interval 0..f he pectrum in the econd Nyquit zone (f /..f ) mirror the bae band only half of the FF computation i intereting (0..f /) N/ pectral line (bin) in the bae band Each bin give the pectral power falling in the bandwidth f /N and centered around the bin frequency itelf hu, the FF operate like a pectrum analyzer with N channel each with bandwidth f /N -60-80 -100-60 -80-100 If the number of point in the erie increae, the channel bandwidth of the equivalent pectrum analyzer decreae, and each channel will contain le noie power -10 0 500 1000 1500 000 500 3000 3500 4000 4500 5000-10 0 500 1000 1500 000 500 3000 3500 4000 4500 5000 Data Converter Introduction 47 Data Converter Introduction 48
About the FF II About the FF III An M-bit quantization give a noie power of X FS X 1 FS M he power of the full-cale ine wave i 8 3 he FF of the quantization noie i, on average, a factor M N below the full cale, where N i the number of point in the FF erie. he overall noie floor become If the length of the input erie increae by a factor, the floor of the FF noie pectrum diminihe by 3dB; however, tone caued by harmonic ditortion do not change. A long-enough input erie i able to reveal a mall ditortion tone above the noie floor. N xnoie Pig 1.76 6.0 M 10 log db N he term 10 log i called proceing gain of the FF Data Converter Introduction 49 Data Converter Introduction 50 Coding cheme I Coding cheme II USB Unipolar Straight Binary: implet binary cheme, ued for unipolar ignal. he lowet level (-V ref +1/ V LSB ) i repreented with all zero (00.0), and the highet (V ref -1/ V LSB ) with all one (11..1). he quantization range i (-V ref.. + V ref ). CSB Complementary Straight Binary: alo for unipolar ignal, oppoite of USB. (00..0) repreent full cale, and (11..1) the firt quantization level. BOB Bipolar Offet Binary: for bipolar (i.e., both poitive and negative). he MSB i the ign of the ignal (1 for poitive and 0 for negative). herefore, (00 0) repreent the full negative cale, (11..1) i the full poitive cale, and (01..11) i the zero croing. COB Complementary Offet Binary: complementary to BOB. he zero croing i therefore at (10 00). BC Binary wo Complement: one of the mot ued coding cheme. he MSB indicate the ign in a complemented way: it i 0 for poitive and 1 for negative input. Zero croing i at (0..00). For poitive ignal, the digital code increae for increaing analog value, and the poitive full cale i therefore (01.11). For negative ignal, the digital code i the two complement of the poitive counterpart, which mean that (10 00) i the negative full cale. BC coding i tandard in microproceor and digital audio, and i in general ued in the implementation of mathematical algorithm. BC Complementary wo Complement: complementary to BC. Negative full cale i (01..11) and poitive full cale i (10..00). Data Converter Introduction 51 Data Converter Introduction 5
D/A converion S/H in the frequency domain waveform after Sample-and-Hold (S/H) An (ideal) recontruction filter R mooth the taircae-like waveform, removing the high-frequency component: H R, ideal ( f ) f f In the time domain: 1 for - < f < in ( ωt ) r 0 otherwie () t ω t It i well-known that thi tranfer function i not implementable, a it i not caual (i.e., it i different from zero for t<0) Data Converter Introduction 53 inc function () S( ) ( ) ( ) xs/ H t x n u t n u t n n 1 e 1 e XS / H x n e n 1 n ( ) S ( ) X S ( ) Strictly peaking, thi i the Hold tranfer function, but i commonly referred to a the S/H tranfer function X S () i the Laplace tranform of x(t) ampled by ideal Dirac delta n ( ω nω ) Data Converter Introduction 54 X π Real recontruction Spectrum after S/H 1 e HS/ H( ) HS/ H( jω ) e unity gain at DC jω ( ω ) in ω phae repone: ignal delayed by / ( ωnyq ) ( π ) in in 0.6366 3.9dB ω π Nyq Rule of thumb: the recontruction mut ue an in-band x/in(x) compenation if the ignal band i above ¼ of Nyquit 1 e XS/ H XS 1 e X n ( ) ( ) ( ω nω ) Data Converter Introduction 55 Data Converter Introduction 56
Attenuation of image z-tranform he tranmiion zero of the inc function hape the ignal image at multiple of f. A an example, if the ignal band i f B f /0, the value of the inc at f19/0f i 0.0498, yielding a 6dB uppreion, alleviating the requirement on the recontruction filter. ime-dicrete counterpart of the Laplace tranform: n { ( )} x( n) z Z x n Linear: { 1 1( ) + ( )} 1 { 1( )} + { ( )} Z a x n a x n a Z x n a Z x n he z-tranform of a delayed ignal i: { ( )} ( ) ( ) ( n k) k k Z x n k x n k z z X z z Data Converter Introduction 57 Data Converter Introduction 58 Mapping between -plane and z-plane z-domain integration (I) A ampled-date ytem i table if all the pole of it z tranfer function are inide the unity circle. he frequency repone of the ytem i the z tranfer function calculate on the unity circle. e z ime-continuou integration: HI ( ) 1 τ Approximate integration the time-continuou equation i replaced by a finite increment; the equation 3) n + ( ) ( ) ( ) y n + y n + x t dt can be dicretized in three (actually more) way: ( + ) ( ) + ( ) ( + ) ( ) + ( + ) ( + ) ( x( n) + x( n + ) ) + 1) y n y n x n ) y n y n x n y n y n n Data Converter Introduction 59 Data Converter Introduction 60
z-domain integration (II) z-domain integration (III) Via the z-tranform, we obtain: 1) ) 3) zy Y + X zy Y + zx 1+ z zy Y + X Which reult in three different approximate expreion for the z tranfer function of the integral: H H H IForward, I, Backward I, Bilinear 1 z 1 z z 1 z + 1 1 ( z ) he correponding mapping between -plane and z-plane are Forward Backward Bilinear z 1 z 1 z z 1 z 1 ( + ) to be compared with the ideal mapping 1 ln ( z) Forward critical for tability (a table ytem can become untable) Backward problematic for conerving performance (and an untable ytem can become table!) Bilinear bet (table table; untable untable), but rarely ued in data converion Data Converter Introduction 61 Data Converter Introduction 6 Remark about -to-z plane mapping Euler forward i never ued becaue of the intability hazard In general, the mentioned mapping have been relevant in the deign of ampled-data circuit uch a witched-capacitor (SC) circuit Nowaday, the iue of -plane to z-plane mapping i mot relevant in ΔΣ converter, which merge filtering with data converion A very popular modern approach in the deign of ΔΣ converter i to equate the impule repone of the analog filter we wih to implement in the converter with the impule repone of a reference dicrete-time converter Data Converter Introduction 63