My Support Pages

Monday, 9 October 2023

That 0-degree Phase Difference in Oscillators

This blog post arose from emails exchanged with a reader in 2015. The reader Frédéric — a newbie, sought to understand how the various sinusoidal oscillators worked in his circuits. He wanted explanations with little math & physics. Answering back, I realized how poor my basic oscillator theory teachings skills were. I studied up and wrote him a series of emails based on simple bench experiments. This Fall, I enhanced that content and even repeated many of the experiments. With joy and generosity, I present this content.

Introduction

Oscillators form the heart of radio frequency design & building. When you read oscillator papers written by genius electronics professionals, they might go something like this:  They start off with the Barkhausen criterion & equations (of course). Then, they may veer straight into a series of equations using vector algebra complete with upper and lower case Greek letters; radians + total admittance in rectangular coordinates and perhaps more — all mixed in gruesome equations. Then comes the inevitable root locus plot, the showing of loop gain via a third-order voltage transfer function, and then finally they may go off into byzantine filter theory using complex conjugate poles. Absolutely fabulous stuff if you’re an engineer or physics major – and yes, I do exaggerate for fun.  
 

All fun aside, understanding oscillator best practices ranks as problematic for some pros and amateurs alike since oscillators are non-linear circuits with linear aspects. You’ll find seemingly endless schematics to puzzle over. I’ve read that there are 18 or more variants of the Colpitts oscillator alone — spanning LF to terahertz.

Design & analysis of oscillators usually involves 3 basic methods:

[1] Negative resistance method using the +/-R & jX operators.
[2] Reflection amplifier method using scattering parameters & reflections (S11 and/or S22).
[3] Positive feedback loop method.  This seems the easiest way for newcomers — I’ll only discuss concepts from the positive feedback loop method.

The 2 minimal conditions according to the Barkhausen conditions:
To oscillate + sustain:  the input & output phase difference must be zero; and the whole loop gain must = 1 or greater than 1.

These are important minimal requirements. Real oscillator designers strive to achieve other goals that may include biasing for the best amplifier operating point, boosting resonator Q, lowering phase noise, and/or enhancing temperature + amplitude stability. They may work to reduce loading effects on the frequency determining circuit by the gain stage, or, perhaps, to fit the oscillator into a very tiny footprint. We’ll ignore all that stuff.

Let’s begin our minimum math discussion with the table of contents:

[ SECTION 1 ]   Phase Difference
[ SECTION 2 ]   Feedback & Function

[ SECTION 3 ]   B E N C H   E X P E R I M E N T S
  via 3 basic types of frequency determining feedback networks
   a.    Transformer
   b.    Pi phase shifter
   c.    Tuned input and output

[ SECTION 4 ] Conclusion
[ SECTION 5 ] References

---------- [ SECTION 1 ] Phase Difference ----------

Phase difference is the time interval between a discrete event occurring on 2 or more wave forms. The discrete event occurring at a point in time may be the positive peak of a sine wave, or perhaps the rising edge of a square wave, or something else. In electronics, 1 way to express time (phase) difference is in degrees.

Above — Two identical frequency sine waves. The discrete event in time is the positive peak of the sine wave. Wave A leads wave B. You might also say that B lags A.  The time difference of these 2 events relates to the phase difference between the 2.  This figure shows a very simple formula to help beginners.  

Phase difference = the time difference between the discrete event in A and B divided by the total time of 1 complete cycle. That value gets multiplied by 360 to convert it to degrees. Thus, when total time = 1 second; if the time difference = .25 seconds, the phase difference = 90 degrees.  If the time difference = 0, then the phase difference is 0 — & the 2 waves are said to be in phase.

Above — I built a simple pi filter designed to give a 90 degree phase difference at 3.58 MHz when comparing the output to the input or vice versa. A signal generator set to 3.58 MHz with a 50 Ω output impedance was connected to the filter. The filter output got terminated in the 50 Ω input of my DSO. I placed a 10X probe on the filter input to give 2 channels. The DSO output shows a 90 degree phase difference between the 2 waves at 3.85003 MHz. 

I had to tweak the frequency a little to account for real-world variances of the L C parts. We might say that the output was phase shifted 90 degrees compared to the input. The terms leads or lags with respect to 2 travelling waves might help firm up the concept of a time difference between the 2 signals in your mind.

In more advanced analysis with math, the phase difference gets characterized by a measured quantity known as a phase angle.

---------- [ SECTION 2 ] Feedback and Function ----------

Feedback

A portion of the output signal (either a voltage or a current) is connected to, or “fed back” to the input. We'll focus on voltage feedback in this presentation.

Negative feedback 

The fed back output signal has a 180 degrees phase difference with the input signal. This is called anti-phase, or inverted phase. Negative feedback bucks or subtracts from the input signal and gets called degenerative feedback. 

Positive feedback

The fed back output signal is identical in phase to the input signal. This is called in-phase or a 0 degree phase difference (it may also be 360 degrees, or multiples of 360 degrees). Positive feedback adds to the input signal — it sums with the input voltage causing the output to increase and gets called regenerative feedback.

To sustain oscillation, the feedback must be positive since apart from power supply DC, an oscillator lacks an external input signal. The oscillator amplifier output goes to a buffer for external circuitry, plus, some portion of the output goes through a frequency determining network and back to the input with no net phase difference at the oscillation frequency. E.g., a positive feedback loop at 1 frequency.
 
A proper oscillator produces a repetitive output waveform. This output waveform may be sinusoidal (sine wave) or non-sinusoidal. We’ll focus on sinusoidal or near-sinusoidal RF oscillators that use LC  inductor/capacitor circuits.

The oscillator as a filtered noise amplifier

Some impulse(s) must trigger the loop circuit to start oscillating. This might be turn-on noise, plus random noise from loop parts such as transistor thermal noise. That bit of noise loops around from output to input and starts the ball rolling.

Initially, positive feedback will cause the signal amplitude to build up and the active device will operate in it’s undistorted linear region. Eventually the rising linear oscillation amplitude will push the device into saturation and gain becomes nonlinear (distorted) & clipping + compression occurs. In its saturation region, amplifier gain tends to decrease as the signal amplitude moves towards the DC power supply voltage. At some point, the amplitude will reach steady state with stabilized or “limited” amplitude. The final amplitude depends on complex factors that may include the amplifier non-linear device characteristics and how deep into non-linear operation the gain stage goes.

Thus, at the loop frequency determined by the frequency determining circuitry, where the input and output phase difference is 0, a signal will arise having fundamental, harmonic and noise energy.
 
The loop gain criterion >=1 does not imply the amplifier voltage gain is 1 or 0 dB. The amplifier must provide enough gain to overcome circuit losses, plus have enough gain for start up — and to sustain oscillation in a variety of conditions such as adverse temperature or load changes. Further, losses may vary with the type of resonator circuit. A crystal or SAW resonator will give more insertion loss than an LC tank or pi filter at resonance.

Finally, the oscillator output harmonic distortion and stability is affected by the Q of the frequency determining network. A high Q circuit filters more sharply, so signals fall off from the resonant frequency more quickly than a low Q circuit. A high Q network also incurs less losses than a low Q circuit at resonance. The Q may also affect stability since non-linear amplifier function may vary with the degree of filtration offered by a given frequency determining network.

---------- [ SECTION 3 ]   B E N C H   E X P E R I M E N T S ----------

    via 3 basic types of frequency determining feedback networks
    [ 3a ] Transformer

   

Above — A common base BJT oscillator using transformer feedback. For the Section 3 experiments, I show minimalist, biased & functioning circuits at 1 frequency. By going with split DC supply, we enjoy a reduction in bias circuitry to allow a clear view of the frequency determining feedback network and amplifier. Each circuit employs a 10K resistor connected to the negative DC rail to provide a current source. All the circuits run between 0.8 to 1.3 mA DC current for easy comparison. To measure the emitter/collector current measure the voltage drop across either 100 Ω resistor and use Ohm’s Law to calculate current.


Above — To sample the output in my DSO, I placed 1 turn of wire through the T68-2 toroid & grounded 1 end. A 10x probe is connected to the hot end. Normally, we use a linear buffer with oscillators. Again, my approach is minimalist, so the basic oscillator circuit gets emphasized.

Above — Output wave forms of the common-base BJT oscillator with no 8K2 shunt resistor [left] and as shown in the schematic [right]. In most basic oscillator circuits amplitude regulation gets achieved by the BJT going into clipping — clipping maybe minimized if the BJT gain is just high enough to maintain oscillation, but you need enough gain to start oscillation and sustain it with temperature changes. In the right sided DSO tracing, the 8K2 shunt resistor reduces transistor gain and thus clipping. The only thing that stabilizes oscillation amplitude is the non-linear activity of the BJT. The powdered iron inductor measured 4.67 uH.

Above — A common gate version of the above oscillator.

Above — The DSO output of the common gate oscillator with lower distortion than the BJT equivalent. In general, like with tubes, JFET oscillators go into gain compression more gradually than a BJT, so oscillation amplitude regulation occurs with less distortion. Further, FETs offer quicker + better temperature stability, plus less heat dissipation into nearby circuitry compared to BJTs.

Above — An FFT of the common gate oscillator. The 2nd harmonic lies ~ 44 dB down. I found that the feedback coupling cap could go as low as 100 pF before it ceased to oscillate. From 100 to 200 pF the amplitude varied directly with the capacitor value.   Above 200pF it made little difference to the amplitude up to 1000 pF ( the maximum value I tried with the coupling capacitor). This capacitor mainly serves to block the negative DC voltage flowing directly to ground through the secondary winding — AC coupling. In many oscillators, capacitors are used to AC couple circuits, but may also be part of the frequency determining network.

Discussion

Shown above is the classic Armstrong transformer feedback oscillator (also called the Meissner oscillator). The feedback gets coupled via an untuned secondary winding on the LC parallel “tank” resonator. The secondary gets called a tickler by some. Feedback networks maybe manipulated to provide the correct amount of feedback, provide a phase shift and also to impedance match the input to the output.

A common base/common gate amp runs a low input impedance and quite a high output impedance which the transformer turns ratio reflects.

The common base/common gate amp provides zero phase shift from the transistor input to output. In order for the phase difference at the oscillator amplifier input to be 0, the frequency determining network must also provide zero phase shift as shown by the phasing dots on the transformer primary and secondary. The tank, a parallel resonant circuit, is 1 all experimenters should know about. In summary, at resonance, XL = XC and the impedance is maximal (considered a pure resistance).

 Above — The oscillator circuit with a common emitter (A) and common source (B) amplifier.

Above — DSO output wave forms for the (A) BJT and (B) FET oscillators. These amplifiers invert the phase of the signal from input to output (180 degree phase shift). Thus, the frequency determining network must also invert the phase. The parallel tank itself has 0 phase shift, so the secondary winding of the tank is where we perform this phase inversion. Note the polarity or phasing dots on the transformers.

Above — For newcomers to decode oscillators, a good place to start is to know whether your amplifier(s) invert the phase from input to output. A and B are op-amps shown in the inverting and non-inverting forms. When using logic gates biased as “linear amplifiers” we often employ inverters (a dead giveaway whether phase inversion happens). D shows the 3 equivalent BJT + FET circuits and whether they invert from input to output. This is something to memorize. If the oscillator contains 2 BJTs or FETs like in the Franklin oscillator, you identify whether each device inverts or not — and then trace the signal path though the loop.

Above — I built a version of the common emitter oscillator with too few secondary windings and the DSO results lie above. The oscillator starts, but then poops out because positive feedback voltage was too low in amplitude to sustain life.

On the other hand, if you make the feedback voltage too high in amplitude; depending on the amplifier type plus other factors, you may incur some bad side effects. This might include affecting amplifier input impedance and bias stability, loading the frequency determining network — or squegging. Squegging is more common in some oscillator topologies and/or oscillator amplifier types than others.

Essentially — undesirable parallel oscillations arise. A great example is motor boating in an AF power amplifier.  Too much signal amplitude excessively charges the feedback coupling capacitor and this changes the bias of the amplifier in repetitive bursts. Keeping the feedback coupling capacitor value down as low as possible is an easy way to crush squegging in oscillators where squegging might occur.

Let’s move to the second type of frequency determining feedback networks: the pi network.

 [ 3b ] Pi Phase Shifter

The humble ¼ wave pi network, whether made from L + C parts, or a transmission line such as coax or microstrip line serves as a fundamental building block in RF design. ¼ wavelength pi networks may function as impedance matcher, filter, phase shifter, frequency determining network, frequency controller, or a line balance converter just to name a few of its possible functions.

Those who work with antenna designs will get this — a ¼ wave coaxial matching transformer or stub can match a high impedance to a low impedance e.g. a capacitive reactance at 1 end may appear as an inductive reactance at the other.

The pi phase shifter is a representative feedback network for a bunch of famous oscillators. A high Q LC pi network at resonance (at its cutoff frequency peak) will function similarly to a bandpass filter. Studying the pi feedback network in the oscillators that follow may boost your insight into understanding many of the popular oscillators that are named after their inventor.

The frequency determining network of a Colpitts oscillator uses capacitive feedback, the Hartley uses inductive feedback, while the Vackar uses capacitive feedback plus a parallel LC tank. Further, these circuits may employ tapped capacitors or inductors to establish the correct feedback level at the oscillator’s amplifier input.

In a feedback loop, apart from the resonator components in a feedback loop, any stray inductance or capacitance from loop parts becomes part of the network. Of particular concern is the internal capacitances of the amplifier. Both FETS and BJTS have internal capacitances that vary directly with temperature — If temperature goes up so do these capacitances. The end result is frequency drift as temperature goes up and down. 

Designers may work to minimize this drift by various mechanisms ranging from carefully regulated DC voltage to putting the oscillator in an oven chamber. With respect to our feedback network, they might try to reduce the impact of amplifier internal capacitance by absorbing or swamping this C with external capacitors in the feedback network. The aim is to minimize the effect of device internal capacitances in determining the oscillation frequency. For example, place a large capacitor in parallel with a nearby internal capacitance to absorb it.

I’ve read that from a frequency spectrum of DC to daylight, the theoretical phase shift range for a pi network is 0 to 270 degrees. So far, I’ve only built them with a phase shift from 0 to just over 180 degrees.

Above — A low pass form pi network phase shifter is added to a common emitter oscillator amplifier at A. I changed to using a 5 pF capacitor AC coupled to a 100K resistor as a load to measure across with my 10x probe (B).  The RFC was just a random 1 mH epoxy-coated choke that was lying on my bench. I measured it at 920 µH. This choke serves only to prevent the collector AC output from passing though the 0.1 µF capacitor to ground and the value isn’t critical. 

The CE transistor amp inverts the signal, so the feedback determining network must also invert the signal. The low pass form pi network serves as a metaphor to the Colpitts oscillator. I experimented with the feedback capacitor by placing a 5-450 pF air variable cap in its place and settled on 47 pF because it gave stable and sustained oscillation. Going below 40 pF ceased oscillation. If you change any value of capacitor or the inductor value, the output frequency will change.

The most common direct example of a low-pass pi style network phase shifter is that of the Pierce crystal oscillator shown as the inverting gate oscillator in an earlier diagram. The phase shift/frequency determining network includes a crystal functioning as the resonator. The entire feedback network also includes the output resistance of the gate.

Some logic ICs such as the 74HC4060 ripple counter; or any number of microcontrollers include an inverter gate so you may wire up an RC or crystal Pierce oscillator.

Above — the DSO time domain waveform of the pi low-pass oscillator.

Above — Schematic and DSO measured output of a common emitter + high pass form pi network phase shifter. The network required an additional 0.1 µF AC coupling capacitor to prevent a DC short to ground through the left hand inductor. The series resonant frequency of that 0.1 µF cap = 6.6 MHz, so it provides a low impedance to the 7.35 MHz signal.

The high pass pi network version provides a metaphor to the Hartley oscillator. At their resonant frequency, many popular oscillator frequency determining networks resemble the circuitry & function of the pi phase shifter circuit in some form.

Above — A sidebar experiment using standard value series 100 pF capacitors that match a parallel tank to 50 Ω input & output Z at 7 MHz.


Above — A DSO trace of the above schematic showing a phase inversion. I had to tweak the frequency slightly to allow for L C variations from the design to get 180 degrees. The key point = RF filters using various topologies exhibit phase shift that changes with frequency within their pass-band, stop-band and roll-off frequency range in accordance with filter reactances & topology.  

Applying L C networks, you may manipulate filter network impedances & reactances to get a desired phase shift at a particular frequency or frequency band.

Most oscillator’s seen in amateur literature are copies of someone else’s oscillator that’s kept exactly, or perhaps scaled to another frequency. This works fine in many cases. You may also figure lots out by performing experiments on your bench, or by pursuing computer-aided design & simulation.
Actually designing oscillators for specific goals requires math + measurement that goes beyond the scope of this blog post.


Above — Frédéric pointed out I had not made a common drain nor common collector type oscillator, so I built the very simple Colpitts design shown above. It’s your job to figure out the phase shifts. Does the common collector/common drain amplifier invert the signal from input to output?

Let’s wrap up and go to the 3rd and final basic type of frequency determining feedback networks you might see in your travels.

 [ 3c ] Tuned input and output

Above — A tuned input + tuned output oscillator or TITO oscillator with a common source amp. I had to tune the gate tank since its pretty difficult to match up 2 L C tanks without at least 1 variable capacitor.
The common source JFET amp inverts the signal. The TITO uses a bandpass filter phase shift network to invert the feedback signal back to 0 phase difference at the JFET input. The bandpass filter (called a 3 element pi section in my old ARRL handbook) gives the needed 180 degree phase shift.

Above — The DSO tracing for TITO.

[ Section 4 ] Conclusion ----------

I provided a basic, non-math introduction to RF oscillators using simple but functioning designs. The same principles apply to oscillators that use a crystal, SAW, coaxial, or MEMS resonator instead of an L C type circuit.
 
[ Section 5 ]    References  ----------

The Oscillator as a Reflection Amplifier, an Intuitive Approach to Oscillator Design,” by John W. Boyles, Microwave Journal, June 1986, pp. 83–98

Lindberg, E. (2013). Oscillators - a simple introduction. In Proceedings of ECCTD 2013 IEEE

M. Gottlieb, Practical Oscillator Handbook, Butterworth-Heinemann, London, 1997

R.W. Rhea, Oscillator Design and Computer Simulation, 2nd Edition, Noble, 1995

Yasuda, T., Uchino, K., Izumiya, S., Adachi, T., & Senanayaka, S. S. (2013). 433 MHz wide-tunable high Q SAW oscillator. 2013 Joint European Frequency & Time Forum & International Frequency Control Symposium (EFTF/IFC), 744–746

4 comments:

  1. super clear explanations

    ReplyDelete
  2. Thank you Vasily. So glad when you post radio topics and give us pro quality information You have a knack for explaining things so people can understand and grow. We appreciate you old man! Regis Boden

    ReplyDelete