Hi all,
I'm in the process of designing a 13.8V power supply, capable of delivering around 20A of continuous current (HAM, yup). I want to build my design from the scratch up and in order to do that, I want to be able to do stability analysis in simulation. My question is regarding how to do that in LTSpice i.e. where (and how) will I need to brake the feedback loop and do AC analysis to get the loop gain of the control loop.
This is the schematic that I'm starting off with (this is far from the desired one, but I'm taking small steps. Ah yeah, and the output voltage Vo-Vreg isn't set to the desired value of 13.8V):

It's transient analysis (loading it with 50 OHMs) of the opamp output is this :

I know that it oscillates, that's not the particular issue. It's frequency of oscillation is around 4.15 kHz. At this step, I want to do stability analysis of the control loop, and plot the response of the loop gain - ?A in order to determine it's phase margin and gain margin. From theory I know that in order to plot the loop gain I need to brake the loop, insert a test signal to the amplifier and look at the ratio V(feedback)/V(test)
while grounding the input to the system. This is my first dilemma - what do I consider the "Input to the system" in this circuit configuration ?
After seeing LT's tutorial on "Stability of Op Amp Circuits" (
http://www.linear.com/solutions/4449 ) I know that in order not to disturb the DC operating point of the circuit, I need to insert a AC voltage source with a value of 1 in the negative feedback path of the loop, and then do the AC analysis. I naively put an AC source in this location (not changing anything else) :

And this is the result of the bode plot of the ratio V(vfb)/V(test) that I got :

This result doesn't seem right to me. From the graph I get that the PHASE margin is -12 degrees and the GAIN margin is -55 dB which doesn't make sense.
What am I doing wrong while making this analysis in LTSpice ?
Regards !