[MUSIC] Welcome dear students. Today we are going to talk about a really exciting type of circuits, namely oscillators. And you might wonder why are oscillators so exciting? Well, they are fundamentally different from circuits like amplifiers and mixers. And they're fundamental in a way that's some of my colleagues compared to the difference between, let's say stereotypes of students. The stereotype of the common students, which is of course, completely false, but still, that's why the stereotype is that students are very passive, right?. You need to push them for anything to come out. And so they make this analogy with most electronic circuits. No noise amplifiers, power amplifiers, mixers, filters, all of these circuits you need to provide some input before anything comes out. Again, as I said, the analogy with students is completely false. All the students I've worked with are extremely active and take lots of initiatives and so on. But the difference between circuits is real. Oscillators are the one kind of circuit that really takes the initiative without being taught a generates a signal, even without having an input. And that's really exciting and it's useful as well. Because sometimes you need the signal on the chip that is not provided from the outside. So you need to generate it on your chip in your circuit somehow. For example, if you need to drive to local oscillator input of a mixer, you don't always get a convenient signal from the outside. Very often, you have to generate it on the chip. And, oscillators are a perfect circuit to do that. Of course, the name local oscillator sort of implies that it's common way of doing it, but still it's true in this case. So, let's go back to the basics of oscillators and see how we design circuits like that. Just a quick recap of things that you already learned during your bachelor years, at least for most of you. So what you learned is that oscillators usually consist of a loop. And in that loop you have a forward path, that is an amplifier and a feedback path, that is a frequency selective circuit. And they are connected in a loop that is the output of the amplifier that is connected to the input of the frequency selective circuit. And the output of frequency selective circuit is connected to the input of the amplifier. We label the gain of the amplifier A, and we label the gain of the feedback circuit beta. And since as you can see selective beta as a function of omega. Now we have loop gain in this loop, sorry Doulas being a little bit too smart for me, a loop gain. And that loop gain obviously is the gain of the amplifier times the gain of the frequency selective network. In order to sustain an oscillation in such a loop, we need two conditions. One condition is that the signal if it goes once through the loop is still the same amplitude. And that's necessary because if that would not be the case then the oscillation would not be stable. If the loop gain would be smaller than one, every time the single would go through the loop, it would become smaller and smaller and smaller and smaller and smaller, and it will asymptotically go to zero. Not very useful, at least not for a long time. And conversely if the loop gain is larger than one, then every time that you go through the loop the amplitude becomes bigger and bigger and bigger and bigger. And now I need two hands and get still bigger and then at some point my arms are not big enough anymore. And then after a while the universe explodes, which is also not a good thing. And so you really want to have this loop gain, the value of that absolute value of that to be exactly 1 to have a stable, sustainable oscillation. The other requirement that you need is that whenever the signal goes through the loop and for example comes out of the amplifier. It should fit seamlessly with the single that came up out of the amplifier just before. That means that going through the loop should delay the signal by exactly an integer number of periods of the signal. That means that the phase shift going through the loop should be an integer number of 360 degrees, And as an integer in this case. These two conditions together are necessary to have stable oscillation and they are named after Mr. Barkhausen who was the first to formalize these requirements. So, let's see, does this Barkhausen in real life as well? Well, let's see, we this circuit here and the tool of Mr. Barkhausen. And what I've done is I have a amplifier here. I've set the gain of that amplifier to be very close to 1 within 0.1%. And I have a frequency selective network consisting of this resistor, this inductor and this capacitor. This frequency selective network as a transfer curve with an amplitude that is less than 1 for all frequencies except for the resonance frequency of the LC. Because at that frequency, the LC together form an infinite impedance. And the gain of the feedback network is also exactly 1. That means the loop gain at exactly that resonance frequency is 1 and it's less than 1 everywhere else. So if there's one frequency where we can sustain oscillation, it has to be at the resonance frequency of this LC. It's not a guarantee that there will be oscillation but is a requirement, auto-oscillation should not be possible. Now what frequency do we expect? Well, actually, let me get a calculator. It should be 1 divided by 2 times pi times the square root out of 1 times 10, e -6, right, L times C. And that is something I think I did wrong. Yes, I did wrong, so let me do this once more, because it's not the answer I expected. It's 1 divided by the square root of 1 times 10, e -6. And that square root should be multiplied by 2 times pi. And this time I get the answer I was expecting. I get a frequency of 50.35 Hertz. So let's see whether that really happens. I'm going to reset the circuit. I'm going to start the simulation. And then we see that nothing happens yet. So I'm going to speed up the simulation. This is something you cannot do in real life, but it's really useful. It's one of the nicer things of oscillations that you don't have to wait, For a stable oscillation to occur, you can just speed up the simulation time so that it actually happens and you see indeed, we have now an oscillation that is stable. And we have a frequency that you can see here and the top left corner of 50 points are free. Well between two and four, so around 350 points rehearse so the circuit is doing what we expect and we see the theory confirmed. The circuit like all other circuits in this video series is on the website so you can try it yourself and you can see what happens if you change the value of the inductor and the capacitor, or if you change the loop gain, because there's another thing that he could try. It could, for example, make the loop gain larger and verify that the universe explodes or something similar horrible. So I'm going to make this Now for example, 1 kilowatt hour and so the loop gain becomes 2 and you see immediately that the amplitude goes up and up and up. And now, just before the universe explodes, you see that the capacitor exceeds the mark maximum reverse voltage. And, in fact, if you will build this circuit, the capacitor would explode stopping the oscillator long before the universe explodes, which is a nice benefit still, exploding capacitors are not nice either. So later in this video series we will discuss how to stabilize the amplitude and how to get the gain exactly one. For now you have to do that manually by making sure that the gain of, of this loop is exactly one so, let's get back to our theory. We now know how to make a stable oscillation, now we need to think of a circuit to do that because we want to design at the transistor level. So how would we make a circuit that generates this kind of function? Well, we already see that we did the beta function with an LC circuit, but we could equally well have used RC or we could have used some ceramic filter or crystal, anything that we can see selective and forward game? Well, we know how to make fun of a game right? We have already had a lecture about low noise amplifiers and power amplifiers and so on. So we know how to make amplifiers and so we're going to look at a few circuits that implement oscillators and first one is a fairly famous one that is copus oscillator. And what you see here is an amplifier together formed by this transistor and this was so and we have a feedback circuit consisting of this resistor and an LC tank formed by this capacitor, this capacitor, oops, should put it back and there's an inductor. So very much like the original design, except here we have added a function that forces the output signal of this feedback circuit to be negative the gain to be negative because this amplifier actually has 180 degrees phase shift. Our feedback network also needs to handle the 80 decrease phase shift and we do that by making the L there the sea and two paths grounding it in the metal. And therefore, because of symmetry, we can ensure that the output voltage is the inverse of the input voltage of the feedback circuit. So let's try whether this works and you can see that it takes a while to get started. But if you wait long enough then you can see that we get a deed a small variation in the signal that goes bigger and bigger and bigger over time. And then become stable and indeed here we have a stable oscillation again, you can see the oscillation happening mostly in the LC tank. You see the girls moving there and you can see that the amplifier is biased at voltage rail there. Is a steady current flowing through the amplifier, and therefore we have a GM that ensures that we have a forward game. So, this also works and if you wait long enough, then amplitude becomes bigger and bigger because forward gain the loop gain is slightly larger than one. But if we wait fairly long and again I can speed up the time that you can see that in this case the universe does not explode in fact, not even the capacitors explode and why is that? Well, that's because when you look carefully you can see that what we get out is not the same wave anymore. We have a signal that is, well a little bit sine wave but it's very flat at the top and it's very flat at the bottom. And the reason for that is that the output signal of this amplifier cannot be larger than the power supply voltage and cannot be smaller than counts. And therefore, we see that if the amplitude of the oscillation becomes bigger and bigger and bigger, at some point, the output of the amplifier does not go anymore and you go to a stable situation effectively, the gain of the amplifier decreases the effect of gain. Because the output does not increase anymore whereas the input still increases and that continues until you have an effective gain of one for the complete loop. And then you reach stability, the price you pay for that is non-linearity so normally the LT is one way to achieve a stable oscillation to meet the bank housing criteria. And the Barkhausen, as I mentioned, are just a way to ensure that you can only have oscillation at this one frequency, but it's not a guarantee that that oscillation happens. Now, why does oscillation here and in a previous circuit actually happen? That's because for small signals the loop gain is actually larger than one. And if the loop gain is larger than one, then any signal at all will actually cause the oscillator to finally oscillate at the one frequency that's that you're interested in because any signal at all as long as it has At least a little bit of a frequency component oscillation can be stable according to Mr. Barkhausen. Then at that frequency, you will see oscillation hence, although in the lecture about mixers and low noise amplifiers and power amplifiers, we've seen noise as something negative, is something that you want to suppress within an oscillator, it helps to get the oscillation started. Even if you don't do anything special, then the oscillation will start basically, because there's always noise and white noise contains all frequencies. And so also the frequency that you want to isolate that and as long as your gain is larger than one, then your oscillator will eventually start It might take a long time, you can start again. And I can show you that candidates take a long time for this oscillation to happen but eventually it gets there. If you're not the patient type, and sometimes there are good reasons not to be patient for example, if you make a deceiver That, after switching it on, very quickly can be used. Then you might want to do something extra, you might not want to rely purely on noise. And so one thing you can do is you can introduce a very good signal to get the oscillation started. And you can do that in two ways. You can end the loop like this. You can introduce exactly the signal that you want, so you make exactly the same that you want. And then you introduce that when you switch on the oscillator. And then, once that signal has gone once through the loop, you open up the source, and the oscillation continues. However, there's a lot of effort because, essentially, to get to oscillator started, you need something very similar to a perfect oscillator. And so you get into this recursive design loop where to start this new oscillator, you need a third oscillator. And to start the third oscillator, you need the fourth oscillator, and you will never finish designing. To avoid that, you can also say, well, I don't need to make the exact signal. I just need to make sure that I generate the signal that contains the signal, the frequency that I'm interested in. And so if you make a circuit that generates a lot of noise or anything else with a wide spectrum. For example, something with a very narrow pulse in the time domain, and a frequency domain, a spectrum that is very wide. That is guaranteed to contain the frequency component that you're interested in. That also will very quickly start your oscillator. And that's not just useful if you're the impatient type that doesn't want to wait after you spend on something before that it starts working. But it's really important for modern communication systems because many modern communication systems, thay transmit their information in packets. And if you need to switch on your oscillator sometime before you can start receiving or transmitting a packet, then you waste a lot of power getting the oscillator to become stable. So adding something like this can really be very useful. And we will see that there are multiple ways of achieving that. Now, we've seen this Colpitts oscillator, and we've seen that it starts this way, already from the noise. Or from, actually in this case, also the fact that you switch on the power supply. But what you see in here is that it has a lot of passive components and just one active component. And you might remember that passive components are expensive and the active components are cheap. So why do we make these oscillators this way? Why is Mr. Colpitts and very similar circuit for Mr. Hartley, why did they become so famous? Well, that's because in the old days when we did not have integrated circuits yet, it was the other way around. Possessors were very expensive and passive components were cheap. So in those days, this type of circuit made a lot of sense, because overall it was cheaper than something that had modern sensors in there. But we live in 2020, and hopefully long beyond, and now ther roles are reversed. So we'll look at circuits that have more transistors in there to give us better functionality. And one of those is called the cross-coupled oscillator, it's very popular basically because it's a balanced oscillator. And a balanced oscillator has two nice features that are linked. One is that it provides a balanced signal that has two outputs. And that's nice because, as you know, we like balance circuits that prevent high frequency signals from getting into the supply and account. And therefore for example, is double-balanced and providing the L01 and L02 signals to balance the signals to the input of the mixer. Requires having an oscillator or these oscillator plus buffer that gives you this type of balance signal. So for that reason this is already nice. And the second nice thing is and since its circuit itself is balanced, it also keeps the oscillator signal [COUGH] away, my apologies, gives it away from the supply and from the count. So, how does this work? Well, again, we have the LC tank that you see here. And now we have loop gain going from this side of the LC tank to this transistor that amplifies, it feeds into the other side of the LC tank. And the other side of the LC tank is amplified and fed into the left side of the LC tank again. And that way we get a loop gain, every transistor gives us shift. But we solved that by feeding the outputs of that transistor into the other side of the balance circuit. And so we need it under there to decrease. And since we have two times 180 degrees, we have exactly 360 degrees loop gain. So this circuit should exactly do what we wanted to do, and we're going to check that now. So, I'm going to start this oscillator. And again, we will have to wait. And you see that also this one starts up nicely. And after a while, and we can also speed this one up, You can see that this one also becomes stable, which is nice, right? Because that's what we really would do like about oscillators. You see that this one becomes stable without having as much distortion as previous circuit. And the reason for that is that the loop gain of this circuit is not that much larger than 1. And that's depends on the way that you design it. But if you make your loop gain not much larger than 1, you don't need much distortion from the amplifier. You don't need to put it much beyond the clipping point to get the effective gain back to 1 again. The price you pay is that it starts up slower, but you get less distortion at the output, and that's really a nice property. You see that this differential pair is fed by current source which now I've worked out in more detail. It consists of this bias current source transistor that feeds to current from its drain, and I have added a bias voltage and degeneration resistor. We have not discussed that yet, but this degeneration resistor you might remember from earlier lecture set you have had in your bachelor that serves two important purposes. One is that it reduces the noise that you generate from this current source, because it acts like a form of feedback. If there is noise and is current that goes out, that same current that goes out of the transistor at a drain, has to also come from the source. And so let's say that momentarily the current is slightly too large, then that two large currents will generate a large voltage drop across the 1 kilo ohm resistor. That will increase the source voltage and therefore decrease the gate source voltage. And that's where you have your feedback, your negative feedback. That lower gate source voltage will result in a smaller drain current, and therefore will counteract any variations in drain current. So that's one really nice property. The other nice property of this resistor is that it makes your circuit much less sensitive to resistance and the ground wire. If you don't have that, then a small variation, a small resistance in the ground wire between this transistor and the bias voltage. Will result in a change of the bias voltage that will immediately result in a change and the current through the oscillator. And that's something we don't want because it changes the gain, and therefore also distortion and behavior. It might in fact make the gain just below 1 if you have carefully designed to be just above 1, and therefore the oscillator might not start at all. So adding this resistor, this degeneration resistor also serves to make the current source less dependent on any resistance in your ground wires. Which I'm sure you will find out somewhere during your career, it's a really nice property to have. Okay, that [COUGH] completes this lecture on the oscillators, I hope you've enjoyed it. There will be a follow-up lecture where we look at how to make these oscillators tunable. But for now, I hope you enjoyed this. And I would like to thank you for your attention and look forward to seeing you next time. Thanks again. [MUSIC]