Archive for December, 2008

Color Theory and Music

Monday, December 29th, 2008

There are some amazing parallels between color theory and music.  The color wheel is a basic tool from color theory that shows the relationship between the colors of the rainbow.  Colors directly across from each other are called complementary colors and tend to give the most striking contrast.

Color Wheel

These colors may be combined using various color schemes – each giving its own sort of “feel”.  If each of these colors is now associated with a note from the chromatic scale, then it turns out that the way a color scheme is perceived is very similar to the way the associated note combination is perceived.

Yellow → C
Yellow-orange → C#/Db
Orange → D
Red-orange → D#/Eb
Red → E
Red-violet → F
Violet → F#/Gb
Blue-violet → G
Blue → G#/Ab
Blue-green → A
Green → A#/Bb
Yellow-green → B

This “mapping” is somewhat arbitrary and could be shifted, provided the order is maintained.  Is C a “yellow” note?  I don’t know, but perhaps somebody who experiences synesthesia would have a preference.  Here are some examples of color combinations and the associated note combinations:

Monochromatic / single note

A single color or a single note is generally uninteresting (unless you really just love that color/note).

Analagous / dyad

An analagous color scheme uses two nearby colors on the color wheel.  It is much more interesting that a monochromatic color sheme.  A dyad consists of two notes, again this gives much more interest than a single note.

Complementary / tritone

A complementary color scheme is very striking and gets your attention.  It is good for adding interest, but a little goes a long way.  In music, the tritone is the most dissonant of intervals and is used sparingly to create tension.

Split complementary / chord

Rather than using the color directly across on the color wheel, a color on either side is used.  This creates a pleasing combination without the stark contrast of the complementary color scheme.  Similarly, a musical chord creates interest, potentially even more than a dyad, while not being as dissonant as the tritone.

Beauty is Truth

Thursday, December 18th, 2008


“Beauty is truth, truth beauty, – that is all ye know on earth, and all ye need to know.” – John Keats

A former co-worker of mine, Alexey Astanovitskiy, told me what his father had told him with regard to electronics design: “If it looks beautiful, then it will work beautiful.”  He was a very gifted designer and I have sought to emulate his example ever since.

This beauty in design goes beyond that which the customer is intended to see (i.e. the outside of the product) – it is in every aspect of the design, right down to the layout of the PCB.  Take off the cover and look inside (please unplug the unit, allow some time for the capacitors to discharge and don’t touch anything).  Was the layout put together last minute with little attention paid to aesthetics and the difficulties of switching design?  Was the designer involved with this critical part of the design, or was it simply handed off to a layout person to “finish it up”?  Gaps like this in execution can turn an excellent design into a marginal product.

It is the little details that make a big difference.  The ones that nobody may ever be consciously aware of.  However, audiophiles do have an interesting habit of noticing these “little details”.

Precedence Effect

Monday, December 15th, 2008


The precedence effect is a particularly important psychoacoustic effect for audio systems.  Based on arrival time, a given sound is broken up into three distinct bands:

t < 5mS

This is the first arrival interval.  It is essential for localization.

5 mS < t < 30mS

This is the integration interval.  Any additional sound that has the same “nature” as the original will be integrated and will not affect localization information.

30mS < t

This is the interval beyond the domain of the precedence effect.  Any additional sound that has the same “nature” as the original will be perceived as a quick echo.

What does this mean for audio system design?  For pro audio applications, it allows for sound reinforcement – for example public address.  The source itself may be much lower level than the reinforcement, but as long as the source precedes the reinforcement by about 5mS to 30mS, the source will still be perceived as the origination of the sound.  For audiophile applications, it means that a loudspeaker should have minimal stored energy if there is to be any hope of presenting a stereo image.  Also, diffraction should be minimized, as this produces multiples sources with an arrival time that falls within the 5mS window – thereby confusing localization.

Physics Friday – Hamiltonian Mechanics

Friday, December 5th, 2008

Hamiltonian mechanics is an elegant way of formulating problems is classical mechanics.  Also, it provides insight into the world of quantum mechanics, as is evident with the Schrodinger equation.

The basic equations:

\dot{q}=\frac{\partial }{\partial p}H

\dot{p}=-\frac{\partial }{\partial q}H

Where q=q(t) are the generalized coordinates and p=p(t) are the generalized momenta.  H is the Hamiltonian and represents the total energy of the closed system (i.e. conservative) under consideration.  H=T+V where T is the kinetic energy and V is the potential energy.  Also note that \dot{q} represents the time derivative of the position, or the velocity, and that \dot{p} represents the time derivative of the momentum, or the force.

These two equations yield the evolution of the mechanical system.  Aesthetically they are quite pleasing, owing to their nearly perfect symmetry.

Magnetics Design

Thursday, December 4th, 2008

Horseshoe Magnet

The design of the magnetics for switching supplies and switching amplifiers can be very challenging.  There tends to be an aura of mystery surrounding it, thus making things even worse, but with a few good guidelines and some carefully selected resources it can be reduced to as near a science as engineering ever is…


• The primary and secondary windings should be as close to each other as possible over their entire extent.  Unfortunately isolation requirements do not usually allow for this.

• If a winding is inserted between a primary and a secondary, then a current will flow in this winding – this can result in significant extra losses.  If it is necessary to do this (e.g. multiple windings in a flyback), then the highest power secondary windings should be placed closest to the primary.

• Making a single winding with multiple layers can result in very high losses.  Refer to “Dowell’s Curves” to see how the number of layers affects the ratio of ac to dc resistance.

• With two adjacent windings, the current will tend to flow on the inside surface of each winding – this is the proximity effect.  This results in even less effective conductor area than would be estimated given the skin effect alone.

• As a general guideline, make core losses as high as practical, relative to copper losses.  This helps to decrease leakage inductance, copper losses, etc.

• Gapped ferrite cores often yield lower core losses than powdered iron cores, however the fringing field due to the discrete gap can result in significantly higher copper losses.


• An estimate of the magnetic losses in a design

• A list of magnetics design “myths” from Ridley Engineering

Eddy Current Losses in Transformer Windings by Lloyd Dixon

Magnetics Design for Switching Power Supplies – Section 3 by Lloyd Dixon

• Switching Power Supply Design by Abraham Pressman

• Fundamentals of Power Electronics by Robert Erickson

Switching Supplies for Amplifiers

Wednesday, December 3rd, 2008


There are a few switching power supply topologies that are particularly important for audio amplifiers – each with its set of advantages and disadvantages:


The flyback tends to be the least expensive of the switching supply types, as it uses only one negative rail-referenced switch.  It also lends itself well to multiple regulated rails, so it makes for a very nice auxiliary supply in an amplifier.  This type of switching supply is generally not used as the main supply for audio amplifiers for these reasons:

• All transferred energy must be stored in the core
• The switching is usually hard switching, which may present issues for audio performance
• Use of a single switch also limits the maximum power


The push-pull makes use of two switches that are both negative rail-referenced.  This type of supply is very useful for car audio amplifier power supplies.  It generally sees little, if any, use in mains-powered audio amplifiers.


The half-bridge uses two switches as does the push-pull, however one of the switches is not referenced to the negative rail, instead it is “floating”.  This complicates the drive requirements somewhat, however there are significant benefits:

• Resonant switching is easily achieved for higher efficiency and lower system noise
• Resonant transitions are automatically clamped at the rails, so energy due to magnetizing/leakage inductance is recycled
• Maximum use is made of the transformer core and windings


A full-bridge supply is essentially a combination of two half-bridge supplies with the switch timing adjusted accordingly (i.e. alternating).

There is one interesting variation of the full-bridge supply that allows for both resonant switching and output voltage regulation – this is the phase shifted full-bridge.  It achieves zero-voltage switching (ZVS) which is ideal for MOSFET type switches.  One important detail is that the MOSFETs must have fast intrinsic body diodes or the supply can suffer from reliability issues with light loads.

Power Factor Correction

Power factor correction (PFC) is starting to find its way into amplifier power supplies.  It is not a power supply per se, as it provides no galvanic isolation, rather it is an additional stage that is placed before the main power supply (e.g. half-bridge, full-bridge, etc.)  There are benefits to using a PFC front end:

• Maximized utilization of a given ac service (i.e. unity power factor)
• Universal input (85Vac-265Vac) with a regulated bus voltage
• Higher bus voltage (~400Vdc) for greater bus capacitor energy density

Unfortunately, TANSTAAFL applies and a PFC front end suffers from these downsides:

• Reduced system efficiency (e.g. if the system efficiency is 85% without the PFC and the PFC itself is 85%, then the net efficiency with the PFC is 72%)
• Reduced system reliability (all the power flows through this stage and it is usually a hard-switched topology)
• Possibility of increased EMI and system noise due to high power hard switching

Auditory Illusions

Tuesday, December 2nd, 2008

MC Escher Relativity

Much as optical illusions teach us a tremendous amount about how our vision works, auditory illusions provide the same sort of insight as to how our hearing works.

Illusions are a great learning tool because they are both fun and memorable.  Dianna Deutsch has developed some particularly interesting and revealing auditory illusions.

The knowledge of this and other elements of psychoacoustics is essential for audio design, so put on your headphones and enjoy!

Transconductance Amplifiers

Monday, December 1st, 2008


A transconductance amplifier takes an input in voltage and converts it to an output in current.  For a fixed resistive load the result is identical to a typical amplifier (i.e. a voltage amplifier), however for a varying or a reactive load the results are much different.  The relationship between the two is given by Ohm’s law V=I·R.

Given the wildly varying impedance curves of most loudspeakers, why would anybody want to use a transconductance amplifier?  The reason is that research shows a 20-30dB reduction in mid-band distortion is possible with current-driven loudspeakers.  This mode of operation is suitable for MF/HF drivers, but not for LF drivers as the current technology requires the majority of damping about resonance to be provided by the power amplifier.  It is possible this may change in the future if the benefits of current-drive are realized commercially (e.g. with the addition of a shorting ring to control resonance).  Please refer to this paper by Mills and Hawksford.

Distortion mechanisms reduced by current-drive:

• Thermally induced compression
• Nonlinear voice coil inductance
• Hysteresis from metal core
• Eddy current distortion

Another nice feature of transconductance amplifiers is built in overcurrent protection.  Since output current is the controlled variable, shorting the output will not increase the current level.  Also, an open circuit will simply result in amplifier clipping.  The reason for this is that, much as the ideal output impedance of a voltage amplifier is zero, the ideal output impedance of a transconductance amplifier is infinity.