1、1Chap 4 Digital Processing of CT Signalsl Discrete-Time Signal Processing of CTS;l Sampling of CT Signals;l Analog Lowpass Filter Design;2 Most signals in the real world are continuous in time;4.1 Introduction DT signal processing algorithms are being used increasingly;Digital processing of a CT sig
2、nal involves 3 basic steps:Sample a CT signal into a DT signal;(analog-to-digital(A/D)converter)Process the DT signal(binary word);Convert the processed DT signal back into CT signal.(digital-to-analog(D/A)converter)3 Simplified Block diagram of a CT signal processed by DT system Since the A/D conve
3、rsion usually takes a finite amount of time,a sample-and-hold circuit is used to ensure that the analog signal at the input of the A/D converter remains constant in amplitude until the conversion is complete to minimize the error in its representation;C/D ConverterDiscrete-Time Processor D/C Convert
4、er()ax tnxny()ay tTTFig.4.2 Block diagram of CT signal processed by DT system 4 Other additional circuits To prevent aliasing,an analog anti-aliasing filter is employed before the S/H circuit;To smooth the output signal of the D/A converter,which is a staircase-like waveform,an analog reconstruction
5、 filter is used.SampleandholdDigital SystemD/A Anti-aliasingfilterA/D compensatedreconstruction filter)(txc)(txa)(0tx nx ny)(tyDA)(tyrTTT()rHjFig.4.1 Completed block diagram representation of a CT signal processed by DT system 5 Normalized digital angular frequency Example:00()cos(2)cos()ax tAf tAtN
6、ormalized digital angular frequency 0:The sampled DT signal:CT signal:0 cos()x nAnT002cos()cos()TAnAn0002 (4.4)TT 6Effect of sampling in the Frequency-Domain Suppose a continuous-time signal:ga(t)(),(4.7)ag ngnTn Sampling sequence:g n sampling period:T;sampling frequency:FT=1/T CTFT Ga(j)of signal g
7、a(t)is:j(j)()ed (4.8)taaGg tt 7 Effect of sampling in the Frequency-Domain The DTFT G(e j)of a sequence gn is given by jj(e)e (4.9)nnGg n Relation between G(e j)and Ga(j)Conversion from impulse train to discrete-time sequencega(t)gp(t)p(t)gn=ga(nT)Period sampling in Mathematics()()np ttnT8 Period sa
8、mpling in Mathematics()()()()()(4.11)paangtg t p tgnTtnT()pgt()ag t()p t9 CTFT Gp(j)of gp(t)j(j)()()edtpanGgnTtnTt j()e (4.12)nTangnT According to the definition of CTFT According to the modulation theorem of CTFT1(j)(j)*(j)2papGG 1(j()(4.16)aTkGkT 10 Effect of sampling in the frequency-domain Gp(j)
9、is a periodic function of frequency consisting of a sum of shifted and scaled replicas of Ga(j),shifted by integer of T and scaled by 1/T.Baseband signal:the term on the right-hand side of Eq.(4.16)for k=0 is called baseband portion of Gp(j).Baseband/Nyquist band:frequency range T/2 T/211 Illustrati
10、on of the frequency-domain Effects of time-domain samplingT2Tm No overlap12 Effect of sampling in the Frequency-Domain It is evident from the figure that if T 2m,there is no overlap between the shifted replicas of Ga(j)generating Gp(j).If T 2 m,ga(t)can be recovered exactly from gp(t)by passing if t
11、hrough an ideal lowpass filter Hr(j)with gain T and a cutoff frequency c greater than m and less than T m.13 H r(j )ga(t)gp(t)p(t)ga(t)/2cT Effect of sampling in the Frequency-Domain14 Illustration of the frequency-domain effects of time-domain samplingOverlapT2Tm 15 Effect of sampling in the Freque
12、ncy-Domain On the other hand,if T 2m,there is an overlap of the spectra of the shifted replicas of Ga(j)generating Gp(j).If T 2 m,due to the overlap of the shiftedreplicas of Ga(j),the spectrum Gp(j)cannot be separated by filtering to recover Ga(j)becauseof the distortion caused by a part of replica
13、s immediately outside the baseband being folded Back or aliased into the baseband.16 Sampling TheoremSuppose that ga(t)be a band-limited signal with(j)0,aG form then ga(t)is uniquely determined by its samples gn=ga(nT),n=0,1,2,if22TmT Nyquist conditions:/2T Folding frequency:22TmT 17 Sampling Theore
14、m Nyquist Frequency:m Nyquist rate:2 mAnd then passing if through an ideal lowpass filter Hr(j)with a gain T and a cutoff frequency c satisfying Given gn=ga(nT),we can recover exactly ga(t)by generating an impulse train,()()()pangtgnTtnTmcTm 18 Several Sampling Oversampling:The sampling frequency is
15、 higher than the Nyquist rate Undersampling:The sampling frequency is lower than the Nyquist rate Critical sampling:The sampling frequency is equal to the Nyquist rate Note:A pure sinusoid may not be recoverable from its critically sampled version.19 Examples of sampling In digital telephony,a 3.4 k
16、Hz signal bandwidth is adequate for telephone conversation;Hence,a sampling rate of 8 kHz,which is greater than twice the signal bandwidth,is used.In high-quality analog music signal processing,a bandwidth of 20 kHz is used for fidelity;Hence,in CD music systems,a sampling rate of 44.1 kHz,which is
17、slightly higher than twice the signal bandwidth,is used.20 Examples of samplingExample 4.3Consider 3 CT sinusoidal signals:1()cos(6),g tt2()cos(14),g tt3()cos(26),g ttThe corresponding DTFTs are:1(j)(6)(6),G 2(j)(14)(14),G 3(j)(26)(26),G They are sampled at a rate of T=0.1 sec,or sampling frequency
18、T=20 rad/sec.The CTFT of the three signals:The CTFT of the sampled impulse trains:10c,|(j)0,otherwisecrTH 23 Comments on example 4.3 In the case of g1(t),the sampling rate satisfies the Nyquist condition and there is no aliasing;The reconstructed output is precisely the original CT signal g1(t);In t
19、he other two cases,the sampling rate does not satisfy the Nyquist condition,resulting in aliasing,and outputs sre all equal to the aliased signal g1(t)=cos(6 t);24 In the figure of G2p(j),the impulse appearing at =6 in the positive frequency passband of the lowpass filter results from the aliasing o
20、f the impulse in G2(j)at=14;In the figure of G3p(j),the impulse appearing at =6 in the positive frequency passband of the lowpass filter results from the aliasing of the impulse in G3(j)at=26;Comments on example 4.325 Relation between G(ej)and Ga(j)(),(4.7)ag ngnTnj(j)()e (4.12)nTpanGgnT jj(e)e (4.9
21、)nnGg nSince:therefore:j/(e)(j)|(4.20a)pTGGor:j(j)(e)|(4.20b)pTGG 26Soj/(e)(j)|12 =jj (4.21a)pTakGGkGTTTorj1(e)jj (4.21b)TaTkGGkT G(ej)is obtained from Gp(j)simply by scaling according to the relation (4.22)T Relation between G(ej)and Ga(j)27Recovery of the Analog SignalSampleandholdDigital SystemD/
22、A Anti-aliasingfilterA/D compensatedreconstruction filter)(txc)(txa)(0tx nx ny)(tyDA)(tyrTTT()rHjFig.4.1 Detailed block diagram representation of a CT signal processed by DT system ,|(j)(4.24)0,otherwisecrTH The lowpass reconstruction filter Hr(j):The input to Hr(j)is impulse train gp(t);28 The impu
23、lse response hr(t)of the lowpass reconstruction filter is obtained by taking the inverse CTFT of Hr(j):jj1()(j)eded22ccttrrTh tH sin(),(4.25)/2cTttt ()()(4.26)pngtg ntnTRecovery of the Analog Signal29 The output of Hr(j)is given by ga(t)ga(t)sin()/()*()(4.28)()/prntnTTgth tg ntnTTWith assuming:c=T/2
24、=/T.Recovery of the Analog Signal30 4.3 Sampling of Bandpass Signals Bandpass CT Signal0,0|,|(j)(j),|LHaaLHXX Bandwidth:=H L;Assuming:H=M(),M is an integer;Sampling rate:T=2()=2 H/M;CTFT of the sampled impulse train:1(j)jj2()(4.32)pakGGkT 31 Illustration of Bandpass Sampling T=2()1(j)jj2()(4.32)pakG
25、GkT No aliasingBandpass filterRecover the bandpass signal32 Frequency translation Frequency translation:Any of the replicas in the lower frequency bandscan be retained by passing gp(t)through bandpass filters with passbands:()|(),11LHkkkM -providing a translation of the original bandpass signal to l
26、ower frequency ranges.33 4.4 Analog Lowpass Filter Design Filter Specification:1(j)1,for (4.33)pppH Passband:(j)for (4.34)ssH Stopband:Passband edge frequency:p;Stopband edge frequency:s.34Frequency-Domain Characterization of the LTI DT System Peak passband ripple:p=20log10(1 p)dB (4.35)Minimum stop
27、band attentuation:s=20log10(s)dB (4.36)Ripples are usually specified in dB as:Peak ripple value in the passband:p;Peak ripple value in the stopband:s.35 Normalized specifications for analog lowpass filter The maximum value of the magnitude in the passband is assumed to be unity(1);Passband ripple:21
28、/1The maximum value of the magnitude in the passband Maximum stopband ripple:1A36 Two additional parameters Transition ratio/selectivity parameter:(4.37)psk k 1 for lowpass filter Discrimination parameter:12 (4.38)1kA11k usually,37 Butterworth Approximation N-th order butterworth filter:221(j)(4.39)
29、1(/)aNcH also called a maximally flat magnitude filter Gain in dB:210()10log(j)dBaH G G At dc,i.e.,=0:(0)0dBG G At =c:()3dBc G G c-3dB cutoff frequency.38 Typical magnitude response with c=1 Two parameters:the 3-dB cutoff frequency c and the order N completely characterize a Butterworth filter.c and
30、 N are determined from:p,s,1/A.21/139 Obtain c and N 22211(j)=(4.40a)1(/)1+apNpcH 22211(j)=(4.40b)1(/)asNscHA Solve the equations of(4.40)22101011010log(1)/log(1/)1 (4.41)2log(/)log(1/)spAkNk40 Transfer function of Butterworth lowpass filter101()=(4.42)()()NNccaNNNlNllllCHsDssd sspwherej(21)/2e,1,2,
31、(4.43)NlNlcplN The denominator DN(s)is known as the Butterworth polynomial of order N.41 Example analog lowpass Butterworth FilterExample 4.8Determine the lowest order of a transfer function Ha(s)having a maximally flat characteristic with a 1-dB cutoff frequency at 1kHz and a minimum attenuation of
32、 40dB at 5 kHz.Solution:102110log11 Obtain:20.25895102110log40A Obtain A:210000A 2111196.51334Ak0.2psk10110log(1/)=3.2811022log(1/)kNk Order N:Let N be the minimum integer,so N=4.43Chebyshev Approximation Type 1 Chebyshev Approximation:2221(j)(4.45)1(/)aNpHT Chebyshev polynomial of order N:11cos(cos
33、),|1()(4.46)cosh(cosh),|1NNTN or recurrence relation of Chebyshev polynomial:01()1,(),TT 12()2()(),2 (4.47)rrrTTTr 44 Typical Type 1 Chebyshev lowpass filter passband ripple:stopband attenuation:1/A at s2221(j)1(/)asNspHT 45 Obtain N and transfer function112111cosh(1/)cosh(1/)(4.49)cosh(/)cosh(1/)sp
34、kANk2222111|(j)|(4.48)1coshcosh(/)aspHANPole pl of transfer function Ha(s)j,1,2,lllplN(21)(21)sin,cos22lplpllNN 46 Obtain transfer function1/2221111,22N101()=(4.42)()()NNccaNNNlNllllCHsDssd ssp Chebyshev I filter transfer function:47Type 2 Chebyshev Approximation Type 2 Chebyshev Approximation:222(j
35、)1(/)1(/)aNspNsHTT(4.52)48 Example of Chebyshev II lowpass FilterExample 4.9Determine the minimum order N required to design a lowpass filter with a type 1 Chebyshev or type 2 Chebyshev (specifications:a 1-dB cutoff frequency at 1kHz and a minimum attenuation of 40dB at 5 kHz).Solution:102110log11 O
36、btain:20.25895102110log40A Obtain A:210000A 2111196.51334Ak0.2psk111cosh(1/)=2.60591cosh(1/)kNk Order N:Let N be the minimum integer,so N=3.Note:Chebyshev order is lower than Butterworth order.50 4.5 Design of other type analog filters Spectral transformation method is used to design other types of
37、filters;Steps for design other types of filters;Step1:Develop the specifications of a prototype analog lowpass filter HLP(s)from the specifications of theDesired analog filter HD(s)using frequency transformation;Step2:Design the prototype analog lowpass filter;Step3:Determine the transfer function H
38、D(s)of the desiredanalog filter by applying the inverse of frequency transformation to HLP(s).51 Marks of the prototype and desired filters To eliminate the confusion,Sign:the prototype analog lowpass filter:HLP(s)Laplace transform variable-s the desired analog filter:HD(s)Laplace transform variable
39、-s Transform between HLP(s)and HD(s)()()()|DLPs F sHsHsor 1()()()|LPDs FsHsHs()sF s52p-the passband edge frequency of desired analog highpass filter HHP(s).Transformation to the Highpass Filter (4.68)ppss wherep-the passband edge frequency of prototype analog lowpass filter HLP(s);On the imaginary a
40、xis,(4.69)pp 53Mapping of imaginary axis in s-domain to -domainspp ppppLowpass filterpassbandHIghpass filterpassband54 Example of Highpass filter designExample 4.18Design an analog Butterworth highpass filter,with specifications:Solution:Passband edge frequency:4kHz,passband ripple:0.1dB;Stopband ed
41、ge frequency:1kHz,stopband attenuation:40dB;28000 rad/secppF 22000 rad/secssF For prototype lowpass filter,let1 rad/secp 55 Example 4.18800042000ppss Stopband edge frequency:Specifications for prototype lowpass filter:p=1,p=0.1dB;s=4,s=40dB;MATLAB code fragments:56 MATLAB codesN,wn=buttord(wp,ws,afa
42、p,afas,s);B,A=butter(N.wn,s);num,den=lp2hp(B,A,2*pi*4000);57 4.6 Anti-Aliasing Filter design Anti-aliasing filter=analog lowpass filter;1,|/2(j)(4.70)0,|/2TaTH Requirement for anti-aliasing filter:/2 (4.71)psT Ideal anti-aliasing filter58 Anti-Aliasing Filter designp0Tp 2TT|(j)|aX11/A|(j)|aHSpectrum
43、 of aliasedcomponent of input59 4.7 Reconstruction Filter design Reconstruction filter=analog lowpass filter;,|/2(j)(4.73)0,|/2TrTTH Ideal reconstruction filter is noncausal and unrealizable:Ideal reconstruction filtersin()(),(4.25)/2crTth ttt 60 4.7 Reconstruction Filter design zero-order hold freq
44、uency response;Reconstruction filterwherej2sin(/2)(j)e/2TzTH(j)(j)(j)rrzHHH/2,|sin(/2)(j)0,|crcTTH 61 Summary(I)l DTSP of CTS;l Sampling of CT Signals;(),(4.7)ag ngnTn()()()()()(4.11)paangtg t p tgnTtnTj/(e)(j)|(4.20a)pTGG1(j)(j()(4.16)paTkGGkT 62 Summary(II)l Analog Lowpass Filter Design Passband e
45、dge frequency p and ripple p;Stopband edge frequency s and ripple s.Peak passband ripple:p=20log10(1 p)dB (4.35)Minimum stopband attentuation:s=20log10(s)dB (4.36)N-th order Butterworth filter:221(j)(4.39)1(/)aNcH (4.37)psk12 (4.38)1kA22101011010log(1)/log(1/)1 (4.41)2log(/)log(1/)spAkNk101()=(4.42)()()NNccaNNNlNllllCHsDssd sspj(21)/2e,1,2,(4.43)NlNlcplN 64 ExercisesPage 166:4.3,4.7Page 167:4.12(*);4.16;4.23