The basic circuit of a simple op-amp regulator is illustrated in Figure. A routine analysis of this circuit gives :
V0 = 1 + (R f / Ri) Vref
The circuit behaves as a voltage regulator since its output V0 is independent of IL and is also independent of changes in Vs.
Figure: An Op-amp Based Regulator
If Ri = Rf = 1 k, Vref = 5 V, then V0 = 10 V DC. V0 shall remain constant as long as Vs ≥ V0 + 2 (at least, to make sure that op-amp is not saturated). Moreover, Vs may be varied among 12-36 volts without causing any effect on V0. Also, if RL is changed, V0 still remains constant as long as (IL + Iref) is not greater than I0 (max) specified for the specific op-amp (typically, 10 mA).