Analog and Telecommunication Electronics

Prof. Dante Del Corso

Miniproject: Wien-Bridge Oscillators

Student Name: Emilio Orlandini Student ID: 221773

A.Y. 2014/2015

Index

INTRODUCTION

1. Oscillators generalities 1.1 Sinewave oscillator...... pag. 3 1.2 Requirements for ...... pag. 3 1.3 Phase Shift in the oscillator...... pag. 5 1.4 Gain in the oscillator...... pag. 6

2. The Wien-Bridge oscillator 2.1 Wien-Bridge oscillator...... pag. 7 2.2 Linear Analysis...... pag. 8 2.3 Introduction of non-linear elements...... pag. 10 2.4 Lamp Stabilised Wien-Bridge Oscillator...... pag. 11 2.5 stabilised Wien-Bridge Oscillator...... pag. 14

REFERENCES

1 | P a g .

Introduction

Circuits that produce a specific, periodic waveform without any input signal are called “Oscillators”. They can generate waveforms such as square, sinusoidal, triangular and so on. They are generally composed by some active elements surrounded by passive components such as , and inductors. Basically, we divide oscillators in two families: relaxation and sinusoidal. Relaxation oscillators generate waveforms which are not sinusoidal, such as triangular, square, sawtooth, while sinusoidal oscillators generate sinusoidal waveforms with a specific frequency (or period) and amplitude. Oscillators may use amplifiers with external components, or crystals that internally generate the . In this miniproject we are dealing with sine wave oscillators, and in particular our attention is focused on configuration, which is based on an OpAmp.

2 | P a g .

1 Oscillators generalities

1.1 Sine-wave oscillators

OpAmp oscillators are unstable circuits, but ones that are intentionally designed to remain in an unstable or oscillatory state. Oscillators are useful for generating uniform signals that are used as a reference in applications such as audio, function generators, digital systems and communication systems. Sinewave oscillators base on an OpAmp operate without any externally-applied input signal. Some combination of positive and is implemented in order to drive the OpAmp into an unstable state. OpAmp oscillators are restricted to a low frequency spectrum because OpAmps do not have the required bandwidth to achieve low phase shift at high frequencies. Voltage- feedback OpAmps are usually limited to a low kHz range. Crystal oscillators, instead, are used in high-frequency applications up to the hundreds of MHz range.

1.2 Requirements for oscillation

The fundamental characteristic of an oscillator is non linearity; in order to give rise to oscillations the system must be initially unstable. A principle scheme is shown in figure 1.1.

Figure 1.1: canonical form of a feedback system

Since:

푉표푢푡 = 퐸 · 퐴 (1)

퐸 = 푉푖푛 + 훽 · 푉표푢푡 (2)

3 | P a g .

Substituing E in (1), we obtain:

푉 표푢푡 = 푉 − 훽 · 푉 (3) 퐴 푖푛 표푢푡

And collecting the terms in 푉표푢푡 yelds:

1 푉 = 푉 ( + 훽) (4) 푖푛 표푢푡 퐴

Rearranging the elements produces equation 5, which is the classical form of a feedback expression:

푉 퐴 표푢푡 = (5) 푉푖푛 1+퐴훽

Oscillators does not need any input signal; they only use a fraction of the output signal created by the feedback network as the input signal.

Oscillations occurs when the feedback system is not able to find a steady-state since its transfer function cannot be satisfied. This happens when the denominator is equal to zero, i.e. when 1 + 퐴훽 = 0 or 퐴훽 = -1. In the design of an oscillator, it must be ensured that 퐴훽 = -1. This is called the Barkhausen criterion. For a system, the expression is A = 1∠0° and the sign of the A term is negative in equation (5). This criterion implies that the magnitude of the is unity, with a corresponding phase shift of 180° (due to the minus sign). As the phase shift reaches 180° and |퐴훽| = 1, the output voltage of the unstable system ideally tends to infinity but, in a real system it is limited to finite values of power supply. At this point, one of three things can occur:

1) Nonlinearity in saturation causes the system to become stable and lock-up to the current supply voltage; 2) The initial change causes the system to saturate and stay that way for a long time before it becomes linear and heads for the opposite power rail; 3) The system stays linear and reverses direction, heading for the opposite power rail. 4 | P a g .

The second case produces highly distorted oscillations (usually quasi-square waves), the resulting oscillators are called relaxation oscillators. The third case, instead, produces a sine-wave oscillator.

1.3 Phase Shift in the Oscillator

The 180° phase shift required by the Barkhausen criterion is introduced by active and passive components. Oscillators are made dependent on passive component phase shift because it is very accurate. The phase shift contributed by active components is minimized because it varies with temperature, has a wide initial tolerance, and is device dependent.

A single RL or RC circuit contributed up to 90° phase shift per pole, and since 180° of phase shift is required for oscillation, at least two poles must be used in the oscillator design. An LC circuit has two poles, but LC and LR oscillators are not suitable for low- frequency applications because inductors at low frequencies are expensive, heavy and highly nonideal. LC oscillators are designed tipically in high frequency applications, where the inductor size, weight and cost are less significant. When RC sections are cascaded, the phase shift multiplies by the number of sections n (figure 1.2).

Figure 1.2: Phase plot of RC sections [1]

5 | P a g .

In the region where phase shift is 180°, the frequency oscillation is very sensitive to the phase shift. Thus, a tight frequency specification requires that the phase shift, dɸ, must be kept within too much narrow limits for there to be only small variations in

dɸ⁄ frequency, dω, at 180°. Figure 1.2 shows that the value of dω at the oscillator

dɸ⁄ frequency is unacceptably small. Thus, in order to have a much higher dω, tipically four RC sections are used.

Crystal or ceramic resonators make the most stable oscillators because resonators have

dɸ⁄ an extremely high dω as a result of their nonlinear properties. Anyway, OpAmps are not generally used with crystal or ceramic resonator oscillators because of OpAmps’ low bandwidth. Experience shows that rather than using a low-frequency resonator for low frequencies, it is more cost effective to build a high frequency , count the output down, and then fitler the output to obtain the low frequency [1].

1.4 Gain in the Oscillator According to the Barkhausen criterion, the oscillator gain must be one in magnitude at the oscillation frequency. When the gain exceeds unity with a phase shift of -180°, the nonlinearity of the active device reduces the gain to unity and the circuits oscillates. The nonlinearity becomes significant when the amplifiers get close to the supply voltage level, since saturation reduces the active device (transistor) gain. The worst- case design usually requires nominal gains exceeding unity, but excess gain causes increased of the output sinewave.

When the gain is too low, oscillations cease under worst case conditions, and when the gain is too high, the output wave form looks more like a squarewave than a sinewave. Distortion is a direct result of excessive gain overdriving the amplifier. Thus, gain must be carefully controlled. The more stable the gain, the better the purity of the sinewave output.

6 | P a g .

2 The Wien-Bridge oscillator

2.1 Wien-Bridge Oscillator

There are many types of sinewave oscillator circuits. In an application, the choice depends on the frequency and the desired monotonicity of the output waveform. This section is focused on the “Wien Bridge configuration”.

The Wien Bridge is one of the simplest and best known oscillators and is largely used in circuits for audio applications [1]. The basic configuration of a Wien-Bridge oscillator is shown in figure 2.1.

Figure 2.1: Wien-Bridge circuit schematic [3]

7 | P a g .

2.2 Linear Analysis

The first goal in the analysis of an oscillator regards the trigger of oscillations. A couple of poles with positive real part is necessary in order to the system to oscillate. But, once oscillations occurs, the positive real part poles must be shifted on the imaginary axis to have a stable sinewave (this will be explained in details in the nonlinear analysis). [2]

Looking at the scheme to analyze the linear behaviour of the Wien-Bridge oscillator (figure 2.2), we can identify the feedback block B(ω) and the gain block A.

Figure 2.2: Scheme of the Wien-Bridge oscillator for the linear analysis [2]

Let us evaluate the expression of B(ω):

푉 푍 B(ω) = 푓 = 푝 (5) 푉표 푍푝+ 푍푓

푅푝 1+ 푗휔휏푠 Since 푍푝 = and 푍푓 = , substituting these values in (5) we obtain 1+푗휔휏푝 푗휔퐶푠 (6):

푗휔퐶푠푅푝 B(ω) = 2 (6) 푗휔퐶푠푅푝+1+푗휔(휏푝+휏푠)+(푗휔) 휏푝휏푠

8 | P a g .

Then, imposing 푅푠 = 푅푝 = R, 퐶푠 = 퐶푝 = C, 휏푠 = 휏푝 = τ, the final expression (7) is:

1 B(ω) = 1 (7) 3+푗(휔휏− ) 휔휏

푅 Now, since A = 1+ 2 (see figure 2.1, A is the gain of an OpAmp non-inverting 푅1 amplifier), and 훽(푗휔) = 퐵(푗휔) we get:

푗휔푅퐶퐴 A훽(푗휔) = (8) (1−휔2푅2퐶2)+3푗휔푅퐶

Now, according to Barkhausen criterion (for a positive feedback system), we must satisfy:

1 ∠A훽(푗휔) = 0 ⇒ 휔2푅2퐶2 − 1 = 0 ⇒ 휔 = = 휔 푅퐶 0 at 휔 = 휔0 we have: 퐴 퐴훽(푗휔 ) = ⇒ |퐴훽(푗휔 )| = 1 ⇒ 푅 = 2푅 . 0 3 0 2 1 Summarizing, we have found two conditions to be satisfied in order to have a sinewave at the output at frequency 푓표푢푡:

1 푓 = (9) 표푢푡 2휋푅퐶

푅2 = 2푅1 (10) In figure 2.3, the output waveform is shown for different conditions of the A gain:

9 | P a g .

Figure 2.4: output waveforms for different values of A [2]

2.3 Introduction of non-linear elements As we can see in figure 2.4, what we want is to force the system to oscillate (A>3), and then to get stable oscillations (A=3). This behaviour can only be obtained by introducing some nonlinearity in our circuit. Different ways can be exploited in order to have nonlinearity, such as a lamp, , in general something which resistance varies with increasing of potential drop across it. This is straightforward to understand: at first we want A>3, so 푅2 > 2푅1, but, when the magnitude of the output voltage reaches a desired value, we need 푅2 = 2푅1.

10 | P a g .

2.4 Lamp Stabilised Wien-Bridge Oscillator

The first Wien-Bridge stable oscillator was developed by Bill Hewlett in the late 1930s, as his Stanford’s Master thesis. He introduced a light bulb in order to stabilize the gain without producing distortion. It was then commercialized as HP200A audio oscillator [4]. It can still be built using similar principles to the early Hewlett Packard versions, but with modern components [5] (figure 2.6).

Figure 2.6: Basic lamp stabilized Wien Bridge oscillator [5]

It is a property of filament lamps that the resistance of the tungsten filament increases in a non-linear manner as the filament heats up. The gain of the amplifier is set by

푅 +푅 퐴 = 3 퐿푎푚푝 (11) 푅퐿푎푚푝

Therefore the greater the resistance of the lamp, the lower the amplifier gain. By choosing a suitable lamp, the gain of the amplifier can be automatically controlled over an appropriate range. Usually, a lamp with a maximum current flow of around 50mA or less is used, to give an initial gain of more than 3 as the oscillator starts, falling quickly to 3 as the lamp heats up. In figure 2.7 there is a graph showing how positive temperature coefficient resistance varies with voltage.

11 | P a g .

Figure 2.7: Non-linear resistance of a filament lamp [5]

The useful area of the lamp characteristic, where the largest change in resistance occurs is shaded green, the oscillators amplitude is stabilised by making use of this area. To find a value for 푅3 that will give the correct amount of gain at start up and during oscillation, its value should be slightly greater than twice the value of the lamps resistance at the lower end of the green shaded area (i.e. 2 x 30Ω = 60Ω) to give a gain >3, but no greater than twice the value of the lamp’s resistance at the upper limit of its useful slope (i.e. 2 x 75 = 150 Ω), the gain should then stabilise at 3, with the oscillator providing an undistorted sinewave output. The realization and output waveform of the lamp-stabilised circuit is shown in figure 2.8:

Figure 2.8: realization of a lamp-stabilised Wien Bridge oscillator (left) and its output waveform (right) [5]. 12 | P a g .

The design formulae are the following:

1 푓 = (12) 표푠푐 2휋푅퐶

1 푅 = (13) 푓표푠푐2휋퐶

퐶 = 1/(푓표푠푐2휋푅) (14)

In order to obtain an output frequency of 159Hz (fig. 2.8), the component list to build the circuit is the following:

 퐼퐶1 = 퐿푀324 (OpAmp)

 퐶1 = 퐶2 = 100푛퐹

 푅1 = 푅2 = 10푘Ω

 푅3 = 68Ω  퐿푎푚푝 = 푇1 5푉 45푚퐴 푤푖푟푒 푒푛푑푒푑 푙푎푚푝 (suitable from Rapid Electronics UK, May 2015)  푆푢푝푝푙푦 푣표푙푡푎푔푒 ±9V

13 | P a g .

2.5 Diode stabilised Wien-Bridge Oscillator

An alternative to lamp stabilization is provided by using a pair of diodes in parallel with the feedback as shown in figure 2.9.

Figure 2.9: Basic diode stabilized Wien-Bridge oscillator

In this circuit, the ratio of the non-inverting amplifier is controlled by the ratio between

푅3 and 푅4. Initially, it will be slightly greater than 3, in order to allow oscillations to start. Once the feedback signal from the output produces a waveform across 푅3 that approaches 0.6푉푝푝, the diodes begin to conduct. Their forward resistance reduces, and since they are in parallel with 푅3, this reduces the value of 푅3 and the amplifier gain as well. A design example, for a 푓표푠푐 = 132퐻푧, has been carried out with the following components:

 IC LM224N (OpAmp)

 퐶1 = 퐶2 = 100푛퐹

 푅1 = 푅2 = 12푘Ω

 푅3 = 80Ω

 푅4 = 22Ω  푆푢푝푝푙푦 푣표푙푡푎푔푒 ±9V

푅 The gain in controlled by the 3 ratio, which is 3.63. The output waveform for this 푅4 configuration is shown in figure 2.10:

14 | P a g .

Figure 2.10: Output waveform (left) and frequency spectrum (right) for a diode stabilised oscillator with large gain [6]

As it can be seen from the output waveform, the main problem of the diode stabilised configuration is that the output is more prone to distortion that in the lamp stabilised circuit, as the diodes will tends to distort the waveform peaks if the gain set by 푅3 and

푅4 is slightly larger than needed. This also means that the oscillator’s output amplitude is somewhat restricted if distortion is to be minimized. Adding a lowpass filter could also improve the quality of the signal in terms of harmonics.

15 | P a g .

References

[1] Ron Mancini and Richard Palmer, Design of OpAmp sinewave oscillators, SLOA060, March 2001.

[2] “Elettronica delle telecomunicazioni”, course material by Prof. Giovanni Breglio from “Università degli studi di Napoli Federico II”, a.y. 2013/2014.

[3] The Wien Bridge oscillator, website tutorial, Electronics Tutorial.

[4] HP Model 200A audio oscillator, 1939, HP website Model 200A.

[5] Wien Bridge Oscillators, website tutorial, Learn About Electronics, Wien Bridge Oscillator.

[6] Measurements carried out at Politecnico di Torino - Sede Centrale - Cittadella Politecnica, 2nd floor, LED2.

16 | P a g .