I am implementing the General Feedback Theorem (Prof. Middlebrook, 2006) in LTSpice, using the example given in the Spice folder.
I used it to calculate the loop gain in a simple voltage follower configuration, to be sure that everything is working correctly (schematic below).
I plotted, as can be seen, the loop gain as:
Which, for this configuration, should be just the gain of the amplifier, since the loop gain is T=A*B, where "A" is the amplification of the main block (in this case the op.amp) and "B" is the feedback factor (in this case 1).
However, as you can see, the result looks incorrect, since we have a loop gain of about -6dB also at almost DC. The closed loop gain, H(), looks correct, being 0dB constant until the poles of the op.amp makes it decrease.
Any idea where I have made mistakes? Thanks a lot!