Mod-11 Lec-31 Phase locked loop basics

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hello and welcome back to CMOS radio frequency integrated circuits. So, we are now in the eleventh module and we will be discussing frequency synthesis as part of today’s lecture we are going to talk about phase locked loop basics in the last class I kind of tried to motivate the need for something. So, we want a pure frequency we cannot tolerate any phase noise we need this frequency to be agile and accurate now, as far as the pure frequency part goes and as far as accuracy goes quads crystals are very good. They are not as good as atomic flux, but they are very good I can further use some sort of synchronization technique on top of the quads crystal to be as good as an atomic flux, but they are very good I like quads crystals as far as pure frequency is concerned as far as the accuracy of the frequency is concerned. As far as agility is concerned the voltage controlled accelerator is very good, it is agile, it can move around, it can change frequencies of course, with no knowledge what that frequency is this huge error in what you designed and what you get it could be twenty percent error. You might want a capacitance of 1 pico farad instead you might get 1.2 pico farad you do not know what you are getting you are getting some approximate value when you design when you do some layout you get some approximate value the precised value could be hugely a half from the value you designed for... So, as far as agility is concerned we see always good, but as far as the spectral purity is concerned as far as the accuracy is concerned the quads crystal is what I want. So, I need a way I need a technique to combine this two. .. Now, as part of my plan the first step is to study something called phased locked loops. So, the idea for a phased locked loop is there a way I can mimic the oscillation of a quads crystal of reference frequency we are going to called it the quads crystal, reference frequency. So, I have a reference oscillator I want to mimic this reference oscillator with an oscillator on chip. So, this is part of my plan and to do that I need to build a control system that tracks the phase of the reference oscillator remember the noise is in the phase, phase noise. So, I need to track the phase of the reference oscillator and I need to built a control system that drives my VCO. VCO is the plant and the phase of the VCO output of the VCO is oscillation, the phase of that oscillation should mimic the reference phase. So, I need a feedback system. So, the control system is going to compare the reference phase with the phase of the VCO and it is going to control the plant, the plant is the VCO. So, this is the control system that I want to built this control system is a called phased locked loop this whole thing this whole scheme of things is called a phased locked loop. Now, let us start to understanding a few thing over here, the first thing to understand is the property of phi ref phi ref. So, this phi ref is what does it look like. It is the phase of the reference oscillator now, the reference oscillator is always oscillating it is the crystal oscillator the quads crystal. So, the reference oscillator is always oscillating in this fashion and its phase that is the input to my control system what does its phase going to .look like so let us say let us assume that the phase at this point of time is equal to 0 degrees. Let us assume we have to start from somewhere. So, let us say that at that point of time the phase is 0 degrees. So, at this point of time the phase is going to be 360 degrees rather 2 pi, and then you can conceive of the phase going linearly as a function of a time and this point of time its 4 pi over here its 2 pi over here its pi and so on and so, forth 6 pi 8 pi and so on and so, forth you could also thing of it as a saw tooth wave form, but that is too complicated it is not necessary I mean. Two pi an angle between 2 pi and 4 pi is the same as a angle between 0 and 2 pi. So, you do not have to think of it as a sawtooth wave form you can think of it as a ramp. So, that is the keyword over here this phi ref looks like a ramp. Now, if you have studied control theory have you studied control theory I am sure you have studied control theory in your under graduate to some extent something you must have studied this is a core topic as far as electrical engineering is concerned. So, if you remember your control system there are different varieties of control system position control system, velocity control system. So, just you have the arm of a tank, you are a tank over here and your target is over here. So, you have to control the angle of your tank gun. . So, that it points accurately to the target, if your angle is off by even little bit then your tank is going to not hit the target. So, here you are controlling the angle or rather you are controlling the position of the tank gun. So, this is a position control system now, think .of the following that this target is moving this target is not a static target. So, this target is hovering around between here and here, and you have to point your gun in a way that tracks the movement of your target you have to keep tracking the position of your target this is a velocity control system your tank gun has to oscillate has to move around between these two points and accurately track the position of the target, may be your target is not oscillating like that may be your target is just moving from one point to another, in which case once again your tank gun has to follow the precise position of the target. So, this is called a velocity control system. Now, as far as we are concerned the input that we are trying to track over here is continuously changing its a ramp, the control system that we have to built has got to be a velocity control system. So, this is an important property of the control system that you got a bit. So, with this background let us try to built something what is a velocity control system? You do not remember we will come to it. . Let me give you a filler I do not want to be teaching control theory here, but let me just give you a filler of a what we are talking about suppose the input is a step going from 0 to 1 that is not the characteristics of our input, but suppose it is in any case this particular control system has again. This is the input this is my output the gain output by input equal to A by 1 plus A, open loop gain divided by 1, a loop gain divided by 1 plus 1 minus the loop gain. .The open loop gain divided by 1 minus the closed loop gain this is the output by input for this particular system now, if your input is going from 0 to 1 and you have got A equal to 5 say A is 5 in that case when the input is going from 0 to 1, if input is 1 then the output is 5 by 6 and that is no good, because your tank gun has to precisely point at the target and it cannot be off by a fraction of a degree even. Make A large, if A is one 1000 high gain amplifier even then the output is 1000 by 1001, which is not good, because the tank gun has to point perfectly at the target not almost the target. So however, high the gain of your high gain amplifier is not going to do a good job. So, what do we do now, next step suppose you put an integrator basically you integrate the error signal, if the error signal anything, but 0 then the integral of the error as a function of time is going to be infinitely large, infinitely large means that the output is going to be infinitely large, inconceivable therefore, the error signal has got to be zero. So, that is the hypothesis. Let us see what how we analyze this the integrator is has a transfer function of 1 by S, transfer function of 1 by S means that the open loop gain as well as the closed the open loop gain is A by S; that means, that my output by input is A by S divide by 1 plus A by S, which is equal to A by S plus A, which is equal to 1 by 1 plus S by A. So, this is the transfer function your input what is your input u of t, the laplace transform of the input is 1 by S. . .So, if your input is 1 by S your transfer function is 1 by 1 plus S by A then the response is going to be 1 by S times 1 by 1 plus S by A. Let us let us say this is x of t this is y of t, Y of S is 1 by S times 1 plus 1 by 1 plus S by A and you can break it up into partial fractions, if you break it up into partial fractions you are going to get K by S plus K 1 by S plus K 2 by 1 plus S by A. Now, as a time t tends to infinity let us do the partial fraction break up, if I multiply both of these by S then I am going to get 1 by 1 plus S by A is equal to K 1 plus K 2 by 1 plus S by A. Now, if I plug-in s equal to 0 then I have got K 1plus K 2 is equal to 1. Next thing is multiply both sides by 1 plus S by A and you have got 1 by S is equal to K 2 plus, and now plug-in S equal to minus A, if S is equal to minus A then second term goes to 0, and K 2 is equal to minus 1 by A that is here partial fraction break up now, what does this mean? This means that the response is equal to u of t, and what is 1 by S plus A this is equal to u of t times e power minus t by tau as time t tends to infinity I get 1 and I get 0, which means I get exactly equal to 1 so as time t tends to infinity the output of this position control system this is a position control system is precisely equal to the input. This is what you are going to see at the output the long analysis for something. So, simple, but you need to understand what is going on now, if my input is not 1 by S, if my input is unfortunately 1 by S squared that is a ramp then what you are going to find is that position control system will give you an offset. .. Let us just check for that, if your input X of S is equal to 1 by S square then the output is going to be equal to 1 by S square times 1 by 1 plus S by A, and if you want to do partial fractions for this, this is going to be equal to K 1 by S square plus K 2 by S plus K 3 by 1 plus S by A, and you can work out K 1 K 2 and K 3 what you are going to find out is that all 3 of these is going to non-zero. All 3 are going to be non-zero, which means hopefully K 1 is going to be equal to be 1, I am not going to do the mathematics here, but what you going to see is 1 by S square plus K 2 by S plus K 3 by 1 plus S by A. Now, K 3 by 1 plus S by A as time t tends to infinity is going to boiled down to zero, K 2 by S is going to be K 2 times u of t as time t tends to infinity it is going to be equal to K 2 and 1 by S square is the ramp that you want to track. So, what is the result as time t tends to infinity this term will drop out to 0, the second term will be a value equal to K 2, which means that there is an error there is going to be a constant error of value equal to K 2. Of course, you do the partial fraction break up properly you get the exact value of K 2 what I am saying over here is that K 2 is not going to be equal to be zero definitely not we are going to find out do this as your homework exercise prove to yourself. So, what this means is that if I make or trivial control system opposition control system and the input is not a position the input is a ramp then the output is no longer going to be able to track the input it is going to kind of do it with an error there is going to be a lack .what does this means for us our control system over here is trying to do velocity control here the input is constantly changing the input is a ramp and that means, I cannot built a simple position control system with 1integrator over here. . This is what we are trying to get out let us get back to our point of business. So, I have got reference phase and I have got a plant, the plant is the VCO it is generating output phase in response to a controlled voltage. Now, we did not started the VCO like this did we know we said that the VCO generates a certain frequency of oscillation in response to a certain voltage. So, when we started the voltage control oscillator we said that if I plot control voltage on the x axis then the oscillation frequency will have some characteristics something like this probably other way around it does not really matter. So, the frequency is a function of the voltage not really the phase let us say lets arbitrarily say that our VCO does not looks like this our VCO looks like this does not really matter, but hey let us say it is a linear function of the voltage of the controlled voltage. In that case what is the phase it is not difficult to understand that the phase is the integral of the frequency, the phase at a time T is equal to the integral of the angular frequency starting from zero let us say the reference the phase at time t is equal to is 0 to the current point of time. That is the phase, which means that phi of S going to look like this now, I am saying that this omega of S let us assume that omega of S is equal to some constant K times V .control, which means that omega of S is equal to K times V of S; that means, that particular plant the VCO can be modeled as something that is of this nature the dimensions of K. So, here you have radians per seconds here you have volts. So, units of K are radians per second per volt. So, that is a kind of plant that I am trying to control the plant itself is some kinds of an integrator this is something that I need to understand the plant is by itself something that behaves like an integrator. So, I have got an integrator built ten to my plant wonderful. Now, a typical control system you need to compare the output with what you have got the reference, you have to compare the reference it is the input with the output so there target is phi ref should be equal to phi out rather phi out should be equal to phi ref, that is what you want right. So, you compare the two and you create an error signal. So, you want to compare the phase of the reference oscillator the quads crystal with the phase of your VCO. So, this is called a phase detector this is not an ordinary subtraction this is no ordinary subtraction you are comparing the phase of the reference signal with the phase of your output this is not the voltage of the quads crystal minus the voltage of tau be very careful about it in response, you are creating a voltage, and then this has to go through some sort of loop filter. And generate V control now the transitions between my control systems. So, I have first I have just a high gain amplifier then to do position control I need to put an integrator, if I want to do velocity control I should be put I need to put in another integrator into the loop that is basically the hunch that you probably need to put another integrator now, unfortunately if you do put an another integrator strange things will happen to the loop the loop will become unstable why.. Why will the loop become unstable, because the loop gain is going to be equal to A times minus A times 1 by S square you have got two integrators and A. So, your loop gain is minus A times 1 by S square the denominator of your total transfer function will be 1 plus the loop gain, which means 1 minus the loop gain, which means that your denominator will contain something like 1 plus A just wait instead of trying to do it orally. .. If this is your system then the denominator will have 1 plus A by S square, which means that the denominator contains this and this has two poles on the j omega axis, where are the poles. So, this kind of system is not going to be stable. So, you cannot put two integrators in the loop just like you have got to have method over here that is why you need to open your control theory book. . So, the general idea for our phase locked loop is this I need a phase detector then I need a loop filter, and then I have got my VCO, which is modeled as K by S. So, this is the .general idea now, the first building block that I need is the face phase detector I am going to focus on that now and we are going to do the loop filter in the next class hopefully, hopefully I will be able to finish the phase detector today, with the time that I have. Now, this particular phase detector no ordinary subtraction that is being that is going on you have to understand first of all that what do the voltages look like what does phi ref really look like the reference input is just square wave digital square wave. What about the reference output the ref not the reference output the VCO output the hope is that the VCO also generate such square wave that is what you want to do you want to get rid of amplitude noise going to reduce noise in your system you want a square wave as the output of your VCO now, you might not get it that is a different issue all together, but the hope is that you are working with square wave. So, let us try to work with a square wave. So, really I am not going to call this phi ref anymore I am going to call this V ref is the voltage corresponding to phi ref and the voltage corresponding to phi out. It is probably something like this as a function of time and what is the objective the objective is to find out the phase difference between the two. If phi ref is more than phi out then you need to give a positive result, if phi out is more than phi ref you need to give a negative result that is the objective got two digital signals is it possible to give a digital circuit that will give a digital output as to what the phase is the inputs are digital why cannot the output be digital too. Circuit should be completely could completely be digital conceivable inputs are already digital in nature is it possible, what you think what could be generating the phase reference between the two when the two are same when both are…. Let us take a look over here what is the output that you want, you want an output that is proportional to the time gap between these two edges, the EX-OR gate an EX-OR gate can do the job seems like an EX-OR gate can do the job let us just see, if I do EX-OR of V ref and V out when V ref and V out are different it will give me a 1 when they are same it will give me zero, and if you take the average over a cycle it is kind of proportional to the phase difference between the two thing this works it does not work why it does not work is that it makes no difference as to, which side is positive and which side is negative or whether you are doing V ref minus V out, phi ref minus phi out .or you are doing phi out minus phi ref makes no distinguish it does not distinguish. So, as results you get something, which is proportional the duration of the pulses are proportional to modulo phi ref minus phi out, if phi ref and phi out are out of phase by 180 degrees then the output is always one. So, that kind of tells you that on the average, if phi ref minus phi out is 1 radian then the output is going to be VDD by pi. So, pi radians gives VDD, 1 radian will give VDD by pi, but of course, the characteristics of the phase detector is like this. So, this is what an EX-OR operation we will do I do not want this, this is not good it is not really this is what I wanted something of this nature is what I wanted not this module of its not what I want it is it will kind of work. When the system is bio stat this point when the system is bio stat that point I will get correct results, but I want to be over here I want zero phase. So, in general if you do use EX-OR gate as a phase detector you can use it you are going to find that the loop locks at a phase difference of pi by 2 or minus pi by 2. This is something that you will observe we do not want to make a, such phase detector. So, it kind of works not quite lets again see what I want first of all I should not be caring about both edges I mean the duty cycle of my two clocks could be different. So, it is unreasonable to compare both rising and falling edges. . So, that is also something you have to keep in mind that you do not necessarily want to compare both rising as well as the falling edges. So, this is what I want lets modify myV .out a little bit. So, if V ref is ahead of V out rather, if phi ref is more than phi out then my desired output should be positive during that duration, if phi ref is lagging behind phi out then my pulse should be negative during that duration. So, this is the kind of output that I want from my digital system. So, your system has 3 outputs 3 possible levels it should have a 0 it should have a plus 1it should have a minus 1, which means that you need at least 2 binary digits to represent the output the output code you need 2 binary digits you cannot do it with 1 digit with 1digit you can do 0 and 1, you need 0 1 and minus one. So, you need 2 binary digits to represent the output this is observation number 1. Observation number 2 is that you do not want combinational logic here you do not want to work at the you want to ignore all of this, which kind of means that you need to built some sort of sequential logic, if you want to built sequential logic you have to start with state machine state machine diagram. So, let us try to built a state diagram for this kind of a system. So, I am going to start with the 0 state and when I am at 0 state. This is my 0 state, if there is a rising edge on V ref then I want to output plus 1 this is the state when the output is plus 1, and then as soon as a rising edge of V outcomes I want to go back to the 0 state again when V ref rising edge comes I will generate plus 1, V out rising edge comes I will generate minus 1 I will go back to 0. Now, while I am in 0, if a rising edge comes for V out then I want to generate minus 1, and then after that while I am in the minus 1 state, if the rising edge for V ref comes I want to return back to the 0 state. So, this is the state diagram of the phase detector it is kind of strange digital system the events over here are the rising edges of V ref and V out those are the events, there are 3 states the inputs are basically the rising edges of V ref and V out strange kind of a state diagram now, 3 state means you need 2 flip loops to built the system. .. And what I am going to do is I am going to just go ahead and draw the system it is not terribly straight forward to design it from scratch. So, I mean it is going to take lot of time. So, I am just going to go ahead and draw it. So, at the rising edge of V ref, Q becomes equal to 1 this is the code for plus 1, and then at the rising edge of V out this Q is going to be equal to 1, but I do not want the 1 to remain as soon as such an events happens I want to clear both of the flip loops as soon as both the output are one. Then again if V out goes high then this particular output becomes equal to 1 that is the code for minus 1 and as soon as that happens my output is minus 1 then V ref comes plus 1 becomes high an as soon as that happens clear as activator, and both signals becomes zero. So, this is kind of circuit that our phase detector is and this is what is used all the time. So, small bits of variation here and there, this is what is my phase detective? This is the final circuit you have to remember that these flip flops need to be design the clear etcetera may be its clear bar in, which case you have to make an AND gate all those considerations you have to keep in mind this is what is used in most phase locked loops we are going to stop here, and in the next class we are going to continue with the next important block that we have got over here that is the loop filter. Thank you. .
Info
Channel: nptelhrd
Views: 55,597
Rating: undefined out of 5
Keywords: Phase, locked, loop, basics
Id: XNWY857rdQo
Channel Id: undefined
Length: 56min 41sec (3401 seconds)
Published: Tue Jun 26 2012
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.