 We're looking at the different performance metrics that are common for analyzing communication systems and computer networks, at least a selection of many performance metrics. Some of the common ones we'll see through this course. Last week on our lecture on Wednesday we mentioned these three, bandwidth, data rate and throughput. We didn't say much about bandwidth. Our next topic we'll define bandwidth in more depth. It's related to the set of frequencies that a channel or a communications link allows to pass through that. So we'll look at, well, what does that mean and how that impacts on other metrics in more detailed next topic. Then we gave a couple of examples of data rate and throughput. Where data rate is the, think of it as the capacity of our communications link. The number of bits that we can send through that link per second, a link, we can also talk about data rate of a set of links. It's normally a characteristic of the transmitting device, the receiving device and the link, the medium. For example, when I connect, last week I connected my two laptops together via a LAN cable and I had a data rate of 100 megabits per second. So I could send 100 million bits per second out of my computer across that link. And with that wired LAN, the other computer, the receiver would receive 100 million bits per second if I was sending it that speed. So that's the data rate, the number of bits per second that can be transmitted across a link. But when we're sending those bits, in fact from the user's perspective, we may be sending 100 million bits per second, but some of those bits may be carrying information other than data. And we saw that most protocols attach a header to the start of the data. So that header information from the user's perspective, although it's necessary for the protocol to work, it's an overhead from the user's perspective. So the user's data is what's important. The throughput is a measure of the rate at which the user data is successfully delivered to the destination. So if everything gets delivered to the destination, if our data rate is 100 megabits per second, but we have a 20% overhead, then our throughput would be 80 megabits per second. 20% overhead, 80% of real data delivered. It gets more complex than that. After we look at some real protocols through this course, we'll see the throughput is more complex than just looking at overhead because sometimes data doesn't get successfully delivered. It gets sent but not delivered, and that impacts on throughput or reduces throughput. So we did a few calculations or examples of them. What we want to finish on is delay, not packet delay variation, just delay to keep it simple. The time it takes to get data from source to destination. Think of the data as, say, a single message. I want to get a single message, a packet, from one computer to another. From when I've got that message to be sent, I start transmitting. It's sent across the link, and it's received by the destination computer. I want to know how long it takes to do that, from sending to receiving. It takes us a second. So we measure in seconds, not bits per second here, this is time, a measure of time. There are four main components that contribute to the total delay. So we'll break it into four parts, and we'll look at them separately. We have transmission delay, propagation delay, processing delay, and queuing delay. So we think when we send our one packet from one computer to another, there may be different factors that cause a delay in that transmission, and we've broken into four different components here. Transmission delay is the time to think of the time to transmit the data, that one message, out of my computer. So it depends upon the amount of data I want to send, the number of bits, and it depends upon the speed at which I can send, the data rate. So if my packet is 100 bits, and I have a data rate of 10 kilobits per second, I can calculate the transmission delay, the 100 bits divided by the 10,000 bits per second. 10 milliseconds in that case. We'll do some calculations soon. So transmission delay, the time to transmit the data onto the link. Think of it as from the source computer, the time to get it out of the computer from the transmitting device onto the link. Although I've mentioned it once or twice, we haven't gone into the details, all of the transmissions that we produce are in fact sending some signal across our medium. So when I connect my LAN cable to my laptop, I transmit and produce some electrical signal going across that copper wire in the LAN cable. For any signal, and this is coming back to high school physics, for any signal, if we can look at it from the perspective of some waveform, think of a sine wave. They can be more complex than that, but some sinusoid, that signal takes some time to propagate. So from when I start transmitting the signal out of my computer until it propagates across the link between my computer, the source and the destination computer, there's some time involved there, the propagation delay. We'll have a few examples of that in a moment. We'll see that generally we can calculate, if we know some parameters, we can calculate transmission and propagation delay in simple cases. Other two factors may impact on delay. My computer must generate the signal, send to one device. That device may then send it to another one. Every time a device or computer processes the data, there may be some time for the CPU to do the processing, to read from disk, to read from and write to memory, and the CPU to do some processing. That takes some time for each computing device, the processing delay or processing time. Unfortunately, that's very hard to predict or calculate, in this simple course, because how long does it take my laptop to process and my CPU to process a single message? Well, it depends upon the CPU, the memory speed, the hard disk. It depends exactly on what's happening and how the software and hardware is implemented. It's very hard to predict or calculate what that time will be. Fortunately, in most cases it's very small. With fast computers today, the time to process a 100-byte message is in the order of nanoseconds, maybe microseconds. So, in theory, there's usually a processing or there's a processing delay involved. In practice, at least in this course, we'll see often we'll assume it's quite small, or zero, compared at least to the other factors. We'll give some examples. And the other factor, the other delay is what we call queuing delay. And this occurs when, especially in cases where we have multiple senders sending data at the same time, and the data arrives at some device that needs to send it on again, that device may only send one piece of data at a time. The others that it have to send may be queued, must wait in a queue before they are sent. So we'd say that those other pieces of data or messages incur some queuing delay. So an extra delay. The total delay from getting our message from A to B is the sum of these components. So if we can determine each of the four components, the total delay is just the sum of them. Let's go through some examples to illustrate these components. Let's start with some simple examples. There's a propagation delay. That's about the time it takes a signal to propagate through some link. Look at the clock. If I'm looking at the clock, the clock is generating some light. The clock generates some light. And that light is travelling to my eyes. So it takes some time from the light emitting from the clock until it reaches my eyes. How long does it take? What? Four metres away from the, or say three metres away from the clock. How long does it take for the light, which is just a signal, the light to come from the clock and reach my eyes? Can anyone calculate that? This is physics from high school, many years ago. How long does it take for light to travel some distance? How would you calculate that? Any idea? The light comes out of the clock and it reaches your eyes. It covers some distance, maybe 10 metres now from the clock to your eyes. From when it comes out of the clock or is generated by the clock and reach your eyes, how long does it take? Or how would you calculate that? You may not have the exact answer. How would you calculate it to find the answer? Meters per second, okay. Something about a speed. Speed of what? Speed of light. So we need to know the speed of light because light is the signal that's travelling in this case. So how many metres per second does light travel? Approximately. Three metres per second. Three something. Three something, good, you're on the right track. What about, what's the something? Three hundred million. Approximately, okay. Meters per second. Yeah, 2.99 something. Or about, or three by ten to the power of eight metres per second. The speed of light. That's what we'll use, okay. It's a little bit less than this. Three hundred million metres per second. So now, how long does it take the light to go from the clock, three metres to reach my eyes? So now we, if we know the distance that that light needs to travel, and we know the speed at which it travels, we can calculate the time or the delay it takes to travel that distance. So if it needs to cover, cover a distance of three metres, and we're going at this speed, then it's three metres divided by three by ten to the eight metres per second. One by ten to the minus eight seconds, okay. Ten nanoseconds, is it? So, quite simple. How long does it take to drive some distance? It's just the distance divided by the speed at which you drive. How long does it take our signal, our light signal, to travel some distance? The distance divided by the speed of light, in this case. All the same with our communication signals. When I now send a signal from my laptop over a cable to this PC, if I connect them via this, let's say it's one metre cable, then the propagation delay is this time of how long it takes that signal to propagate across that cable. And we'd need to know the same things. We'd need to know the distance, the length of the cable, and we'd need to know the speed at which the signal propagates across the cable. How long, what's the speed of electricity? Our electrical signal to propagate across my copper wires. Anyone want to guess? Approximate. Faster or slower than the speed of light? Okay. A lot slower. In fact, not much. It depends upon the physical material, the wiring that we use. Okay? So it depends if we're using copper wires, if we're using optical fibres, we have different speeds. And I never remember, it's on the order of... So speed of light is 3 by 10... 3 by 10 to the power of 8 metres per second. The speed of sending our electrical signal across our copper wires is about 2 points something by 10 to the power of 8 metres per second. 200 million metres per second. Still very fast, of course. It's approaching the speed of light, but of course, slightly less. In this course, unless I tell you otherwise, if we're talking about some signal propagating through any medium, let's assume that it is travelling at the speed of light, just to keep things simple. Sometimes I'll say otherwise and say, okay, assuming the signal has a speed of 2 by 10 to the power of 8 metres per second. Calculate this. If I don't say that, then you assume it's 3 by 10 to the power of 8 metres per second. And you need to remember the speed of light or you should know it. So light travels at this speed, our electrical signals or our communication signals travel slightly slower than this, depending upon the medium. In which case, if we know the length of our link and we know the medium and we can determine the speed of our signal, then we can determine the propagation delay for that link. We can calculate it. That's the propagation delay. Transmission delay. Now let's go through some calculations. I hope you have this. If you look, let's check. This is the handout entitled Performance Examples. Just check if you have this in your lecture notes, this one. I'm just going to go through some of the simple examples on the board. You can follow, but you have them right in front of you. Performance examples. First, we're going to look at transmission delay and propagation delay, ignoring queuing and processing to keep our life simple to get started. In this case, for the calculations, I checked in this case that the transmission speed, that is the speed of our signal we're going to assume, is 2.8 by 10 to the power of 8 meters per second, so a little bit less than the speed of light. Instead of 3, it's 2.8. If we have two devices connected via a single link, 10 kilometers in length, so if we draw our system A connected to B via some cable, the distance that it travels is 10 kilometers. The link data rate, so here we're talking about the data rate, is 1 megabit per second. That means that A, if we're looking from A to B, sending data A to B, if A transmits, it can transmit at 1 million bits per second. That's the data rate. If we want to send a single packet, a single message, and the size is 100 bytes, so A has a message which is 100 bytes in length, wants to send it to B. How long does it take? What is the delay? Now, we're going to assume that the processing delay, A and Bs are computers. They take some time to process this message, but they're very fast computers, and let's say the processing delay is very, very small. Small enough that we'll assume it's zero. And there's no queuing delay. Same, it's very, very small. Just for this theoretical calculation, the example, let's make them zero. We'll come back to them later. So we've got two components that impact on the total delay, the transmission and propagation delay. So the transmission delay, think of A's got 100 bytes of data to transmit. It transmits at a rate of 1 million bits per second. How many seconds does it take to transmit that 100 bytes? 100 bytes of data at a speed of 100 million bits per second, then we can calculate the transmission delay. I think I denote it in the handout as DT. Well, 100 bytes. Now note that our data is measured here in bytes, but our speed in megabits per second. When we're doing calculations, try and get them in the same unit. So I'll convert this from bytes to bits. So instead of 100 bytes, let's say 100 times 8 bits. I have 800 bits to send, and I'm sending them at a speed of 1 million bits per second, 1 by 10 to the power of 6 bits per second, a megabit per second. And from that we can find the time or the delay. Bits divided by bits per second gives us seconds. Bits divided by bits per second in terms of the units gives us bits times by seconds. The b's cancel out, we get seconds as the units. So we can double check that we're doing the calculation correct. We know we expect to get seconds as the delay, the size divided by the rate in this case. 800 bits divided by 1 megabit per second is 800 times 10 to the power of minus 6 seconds. 800 divided by 1 is 800. 1 divided by 10 to the power of 6 is 10 to the power of minus 6. Or 800 if we use our prefix, microseconds. That's a mu microseconds. I'll check. We can convert that to a different unit. It will see in the handouts. Any questions on this first step? This is just calculating one component of the delay, the time to transmit the information out of my computer. I've got so many bits. I send at some rate. It gives me some time or some delay in this case. Again, you have this in the handouts under the title performance examples. You can follow along. I've written the answer using the prefix of micro in microseconds. Of course, it's the same as 0.8 milliseconds. Or 0.0008 seconds. We can choose the prefix. When we're dealing with longer calculations, it makes sense to try and choose a prefix that's easier to use. For me, I prefer to use prefixes with whole numbers or with integers. Avoid fractions or many decimal places. But sometimes you cannot. So there's no one best answer here. You can say 800 microseconds, 0.8 milliseconds. They're both the same. But for ease of use, later, we may convert the units. So it takes 800 microseconds to transmit out of my computer. Because we're sending one bit at a time. We have one bit. We generate some signal, some electrical signal, to carry that bit across the link. And then we do the next bit and the next bit until we've done all 800 bits. When we transmit the first bit, the signal comes out of computer A. Some waveform and propagates along the link until it's received at computer B. This is like our light travelling from the clock to my eyes. Some waveform, the light travelling some distance at some speed. And the time it takes is our propagation delay. And as we saw before, the distance divided by the speed. It's 10 kilometres, which is 10 by 10 to the power of 3 metres, divided by the speed of our signal, or the speed of transmission given here. And in some cases, we can assume it's the speed of light. But in fact, in this case, I've stated it's 2.8 by 10 to the power of 8 metres per second. Because I looked up the value before. And you'll get some answer, which is 0.136, 0.036, 36 microseconds. Any questions before we move on to the next step? So what we just did is calculated the propagation delay. And the propagation delay deals with the physical signals. Light, audio, our electrical signal going across a cable. Think of it as some waveform, some sinusoid. And it takes some time to propagate across our medium. How long is our propagation delay? So we've got a signal. Think of a wave, it starts. It's generating, it's propagating across our 10 kilometre cable. And the speed at which it propagates is determined by the signal type and the medium. In this case, we said the speed is 2.8 by 10 to the power of 8 metres per second. Where did that number come from? I looked it up on some website or in some textbook about different mediums like copper, optical fibre. And I looked up and found an example of an optical fibre was around 2.8 by 10 to the 8 metres per second. It's slightly less than the speed of light. So we've got some distance for our signal to propagate. And we've got some speed, therefore the time is simply the distance divided by the speed. And gives us 36 microseconds in this case. So now what our computer A has started to do is it starts transmitting. Think of it, it transmits the signal representing the first bit. And that signal propagates across the link. But then a little bit later it starts transmitting the second bit, the third bit, until it's transmitted all 800 bits. The time to transmit all 800 bits was our 800 microseconds. The time for one bit to propagate across the link was 36 microseconds. The total time to get all of our data across the link is the sum of those two components. Can someone just turn on the air please? The total delay in this case, remember we have four components and they're additive. We've said processing and queuing is zero, so we can ignore them. And we've just calculated in this case transmission and propagation delay. The total delay is the sum of those four components. Well, two of them are non-zero, so it's just the sum we get 0.836 milliseconds or 836 microseconds. 36 plus 800 microseconds. So that's how long it takes our message to get from A to B, just one message in this case. That's our delay. Let's go through another example, make sure everyone's clear. And then we'll look at some other processing and queuing. Maybe you don't have this printed. It's on the website if you want it, but there's a few slides here, but it's just another simple calculation with some more details. Find the answer. Do it yourself in the next couple of minutes. Different scenario. A has simpler five bits to send to B. The link distance is 4.5 kilometers. The data rate is 500 kilobits per second. What is the total delay? You may make some assumptions and find the answer, the total delay in this case. Try on your own for a couple of minutes and then we'll discuss the answer. Many people like to copy things and like to copy down the question. In these questions in the class, you can check the details later. Maybe just draw a picture like this one. Don't spend the next three minutes copying the exact words. Try to find the answer first. So try and do it as quick as possible as if this was a quiz question. It goes direct to finding the answer. Remember there are four components of delay that we're considering. Transmission, propagation, processing and queuing. To get started. In this question, what's the processing delay? You can assume it's zero. If it's not given or you cannot calculate it, it's fair to assume that the processing delay is zero. It's small. Same with queuing delay. So in fact you only have two components to consider. Propagation and transmission. Anyone have an answer? Some people are on the way to an answer. Just take some time without a calculator. That's good. Okay. We've assumed processing and queuing was zero. Then the next thing is what's the speed of transmission? The speed of our signal? Well, normally when it's not given, assume the speed of our signal is 300 million meters per second. The speed of light. If it's in an exam, in fact usually in the exam I say at the front, assume it's this, unless I tell you, but if you need to make an assumption, just state that assumption. I assume the speed of light is x. And then calculate using that. And assuming it's close to this, I'll mark it correct. In this case I've done the answer with 300 million meters per second. Yes, in an exam you can use a calculator. And it's useful to have one in the lectures in some cases. In an exam a normal calculator is allowed. So we've got two components to consider, transmission and propagation delay. You can do either one of them first. Okay. So you can calculate either one, but I will calculate the transmission or look at transmission delay first. Before I go through any answers, 25, something sounds correct. From memory, yep. That looks correct, or very close. Looks good. A few people have got the answer. A couple more minutes just to give everyone a chance. That looks good. Make sure you write your units. Use a meter, seconds, dollars. Just check your units. The number looks correct, but the units don't. Or the prefix, no? What do you get? That looks okay. Okay, so I see a few people on the right track doing the calculations correct and getting numbers like 25 something, depending on someone be careful with the units and prefixes, but 25 microseconds. Let's go through in detail and explain using a diagram what transmission and propagation delay mean. So this is a different viewpoint. For those who don't understand what we mean by these two components, let's go through in a graphical manner to explain how A gets the data to be. What I'm trying to show in this diagram as we step through is what A does over time and how the signal propagates over time. So think of at time zero, we start a clock. And the delay, we want to measure how long it takes to get the data from A to B. So if we start at time zero, and as we go down in this diagram, time is increasing. So think this is time 20 microseconds, 22 microseconds. So we'll draw on this diagram what happens over different periods of time. The goal is A to get data to be, five bits of data in this simple case. A starts this at time zero. So what A does, it has five bits to send. Think of it, it transmits one bit at a time. So it starts transmitting the first bit at time zero. And what was our data rate? 500 kilobits per second. How many bits in one microsecond? Or maybe easier. How many microseconds to transmit one bit? How many microseconds to transmit one bit if we can transmit 500 kilobits per second? Two, I think is correct. So our data rate was 500 kilobits per second. 500,000 bits per second. So 500,000 bits per second is the same as 500 bits per millisecond in this case. If we have 500,000 bits in one second, we can transmit 500 bits in one millisecond. One second to one millisecond. Or half a bit per microsecond. Remember the prefixes seconds, milliseconds. There's a factor of 1,000 difference here. 1,000 milliseconds per second. And microseconds, there's 1,000 microseconds every millisecond. Half a bit per microsecond or two microseconds per bit. It's just another way to look at that rate. The inverse. 500,000 bits per second means to transmit one bit, it would take two microseconds. You don't have to worry about these two steps. It's just going through the detailed procedure. Understand if we have 500,000 bits per second, it takes two microseconds for one bit. Or mathematics, quite simply, one divided by 500,000. It's just the inverse of this number to get the time. So if we start transmitting the first bit at time zero, when do we finish transmitting the first bit at time two? It takes two microseconds to transmit the first bit. How long to transmit one bit? One bit in two microseconds. So if I try and draw this transmission, I draw it as a box, the first bit, if we start at time zero, we'd finish the first bit at time two on our picture. So I think to get that first bit out of my computer, it took two microseconds. Now I start sending the next bit. And that's what I've tried to draw here. We send the first bit, the second bit, if we start immediately after the first bit at time two, we'd finish the second bit at time four, the third bit finish at time six, the fourth bit and the fifth bit would be finished transmitting at time ten. So start at time zero, five bits takes ten microseconds. That's our transmission delay. And I think some of you calculated that is simply the data size, five bits divided by the data rate, 500 kilobits per second. Ten microseconds. So our transmission delay, ten microseconds. Five bits, two microseconds each. So the other component, what about the propagation delay? And that's, I think, when you combine them, it's hard for people to understand. So let's try and illustrate that. Again, go back to the start. We know that the transmission took ten microseconds, but let's go back to the start again. When I say transmit one bit, what actually happens? Well, when I transmit one bit, I think that for that time we're sending a signal, some electrical signal out of the source computer. So at time zero, I think the signal comes out of my computer onto the link. And that signal starts propagating across the link. So the signal starts propagating across the link as soon as we start transmitting at time zero. So we start transmitting at time zero, and the signal comes out, starts propagating. How long does it take to propagate? Well, we had 4.5 kilometers, which is the distance for the signal to propagate at a speed of light, 3 by 10 to the power of 8 meters per second. And if you take 4.5 kilometers divided by 300 million meters per second, you get 15 microseconds. That's easy. Just be careful with the units and prefixes. Here, kilometers, thousands of meters, here, 10 to the power of 8 meters per second. So if we start transmitting the signal at time zero, and it takes 15 microseconds to propagate to the other end, the other end of the link between A and B, then if we start here, we think the signal's propagating, it's propagating, it takes time. After 15 microseconds, it arrives at B. So computer B starts receiving the signal at time 15. So that's how we can illustrate the propagation time. In fact, we're not looking at when does B start receiving the first bit. We want to know when has B received the fifth bit, the last bit. So now we combine the two components together, transmission and propagation delay. So using the same concept, we start transmitting bit 1 at time zero, the signal starts propagating, going across the link. At the same time, or after two microseconds, we've finished transmitting bit 1 and we start transmitting bit 2. In the meantime, bit 1 is propagating across the link. And if we follow this, that is bit 1, 2, 3, 4, 5, if we start transmitting bit 5 at time 8, again it takes 15 to propagate, but in fact, we've finished transmitting the fifth bit at time 10. So I think the last portion of that fifth bit, the signal comes out of my computer at exactly time 10. And that signal, the last part of the the transmission must propagate across the link, 15 microseconds to propagate. So if we started transmitting at time 10, it would arrive at time 25. So there's some confusion sometimes in that the signal for the first bit is propagating and arrives at time 15. But while that's propagating, the second and third bit are also being transmitted. So in fact, what we care about is the total time to transmit from zero to 10 plus the time for that last signal to get to be, which is from 10 through to 25. That means the total delay from when we start time zero until when we've delivered all the data is 25 microseconds. Quite mathematically, it's just the sum of the two components, transmission plus propagation delay. So mathematically, it's easy. If you can calculate both of those two components, just add them together. But sometimes people get confused with what's happening with the bits and the propagation. Well, it's a bit more complex in that we see that one bit's one after another. And at the same time, those signals representing the bits are propagating across the link. When does the last signal arrive? Well, at this point. And that's what we care about. It gives us a total delay of 25 microseconds. 10 microseconds of transmission delay, 15 of propagation delay. Again, you don't have these slides in your printer to handouts, but they're on the website. You can download and have a more detailed look. The calculations were simple. The concepts are a bit harder for some students to get the head around. Questions about this one before I go back to the lecture notes. Simple thing. Remember, delay is additive. To get the total delay, add the components together. So if you can calculate the individual components, transmission and propagation, then you can get the total by adding the components together. You need to remember, transmission delay is the data size divided by the data rate. And that's in the performance examples handout, the equation there. The number of bits divided by the bits per second. Propagation delay is the distance, the physical distance in meters divided by the speed of the signal transmission in meters per second. Let's go through another example. This example is from the handouts that you do have. The performance examples. So from these performance examples, we went through case one. Case two is just a simple extension where we changed the link length from what we have 10 kilometers up to 1,000 kilometers. You can check that one. Let's try case three. So you have it in front of you. I'll try and draw a picture that captures the information in the question. We're using a satellite communication system in this simple example. Let's see and calculate the components of delay and add up the total delay. In this satellite system, there's a satellite up in space or in this case in geostationary orbit. That is above the earth, there's a satellite and the distance is about 36,000 kilometers. Here's our satellite. Here's a ground station. So this is on earth somewhere in Thailand, for example, and the distance from earth to the satellite, 36,000 kilometers. And how we use this satellite is that there's a computer at this ground station is going to transmit a packet up to the satellite. Say the computer here is in Thailand and the satellite then transmits the signal, repeats it and sends it down to some other earth station or ground station, say in the US. And the distance between the satellite and the second ground station is also 36,000 kilometers. So that's a typical form of satellite communication. Somewhere on earth we send up to the satellite. The satellite just repeats the signal and sends that down to some other location. As opposed to sending, say, via cables across or submarine cables through the Pacific Ocean, we just send up to the satellite and down to another continent. What have we got? The speed of transmission to or from the satellite to ground stations. The ground stations are these ones on the ground here, on earth. We're using the speed of light. So our assumption is 3 by 10 to the 8 meters per second. And the link data rate is 1 megabit per second in both directions. So I'll just write here 1 megabit per second. And same with this link. So when we send our message up to the satellite, we're transmitting at a speed of 1 megabit per second. And then the satellite, when it receives that message, the entire message, it sends the same message down at a speed of 1 megabit per second. And here we'll add in some processing time. What we do is the computer generates the message at the first ground station, let's say A, sending to B. We send a message up to the satellite. The satellite has to do a little bit of processing. And the satellite has an old computer. It's been up in space for 10 years. It takes 4 milliseconds to process this message. Yeah, 4 milliseconds. So once we receive the message, there's an extra delay of 4 milliseconds, the processing delay and the satellite, and then the satellite sends down to B. Find the total delay. Last thing, a 1000 byte message. So given we need to send a 1000 byte message from A to B via this satellite, how long does it take? What's the transmission delay? Let's go through the different components. Now we have a network. We have two links. And delay is additive, meaning we can treat the link separately, and for the total delay, add up the components for both links. So now we think we have link 1 from A to satellite, and link 2 from satellite down to B. For link 1, we can calculate the transmission delay and the propagation delay, and also for link 2. And then we add them all up. Recall our transmission delay is our data size divided by our data rate. 1000 bytes at a rate of 1 megabit per second. 8000 microseconds or 8 milliseconds. So from A up to the satellite to transmit that 1000 byte message takes 8 milliseconds. Let's find one more colour. Let's make note of them on the diagram. So to transmit up, the transmission delay is 8 milliseconds from A up to the satellite. But the signal needs to propagate across that 36,000 kilometer link, so we calculate the propagation delay, and that's the distance divided by the speed. The speed of light in this case. Distance, 36,000 kilometers. 3 by 10 to the 8 meters per second is the speed. 120 milliseconds, let's check. 120 milliseconds in that case. Okay, you can use a calculator. But the hardest thing, make sure you check the prefixes. Make sure you're using the same units and prefixes. So to get a signal up to the satellite takes 120 milliseconds. What's next? Once we get the signal up to the satellite, then there's an extra delay. There's a processing delay at the satellite. So we get the message at the satellite, and then the satellite does some processing. The CPU goes to work, and it takes 4 milliseconds to process. And then it starts transmitting down to B. What's the transmission delay from satellite to B? The transmission delay from satellite to B, same size message, 1,000 bytes, same rate, 1 megabit per second, therefore same transmission delay, because it's the same characteristics for the link. And similar, the propagation delay will be the same, because it's the same distance, same speed, so another 120 milliseconds. So there will be 8 milliseconds to transmit down plus 120 milliseconds of propagation, and then the entire message has been received by B. Total delay is the sum of the components. 8 plus 120 plus 4 plus 8 plus 120, 260 milliseconds in this case. So we've seen two new things here. The propagation and transmission we can calculate from the same as before, but we've seen processing delay. In this case, in this example, I just gave you the value of the processing delay. It's very hard to calculate, because it depends upon the computer speed and the implementation of things. So the processing delay is hard to calculate. In this course, I'll either give you the value or you assume it's zero. So in this case, I gave you the processing delay of the satellite to be 4 milliseconds, processing delay at A and B, let's assume that there was zero in this case. But I could say, as B receives, the antenna incurs a processing delay of half a millisecond. If that was the case, you just add that on. Just add the components together. Similar, when we have more than one link, treat the link separately, and then the total delay is just the summation of the components. So transmission propagation, add them all up and you get the total delay. So we've seen some simple examples of three components. Transmission, propagation and processing. What about queuing delay? At lunchtime, you go to the cafeteria and you get in line, or most people get in line to order food. So there's a line of 10 people in front of you to order food. If you arrive, then you have to wait in the queue and you spend some time in that queue and that's the queuing delay. So if you spend one minute waiting to get to the head of the queue before you can order, then that's the queuing delay that's incurred for you while you're waiting to order. Now, in a communication system, queuing delays often occur in large networks like the internet, where many messages arrive at one computer at the same time and that one computer can only send one message at a time. So that computer, the messages are in a queue waiting to be sent. If we had other ground stations transmitting up to this same satellite, C and D, A, C and D all transmit to the satellite at the same time. It has multiple receive antennas. It receives three messages. Then it needs to transmit them all down to B. Well, it can only transmit one at a time. So it receives three messages, has three to send to B, it sends one of them to B while the other two wait in a queue. And then the second one is sent to B while the last one is waiting in a queue to be sent and then the last one is sent to B. In that case, those messages would have an extra queuing delay. So queuing delay usually occurs when many people are sending into a device at the same time and then they have to send out one at a time. Same as the queuing delay for you in the cafeteria. If there's many people who've just finished the lecture and go to the same shop at the same time, your queuing delay will be high. But if you arrive there at 10.30am when there's no one else coming out of the lecture, then the queuing delay may be very small because there's fewer people coming into the system. So the queuing delay depends upon the amount of messages or the amount of packets coming into a particular device. In this course, we will not attempt to calculate queuing delay. You need, there's a field of mathematics to analyse queuing delay and it can get very complex. Again, similar to processing delay, in a question in an exam I may say, assume the queuing delay is 10 milliseconds, then to calculate the total delay you just add it on to the other components. It's just the summation of all the components. So I will not ask you to calculate queuing delay or processing delay, but I may give you some values or example values and you just add it in to get the total delay. Any questions about how to calculate delay in a communication system? We've got one more example to go through, then we're done. So in summary, transmission delay, the time to get the bits out of the computer, the transmitting computer, data size divided by data rate, transmission delay, propagation delay, the time for a signal to traverse a link depends upon the link distance and the signal speed, say the speed of light. Then the other two components, processing delay, depends upon the computers, and queuing delay depends upon the other messages in the system. And total delay, the summation of all the components. Let's finish with a short example because we're not going to cover packet delay variation, not in this course. So the main ones, delay, throughput, data rate, and bandwidth is more to come soon. Let's have one quick example of delay. Some of you, we said in an internet application gaming and people have heard of Ping. Ping is a, in my computer, a program that sends a message to a destination computer. Destination sends back a response and we can measure the time or the delay for that request and response to get back. For example, the destination can be ICT server. If this works, let's just make it smaller so it's all in one line, I hope. What's happening when I run this program Ping, my laptop sends to the ICT server and a response comes back. And the most important thing is that it reports the time to get there and back. So sending one message, the size of the message is about 64 bytes. There's some fine details there, but a small message. Send to ICT server, ICT server sends back a response. So the time to get there and back is given here and it keeps doing, sending a message, get a response. A bit later, send another message, get a response and the times vary. So in the order of several milliseconds, 10 milliseconds, 19 milliseconds and so on. 16 milliseconds. It differs because of the network. There may be other people sending and there may be some queuing delay and processing delay at different devices in the network. So just a quick example of the time to get there and back. It's what's called the round trip time. Time to get, to go around. That is to the destination and back. What we calculated here was the one-way delay from A to B. Ping is going from A to B and then B back to A. So it's there and back. And it gives us some summary information here like the average of 8 milliseconds. You can try ping on your computer and from home or from SIT and try and ping different destinations and see the different delays. It's best to do it outside of SIT, say from home. Let's stop there and on Wednesday we'll start the new topic on data transmission and look at signals in detail. Signals, bandwidth, frequencies and so on.