Lecture Digital signal processing: Chapter 2 - Nguyen Thanh Tuan

29 55 0
Lecture Digital signal processing: Chapter 2 - Nguyen Thanh Tuan

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Chapter 2 introduce you to quantization. In this chapter, you will learn to: Quantization process, digital to analog converters (DACs), A/D converters, oversampling noise shaping,...and another contents.

Chapter Quantization Nguyen Thanh Tuan, Click M.Eng to edit Master subtitle style Department of Telecommunications (113B3) Ho Chi Minh City University of Technology Email: nttbk97@yahoo.com Quantization process Fig: Analog to digital conversion  The quantized sample xQ(nT) is represented by B bit, which can take 2B possible values  An A/D is characterized by a full-scale range R which is divided into 2B quantization levels Typical values of R in practice are between 1-10 volts Digital Signal Processing Quantization Quantization process Fig: Signal quantization  Quantizer resolution or quantization width (step) Q  R R  A bipolar ADC   xQ (nT )  2 R 2B  A unipolar ADC  xQ (nT )  R Digital Signal Processing Quantization Quantization process  Quantization by rounding: replace each value x(nT) by the nearest quantization level  Quantization by truncation: replace each value x(nT) by its below nearest quantization level  Quantization error: e(nT )  xQ (nT )  x(nT )  Consider rounding quantization:  Q Q e 2 Fig: Uniform probability density of quantization error Digital Signal Processing Quantization Quantization process Q /2  The mean value of quantization error e   Q /2 ep(e)de   Q /2  The mean-square error  q (power)   Q /2 Q /2 e de 0 Q Q /2 Q  e   ( e  e ) p (e)de   e de  Q 12  Q /2  Q /2  Root-mean-square (rms) error: erms   q  e2  Q 12  R and Q are the ranges of the signal and quantization noise, then the signal to noise ratio (SNR) or dynamic range of the quantizer is defined as   x2  R SNR dB  10log10    20log10    20log10 (2 B )  B dB   Q  q which is referred to as dB bit rule Digital Signal Processing Quantization Example  In a digital audio application, the signal is sampled at a rate of 44 KHz and each sample quantized using an A/D converter having a full-scale range of 10 volts Determine the number of bits B if the rms quantization error must be kept below 50 microvolts Then, determine the actual rms error and the bit rate in bits per second Digital Signal Processing Quantization Digital to Analog Converters (DACs)  We begin with A/D converters, because they are used as the building blocks of successive approximation ADCs Fig: B-bit D/A converter  Vector B input bits : b=[b1, b2,…,bB] Note that bB is the least significant bit (LSB) while b1 is the most significant bit (MSB)  For unipolar signal, xQ є [0, R); for bipolar xQ є [-R/2, R/2) Digital Signal Processing Quantization DACs Rf  Full scale R=VREF, B=4 bit 2Rf 4Rf I 8Rf MSB i xQ=Vout 16Rf bB b1 LSB -VREF Fig: DAC using binary weighted resistor  b1 b3 b2 b4 I  V      REF  2R 4R 8R 16R f f f  f     b1 b2 b3 b4  xQ  VOUT   I  R f  VREF       16  xQ  R24  b1 23  b2 22  b3 21  b4 20   Q  b1 23  b2 22  b3 21  b4 20  Digital Signal Processing Quantization DACs  Unipolar natural binary xQ  R(b1 21  b2 22   bB 2 B )  Qm where m is the integer whose binary representation is b=[b1, b2,…,bB] m  b1 2B1  b2 2B2   bB 20  Bipolar offset binary: obtained by shifting the xQ of unipolar natural binary converter by half-scale R/2: R R xQ  R(b1  b2   bB )   Qm  2 1 2 B  Two’s complement code: obtained from the offset binary code by complementing the most significant bit, i.e., replacing b1 by b1   b1 R xQ  R(b1  b2   bB )  1 Digital Signal Processing 2 B Quantization Example  A 4-bit D/A converter has a full-scale R=10 volts Find the quantized analog values for the following cases ? a) Natural binary with the input bits b=[1001] ? b) Offset binary with the input bits b=[1011] ? c) Two’s complement binary with the input bits b=[1101] ? Digital Signal Processing 10 Quantization A/D converter  For rounding quantization, we shift x by Q/2: Digital Signal Processing 15  For the two’s complement code, the sign bit b1 is treated separately Quantization Example  Consider a 4-bit ADC with the full-scale R=10 volts Using the successive approximation algorithm to find offset and two’s complement of rounding quantization for the analog values x=3.5 volts Digital Signal Processing 16 Quantization Oversampling noise shaping  e2 fs Pee(f)  e'2 f s' e(n) -f’s/2 -fs/2 fs/2 f’s/2 '2  e2  e'2   '   e2  f s e' fs fs fs Digital Signal Processing HNS(f) f x(n) 17 ε(n) xQ(n) Quantization Oversampling noise shaping Digital Signal Processing 18 Quantization Dither Digital Signal Processing 19 Quantization Uniform and non-uniform quantization Digital Signal Processing 20 Quantization Mid-riser and mid-tread quantization Digital Signal Processing 21 Quantization Bonus 2.1  Write a program to simulate DAC b1 b2 MSB b3 DAC bB xQ LSB R (full-scale range) Digital Signal Processing 22 Quantization Bonus 2.2  Write a program to simulate ADC MSB x(n) b1 b2 b3 ADC bB LSB R (full-scale range) Digital Signal Processing 23 Quantization Review Các thông số q trình lượng tử hóa? Quan hệ nguyên tắc lượng tử? Quan hệ ngun tắc mã hóa? Tính chất sai số lượng tử? Hiệu lấy mẫu dư định dạng nhiễu? Hiệu dither? Giải thuật test bit? Xác định mức lượng tử bit lượng tử? Xác định dung lượng cần lưu trữ? Xác định tốc độ xử lý yêu cầu chip DSP? Digital Signal Processing 24 Quantization Homework  Cho lượng tử mã hóa nhị phân tự nhiên B = bit hoạt động theo nguyên tắc làm tròn gần (rounding) với khoảng lượng tử Q = 1.1@ (biết giá trị lượng tử nhỏ nhất) a) Xác định giá trị lượng tử lớn nhất? b) Kiểm tra xem liệu giá trị 20.10 có giá trị lượng tử hay không? c) Xác định giá trị lượng tử tương ứng với từ mã 10011? d) Xác định từ mã mẫu tín hiệu ngõ vào 20.10? e) Làm lại câu d trường hợp B = bit? Digital Signal Processing 25 Quantization Homework  Cho lượng tử mã hóa nhị phân tự nhiên bit hoạt động theo nguyên tắc làm tròn gần (rounding) với khoảng lượng tử Q = 0.4@ (biết giá trị lượng tử nhỏ nhất) a) Xác định giá trị lượng tử lớn nhất? b) Kiểm tra xem liệu giá trị 24.04 có giá trị lượng tử hay không? c) Xác định giá trị lượng tử tương ứng với từ mã 00111101? d) Xác định từ mã mẫu tín hiệu ngõ vào 20.13? e) Dùng giải thuật test bit, xác định từ mã mẫu tín hiệu ngõ vào 25.03? f) Đề xuất giải pháp để thực lượng tử theo nguyên tắc rút bớt (làm tròn xuống) trường hợp sử dụng lượng tử mã hóa hoạt động theo nguyên tắc làm tròn trên? Digital Signal Processing 26 Quantization Homework  Cho lượng tử mã hóa nhị phân tự nhiên bit hoạt động theo nguyên tắc làm tròn với khoảng lượng tử Q = 0.1@ (biết giá trị lượng tử nhỏ nhất) a) Xác định giá trị lượng tử lớn nhất? b) Xác định giá trị lượng tử tương ứng với từ mã 11100011? c) Xác định từ mã mẫu tín hiệu ngõ vào 22.07? d) Dùng giải thuật test bit, xác định từ mã mẫu tín hiệu ngõ vào 9.05? e) Giả sử tín hiệu phân bố tầm hoạt động, tính tỉ số cơng suất tín hiệu nhiễu SNR lượng tử trên? Digital Signal Processing 27 Quantization Homework  Cho lượng tử lưỡng cực đối xứng hoạt động theo nguyên tắc làm tròn với khoảng lượng tử Q = 0.2@ (biết giá trị lượng tử) mã hóa nhị phân bit dạng bù a) Xác định giá trị lượng tử lớn nhỏ nhất? b) Xác định giá trị lượng tử tương ứng với từ mã 10001000? c) Xác định từ mã mẫu tín hiệu ngõ vào 1.64? d) Dùng giải thuật test bit, xác định giá trị lượng tử mẫu tín hiệu ngõ vào 1.64? Digital Signal Processing 28 Quantization Homework  Một tín hiệu rời rạc lượng tử mã hóa chuyển đổi A/D bit có tầm tồn thang R=1@ V dùng giải thuật xấp xỉ liên tiếp làm tròn xuống (truncation) a) Hãy xác định khoảng lượng tử Q? b) Tìm giá trị lượng tử xQ cho giá trị rời rạc x=2.75 V từ mã b=[b1 b2 b3 b4] tương ứng cho mã offset? c) Lặp lại câu b) cho mã bù hai? Digital Signal Processing 29 Quantization ...  2R 4R 8R 16R f f f  f     b1 b2 b3 b4  xQ  VOUT   I  R f  VREF       16  xQ  R24  b1 2 3  b2 2 2  b3 2 1  b4 20   Q  b1 2 3  b2 2 2  b3 2 1  b4 20  Digital Signal. .. volts Digital Signal Processing 16 Quantization Oversampling noise shaping  e2 fs Pee(f)  e '2 f s' e(n) -f’s /2 -fs /2 fs /2 f’s /2 '2  e2  e '2   '   e2  f s e' fs fs fs Digital Signal. .. quantization Digital Signal Processing 21 Quantization Bonus 2. 1  Write a program to simulate DAC b1 b2 MSB b3 DAC bB xQ LSB R (full-scale range) Digital Signal Processing 22 Quantization Bonus 2. 2 

Ngày đăng: 11/02/2020, 18:41

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan