In this post we learn how to design opamp based oscillators, and regarding the many critical factors required for generating a stable oscillator design.

Op amp based oscillators are normally used to generate precise, periodic waveforms like square, sawtooth, triangular, and sinusoidal.

Generally they operate using a single active device, or a lamp, or a crystal, and associated by a few passive devices like resistors, capacitors, and inductors, to generate the output.

##

Op-amp Oscillator Categories

You will find a couple of primary groups of oscillators: relaxation and sinusoidal.

Relaxation oscillators produce the triangular, sawtooth and other nonsinuoidal waveforms.

Sinusoidal oscillators incorporate op-amps using additional parts accustomed to create oscillation, or crystals which have in-built oscillation generators.

Sine wave oscillators are employed as sources or test waveforms in numerous circuit applications.

A pure sinusoidal oscillator features solely an individual or basic frequency: ideally without any harmonics.

As a result, a sinusoidal wave could be the input to a circuit, using calculated output harmonics to fix the level of distortion.

The waveforms in relaxation oscillators are produced through sinusoidal waves which are summed to deliver the stipulated shape.

Oscillators are helpful for producing consistent impulses which are used as a reference in applications like audio, function generators, digital systems, and communication systems.

## Sine Wave Oscillators

Sinusoidal oscillators comprise op-amps using RC or LC circuits that contain adjustable oscillation frequencies, or crystals that possess a predetermined oscillation frequency.

The frequency and amplitude of oscillation are established by the selection of passive and active parts hooked up with the central op-amp.

Op-amp based oscillators are circuits created to be unstable. Not the type which are at times unexpectedly developed or designed in the lab, rather types that are deliberately built to continue to be in an unstable or oscillatory condition.

Op-amp oscillators are tied to the bottom end of the frequency range due to the fact op amps lack the necessary bandwidth for implementing the low phase shift at high frequencies.

Voltage-feedback op amps are restricted to a low kHz range since their principal, open-loop pole is often as small as 10 Hz.

The modern current-feedback op amps are designed with significantly broader bandwidth, but these are incredibly difficult to implement in oscillator circuits as they are sensitive to feedback capacitance.

Crystal oscillators are recommended in high-frequency applications in the range of hundreds of MHz range.

##

Basic Requirements

In the most basic type, also called the canonical type a negative feedback method is used.

This becomes the prerequisite for initiating the oscillation as shown in Figure 1. Here we see the block diagram for such a method wherein VIN is fixed as the input voltage.

Vout signifies the output from the block A.

β denotes the signal, also called the feedback factor, which is supplied back to the summing junction.

E signifies the error element equivalent to the sum of the feedback factor and the input voltage.

The resulting equations for an oscillator circuit can be seen below. The first equation is the important one which defines the output voltage. Equation 2 gives the error factor.

**Vout = E x A** ------------------------------(1)

**E = Vin + βVout** --------------------------(2)

Eliminating the error factor E from the above equations gives

**Vout / A = Vin - βVout** ----------------- (3)

Extracting the elements in Vout gives

**Vin = Vout (1/A + β)** ---------------------(4)

Reorganizing the terms in the above equation provides us the following classical feedback formula through equation #5

**Vout / Vin = A / (1+Aβ)** ----------------(5)

Oscillators are able to work without the help of an external signal. Rather, a portion of the output pulse is utilized as the input through a feeedback network.

An oscillation is initiated when the feedback fails to achieve a stable steady state. This happens because the transfer action does not get fulfilled.

This unstability occurs when the denominator of equation #5 becomes zero, as shown below:

**1 + Aβ = 0, or Aβ = -1.**

The crucial thing while designing an oscillator circuit is to ensure Aβ = -1. This condition is called the Barkhausen criterion.

To satisfy this condition, it becomes essential that the loop gain value remains at unity through a corresponding 180 degrees phase shift. This is comprehended by the negative sign in the equation.

The above results can be alternatively expressed as shown below using symbols from complex Algebra:

**Aβ = 1ㄥ-180° **

While designing a positive feedback oscillator the above equation can be written as:

**Aβ = 1ㄥ0° ** which makes the term Aβ in equation #5 negative.

When Aβ = -1 the feedback output tends to move towards an infinite voltage.

When this approaches the maximum + or - supply levels, the gain level active devices in the circuits changes.

This causes the value of A to become Aβ ≠ -1, slowing down the feedback infinite voltage approach, eventually putting it to a halt.

Here.we may find one of the three possibilities happening:

- Non-linear saturation or cut-off causing the oscillator to stabilize and lock.
- The initial charge forcing the system to saturate for a much long period before it again becomes linear and begins approaching the opposite supply rail.
- The system continues to be in the linear region, and reverts towards the opposite supply rail.

In case of the second possibility, we get an immensely distorted oscillations, generally in the form of quasi square waves.

### What's Phase shift in oscillators

The 180° phase shift in the equation Aβ = 1ㄥ-180° is created through the active and passive components.

Just like any correctly designed feedback circuit, oscillators are built based on the phase shift of the passive components.

This is because the results from passive parts are precise and practically drift-free. The phase shift acquired from active components is mostly inaccurate due to many factors.

It may drift with temperature changes, may show wide initial tolerance, and also the results could be dependent on the device characteristic.

Op amps are chosen in order to ensure that they bring about minimum phase shift to the frequency of the oscillation.

A single pole RL (resistor-inductor) or RC (resistor-caapcitor) circuit brings about approximately 90° phase shift per pole.

Since 180° is necessary for oscillation, a minimum of two poles are employed while designing an oscillator.

An LC circuit possesses 2 poles; therefore, it provides around 180° phase shift for each pole pair.

However we won't be discussing LC based designs here due to the involvemenet of low frequency inductors that can be expensive, bulky, and undesirable.

LC oscillators are intended for high-frequency applications, that may be over and above the frequency range of op amps based on voltage feedback principle.

Here you may find the inductor size, weight, and cost are not of much importance.

Phase shift ascertains the frequency of oscillation since the circuit pulses at the frequency that fetches a phase shift of 180 degress. The df/dt or the rate at which the phase shift changes with frequency, decides frequency stability.

When cascaded buffered RC sections are used in the form of op amps, offering highinput and low-output impedance, the phase shift multiplies by the number of sections, ** n** (see Figure below).

Despite the fact that two cascaded RC sections present 180° phase shift, you may find dФ/dt to be minimal at the oscillator frequency.

As a result oscillators constructed using two cascaded RC sections offer **inadequate** frequency stability.

Three identical cascaded RC filter sections provide an increased dФ/dt, enabling the oscillator with an enhanced frequency stability.

However, introducing a fourth RC section creates an oscillator with an **outstanding** dФ/dt.

Hence this becomes an extremely stable oscillator setup.

Four sections happen to be the preferred range mainly because op amps are available in quad packages.

Also, the four-section oscillator produces 4 sine waves which are 45° phase shifted with reference to one another, which means this oscillator enables you to get hold of sine/cosine or quadrature sine waves.

### Using Crystals and Ceramic Resonators

Crystal or ceramic resonators provide us with the most stable oscillators. This is because resonators come with an incredibly high dФ/dt as a result of their nonlinear properties.

Resonators are applied in high-frequency oscillators, however, low-frequency oscillators usually do not work with resonators due to size, weight, and cost constraints.

You will find that op-amps are not utilized with ceramic resonator oscillators mainly because op amps include a reduced bandwidth.

Studies show that it is less expensive to construct a high-frequency crystal oscillator and trim down the output to acquire a low frequency instead of incorporating a low-frequency resonator.

###

Gain in oscillators

The gain of an oscillator must match *one* at the oscillation frequency. The design gets steady once the gain is greater than 1 and oscillations halt.

As soon as the gain reaches over 1 along with a phase shift of –180°, the non linear property of the active device(opamp) drops the gain to 1.

When non-linearity occurs the opamp swings near the either (+/-) supply levels due to the reduction in the cut-off or saturation of the the active device (transistor) gain.

One strange thing is that the badly designed circuits actually demand marginal gains in excess of 1 during their production.

On the other hand, higher gain leads to greater amount of distortion for the output sine wave.

In cases where gain is minimal, oscillations cease under extreme unfavorable circumstances.

When the gain is very high, the output waveform appears to be much more similar to a square wave instead of a sine wave.

Distortion is usually an immediate consequence of too much gain over-driving the amplifier.

Therefore, gain should be cautiously governed for for achieving low distortion oscillators.

Phase-shift oscillators can show distortions, however they may have the ability to attain a low-distortion output voltages using buffered cascaded RC sections.

This is because cascaded RC sections behave as distortion filters. Furthermore, buffered phase-shift oscillators experience low distortion since the gain is managed and uniformly balanced between the buffers.

**Conclusion**

From the above discussion we learned the basic working principle of opamp oscillators and understood regarding the fundamental criteria for achieving sustained oscillations. In the next post we'll learn about Wien-bridge oscillators.