 Welcome to this lecture on digital communication using GNU radio. My name is Kumar Appaya and I belong to the department of electrical engineering IIT Bombay. This will be a continuation of our discussion from the previous lecture on orthogonal frequency division multiplexing. If you remember in the previous lecture we were discussing the idea of converting a wide band channel into several parallel narrow band channels which could result in the smaller narrow band channels called subcarers being flat and therefore, resulting in a simpler equalization. We will continue our discussion on this today. If you remember from our previous discussions the model with which we are going for the transmit signal is x of t is summation b k p of t minus k t, b k are the symbols that you are transmitting and p of t minus k t is the effective pulse that is seen at the receiver in some sense it is the conversion of your transmit pulse along with the channel if any. Now, p of t determines bandwidth usage again I want to emphasize that since p of t is the convolution of your g t x of t and the channel the bandwidth usage is of course, determined by the least of the two bandwidths typically g t x of t is shaped so as to have a limited bandwidth footprint. Now, p of t determines bandwidth usage. Now, one approach to making the channel smaller in the frequency domain is to make p of t wider and reduce the data rate of course, that is one way to look at the problem. The other alternative is to repeat b 0 multiple times b 1 multiple times and that is something which we were discussing in the previous lecture if you recall you were essentially suggesting that we were essentially suggesting that if p of t has Fourier transform p of f and let us suppose that you take b 0 let us say 4 times that means, we had if you remember that resulted in the effective pulse being p of t plus p of t minus t capital t plus p of t minus 2 t plus p of t minus 3 t and we wrote this in the last class and if you now combine these carefully we will end up getting p of f times 2 times cos of I am going to take e power minus j I believe 3 pi f t out and I will get 2 times cos of 3 pi f t plus cos of I believe pi f t. If you want to verify this if you take e power minus j 3 pi f t out you will get e power j plus 3 pi f t e power j minus 3 pi f t here add them you get 2 cos 3 pi f t this one will become e power j pi f t this one will become e power j minus pi f t add you get cos of pi f t. Now, if you add these 3 pi you will cos a plus cos b is 2 cos a plus b by 2 cos a minus b by 2. So, I will write 2 again. So, this is going to be cos of 3 plus 1 4 upon 2 2 pi f t times cos of 3 minus 1 I believe pi f t that should be you can check this. So, 3 minus 1 upon 2 is this now if you look at this cos 2 pi f t right cos 2 pi f t when does it become 0 at plus or minus pi by 2 that is the first place where it becomes 0. So, let us say that 2 pi f t is equal to pi by 2 will result in f being equal to 1 by 4 t. Which means if you now try to draw the spectrum and let us say that this is minus 1 by 2 t and 1 by 2 t which I can write as minus w by 2 and w by 2 because our t is 1 upon w then you get the 0 exactly around here. So, effectively you have reduced the bandwidth usage to this particular area which means that you are essentially using about one fourth of the bandwidth which makes intuitive sense from your DSP knowledge also that the usage of bandwidth essentially reduces if you slow down the pulse in the time domain by any method such as repetition. This is the key idea that we are going for. So, we are repeating b 0 multiple times we are repeating b 1 multiple times let us say k times of course this method flattens the channel in the sense that the frequency spectrum usage becomes much narrower. However, one issue is that you have essentially made the data rate 1 upon k times that is a really bad thing earlier you are sending at one symbol every t seconds. Now, you are sending one symbol every k t second like you know 4 t seconds this is not the right you know not the best approach to take. So, what is the better approach? So, let us suppose that p of t occupies bandwidth between minus w by 2 to w by 2 this is just what we have been seeing. The new spectrum if you repeat b k k times the capital K times is roughly minus w by 2 k to w by 2 k. The justification is that if you do p of t plus p of t minus t plus dot dot dot plus p of t minus k minus 1 t then the resulting effective spectrum is you can just write the take the Fourier transform and you know that every delay results in e power minus j 2 pi of t of extra multiplication. If you just take into account all these terms and then just you know do a geometric series summation you can show that you will get something like this. Now, this looks like a sign by sign it looks like it looks like a sink like shape which makes sense and as you make k larger and larger it is very intuitive you can see that the spectrum becomes narrower and narrower. Problem still data rate is 1 upon k. So, this is what we saw we did this for k equal to 4 if k is equal to 2 right then you get this kind of a spectral footprint of repeating b 0 2 2 times b 1 2 times and so on. If you repeat 4 times you get something like this if you remember this is if this is minus w by 2 and w by 2 then this was w by 4 which is 1 by 4 t which is what we got. If you start increasing the k then you will start getting narrower and narrower pulses they start looking a lot like sinks by the way and this makes complete sense. Now, we have to break the problem the problem being that the spectral footprint is very very spectral footprint is very narrow in the sense that the spectral footprint we have is narrow, but that also results in the data rate being low how do we break this? So, 32. So, k repetition reduces the spectral footprint by a factor of 1 upon k, but also the data rate by 1 upon k. So, the key idea which we are going to use to not reduce the data rate is we will take another parallel stream that is multiplied by e power j omega naught k. In other words we have reduced the spectral footprint, but let us now take another reduced spectral footprint pulse sequence and put it in a neighboring frequency band that does not interfere. How? You know that e power j omega naught k multiplication modulates the signal. In the DSP sense also what happens is that in the DTFT picture you shift this DTFT by a factor of by an amount omega naught toward you know if omega naught is positive omega naught to the right. So, if you take a narrow pulse you have reduced the data rate by 1 by k let us take another stream which has the same narrow pulse type spectrum and multiplied by e power j omega naught k that results in that pulse occupying a neighboring spectrum without affecting this and as next one and a next one and so on. So, you can essentially now slice your bandwidth into smaller frequency bins and by taking these 1 by k diluted kind of sequences, but then taking multiple sequences and then putting them in parallel. So, the key idea we are going for is omega naught which is the discrete frequency if you now multiply by e power j omega naught k then what is the frequency shift that is what is the frequency shift that you will encounter in hertz. So, remember from your DSP right you are using minus w by 2 to w by 2 and we said that these you know this kind of signaling assuming it is sync even for root raise cosine of course, this kind of signaling satisfies the Nyquist ISI free criterion. Therefore, remember that your w by 2 is like f s by 2 where f s is the sampling frequency. So, if you moderate by e power j omega naught k the amount of shift you will see in hertz is omega naught times w hertz. In other words if you if you choose omega naught as let us say of course, there should be I think a 2 pi multiple apologies. So, if you choose omega naught to be let us say pi that will result in w by 2 if you choose omega naught to be pi by 4 that will result in something like w by 8 so to speak. So, now, you will essentially find that these kinds of shifts exist modulo w because you know the frequency range you are operating in is minus w upon 2 to w upon 2. What is the exact division that you must use it turns out that you have to just multiply by e power j 2 pi m k upon capital K. Now, basically you will choose m to be a number between 0 1 2 up to k minus 1. So, m will be 0 1 2 up to k minus 1 let us write this down carefully. So, what we are essentially saying is take sequence 1 of data that is you have b 0 let us say b I will take b k b 2 k and so on group them and you know you group them and you can repeat these k times essentially. So, you will have something like b 0 b 0 and b 0 k this should be multiplied by e power j 2 pi m k m small k upon capital K m is a number between 0 1 2 up to k minus 1 and for this I am going to choose 0 I am going to do 1 1 1. So, I get b 0 b 1 sorry b 0 b 0 up to b 0. Now, let us take our sequence 2 this corresponds to m is equal to 0. So, a sequence 2 corresponds to m is equal to 1. So, here I have let us say b 1 b 1 repeated k times. If I have this repeated k times let me just make this a little more neat this should be repeated k times. Now, over here since m is 1 I am going to multiply this by e power j 2 pi m times 0 e power j 2 pi upon k k e power j 4 pi upon k dot dot dot e power j 2 pi upon k times k minus 1 and that is what I am going to send in other words I am going to take this second sequence and multiply it by e power j 2 pi k small k upon capital K. This corresponds to which I wrote as e power j omega naught n in the other one this corresponds to a spectral shift by omega naught is equal to 2 pi by k what does that correspond to in Hertz w by k. Therefore, I told you that if you divide if you repeat the sequence k times the spectral footprint is 1 upon k times. If you repeat the sequence k times, but then before sending multiply by e power j omega naught n or e power minus e power j omega naught k where omega naught is 2 pi by k again the spectral footprint is w by k and you move it by w by k which means it is occupying the neighboring band. If you do sequence 3 you get another one. Another way of looking at it is if you look at this vector all ones and this vector 1 e power j 2 pi by k e power j 4 pi by k let us make this more neat 4 pi by k these vectors are actually orthogonal vectors. That means, if I now add b 0 b 0 b 0 b 0 b 1 b 1 b 1 e power j 2 pi k 2 pi by k b 1 e power j 4 pi by k and so on. These two additions will result in a resulting vector from which I can get back b 0 and b 1 by just taking the inner product with another set of vectors because these two are orthogonal vectors. Now, this should give you a rough idea as to how we are going to solve the this problem which we are talking about using this approach. So, let us now go further. This is basically what we are saying for k is equal to 4 let us take b k repeat it 4 times and put it in a column vector. So, we have b k b k b k b k. So, we take a block of b k b k plus 1 b k plus 2 b k plus 3 and let us repeat b k 4 times and put it in a block. But then let us take b k plus 1 repeat it 4 times, but before adding it to the b k let us multiply it by 1 e power j 2 pi by 4 e power j 4 pi by 4 e power j 6 pi by 4. This choice is determined this choice is essentially given by your 2 pi m k by 4. So, in this case your m is equal to 0 m is equal to 1. Next e power j 4 pi by 4 1 e power j 4 pi by 4 e power j 8 pi by 4 e power j 12 pi by 4. So, I am just doing e power j 2 pi small m small k divided by capital K. So, I get e power j 4 pi by 4 e power j 8 pi by 4 e power j 12 pi by 4 b k plus 3 is 1 e power j 6 pi by 4 e power j 12 pi by 4 e power j 18 pi by 4. For this particular case let us actually evaluate what these numbers are e power j 2 pi by 4 is pi by e power j pi by 2 this will be j e power j 4 pi by 4 is e power j pi which is minus 1 e power j 6 pi by 4 is e power j minus pi by 2 that is minus j. So, essentially get 1 j minus 1 minus j over here we get 1 minus 1 e power j 8 pi by 4 is e power j 2 pi plus 1 again minus 1 we get 1 and e power j 6 pi by 4 we saw here is minus j e power j 12 pi by 4 is e power j 3 pi minus 1 and this is j because 18 pi by 4 you can take away you know that is like 16 16 pi plus 2 pi upon 4 and this is what you get. So, this is m is equal to 2 m is equal to 3. Now, for since it is more convenient I have rewritten this for you ok I have just written this these things out. So, 1 1 1 1 1 j minus 1 minus j 1 minus 1 1 minus j minus 1 j the key idea is that all these columns are orthogonal orthogonal meaning if you take the inner product of any of to any two of these columns different ones you will get 0 do not believe me you can check let us do 1 times 1 plus 1 times j plus 1 times minus 1 plus 1 times minus j and add them. So, 1 plus j minus 1 minus j is 0. So, the 1 1 1 1 1 is orthogonal to 1 j minus 1 minus j let us choose this one and this one 1 times 1 is 1 j times minus j is minus j square which is 1. So, I get 2 now. So, 1 times 1 1 yeah 1 times 1 is 1 j times minus j is minus j square minus 1 times minus 1 is 1 minus j times j is minus j square. So, you can verify that these will also be orthogonal. So, if you just look over here you can just say e per j 2 pi by 4 and e per j 6 pi by 4 is essentially going to give you plus 1 and you can also verify the other columns also. So, for example, let us do the first and third 1 plus 1 times 1 plus 1 times minus 1 is 0 1 times 1 plus 1 times minus 1 is again 0. Now, therefore, these columns are orthogonal and these are the columns of this DFT matrix. So, these are the columns of the DFT matrix. Therefore, you are able to now parallelize the transmission into several narrow band transmissions merely by using the DFT operation. So, you do not have to do even this multiplication operation you just need to use the DFT. So, remember when you take inner products you have to be aware that you have to take conjugates when it is complex which is why if you want to check the first and third for example, you have to just remember to take the conjugate of this. So, 1 times 1 plus j times minus j conjugate which is j. So, that is why it is j square similarly ok and that will ensure that these are orthogonal. Now, our key idea is that rather than do this narrow band channel by repetition in a very manual way the DFT gives you a very simple way to realize this ok. Now, let us just verify this for the case which we are discussing. So, for example, let us say that we have 1 1 1 1 1 I believe let us go look at it again j minus 1 minus j 1 minus 1 1 minus 1 1 minus j minus 1 j. Let us call this matrix W deliberately if you just do W Hermitian ok what do you get? Hermitian if you recall Hermitian is essentially transpose conjugate. So, I am just going to write the first row as the first column 1 1 1 1 1 1 j minus 1 minus j I will take the conjugate. So, 1 minus j minus 1 j if I take 1 minus 1 1 minus 1 sorry I have to take the third column yeah 1 minus 1 1 minus 1 and finally, 1 minus j minus 1 j 1 j because conjugate minus 1 minus j. As an exercise if you just do W Hermitian times W what will you get? So, if you do the multiplication carefully the first row into first column is going to give you 4 the first row into the second column is going to give you 0 first row into third column is again going to give 0 first row into fourth column is again going to give you 0. Similarly, if you keep doing the multiplication you are going to get all 0s except oops on the diagonal, but this is not surprising because this is the property of the DFT matrix. Of course, the DFT in this manner is not scaled which is why W Hermitian W not identity, but this is the key property of the DFT that we are exploiting. So, you are able to send these transmissions orthogonally. Now what happens in the frequency domain? So, let us imagine what happens in the frequency domain. We have the concept of so called subcarriers. The subcarriers are sync like patterns that carry data. So, for example, we have this let us say that we have this k is equal to 4, then we do b 0 repeated 4 times no problem we get a spectrum like this and what was the spectrum we checked it was sin I believe sin pi k f t upon sin pi f t that is what the spectrum was sync like pattern and your pulse which you use you know this part will not be there because your pulse p of t has a p of f and if it is synced then it just cuts that out. Now for b 1 we repeat b 1 again 4 times. If we repeat b 1 4 times then it will again occupy the same spectrum as this part, but it will occupy the same spectrum as this part only if you just repeat 4 times instead if you repeat it 4 times that multiplied by the vector 1 j minus 1 minus j then that is essentially equivalent to multiplying it by e power j pi by 2 k e power j pi by 2 k as you remember corresponds to a frequency shift of w upon 4. Therefore, if this is w upon 2 this center is at w upon 4 how does the orthogonality manifest I told you that the sequence 1 1 1 1 and 1 1 1 sorry 1 j minus 1 minus j are orthogonal. The orthogonality is confirmed because if you sample in the frequency domain then over this at 0 hertz the b 1 pulses contribution is at the 0 is 0. Similarly at w by 4 b 0's pulses contribution is 0. This essentially is how the orthogonality manifests in other words even though you have not split your channel is into rectangular so called you know pulses it is still honoring the orthogonality principle. Therefore, you have b 0 if you look exactly at w by 4 you have b 1 without the influence of b 0 b 2 and so on. Next what happens in the case of b 2? In the case of b 2 there is something a little interesting in the case of b 2 our shift is by pi. But remember that we are performing this shift by pi modulo you know modulo 2 pi or modulo in the hertz modulo w by 2. Let us say that our shift is by pi radiance in the frequency domain in the discrete frequency domain this corresponds to a w by 2 shift. But the w by 2 shift is cyclic meaning the a part appears here and the other part appears here. Therefore, this w by 2 shift causes b 2 to appear here and here. If you remember in DSP you will recall that the DTFT is periodic with period 2 pi. Therefore, when you deal with sequences of the form you know any whose when you deal with this DTFT of the sequences what happens between minus pi and pi gets repeated between pi and 2 pi. This is a natural consequence of the fact that you are dealing with sample sequences. Now finally, let us look at b 3 also in the case of b 3 the shift is by 3 pi upon 2 which can also be looked at as minus pi upon 2 which can also be looked at as minus w by 4 minus w by 4 is here. Therefore, what you have successfully done is to parallelize the channels by into 4 parallel you know 4 parallel narrow band channels narrow band in the sense that these sinks link like shapes essentially occupy a much narrower bandwidth than minus w by 2 to w by 2. However, the sum total of the 4 sequences that you are using will add up to w by 2 because you are sending 4 parallel streams and each of those streams is being sent by the each of those streams is being sent using the same you know time instances in parallel. Now, one remark that I want to make is that I told you that that w is a DTFT matrix technically speaking it is the inverse DTFT matrix because you are putting it in the time domain using 1 e per j plus pi that is something which we will discuss in the next lecture. But the key idea is that the DTFT based approach allows you to parallelize the channels conveniently while ensuring orthogonality of the transmissions. In the next lecture, we will continue our discussion of OFDM and talk a little bit more about how you can use OFDM to good effect and the DTFT as an convenient equalization mechanism. Thank you.