Sometimes it is very hard to not get “the horse ahead of the cart”. Very often in projects and design as well as learning multiple things must be accomplished at the same time, yet one of those laws of nature is matter can only be at one place at one time. In this case the matter is me… and you… and our grey matter between our ears.
We have a few more things to talk about with frequency, gain, phase, and capacitors and inductors. However, we also did not complete talking about op-amps, so we have lots of unfinished business. But, since time and technology keeps marching on there will always be unfinished business. Tonight’s subject is a little more complete description about the frequency related gain and phase plots I started talking about in the post, “The importance of Phase in the frequency plots.”
In the picture I show a simplified control feedback loop. The red text describes one we are familiar with on a daily basis, trying to maintain speed in our automobile, especially if a policeman is right behind us. This process has been automated on most automobiles in the form of cruise control and that will become my introduction to a couple of more op-amp circuits that we have neglected. It will also be the foothold into a joking introduction into what calculus is about which I will call “good old boy calculus”. Don’t worry, it will be very light and you will not have to worry about those cobra looking things, integral signs, (∫) biting you.
In the diagram in the picture I show feedback from the final output being subtracted from the reference or set-point signal to give us the error signal. If you think back to op-amps (introduction to op-amps), this is exactly how an op-amp circuit operates with the feedback always coming back into the inverting input. Once we move from DC to AC we are dependent upon the feedback signal coming back to us out of phase with the input signal. However, as we now know, once inductors and capacitors are included inside the circuit phase shifts do occur. This happens in mechanical devices as well. For example, when we press the accelerator pedal on our automobile, the car does not immediately reach full speed. There is a time delay due to the inertia of the car. Inertia, capacitance, inductance, springs, etc. are just a fact of life so these phase shift will always be there. Often it is so small it is not a problem and often we can “work around” it. (Bigger and more powerful engines is often the favorite answer for overcoming automobile inertia.)
Imagine a circuit where we start with an inverting op-amp circuit. It then feeds a 1KHz low-pass filter that includes two capacitors such that it produces 180 deg total phase shift and a 40 dB per decade gain loss. This then feeds a non-inverting amplifier with adjustable gain. This in turn feeds some sort of circuit that produces a 45 leading phase shift at all frequencies and the output of this all is fed back to the inverting input of the first amplifier.
The gain and phase plot of this is shown in the 2nd picture. The red gain plot is exactly the same as the black gain plot except the gain has been increased by 40 dB. I have three vertical lines on this picture. The purpose of these lines is to simply connect important frequencies on the phase diagram to points on the gain diagram.
The first line we will talk about is the purple line. The purple line shows where the gain of the black gain graph drops to 0 dB gain (output = input voltage, Actually it never gets above 0 dB – this is not a very good example but the concept is still workable.) Tracing that point down to the phase diagram shows that we have about a 100 degree phase shift. This means that the amplifier is in no danger of getting at a point where the feedback input is back in phase with the output and we have oscillations. We actually have 100 degrees of shift to spare. This is called 100 degrees of phase margin.
The green vertical line is drawn at the point where the red graph crosses the 0 dB line. Following that down to the phase plot gives -30 degrees of shift. We have problems! We will have oscillations. The only cure is to decrease the gain to the point where we have an acceptable phase margin. Zero or a small number phase margin is probably not acceptable because even if the amplifier doesn’t oscillate, it will be “springy” and probably have lots of overshoot and “ring”. For a mechanical example, think of an automobile with bad shock absorbers going down a cobblestone road.
The final vertical line, the blue line, is drawn at the point where the phase line crosses 0. It crosses the black gain graph at -22 dB. it would be said that the black line has 22 dB of gain margin. Another way of saying this is we can increase the gain by 22 dB and not get into oscillations. (We may still have the ringing problem.)
Taking the blue line up to the red gain graph we have about 15 dB gain at the 0 degree cross-over point. We over did it! We could say we have a -15 dB gain margin, but mostly we would just say we have problem. if the gain is necessary at lower frequencies, we are going to have to figure out how to “have our cake and eat it too”, and that is the whole challenge involved in designing things.
Hopefully I have given you just the right amount to make this understandable. Very soon I will finally do the 2nd video on the op-amp datasheet and it will include the phase margin term in it. Now you are armed with the information to understand the importance.
If you found this post educational and hopefully a little entertaining, please consider subscribing to this blog using one of the icons on the home page or the e-mail subscription form at the bottom of each page.