I'm trying to design a controller for a boost converter by the "shaping loop gain" method as in the Fundamentals of Power Electronics textbook by Ericson and Maksimovic.
I see that there is a RHP Zero, which if we have just a unity feedback system makes it unstable, so we need a controller of say Gc transfer function.
Now I chose the desired crossover frequency, etc. for Gc, but unless I add an RHP pole to cancel out the RHP zero, the system is always going to be unstable. Can I have my controller to be just a lag compensator?
EDIT 1: This is my loop gain when there is no controller, only the plant transfer function is being plotted :-
Now I want this to be operating at 20 kHz switching frequency, so I need to move the gain crossover frequency, and I set it to 3 kHz. To do this, at present the plant gain at 3 kHz is 20.23 dB, so my compensator should have a -20.23 dB = 0.097 gain. I set my pole at
$$ \dfrac{fp_0}{3000} = 0.097, fp_0 = 292.16 Hz $$
So my compensator is $$G_c = \dfrac{2\pi(292.16)}{s} $$
While this does move my GCF to 3 kHz, I get a weird gain margin which I don't understand how to proceed with the design.