One question I have had for a while now is about oscillators. I have not yet studied oscillators in depth, but I have designed a few simple phase shift ones, which I can understand but not quite.

As the title says, my question is the following...

As I understand, most oscillators work by amplifying a signal, then phase shifting the output so that the output phase matches the input phase, and then iterating this indefinitely. However, there seems to be something weird about this. If the amplifier amplifies the input too much, the signal will expand to much and saturate to something close to a square wave it seems to me. And if the amplifier amplifies too little, the signal will die out. So there is only one magical Av, so that the output is amplified just right so that the amplitude stays constant. Now the question is, mathematically it's easy to see that there is such a single amplifying factor to make things work, but in reality, it seems impossible to keep this constant amplitude, firstly because of noise, and then because transistors will fluctuate their parameters over time.

So how one earth do we manage to keep these amplitudes at a desired value ? In reality it's impossible to keep the Av factor constant all the time.

I know that after the amplifier gives its output, some loss is due inside the phase shifter, and so the amplifier has to amplify it just right so that the losses in the phase shifter are cared for, and the input to the amplifier is just right so that the output will be the same as before.

What happens here? How can the amplitude stay constant? It seems there is also a question about the frequency of oscillation. How can the frequency itself remain constant?

I have thought about this, and my guess as to why the frequency is constant is because the phase shifter is also a low pass filter, so that any high frequencies die out because their coefficients are too small, and only the lowest frequency will be high enough to be amplified just right ?

So it seems that the amplitude is related to the frequency, because if the low pass filter filters out all high frequencies, and the very lowest frequencies remain, then we can adjust the gain of the amp, so that the losses inside the filter will be higher than the coefficients of the higher frequencies that come out of the amp, and only the lowest frequency has a high enough coefficient so that it survives after passing through the phase shifter/filter. I am not sure of this.

How can the amplitude/gain of the amplifier stay constant and not either go to zero, or keep growing until it hits the +ve rail?

There's another way of looking at the phase shifter which explains how it works, but doesn't explain why the loss in the filter matches the gain of the amp: When the amp's output is going high, it is charging the capacitors inside the passive low pass filter, which increases the voltage at the amp's base, which in turn then decreases the output voltage, and this starts discharging the caps, which decreases the voltage at the base, and the cycle repeats. But still it doesn't make clear why the gain of the amplifier is just right so it doesn't either blow up or go to zero...

Could anyone explain to me how the amplitude can be just right ?

Thanks for your time.