Welcome dear students. After the previous lectures where you learned about designing amplifiers such as low noise amplifiers and power amplifiers, this time we're going to do something very different and also very exciting. We're going to talk about the design of mixers and mixers are very different circuits from amplifiers because they do a very definite basic function, handle then take the signal and make it larger. Mixers us actually shift the signal in frequency. You might remember from the earlier lectures that mixers us are very useful components both in the receiver and the transmitter because it allows you and the receiver to take the antenna signal and converts it to a low-frequency where it's easy to do operations on such as filtering and data conversion. Then the transmitter that allows you to do the data conversion and other operations again at low frequencies and only very late in signal chain, transfer the signal to a high frequency where can be amplified and transmitters. Mixers are really interesting and useful circuits. Let's go ahead and start designing some. How do you really design a mixer? Well, actually let's think about the fundamental requirements of a mixer. You might remember from your earlier lectures and your bachelor program that the requirements for circuits that shift signals in frequencies or more precisely you probably have learned about requirements for circuits or classes of circuits that do not affect the frequency content of a signal. Can you still remember? What was it? It was something with linearity correct? Anybody knows exactly? Well, actually the precise requirements, and this is one of those cases where it really pays off to be very precise in the formulation of requirements or to look to the precise formulation up, because being as precise as maybe colleagues in the mathematics department or colleagues and the legal departments. It also allow you to extract more information about the options that you have in a design. The requirements for a circuit or class of circuits that do not affect the frequency content is that they are linear but also and this is something that students usually forget after a while. They have to be time invariant. Every circuit is linear and time-invariant, then frequency content stays unchanged. That tells us something really interesting about how to design a mixer, because now we have essentially two classes of circuits that can do a mixing operation. That can be circuit's setup either non-linear or it can be circuits that are time variant. That means we have a choice, and so very soon you will be in a position where you can make the choice. Already in discourse but also later in your career, you will have the choice between making a non-linear circuits or time variant circuit if you wanted to do a mixing operation. What choice are you going to make? Well, actually to answer that question, it pays off again to look at the complete system. If you have a wireless system, then one of the things that we really want to achieve is to represents and the output of the receiver the signal that is transmitted as accurately as possible in order to preserve all the information that's contained therein. As a consequence, we tried to avoid any distortion. That's the reason why we spend so much time in the previous lectures in making sure that we have fairly linear low-noise amplifiers and very linear power amplifier. After all that effort, it seems like a waste to intentionally introduced non-linearities. It would therefore be much more logical to design a mixer using the time variant circuit, and that's exactly what we're going to look at in this lecture. There are situations where this is not necessarily to the wireless systems where you don't care one way or the other about linearity. There are not that many anymore, but it does exists. For example, if you go back to Mr. Marconi, who we encountered in one of our first lectures, then you might remember that he didn't care at all about linearity because he was transmitting in most code. The only thing that he wanted to know was whether there was a signal or not. He didn't care about interfering signals or interpolations of model transmitters because he had to first working practical transmitter, and so there was no interference yet. He didn't care, but after that it became more and more importance, and nowadays there are only few systems where it doesn't really matter to be linear. In this lecture, we're going to focus on the time variant part. Now, we know that we have to make a time variant circuit. But the facts that a linear time invariant circuit does not affect the frequency content, does not mean automatically that as soon as we violate any of these requirements, that we do get a change in frequency content and even more so, it doesn't mean that we get a change in frequency content that we really like. What is required to get an intended shift in frequency content? How do we do that? Well, actually it turns out it's not that difficult. It turns out that any non-linearity will confers the sum of two signals, of which one is a periodic signal into an output signal, and which the input signal, on the other signal is shifted to urban down in frequency by an offset that corresponds to the frequency of the periodic signal. This periodic signal, we usually call a local oscillator, and we're now going to see why that is. Let us assume that we have a non-linear circuit, and that non-linear circuit has an output signal that is a function of the input signal, but that function is non-linear. If that function is continuous, then I can approximate that with a Taylor expansion. I can write it as a_0 plus a_1 times the input signal, plus a_2 times the input signal squares plus a_3 times the input signal to the power of three, and so on. Now, this is something that happens with any circuit that is non-linear. Interestingly enough, we are not interested in all of these terms. This first term is just a DC term, who cares? It doesn't really tell us anything. The second term is actually just a game stage, it's the amplified input signal. we're not interested in that either. But this third term, that's interesting because it has the square of the input signal in there. Remember what I said, if the input signal consists of the signal that we want to shift in frequency and a periodic signal. Let's call that signal X, which is the RF signal that we want to shift, and a signal Y which is the LO signal. Then if we look at the sum X plus Y, and we look at the square version of that, we get X squared plus 2XY plus Y squared. This 2XY, that's the product that causes a shift in frequency. You can see that if Y is out, let's say that's the RF signal is an amplitude RF times the sine of the Omega RF times t. Let's say that the LO signal is an amplitude of the LO signal times the sine of t Omega LO times t. Then the X cubed plus Y squared gives these terms. This term XY is now ARF times ALO times the sine of Omega RF times t times the sine of Omega LO times t. If you have really good memory or if you looked up on one of these websites, what the rule is again, for multiplying signs, then you will find out that you can rewrite this as the amplitude of the RF signal times the amplitude of the LO signal times the cosine of the sum frequency plus the cosine of the difference frequency divided by 2. That's nice because this now allows us to shift signal and frequency up and down by the frequency of the LO signal. We can do that with any circuit that's non-linear. Let me just get out way this way so that you can read what I wrote there. This way? If you design a circuit that's nonlinear, then by definition, you have a mixer. Any nonlinearity will do that as long as it can be expanded into Taylor series where the second order term. Now that's really nice. That means that in practice you cannot avoid to design a mixer. Any circuit you design as non-linear. If you doubt that, then just think again. Let's think about what you might assume as the most linear circuit that you could imagine. Just a piece of wire, for example, something like this, a piece of wire. Is that truly linear? Well, it might seem that way. You put one volt on the inputs, one volt at the output, you put two volt at the input, two volts at the output. However, try putting 2 trillion volts at the input. You get sparks all over the place. You don't want to try this at home by the way because you could get damaged in the experiment. But it will definitely give a different voltage at the output than what you put in. There's also 2a, if you do experiments in the frequency domain, you put in one micro amps, you get out one micro amp, you put in two micro amps, you get out two micro amps. You put in two mega amps and you get sparks flying over the place, the wire melts and, again, you have something that's nonlinear. Anything you do will be nonlinear and so any circuit you make will be a mixer. Which is nice. That means you cannot fail to design a mixer. That's different, fundamentally different from an amplifier because it's quite well possible to design a circuit that's more than amplifier. Something that has again less than one, or something that oscillates those other harmful things. But mixers you cannot fail. There's just better mixers and worse mixers. That's not mixing. That's something that doesn't happen. Then the question is, how do we make a good mixer? Because we already know how to make a mixer in the first place. Let's look at how to make a good mixer. Let's start with a very simple mixer. Again, we have our input signal. Now we have also a local oscillator signal and we want to have output signal which contains maybe among other signal components, the difference and the frequency shifted version of the input signal shifted by the frequency of the LO signal. What we really want to do is we want to make a large conversion gain. What we want is a2 coefficient that determines the output amplitude of the some difference frequencies we wanted to be large. How do we make a Taylor series that really has a large a2 and very few of the other ones. Well, ideally, you do that by having an ideal multiplier. If I multiply the input signal with the LO signal, and I take the output of the multiplier and feed it to the output, the Taylor expansion of this just contains only the IN times LO. This really gives you only the x square plus two x_y plus y squared. Very few other components and really strong shifted signal, and I can make it stronger by making the amplitude of the LO signal larger. How do I do a multiplication in reality? Well, you can do that by, of cause there's another way of thinking about it, by making a circuit that has a variable gain. If we think again about amplifier, because that's something that you know very well, then you know that the output signal of an amplifier is the gain times the input signal. The difference now is that we have a gain that is a function of frequency. It's not just a regular gain, not an old fashioned gain, but it's really a gain that's a function of frequency. It's the LO signal. How do we make that? Well, let's try and make a very simple mixer that does this. To make a gain we're going to take a single transistor and we operate the transistor in the tryout region. It has an Rds. Then we're going to connect a resistor at the output, load resistor. This is the output signal. We have an input signal here. What we have now for our certain biasing of this transistor, we have this Rds and the R load and they're from, in fact, a voltage divider. We have now, the equivalent of this input signal and then a voltage divider, Rds, and an R load and an output. The output signal, in this case, is the input signal times R loads over R loads plus Rds. Now, if we would change Rds periodically, then we have achieved our goal. We have a very efficient conversion from the input to the output and forms of frequency shifts. We can do that by applying the Lo signal here, because that will affect the Rds dry-out region and that will cause this multiplication that we're looking for. Let's do that. Let's look at the circuit exactly like this, but now in the circuit simulator so that we can see what really happens. I'm going to open a circuit simulator, and this by the way, is a tool that's I'm now introducing for the first time in this lecture series as a tool of Mr. Paul Falstad, who has been very generous and making this tool available and of a very nice license to the world so anybody can use this. We're going to use it a lot in this course because I think it gives a very nice insights and very basic concepts of circuits, and it's fairly attractive, and also you can easily use it at home. The tool is on the website and all the circuits that we are using here are also on the website, so you can download them, simulation again. During the simulation, play with the parameters of the circuit and see how that affects the results. What do we have here? Well, we have exactly what we discussed before, we have this transistor, we have the input signal, in this case, 1.1 megahertz signal that represents the signal coming from the antenna, and we have an Lo signal, in this case, one megahertz signal, that is provided to the gate of the transistor and that modulates the channel resistance, the Rds resistance. At the output, we have this resistor that we discussed before. What I added this time is I added a capacitor. I'll show you a little bit later why that is. Let's first look at what happens. I've made the Lo signal fairly large because we want to have a large conversion gain, and I've made the input signal relatively small because that's what we expect in the receiver. Now, if I run this, you see that the output signal is somewhat of a mess. I didn't the timed domain, you see a lot of things going on, and when you analyze this, then you see that there's two frequency components in there. There is a frequency component of 2.1 megahertz, average is the sum of the RF and the Lo frequency. There is a slow variation in that, and that's the difference frequency, the end of kilohertz. But it's really hard to see here and to see it better, what you usually do in the receiver is something that we're also going to do here. That is to add some filtering to suppress the 2.1 megahertz to some frequency and to pass the low frequency, the difference frequency. I can do that by taking this capacitor and changing it from 10 picofarads to 10 nanofarads. Now you see we have to wait a little bit, because you can see immediately that the output signal becomes a lot smaller now that we have suppressed the same frequency. You can see that the output signal is now changing much more slowly, and that's what we expect, now the difference frequency is dominant. There are still a little bit of the same frequency there, you can see it now with auto scales, but you see now that the difference frequency is much more dominance, is much larger than the same frequency, and that's exactly what we want. We see in this concepts already with a very simple circuit, just a single processor, we can already make a maxim. However, you can make even nice a maxims. That's the topic for the next video lecture that we're going to look at after this. For now, I would advise you to look through the circuit. Look at parameters, play with them, see how they affect the output signal, and see what's the filtering does in suppressing the same frequency. For now and until next lecture, I would like to thank you for your attention and I'm looking forward to seeing you again during the next lecture. Thanks again, and see you next time.