University Physics — Year 2 · Bachelor Year 2
9Electronics: Feedback, Oscillators and Signal Acquisition
Bring a microphone too close to the loudspeaker it feeds and the hall fills with a howl: the amplifier hears itself, and a tiny noise grows into a scream at one particular pitch. Tamed, that same loop is the heart of every clock, radio and synthesizer — an oscillator that makes a sine wave out of nothing but gain and a filter. The Year 1 volume built amplifiers, filters and comparators with the operational amplifier; this chapter closes the loop around them, asks when a loop is stable and when it oscillates, builds two oscillators — one sinusoidal, one square — and then turns to the two operations by which a measured signal reaches a computer: sampling it, and pulling it out of the noise by synchronous detection.
9.1 Feedback and stability
Definition 9.1 (Closed loop; loop gain)
An amplifier of transfer function receives the input plus a fraction of its own output (positive feedback; for negative feedback change the sign of ). The closed-loop transfer function and the loop gain are
Theorem 9.2 (Stability of a linear loop; oscillation condition)
Replacing by the complex variable , the free evolution of the loop is governed by the roots of its characteristic equation (the poles of ): each root contributes a mode . The loop is stable when all roots have negative real parts (every mode dies out); it oscillates, with growing amplitude, when a root has a positive real part. The frontier — a pair of purely imaginary roots , i.e. a sustained sinusoid — is reached when
(Barkhausen’s condition: loop gain of modulus one and phase zero at ). For a second-order denominator the loop is stable iff , , have the same sign.
Proof. The differential equation of the loop is obtained from by reading each power of as a time derivative; its homogeneous solutions are the with the roots of the polynomial. Growth or decay follows the sign of ; for a second-order polynomial the roots have negative real parts exactly when the coefficients share one sign (their sum is and their product ). Barkhausen’s condition is the existence of a root at . ∎
Remark 9.3 (How an oscillator starts and stops)
An oscillator is designed with a loop gain slightly larger than one at : the noise present at switch-on contains that frequency, which grows exponentially while all others die. Linear theory then predicts infinite amplitude; in reality some non-linearity — the saturation of the amplifier, or a deliberately non-linear element — lowers the effective gain as the amplitude grows, until the loop gain averages exactly one: the amplitude settles. Every real oscillator is thus a linear loop for the frequency and a non-linear one for the amplitude; the gentler the limiting, the purer the sine wave.
9.2 The Wien-bridge oscillator
Proposition 9.4 (Wien-bridge oscillator)
An op-amp in the non-inverting configuration of gain feeds its output back to its input through the Wien network: and in series, then and in parallel to ground. The network’s transfer function is
real and maximal () at . The loop gain equals one at when : the circuit then sustains a sinusoid at
The voltage at the input obeys
for the oscillation dies, for it grows (negative damping) with the time constant , until the op-amp’s saturation limits it.
Proof. Voltage divider: the series branch , the parallel branch ; , which simplifies to the form given. Loop: , i.e. ; multiply by and read : . Its damping coefficient changes sign at . ∎
Example 9.5 (A 1 kHz source)
, : . With and , : the amplitude grows by every from the switch-on noise, reaching saturation in a few tens of milliseconds; the clipped sine is then rich in harmonics. Replacing by a small incandescent lamp, whose resistance rises as it warms, pulls down to exactly at a moderate amplitude: a sine wave with less than of distortion, the circuit of the first laboratory signal generators.
9.3 Comparators with hysteresis; the astable multivibrator
Proposition 9.6 (Hysteresis comparator)
An op-amp with positive feedback — output fed to the input through a divider , (the input then sits at with when the signal is applied to the input) — has no stable linear regime: its output sits at or and switches
The two thresholds differ: the hysteresis makes the comparator immune to noise smaller than that, and its cycle in the plane is a rectangle run clockwise.
Proof. With the input is at ; the output stays positive as long as , and flips when crosses it — after which the input is at , so must fall below that to flip it back. (In the linear regime the positive feedback would make any deviation grow: it is unstable.) ∎
Proposition 9.7 (Astable multivibrator)
Feed the output of the hysteresis comparator back to its own input through an circuit ( from to the input, from there to ground). The capacitor charges toward and flips the comparator each time it reaches a threshold: a square wave at , a near-triangular wave on , with the period
For , . Such relaxation oscillators clock microcontrollers, blink indicators and generate the triangle and square waves of function generators.
Proof. With , the capacitor voltage goes from toward as , and reaches after ; the comparator flips and the symmetric half-cycle follows. ∎
9.4 Sampling a signal
Theorem 9.8 (Sampling; the Nyquist–Shannon criterion)
A signal is sampled when only its values at the instants are kept, being the sampling rate. The spectrum of the sampled signal is the spectrum of repeated around every multiple of . A signal whose spectrum is confined below can be exactly reconstructed from its samples if and only if
otherwise the copies overlap and a component at reappears at the alias frequency (for the integer that brings it below ), indistinguishable from a true low-frequency component. Hence the anti-aliasing filter placed before any sampler: a low-pass that removes everything above .
Proof. Sampling is multiplying by a periodic train of narrow pulses of period , whose Fourier series contains all the harmonics (the mathematics volume of this year); multiplying by shifts its spectrum by — whence the copies. They do not overlap iff ; a low-pass of cut-off then recovers the original spectrum exactly (admitted). Aliasing: the samples of and of at coincide, since . ∎
Example 9.9 (Wagon wheels, CDs and oscilloscopes)
A film at images per second samples the world at : a wheel with spokes turning at turns per second presents a spoke times a second, beyond — it seems to turn slowly forward, and backward at turns per second. A compact disc samples at to reproduce sound up to , with a steep anti-aliasing filter between and . A digital oscilloscope set to displays a sine as a one — the first trap of digital measurement.
Remark 9.10 (Quantization)
The analog-to-digital converter also rounds each sample to one of levels ( bits): the rounding error, at most half a step, acts as a noise of rms value for a step , and the dynamic range (largest sine over that noise) is about dB — for the bits of a CD, for a -bit oscilloscope. Sampling rate and resolution are the two numbers on the label of every digitizer.
9.5 Synchronous detection
Proposition 9.11 (Synchronous (lock-in) detection)
A signal of known frequency, , buried in a noise of much larger amplitude spread over a wide band, is multiplied by a reference of the same frequency and passed through a low-pass filter of cut-off :
The output is a DC voltage proportional to the signal’s amplitude (and to the cosine of its phase relative to the reference), while the noise is reduced to the part of its spectrum lying within of — a bandwidth that can be made arbitrarily narrow (a fraction of a hertz for a filter time constant of seconds). Components at other frequencies are shifted to and rejected by the filter.
Proof. ; the filter keeps the difference term for the signal, the term and every noise component at being shifted to and — only the noise originally within of lands below . ∎
Example 9.12 (Finding a microvolt)
A photodiode delivers of signal when its light is chopped at , on top of of white noise over ( rms: more than the signal). After synchronous detection with a filter of time constant (noise bandwidth ) the noise is : a signal-to-noise ratio of — at the price of waiting a few seconds per point. The same trick, under the name of demodulation, recovers the music from an AM radio carrier and the data from a modem.
Method 9.13 (Designing a measurement chain)
(1) Modulate the quantity to be measured at a frequency away from the noise (chopper, AC bridge). (2) Amplify with a bandwidth covering . (3) Detect synchronously with a filter whose time constant is the longest the measurement can afford: the noise falls as . (4) Sample the slow output at a rate above twice its bandwidth, after an anti-aliasing filter, with enough bits for the required resolution. (5) Check the chain with a known signal, and that nothing in it oscillates: every amplifier with feedback is a potential oscillator.
9.6 Exercises
Exercise 9.1 ★
A Wien-bridge oscillator with , : frequency; gain needed; values of , for with ; time constant of the amplitude growth. Which components fix the frequency, which the start-up?
Solution
Solution of Exercise 9.1.
; ; ; . , set the frequency; , the start-up (and the amplitude limiting).
Exercise 9.2 ★
Hysteresis comparator with , , : thresholds, hysteresis width. A noisy signal crossing zero with of noise: how many times does the output switch per crossing, with and without hysteresis?
Solution
Solution of Exercise 9.2.
: thresholds , hysteresis . Noise of cannot re-cross a threshold away: one switch per crossing; without hysteresis the output chatters many times.
Exercise 9.3 ★
Astable multivibrator with , , : period and frequency; for ; amplitude of the triangular wave on the capacitor; what happens to if is raised to ?
Solution
Solution of Exercise 9.3.
, ; for ; triangle between ; : , times longer.
Exercise 9.4 ★
(a) A CD samples at : maximum frequency reproduced. (b) A ultrasound leaks into the recording: at what frequency does it appear? (c) A wheel with spokes filmed at turns at turns/s: apparent motion. (d) An oscilloscope at shows a clean sine; the true signal could be what other frequencies?
Solution
Solution of Exercise 9.4.
(a) . (b) . (c) Spokes at , alias : the wheel seems to creep forward at turn/s. (d) , or : , , , , …
Exercise 9.5 ★★
Loops with characteristic polynomials (a) , (b) , (c) , (d) , (e) : find or discuss the roots; which loops are stable, which oscillate, which grow? (For the cubics, reason on the sign of the real parts: e.g. show (e) has a real negative root and two complex roots with positive real part, using the product and sum of the roots.)
Solution
Solution of Exercise 9.5.
(a) , : stable. (b) : growing oscillation. (c) : sustained oscillation. (d) : and : stable. (e) One real root near (the polynomial is monotonic); the sum of the three roots is , so the complex pair has real part : unstable.
Exercise 9.6 ★★
Wien network. (a) Derive from the divider. (b) Plot (sketch) its modulus and phase; show the phase is zero only at and that the modulus is then . (c) Write the differential equation of the loop for a gain and discuss , , . (d) With , starting from a noise, how long until the amplitude reaches ? Why does the final amplitude not depend on the initial noise?
Solution
Solution of Exercise 9.6.
(a) with , : . (b) Modulus , maximal at ; phase , zero only at . (c) : damped, sustained, growing. (d) Growth time constant ; constants: . The final amplitude is set by the non-linearity (saturation), not by the seed, which only sets the delay.
Exercise 9.7 ★★
Triangle generator. An integrator (op-amp, , ) is fed by the square output of a hysteresis comparator whose input is the integrator’s output; the comparator thresholds are . (a) Show the integrator output is a triangle; its slope. (b) Period . (c) Numbers: , , . (d) Advantage over the simple astable for a function generator.
Solution
Solution of Exercise 9.7.
(a) The integrator’s output has slope : a triangle. (b) Each ramp spans at slope : . (c) , . (d) An exactly linear triangle, a frequency proportional to (easy to sweep), square and triangle outputs from one circuit.
Exercise 9.8 ★★
Quantization. (a) A -bit converter on : step, rms quantization noise, dynamic range in dB. (b) bits at : bit rate; same for bits at (a fast oscilloscope). (c) A signal on the -bit converter: how many steps? What to do before the converter? (d) Why does a good audio system dither (add a little noise) before quantizing?
Solution
Solution of Exercise 9.8.
(a) , noise , . (b) ; . (c) steps: amplify by or more first. (d) Dither turns the rounding error, correlated with the signal (distortion), into a harmless uncorrelated noise.
Exercise 9.9 ★★
A signal contains and components and is sampled at . (a) Where does each appear? (b) An anti-aliasing first-order filter with is added: attenuation at in dB; enough if is wanted? (c) Order of the filter needed (attenuation dB per decade); or, alternatively, sampling rate needed with the first-order filter. (d) Why do modern converters oversample and filter digitally?
Solution
Solution of Exercise 9.9.
(a) Both at . (b) , : no. (c) : third or fourth order; or a sampling rate such that the first-order filter gives at , i.e. at : . (d) Oversampling pushes the alias band far up, where a gentle analog filter suffices; the sharp filtering is then done digitally before decimation.
Exercise 9.10 ★★★
Lock-in. Input multiplied by and filtered by a first-order low-pass of time constant . (a) DC output. (b) Show that a noise component at gives, after the filter, an amplitude reduced by ; deduce the equivalent noise bandwidth (admit ). (c) A signal in rms of white noise over : noise density; for a signal-to-noise ratio of ; measuring time. (d) A pickup of pollutes the input, with : where does it go, and by how much is it attenuated for ?
Solution
Solution of Exercise 9.10.
(a) . (b) The component at lands at and passes the filter with ; the power transmission integrates to . (c) ; needs , : an hour per point. (d) To and , attenuated by ().
Exercise 9.11 ★★★
Quartz. A quartz crystal behaves, near its resonance, as a series , , branch (, , ) in parallel with . (a) Series resonance frequency and quality factor . (b) Why does an oscillator built around it hold its frequency to a part in while the Wien bridge drifts by percent (think of the phase slope of the feedback network near resonance, )? (c) A watch crystal at is divided by : result; its frequency varies as : error per month at . (d) Why is chosen and not ?
Solution
Solution of Exercise 9.11.
(a) ; . (b) Near resonance the feedback phase turns by per unit : a parasitic phase shift moves the frequency by — for , percent for . (c) ; : slow per month. (d) Low frequency means low power in the dividing logic, divides exactly to , and the tiny tuning-fork crystal fits a watch.
Exercise 9.12 ★★★
Negative resistance. An op-amp has from output to input, from input to ground, and from output to input; the dipole seen between the input and ground is studied (linear regime). (a) Show that it behaves as a resistance . (b) This dipole is connected across a parallel circuit of loss resistance (in parallel): write the equation of the voltage and find the condition for sustained oscillation and the frequency. (c) Numbers: , , ; choose , . (d) What limits the amplitude, and how does this oscillator compare with the Wien bridge?
Solution
Solution of Exercise 9.12.
(a) , ; the current entering the dipole, : . (b) : sustained when , at (growing for smaller ). (c) , (say ). (d) Saturation; the tank’s gives a far steadier frequency than the Wien network.
9.7 Problem: A lock-in measurement chain
Problem 9.1
Weekend problem — from the reference oscillator to the digitized result: measuring ten microvolts of light signal under a millivolt of noise
A faint light is to be measured with a photodiode. The light is chopped by a rotating wheel at , so that the photodiode’s output is a sinusoid of amplitude at (after a first amplifier), on which rides a white noise of spectral density over a bandwidth of , plus a mains pickup of . The chopper’s own frequency is set by a Wien-bridge oscillator.
Part I — The reference oscillator. Wien bridge with , op-amp saturating at .
- for .
- Derive the transfer function of the Wien network and check that its phase vanishes at with modulus .
- Write the differential equation of the loop for a gain ; for , time for the amplitude to grow by a factor .
- The amplitude is finally limited by saturation: describe the waveform, and why its harmonics matter for a reference.
- A thermistor in place of (resistance falling when it warms) or a lamp (rising): which one stabilizes the gain at 3, and how?
- The capacitors drift by with temperature: new frequency. Why does the chopper then still work for the measurement (what must the reference do)?
- The Wien network has a quality factor of about : what does that imply for the purity of the frequency compared with a quartz ()?
Part II — The signal and the noise.
- Rms value of the white noise over the full ; signal-to-noise ratio at the amplifier output.
- A band-pass filter of quality factor centred on (noise bandwidth ) is inserted: noise rms and SNR. Why is this not sufficient for a precise measurement (think of drifts and of the )?
- Why chop the light at instead of measuring the DC photocurrent directly? (Amplifiers have "" noise rising below a few hundred hertz.)
- Signal amplitude if the chopper wheel produces a square modulation instead of a sine: which harmonic does the lock-in keep, and with what amplitude (Fourier coefficient for the fundamental of a square wave of unit amplitude)?
- The photodiode also receives room light at (fluorescent tubes): what does the chain do with it?
Part III — Synchronous detection. The amplified signal is multiplied by the reference and filtered by a first-order low-pass of time constant .
- Output of the multiplier for the signal alone (phase between signal and reference); the DC term.
- Attenuation of the term by the filter for (in dB).
- Equivalent noise bandwidth ; rms noise at the output for and the SNR; same for .
- Where does the pickup end up, and with what attenuation for ?
- The phase is unknown: what is lost if ? Describe the two-channel (in-phase and quadrature) lock-in and how it recovers whatever .
- Response time of the measurement (time to reach of the final value) for ; the trade-off it expresses.
- The reference drifts to while the chopper stays at : output of the lock-in; why the reference must be taken from the chopper itself.
Part IV — Digitizing.
- The lock-in output is sampled by a computer: minimum rate for (take the output bandwidth as ); a comfortable choice.
- Alternatively the raw signal is digitized and the detection done in software: minimum sampling rate; the noise extends to — what must be done before sampling, and what attenuation at does a sampling at with a fourth-order filter cut at give ( per decade)?
- A -bit converter on : step; the signal amplified by : how many steps, and does the noise help or hurt?
- Digital lock-in: the computer multiplies each sample by and averages samples. At , for a average; by what factor is the white noise reduced, and is it the same as the analog filter’s?
- A signal sampled at : what does the computer see? How does this relate to the lock-in’s own principle?
- Summarize the chain in a table: each stage, what it does to the signal, what it does to the noise.
Solution
Solution of Problem 9.1.
1. .
2. : real, , at .
3. ; time constant ; : .
4. A sine with flattened tops: odd harmonics. A reference rich in harmonics also detects the signal’s harmonics (and noise there): the result no longer measures the fundamental alone.
5. The lamp: as the amplitude rises it warms, rises and falls to . A thermistor in place of would do the opposite (it belongs in place of ).
6. : . The lock-in reference is taken from the chopper itself (a detector on the wheel), so it follows.
7. : a small phase shift anywhere in the loop moves the frequency by percent; a quartz’s holds it to .
8. rms: SNR .
9. : , SNR — but the filter’s centre drifts with its components, and the pickup is only attenuated by : , half the signal.
10. Below a few hundred hertz the amplifier’s noise and drifts dominate; at the noise floor is white and low, and offsets do not count.
11. A square modulation between and is : the lock-in keeps the fundamental, .
12. is mixed to and and removed by the low-pass.
13. ; DC term .
14. : .
15. : against : SNR ; : , SNR .
16. To and : attenuated by (): of ripple, a tenth of the signal — still worth a notch filter upstream.
17. : half the signal. A second multiplier with the reference shifted by gives ; with , and , whatever .
18. ; the noise falls as , the measurement time grows as .
19. The difference term is , passed by the filter with : a slow oscillation instead of a level. The reference must be coherent with the signal: take it from the chopper.
20. Bandwidth : above ; is comfortable.
21. At least ; an anti-aliasing filter is mandatory; fourth order at : at (and at , the noise that would alias onto ).
22. Step ; is steps; the amplified noise ( rms) spans many steps and, averaged, lets the mean be resolved far below one step: it helps.
23. ; the white noise falls by ; a boxcar has a noise bandwidth — twice the analog ’s, comparable.
24. The samples walk slowly through the sine: a alias. The lock-in does the same thing on purpose: sampling at the reference phase is multiplying by the reference.
25. Chopper: signal moved to , noise unchanged (but the part avoided). Amplifier: both gain. Multiplier: signal to DC, noise spread. Low-pass: signal kept, noise cut to . Sampler/ADC: signal digitized, aliases and quantization controlled by the filter and the bit count.