I'm building an electronic DC dummy load and have a problem with stability/oscillations.
Vset - controls current, when set to 100mV it makes 500mA at the shunt
Vout1 - Vshunt multiplied by 40 by U1
Vout2 - output from U2, drives mosfet M1
power_in - it is 10V and I added some noise to it
Vout1 and Vout2 oscillate.
I'm trying to do AC analysis, so I could make some tweaking.
I understand that loop is not stable if phase shift is 180° and gain higher than 0dB.
I read that I have to break feedback and insert small signal for AC analysis.
This is what I have done:
Is this method correct? I googled for some examples, but I was able to find only simple examples that I was not able to apply to my circuit.
Problem is that result of AC analysis tells that gain is always less than 0dB and phase shift below 180° (well, maybe for higher frequency reaches 180°).
At this point I'm stuck, I appreciate any help or advice how to properly do AC analysis.
I uploaded source file for LTspice: