Op amp circuit stability in linear regulator circuit
Your opamp is fast and oscillating. Just feed back the high frequency to kill it, I think.







simulate this circuit &ndash; Schematic created using CircuitLab

I'm just throwing something together here for you to try in your simulations. Mostly note \$C_1\$, which provides some fast negative feedback for high frequencies while not doing much about lower frequencies. I think that should kill your problem. (Well, you need that divider I included because you shouldn't pick off your voltage feedback directly at the mosfet source. Need some distance there to allow \$C_1\$ room to work. You can replace \$R_3\$, \$R_4\$ and \$R_5\$ with a single resistor from your mosfet source back to the (-) input if you don't like the \$2\cdot V_{set}\$ arrangement and just want the output to equal \$V_{set}\$. Try a \$4.7k\Omega\$, for example.)

Note also the addition of a (-) rail. With that, you can drive down to \$0V\$.

I'm going to assume your opamp can drive the mosfet here. (You could select one that will do fine, I'd imagine?) I added \$R_5\$ so you could play. But you could just as well get rid of it entirely, as \$R_3\$ and \$R_4\$ form a Thevenin equivalent anyway.

So here's the schematic without the divider, in case the above text I added isn't totally clear. In all respects that count, it's the same as the earlier schematic and should deal with the oscillation for the exact same reasoning. It's only that the output will mirror the input instead of doubling it.







simulate this circuit

I don't like your BJT arrangement with both bases tied together and both emitters tied together, too. But I'm not sure why its there so I haven't bothered doing anything different with that. Feel free to add those back into the drive for your mosfet... after, not before, the \$C_1\$ feedback.

EDIT: Well, I forgot to take notice of your \$500V\$ supply rail and associated (desired, I suppose) \$50\Omega\$ impedance (5kW to handle a direct short?) Um. Just how do you plan to drive the mosfet gate so that you can regulate the output with that high of a rail?? I think you need to convert a reasonable expectation from your opamp into something that can reach that high up and get the mosfet gate up somewhere nearby into the stratosphere there.