I am trying to design a sine wave oscillator. The frequency is about 10 kHz (not critical), the distortion should be reasonable but not necessarily super good (say under 1%). However, the amplitude has to be stable, well defined and repeatable for different instances of the product. The total deviation from its nominal value (which is not critical at all, could be 100 mV as well as 2 V) has to be under 5 % (preferably better) across component tolerances, temperature etc. No trimming is allowed. The power supply would ideally be +5V but adding -5V would be acceptable.
This brings me to a Wien bridge oscillator (simplest) with AGC. The AGC would use a precise peak detector with op amps, I don't think a peak detector without op amps depending on a voltage drop across a diode would not be accurate enough.
Now, Jim Williams uses temperature compensation of the detector diode (e.g. Fig 47) in his application note
https://www.analog.com/media/en/technical-documentation/application-notes/an43f.pdf
Even this would not be precise enough for me I think. In any case, he uses something that looks like compensation for stability in the feedback of LT1006 and LT1115. I am puzzled how this stability compensation has been designed. And when I design my AGC with a different precision peak detector, how can I verify how stable the op amps are? I don't know how to verify the stability when the oscillator, by definition unstable, is included in the loop. Can Bode plots or something else be used, how?
Wrt AGC, why is a JFET usually used, is it because a bipolar transistor is unusable as it does not behave as a relatively constant resistance and this would increase the distortion? And how about a MOSFET?