How do I get the formula to calculate the frequency of this oscillator?

I looked for a relaxation oscillator for my project. Then I found this:

I tested it on simulator, and it works fine. But I need to calculate the frequency of this oscillator to put capacitors and inductors, correctly, accordingly to my project. How do I get the formula to calculate the frequency of this oscillator?

• You do network analysis. All oscillators have a loop. Determine the transfer function of that loop and that will tell you where the resonance is. You fond this circuit, was there no explanation of how it works and what its oscillation frequency is? Feb 26, 2021 at 12:56
• No. It's just a image from this site. It's labeled Hartley Pierce Oscillator, but there no explanation. Feb 26, 2021 at 13:07
• Did you have to swap the op-amp inputs over to get it to oscillate in the simulator? Feb 26, 2021 at 13:11
• Not to be picky or anything, but that is not a relaxation oscillator. Feb 26, 2021 at 13:17
• It isn't oscillating - it's just a slow transient sinusoidal decay following activation of the circuit. If you plotted many many cycles you'll probably see what I mean. Feb 26, 2021 at 13:45

$$\boxed{\text{That circuit is not an oscillator}}$$

For it to act as a Hartley oscillator (as shown in this wiki page) then the inputs to the op-amp need to be swapped to get the correct phasing to make it sing at the resonant frequency of the LC circuit. The wiki page has had people indicate that there are problems with that particular circuit: -

So, if you re-arranged the inputs so that the centre tap of the two inductors fed the non-inverting input it would work more or less as Mr. Hartley intended. However, it won't produce a very good sinewave because the op-amp open-loop gain will be quite high and the output waveform will crash into the power rails and give you somewhere between a full-on square wave and an unreliable and distorted sinewave.

So, if you wanted something like a decent op-amp based Hartley oscillator, I'd use this circuit: -

Transient analysis: -

It oscillates at 10.473 kHz in my simulator (micro-cap) and the formula above suggests it should run at 11.253 kHz. In other words, using a slow-ish op-amp creates delay in the feedback and it doesn't quite sing "in tune".

How I get the formula to calculate the frequency of this oscillator?

You derive it if you don't trust what wiki tells you. Start with the parallel impedance of the two series inductors (L) and the capacitor (C): -

$$Z = \dfrac{j\omega L}{1 - \omega^2 LC}$$

Then, introduce the output impedance of the driver (R) and form a potential divider. It will have the following transfer function: -

$$\dfrac{j\omega L}{j\omega L + R - \omega^2 RLC}$$

Perform complex conjugate math to get a real term in the denominator: -

$$\dfrac{j(\omega LR - \omega^3 RL^2C) +\omega^2L}{\text{real number}}$$

And, we know that for the phase angle of the network to produce oscillations (when the correct polarity op-amp inputs are used), the imaginary parts in the above equation equate to zero and: -

$$\omega LR = \omega^3 RL^2C$$

Hence, the circuit will oscillate at: $$\\hspace{1cm}\omega = \dfrac{1}{\sqrt{LC}}\$$

Where $$\L = L_1 + L_2\$$.

This site (among others):

Hartley Osc

Gives this formula:

Andy's answer shows an oscillating two-inductor (or "tapped" single inductor) circuit.

Here is another Hartley-like oscillator. It is the dual of a Colpitts-like oscillator. Notice that feedback is to the inverting opamp input, similar to the OP's non-oscillator. Perhaps this was the intended topology??

One other point...the two inductors need NOT be coupled with mutual inductance - they can be two un-coupled discrete inductors. A single tapped inductor is also acceptable, and is often employed.
Because of the node between two inductors, this topology is not useful in crystal or ceramic oscillators - the motional inductance is hidden inside the resonator.

This circuit was tried in LTSPice, using a generic bandwidth-limited linear opamp. The inductors both had series resistance added that would eventually cause decay to DC. These resistances (50 ohms) are not shown in this schematic - LTSpice's inductor model allow internal resistance to be added.
An initial current "kick" is applied with the line .IC I(L1)=1p
Oscillations exponentially build from there, until LTSpice hits numerical overflow, ending the transient simulation run. A real opamp would hit an internal current or voltage limit long before voltage rose to astronomical levels.

• A point to mention - this is the more classical rendition of the Hartley oscillator but, like the Colpitts oscillator, it does rely on the op-amp having a non-zero output impedance to produce oscillation else, what would be the point of L2. That resistor and L2 produce an extra 10 to 30 degrees of phase shift in order to get the overall 180 degrees shift when feeding back to the inverting terminal. It also works better if the op-amp gain is somewhat limited to just above that necessary to start oscillations (else it produces a very shabby sinewave). Feb 26, 2021 at 16:13
• @Andyaka Very good points, all!. I did cut the default opamp gain from 100k to about 280 so that oscillations build more slowly, and are more easily seen. Feb 26, 2021 at 16:40