### Create a StudySoup account

#### Be part of our community, it's free to join!

Already have a StudySoup account? Login here

# 650 Class Note for ECE 43800 at Purdue

### View Full Document

## 15

## 0

## Popular in Course

## Popular in Department

This 20 page Class Notes was uploaded by an elite notetaker on Friday February 6, 2015. The Class Notes belongs to a course at Purdue University taught by a professor in Fall. Since its upload, it has received 15 views.

## Similar to Course at Purdue

## Popular in Subject

## Reviews for 650 Class Note for ECE 43800 at Purdue

### What is Karma?

#### Karma is the currency of StudySoup.

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 02/06/15

Sec 15 Sampling 85 Input x Output y a System S gt Figure 142 System block diagram I 15 Sampling I 151 Motivation As we have covered the basic theoretical foundations and start considering several prac tical issues it is useful to brie y summarize what we have accomplished so far and to motivate what lies ahead We started by considering some examples of signal processing algorithms in action and saw that all those examples t into one basic picture Fig 142 We have talked about a few very basic notions which the whole eld of signal processing is based on such as the notions of signals and systems We concentrated on linear timeinvariant systems and saw that in order to analyze such systems it was important to study representations of signals in orthogonal bases sltngt Zapkm k For example 0 when we represented our input signal as the sum of shifted and scaled impulses we obtained the interpretation of an LTl system as the convolution of its impulse response with the input 0 when we represented our input signal as the sum of complex exponentials we got an equally important interpretation of an LTl systeminamely that it modi es different frequency components independently of each other by multiplying each component by a complex number We called these frequency dependent complex numbers the frequency response and saw that it was the discretetime Fourier transform of the impulse response We moreover studied the FFT which a fast algorithm for computing spectral representations of signalsispeci cally the DFT Because of these properties of LTl systems it is very important to be able to think of signals both in time domain and in frequency domain The background material that we covered allows us to begin considering several important practical matters One example which will be considered in the lab portion of this course is lter design where the goal may be to attenuate certain frequencies in a signal and enhance other frequencies Every time you adjust the bass or treble on your audio equipment you are modifying a digital lter Every time you click enhance in an image editing program you are applying a digital lter to the image 86 CHAPTER 1 ANALYSIS OF DISCRETETIME LINEAR TIME7NVARANT SYSTEMS Another practical issue that we will start studying shortly is sampling You may have noticed that most real world signals are continuous time or continuous space When you go to a concert the music you hear is a continuous time signal How can you reliably store it as discrete samples on a compact disc Similarly the world you see around you is continuous How can we store digital images on a computer and make them look realistic and distortion free Sampling theory will provide partial answers to these questions I 152 Ideal Sampling In the following we denote the sampling period by T9 and the sampling frequency by f5 We begin by summarizing some facts about continuous time signals CTFT The forward and inverse continuous time Fourier transform CTFT formulas are 00 Xm mte 392quotf dt 700 m 1Xfe72quot df It is possible to extend the de nition of the CTFT to generalized functions called tempered distributions One example of a tempered distribution is the continuous time impulse 6t In this framework it can be shown that the Poisson formula holds so 2 Winn a Saki 2 fig ie that the CTFT of a periodic impulse train is another periodic impulse train as shown in Fig 143 Convolution with 6t0t 6t 7 to is simply a translation by to 00 m 6075 67 7 t0xt 7 m7 7 w 7 to 700 We represent the ideal sampling process as a multiplication of a signal by a periodic train of continuous time impulses as shown in Fig 144 Referring to this system we have xstmctst X50 XCSf Z Xcltf7Tisgt 136 n7oo Sec 15 Sampling 87 5t Sf 1 CTFT TL 6 5 O O O O O O O O O O O 0 4T 7T 0 T 2T 1 1 o 1 l t T5 T5 T5 T5 Figure 143 CTFT of a periodic impulse train Convert impulse zcnTs train to DT gt sequence Figure 144 Block diagram of an ideal sampler 3970 MU 7050 70W I l I I I I I I z I I 72Ts 7T 0 T 2T t 72 71 0 1 2 n a The signals is t and wstv b The signals is t and Figure 145 An example of xct and the resulting xst and for Fig 144 88 CHAPTER 1 ANALYSIS OF DISCRETEiTIME LINEAR TIMEilNVARIANT SYSTEMS To analyze what happens in the frequency domain7 we need to relate the DTFT of to the CTFT s of m5t and zct We do this by using a different method to calculate the CTFT of ms ms nimzmnwwnn X50 ningnnwrmwainnn 00 glean 1 6t7 nTse j2quotftdt i WWW X 67 lw2 fTs Therefore7 Xsm Xequot2quotfTS V hf x CTFT of 15t DTFT of m Xe7 X9 From this derivation7 we see that in order to get X elm from X90 7 we just need to rescale the frequency axis by replacing 1 5 with 271397 with 7139 etc We can now use Eq 136 to express the spectrum of the DT sampled signal in terms of the spectrum of the original CT signal zct 0 aw J i J 1 Xe 7Xslt27rTsgt Ts nEOOXCQWTS T9 The major point of concern here is how accurately these discrete samples represent the original CT signal We will try to answer this question by looking at the spectra and determining whether the original spectrum X00 can be recovered by low pass ltering X ejw Example 128 Sampling and reconstruction Consider a signal with the spectrum of Fig 14 6 Under what circumstances can we reconstruct this signal from its samples by ideal low pass ltering Case 1 gt a In this case the spectrum of the continuous time sampled signal zst is giuen in Fig 147 The original spectrum of Fig 146 can clearly be recouered by ltering Sec 15 Sampling 89 Figure 146 Spectrum of the continuoustime signal xct of Ebrample 128 f if ia0a f f Figure 147 Spectrum of the sampled continuoustime signal xst from Example 128 When the sampling rate is greater than 2a m Ts m Figure 148 Reconstruction of xct from xst If the sampling rate is higher than 2a perfect reconstruction With an ideal lowpass lter is possible Figure 149 Spectrum of the sampled continuoustime signal xst from Example 128 When the sampling rate is less than 2a 90 CHAPTER 1 ANALYSIS OF DISCRETEiTIME LINEAR TIMEilNVARIANT SYSTEMS aliasing error a frequency truncation error f Figure 151 Illustration to Example 128 Case 2 pre ltering before sampling Xsf with an ideal low pass lter whose cuto frequency is fsQ This is shown in Fig 148 Thus perfect reconstruction with an ideal low pass lter is possible if the sampling frequency is larger than twice the highest frequency of the signal Case 2 g a Referring to Fig 149 we see that it is impossible to recouer 0 with a low pass lter without distortion The distortion occurs because the spectra of neighboring copies interfere with the original spectrum When we lter Xsf with we recouer the distorted signal whose spectrum is shown in Fig 150 One possible way of auoiding this distortion is as we haue seen in Case 1 to sample at a higher rate Howeuer if we cannot sample at a higher rate there is still something that we can do in order to improue the quality of the reconstruc tion Speci cally we can pre lter the continuous time signal before sampling to ensure that the highest frequency of the signal to be sampled is not larger than Fig 151 Let be the result of pre ltering zct with the ideal low pass lter depicted in Fig 151 Let be the corresponding continuous time sampled signal If we now try to recouer zct from with our ideal low pass lter we get back Its spectrum depicted in Fig 152a is closer to the original spectrum than our preuious result of Fig 150 The frequencies in the range f9 7 a are now recouerediin other words the aliasing error is remoued The frequency truncation error is howeuer still present Sec 15 Sampling 91 X ltfgt Xf 1 f9 I I I I e 0 e f if 0 f9 f a b Figure 152 E ects of pre ltering sampling and reconstruction on the spectrum of the signal of Ebrample 128 Case 2 a The spectrum which results from pre ltering with an ideal lowpass lter b the spectrum of the sampled pre ltered signal The pre ltered signal can be reconstructed from the samples by ideal lowpass ltering Figure 153 If sampling rate is lower than the Nyquist rate some information about the continuous time signal will be lost in the sampled signal I 153 Nyquist Sampling Theorem Let 005 be a band limited signal with X00 0 for l gta The parameter a is called the Nyquist frequency and 2a is called the Nyquist rate If mct is sampled at the rate of f5 samples per second which is larger than the Nyquist rate f9 gt 2047 then mct can be recovered from its samples 9071 MnT n 0 i1 i2 by ideal low pass ltering If there is no restriction on the bandwidth of the signal unique reconstruction from samples is impossible This is illustrated in Fig 153 where the discrete samples form a constant signal whereas the continuous time signal is allowed to change rapidly between the samples 92 CHAPTER 1 ANALYSIS OF DISCRETEiTIME LINEAR TIMEilNVARIANT SYSTEMS Hm so Hue Hm m m A mm mm MW gm m X Ts CHD DgtC 7 L 2 1 A 2 Figure 154 A system for sampling DT processing and reconstruction Ebrample 129 X00 12 12 7a a f Figure 155 Input spectrum Xcf to the system of Example 129 Example 129 DT processing of CT signals Suppose we wanted to conuert an old analog recording to digital format store it on a compact disc CD and then play it back on a CD player Fig 154 illustrates in a uery idealized manner the steps we would take Note that before storing the signal on a CD we might want to do some signal processing for example in order to enhance the quality of the audio signal This step is represented by Hd Once we have our CD we would like to play it on our audio equipmentiie we would like to conuert the DT signal on the CD to a CT music signal While this diagram is just a simple example its structure is quite similar to the structure of real systems In Example 128 we considered euery component of this diagram exceptfor the middle portion DTprocessing Let us consider how this system will process the input signal whose Fourier transform Xcf is depicted in Fig 155 First we use the inuerse C TFT formula to calculate the signal xct mt foo Xcfej2quotftdf 6fiaej2quotftdf 6faej27 ftdf 1 1 6727rat 67 2 2 cos 27rat j27rat Now we consider the same two cases as in Example 128 Sec 15 Sampling 93 Case 1 f5 gt 2a 139 XcfHf Xe Hm 7 a 0 a g f 2 Xf Xgm Sm Xltfgt Xltfgt526f7 2a I 1 1 I 1 1 recall that fS f 0 if f S 7 s a a I s 3 XW x sz5 MW Rescale the frequency axis Also7 adjust the areas of the 67s 7T 7T recall that 6aw 6007 1 l 1 1 l 1 and so Th6 27 ZJES w 7T6w 727T 72 0 2 27139 w 4 we XltejwgtHdltejwgt7 M where quotn Hdltejwgt 7T 7T 7 0 lt w lt 7139 A A I d i W lt w lt 0 2 wa m 39 727T fs 0 fs 27139 w YM 2a7r 2a7r fs fs 1 l in 211 l 1 727T 7 fs 0 fs 27139 w 94 CHAPTER 1 ANALYSIS OF DISCRETEiTIME LINEAR TIMEilNVARIANT SYSTEMS 5 To get Yc f7 re label the frequency Y axis back and rescale the impulses quotquot Hf a a 1 gtTS 1 1 1 i i 6 Ycf YlfHf 39 39 M Hf ifsaOa f9 f TSYC f f S S f Ycf 0 lfl gt 7 aTS aTS Tsa6fa6fa W 1 yt 2aTS cos 27rat Therefore the ouerall e ect of the system on this particular input signal is equiv alent to multiplication by QaTs Case 2 f5 lt 2a In this case the output will be zero because the whole input signal will be ltered out by the rst low pass lter Let us now look closer at the reconstruction of an ideally sampled signal First7 we assume that there is no pre ltering Assume that after sampling a continuous time signal zct7 we get the samples m5t as in Fig 157a What happens when m5t goes through the low pass lter as in Fig 156 Note that the comb function st and the low pass lter Hf are as previously de ned in Example 1297 and thus we have ms Z gamma 7 nTs Figure 156 Signal reconstruction system Sec 15 Sampling 95 2 2 15 15 1 1 X50 xrm 05 T 05 39 0 0 AVA A I Aquot AA VV VVV 05 05 5 4 3 2 1 01 2 34 5 5 4 3 2 1 01 23 45 n n a 15t of the system in Fig 156 b The reconstructed signal m Figure 157 Interpolation With sincs The reconstructed spectrum is X70 XsfHf7 therefore 95 t x5tht m5tsincf9t zcnTs6t 7 71 sincf5t Z zcnTssincfst 7 mm 137 where we used the inverse CTFT formula to obtain 7175 W 1Hfequot2quot df Ts ejzw ft f4 j27rt fJZ S sincf9t From Eq 137 it is seen that in the time domain reconstruction by low pass ltering is equivalent to interpolating the DT signals with sinc functions The sinc functions are scaled and added up together to form the reconstructed signal Fig 157 Again we have a representation of the form mt Zakgw k 96 CHAPTER 1 ANALYSIS OF DISCRETEiTIME LINEAR TIMEilNVARIANT SYSTEMS where now gk s are sinc functions The original CT signal 005 may contain frequencies above However pre ltering mct with an LPF to avoid aliasing is the orthogonal projection of the signal onto the space of all bandlimited signals with highest frequency as shown in Fig 158 This results in a reconstruction which is the closest to 005 among all possible signals in this space Fig 158 It turns out that sincf5t 7 nT9 ioo is an orthogonal basis for this space 00 7 has frequencies above I pre ltering is the orthogonal projection onto G G 7 space of all bandlimited signals with highest frequency m t Figure 158 Pre ltering with an LPF to avoid aliasing is the orthogonal projection of the original signal on to the space G of all bandlimited signals with highest frequency Why is this interpretation important The space of all bandlimited signals is good for approximating smooth signals whose energy is concentrated at low frequencies It is well adapted to sound recordings which are well approximated by lower frequency harmonics For discontinuous signals such as images a low frequency restriction produces the Gibbs oscillations If you try to approximate a square pulse Fig 159a with low frequency components you will get a reconstruction which looks like Fig 159b 1 1 0 05 in 05 0 0 2 15 105 0 05 1 15 2 215 105 0 05 1 15 2 i i a A square pulse b Reconstruction with Gibbs oscillations Figure 159 The effects of Gibbs oscillations The visual quality of images is degraded by these oscillations so it is not a good Sec 15 Sampling 97 idea to sample images in the same way sound signals are sampled For the sampling and reconstruction of images it may be better to pick a basis which is different from the sinc basis and to project onto a different subspace However the basic vector space paradigm will remain the same This is yet another illustration of the importance of linear algebra in signal process ing It is very important to get used to thinking about signals as vectors This allows one to get a broader viewinamely that much of what we have done in this course is de composing signals into different bases and working with projections of signals onto the bases vectors We have seen that this is the basic idea behind convolution frequency analysis and also sampling We next consider several deviations from the ideal sampling model I 154 Effects of Zero Order Hold Sampling It is impossible to produce ideal impulses of in nite energy and zero duration Real systems try to get around this by using the sample and hold scheme where the value of a sample is held until the value of the next sample is available So instead of an impulse train the result of this sampling operation is a staircase function zZOH Fig 160 This function can be represented as the convolution of the ideally sampled signal 505 and a square pulse qt as shown in Fig 160 wonm ESQ gtk 111 1 gt gt Figure 160 The staircase function which results from the sampleand hold is equal to the ideally sampled signal convolved with a square pulse Therefore XZOHU Xsf CTFTqt Xsfi qte j27rftdt TS I X9f e tdt 0 757j27rft 98 CHAPTER 1 ANALYSIS OF DISCRETEiTIME LINEAR TIMEilNVARIANT SYSTEMS 15 Xf 05 0 215105 0 05 1 15 2 f a The original spectrum 2 2 xsm 39 c Tslsmd s V1 15 15 X 39 39 e quot I 1 5 39 9 1 E 39 39 39 M 05 3 T 05 A AA 1 15 0 215105 0 05 15 2 2 15 1 05 0 05 1 2 f f b Sampleiandihold for fs 05 c lXZOHf1 for f5 05V 2 2 xsm c Tslsmd s 1 15 15 x zquot e quot I 1 8 1 E 39I 05 05 0 quot 0 M M 2 15 1 05 0 05 1 15 2 2 15 1 05 0 05 1 15 2 f f d Sampleiandihold for fS 15 e lXZOHf1 for fS 1V5 Figure 161 An illustration of the sampleand hold scheme a The original spectrum b The ideally sampled spectrum Xsf and the magnitude of the spectrum of the square pulse qt for fS 05 c The magnitude of the spectrum of the signal obtained With sampleand hold7 Which is the product of the tWo spectra in de The same experiment With sampling rate fS 15 Sec 15 Sampling 99 X6jw f9 Ax A Q 39 27r in Figure 162 Sampling at Nyquist rate 1 1 JWfTs MfTs 7 JWfTs 7 X50 wa 2j lt5 5 gt 7 wan 7 X5fTse 7 WfTs XsfTse 7quotfTSsincfTs Hence lXZOHfl Tlesfl lsincfTsl ie XZOHf is a distorted version of X90 as exempli ed by Fig 161bc One possible method of reducing the distortion is to oversample ie to increase the sampling rate beyond the Nyquist rate As shown in Fig 161de this both spreads the aliases farther apart and makes the center alias less distorted I 155 Discrete Time Interpolation Increasing the Sampling Rate Another important deviation from the ideal scenario is that it is impossible to build an ideal analog low pass lter 7 that is a lter which would be exactly a non zero constant for some range of frequencies and exactly zero everywhere else Moreover it is very dif cult and expensive to build even a good approximation to such a lter However it is much easier to build a good digital lter that performs this function What are the implications Suppose we sampled at the Nyquist rate barely avoiding aliasing Fig 162 Just converting to CT and reconstructing will not work as we would need an ideal lter Instead we could partially solve this problem in DT by intemolatmg as shown in Fig 163 Interpolation consists of two steps upsampling and low pass ltering Step 1 Upsampling by a factor of L is inserting L 7 1 zeros after each sample muLn muLn1 mnLn2 muLnL71 0 100 CHAPTER 1 ANALYSIS OF DISCRETErTIME LINEAR TIMErlNVARIANT SYSTEMS lt gt lt gt HLPFW lt gt z n M n L hm 71 CF gt 7 w Figure 163 System diagram of an interpolation scheme 1 ms 11 0 we 10 2 m6 12 I I 0 1 2 n 0 l 2 3 4 5 6 n a A DT signal b The result of upsampling With L 3 Figure 164 Upsampling a signal An example with L 3 is shown in Fig 164 Therefore7 Xu57 Zmukeiwk k Z m Ln i dLn since zuUc 0 only if k is an integer multiple of L VL Z zne jwLn n Xej L Step 2 Low pass lter the interpolated signal How is the signal reconstructed We begin from Fig 16507 mimm mu gtk hn 138 Where hn is the impulse response of the low pass lteriie7 it is the inverse DTFT of HLPF ofFig165b 7r Mn HLPF ejwejwndw W 1 i Lewndw 27139 7 Sec 15 Sampling 101 sinc lt2 139 Putting Eq 139 into Eq 1387 we have the following i n 7 k minim Zmuksinc L k qumLsinc n iLmLgt m Zzmsinc n 17 140 m Now we can get away with a poor analog LPF and still reconstruct the original signal very well7 because the signal spectrum replicas are further apart Fig 165c Note that Eq 140 has a form that is similar to the CT reconstruction formula7 Eq 137 wt Zznsinc 5 yin n s 102 CHAPTER 1 ANALYSIS OF DISCRETErTIME LINEAR TIMErlNVARIANT SYSTEMS X 2 Xim3X1 Int 15 6X2 int Xintn 05 Figure 166 Lowpass ltering the upsarnpled signal interpolates the reconstructed data points Via sinc functions As in the continuous time case7 the reconstruction is produced by a series of sinc functions It is good for slowly varying signals but not good for signals with sharp transitions because of Gibbs oscillations Sec 15 Sampling 103 I 156 Decimation Decreasing Sampling Rate There are situations where we may have to decrease the sampling rate7 eg due to the lack of processing speed or the lack of available memory Downsampling by a factor of D is taking every D th sample from a DT signal 101 141 It is illustrated in Fig 167 053 M1 13 10 12 15 140 10 m we was M2 was ill l 0 1 2 3 4 5 6 n 0 1 2 n a A DT signal b The result of downsampljng Figure 167 Downsampling a signal by a factor of 3 Let us now pretend that was obtained by sampling a CT signal 005 Then mcnTs7 and7 as shown above7 1 111727171 X W X 5 T9 27 Moreover zdn mcnDT57 and so we can use the above formula with T9 replaced by DTS to get 1 w 7 27m Xdeiw Ts anxc 142 To relate X4571 to X5739 7 we perform a change of variables nkrDwith fooltrlt0070 k D71 Then we have D71 00 1 1 72 k 72 D we X0 D H 27 27rDT5 7 1f 1 1 i X TWWJM 13k0 277 0 27rT5 1 D71 w727rk 5 Xlt57 D 143 w H o 104 CHAPTER 1 ANALYSIS OF DISCRETErTIME LINEAR TIMErlNVARIANT SYSTEMS The spectrum of the downsampled signal is therefore the sum of shifted replicas of the stretched spectrum of the original DT signal7 as illustrated in Fig 168 X4f 1 I I 7a a f Xe7 f5 I I I 727139 727nsz 27raTs 27r w L me D u u u u u u I I I I 727139 727nzDTs 27raDTS 27r U f TX e717 75 u u u u u u I I I I I I I I I I 727139D 727139 727mDTS 27raDTS 27y 2WD 40 m727r 1le 8 gt u u u u u u I I I I I I 72wD 27r 27r 2WD 27rD 2W m Figure 168 Comparison between signal spectra In this pictorial example D 2 Refer to the derivation of Eq 143 From Fig 1687 when 27raTsD gt 7r7 we have 271sz9 gt This causes aliasing in the resulting spectrum Just as in the continuous time case7 we pre lter to avoid aliasing Fig 169 HLPF5jw M 1 M MW e 7 w Figure 169 System diagram of a decimation scheme

### BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.

### You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

#### "I bought an awesome study guide, which helped me get an A in my Math 34B class this quarter!"

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.