How to compensate this circuit? [closed]

I'm using the circuit above to control the common-mode voltage of the 2 resistors. M16 is a current source. The OpAmp controls common-mode voltage by adjusting the resistance of M20.

I need to adjust Vcm quite fast (I need a bandwidth of 5MHz) and the circuit tends to oscillate if I do so. So I tried to find the poles in the feedback loop and to place them properly. However, the only pole I could see is the one at the gate of M20 - $$\ \frac{1}{2\pi R_{o} C_{gg}} \$$ (but I didn't see this pole on the bode plot of the loop gain...) So where are the poles, and how can I compensate this circuit? (The GBW of the OpAmp is 1000M and DC gain is 100dB, Ro = 10 Ohm. Cgg of M20 is about 6fF)

I also attached the bode plot below, there are two poles according to the figure - one at 10kHz and another one at 10MHz.

• There is a low pass formed by drain source capacitance of M2 and R3. The required 5 MHz bandwidth with this large value of R3 is a problem. What is Cout of M20?
– Jens
Feb 22 at 1:34
• From the GBW of your op amp and the DC gain it has the first pole roughly corresponds to the 3dB (dominant pole) of the op amp and the second pole could be coming from the contribution of the op-amp internal nodes, input capacitance and drain capacitance of M16
– snEE
Feb 22 at 1:37
• What's the nominal DC voltage of your V2 source? Feb 22 at 13:43
• @Designalog It's 750mV, half of the VDD at the moment. Feb 22 at 15:50