1 00:00:00,012 --> 00:00:05,822 In this video, we're going to talk about digital communication, the transmition of 2 00:00:05,822 --> 00:00:10,723 bits from one place to another. It turns out that most channels, or even 3 00:00:10,723 --> 00:00:14,166 digital communication applications are analog. 4 00:00:14,166 --> 00:00:17,522 So, we have to worry about how we send those bits. 5 00:00:17,522 --> 00:00:22,232 What is a good choice for the signals, the analog signals to use, and what are some 6 00:00:22,232 --> 00:00:25,433 bad choices. Well, since the channel is also analog, we 7 00:00:25,433 --> 00:00:29,989 have to worry about how much bandwidth is being used to send that bit sequence and 8 00:00:29,989 --> 00:00:34,816 becoming a very important consideration. So, let's get started and develop what's 9 00:00:34,816 --> 00:00:40,604 called the digital communication model. So here, I show a situation similar to 10 00:00:40,604 --> 00:00:46,341 what we've already talked about in terms of analog communication. 11 00:00:46,341 --> 00:00:52,336 In that, I have an analog signal and message m has to be sent to sink. 12 00:00:52,336 --> 00:00:57,643 Now, what we're going to do as opposed to the analog situation, where we 13 00:00:57,643 --> 00:01:03,967 automatically send that to the transmitter to modulate it, let's say, here, we go 14 00:01:03,967 --> 00:01:07,416 through an A to D converter, to create bits. 15 00:01:07,416 --> 00:01:13,494 Those bits have to somehow be related to an analog signal that can go through our 16 00:01:13,494 --> 00:01:16,983 analog channel, be it wireline or wireless. 17 00:01:16,983 --> 00:01:23,449 The receiver then will convert that analog signal back into a bit sequence, which 18 00:01:23,449 --> 00:01:29,814 then goes into our familiar thing, the D to A converter and to produce the, the 19 00:01:29,814 --> 00:01:37,162 message that was trying to be transmitted. So, it's a complicated sequence of events 20 00:01:37,162 --> 00:01:42,772 here, much more so than in an analog case, but there are some real advantages and 21 00:01:42,772 --> 00:01:46,980 some disadvantages. And we're going to talk about those as we 22 00:01:46,980 --> 00:01:50,895 go through. The, there are also situations in which 23 00:01:50,895 --> 00:01:56,691 the message is inherently digital, a sequence of bits and what I'm thinking 24 00:01:56,691 --> 00:02:01,704 about here is text. Text, can, is automatically a sequence of 25 00:02:01,704 --> 00:02:08,564 bits, there is no A to D converter at all so the same model and processing that I 26 00:02:08,564 --> 00:02:14,852 have in both of these are the same. It doesn't really matter except there's no 27 00:02:14,852 --> 00:02:18,089 A to D or D to A in the digital message case. 28 00:02:18,089 --> 00:02:23,880 We still have the problem how do you assign analog signals to bits and how do 29 00:02:23,880 --> 00:02:27,905 you undo that to receive that bit sequence again. 30 00:02:27,905 --> 00:02:31,588 The channels are all analog in almost every case. 31 00:02:31,588 --> 00:02:36,495 So, it turns out, assigning bits to analog signals is a pretty easy task. 32 00:02:36,495 --> 00:02:41,543 What we're basically going to do is assign a signal, a specific signal for each bit. 33 00:02:41,543 --> 00:02:46,189 We're going to have a signal that represents a 0, a different signal that 34 00:02:46,189 --> 00:02:49,718 represents a 1. Those two signals, whatever we choose, 35 00:02:49,718 --> 00:02:53,759 form what we call a signal set. Let me give you a simple example. 36 00:02:53,759 --> 00:02:59,966 And this is the simplest digital communication case that we have. 37 00:02:59,966 --> 00:03:05,079 It's called BPSK. Stands for Binary Phase Shift Keying. 38 00:03:05,079 --> 00:03:11,571 Keying is an old word which comes from the telegraph days which sending dots and 39 00:03:11,571 --> 00:03:15,988 dashes is the same as sending zeros and ones in many ways. 40 00:03:15,988 --> 00:03:19,279 So, that's where the terminology is borrowed from. 41 00:03:19,279 --> 00:03:24,511 In Binary Phase Shift Keying, whatever signal you use to represent one bit, here 42 00:03:24,511 --> 00:03:27,740 I have a positive [unknown] to represent a zero. 43 00:03:27,740 --> 00:03:34,170 The other signal is the negative, and that defines a binary shift keying signal set. 44 00:03:34,170 --> 00:03:38,426 In all cases, one signal is the negative of the other. 45 00:03:38,426 --> 00:03:45,182 Now, in the case I've shown here, you could consider this a baseband signal set. 46 00:03:45,182 --> 00:03:51,140 It exists at low frequencies. If you wanted to modulate it up, you can. 47 00:03:51,140 --> 00:03:57,878 That's also a BPSK signal set because the two members of the signal set obey this 48 00:03:57,878 --> 00:04:02,421 relationship. You can see here I have a positive sine 49 00:04:02,421 --> 00:04:07,975 wave and here, I have a negative sine wave so they are still BPSK. 50 00:04:07,975 --> 00:04:13,322 Now, the, the important thing about signals in a signal set is that they are 51 00:04:13,322 --> 00:04:17,435 finite duration. Because what's going to happen is, we're 52 00:04:17,435 --> 00:04:23,205 going to send one bit after another. And that means each signal represents a 53 00:04:23,205 --> 00:04:28,909 single bit, has to only take a specific amount of time, and we call that time 54 00:04:28,909 --> 00:04:34,613 capital T and it's know as the bit interval, time taken to transmit a single 55 00:04:34,613 --> 00:04:38,572 bit. Well, this has an important consequence, 56 00:04:38,572 --> 00:04:44,182 because now the datarate, the rate at which we send bits, is given by the 57 00:04:44,182 --> 00:04:50,583 reciprocal of that time interval. So, whatever the time interval is, the 58 00:04:50,583 --> 00:04:57,933 datarate is the reciprocal, so if you have a 1 megabit per second transmission rate, 59 00:04:57,933 --> 00:05:02,165 that corresponds to a time of one microsecond. 60 00:05:02,165 --> 00:05:10,949 One microsecond has been used for each bit and so there's a direct relationship here. 61 00:05:10,950 --> 00:05:17,340 And we'll see this as important consequences in just a second. 62 00:05:17,340 --> 00:05:25,453 Alright, now, now here, I'm showing an example of sending a bit sequence 0110 one 63 00:05:25,453 --> 00:05:30,761 after another. And you can see how we just attack on each 64 00:05:30,761 --> 00:05:37,595 signal from the signal set one after another to produce the transmitted wave 65 00:05:37,595 --> 00:05:41,556 form. It could be modulated or not it doesn't 66 00:05:41,556 --> 00:05:46,301 really matter. But all, that's why their finite duration, 67 00:05:46,301 --> 00:05:52,637 we simply go one after another until we finally represent our bit sequence with 68 00:05:52,637 --> 00:05:56,979 analog signals. And again, the receiver is going to be 69 00:05:56,979 --> 00:06:03,609 worrying about trying to figure out what the bit sequence was from this analog 70 00:06:03,609 --> 00:06:07,843 signal. You know, another signal set is the FSK 71 00:06:07,843 --> 00:06:12,092 signal set. Stands for Frequency- Shift Keying. 72 00:06:12,093 --> 00:06:18,497 And here, we're going to use sine waves to represent the bits but with two different 73 00:06:18,497 --> 00:06:23,392 frequencies. Usually, these frequencies are harmonic to 74 00:06:23,392 --> 00:06:29,787 the bit interval and in this example, I show a frequency of 0 that is 3 over T. 75 00:06:29,787 --> 00:06:34,056 And here, I show an f1 that's 4 over capital T. 76 00:06:34,056 --> 00:06:40,131 And that is a typical FSK signal set. They could be different harmonics. 77 00:06:40,131 --> 00:06:46,830 Higher harmonics could be separated by more than one harmonic number whatever 78 00:06:46,830 --> 00:06:51,541 your choice may be. The P of t in this formula has to do with 79 00:06:51,541 --> 00:06:56,795 the fact these are finite durations are multiplying by faults. 80 00:06:56,795 --> 00:07:01,873 So, these are not sine waves for all time. They again, have duration t. 81 00:07:01,873 --> 00:07:07,302 So, there's a datarate related to the reciprocal of T just like in the BPSK 82 00:07:07,302 --> 00:07:10,902 case. And here is what it looks like when you 83 00:07:10,903 --> 00:07:17,488 have that same bit sequence. It's a bit more subtle, what the different 84 00:07:17,488 --> 00:07:23,283 between a 0 and 1 is. But hopefully, there are receivers that 85 00:07:23,283 --> 00:07:28,210 can figure this out. You know, one is the transmission of 86 00:07:28,210 --> 00:07:34,977 bandwidths, how much analog bandwidth in hertz is taken by sending a sequence of 87 00:07:34,977 --> 00:07:38,742 bits. Well, the one problem that comes up right 88 00:07:38,742 --> 00:07:44,039 away is that bandwidth depends on what the bit sequence is itself. 89 00:07:44,039 --> 00:07:47,499 So, let me show you this by a simple example. 90 00:07:47,499 --> 00:07:51,744 Suppose this is time, and here are my bit intervals. 91 00:07:51,744 --> 00:08:00,043 And I suppose the bit sequence I'm trying to represent is 0000. 92 00:08:00,043 --> 00:08:10,195 Well, the signal that represents that for our signal BPSK baseband signal site is a 93 00:08:10,195 --> 00:08:15,621 constant and that constant has no bandwidth. 94 00:08:15,621 --> 00:08:22,017 It's a constant basically for all time, and clearly, that's not going to work very 95 00:08:22,017 --> 00:08:25,943 well. If I have my alternate bit sequence that I 96 00:08:25,943 --> 00:08:31,988 showed in previous slides, now the transmitted signal looks like this, which 97 00:08:31,988 --> 00:08:37,856 has a bandwidth, has a wider bandwidth, certainly than a constant signal. 98 00:08:37,856 --> 00:08:44,102 What signal set, not the signal set, what bit sequence gives you the worse case 99 00:08:44,102 --> 00:08:48,556 bandwidth? I've given, it's clearly not the constant. 100 00:08:48,556 --> 00:08:55,722 A bit sequence that has, has no bandwidth, and the one I showed here is there one 101 00:08:55,722 --> 00:09:01,550 that's worse, that has a higher frequency content than these. 102 00:09:01,550 --> 00:09:08,330 And the answer, of course, is the alternating bit sequence is the worst, 103 00:09:08,330 --> 00:09:14,937 because now the signal goes back and forth, back and forth, back and forth. 104 00:09:14,937 --> 00:09:21,216 We know what the spectrum of this is. This is a square wave. 105 00:09:21,216 --> 00:09:30,168 So, we right away, using Fourier series, we know what the spectrum is of this worst 106 00:09:30,168 --> 00:09:36,626 case bit sequence represented by a baseband BPSK signal set. 107 00:09:36,626 --> 00:09:42,409 We know that its spectrum is given by 2 over j pi k for k odd. 108 00:09:42,409 --> 00:09:46,856 But one thing to note is what the period is here. 109 00:09:46,856 --> 00:09:53,663 One period here is twice the bit interval. So, that's why it's a harmonic of 2T 110 00:09:53,663 --> 00:10:00,584 rather than, we use capital T to represent a period when we talk about square waves. 111 00:10:00,584 --> 00:10:04,938 The period here is 2T, where T is now the bit interval. 112 00:10:04,938 --> 00:10:11,845 Okay, now, one consequence of this is that we know that the spectrum is basically 113 00:10:11,845 --> 00:10:16,804 infinitely long. So, if we have something at the first 114 00:10:16,804 --> 00:10:24,262 harmonic, the third, the fifth, the seventh, etc., the bandwidth is basically 115 00:10:24,262 --> 00:10:27,494 infinite. And so, we have a more practical 116 00:10:27,494 --> 00:10:32,745 definition of bandwidth and that is to use what's called the 90% bandwidth. 117 00:10:32,745 --> 00:10:37,917 So, we want to worry about something that's similar to what we talked about in 118 00:10:37,917 --> 00:10:43,637 terms of total harmonic distortion. I want to figure out how many Fourier 119 00:10:43,637 --> 00:10:49,271 series coefficients are needed so that I grab 90% of the power. 120 00:10:49,271 --> 00:10:57,581 And so, here's the idea. We have a spectrum of the baseband signal 121 00:10:57,581 --> 00:11:03,271 set for example, which is like this, right? 122 00:11:03,271 --> 00:11:10,278 First and the third harmonics. How much, how far do I have to go out so 123 00:11:10,278 --> 00:11:16,706 that the total power in these harmonics is 90% of the total power? 124 00:11:16,706 --> 00:11:23,727 And it turns out when you do the calculations for the square wave, it turns 125 00:11:23,727 --> 00:11:29,427 out it's almost exactly, it is exactly the third harmonic. 126 00:11:29,427 --> 00:11:35,561 So, the bandwidth that we care about is this bandwidth right there. 127 00:11:35,561 --> 00:11:42,689 And so, this harmonic number corresponds to an absolute frequency of 2 over T so 128 00:11:42,689 --> 00:11:48,179 the bandwidth is 3 over 2T. So, it's 3 halves of the datarate, the 129 00:11:48,179 --> 00:11:54,490 bandwidth taken to transmit our 1 megabit per second signal is 1.5 megahertz. 130 00:11:54,490 --> 00:12:00,132 And this is, in general, true. You need a larger bandwidth in hertz than 131 00:12:00,132 --> 00:12:04,002 you do in datarate measured in bits per cycle. 132 00:12:04,003 --> 00:12:10,502 When you modulate the baseband signal set, as you may know, the bandwidth doubles 133 00:12:10,502 --> 00:12:16,677 because now you have to measure things on either side of this inner frequency. 134 00:12:16,677 --> 00:12:22,593 So now, the bandwidth taken is 3R. It requires a higher, a larger bandwidth 135 00:12:22,593 --> 00:12:26,315 to transmit, to modulated it than at baseband. 136 00:12:26,315 --> 00:12:31,901 But as we know, we are forced to use modulation in most cases anyway because 137 00:12:31,901 --> 00:12:37,751 wireless, wireline channels really work the best at higher frequencies than 138 00:12:37,751 --> 00:12:42,389 baseband. Now, the transmission bandwidth for FSK is 139 00:12:42,389 --> 00:12:50,619 a bit more complicated to derive. So, I'm again going to use my worst case 140 00:12:50,619 --> 00:12:58,584 bit sequence here. And think about this FSK signal as a 141 00:12:58,584 --> 00:13:05,057 superposition. So, what I have is a f0 sine wave 142 00:13:05,057 --> 00:13:14,370 multiplied by a square wave and here, I have an f1 frequency sine wave multiplied 143 00:13:14,370 --> 00:13:22,349 by a square wave, but they're out of phase with respect to each other. 144 00:13:22,349 --> 00:13:28,258 And all we do is add these up and that gives us the transmitted signal. 145 00:13:28,258 --> 00:13:34,829 If I can figure out the bandwidth of each, then I'm in good shape, I can figure it 146 00:13:34,829 --> 00:13:40,468 out what the total bandwidth is by sensor spectra I have to add. 147 00:13:40,469 --> 00:13:45,859 I think I, I have a way of getting at it. But it's again, a square wave, okay? 148 00:13:45,859 --> 00:13:50,421 So, I think we can calculate that spectrum just like we did before. 149 00:13:50,421 --> 00:13:55,324 I'm going to assume that the carrier frequencies are harmonics of the bit 150 00:13:55,324 --> 00:13:58,640 interval, k0 and k1, to be completely general. 151 00:13:58,640 --> 00:14:06,194 Now, it turns out, here's a little detail here and that these square waves, having 152 00:14:06,194 --> 00:14:13,742 nonzero value, their, their average values is, are not 0, which means c0 is not 0 in 153 00:14:13,742 --> 00:14:20,387 the Fourier series. So, the spectrum, before you modulate it 154 00:14:20,387 --> 00:14:30,256 up, of that square wave has a value at the origin, a value at the first harmonic, and 155 00:14:30,256 --> 00:14:37,497 some smaller value given by the formula at the third harmonic. 156 00:14:37,497 --> 00:14:45,621 So now, what's the bandwidth? Now, since the there's a, a nonzero 157 00:14:45,621 --> 00:14:54,971 component at the origin, the bandwidth, it turns out the 90% bandwidth is now this. 158 00:14:54,971 --> 00:15:01,850 It turns out it occurs for just have to go to the first harmonic. 159 00:15:01,850 --> 00:15:10,023 Now, when you now I want to think about what the modulated spectrum looks like. 160 00:15:10,023 --> 00:15:17,324 We ought to draw a little picture here. So, after we modulate, okay, we modulate 161 00:15:17,324 --> 00:15:19,890 up to f0. We have our center. 162 00:15:19,890 --> 00:15:24,152 You go up to the first harmonic on either side. 163 00:15:24,153 --> 00:15:32,392 And so, this is a has a bandwidth now of some amount, but we're worried about the 164 00:15:32,392 --> 00:15:37,009 total bandwidth of the entire FSK signal set. 165 00:15:37,009 --> 00:15:44,428 So, we draw the other signal, let's say, it's f1, it, too, has, looks like that. 166 00:15:44,428 --> 00:15:52,429 So, the bandwidth is going to go from the lowest frequency for f0 up to the highest 167 00:15:52,429 --> 00:15:58,346 frequency for f1. So, that's what I show in these equations. 168 00:15:58,346 --> 00:16:04,556 We want to, the lowest frequency that's required for the 90% bandwidth for FSK is 169 00:16:04,556 --> 00:16:08,647 given by this, the highest frequency given by that. 170 00:16:08,647 --> 00:16:14,599 And putting it in terms of harmonic numbers, you get these relationships, 171 00:16:14,599 --> 00:16:21,511 subtract those upper and lower frequencies and you get the following expression when 172 00:16:21,511 --> 00:16:26,751 all is said and done relating it to datarate, which is 1 over T. 173 00:16:26,751 --> 00:16:35,087 So, it's the difference of the harmonic numbers plus 1 times the datarate, turns 174 00:16:35,087 --> 00:16:43,282 out to be the bandwidth of FSK, alright? So, it's interesting you compare BPSK and 175 00:16:43,282 --> 00:16:47,130 FSK. So, since the FSK is a modulated signal 176 00:16:47,130 --> 00:16:54,124 set, we only need to be fair, we only need to consider a modulated version of BPSK. 177 00:16:54,124 --> 00:17:00,240 So, we found that the bandwidth for BPSK is 3 times the datarate, well, it turns 178 00:17:00,240 --> 00:17:06,851 out if you use adjacent harmonic numbers, the bandwidth for FSK is more efficient. 179 00:17:06,851 --> 00:17:12,275 For the same datarate, you can send a digital sequence, sequence of bits in a 180 00:17:12,275 --> 00:17:16,646 smaller bandwidth and a significantly smaller bandwidth. 181 00:17:16,646 --> 00:17:22,432 Of course, if you don't pick adjacent numbers, harmonic numbers, this bandwidth 182 00:17:22,432 --> 00:17:25,684 goes up. But it's interesting that you can now 183 00:17:25,684 --> 00:17:31,411 directly compare and worry about the efficiency of the communication scheme, 184 00:17:31,411 --> 00:17:36,541 the efficiency, at least in terms of bandwidth required in the channel. 185 00:17:36,541 --> 00:17:42,979 So, in digital communication, what we do is we assign a signal set to each bit, and 186 00:17:42,979 --> 00:17:46,774 these signals have to be a finite duration. 187 00:17:46,774 --> 00:17:51,987 That's really important. So, we can send one bit after another. 188 00:17:51,987 --> 00:17:57,175 The datarate is determined both by the source and the channel. 189 00:17:57,175 --> 00:18:02,671 Now, what I mean by that is we've discovered at whatever choice we make for 190 00:18:02,671 --> 00:18:07,073 a signal set, that demands a certain amount of bandwidth. 191 00:18:07,073 --> 00:18:11,768 Well, that channel has to be able to support that kind of bandwidth. 192 00:18:11,768 --> 00:18:17,494 In other words, they can not narrow, narrow band filter the signal so much that 193 00:18:17,494 --> 00:18:22,263 it impinges upon the bandwidth that's required to send the bits. 194 00:18:22,263 --> 00:18:27,077 So, the datarate determines what the bandwidth is, in most cases. 195 00:18:27,077 --> 00:18:33,287 There's another issue though, is that this source is putting out bits at a given 196 00:18:33,287 --> 00:18:36,571 rate. You probably want to send those bits 197 00:18:36,571 --> 00:18:40,690 through the channel as they emerge from the source. 198 00:18:40,690 --> 00:18:45,646 This transmission scheme has to keep up, not getting ahead of what the source is 199 00:18:45,646 --> 00:18:48,550 doing. If the transmitter works at a lower rate 200 00:18:48,550 --> 00:18:51,312 than the source, there's going to be a problem. 201 00:18:51,312 --> 00:18:54,697 There's going to be a backlog of bits that have to be sent. 202 00:18:54,697 --> 00:18:59,176 So, in most cases, you have to keep up. That's why I say the datarate is 203 00:18:59,176 --> 00:19:04,663 determined by the source ultimately. How fast is the source putting out those 204 00:19:04,663 --> 00:19:10,443 bits, and then secondly, by the channel in the terms of its bandwidth, does it have 205 00:19:10,443 --> 00:19:15,664 the bandwidth to send those bits. So, the signal set choice affects the 206 00:19:15,664 --> 00:19:20,843 bandwidth and we've already seen that FSK can be a bit more efficient. 207 00:19:20,843 --> 00:19:26,288 But the one other thing that we need to consider is reception performance. 208 00:19:26,288 --> 00:19:32,184 Don't forget, this channel adds noise and it attenuates the signal. 209 00:19:32,184 --> 00:19:38,526 This has an affect on how accurately the bits we get out are the same as the bits 210 00:19:38,526 --> 00:19:42,627 we sent. And so, it turns out the signal set choice 211 00:19:42,627 --> 00:19:47,295 affects that also. That's what we're going to talk about in 212 00:19:47,295 --> 00:19:48,625 the next video.