 So, this is lecture 10. So, before we proceed I want to point out one mistake that I made in last class which was an oversight for m squared q a m the average energy should be what? 2 times m squared minus 1 by 3. So, that was a mistake there and looks like enough of you have realized the mistake, but and make sure that works out. So, there is a two factor that will flow. And that is something to keep in mind. Okay, so that is the, that is as far as this is concerned and I want to spend some time in this class talking about this real passband signal space and the corresponding complex baseband signal space. It is a little bit important because the way we will discuss for the rest of the class we will mostly concern ourselves with real baseband and real passband. No, no, real passband, but the real passband we will not view it with cos 2 pi f naught t and sin 2 pi f naught t and all that. So, we will view it completely in complex baseband and in complex baseband the signal space will be slightly different. Okay, so I want to in the sense the basis is different obviously, but the signal space and every other characteristic is exactly the same. So, I want to spend some time just driving that through once again. So, I will just briefly summarize it for m squared QAM. So, pretty much for the rest of this course we will be dealing with M P A M and M squared Q A M. So, I will point out some other modulation schemes just for completeness, but we will not go into any details there. So, if you are interested you should read more about all these other modulations. I think some people came and asked me about offset QPSK, pi by 4 QPSK, all these things and then there is also something called minimum shift keying which is actually a modulation scheme with memory. So, you do a lot of bits together something called continuous phase modulation. All these things are interesting ideas, but just to be just to the area of digital communications that way can be very vast. So, to simplify and do something in the first course we will pretty much concentrate at M PAM and M squared QAM. So, these are pretty much what is used today. So, any communication system you take will either use M P A M or M squared QAM. So, it is what is interesting for us. So, I will limit myself to that, but that does not mean there is nothing else out there. Please go and read up on your own you might get some, you might get some things to talk about. So, let me remind you of the signal space ideas and how you move from the real pass band domain to the complex base band domain. So, this is important for several reasons and I will try to point out all these things and all the equivalences that happen. So, I denoted a general point in the M squared QAM as a complex number. It is a two dimensional space and you pick a point and it is two real numbers you can think of it as a complex number for convenience. So, my signal point is A plus JB and there is a real pass band signal corresponding to each signal point in my M squared QAM constellation. What is that real pass band signal? I called it XABT. So, you can map it to in various different ways. The signs do not matter, but you will see one A will multiply a cosine term and B will multiply a sin term. So, that is important. A root 2 by T. What this root 2 by T is not too crucial. So, I am just having it around for normalization purposes. Like I said in practice the last thing you care about are these constants that multiply your signals. Those have no meaning in practice. So, plus B root 2 by T sin 2 pi f naught T. So, this is between 0 to T and that makes my bandwidth rather large. So, for the first cut in the initial system that we are going to look at, I am going to say around f naught I will assume I have a large bandwidth and that is a problem we will fix later. So, we will say we will fix that later. Right now we will use a large bandwidth around f naught. So, once you do that this is a passband real signal. So, this is a real passband signal. For those of you who have already understood this this might be the fourth or fifth time I am repeating myself, but this is quite crucial and important. So, maybe think about it more you might get other facets of this which are interesting. So, real passband signal. So, how many of these signals do we have? m squared of them one corresponding to each point in my m squared QAM constellation that is fine. So, you take all those signals and if you do Gram-Schmidt on them how many basis signals will you get? Two one of them will be root 2 by T cos 2 pi f naught T between 0 and T and root 2 by T sin 2 pi f naught T between 0 and T. But that is not how I design these signals. How did I design the signal? I did it in reverse I started with the basis and then picked my point on the space both are fine you can do both ways it will work the same way. So, corresponding to this set of signals there is a two-dimensional signal space over the real numbers signal space over R. So, what do I mean by this over R now? So, my basis is cos 2 pi f naught T sin 2 pi f naught T what is this over R business the combination terms the scaling factors will be real. So, in my 2D signal space the scaling factors are real I multiply a real number with cos 2 pi f naught T and another real number with sin 2 pi f naught T. So, I have a 2D signal space over the real numbers. So, that is what this means. So, what is the basis here? I have been talking about it a lot. So, I will write it up to a normalization factor if you want an orthonormal basis you have to multiply by root 2 by T to make it. So, remember once again this is between 0 and T I am restricting myself to 0 and T and that is the way I am fixing my bandwidth. So, this is how it is working out my bandwidth is becoming very large and it is working that way. So, an arbitrary signal is obtained by multiplying these things all this is fine. So, this is a good picture and we have been happy with it the basis is cos 2 pi f naught T sin 2 pi f naught T and if you want to do what would you do at the receiver if this is what you thought of as your signal what would you do at the receiver you will correlate with the basis vectors. So, one easy way of correlating with cosine and sine is to use this LC circuits I described it hopefully you understand it all you need is some circuit whose impulse response is a sinusoid and LC is a good circuit for that. So, you can use an LC circuit tuned to f naught some 1 by root LC has to be close f naught and then you tune it that way and then you can use it directly and correlate directly in real pass band it is possible it is nothing wrong with that one can do that. So, it is possible to design such receivers also. So, correlation will be in you can do pass band correlation if you want. So, that is definitely possible that is there. But the way the another way to view this is to view the picture in complex base band. So, it changes a lot of things and gives you a different kind of a system to implement it what do I do I take this real pass band signal and then do a down conversion. When I do a down conversion I see that the complex envelope of XAB of t all those complex envelopes together also form a signal space on that I can do Gram-Schmidt again. So, that is the picture that you should have in mind. So, only your basis will change thus because you have done a down conversion from the real pass band picture to the complex base band picture. So, what did we do next we took this we took this XAB of t I am not writing it down fully which is real and pass band and we do a down conversion. Remember you can also go back and do by an up conversion right. So, this down conversion is a reversible process. So, it is fine you do a down conversion and you get what your complex envelopes how many of these complex envelopes do you have again m squared of them one corresponding to each a plus jb, but this complex envelope is very very simple if you normalize it and write it properly it will work out as a plus jb times root 1 by t between 0 and t is that clear. So, the complex envelope is simply well maybe there is a root 2 factor or something I am normalizing it do not worry about it I just want to have root 1 by t there I will say you I will say why you have it maybe you think of it as a minus jb but it does not matter maybe I change these things. So, these signs are not too crucial if you want I will write a minus jb if you are too particular about the exactness of the mathematical formulation I will write a minus jb it is ok. So, this is what we had. Now, if you take all these A XAB tilde's and do Gram-Smith over C with complex vector spaces you will see you will get only one basis ok what will be that basis just root 1 by t between 0 and t ok. So, these guys this signal space is a 1D signal space over over what? C not the real numbers over the complex numbers what is the basis? Basis is simply root 1 by t it is just a constant function between 0 and t ok. So, you understand the subtle switch that has happened you are dealing with the real passband signal and you get a two-dimensional signal space over R then you do a down conversion view it as a complex signal and you do Gram-Smith you get only a one basis ok. So, that is why in the picture that I drew I said once you down convert your correlator is nothing but a integrate and dump ok, but you have to do two integrates and dumps on two signals one for the i channel one for the q channel ok. So, that is enough ok. So, that was the that is a different way of viewing the exact same thing you are just doing processing in a different way ok. So, this picture should be very clear to you. So, once I go to so this one dimension signal space over C also has the same type of picture if you want to draw the picture you have to draw the same picture because it is complex numbers right it is because you have one dimension since it is complex all these a plus jb's will have the same picture the picture will not change, but what has changed? The basis you have to think of it as just one basis vector every complex numbers multiplying that basis vector ok. So, this is a crucial picture I am going to draw this entire picture once again and then we will go through it maybe quickly ok. So, I have two times log m base two bits ok these things go through my what are called bit to symbol converter it is also called a mapper you map and you get two guys out ok this is a plus jb ok is also my vector x this is x1 this is x2 right this is how I think about my think about my signal ok it is actually a vector ok. Then once I have this a plus jb I am going to go through a discrete to continuous time transformation I will say d to a ok. So, I take my a plus jb and what do I do what do I do to get my xab tilde what do I do I simply repeat the a just I just hold the a for a capital T time interval ok. So, you might say the root 1 by t I have to multiply what you would not multiply by such things ok. So, that those things are taken care of elsewhere. So, you just take this a and hold it for a time t take the b hold it for a time t. So, that is what you did to get xab tilde for the next time interval maybe you switch it you change it to something else ok. So, that is fine. So, once you have the xab tilde what do you do you do a up conversion to go to the required frequency once you do the up conversion you have your real pass band signal ok. So, you have just one line there this is a real pass band signal ok. So, when you transmit the way we model it say it goes through a channel for us the channel is ok we assume the channel has a large enough flat bandwidth around f0. So, this xab is going to come through harmless there is no channel component ok. So, it is going to come through without any problems and the only thing that will happen to it is some noise process an awj noise process going to get added to it. So, once I do that I get r well I do not want to say rab no. So, yeah maybe I will say rab it is ok. So, it is just a illustration rab of t ok which is my received signal corresponding to xab of t ok. So, there are two possibilities now if you want to correlate in pass band you could correlate in pass band as well ok, but maybe those things are tough to build they are not stable there are so many problems are there. So, maybe you want to bring it down to base band, but you can do either one there are systems where people do correlation in pass band also it might be at the end of the day a simpler circuit right it will consume lesser power maybe who knows ok. So, you could correlate in pass band if you correlate in pass band what will you get when you correlate your signals you will get y right the vector y you will get y 1 and y 2 ok. So, that is one way of going about it. So, I am not going to draw that here I am not going to show that because that is not what what is typically done in communication systems you always down convert and then do your correlation and all that. In fact, there is also a low pass filtering that people will do ok whatever bandwidth that is of interest to you you first put a low pass filter on that bandwidth and make sure noise from elsewhere is not coming because you want to down convert and quickly sample in fact some people just directly sample pass band signals. So, if you want to do such things you want to right I did I talk about pass band sampling maybe maybe you are familiar with this. So, even if it is as long as there is an integer multiple somewhere in the middle you can pass band sample all you need to do is make sure the noise is not there out of band ok. So, reject the out of band noise and pass band sample also. So, many models in which these things work. So, that is why it is good to put a low pass filter I am not going to show the low pass filter as well I am directly going to write down a down converter ok. So, you do a down conversion to get the complex envelope of the received signal ok. So, you get that. So, in our pass band equivalent picture in the base band equivalent picture you can kind of ignore this part and view the complex envelope of RAB as a noise corrupted version of XAB ok. It is possible to do that you can have a consistent model of the noise and it is possible to do that also ok. So, you can in fact say I will not even deal with any real pass band signal I do not want to worry about that at all only want to worry about my complex base band signal and I will do the modeling entirely with this also possible ok. So, then you do your correlation in base band ok for the simple case correlation is integrate and dump ok that is you do that you get your y ok this is your vector y y 1 and y 2. So, these are the i and q channels so to speak ok. So, those are the two channels corresponding to y 1 and y 2 and then you run your detector to get back your say your x hat or bits ok. So, it is all the same it is just a one to one map you get this or that ok. So, there is lots of conversions happening here and hopefully you are familiar with your you are able to become familiar with this easily ok. So, it is a little bit difficult to think of what is happening if you are not if you are not used to this thing, but eventually maybe towards the end of the course you will become really really familiar with this ok. So, before we proceed further so from now on mostly we will be worried about complex base band and real base band ok. So, we will not worry that much about this up conversion down conversion cost 2 pay f naught d sin 2 pay f naught d and all that. I will pretty much converse concern myself to concern myself with the base band ok. So, and then pretty much deal with only the vector x and vector y ok. So, you have to fill in all these pieces and understand that there are a lot of modifications possible to this block diagram itself right. In the first class I said this course will be filled with block block diagrams ok this is one of those block diagrams and you can modify this in several ways particularly at the receiver and today receivers are implemented with different versions of this and you should understand how the signals are flowing through and all these things are possible ok. Any questions on this comments? Yeah yeah yeah yeah that would not change because it is down conversion is just shifting in frequency right. So, it would not change the noise statistics. So, it will be the same correlation is what will make your noise discrete and we showed what the correlation does. As long as it is orthogonal or in the complex case there is only one thing you are correlating it. So, you will get only one noise you will get n naught ok sorry yeah. So, so one more thing you have to convince yourself suppose I do correlation in pass band itself directly I will directly get the exact same y ok. So, remember I will get the exact same y the y will not change it will be exactly the same and my model is exactly the same. So, this pass band base band is just a signal processing convenience as far as my vector model is concerned it is the exact same vector model for both the pass band correlation as well as the base band correlation. But you see already why the base band correlation might be better right it is in low frequency you can do with processors you can do digital like I said many of these things are done digital today ok. So, you just as soon as possible you sample and then work with numbers ok. So, that is why a base band thing is better integrate and dump is simply addition you just add all the samples and divide compare suitably and finally with the threshold it is very easy to implement ok any other question it is fine ok. So, so that is the what is the thing and a few other assumptions ok. So, a few other assumptions that are very important for this block diagram to work well and if you are building these things these assumptions will come to kill you. The first assumption is at least in this picture I have assumed there is a lot of bandwidth around F0 you will not have that situation. So, we will have to modify that at that time when we modify we will go back and look at this block diagram and see how to go about doing it that is one thing. The second crucial assumption is this F0 should be exactly available at the receiver ok otherwise you cannot down convert ok. So, imagine what will happen suppose you have an error in F0 at the down converter what will happen. Yeah. So, you will have an e power j 2 pi delta Ft factor in your RAB tilde ok. So, what so what does that mean? So, my real so I will maybe we will deal with this more in detail later, but I want to give you a hint of what will happen your constellation your received constellation will start rotating with time right. So, right now your received constellation points are around your transmitted constellation points in the received constellation because of this delta F difference you will have an e power j delta Ft factor. So, your received complex number will start rotating e power j 2 pi delta F is a rotation right with time it will rotate and actually you can see it you can write some simple MATLAB code and easily simulate this and you will see it or you can build a simple system which will demonstrate this for you ok you can see the rotation start rotating ok. So, in so that is a critical assumption ok. So, you have to make sure that F0 is available there is one more critical assumption what is that yeah the t ok. So, you should know the exact capital T ok. So, that is also something well maybe capital T is not too critical you do not have to be very exact with it, but you should know you should have some knowledge of capital T where I am using the knowledge of capital T in the correlator that is where I am using it ok. So, in the receiver you should know both F0 and t ok. So, the knowledge of F0 is called the coherent assumption if you say I am I am building a coherent receiver it means I know my center frequency ok there is also possible to build non-coherent receivers ok maybe if we have time I will go through it and I am not going to talk too much about it it is possible to build non-coherent receivers and it is possible to have transmitters suitable for non-coherent receivers and all that all that is there ok. The other notion knowing capital T is known as the timing recovery problem ok how do you recover the timing ok. So, timing is what time you are sending the bits ok. So, those two those three problems if we have time towards the end of the course I will go into ok those are more those are more those are less theoretical and more practical in nature those kind of problems you fix them with a lot of other in so many other ways ok. So, that is why we will we will see them later. All right any other comments or questions some things just disturbing you I think you think it is worth mentioning it is fine. Ok. So, I have not I have not it has been a long time since I worked it out exactly, but if you imagine there is a low pass filter first in the band of interest and then you do the down conversion you can show carefully that the noise statistics will not change. There will be a factor change, but you are going from real to complex. So, you expect a change by a factor. So, we maybe we will do this more rigorously later, but for now at least the x to y I did it I did it rigorously right from x vector x to vector y we know how the statistics change. The statistics for r a b tilde of t are not clear the plus n tilde of t you want to know what the statistics for n tilde is maybe I will make that a nice quiz question or a tutorial question we can do that it is not a difficult thing to figure out, but after the correlation we know exactly what the statistics is y is equal to x plus n and x n will be IID Gaussian I know that very exactly there is no problem there, but I did not do the down conversion statistic carefully it is possible particularly if I assume a low pass filter you can see why it should be proper. Anything else? But that is an important problem the noise statistics at the complex baseband level what is the continuous time random process that is an interesting problem. Anything else? It is okay all right. So, so before I move on so the next thing is going to be about detection and it is it is a little bit more mathematical than what we have seen. So, once you come to the detector level it becomes a fairly mathematical problem but before we go there I want to throw up something to you so something to think about okay. So, if enough of you are interested it will take at least a team of three and you have to come and convince me that you are sufficiently interested and you have all the tools necessary I am okay with having a building such a thing as a project okay. So, you can do it at different levels for instance you can if you have the skills for doing layout PCB layouts you can get it built I can I can get you money for that there is no problem but you have to have at least two or three people it is not a one-person job it is very difficult to make it a one-person job and you have to convince me that you have enough different skills there. So, somebody who can do soldering and populating a PCB etc. I mean all these things should be there if you have enough things then I am okay with trying to build a modem if you will for a M squared to AM okay. So, build a transmitter and receiver nothing fancy just the basic transmitter and receiver okay and show that it works of course you have to show that it works and I am willing to give you credit for that instead of your final exam etc. Ultimately, this is what you are supposed to do right this is the point of this whole course there are so many other things also you will see later on but at least the physical building of it but like I said there should be two or three people in the team and you have to come and convince me that you are really willing to do it and you have enough skills to do it and if you have like five courses which are intense don't try it it will be just a waste of time if you have enough time on your hands and you want to build it just for fun you can try it and I am willing to finance it also but you should show me first that you are interested okay. So, that is one part that I want to throw so let us proceed to the detection problem okay. So, yeah so before I proceed just one quick note okay suppose I do mpam in this system okay instead of m squared qam I can still do a very similar thing except that my xab tilde of t now will be real okay right will be real so in base band I will be occupying my positive bandwidth will be exactly equal to the negative bandwidth so if you imagine 0 to w available in base band minus w to w available in base band 0 to w will be exactly the same as minus w to 0 now if I shift to pass band what will happen around f0 also I will have the same symmetry and I will be wasting half my bandwidth but if I do m squared qam what happens in base band I don't have symmetry because of the complex nature minus w to 0 is not the same as 0 to w but if I shift it to pass band what happens overall about 0 I have symmetry but about f0 I won't have symmetry still but I will be using the entire bandwidth okay so that is the difference also which I want want you to keep in mind okay so that's something I didn't talk too much about okay so let's now move on to the detection problem okay so this will kind of complete the whole design you can do a nice basic design okay so I'm going to remind you of the model and the notation what's my model now so once I do once I'm down to the detection problem my model is completely a vector model y equals x plus n okay each of these guys are say m dimensional vectors okay this came from the dimension of my gramsmith process right if you do that how many dimensions you get okay so on top of that what else do I know okay I'm given the okay I'm writing fx of x but this is actually a probability mass function right I'm expecting capital X to be a discrete random vector okay so this is given to me okay typically I'll make the assumption that all the x's are equally likely okay so the alphabet on which this x's take a value or the constellation I will denote by this uh curvy x okay so this is my signal constellation okay so I don't have to put a bar down below it's just a set okay so this x is a what x is a set of m dimensional vectors right so that's so I'm thinking about it okay so that's my signal constellation and what is my noise statistic okay I'll assume it's it's given and once again it's an m dimensional pdf okay typically it will be continuous okay so I'm I'll uh I'll think of x being discrete and the noise being continuous okay so it's all real now I can do this with the real thing itself I don't have to worry about complex and all that it's just a convenience right so real also is exactly the same thing it's all real it's no complex stuff going on okay another assumption that one can make is x and n are independent right so there's no no reason why this is dependent okay so once you give all this you can find the pdf for y conditional pdf of y given x join pdf for y and x you can find all these things there's no problem okay but some things will be not very clearly defined what do I mean by join pdf of y and x x is discrete y is continuous right so maybe you use some deltas here and there to define these things okay it's possible to do that so once you can do all of those things okay so that's the statistic okay that's the model so what is my problem my problem is given y what is my best estimate for x okay so that's my problem given that I observe a vector y what is the I'll use a carefully chosen word here I'll say optimal choice for x okay so I have to define what I mean by optimal so optimal is typically you have some objective function and you either minimize or maximize it so that's when you say that I have chosen my independent variable optimally okay so I'll have to pick my objective function and say I'm trying to minimize it or maximize it and say I'll pick my x in that fashion that's that's the that's the nature for the optimal so to do this properly so let me write down the model once again I'm adding n to it I get y I run a detector on it to get x hat okay so this is my picture okay I'm trying to design x hat what is x hat now x hat is the output of the detector is one way of looking at it but mathematically if you look at it it is some function of y okay so that's the way you define x hat so x hat is a function of y okay remember all these guys are random variables so I can think of a joint distribution for x and n joint distribution for x and y a joint distribution for even x and x hat okay x hat is what just a function of y so you should be able to find the pdf for that also in fact x hat will be also a discrete function okay so because it will take values in x hat it will take values in this signal constellation so this will x hat will also be discrete so I can think of all kinds of joint pdfs so any probability any event defined using any of these combinations of random variables I should be able to find probability for using my joint pdfs and pmfs and conditional pdfs and pmfs okay so my objective function will be a probability okay so what what do I want to write down as my objective function my objective function what what is the most logical objective function you can have what can you try to maximize or minimize probability that x hat equals x you might want to maximize okay so that's a nice nice thing to try okay so that's my objective function which is probability of correct decision I'll denote it p of c this is the probability that x hat equals x okay so that's my probability so given a joint pdf for x and x hat okay how will I find the joint pdf for x and x hat if I define the detector's function detector is a function from y to function of y which is x hat I know the joint pdf of x and y once I define the function I can find the joint pdf of x and x hat so at the theoretical level all these things are very well defined it's no problem okay in practice you'll have to compute it and you can use a lot a lot of tricks to easily compute it you'll see it's not a very difficult computation but in theory it's all very well defined so it's an event it's a proper event on the joint joint distribution and you can compute its probability it's no problem okay so let's try to now simplify this expression and simplify it simplify it simplify it so on till we get to a very meaningful optimization problem where I can find my detector function easily okay so remember I have to pick my function of y suitably so that this guy is minimal okay so over all possible functions which is that function which gives me the minimal probability or maximal probability for this correct decision okay so that's what I want want to do so I'll try to look at this objective function change it change it so that I come to a point where my choice becomes very obvious okay so that's what I'm going to do and it might have some non-travial steps in the middle hopefully we'll we'll try to see it okay so let's try to write it down it's the first thing I'm going to do is to say okay so so let me write it so so x hat is actually a function of y okay so and so I have to bring y into the picture okay so I have to so a nice thing I can define as a joint pdf for x y and x hat and then do the evaluation on that so I have to bring y into the picture the way I'm going to bring y into the picture is like this since y is continuous I'm going to write down integration probability of this event conditioned on y being equal to y then f y y dy okay I can do this by dy I mean dy 1 dy 2 dy m okay so I can do this so so this is nice okay so another reason why this is nice this expression is nice is at the detector you're given y okay so you're given y and you have to choose x hat based on y so this kind of captures that computation also the computation you have to do what the detector is also compute capture nicely by this probability okay so now now we have to think more about this expression okay and figure out what we have to try to maximize okay so I want to maximize this entire integral but I notice for each y f y of y is positive okay so it's enough if I maximize this probability for each y then I would have maximized my probability of correct decision so you see I'm moving from a complicated maximization to simpler maximizations instead of maximizing the entire pfc it's enough if I maximize this conditional probability for a particular y for each y I have to figure out how to maximize it for each y once they figure out how to maximize it for each y then I can define my x hat suitably and that will end up maximizing my correct decision probability as well so that let me write that down maximizing p of c is equivalent to maximizing probability that x hat equal to x given y equals y for each y okay so remember I have to define x hat as a function of y which means I have to define x hat for each y okay I have to tell you for each y how you define x hat so this is also nice that way okay if I have to maximize this for each y I'm pretty much telling you what the detector should do for each y so it kind of has a logical way of moving towards the problem and its solution so it's very nice okay so let's let's let's try to write that down okay so what do I mean by this maximization for a given y for each y we pick okay this maximization means this we pick x hat such that such that what probability of x hat equals x given y equals y is maximized and this is the optimal choice for x hat okay so I'm going to write this thing down in a nice mathematical sounding way which will which probably will be more pleasing for people and it's easy to remember this so I'm going to write x hat equals argument of maximization over x probability that x equals x given y equals y okay what am I doing on in this in this subtle way of writing the whole maximization I choose different values for x hat I put x hat equals x 1, x 2, x 3 so on and then I evaluate that probability on the right probability that capital X equals small x given y equals y then I pick that x hat for which this probability is maximal and that has to be the way in which you have to choose your x hat okay this argument is basically telling me I don't want the objective function but I want the variable that maximizes the objective function so this is a very nice and neat way of writing it down so this x equals x if this is disturbing you just do a Vultar and write capital X equals small x okay so your free variable is small x no okay so this x belongs to what the signal constellation okay over all x in the signal constellation you keep evaluating this probability okay and then you pick that x for which you have a maximum probability and that will end up doing okay so notice now this probability is much easier to evaluate because you now want the PDF of what simply x and y you want the conditional PDF of x given y and that's something that you're very comfortable okay so slowly from this x hat you manage to slowly figure out to a point where we are much more comfortable dealing with the PDFs that are involved okay right so this rule is called the MAP rule what is MAP maximum a posteriori rule okay so and this is the optimal rule for detection okay notice here I've made no assumption I've not even assumed y equals x plus n okay this is just n that's not even entered the picture so far what is this purely x and y have a joint distribution that's the only thing I care about so this detection problem solution to the detection problem can be applied in a wide variety of ways okay in so many different applications it's actually used anytime you have a joint distribution between two random variables and you can observe one and you have to find the optimal value for the other you can use this MAP rule okay the only additional thing is I've assumed x is discrete here but it's maybe the even that assumption can be relaxed it's not a big deal okay you can do that okay so this is the detection problem now I'll slowly specialize start specializing it to our AWGN type assumption and then you'll see the answer will be very very easy funny okay so we'll start doing that okay one thing that's disturbing about this conditional PDF is you're given y and then you're doing x okay but what seems to be natural is given y given x okay but you can go from this to that using base rule okay so use base rule and let's see how to change that okay so once you start using base rule you see probability that x equals x given y equals y okay can be written as okay remember I'll do a subtle change between PDF whenever necessary okay so I can write it as f y given x y given x times probability of x equals x divided by f y y okay I'll write it this way okay right so this is something very simple now if I do maximization over all small x on the left I can do the same maximization over all small x on the right but notice the denominator is independent of small x there's no small x there okay so I can say my MAP rule is equivalent to maximizing over x in this x probability that x equals x times okay so this is one thing okay this is the MAP rule okay in many cases of interest the first term might also be independent of x okay it might be constant okay it might be uniform but it's uh it's it's really not true in practice in several communication scenarios okay so I've always been saying that you pick all these bits independently independently independently and digital communication today use a powerful technique called error control coding which makes all these bits dependent okay so you have to actually do something else at this point we'll come back to it later but remember that this assumption you're going to say is valid now you're going to say it's uniform and I'm going to throw it away but in many cases it won't be true you'll have to come back and fix it okay so based on our assumption we can throw it okay suppose you see this is uniform then the MAP rule becomes what's called the ML rule okay so the maximum likelihood rule okay so okay maybe I should write down what these things are maximum a posteriori this is maximum likelihood okay what is this rule x hat equals argument of maximization over x in the constellation f y given x y given x okay by itself it's a detection method people say I'm doing ML okay I don't care whether the probability is uniform or not I'll still do ML okay it's a detection method which will be suboptimal to MAP in the what condition if the x's are not uniform it'll be suboptimal okay otherwise it'll be good okay so it's a reasonably good detection method as well that's the ML rule okay so once again I've not used anything about n so far I'm not so these are all general things that you can use for any detection problem MAP and ML are general techniques that can be used okay so now we'll throw in the y equals x plus n assumption and try to simplify the the this conditional PDF in that case and you'll see finally for AWGN it'll work out to a very very simple situation okay so for AWGN have y equals x plus n so so this f y given x of y given x becomes what okay so it's going to be normal centered at x and with variance same as the variance of n naught okay so another way of writing it is f n of y minus x okay so it's the same thing so you take the distribution for n instead of its mean which is 0 you put x as the mean okay so roughly is the way of writing it so in fact to be very rigorous what will the expression be 1 by root pi n naught right to the power m e power minus what norm y minus x squared divided by did I mix out a root I'm sorry n naught okay is that fine everybody's happy so this will be the exact expression for my conditional PDF okay so over all choices for x I have to maximize this probability okay so remember what I have e power minus positive number showing up so if I want to maximize e power minus something I should minimize whatever that something is okay so my ML rule in AWGN becomes equivalent to what x hat equals argument of minimization over all x and x what norm y minus x square so this could be termed as the minimum distance decoder or the nearest neighbor decoder okay I'll say nearest whatever nearest neighbor is a weird thing so I'll say maybe I'll say closest what shall we call it closest symbol decoder or some such thing okay I'll call it the closest symbol decoder that is the best way of putting it right why is it the closest symbol you look at the received constellation right why is some point how do you go to the x find the nearest x in euclidean distance okay that's the rule it's really really simple and that happens to be optimal under what assumption all the signal points are equally likely that's optimal in AWGN in AWGN that's optimal okay so it's a very very simple rule there's no big problem here so and we can do a whole bunch of examples then figure out how this how this works okay so I'll do one example maybe and then we'll wind up for today the example will be do you want to do a complicated example or a simple example we'll do bpsk for now which is not even an example I think all of you know how bpsk is going to work out okay the first example we'll see is bpsk what will it be okay so so it's very common to denote the detector by drawing the received signal constellation and saying for each point what will be my corresponding x hat see I have to define x hat as a function of y so basically I have to define a function of y then I define my detector so how do you define the function of y you write the axis where y can be so this is my axis y on y I have my transmitted points x okay so 1 is minus 1 the other is plus 1 corresponding to say a bit 0 and bit 1 okay this is my constellation but my y can be any point on this axis so if it's a point on on the right side right side of 0 then I'm going to say my transmitted point is plus 1 because for any point on the right side of 0 what will be the closest signal point plus 1 okay so it's easy to see under any point on the left side of 0 the closest signal point will be minus okay so usually you drew you draw something like a region here draw this and say anything here x hat is going to be plus 1 anything here x hat is going to be minus 1 okay so that's it that's my simple bpsk so now you can take any of your other signal constellation pictures and then mark out the regions where you will make different decisions right if you take for instance m square q a m y can y can be any point on the signal constellation x is supposed to be a set of points and then y can be any point on the signal constellation for each point you have a nearest closest symbol that was transmitted so you can map out the entire signal constellation into regions where into what are called decision regions okay there is a region within which my decision is going to be a particular transmitted so those are decision regions so in a sense that all the examples are basically plotting decision regions for your detector so we'll do that in the next class for all the other examples and we'll see it's quite easy and then we can in fact even compute probability of error and then start studying the trade-offs more closely okay so we'll do that next