Of'course not all signals are[INAUDIBLE]. Signals have channel spectras, but these are not band-limited, and they are sampled. The out of band spectrum will fall back exactly in an alias manner as we have seen with Sinusoids. Of'course this is a nasty phenomena because suspect from that we've seen. The base band does not correspond to the proper spectrum of the signal and so this has to be avoided. What you have to do is, you have to apply low pass filtering, mainly low pass filters that cut off frequencies beyond half of the sampling frequency and then we can properly sample a signal. This is what we are going to see in this module. Module 6.5, sampling and aliasing. We've seen aliasing for very particular signals. Sinus wave to complex exponentials. Now we are going to look at aliasing for arbitrary spectra's and look at a few examples. We'll finish by rubbing up sampling of arbitrary signals using some projection theorem onto the space of unlimited signals. Remember the row sampling of an arbitrary signal, so you have a continuous time signal xc of t samples every ts seconds to give a sequence xn which is equal to the continuous time signals at multiples of the sampling interval ts. In fully transformed domain we have A spectra of the continuous time signal capital xc j capital omega and at the output we have a discrete time Fourier transform of the sequence that's capital X e to the j omega. What is that going to be in general and how is it going to be related to the input spectrum. The key idea is the following. Pick a sampling interval TS or a frequency omega N equal to pi over Ts. Start with omega 0 which is smaller than omega N, the Niquest frequency which is the maximum frequency that can be faithfully represented with this sampling system. So the input is e to the J omega 0t, it's sampled with Ts, it gives an output e to the J omega nought Ts times N, that's a sequence resulting from this sampling operation. Then let's add 2 omega n, to the input frequency. So now the frequency only gots 0 plus 2 omega n. It is sampled. And the output, it is only got 0 plus 2 omega n times ts times n. We expand this product, then we see that the second term becomes 2 pi n, but 2 pi n raised to the power e to the j, is equal to one, and therefore, we have the same discrete time sequence as before. So, we do not see this higher frequency complex exponential, it simply looks like the lower frequency exponential omega 0. So in general if we have 2 frequencies A times complex exponential omega 0 plus B times the complex exponential omega 0 plus 2 omega N sampled it gives you A plus B e to the j omega 0 Tsn. So the upper frequency 1 has been folded back or aliased back. On to the lower frequency 1 and we simply see that the sum of these 2 and so the alias part has been shifted back to the non-aliased one. So the what is the spectrum of a raw-sampled signal in general. Well lets look at this sample x of n, it is xc at location nTs, we can write this as the inverse fourier transform of the spectrum capital Xc multiplied by e to the j. Omega nTs because that's the occasion we want to evaluate in this fourier transform. Frequencies that are 2 omega N apart will be aliased. We have seen this specifically on an example just a couple of slides before. So we can split the integration interval into pieces of size 2 omega N and this we do here. So x(n) this inverse fourier transform is now. There's a sum of the pieces from 2k minus 1 omega n, to 2k plus 1 omega n, of the fully transformed here, and multiplied by the complex exponential at nTs. Lets look at this on a picture. So everything that these at location to omega n will be folding back to the origin, what is that, 2 omega n plus epsilon will be folded back to epsilon. What is at 2 omega n minus epsilon gets folded back to minus epsilon. The same symmetrically around minus 2 omega n. It's the same from 4 omega n and minus 4 omega n et cetera, et cetera. So, we can go back to our formula. We do a change of variables so that the integral is between minus omega n and omega n. This change is the frequency variable inside of xc. Then we also note that adding multiples of 2k omega n to the frequency doesn't change the frequency of that c. [unknown] effect, we can interchange summation and integral to end up this one or two pi's, the integral, the summation. Of the spectrum xc and its shifts by multiples of 2k omega m n. And then at the right end we still have the integration variable for the inverse fully transform. Lets define a periodized spectrum, so capital X tilde c is the summation of Xc and its shifted versions by even multiples of omega n. Therefore, the sample xn, is integral between minus omega n and omega n, of the periodized spectrum x tilde multiplied by e to the j omega nts. Let's use a falling change of variable. Small omega is equal to capital omega times Ts. This will change the integration boundaries from minus omega, omega n, into minus pi to pi, it changes the frequencies inside the x tilled, and it changes it's exponent to j o Omega N, which is more convenient. So, we recognize now that xn is the inverse discrete time Fourier Transform of 1 over ts[INAUDIBLE] spectrum X til c Rescaled by TS. An important point to note is that this[UNKNOWN] spectrum, rescaled, is actually 2 pi periodic. So it's a valid DTFT. Since this is the IDTFT, it means that the DTFT of the sequence, capital X of e to the j omega, is simply up to a scale factor of 1 over ts. The summation of xe, and these shifts by multiples of 2 pi over ts. A picture is worth 1,000 equations, maybe. So let us look at this spectrum and how it evolves. So we start with capital XC. It's a spectrum, which is inside the boundary minus omega n to omega n. It doesn't cover the entire interval. Then the periodized version puts repetition spectras of 2 omega n, 4 omega n, et cetera. This is now a periodic spectrum of period 2 capital omega n, so spectrum of x of e to the j omega is A scaled version of this. It is 2 pi periodic. And it is shown here at the bottom in blue. Let's take a band limited signal that is band limited to omega zero, equal to omega n. This is the limit of the Nyquist sampling frequency. It will be periodic of period 2 omega n, which is equal to 2 omega zero. So the repetitions will just. Touch each other, it is therefore the usual periodic spectrum and now we look at the spectrum of x of e to the j omega. It fills the entire interval minus pi to pi. What happens when omega 0 is bigger than omega N. Well we know trouble is going to come because aliasing will happen. So, we see that the spectrum is beyond the central interval of minus omega N to omega N. So the repetition will overlap with each other. The result is still 2 omega N periodic spectrum, we see it has a funny shape now, it's not the original shape because of the overlaps and when we look at the spectrum of x of e to the j omega. So blue spectrum, it indeed does not resembles the original spectrum because an entire interval has been messed up by aliasing. Let us look at the non-band limited signal. So this is a goshan type of single, which has decayed but goes well beyond the central interval minus omega m, 2 omega m. It is after sampling the periodized version is to omega n periodic of course, but there are overlaps all over, and it has in the center of the interval shapes that resemble the original spectrum, but then it has overlap And so the blue spectrum, which is between minus pi and pi resembles the original spectrum around the origin 0. But is different from the original at the boundary of the Intro. Since it leads us to sampling strategies for different signal. So if you are given a sampling period Ts and the nyquist frequency omega n is equal to pi over Ts, if the signal is band limited to omega n. Then row sampling is fine. As I pull in to sink sampling up to a scaling factor. If the signal is not band limited, we have two choices. Either we band limit it first with a low pass filter that will cut off all frequencies beyond omega n in the continuous time domain before we do sampling. Then, everything will work just fine as we have seen or we roll sample the signal, and we have aliasing. Now let's face it, aliasing usually sounds horrible, so usually it's not the first choice. So let's investigate a little bit how we sample signals that are not strictly band limited to begin with. So how do we do sync sampling and interpolation. So sample x of n is simply the inner product of sync function shifting to the location n times Ts was x(t) so in put single, this can be written simply as the combination of the sync with x at location nTs. Then the interpolation, x hat of t, is the sum of the samples multiplied by the same functions shifted to the location n t s. We see this in this block diagram from left to right we have a continuous time signal x of t. It goes through an ideal low pass filter with the cut off frequency capital omega N, it is sampled every Ts seconds. So samples are interpolated by sync interpolation and the result is x hat of t. It is interesting to look at this scheme in purely diametrical terms. So, we have an input signal x, it's a vector in a Hilbert's space. We have a subspace of band limited signals, BL. The first thing we do is we have an orthonormal basis for BL, it's given by the sync function and its shifts by integer multiples of capital Ts. Based on this orthonormal basis, we write an orthonormal expansion, which is the orthonormal project of x onto the space of band limited signal. So it's written as a sum of the sync in a product with x times the sinc functions. And so we see that the scheme we had on the previous slide is simply the projector of x on to the subspace of band limited signal, that projection of course can be written in terms of the sampling theorem. But we can not write x we can only write x hat, the projection. Now, let's look at the concrete example, one that we have encountered before, which is a non band limited signal. Here's is its quotient shaped signal. And we are going to do least squares approximation on the space of band limited signals using sync sampling and interpolation. So, we start with capital Xc as a continuous time spectrum, non band limited. We are going to band limit it to minus omega N to omega N. So this is given by this green ideal filter. After filtering, the spectrum is strictly band limited. It's zero outside this interval of size 2 omega n. Then we do the sampling and this reads to a periodic spectrum X tilde c. Given in these pink shape here and it repeats at multiplies of 2 omega N as we have seen before then we look at the DTFT of this sequence and the DTFT is 2 pi periodic. It's given by this blue function and finally we re-interpolate a continuous time spectrum using sync interpolations that gives us x hat c which now is exactly the reconstruction of the band limited version of the initial x c. This band limited version, of course easier orthogonal projection of the initial spectrum onto the space of band limited signals.