LTSpice – Ringing Issue in DC Load Circuit Simulation

ltspicemosfet

I am working on a DC load circuit and have put together a simple configuration based on templates available online. As you can see in 3rd image attached, I am noticing a small ringing in the load circuit measured at R1 which is a current sense resistor.
I am assuming its being generated from the OPAMP not being able to stablise quick enough and so I tried different random solutions like adding 10 pF capacitor between MOSFET base and ground however I am unable to completely get rid of the ringing.

Can anyone suggest a methodological approach to stablise the opamp and remove this ringing?

Thanks,

  1. Schematics
    Schematics

  2. Full output Vsingal vs I(R2)

Full graph

  1. Ringing zoomed
    Ringing

Edit: Final schematics with added RC filter on 2nd stage opamp to filter out ringing. Adding to original post in case anyone's looking for similar solution:

Final Schematics

Best Answer

Here is an additional tweak that will help ensure stability.

enter image description here

The output in my simulation above is more-or-less accurate if V3 is current-limited. In reality U2 will be destroyed if V3 is too low in source impedance.

You should limit the input voltage to U2 to >= 0V. If it goes negative by more than a few hundred mV and the current is limited you'll see the phase reversal in my simulation, and if it's not limited you'll probably damage the chip.