# Controller to increase phase or gain margin

I can't find any good sources on this one. The only textbook I have says nothing about it. I've been restricted to the use of some formulas given by our teacher which I don't understand why they achieve the increase. He didn't want to work much on this kind of controller due to the little time we had left.

So how do I go about designing a controller which increase the gain or phase margin?

One thought: The gain margin is the gain for which the system is critically stable. Therefore moving the dominant pole further away from the origin could help increase the gain margin. As for increasing the phase margin to a specific value I have no idea. Phase margin is my main concern to be honest.

• To add to verbalkint's fine answer, remind yourself how you treat a zero on a rootlocus plot (one of the poles is pulled into the zero) so when chosen appropriately you can ensure a pole at DC (an integrator) is pulled into the left-hand plane. Commented Sep 21, 2017 at 14:33

There are plenty of compensator types you can think of when attempting to compensate a given plant. First off, you need the plant dynamic response. This is what is called the control-to-output transfer function. From this response, you can infer what compensation strategy is needed to fulfill your goals. Basically, at least in power electronics, there are three compensator types: type 1, type 2 and type 3. They can be built around an active amplifier like an op amp, an OTA and a shunt regulator (TL431) for instance. The below picture shows you what they can do in terms of dynamic response.

You select the type by knowing the amount of "phase boost" you need to meet the phase margin criteria. The phase boost is the amount of positive phase lead you need to compensate the lag incurred by the power stage at the selected crossover frequency $f_c$.

A type 1 is a simple integrator. It features a pole at the origin and lags the phase by 270°. There is no boost. A type 2 combines a pole at the origin and a pole-zero pair. By adjusting the distance between the pole and the zero, you adjust the boost up to 90° in theory. Finally, a type 3 adds another pole/zero pair to the original type 2 and lets you boost the phase up to 180°. I have a complete seminar on the subject of compensator that you can download here and a book you could consider for closing the loop is this one. Good luck with your project!

If you want to increase the gain, then you should first analyse the control loop by injecting test signals, like sweep, PRBS, ...then you draw the Bode plot. If the system has a resonance frequency, then you might introduce a notch filter, that suppresses that frequency band.

To me, it is the only known way to increase the gain: adding the correction filters.

Basically you need to design a PID compensator.

This subject is called controller design and it's covered in the field of power electronics. My personal text book is "Fundamentals of power electronics" Ericson, Maximovic. Check chapter 9 "Controller Design" there is an example how to design your PID compensator for a buck converter. You should be able to use any other book on the same topic. Also you can genarally use a microcontroller to do the same job.

The other posibility is to hire someone to design you the compensator. I think you can find online easily a freelancer to do that for you almost for free.