Bài giảng Xử lý tín hiệu số - Chương 1: Sampling and reconstruction - Hà Hoàng Kha
ontent
Sampling
Sampling theorem
Spectrum of sampling signals
Antialiasing prefilter
Id l eal prefilter
Practical prefilter
Analog reconstruction
Ideal reconstructor
Practical reconstructon
A typical signal processing system includes 3 stages:
The analog signal i di i li d b s digitalized by an A/D converter
The digitalized samples are processed by a digital signal processor.
The digital processor can be programmed to perform signal processing
operations such as filtering, spectrum estimation. Digital signal processor can be
a general purpose computer, DSP chip or other digital hardware.
The resulting output samples are converted back into analog by a
D/A converter
Trang 1
Trang 2
Trang 3
Trang 4
Trang 5
Trang 6
Trang 7
Trang 8
Trang 9
Trang 10
Tải về để xem bản đầy đủ
Tóm tắt nội dung tài liệu: Bài giảng Xử lý tín hiệu số - Chương 1: Sampling and reconstruction - Hà Hoàng Kha
Chapter 1 Sampling and Reconstruction Click to edit Master subtitle styleHa Hoang Kha, Ph.D. Ho Chi Minh City University of Technology Email: hhkha@hcmut.edu.vn Content Sampling Sampling theorem Spectrum of sampling signals Antialiasing prefilter Id l filea pre ter Practical prefilter Analog reconstruction Ideal reconstructor Practical reconstructor Ha H. Kha 2 Sampling and Reconstruction Review of useful equations Linear system ( )x t Linear systemh(t) ( ) ( ) ( )y t x t h t= ∗ ( ) cos(2 )x t A f tπ θ= + H(f)( )X f ( ) ( ) ( )Y f X f H f= Especially 0, 1 0 0 0( ) | ( ) | cos(2 arg( ( )))y t A H f f t H fπ θ= + + 1sin(2 ) [ ( ) ( )]FTf t j f f f fπ δ δ← → + 0 0 0cos(2 ) [ ( ) ( )]2 FTf t f f f fπ δ δ←⎯→ + + − Fourier transform: 1cos( )cos( ) [cos( ) cos( )] 2 a b a b a b= + + − 0 0 02 ⎯ − − Trigonometric formulas: 1sin( )sin( ) [cos( ) cos( )] 2 a b a b a b= − + − − 1sin( ) cos( ) [sin( ) sin( )]a b a b a b= + + − 3 Sampling and Reconstruction 2 Ha H. Kha 1. Introduction A typical signal processing system includes 3 stages: Th l i l i di i li d b A/De ana og s gna s g ta ze y an converter The digitalized samples are processed by a digital signal processor. The digital processor can be programmed to perform signal processing operations such as filtering, spectrum estimation. Digital signal processor can be a general purpose computer, DSP chip or other digital hardware. The resulting output samples are converted back into analog by a D/A converter. 4 Sampling and ReconstructionHa H. Kha 2. Analog to digital conversion Analog to digital (A/D) conversion is a three-step process. Sampler Quantizer Coder xQ(n)x(t) x(nT)≡x(n) 11010 t=nT A/D converter xQ(n)111x(t) x(n) 011 100 101 110 n 000 001 010t n 5 Sampling and ReconstructionHa H. Kha 3. Sampling Sampling is to convert a continuous time signal into a discrete time signal The analog signal is periodically measured at every T seconds. x(n)≡x(nT)=x(t=nT), n=.-2, -1, 0, 1, 2, 3.. T: sampling interval or sampling period (second); fs=1/T: sampling rate or sampling frequency (samples/second or 6 Hz) Sampling and ReconstructionHa H. Kha 3. Sampling-example 1 The analog signal x(t)=2cos(2πt) with t(s) is sampled at the rate fs=4 Hz. Find the discrete-time signal x(n) ? Solution: x(n)≡x(nT)=x(n/fs)=2cos(2πn/fs)=2cos(2πn/4)=2cos(πn/2) n 0 1 2 3 4 x(n) 2 0 ‐2 0 2 Plot the signal 7 Sampling and ReconstructionHa H. Kha 3. Sampling-example 2 Consider the two analog sinusoidal signals 7( ) 2cos(2 )x t tπ= 1( ) 2cos(2 ); ( )x t t t sπ1 ,8 2 8= These signals are sampled at the sampling frequency fs=1 Hz. Fi d h di i i l ? Solution: n t e screte-t me s gna s 1 7 1 7 1 1 1( ) ( ) ( ) 2cos(2 ) 2cos( )8 1 4s x n x nT x n n n f π π≡ = = = 12cos((2 ) ) 2cos( ) 4 4 n nππ= − = 2 2 2 1 1 1 1( ) ( ) ( ) 2cos(2 ) 2cos( ) 8 1 4s x n x nT x n n n f π π≡ = = = Observation: x1(n)=x2(n) Æ based on the discrete-time signals, we cannot tell which of two signals are sampled ? These signals are 8 called “alias” Sampling and ReconstructionHa H. Kha 3. Sampling-example 2 f2=1/8 Hz f1=7/8 Hz f =1 Hzs Fig: Illustration of aliasing 9 Sampling and ReconstructionHa H. Kha 3. Sampling-Aliasing of Sinusoids at a sampling rate fs=1/T results in a discrete- In general, the sampling of a continuous-time sinusoidal signal 0( ) cos(2 )x t A f tπ θ= + time signal x(n). The sinusoids is sampled at f resulting in a( ) cos(2 )k kx t A f tπ θ= + s , discrete time signal xk(n). If f =f +kf k=0 ±1 ±2 then x(n)=x (n) k 0 s, , , , ., k . Proof: (in class) Remarks: We can that the frequencies fk=f0+kfs are indistinguishable from the frequency f0 after sampling and hence they are aliases of f0 10 Sampling and ReconstructionHa H. Kha 4. Sampling Theorem-Sinusoids Consider the analog signal where Ω is the frequency (rad/s) of the analog signal, and f=Ω/2π is the ( ) cos( ) cos(2 )x t A t A ftπ= Ω = frequency in cycles/s or Hz. The signal is sampled at the three rate fs=8f, fs=4f, and fs=2f. Fi Si id l d diff Note that / sec / sf samples samples f l l = = g: nuso samp e at erent rates seccyc es cyc e To sample a single sinusoid properly, we must require 2sf samples f cycle ≥ 11 Sampling and ReconstructionHa H. Kha 4. Sampling Theorem For accurate representation of a signal x(t) by its time samples x(nT), two conditions must be met: 1) The signal x(t) must be bandlimitted, i.e., its frequency spectrum must be limited to fmax . Fig: Typical bandlimited spectrum 2) The sampling rate fs must be chosen at least twice the maximum frequency f 2f f≥ max. maxs fs=2fmax is called Nyquist rate; fs/2 is called Nyquist frequency; [ f /2 f /2] i N i i l 12 - s , s s yqu st nterva . Sampling and ReconstructionHa H. Kha 4. Sampling Theorem The values of fmax and fs depend on the application Application fmax fs Biomedical 1 KHz 2 KHz Speech 4 KHz 8 KHz Audio 20 KHz 40 KHz Video 4 MHz 8 MHz 13 Sampling and ReconstructionHa H. Kha 4. Sampling Theorem-Spectrum Replication Let where ( ) ( ) ( ) ( ) ( ) ( ) n x nT x t x t t nT x t s tδ∞ =−∞ = = − =∑ ( ) ( ) n s t t nTδ∞ =−∞ = −∑ s(t) is periodic, thus, its Fourier series are given by 2( ) sj f nts t S e π ∞ = ∑ 21 1 1( ) ( )sj f ntS t e dt t dtπδ δ−= = =∫ ∫wheren n=−∞ n T TT T T 21( ) sj f nts t e T π∞= ∑ Thus, n=−∞ 21( ) ( ) ( ) ( ) sj nf t n x t x t s t x t e T π∞ =−∞ = = ∑ 1 ∞ which results in ( ) ( )s n X f X f nf T =−∞ = −∑ Taking the Fourier transform of yields ( )x t Observation: The spectrum of discrete-time signal is a sum of the original spectrum of analog signal and its periodic replication at the i l f 14 nterva s. Sampling and ReconstructionHa H. Kha 4. Sampling Theorem-Spectrum Replication fs/2 ≥ fmax Fi T i l b dli i d Fig: Spectrum replication caused by sampling g: yp ca a m te spectrum fs/2 < fmax Fig: Aliasing caused by overlapping spectral replicas 15 Sampling and ReconstructionHa H. Kha 5. Ideal Analog reconstruction Fig: Ideal reconstructor as a lowpass filter An ideal reconstructor acts as a lowpass filter with cutoff frequency equal to the Nyquist frequency fs/2. An ideal reconstructor (lowpass filter) [ / 2, / 2]( ) 0 s sT f f fH f otherwise ∈ −⎧= ⎨⎩ ( ) ( ) ( ) ( )aX f X f H f X f= = Then 16 Sampling and ReconstructionHa H. Kha 5. Analog reconstruction-Example 1 The analog signal x(t)=cos(20πt) is sampled at the sampling frequency fs=40 Hz. a) Plot the spectrum of signal x(t) ? b) Fi d h di i i l ( ) ? n t e screte t me s gna x n c) Plot the spectrum of signal x(n) ? d) The signal x(n) is an input of the ideal reconstructor find the , reconstructed signal xa(t) ? 17 Sampling and ReconstructionHa H. Kha 5. Analog reconstruction-Example 2 The analog signal x(t)=cos(100πt) is sampled at the sampling frequency fs=40 Hz. a) Plot the spectrum of signal x(t) ? b) Fi d h di i i l ( ) ? n t e screte t me s gna x n c) Plot the spectrum of signal x(n) ? d) The signal x(n) is an input of the ideal reconstructor find the , reconstructed signal xa(t) ? 18 Sampling and ReconstructionHa H. Kha 5. Analog reconstruction Remarks: xa(t) contains only the frequency components that lie in the Nyquist interval (NI) [ f //2 f /2] - s , s . f f fsampling at fs ideal reconstructorx(t), 0 ∈ NI ------------------> x(n) ----------------------> xa(t), a= 0 sampling at f ideal reconstructor xk(t), fk=f0+kfs------------------> x(n) ----------------------> xa(t), fa=f0 s Th f f f d i l ( ) i b i d b ddie requency a o reconstructe s gna xa t s o ta ne y a ng to or substracting from f0 (fk) enough multiples of fs until it lies within the Nyquist interval [-f //2 f /2] That is mod( )a sf f f= s , s .. 19 Sampling and ReconstructionHa H. Kha 5. Analog reconstruction-Example 3 The analog signal x(t)=10sin(4πt)+6sin(16πt) is sampled at the rate 20 d h d lHz. Fin t e reconstructe signa xa(t) ? 20 Sampling and ReconstructionHa H. Kha 5. Analog reconstruction-Example 4 Let x(t) be the sum of sinusoidal signals x(t)=4+3cos(πt)+2cos(2πt)+cos(3πt) where t is in milliseconds . a) Determine the minimum sampling rate that will not cause any aliasing effects ? b) To observe aliasing effects, suppose this signal is sampled at half its Nyquist rate. Determine the signal xa(t) that would be aliased with x(t) ? Plot the spectrum of signal x(n) for this sampling rate? 21 Sampling and ReconstructionHa H. Kha 6. Ideal antialiasing prefilter The signals in practice may not bandlimitted, thus they must be f l d b l f li tere y a owpass i ter Fi Id l ti li i p filtg: ea an a as ng re er 22 Sampling and ReconstructionHa H. Kha 6. Practical antialiasing prefilter A lowpass filter: [-fpass, fpass] is the frequency range of interest for the l f f The Nyquist frequency fs/2 is in the middle of transition region. app ication ( max= pass) The stopband frequency fstop and the minimum stopband attenuation Astop dB must be chosen appropriately to minimize the aliasing effects. s pass stopf f f= + Fig: Practical antialiasing lowpass prefilter 23 Sampling and Reconstruction Ha H. Kha 6. Practical antialiasing prefilter The attenuation of the filter in decibels is defined as 10 0 ( )( ) 20log ( ) ( ) H fA f dB H f = − where f0 is a convenient reference frequency, typically taken to be at DC for a lowpass filter. α10 =A(10f)-A(f) (dB/decade): the increase in attenuation when f is changed by a factor of ten. α2 =A(2f)-A(f) (dB/octave): the increase in attenuation when f is changed by a factor of two. Analog filter with order N, |H(f)|~1/fN for large f, thus α10 =20N (dB/decade) and α10 =6N (dB/octave) 24 Sampling and ReconstructionHa H. Kha 6. Antialiasing prefilter-Example A sound wave has the form ( ) 2 cos(10 ) 2 cos(30 ) 2 cos(50 ) 2 cos(60 ) 2 cos(90 ) 2 cos(125 ) x t A t B t C t D t E t F t π π π π π π = + + + + + where t is in milliseconds. What is the frequency content of this signal ? Which parts of it are audible and why ? This signal is prefilter by an anlog prefilter H(f). Then, the output y(t) of the prefilter is sampled at a rate of 40KHz and immediately reconstructed by an ideal analog reconstructor, resulting into the final analog output ya(t), as shown below: 25 Sampling and ReconstructionHa H. Kha 6. Antialiasing prefilter-Example Determine the output signal y(t) and ya(t) in the following cases: a)When there is no prefilter, that is, H(f)=1 for all f. b)When H(f) is the ideal prefilter with cutoff fs/2=20 KHz. c)When H(f) is a practical prefilter with specifications as shown below: The filter’s phase response is assumed to be ignored in this example. 26 Sampling and ReconstructionHa H. Kha 7. Ideal and practical analog reconstructors An ideal reconstructor is an ideal lowpass filter with cutoff Nyquist f f /requency s 2. 27 Sampling and ReconstructionHa H. Kha 7. Ideal and practical analog reconstructors The ideal reconstructor has the impulse response: h h l bl l l sin( f t)( ) sh t f t π π=w ic is not rea iza e since its impu se response is not casua s It is practical to use a staircase reconstructor 28 Sampling and ReconstructionHa H. Kha 7. Ideal and practical analog reconstructors Fig: Frequency response of staircase recontructor 29 Sampling and ReconstructionHa H. Kha 7. Practical reconstructors-antiimage postfilter An analog lowpass postfilter whose cutoff is Nyquist frequency fs/2 d h l lis use to remove t e surviving spectra rep icas. Fig: Analog anti-image postfilter Fi S f fil 30 Sampling and Reconstruction g: pectrum a ter post ter Ha H. Kha 8. Homework Problems: 1.2, 1.3, 1.4, 1.5, 1.9 31 Sampling and ReconstructionHa H. Kha
File đính kèm:
- bai_giang_xu_ly_tin_hieu_so_chuong_1_sampling_and_reconstruc.pdf