 So we introduced signals as communication signals made up from combining different sinusoids together. And we looked at some of the simple mathematics of a sinusoid being the signal strength, the signal amplitude as a function of time is the peak amplitude A times sine, 2 times pi times the frequency times the time plus a phase phi. And we saw with some plots how those three parameters A, F and phi impact upon the shape. And then we moved to the next step of adding together different sine waves to produce a different shape resulting signal. Let's remind you of some of those, that was one of them we come up with which was the addition of two sinusoids together. And we finalized last week by looking at some equations and the characteristics of the signals. For example, this signal which I created from adding two components together, what's the frequency of this signal? Two, two what? Two hertz. You can see within one second there are two repetitions, two hertz. And the period is half a second. One repetition takes half a second in time. So the period and the frequency of this signal. But in fact, this signal was a plot of, I'll bring up the equation somewhere from last week. This was the equation for that signal, the addition of two sine components. And I chose some structure such that it would produce this nice shape that I required. And if we look at the individual components we see they have some amplitude. The second component was one third the amplitude of the first component. They have some frequency, two hertz and six hertz, and a phase of zero in this example. When we add them together, our resulting signal is made up of two components, each a multiple of this two hertz. Two hertz, three times two hertz. So we can say the fundamental frequency of the signal is two hertz. And it's the frequency of the resulting signal as well in this case. So our signal is two hertz. This S2 contains two components. Their frequencies are two and six hertz. So we call that the spectrum of the signal. The set of frequencies in that signal, two and six hertz, is referred to as the spectrum of that signal, the range of frequencies. And the width of that spectrum from the minimum frequency up until the maximum frequency is the bandwidth, four hertz in our example. And these are important characteristics of communication signals, spectrum and especially bandwidth. I will not show you the plot, we added a third component. And what we got to last week, the equation with the third component, we added on this third component of one over five side 20 pi t. The first two were the same as the previous one. The third one had a frequency of ten hertz. Fundamental frequency was two hertz. They're all multiples of two. Spectrum, two, six and ten hertz. And the bandwidth ranges from two up until ten. So we have a bandwidth of eight hertz in this case. So two different signals with some different characteristics. What we want to arrive at is, well, how do these characteristics of the signal impact upon how fast we can send data? So we'll make a few assumptions to illustrate with different signals and different characteristics, especially bandwidth. We can achieve different data rates, different number of bits per second. But before we get to that, if I give you in the exam this equation, can you plot the signal? A good exam question. Here's the equation. Plot the signal. What would you do? What would you do? Well, you'd have to try t equals zero. Plug in t in your calculator for a sign. All right, you get zero. And maybe step forward a little bit. t equals 0.0001. Plug it in. Get some value. Plot that on the x and y axis. Not very fun in an exam. You need a computer to plot that and more complex signals. But in fact, when we analyze signals and people who design the signals for communication systems often treat them not from the time perspective. This is the signal amplitude as a function of time. They treat it from the perspective of the frequency. And we look at the signal amplitude, in particular the peak signal amplitude, as a function of the frequency of the components inside that signal. Assuming every signal is made up of adding sine waves together, each of those sine waves have a frequency, then we can treat that signal in the frequency domain by looking at if we know the frequencies of the components and if we know the peak amplitudes of the components, we can arrive at this equation, this signal. In other words, if I gave you f1, that is the frequency of the first component, the second component, the third component, and the corresponding values of a, if I gave you these six values in the exam, you should be able to write the green equation. Because we see with these six black values, there are three sine components. The first one has an amplitude of 4 on pi, 4 on pi here, 4 on pi sine something, the something, this general equation, 2 pi ft. Well, we know f is 2, so it becomes 4 pi t. So given these black six values here, you can determine what the signal equation is. And in fact, when we look at signals, we usually just deal with these values. And that's called looking at the signal in the frequency domain. This is an equation of the signal in the time domain and the plots we've seen are in the time domain, signal versus the time. Now we'll look at them in the frequency domain. And there's mathematics to convert them. Fourier transforms the way to transform a signal or an equation from the time domain to the frequency domain. We're not going to focus on that. We're just going to look at the basic concepts and especially how to plot a signal. I'll show you how to plot it and then we'll do a few examples. So let's go back to our first, or our red signal. Two components, peak amplitudes of each component and the frequencies of each component. Let's ignore the phase. Let's plot that in the frequency domain. So we'll draw a plot of this signal, but instead of in the time domain, but we'll look at the frequency components, the components and their frequencies. I've drawn the axes already. This axis is going to plot as a function of frequency, F in the units of hertz. And this axis is what we call the signal peak amplitude as a function of frequency. This is denoted as an uppercase S. In the normal S of t, it's a lowercase S. We usually write this as uppercase S as a function of F. The peak amplitude and for the signals we have, I've created some axes that we'll make use of in a moment. So I've just divided the frequency range from 2 hertz up until 16 hertz. We'll see how that's used in a moment. And the peak amplitude, you'll see that these values become very useful. That is, up until 4 on pi at times 1. Let's plot our signal and see how we arrive at this plot. And you'll see it's not so hard. And then we'll explain how it's useful. Let me have the top write the equation again so that we don't forget. What do we have? We had S of t was 4 on pi. You have this equation from before. Sine 4 pi t plus 1 third sine... What do we have? 12 pi t. This is the equation from last week. It's called S2. So how do we plot this in the frequency domain? Well, we know that there are two components. The frequency of the first component is 2 hertz. The peak amplitude, I'll just note here, the amplitude of the first component is 4 on pi, and the frequency of the first component was 2 hertz. And for the second component, the amplitude was 1 third of 4 on pi, and the frequency was 6 hertz. This is the equation from before. So how do we plot that? Think for each component, we plot a spike or an impulse. The height is the peak amplitude, and the frequency is the frequency of that component. So... Let's see if we can get this right. At 2 hertz, there's an impulse with a height of 4 on pi. So at this point, we have an impulse. So just an instantaneous peak here. The height is the peak amplitude of that component, and the frequency is the frequency of that component. And the second component's the same. At 6 hertz, the peak amplitude goes to 1 third of 4 on pi. So there's our plot of the signal in the frequency domain. If we look at the plot, it tells us there are two components. There are two impulses here. The first component has a frequency of 2 hertz and a peak amplitude of 4 on pi. And the second component, the second sign that we add together, has a frequency of 6 hertz and a peak amplitude of 1 third 4 on pi. That's why I scaled this axis accordingly. So given this plot, you should be able to arrive at the equation. Or the other way around. In the exam, given the equation, draw the plot of that signal in the frequency domain. This one's much easier to draw than the signal in the time domain. Remember, the one in the time domain had the two humps at the top, went down, and so on. Same signal, just a different viewpoint. And it turns out a lot of communication signal design and analysis looks from the viewpoint of the frequency domain. Because it's easier to do analysis and design with. Any questions how to produce the plot? So remember, with any signal, we can write it as a summation of sinusoids, of sine waves. Each sine wave has a frequency and a peak amplitude. So given that equation, we can produce a plot in the frequency domain. Has anyone seen such a plot before? A plot of a signal in the frequency domain. Like a realistic plot. Anyone? We'll show an example, one example, that I think some of you may have seen soon. Okay, to make sure you understand, draw the plot of the green equation, the second one with a third component. If I bring it back to the equation, what do we have? We'll come back to that one. Draw a plot of this equation. Easy. So plot that signal. Take you one minute. Identify the components, their peak amplitudes and their frequencies. This was the last equation we arrived at last week in the lecture. Plot that in the frequency domain. Or at least visualize what the plot would look like if you don't want to draw it. We'll draw it in a moment. Anyone cannot visualize what it would look like? No? Look at the, our equation has three sine waves. The green equation. Three components added together. One, two, three. And we've already listed for each component their peak amplitude, the multiplier at the front. If we look at the first component, it's four on pi times sine. The second one is four on pi times one third sine. Third component, four on pi times one fifth sine. So they have what we call the peak amplitudes of each component. These three values. And our general equation is sine two pi f t. So here we have four pi t. So two pi f t, f must be two. Two pi f t, if f is two, then it becomes two times pi times two times t. Or four pi t. So the frequency of the first component is two. Similar for the second component is six. Two pi f t, two pi times six t is 12 pi t. And the third component, two pi f t, two times pi times ten times t is 20 pi t. So now, we know these six values. Then we know our plot will have three impulses. The location of each impulse will be at two, six and ten hertz on the horizontal axis. And the height of each impulse will be given by the peak amplitude on the vertical axis. So focusing on the two, six and ten hertz. Two, six and ten hertz. Let's try and draw it. We set at two, six and ten hertz. We have components. At two hertz, the peak amplitude went up to four on pi. At six hertz, one third, four on pi. And at ten hertz, up to one fifth, four on pi. That's it. There's the plot. Just three impulses. I know many people are running out of space in their lecture notes. You may need to flick forward a few pages to find a blank page. Or bring a spare piece of paper next time. Any questions? Given this plot, this was the plot of our third signal, S3, what's the spectrum of the signal? Remember the spectrum is the set of frequencies of each component. So the spectrum is two, six and ten. It's easy to reach from the plot. The spectrum is two, six and ten. What is the bandwidth? It's the difference between the minimum component and the maximum, eight hertz. So given this plot, it's very easy to determine the bandwidth and the spectrum of the signal. I cannot show on both. Two plots of the same signal. This one here is the signal in the time domain. Time on this axis, signal amplitude on the vertical axis. Same signal just different viewpoints. This is the signal in the frequency domain. Frequency on the horizontal axis and peak amplitude of each component on the vertical axis. Which one is easier to draw given the equation? If I gave you the equation in the exam, which one can you draw? The time domain or frequency domain? The frequency domain is easy to draw. Once you know that there are three components with two, six and ten hertz and you know they're peak amplitudes, it's three impulses. This one's hard to draw. You need a calculator and a computer to draw that accurately. Given the plots of the same signal, which one think of the characteristics of importance? Bandwidth and spectrum are quite important. Let's see shortly, bandwidth impacts upon data rate. So this plot in the frequency domain, bandwidth 10 minus 2. You can see it in the picture. It's 8 hertz. In this plot, what's the bandwidth? Given just the plot, you cannot determine that visually. So the point is dealing in the frequency domain is much easier when you're designing and analysing communication signals. And the people who create such signals and design the hardware to generate them usually view them in the frequency domain. There's theory that tell you how to convert the equation into an equation in the frequency domain. We're not going to cover that. We're just going to explain the concept of getting that plot. The bandwidth we can see from our signal is the width of the spectrum or the width of the band of signal components we use. Any questions how to produce such a plot? Let's have a look at an example. Unfortunately in real communication signals, or in real communication systems, our signals are not so simple of just adding two or three components together. They're much more complicated. Many more components of varying frequencies and amplitudes. So in fact, we don't just have three impulses. We usually have many impulses. And in some cases, an infinite number. Before we look at a real example, can you extend this plot to show the equation with four components? Do we have the equation? One more example. Actually, we'll do it from memory. Save a bit of time. Let's show you the fourth one. This was the plot we just produced. Or this was the signal we just plotted in the frequency domain. And if you remember back from last week, we added on a fourth component and produced this plot. Almost the same, but a few more pumps at the top. What does this look like in the frequency domain? If we add a fourth component. Can any of you remember the pattern? You may have the equation if we add the fourth component. So the green one had three components. This light blue one had four components. So in the frequency domain, what would we draw? With four components, there'll be four impulses. And in fact, the first three are the same as the previous one, so they are the same. We add a fourth impulse where? It was 14, if you remember. I will not try and write the equation, but the pattern was such that it would be 2, 6, 10, 14 hertz. And the height? This was one third, one fifth, one seventh. That was the pattern from the previous one. So it would be one seventh of four on pie, which is about here in this light blue plot. And the bandwidth? If we did plot that, it's about here. The bandwidth is now 12 hertz with the four components. And then we arrived at this one where I had many, I think, 28 or 29 components. We added them all together in this pattern and produced this almost a square wave. That was our aim to produce a square wave by adding together sine waves. What would the bandwidth be relative to the previous signals? The bandwidth of this signal relative to the previous signals. This one had, I think, let's say 30 components. I think I had 28 or 29. I had 30 sine waves added together. What's the bandwidth? Around 30. No, I don't think. Around 60, I think. Remember, for each component, it's extra 2 hertz. We see that the pattern of the equation we used is that with two components, it was 2 and 6, with three components, sorry, extra 4 hertz. 2, 6 and 10. With four components, 2, 6, 10, 14. The fifth component would be at 18 and so on. So 30 components would be, what, 58 or 60. Around 60 hertz. You'll do the exact calculation. My point is it's larger. The more components we add in, the bandwidth gets larger and larger. This was our original sine wave. One component. Two components. We had a bandwidth of 4 hertz. Two impulses. Three components. We increased the bandwidth up to 8 hertz. The three impulses. We plotted that one. Four components. We went up to 12 hertz. Around 30 components. Around 60 hertz. A bit more different. And how do we make this a perfect square wave? How many components do we need? How do we get the perfect flat? How many components do we add together? Many. How many? Infinity. An infinite number of components. In theory, if we keep adding them and adding them, and eventually get rid of these variations here, it'll become a perfect square wave. So in theory, if we had an infinite number of sine waves added together in our pattern, we'd get our square wave. What would the bandwidth be if we had an infinite number of components? We'd have an infinite number of impulses. The bandwidth would be infinite. Okay? So in theory we can do that. Of course in practice, we don't have an infinite range of frequencies to use. Now let's go the different way. Let's say we want to generate a square wave to represent our data. Of these black, blue, green and red, of these four signals, which one is the best approximation of the square wave? The red, green, blue or black. Which one approximates a square wave the best? Alright, let's have a vote. Four choices. Black, blue, green, red. Which one approximates a perfect square wave? Approximates. It's not the same, but close. Hands up for red. That's your hand up. Green, blue, black. Okay? This one you see visually is closer to the square wave. If we want to send bits, for example with a scheme where we send, when we have a bit one we send a high signal for a square wave and a bit zero a low signal, then we could use this signal to approximate that perfect square wave. Or we could also use this one to approximate it. So when I have a bit one I send it high. It's not flat at one, but it varies a bit. When I have a bit zero I send low. So each of these four signals we can use to approximate a square wave. However, some are better than others. Some are closer to a square wave. Which signal of the four we have? Red, green, blue and black. Which signal uses the most bandwidth? Hands up again. Which signal uses the most bandwidth? Red, green, black or blue? Black. We saw that this is made up of adding multiple sine components. So if we plotted them in the frequency domain the bandwidth is the difference between the maximum and the minimum. So the bandwidth will be the largest with this signal. So this black signal is the best approximation of a true square wave and that's a good feature. But it requires a large bandwidth which is a negative characteristic. It's something that we don't want. And we'll see later why we're like a small bandwidth. So we're going to see that the design or the selection of signals is going to impact upon how accurate our data can be transferred and other characteristics like how much data per second, how many bits per second and the cost of the signal. And we'll see that the larger the bandwidth, the larger the cost of such a communication system. Before we do some calculations on that, let's look at and show you a real signal. Actually, I don't... Anyone have a mobile phone? Hands up for mobile phone. Hands higher. Zero marks if you don't have a mobile phone for the next quiz. Okay, Android phone. Anyone? Anyone use Wi-Fi before on their phone? Okay. When you connect to a Wi-Fi, if you look at the details, sometimes you see things like data rate. When you connect to WSIT, there may be many WSITs to connect to. And if you look in the details, you may see the channel. Anyone seen that before, the channel and your Wi-Fi connection? Channel. Maybe easier. Has anyone watched TV before? What are the free-to-air channels in Thailand? The numbers? Three. Three. Five. Five. Seven. Nine. And nine are the main channels of free-to-air TV here. There are others. What do those channels mean? What do the numbers mean? The channels identify a frequency or a range of frequencies used to send the signal. And it's the same in Wi-Fi. And I cannot show you on my phone very easily. But those that are interested may have a look. There are many applications. One of them in Android is called Wi-Fi Analyzer. And it's an application that will show you some characteristics of your Wi-Fi communication system. And one of the nicer plots that it shows is this one. Hard to see. That's better. If you try, it's free on your Android phone. I don't know about iPhone whether it has a similar one. But what it shows is the different access points nearby. This is just an example. For example, there's one which is referred to as WSIT. And in fact, there are other WSIT ones around. And other people's access points. It shows some color-coded plot for each access point nearby. And it shows this is a plot of the Wi-Fi communications channel in the frequency domain. This axis is relative to frequencies. And this axis, the peak signal strength. It actually lists channels. But the channels correspond to frequencies. It's saying that S, the yellow one, has a peak amplitude of this height. And it's centered around this channel 1, or the frequency corresponding to channel 1. This gray one here uses a different range of frequencies. Have a try on your phone if you've got Android. Try Wi-Fi analyzer to see what's around in SIT, maybe this afternoon, and zoom in on some of that information. The point that we want to realize is that real communication signals are not as simple as a few impulses. They're much more complex. And the frequencies may range, may cover a large spectrum. Let's give you another example. This is another signal. This is an audio signal, but still a communication signal. Just some voice recorded from one of our last week's lectures. Over a period of almost two minutes, what's this plot? Which domain? This plot. So it's a plot in what domain? Frequency or time domain. It may be hard to see this. All right, here's the hint. Here's time 0, here's time 1 minute 45 seconds. This is a plot of a signal in the time domain. It's the signal strength changing over time. As you talk, the signal strength increases and decreases over time. So this is a normal audio plot of a signal across time. What's the bandwidth of this signal? Very hard to see. You need some mathematics to calculate the bandwidth. Break it into a set of sine waves. Again, very hard to do manually. But in theory you can break this signal as a function of adding up sine waves. And software can do it for you. So my audio software can analyze this and plot the spectrum, plot the range of frequency components. And it's shown here. Frequencies along the horizontal axis, changing from here's 1,000 hertz, here's 20,000 hertz. And this, ignore the scale, but this is the peak amplitude, the peak signal strength. So it's saying at a frequency of around, I don't know, 500 hertz is the highest signal strength. And a frequency of around 700, 800, 900 hertz here is much lower. And as the frequency increases, the signal strength, the peak signal strength goes down. This is a plot what we drew of the impulses. But now imagine there are many impulses. Not just three like in our plot, but many next to each other. And you get a plot like this that becomes continuous. So this is the frequency domain, this is the time domain. What's the approximate bandwidth of this voice? What's the bandwidth of the frequency domain? What's the bandwidth of this signal? About. It goes from zero hertz, approximately zero hertz, up to what, 19, maybe let's make it nice, 20,000 hertz. There's none beyond 20,000 and something. So the bandwidth, about 20,000 hertz, 20 kilohertz, the width of this spectrum. In fact, in practice, usually we just focus on where the signal is the strongest. And there are ways to measure and say, well, even though the bandwidth, there's components here, they're very, very small compared to the other parts. Sometimes we ignore them. There may be very, very weak signal here. We say, if it's so small, just ignore it. And say the bandwidth is up to about 20 kilohertz, 20,000 hertz. In fact, that's the typical range that people expect for audio, up to 20 kilohertz. For voice, it's much smaller. We may come back to that one after we study audio signals later. So two examples of real signals, both in the time and frequency domain. Let's return to our slides and see what we've missed. We've done many examples on the screen and calculations. A lot of the things we've said are covered in the slides here. So we'll just see what we've missed in those slides. So frequency domain concepts. We've spoke about fundamental frequency last week. Harmonic frequency is not so important. We can add sign waves together to get other signals. That's the main point of this slide. So we've done that on the screen. We added two sign waves together and got a third one. We can plot signals in the frequency domain. Impulses at a particular frequency. This slide just uses a general value for F. It doesn't give a specific value. The one example we've used, we've used what? F of 2 hertz, 2, 6, 10 and so on. Where uppercase S of F is the peak amplitude. And here is the frequency of the component. This is an example of a plot of a signal in frequency domain. A simple one with two components. But complex signals have many components. Even an infinite number of components. This is another signal plotted in the frequency domain. It can become continuous. Imagine there are many impulses there. Next, very close to each other. Then effectively we get a continuous plot. Just a different viewpoint. We've defined these terms before. Spectrum is the range of frequencies in a signal. The bandwidth is the width of the spectrum. Sometimes we refer to it as the absolute bandwidth. DC component, not important for us. A DC component, I think we have a plot, is when there's a component at zero hertz. Because there's a constant here. One plus some sign. It shifts our plot up relative to zero. We get a DC component in the signal. We usually want to avoid that in signals. It makes it hard for electronics to deal with. But that's not so important. Let's go back. Some signals have an infinite bandwidth. Our square wave, our perfect square wave, was made up of adding an infinite number of sine waves together. Giving us an infinite bandwidth. But in practice we cannot deal with an infinite bandwidth. So we sometimes just refer to the... The bandwidth as the effective bandwidth. But in practice we just call it the bandwidth. And the infinite one, or the theoretical bandwidth, is the absolute bandwidth. Usually the difference for the examples we cover will not be important. You'll know whether it's the absolute or real bandwidth. But if we have an infinite absolute bandwidth, we approximate that to some real fixed bandwidth. Some finite bandwidth. This is the key point that we want to get to. The bandwidth that we have available for our system, the range of frequencies that we can transmit, limits or determines the data rate, how many bits per second we can send. Let's look at some plots and see if we can see the relationship between some of the factors and data rate. These slides are similar to what we plotted last week, just adding different components. We get two components, three components, four components and an infinite number of components. Before we go to this example, let's look at some other plots. Last week I plotted some on the screen. Rather than typing everything again, I've got a function that will do it for me a little bit faster. So let's create a few plots and also plot them in the frequency domain. Which ones? Plot data signal. Let's start easy. Let's say we have two components, two hertz and the data we want to send and we'll use a simple approach of when I want to send a bit one, we'll send a high signal. Bit zero, a low signal. The data I want to send is start with eight bits because alternating bit is ones and zeros. The data is not important yet and I'll show you the plots. Here's a signal with two components. The first parameter to my function was how many components, how many sine waves we add together, just two, and a fundamental frequency or a base frequency of two hertz. And we get this signal in the time domain and in the frequency domain, it's this plot. Two components. The first component has a frequency of two hertz, the second component, six hertz and you can see the peak amplitudes. 1.2 something and one third of that. This frequency domain plot, the software approximates the frequency domain. It does some approximation, so it's not a perfect impulse. Let's just vary some of those parameters. Let's add three components and we see our three impulses and four components, of course, four impulses. In the time domain, the signal is getting more accurate with respect to a perfect square wave and the signal bandwidth is getting larger. Go back to the first one. What's the period of our signal? What's the period? Determine the period, frequency, bandwidth of this signal. Four what? Write down the period, frequency and bandwidth of this signal and you equate two components, frequency, two hertz. You need to determine the period and bandwidth. The period is, if a frequency of two hertz, the period is one divided by two hertz, so half a second from here, one cycle in half a second, a little bit unclear on the screen. Period is half a second. Bandwidth, two to six hertz is the spectrum, so the bandwidth is four hertz. Let's say we're using this signal in the time domain to transmit bits and this signal transmits the sequence of bits one, zero, one, zero, one, zero. How many bits per second? What's our data rate if we use such a scheme? How many bits per second? Sixteen bits per second. Two bits per second. Anyone else? Look at it. This is the signal in the time domain. This signal represents eight bits. Bit one, bit zero, bit one, zero, so eight bits. Here, for this duration, it represents bit one. The signal is high. It's close to plus one. And for this duration, zero, one, zero, one, zero, one, zero. So a simple sequence of data of alternating ones and zeros. This is the signal. How many bits per second? Two seconds here to send eight bits, so four bits in one second. So in this case, we can say the data rate is four bits per second. I'll just write them down so we can refer to them later. What do we start with? We had a signal with, rather than writing the equation, I'll say there are two components. The frequency I set was two hertz. The bandwidth we saw from the plot was four hertz. That was the first signal we plotted. And we're saying, all right, let's record the other values. The period, t, was half a second. That is, there's one cycle in half a second. And each cycle, you think there's a high component and a low component. A bit one and a bit zero. So two bits in the period of half a second. Actually, so that implies a data rate, four bits per second. Our signal, which had two sine components, a frequency of two hertz, had a bandwidth of four hertz. With a frequency of two hertz, the period is half a second. And the period contains one cycle. We think there's a high part and a low part, where the high part represents bit one, the low part a bit zero. So I say two bits can be sent in one period. That means two bits in half a second. If there's two bits in half a second, we can send four bits in one second. We get a data rate of four bits per second. Let's try some other values and see the relationship between some of these characteristics. Let me change the frequency. Same sequence of data. Two components, frequency of three hertz. Two components, frequency of three hertz, bandwidth of what? It goes from three up until nine. Six hertz. So bandwidth of six hertz. We'll write that down in a moment. Period. If the frequency is three, the period is one divided by three. And same, we can send two bits in each period. Or from the plot. This plot is for eight bits. The plot goes for 1.33 seconds. How many bits per second? Or the other way to look at it, one period is 0.333 seconds. There's one bit and a second bit. Two bits in one period. So there'll be six bits per second. You can see it from the plot. From zero through to one, there are six bits, or three high values and three low values in terms of the signal. So six bits per second with the signal. We change the frequency. Three hertz. Bandwidth was six hertz. One period, we can send two bits. So in one second, we have three periods. So we can send six bits per second. We have a higher data rate in this case. Let's try another one. Let's start the season pattern. Let's increase the frequency to four hertz. Frequency is four hertz. Bandwidth goes from four up until 12. Bandwidth is eight hertz. Bandwidth is eight hertz. Data rate? How many bits per second? This plot is for eight bits. How many bits per second? How many bits per second? How many bits in one second can we send? If you look at the time domain plot, you see the range is from zero to one second, and it represents eight bits. Therefore, we have eight bits per second. The way that I'm plotting this, we're assuming, we're making some assumptions here. One is that we're using this signal to transmit our data. So I have a sequence of bits. In this example, the sequence of bits I want to send is very simple. Eight bits, one zero, one zero, so on. That's the data I want to send. So my computer takes those bits, and imagine it generates a signal that looks like this, where we generate a signal which is high, around plus one, for some duration, if we have a bit one, and low if we have a bit zero. So this signal represents these eight bits. We see over a duration of one second, we send eight bits. So in this case, eight bits per second. What was our bandwidth? The bandwidth was from four up until 12, or eight hertz. The period is a quarter of a second, and in one period we can send two bits. So in one second we can send eight bits. What do you learn so far from these three signals? What trends can you observe? How do you get a higher data rate? The first one, all three had two components. It was the same equation, one sine component plus a second. Just different parameters in those equations, in the sine functions. The first one had a frequency of two hertz, bandwidth of four hertz. Second one a frequency of three hertz, a bandwidth of six hertz. Four hertz, bandwidth of eight hertz. And data rate we see increasing from four six to eight bits per second. Generally we see an increase in frequency and or an increase in bandwidth leads to an increase in data rate. The data rate is a characteristic that we care about for our link. The bandwidth and frequency are characteristic of our signal. So we need to design or select a signal with those characteristics that will produce a data rate that we want to achieve. The first trend that we're starting to observe just from the fundamental analysis of these signals that is higher frequency and in practice a higher bandwidth, these two are related in practice, generally a higher frequency allows a higher bandwidth, leads to a higher data rate. Let's do one more. We've done a frequency of two hertz, three hertz and four hertz with three components each. Let's do with two components each. Now let's do the same four hertz signal with three components. Three components, four hertz. The bandwidth goes from four up until 20. The bandwidth is now 16 hertz. Our data rate is the same. In one second we still get to send out eight bits. So going from two components up until three components, our data rate doesn't change but our bandwidth increases. Let's write them down. With a frequency of four hertz but three components, we've got a bandwidth of 16 hertz. The data rate is the same. Same data rate, but different bandwidth for our signal. These two, the last two that we considered, which one's better? Which one would you choose if you want to send your data? They both achieve the same data rate. You've got your bits to send. You choose a signal with two components and a frequency of four hertz. You'll be able to send it eight bits per second. If you choose a different signal with three components and a frequency of four hertz, you'll also be able to send it eight bits per second. So with respect to data rate they're the same. There's the first one better than the second one. It uses a smaller bandwidth. We haven't got there yet, but we'll see when we get to transmission media. In practice, we only have a limited number of frequencies available to use. There's some cost involved of using a larger range of frequencies. So we want to keep the bandwidth as small as possible. We don't want it to be high from the perspective of cost. So the first one is better than the second one with respect to bandwidth is less. And we get the same data rate. That's a good thing. Why would the second one be better than the first one? And maybe I'll plot them again. The first one, look at the time domain plots. This is with two components. This is with three components. The second one with three components is more accurate if we want to approximate a square wave. And we'll see later that the more accurate the signal, the less chance of errors. Something we haven't considered in this analysis, but the more accurate our signal in approximating a square wave, the less chance with things like noise and other interferers that we'll get errors at the receiver. So the second signal is better in terms of what we say accuracy or less errors. But we cannot count that or we cannot create fine numbers for that in this case. So we have some trade-offs to consider. Now, we want to have a signal which produces a high data rate. We want to have a signal that occupies a small bandwidth. And we want to have a signal which is accurate. And the best way to think of accurate in terms of the shape of the signal in the time domain, in our example, it approximates the square wave as close as possible. The more components we saw, as we add more, we get closer to the square wave. So that's good in terms of accuracy, less errors, but it's bad in terms of bandwidth. The more components, two up until three, we doubled our bandwidth. That's bad. And we kept the same data rate. So three factors, data rate, bandwidth and accuracy are key trade-offs in terms of designing communication signals. With the previous signals, we saw, look at the bandwidth. Also the frequency, but let's focus on the bandwidth. Four hertz, six hertz, eight hertz, four bits per second, six bits per second, eight bits per second. Don't worry about the exact numbers. Notice the trend. Increasing the bandwidth increases our data rate. That's a general trend. Larger bandwidth, larger data rate. Larger bandwidth, larger cost. Larger bandwidth, the more accurate our signal. So we want to keep the bandwidth low to maintain the cost, but keep it high to have a high data rate and high accuracy. So there are a number of trade-offs we need to consider. Analysis has made some assumptions that as high was one, low was zero. It's more complex in other signals just to show the trade-offs there. Let's try and finish today. One more, or a couple more plots. We plotted for a sequence of one, zero, one, zero and so on. Someone choose some data they want to send. Eight bits of data. Well, some random data, let's change these. One, zero, one, one, zero, zero, zero, one. Let's say that's the data we want to send. Well, the concept is we just, when we have a bit one, a high signal, bit zero, low, two bit ones, you can think two at high, zero, zero, zero, one. So here's a simple encoding scheme where we encode our bits to signals. The frequency domain plot is more complex now. That's got some extra components. It's got a similar shape, but there's some extra components in there of that total signal. So depending upon the bits that you want to send, so far we're assuming if we want to send a bit one, we just send create a signal from our sign components that will produce a high level. Bit zero, low level. We just keep changing the level according to the bit that we want to transmit. Let's stop there. Tomorrow we'll continue and talk about those trade-offs of signals, data rate, bandwidth and accuracy and move on on data transmission. The example we just went through is basically this one, except this one I was going to use megahertz, but here we just use hertz.