0:00:00.535,0:00:05.017 We have seen how to calculate spectras of signals, of sequences. 0:00:05.017,0:00:08.998 Now, once, you have the spectrum and it is not a wide-band spectrum, 0:00:08.998,0:00:14.315 but it is mostly around a certain frequency, we can specify types of signals. 0:00:14.315,0:00:17.240 For example, if most of the energy of a signal is around the origin, 0:00:17.240,0:00:19.314 we call it a lowpass signal. 0:00:19.314,0:00:24.502 If it has the energy concentrated somewhere else, we call it a bandpass signal. 0:00:24.502,0:00:30.190 And if its energy is around -π or +π frequency, that is called a highpass signal. 0:00:30.790,0:00:34.602 Now, we're going to see a modulation theorem for the Fourier Transform, 0:00:34.602,0:00:36.997 which allows to transform a signal, 0:00:36.997,0:00:41.944 let's say from low-pass into a band-pass signal, or to demodulate a signal 0:00:41.944,0:00:44.458 which is from a high frequency into a low frequency. 0:00:44.459,0:00:50.556 This is obtained simply by multiplying by[br]cosine of the adequate frequency. 0:00:51.340,0:00:55.051 Once we have the modulation theorem, we can do a very practical application 0:00:55.051,0:00:57.579 which is actually tuning a guitar. 0:00:57.579,0:01:03.672 So tuning a particular string to another string or to a reference sinusoid, 0:01:03.672,0:01:05.944 by using the modulation theorem. 0:01:05.944,0:01:09.653 Maybe you've used this trick or you've heard musicians use it on stage. 0:01:09.961,0:01:14.068 Now you'll see how a Fourier modulation[br]theorem is actually behind it. 0:01:16.067,0:01:20.268 Module 4.8: Sinusoidal Modulation. 0:01:21.791,0:01:24.272 We are going to look at different types of signals, 0:01:24.272,0:01:27.321 namely lowpass, highpass and bandpass signals. 0:01:27.582,0:01:32.370 From there, we move to sinusoidal modulation which is a way to shift a signal, 0:01:32.370,0:01:35.191 for example lowpass signal, to become a bandpass signal. 0:01:35.191,0:01:39.724 Using these tools, we are going to look at a very practical application 0:01:39.724,0:01:42.112 which is, namely, tuning of a guitar. 0:01:43.680,0:01:46.587 There are three broad categories of signals, 0:01:46.587,0:01:50.956 depending on where the spectral energy actually is mostly concentrated. 0:01:51.295,0:01:54.865 The easiest one and most natural one is lowpass signals, 0:01:54.865,0:01:57.048 sometimes called baseband signals. 0:01:57.141,0:01:59.445 Then we have high-pass signals, 0:01:59.445,0:02:03.985 where the frequency content is mostly around high frequencies, 0:02:03.985,0:02:06.324 and in between, you have band-pass signals. 0:02:06.477,0:02:10.759 Now, there will be a difference between discrete time and continuous time signals, 0:02:10.759,0:02:16.358 as we shall see, but these basic categories are present in both cases. 0:02:18.019,0:02:20.039 So let's look at a lowpass spectrum. 0:02:20.039,0:02:25.567 As you can see, the energy is mostly concentrated around the origin, around 0, 0:02:25.567,0:02:28.126 and there is no energy outside. 0:02:30.249,0:02:32.735 This is now highpass signal. 0:02:32.735,0:02:37.682 The energy is around π or -π and there is no energy around the origin. 0:02:39.543,0:02:41.751 Finally, the band-pass signal. 0:02:41.751,0:02:47.769 In this case, it's concentrated around π/2 at -π/2 and π/2. 0:02:47.769,0:02:50.084 Since this is an example of a real spectrum, 0:02:50.084,0:02:55.106 it has this symmetry that we have seen in the properties of the DTFT. 0:02:57.168,0:02:59.883 Consider now sinusoidal modulation. 0:02:59.883,0:03:07.366 This is obtained by taking a signal x[n] and multiplying it by a cosine of ωc times n. 0:03:07.366,0:03:12.132 What will this produce on the spectrum when we know x [n], 0:03:12.132,0:03:15.430 and its DTFT, X of e to the jω? 0:03:15.430,0:03:23.550 So it is the DTFT of x[n], multiplied by a cosine of ωc times n. 0:03:23.550,0:03:29.417 So that's the DTFT of using Euler's formula, as usual of x of n 0:03:29.417,0:03:34.910 multiplied by both e to the jωcn and e to the -jωcn. 0:03:35.648,0:03:42.875 And this simply creates a double spectrum, namely it's equal to 1/2 X of e to the jω 0:03:42.875,0:03:47.712 shifted to ωc and shifted to -ωc. 0:03:47.712,0:03:53.272 So usually, we take x[n] as a baseband and ωc is called the carrier frequency. 0:03:53.272,0:03:56.775 Now, to get an intuition for this formula, think of the following case. 0:03:56.775,0:04:02.895 Think of x[n] being the constant, so we simply have the DTFT of cosine ωcn, 0:04:02.895,0:04:08.751 which of course has these two peaks at ωc and -ωc, 0:04:08.751,0:04:11.689 as we know from the DTFT of a cosine function. 0:04:11.689,0:04:16.520 So this gives the intuition: so if x[n] is a very, very narrow band lowpass signal. 0:04:16.520,0:04:20.484 It looks a little bit like a constant and then, through modulation, 0:04:20.484,0:04:25.361 it will be moved to these two peaks at ωc and -ωc. 0:04:27.622,0:04:29.358 Let's do this pictorially. 0:04:29.387,0:04:33.246 So we start with a spectrum: here, t's a triangle or a spectrum around the origin. 0:04:33.246,0:04:37.034 We move it to ωc, multiply it by 1/2. 0:04:37.034,0:04:41.234 That's the first green spectrum, then we move it to -ωc. 0:04:41.234,0:04:46.524 It's a blue spectrum also multiplied by 1/2, and this is the result, 0:04:46.524,0:04:48.883 the red spectrum now after modulation. 0:04:48.883,0:04:55.427 So the central peak has been moved into two half-as-big peaks at -ωc and ωc. 0:04:56.997,0:05:05.381 We know that spectrum is 2π periodic, so let's show a few periods here from -4π to +4π shifted to ωc 0:05:05.412,0:05:12.250 (green spectrum), shifted to -ωc (blue spectrum) and the resulting red spectrum. 0:05:14.157,0:05:15.748 Now, I want us to be careful 0:05:15.748,0:05:19.978 if the modulation frequency grows beyond a certain point 0:05:19.978,0:05:22.806 and we're going to demonstrate this again pictorially. 0:05:22.806,0:05:27.543 So here, ωc is very close to π, the maximum frequency, 0:05:27.543,0:05:30.636 close to -π, the blue spectrum. 0:05:30.636,0:05:38.876 And we see now that we have a funny looking spectrum around + or - π and + or - 3π. 0:05:38.876,0:05:43.140 This is not exactly what we had expected, so if we blow it up, 0:05:43.140,0:05:46.209 we can see that we don't have the triangle spectrum anymore, 0:05:46.209,0:05:50.842 we have a piece of the triangles and something funny around -π and π. 0:05:52.565,0:05:57.977 Let us look at some applications of what we have just learned about signal modulation. 0:05:57.977,0:06:02.167 So, for example, voice and music are typically lowpass signals. 0:06:02.167,0:06:05.619 They don't have infinitely high frequencies, because anyway, 0:06:05.619,0:06:08.583 they wouldn't be heard by the human hearing system. 0:06:09.383,0:06:11.878 Radio channels, on the other hand, are bandpass signals, 0:06:11.878,0:06:14.152 because we need to modulate them high up, 0:06:14.152,0:06:18.935 otherwise, there is too much interference or too much loss in transmission. 0:06:18.951,0:06:24.262 Modulation is the process of bringing a baseband signal, for example, a voice signal, 0:06:24.262,0:06:27.776 into the transmission band for radio transmission. 0:06:27.776,0:06:32.121 And demodulation is the inverse or the dual of modulation 0:06:32.121,0:06:37.388 and it will bring back the signal from a bandpass down to the baseband. 0:06:39.203,0:06:42.252 So let us look at this demodulation process. 0:06:42.252,0:06:47.158 It is simply done by multiplying the received signal by the same carrier again. 0:06:47.158,0:06:51.731 So we have y[n] is x[n] times cosine of ωcn. 0:06:51.731,0:06:55.887 Its spectrum, we have seen before -- Y to the jω -- 0:06:55.887,0:07:01.807 is a combination of the two spectras shifted to ωc and -ωc. 0:07:01.807,0:07:08.546 The DTFT of y[n] multiplied by 2 cosine of ωcn, 0:07:08.546,0:07:16.637 well, it's going to be the combination of Y shifted to ωc and to -ωc. 0:07:16.637,0:07:20.959 Then, we replace the formula we just had before, so we have four terms. 0:07:20.959,0:07:25.732 One shifted by 2ωc, another one, by -2ωc, 0:07:25.732,0:07:28.760 and two terms that are actually at the origin. 0:07:28.760,0:07:34.394 And so, we have indeed capital X e to the jω on plus 1/2 0:07:34.394,0:07:37.847 and two modulated versions at 2ωc and -2ωc. 0:07:39.414,0:07:41.535 Let's do this pictorially. 0:07:41.535,0:07:44.723 So the DTFT of x[n] is shown here. 0:07:44.723,0:07:47.680 So it's a spectr-- triangle spectrum around the origin. 0:07:48.573,0:07:54.625 Then its modulated version has two peaks at -ωc and +ωc. 0:07:54.625,0:08:00.923 Then y[n] multiplied by cos ωcn has two shifted version, 0:08:00.923,0:08:08.007 one to the right by ωc, it's the green one, one to the left by ωc is the blue one. 0:08:08.007,0:08:13.366 And the total is the sum of these two, which has a peak around the origin, 0:08:13.442,0:08:18.724 which is of height 2 and the 2 other peaks, which are around π. 0:08:21.307,0:08:26.388 We have now the picture of the DTFT of the demodulated version. 0:08:26.388,0:08:29.230 It looks like the original spectrum around the origin, 0:08:29.230,0:08:33.524 but it has these two peaks closer to -π and π, 0:08:33.524,0:08:35.952 which were not present in the original signal. 0:08:37.659,0:08:39.534 So, we have the baseband, 0:08:39.534,0:08:42.423 but we have these two spurious high-frequency components, 0:08:42.423,0:08:46.045 and we will have to learn how to actually get rid of them, 0:08:46.045,0:08:48.648 and this will be the topic of the next module. 0:08:50.663,0:08:53.129 Finally,we're going to see a real application, 0:08:53.129,0:08:57.248 a really useful application, that is, it is tuning your guitar. 0:08:57.248,0:09:03.215 The abstraction of the problem is that you have a reference sinusoid at some frequency ω naught, 0:09:03.215,0:09:07.422 You have a tunable sinusoid of frequency ω. 0:09:07.422,0:09:11.935 And we would like to make ω and ω0 as close as possible, 0:09:11.935,0:09:15.739 actually equal and this, only by listening to it. 0:09:15.754,0:09:17.390 And what we are going to hear 0:09:17.390,0:09:20.825 is a beating between these two frequencies when they are close enough. 0:09:20.825,0:09:26.453 And then by tuning, we can bring this beating to essentially frequency zero, 0:09:26.468,0:09:28.759 at what point, ω is equal to ω naught 0:09:28.759,0:09:34.171 and we have tuned our guitar string with respect to a reference frequency. 0:09:36.094,0:09:38.432 So how are we going to go about this? 0:09:38.432,0:09:41.449 Well, first we bring ω close to ω nought 0:09:41.449,0:09:45.371 That's sort of easy if you have a minimum of musical ear. 0:09:45.371,0:09:50.377 When these two frequencies are close, we play both sinusoids together, 0:09:50.377,0:09:52.631 then we have to remember trigonometry, 0:09:52.647,0:09:58.238 and we write x[n], which is a sum of cos ω0n plus cos of ωn, 0:09:58.238,0:10:03.891 in terms of a sum and a difference of these two[br]frequencies, 0:10:03.891,0:10:09.407 which finally can be written approximately as 2 times the cos of the difference, 0:10:09.407,0:10:14.863 Δ of ω times n and the cosine of the base frequency ω naught. 0:10:16.555,0:10:20.941 From this formula we see there are two components: there is the error signal 0:10:20.941,0:10:27.683 -- the cosine of Δωn -- and there is a modulation signal -- the cosign at ω0. 0:10:27.683,0:10:32.425 When ω is close to ω0, the error signal is very low frequency, 0:10:32.425,0:10:35.426 so we cannot really hear it, because it's such a low frequency. 0:10:35.426,0:10:39.654 So the modulation will bring it up to the hearing range 0:10:39.654,0:10:43.896 and we are going to actually hear it as an oscillation of the carrier frequency. 0:10:43.896,0:10:46.739 And we're going to see this pictorially in just a moment. 0:10:48.478,0:10:51.162 Let's look at the pictorial demonstration here. 0:10:51.162,0:10:56.900 So we start ω0 is 2π times 0.2. 0:10:56.900,0:11:01.379 ω is 2π times 0.22, the difference, 0:11:01.379,0:11:07.731 which is actually half of the difference between the 2 is 2π times 0.01. 0:11:08.115,0:11:13.412 We see now, interestingly, we have the carrier frequency, which is red curve 0:11:13.412,0:11:18.433 modulated by the difference, by cosine of Δ of ω. 0:11:18.433,0:11:26.350 So we see this, the beeping in blue overlaid to the red curve which is the modulation. 0:11:26.350,0:11:32.631 We can change the frequency ω to 0.21 times 2πi. 0:11:32.631,0:11:37.890 The difference now is 0.005, the beating is slower. 0:11:37.890,0:11:44.411 We pick ω is equal to 2π times 0.205, the beating is even slower. 0:11:44.411,0:11:49.382 And here, we take an example where ω is very close to ω0 0:11:49.382,0:11:52.238 and the beating is extremely slow. 0:11:52.238,0:11:56.436 And we almost see only the modulating frequency ω0 0:11:56.436,0:12:02.743 and the very slow variation due to the beating by cosine of Δ of ω. 0:12:03.451,0:12:06.858 It's time to see a video demonstration how to tune a guitar, 0:12:06.858,0:12:08.957 using this very simple principle. 0:12:08.957,0:12:12.117 You probably have seen musicians doing it on stage, 0:12:12.117,0:12:14.952 now you understand the math behind it. 0:12:16.659,0:12:22.534 Okay, after all these maths, let's try to do something useful like tuning an electric bass. 0:12:22.534,0:12:28.238 An electric bass has an E string, [music] which is a frequency of 41.2 hertz, 0:12:28.249,0:12:31.707 an A string, [music] which is a frequency of 55 hertz. 0:12:32.260,0:12:36.288 To use the result we have just seen, we want to find two frequencies 0:12:36.288,0:12:37.851 that we want to make equal. 0:12:37.851,0:12:40.847 As long as they are not, there will be a beating that we can adjust, 0:12:40.847,0:12:42.486 we are going to hear this in just a moment. 0:12:42.486,0:12:48.648 So the first harmonic of the E string here is at [music] 83.4 hertz. 0:12:49.817,0:12:53.084 The third harmonic is at 164.8. 0:12:53.437,0:13:01.106 For the A string, the first harmonic is at 110 and the second harmonic is at 165. 0:13:01.106,0:13:05.743 And we're going to use these two harmonics to do the tuning 0:13:05.743,0:13:09.363 and you can hear when they're out of tune. 0:13:10.685,0:13:17.781 There is a beating and you should -- as you get them closer and closer, 0:13:17.781,0:13:23.200 the beating slows until it's actually zero beating. 0:13:23.200,0:13:31.852 And then the two frequencies are similar and then we can start playing something like [guitar strumming] 0:13:31.852,0:13:33.464 or something else.