 What we're going to do now for the rest of this semester is go through the protocol the TCP IP protocol architecture So in the previous topic we introduced this five layer stack from the bottom physical layer data link layer network Transport application So for the rest of the semester we're going to go through technologies concepts and protocols in each of those layers working from the bottom and Finishing at the top at the end of the semester So now we're going to start at the physical layer and recall the physical layer the goal is to take some data, let's say bits and Transmitters some signal across a link so For my laptop to send data to another PC that's connected it needs to send some signal some Physical signal so this topic on data transmission. We're going to look at the structure and the design of such communication signals And we look at some of the mathematics of the signals and how that's used and eventually arrive at how The signals impact upon some some of our performance metrics But first some simple terminology And this is easy We have in the simple case if we have two devices We have a transmitting device and a receiving device the transmitting device wants to send data to the receiving device And they send data via some medium and the communication. What do they send? Well, the physical thing that they send is waveforms electromagnetic energy Think of some waves. Okay light. We can think of as a set of light waves Energy is being transferred from the light to your eye eyes My Wi-Fi signal is some energy is being transferred from my laptop up to the access point So our basic communications is via sending electromagnetic waves from transmitter to the receiver We need to look at the structure of those waves or what what are they? What do they look like and how do we design those waves or more generally the signals that we send? We want to communicate data Usually zeros are ones files images emails But what do we actually send from one computer to another is some form of energy in the form of waves? our signals All right before we get into the structure of these signals The medium between transmitter receiver we can categorize generally is to either guided or unguided a Guided medium is wires cables The signal is transmitted across wires, maybe with some coding around those wires So an an electrical signal across some copper wires I don't have the LAN cable, but the LAN cable that I plugged from laptop into PC in Inside that LAN cable. We're just some copper wires and my LAN device Generates some electrical signal that is Transmitted across those copper wires and we'd say that's a guided medium in that the signal is guided along those wires across that the physical material So other there are different types of technologies which will cover in the next topic What is twisted pair? What is coaxial cable optical fiber? But these are all examples of guided media the energy from that signal is contained more or less inside the wiring or the cabling Then the alternative is unguided Which is wireless communications or wireless signals a Wireless medium air water if we send signals through water and theory through a vacuum In that case the signals that we send are not guided by some material. They disperse almost in any direction Sometimes we can focus them a bit, but the energy is transmitted out of my antenna In my laptop my laptop has an antenna built into the back of the screen It generates some electromagnetic waveform and some energy disperses In fact it goes in all directions up down left right Some of the energy goes to the antenna on the access point up there, which receives it Wireless is unguided in an unguided medium in that the the signals are not guided by a particular material They can go almost anywhere So we can distinguish and we will look at them. They have many different properties or characteristics, so Why it is good for some things wireless is good for other things. We'll look at them in the next topic The link between transmitter and receiver Whether it's guided or unguided we can say the configuration can be either point-to-point or Point-to-multi-point or simply multi-point Multi-point medium or configuration or point-to-point configuration point-to-point is then there's just two devices Transmitter sends to one receiver multi-point is when there are more than two devices Sharing that link or sharing that medium. So for example one transmitter transmits Many receivers receive at the same time that would be multi-point configuration So a different classification In any communications link or medium we can distinguish based upon the direction of communications. We can say a link is Simplex half duplex or full duplex in simplex we send our information in one direction only an Example TV broadcast. There's a TV station. They have a tower Maybe via satellite even but they transmit their TV signal your TV at home Maybe has an antenna that receives that signal Your TV does not send anything back to the TV station That is simplex communications because the data is only going in one direction from TV station to you never goes back So that's an example of a simplex communication system Full duplex when we have a communications link where we can send data in both directions at the same time So We have a link a can send data to be and at the same time be can also be sending data to a half duplex is They can send in both directions, but only one at a time one direction at a time a can send data to be or B can send data to a But they cannot be sending data in both directions at the same time That's half duplex an example is The walkie-talkie the handheld radios you press the button to talk you talk and That sends a signal to the the receiver and then you let go and then they talk. Okay, you take in terms That's half duplex and Then many examples of full duplex for telephone for example both people can talk and send data at the same time in that case so some different terminology and classification of Communication links or mediums. I always ask my students. What is this lecture When I'm talking to you Assuming I don't have a microphone to keep it simple assuming the microphones off Are we using a guided or unguided medium in this lecture? It's unguided. Okay, it's wireless. It's air If we have that if we ignore the microphone In fact, if you consider the microphone part of it's guided in that the signal goes down the cable and then It goes to the receiver here and then goes through wires up to the speakers That makes it more complex. But if there's no microphone What's the configuration point-to-point or multi-point hands up for point-to-point? You've got two choices Eventually want to see everyone's hand hands up for point-to-point configuration this lecture hands up for multi-point Okay simple one when I'm talking at least I'm transmitting and there are multiple receivers. We've got a medium where I'm communicating to more than one at the same time What's the desired direction of communication in this lecture? hands up for simplex anyone Hands up for half duplex One two. What about full duplex? Unfortunately, it is full duplex sometimes which means I'm talking and You're talking at the same time It should not be it should be half duplex When I'm talking you're not talking or when you're asking a question. I'm listening. So ideally We can communicate in both directions, but only one at a time now We don't want it to be simplex because I'd like you to ask some questions and We don't want to be full duplex because you'll interfere with me. Okay, so we can categorize links I call to the weather report Okay, the telephone in some some uses of the telephone that the data transfer we think is simplex That is if use a recorded announcement, you can you can hear the time You can dial a number and some computer will tell you the current time or the weather Okay, that the telephone system itself the communication system would consider full duplex You can send data both directions at the same time, but some uses of it May only send in one direction so we'd say that The telephone system is full duplex. Maybe that application in of the use of it is in one direction only But the the communication system supports full duplex Anything that supports full duplex can of course allow communications in just one direction It can be turned into simplex or even half duplex But we'd consider the telephone line full duplex So the transmitter generates some signals some electromagnetic signals to send across a medium to the receiver What are these signals? That's the main focus of this course for the first part Well the signals The physical signals that are sent represent the data that we want to communicate from source to destination And a good example of data is you think of a file and think of it as a sequence of bits zeros and ones So to send the zero and one or zeros and ones between computers We can generate some some signal think of some waveform to represent that data What we're going to show today is that all communication signals that we deal with We can look at them as made up of many component simpler signals We take a simple signal like a sine waveform and Another sign and we can combine them together to create more complex signals the things that we actually transmit between Transmitter receiver so we're going to analyze and look at the different The basics of signals and then how we combine them together We can view signals from two different perspective perspectives two different time two different domains We can call the time domain and frequency domain. Maybe at the end of election today. We'll introduce the frequency domain Time domain. Well, let's look at a simple one actually I'm ahead First some simple concepts that you probably already know we can differentiate between analog and digital Wave forms or signals we're analog continuously varying over time just a digital signal we think it maintains some level and Instantaneously changes to some other level some fixed level discrete changes One characteristic of signals is that it can be either periodic In that they repeat or a periodic there's no repetition over some time frame these two examples of periodic signals Okay, that they're repeating Here's an example of an a periodic signal. We don't see any repetitions here. It's continuously changing But in fact just some terminology at this stage The simplest signal that we often deal with is a sine wave think of a a sine, you know what the shape and If we can think of sending a signal as a sine wave we can use that to represent data that we want to communicate And we'll see that the more complex the realistic signals We can view as just a combination of different sine waves. So the sine wave is very important because Even in theory a square wave like this This discrete digital signal in theory we can create this at the transmitter by combining many different sine functions together your sine you know is this shape by Adding together many different Sinusoids we can in fact create a digital signal. We'll see that today So by combining signs together we can create different shaped signals that we need for our communication systems therefore, we need to remember the characteristics of a sine wave Everyone remembers this this equation seen it before You remember the sine function okay, and the shape that you get when you plot it against time So this is a simple signal the signal s as a function of time So we're dealing with the time domain and the signal think of the s is The the height of the signal if we plot it the amplitude the general form is that we get some Multiplier times sine of some value Take a sine of some value and you get some result Where this is a function of time so s is a function of time his t here There is three parameters to this equation under the signal The peak amplitude a That's the multiplier So as we change The value of uppercase a if we plot a sine wave if we increase a we'll see the height increases We'll see some examples so changing the peak amplitude of course changes the height of the sine wave Sine of two times pi, which is constant times by f Multiplied by the current time plus phi F is the frequency of our sine wave and Phi is the phase of the sine wave Frequency is easy to visualize. I think you can understand that if we have a sine wave of some frequency If we increase the frequency then visually it Oscillates more often in a period of time Changing f Well f is the frequency of this sine wave Increasing it of course we'll get the different shape as the output The phase is a bit harder to visualize for some people. It's the shift of the sine wave relative to some position There are some slides here that illustrate that different sine waves very simple I would do it on on a computer On on the screen and generate them using some software just to show If we create a signal using as the sine function and these three parameters by changing those three parameters We change the shape Very easy I've got some mathematics software called octave here that will produce a plot of the sine wave I'm going to plot it over a period of one second from zero up to one So I've got some data t. I've created before you can't see it I've got t the data which is the time and I'm going to plot a sine function as the time varies and we'll do different plots to To show the impact of the different parameters. I have to remember how to do it We want to plot on the x-axis the time t You don't need to write this down. I you can see it later focus on the plots and consider the general Sine function a or the sine Signal a times sine 2 pi f t plus 5 So I'm going to set values of a f and the phase And we'll see how that plots a I'll set the amplitude to 1 okay, so 1 times sine of 2 times pi times the frequency Let's choose a frequency. Okay Easy a frequency of 1 times t and Then plus some phase and to start simple a phase of zero So this is going to plot I've already defined the time that goes from zero to one before so plot from zero to one a sine function with an Amplitude a peak amplitude of one a frequency of one and a phase of zero and Make a line which is blue in this case And I made an error why that should be a comma not a full stop there. Sorry Okay, easy sine wave Peak amplitude goes up to 1 down to minus 1 in one second. There's one cycle Which means the frequency is 1 Hertz Recall frequency is measured in Hertz the number of cycles or repetitions per second Let's change and Draw a red plot and let's change the frequency To 2 so now it's the same peak amplitude one sine 2 pi times 2 t plus 0 simply now the same height but Two repetitions in one second. We'd say the frequency of this signal is 2 Hertz We can change the amplitude to 1.5 and Let's change also the frequency at the same time so we can change both parameters So the green one the peak amplitude is 1.5 So you see it's higher and it goes down to minus 1.5 compared to the other two and I've set the frequency to be 3 Hertz Within one second. We will see three repetitions of that sine sine wave any questions about sine easy. This is Stuff from many years ago Change the amplitude or the peak amplitude the frequency Which I think you can visualize easily easily. What about the phase this third parameter? I'll show you the change of the phase we'll start again I'll just have to set up my plot and We'll draw a different In this first case The phase is this additional component here plus zero the phase is zero in this case Let's change the phase the phase is measured in radians okay, so Remember 2 pi radians is 360 degrees that it takes input as radians here So let's try some different values and see what how that changes the shape Instead of plus zero. I'll add plus pi on four One-quarter of a pi so I'll set the phase to be pi divided by four See what we get same shape, but it effectively shifts the sine wave along You can imagine that you take this and you shift it This far how far well by pi on four radians, so that's what the phase does it it was Produces a shift in time And we can try different phases Hi on two three-quarters pi and simply pi so I just Shifted you know added a phase shift in those different cases and we can see the the sine wave is moving along Where the phase of pi we see it's in fact opposite upside down compared to the phase of zero Phase of zero is the blue one. We go up and then down a phase of pi Cyan is the color here. We go down and then up. It was just flipped in that case a Phase of two pi would be the same as a phase of zero So by varying these three parameters, we can get different shaped sine waves and we can use them to represent data What have we got on the slides? There are some other parameters related to the peak amplitude frequency and phase the period and the wavelength and Period is the inverse of the frequency a Frequency of two Hertz Means a period of half a second one divided by two so Frequency is the number of repetitions per second the period is the the duration in time of a repetition or a cycle So the period of a signal is the inverse of the frequency The wavelength is the distance in meters occupied by a repetition or a cycle Calculated lambda is the speed of light divided by the frequency. I don't have an example here so if you have a frequency of two Hertz and we have the speed of light of 300 million meters per second then Divide that by two and we get 150 million Meters in that case. So that's the wavelength of that signal So the the base parameters peak amplitude frequency phase from the frequency we can in fact determine the period of wavelength now real communication signals We can think of as being Created by combining multiple sine waves not just one sine wave, but For example add two sine waves together And if you add two sine waves together, we'll see that you can get different shape signals We'll generate this on the computer in the moment, but one sine wave With one set of parameters of peak amplitude frequency and phase a second sine wave with a different set of parameters then add them together and the resulting shape is this one and Real communication signals we can think of as just being a combination of many sine waves Before we add some together and look at the Look at them All right, now think the signal that we send from One computer to another across a cable imagine that signal is just a sine wave How could we use that sine wave to represent data to represent bits for example? I want to send some bits from one computer to another the signal. I have is a I can generate a sine wave of some shape How could I use a sine a sinusoid signal to represent zeros and ones bits? any ideas Okay, when so the sine wave Where's our example this one what we could say is say? There's a mapping between the amplitude of the sine wave and the the bits for example when the signal is high Positive it reaches plus one. Let's say that means we're transmitting a bit one and When the signal is low So minus one let's say that means we're transmitting a bit zero So that's a very simple scheme to say the data we want to get between computers is zeros and ones Some sequence of bits But what we actually send is some signals and the simplest signal here is a sine wave So we could use this sine wave to represent bits We need to define a scheme that maps Each bit to some structure of that sine wave Where's my pen? Quick example Let's let's use this same scheme that when When we want to send a bit one We'll send let's say this portion of the sine wave and When we want to send a bit zero we'll send Sort of the negative part of the sine wave So if we have some data, let's say that some random data we want to send This sequence of bits my computer wants to send that to the destination first bit second bit and so on Well, what would our signal look like? Well for each bit We generate a sine wave for some period of time And again that needs to be defined but for our our case, let's say for bit zero Let's break this up into chunks even time periods Using our scheme for bit zero so we send The low portion of the sine wave our signal would look like this Now we want to transmit a bit one So let's send a high portion But then we have a another bit one to send so generate a signal So the hardware that the transmitting device generates a signal of this shape and then another bit one and then a bit zero one and Zero zero So with some random data with this very basic scheme This is an example of the output signal that we generated the transmitter That signal passes through the medium to the receiver What the receiver does is it checks the receive signal? Okay? It receives some signal for a period of time. Is it negative? If it's negative. Yes, it's negative. That means we must have received a Zero from the receiver's perspective If they measure the the signal to be positive that it must have meant that a bit one was transmitted one one zero That's from the receiver's perspective Assuming they know the scheme that the transmitter used they can From that signal get the bits which were transmitted now we'll see in practice later that it they're more complex schemes than than this and in fact The shape of the signal that represents the bits is important one more example on top of that another example Well here I use this just the sine wave as the signal and I really change the phase depending upon the bit remember the phase changes the position so Normally a sine wave goes up here. I goes down first so a phase of pi But I change a characteristic the sine wave to represent the different bits We don't have to use a sine wave We can use more complex signals One of them Maybe this a square wave Sorry, okay, that's another signal that represents the same sequence of bits where we have a negative for some period of time For bit zero positive for bit one To transmit the same data we can use different types of signals or different shape signals Which one's better? Anyone want to have a guess? Or what some advantage is a disadvantage of the red one the square signal and they're just the sine base signal the black one the The digital one that the square one Why would that be better? yes, it Closer matches that what we're trying to communicate to the other side. It's hard to explain but And we will cover it in another lecture with some more detailed examples, but you can think okay zero for this period of time the signal is always low Meaning always means zero bit zero Whereas with the sine wave in fact for this big period of time Where we want to transmit a bit zero the signal is well, it's Small here that is minus zero point one and then it eventually gets to minus one But then for some period of time, it's it's not as low as minus one all the time The result is that yes the red one better matches the data that we want to transmit The practical result is that in real life When we transmit this signal across the medium there may be errors interference and noise Which means what's received is not exactly as what was transmitted And it turns out that when you have noise The the red one will be more likely that the receiver can still decode the same sequence of bits With the black one. It's more likely that with noise The receiver will make some mistakes and think okay It's hard to draw here if this was the transmitted signal, but the received signal was with some noise was like this Because there's some random noise in there Then the receiver may measure the value here and sees on average the value is not positive It is in fact negative and therefore think as zero was received As one was transmitted, but because of noise a zero was received. That's an error and that's bad for our communications It turns out that using the square wave where more or less likely to have those errors Then is it if you use just the sine wave Because it's always minus one it's always plus one with a sine wave It's only at some instant minus one and only at this point Plus one so in practice the square wave is better than the sine wave We'll see some more examples of that later right now considering that if We'd like to get the square wave To get better quality transmissions less errors If we start with a sine wave, well, how can we generate the square wave? In fact in theory by adding many sine waves together you can generate a square wave Let's try that Okay So now if we remember that the square wave is better in this case It will produce less errors If we start with a sine wave, how can we get closer to that square wave? I'll try and plot some different cases clear our plot and Set the axis Let's plot the simple sine wave We're for this example. We're going to remove the phase. We don't we're going to set the phase to zero in all cases I'm going to We'll start with a amplitude of one and two pi and let's set the frequency to do something difference Remove the phase. We don't care about that at this example. Let's set the frequency to two so the equation if you want to write that down is S of t the signal is One times sine two pi times two t So according to the general equation a sine two pi f t a The peak amplitude is one The frequency f is two So it's in fact sine four pi t Okay, so we plot that now let's plot a different signal Which is the summation of two sinusoids? So I'll add on to that Another sinusoid which has a different amplitude in this case one-third sine two pi And we'll see a pattern soon instead of a frequency of two So the first component the first sinusoid had an amplitude of one and a frequency of two The second component has an amplitude of one-third and let's give it a frequency of six T let's make it red The red one so this red signal is some signal which has two sinusoids added together So by adding them together we get a different shape. We see we see What these two humps at each point here? What's the period of the red signal so let's say the blue one s one of t and That was one times sine four pi t Why four because it's two times pi times two the red signal is Let's say s two of t the second signal is sine Four pi t The first one plus one third sign What have we got two times six twelve pi t two times six here From looking at the plot what's the period of the red signal? The plot goes from zero up to one second What's the period of the red signal? It's zero point five that is remember the period is that the duration of one Repetition if we look closer it starts here and then at this point then it's back to the start again So the duration of one repetition is we look here is point five seconds The period uppercase t is half a second The frequency is Is the inverse of the period It's two Hertz and Again, we see that in the plot in one second. There are two repetitions meaning two Hertz And if we check for the first signal, we'll see that the best they are the same Period and the frequency match that of the second signal Why will the way I structured that second signal that we'll see later that that would be always true Why did I choose one third here and twelve here or? two times pi times six well, I know That using that combination we can get a particular shaped signal. Let's do another one in a moment, but record What's the frequency of the first component in signal two? If we separate the two sinusoids What's the frequency of this component? Hmm same okay two Hertz So let's say for this signal f the first component see we have two components here f1 is two Hertz Why sign for pi t the general form is signed to pi f t Therefore f must be two Two times pi times two is for pi t. What's the peak amplitude of the first component? One okay. I haven't written a one, but it's one here What's the phase of the first component? Plus there's no additive component here zero in all of the components. I've omitted the phase. It's zero Now let's look at the second component frequency f2 Frequency of this component not 12 Remember the general form is two pi f t We have 12 pi t therefore f must be six Hertz And in fact when I entered it into the computer I entered two times pi times six Six is the frequency of the second component and the amplitude the peak amplitude of component two is one third and the phase is also Zero and we get this shape of similar in That okay, it's high close to plus one here and then close to minus one of course it's Closer more times to to say plus one than the blue curve Is it the square wave? Well, no, it's not a square wave of course Let's add a third signal with a third component Make it green so I'll take the Other two components and add another one and we'll see some pattern one-fifth Sign two times pi times any guess You don't see the pattern yet Peek amplitude one frequency of two Peek amplitude of one-third one divided by three frequency of two times three six Next component to create a pattern that I want to achieve one-fifth peak amplitude frequency is five times Two that is ten You'll see why I'm choosing these values shortly comes to you. There's no phase Do I do it correct? The green one we see now it has multiple humps three humps here. I Will not write it down, but as an equation. It's the same as these two plus one-fifth sign What have we got 20 pi t? two times pi sorry two times pi times ten 20 pi t and If we looked at the components the first component is the same the second component the third component has a frequency of ten hertz and a peak amplitude of one-fifth one more at a fourth component so I'm just generating different signals and We'll analyze and compare them shortly and we'll follow this pattern of now one seventh time sine two times pi times 14 t Why well, we see the pattern one-third one-fifth one seventh two times three times five times seven two times seven fourteen the frequency of this component is fourteen hertz and Let's plot that one It's harder to see but I think if you look close you see the magenta one the purple one more humps here It's getting closer to our square wave By adding more components the the resulting signal He's in fact getting closer to our desirable square wave desirable in that it's Less impact of errors. It's more accurate In fact, I will not type living type it in but I copy one from before Let's see if it's correct. I've got one before where I've added many components. I typed it in I will not try Okay Let's try again You cannot read it here because I had to copy and paste a lot, but I had up to I think two times pi times Two dive by 59. So we had three Five seven and then I added Nine eleven thirteen and I went all the way up to 59 because I got tired of typing and we get the black one and We see well, it's getting much closer now to our square wave We see the shape it's going up and there's this bit of oscillation and then it's almost flat and then oscillation and so on Keep adding components. I went up to 59 keep adding more and more if you go up to infinity All right, if you keep going Then a venture then you get in theory the square wave Okay, so here's an example by combining different sinusoids together. We can get different shape signals Now let's compare them some of those signals and see what are the advantages or disadvantages of course, we could use that signal the black one to to transmit our sequence of bits Which of course have to change the phase When we transmit a zero we need it to be low a one We need it to be high and it would look almost like the red square wave except some small oscillations at the The ends of each bit. Let's go back to our lectures and let's summarize some things that we're showing in those examples Communication signals are composed of many components sinusoid signals at different frequencies That's what we've seen here when a real communication system signal We can think of as the combination of many sine waves And the example equation here has two components Or we can generalize it the structure as Sine 2 pi FT plus a third sine 2 pi 3 FT plus one fifth sine 2 pi 5 FT and that was the example I was showing on the on the plots When all frequency components so this one has two components the one on the board two components If we had a third one we have three components when all Frequency components of the signal are integer multiples of one frequency That one is called the the fundamental frequency What do we mean by that? Come back to our red s2. We had two components F1 frequency of two Hertz F2 frequency of six Hertz two Hertz is in fact One times two Hertz Six Hertz is three times two Hertz So both components have frequencies which are integer multiples one times two three times two of One of those frequencies of two Hertz So we'd say for this signal the fundamental frequency F subscript F is Two Hertz That is the frequency of the first component So that's called the fundamental frequency The others are harmonic frequencies So in this one we just had two components the fundamental frequency two Hertz and one harmonic at six Hertz If we added a third component, I think from memory we had two Hertz six Hertz and ten Hertz Five times two so we would have had one fundamental frequency of two Hertz and two harmonics in that case if we have that condition Then the resulting signal when we add them all together and get the end output signal Has a period Equal to that of the fundamental frequency component or has a frequency Equal to the fundamental frequency So in S2 of T we determined the fundamental frequency to be two Hertz because This component was two Hertz. This was three times two Hertz by both multiples of one of them the resulting signal has Also, so if we say that the frequency of this signal when we add them together is also two Hertz It's the same as the fundamental frequency You may see that a little bit in this picture Don't worry too much about the scale, but we have one component with a frequency In this period it repeats twice a Second component with three times the frequency if you check visually you see this repeats three times for this every once So this component is three times the frequency of that when we add these two together we get this and This resulting signal has the same frequency as the fundamental frequency the first component You see that this period and this period are the same and that's why I was using that pattern of Combining the components in the way I did It meets that condition why we talk about signals because All the data we send is actually sent as signals across some link and The people who design the links design the transmitters and receivers and build the hardware They must design the signals to be transmitted in Practice we want signals that send us send Data quickly a high data rate But we want to do it as cheaply as possible Cheap is measured in different ways less complex hardware. Therefore cheaper to buy hardware and Also cheap in terms of we'll see shortly spectrum and bandwidth and Also, we'd like to have signals where they I will say are more accurate less chance of errors and Without spending too much time today with an example We can say that the square wave is more accurate than just the sine wave We'll give a detailed example of that in the next lecture But there's two different signals carrying the same data. We can say one is more accurate less chance of errors than another So the people who design signals must design them to be accurate fast But cheap And there are different trade-offs to consider Everything we've looked at so far is in what's called the the time domain look at all our plots We show the signal magnitude the amplitude as a function of time So this is time increasing. This is the signal amplitude on this axis. That's in the time domain it turns out to make it easier for the designers of signals and for the analysis of signals that people Generally don't think about it from the time domain, but from the frequency domain Let's explain that and we'll start by explaining With an example We will do it we'll draw a picture Consider a red signal here as to we've got the equation for the signal. We determine there are two components f1 and f2 Frequency of first component two Hertz peak amplitude one Frequency of second component six Hertz peak amplitude one third Let's first plot that signal in the frequency domain The plot in the time domain was I think The yeah, it was the red plot in this diagram You cannot see it very well now But the red one is the plot of the time of s2 in the time domain Let's plot it in the frequency domain And let's try and draw it on the screen And we'll see the difference What do we do? The frequency the time domain is the signal magnitude Versus the time Frequency domain is the signal peak amplitude versus frequency so we have two axes here and The first one on this axis we have frequency in Hertz Hertz So in this axis we have frequency in this axis. We have the signal peak amplitude We denote it as s of f You'll see it on the slides that's a bracket and How we plot this if we consider those two components F1 The frequency is two Hertz the peak amplitude is one so we draw an impulse Or a spike at that frequency and with that height so let's say here with the particular amplitude and What have we got the frequency was two Hertz so this is at point two and the peak amplitude was one at this point and then at Say six Hertz here We have a spike or an impulse which is one third it's almost straight and Amplitude here is one third There's our signal This is a plot of the same signal but from the frequency domains perspective Compare that and I know it's hard to see But the red one in here where this is the plot of the same signal in the time domain We see the red one goes up and then down that the two humps there and so on Same signal, but just viewed from different perspectives So in summary with the frequency domain we plot the individual components. We look at their frequencies Two and six Hertz and we plot an impulse at those Frequencies two and six Hertz and the height of that impulse is the peak amplitude of that component one and one third It turns out from mathematical Doing mathematical analysis, it's much easier to operate in the frequency domain than the time domain the transformation from Time to frequency is Fourier Using Fourier analysis a Fourier transform. We're not going to cover the mathematics of it Just show the basic principle. We'll come back to that plot Actually, we'll stay here a new term For any signal We can define that signal spectrum. The spectrum is the set of frequencies contained in that signal What are the set of frequencies contained in this signal s2? What are the frequencies? Two and six okay, that's all so we'd say the spectrum of this signal is Two and six and in fact we see it in the plot very easily Two and six is the spectrum Another term is called the absolute bandwidth The absolute bandwidth of the signal is the width of the spectrum So our spectrum in this signal is two and six the bandwidth will be Absolute bandwidth of this signal. What's the width? Considering the two frequencies. What's the width of those? Frequencies it's four Hertz six minus two so if we go back to our Slides to see the definitions some new concepts Spectrum of a signal is the range of frequencies that signal contains Our example contains two frequencies four and two and six Hertz the absolute bandwidth is the width of that spectrum from the Minimum frequency component up to the maximum frequency component in this case from two up to six Therefore, we say the bandwidth or to be precise. We'll see there's another definition later The absolute bandwidth is four Hertz for this signal again hard to see but we had a green signal which was the same as the red one plus one fifth sign Two pi times Five times two T which is 20 pi T The red signal sign 4 pi T plus a third sign 12 pi T the green one when I plotted it was Signed 4 pi T plus one third sign 12 pi T plus one fifth sign 20 pi T The green one had three components again difficult to see but we see that the oscillations there try and plot the green signal in the frequency domain that is Try and Modify this plot or write a new create a new plot that shows the green signal in the frequency domain What do I do on the screen is the blue? Oh, sorry the red signal in the What we call the red signal in the frequency domain, which had two components The green signal has three components the first two plus another one What would you do on this plot? Anyone try and plot it Common exam question. Here's a equation for a signal draw that signal in the frequency domain What would you do? What's going to be different? You need to remember the definition or how we create this plot in the frequency domain We have impulses or spikes in the plot at each frequency component So we had an impulse at two Hertz and at six Hertz and The height of those impulses was the peak amplitude one-third and one So with our new signal The green one There are now three components The first two are the same as the previous one. So they have a frequency of two Hertz amplitude of one Frequency of six Hertz amplitude of one-third and the third component has a frequency of ten Hertz and An amplitude of one-fifth So a plot of the that Would we'd have to extend here and draw at ten Hertz my scale is not going to work very well But I think you'll get the idea of course the scale is not quite here, but if this was ten Hertz If this was at the point of ten Hertz and the height here is one-fifth Excuse the scale on my plot. You can do it better. This would be a plot of our signal which has three components Plotted in the frequency domain in the time domain Again hard to see it's the green one here Same signal just different perspectives Considering this new green signal we call it What is its spectrum? What is the spectrum of? The one on the screen In Facto the spectrum is The set of frequencies, so it's a set of frequency values. Yes, there'll be three values in that set We can say the spectrum is Two six and ten Hertz So it's a set of frequency values What is the absolute bandwidth of this signal eight Hertz? I think someone said it is not The bandwidth think of just the width from the maximum frequency component ten down to the minimum to the bandwidth Then is eight Hertz So and we'll see that bandwidth becomes important because it'll impact on other parameters this This signal what we call the green one has three components. It has a bandwidth of eight Hertz The previous signal the red one had two components and a bandwidth of four Hertz Half the bandwidth What we're going to see is that in general a signal that occupies a larger bandwidth Can give us a higher data rate? More bits per second But a signal that occupies occupies a larger bandwidth costs more So the financial cost eventually becomes more because of different factors, so Which signal do we use the one with two components or three components? Well, it becomes to be different trade-offs One with three components produced has a larger bandwidth Well, it will give us a higher data rate in theory But it will incur a higher cost and the other factor is Accuracy of the data received What if we add a fourth component using one seventh sign? What have we got? 28 pi t if we add a fourth component The fourth component would be a frequency of 14 Hertz So the bandwidth would range from two up to 14 Hertz A bandwidth of 12 Hertz if we add a fifth component the bandwidth gets larger And if we keep adding components the bandwidth gets more and more The higher the bandwidth the higher the cost involved with that signal So we want to minimize the bandwidth if we keep adding components forever We get it in fact in theory an infinite bandwidth and we get the square wave It's the perfect signal in terms of errors, but the bandwidth is extremely high Okay, so there are some trade-offs in fact three main trade-offs that choose a signal which So design a signal which gives a high data rate Is cheap there's generally low bandwidth less complexity and Contolerate errors that is accurate. So we'd say a square wave is more accurate than the sine wave So there's no one answer as to what is the best signal those trade-offs need to be considered when people design signals What have we missed? So go back and see what we skipped over Okay, we look at signals we can look in the time domain or frequency domain time domain is a function of time like our normal plots Communication signals are made up of sine sine waves sinusoid So we combine them together to get a resulting communication signal The examples we've given are very simple. They're not realistic, but they show how that we can combine sine waves to get other signals But the way that we combine them and the number of components impacts upon the bandwidth of the signal where the bandwidth is the maximum Frequency component minus the minimum component we want to minimize the bandwidth to reduce the cost But it turns out generally we want to increase the bandwidth to increase the data rate So there's a trade-off there. I chose this pattern of one third Three FT one fifth five FT and so on to get a particular shaped output We don't have to have this pattern, but it's common So this is an example of adding two components to get a resulting signal and This is an example of that same signal the the bottom one But plotted in the frequency domain Where we're two components and it shows the frequencies are at and the peak amplitude of each component real signals are More complex than the ones we've looked at and we may see a in general a Frequency plot like this. They're an infinite number of components So we get it instead of impulses we get a continuous curve here So it's more complex than the simple ones we've looked at and we've defined The spectrum of a signal is the set of frequencies the bandwidth or the absolute bandwidth is the The range or the width of the spectrum the DC component we're not going to deal with in this course and This summarizes what I plotted with those colored plots on the screen that by adding more components The top one is got two components the Bottom one three components and we see the shape getting closer to a square wave a square wave is more accurate then The ones shown on the screen in that there's less chance of errors Which is desirable by adding four components, which is the one on the top by adding an infinite number of components in theory We get a perfect square wave So by having more components we get a more accurate signal But it turns out the bandwidth gets larger and the cost gets larger Let's stop there for today what we'll do next week in is Go through an example that shows again this relationship between bandwidth the number of components data rate and cost It will go through an example and then move on