I am designing a little project which will impress a high frequency (1kHz) sine wave through a battery at a set and precise (±0.5%) current amplitude. This wave must be impressed on a constant DC current load which could be of either polarity (charging or discharging.) The current is then picked off and converted to DC using an RMS-to-DC IC which lets us measure the real-time ESR of the battery while it is charging or discharging.
In order to do this I decided to use a 2:1 coupling transformer and capacitor because it allows me to easily measure the current with a single resistor and use an op-amp in a non-inverting configuration.
This works, but (not entirely to my surprise), there's quite a bit of instability at the start in LTspice. I'm a little worried the circuit may be unstable completely when built for real. The oscillation appears to reverse when the op-amp begins clipping (current limiting) -- but I worry it could sustain itself indefinitely if the clipping is a little softer like it might be on a real op-amp. Is there an easy way to make the circuit "unconditionally" stable? I found I could make it more stable with a series resistor in the primary -- and in the secondary -- but it doesn't fully stabilise even with a large resistor, and of course a really large one limits the current too much. I also added a small feedforward capacitor, but I'm not at all sure how to calculate its value.
Because the transformer very effectively filters out low frequency, none of the oscillation appears on the output, except for a little clipping right at the start. So, apart from this worry, the circuit -should- work.
Edit: Clarification - R5 represents the op-amp output current. This is the unstable part that has me worried.
Excuse my lack of op-amp knowledge...