Analog Delay in a Car Audio System
Disclaimer: this discussion assumes that you are familiar with basic electronics and amplifiers, and is not a tutorial on how to wire up circuitry. If you are unfamiliar with making these kinds of modifications, do not attempt to do so. It is possible to damage your amplifier attempting to wire up these circuits.
The problem with car interiors
The interior of a car is not an ideal environment for audio for a number of reasons (reflections off of various hard surfaces, for one thing), but the worst problem has to be that the listeners are not able to sit directly between the left and right speakers. Stereo sound works great if you can sit exactly in the middle, as you can do at home, if you arrange your furniture. Even if not, at home you often have a center channel to anchor voices towards the center, allowing you to sit somewhere other than the “sweet spot” and still get acceptable imaging. Not sitting directly between two stereo speakers generally means you won’t get a really good stereo image, hearing most things out of the left speaker and no good center focus, with singers sounding a bit out-of-phase. This is caused due to the diffence in distance between the speakers creating a phase difference, which can also affect the volume of individual frequencies by addition or subtraction as the phase is offset, but the main problem is our perception of phase.
The distance from center can be compensated for by using a DSP to delay the sound of one or more speakers as well, and is often termed, “time alignment”. This is a common approach with aftermarket systems, however, it generally requires the replacement of most or all of the system, requiring added cost and installation of a DSP and amplifiers, etc.
Why is phase important? The theory
Sound is localized by our hearing through the midrange frequencies, the same frequencies in which we hear the fundamentals of vocals. So, getting the phase right in a particular range (around 300Hz to 800Hz) is important to having a more coherent sound. Wikipedia article on Sound Localization
When sitting closer to one speaker, the left signal becomes out-of-phase with the right signal, depending upon the frequency. This phase difference is frequency-dependent because the size of the sound wave, as in the peak-to-peak distance, is frequency-dependent. If the phase difference is 180 degrees, then it is no different than if the polarity of your speakers were reversed and you sat in the middle – voices will sound out-of-phase and smeared across the sound-stage and not centered. The theory is, if you can flip the polarity of the speaker, it will also fix the out-of-phase effect at the driver’s seat… for some frequencies. Other frequencies may be worse. Many years ago, if you felt that you weren’t getting a good phantom-center sound, it was not uncommon to flip the polarity of the left speaker; in some cases, this would make voices sound more centered and in-phase (but losing bass). The question is, which frequencies are more important to be in-phase at the driver’s seat?
The loudness difference caused by sitting closer to the left speaker also makes some impact, but this may be lessened due to off-axis performance of the speakers (or a slight balance control adjustment if necessary).
The X1 Example
Measuring the distances between the left and right speakers to my head at my normal seating location, the left speaker is about 16 inches closer to my ears. It would be ideal to be able to delay the timing of the left speaker such to compensate for the 16 inches. So, what affect is this having on the sound?
Using an estimate of the speed of sound at 1125 ft/sec., let’s look at some individual frequencies. 800Hz works out to a wavelength of 1.4 feet. So, there’s really not much of a difference between sitting at the driver’s seat or sitting directly between the two speakers, when it comes to 800Hz. If you reverse the polarity of one of the speakers, the sound wave will be out-of-phase at about 800Hz.
At 400Hz, the wavelenth is 2.8 feet, so at the listening location, the wavelength will be 1/2 ahead of the right speaker, effectively 180 degrees out of phase. Nearby frequencies will be somewhat offset, less and less the further out you go, but by the time you reach 800, it’s fine, as the wavelength is back in phase with the right speaker. In theory, if we could flip the frequency range near 400Hz 180 degrees, it could fix much of our localization problem, at least with the lower midrange frequencies. However, simply reversing the polarity of the left speaker will cause major problems with the bass frequencies. With their long wavelengths, 180 degree out-of-phase sound will cancel-out sound from the other speakers, reducing the bass. As an experiment to see if it sounds better for midrange frequencies, it’s something that could be tested both ways, however.
This page has a formula for calculating the frequency at which there is maximum cancellation from a path-length difference. This works out to be about 422Hz.
For a long time, I’ve been interested in an analog approach to this problem. With a DSP, it’s more straightforward, but there’s also additional costs. Plus, I enjoy the challenge of figuring out seemingly impossible things. Is there such a thing as an analog delay? Yes, sort of. This page has a calculator for “Analog Time Alignment”. However, it is intended more for small distances when building home speakers. Would it apply for car audio or larger distances?
The circuit which performs this magic is an all-pass filter (the diagram of which you can see on the above page). The idea is that you start out in-phase in the low frequency range, then move to out-of-phase (approaching 180 degrees) in the high frequencies. By using such a circuit, we can preserve the bass frequencies by keeping them in-phase, then as the wavelengths shorten, we allow the phase to change such that at some point, what was previously out-of-phase at the listening position should now be in-phase. Since the phase-switch isn’t instantaneous, a wide band of frequencies are affected by a partial phase change. However, the low frequencies remain mostly in phase, preserving the bass, which solves one of the main problems with simply inverting the phase of the woofer alone.
So, back to the calculator. What figures should I use? If I use 40cm, it calculates fairly large (more expensive) components, and flips the phase at a low frequency. I experimented with other figures and somewhat arbitrarily decided upon 32cm to have a lesser effect and smaller components that were more easily found. (Note that I used a guesstimate of 3.2 for Re). That calculator doesn’t describe the mid-point (where the phase hits 90 degrees), but you can use a conventional crossover calculator to better see the effect of the values. Entering 345Hz in the crossover calculator returns approximately the same values for the capacitor and inductor, so 345Hz should be the mid-point, where the audio through the filter has been effectively delayed by 90 degrees.
So what frequency range is ideally affected? It looks like approximately 422Hz is ideally what we’d like to have flipped in polarity. Frequencies below this will be affected less drastically, as the phase is still being crossed-over, with 345Hz being a 90 degree phase shift. Of course, lower frequencies need less assistance (being closer to in-phase the further away from 422Hz), plus the main feature of using the all-pass filter is to leave the lower bass frequencies in-phase, in general. Frequencies above 422Hz will also sound more in-phase to a point, however, as things shift with frequency, eventually it will not line up again. So, there may be other frequencies which sound worse (likely around 700Hz and above). However, the bottom-line is, which way sounds better? The original way, with the lower mids sounding out-of-phase, or with the all-pass filter, and lower mids now anchoring the sound? I think it definitely sounds better with the all-pass filter, but since it’s not a perfect solution, it may come down to subjective preference.
Voices are mostly centered, not sounding too smeared across the soundstage, but slightly diffuse and not as firm as if you were sitting right in the middle, between two good speakers, in, say, a good home system. I find the phantom center to be not all that different than our other car that has a center speaker on the dash, but the “center” in this case is straight ahead, in front of the driver’s seat, not the center of the car. Using a test CD, it definitely does sound in-phase in the driver’s position, and an out-of-phase signal sounds properly out-of-phase, although it’s not perfect. I’m calling this a successful, if imperfect, modification.
But Wait! There’s more!
The typical theory of modern car audio is to present a sound-stage towards the front, not unlike your home system. However, our home systems often have surround-sound, while car audio systems often are just a copy of the left and right signals from the front. Often, people speak of using the rear speakers for “fill”, just to add to the sound but not detract or pull the sound from the front. What if you could use the rear speakers for a surround-sound effect?
There’s an old circuit design in which you extract just the ambient sound for the rear speakers. It’s simple to do, but won’t work with some amplifiers. So far, it has worked with my X1, although the volume level is a bit low. On the other hand, you don’t want the sound to be too intrusive – you want some “fill” but not be too noticeable.
The general design of the circuit can be seen here: https://kantack.com/surround/surround2.html . However, this can be simplified. One way to describe the simple modification is to disconnect (cut) the rear speaker negative wires from the factory amplifier, and instead, connect the two speakers directly between the negative terminals. The amplifier’s rear L and R negative connections are then unused, and the positive connections remain as before.
Note that this may not work with all amplifiers. In one case, when I tried this on a stock VW system (which probably did not have an external factory amplifier, just a head-unit), it failed to work correctly.
The goal is to ultimately have a more immersive, natural sound. In practice, it’s hard to balance levels, even though there’s a front/rear fader setting in the radio; in the X1, the fader also affects the bass through the subwoofers under the front seats, so adjusting one throws off the other, with this modification.
In the end, given the volume constraints, this may not be worth it for most people. If, however, you typically listen with the sound faded more towards the front anyway, it may be something worth considering, as it adds a different effect than simple L and R stereo.
Since I knew I’d be making a number of cuts, I purchased a wiring harness from technicpnp. One thing I like about using harnesses like this is that you can remove them, and go right back to stock without difficulty. I knew I’d need to cut into a few wires, and if I made mistakes, I’d rather do it on a harness than the factory wiring. Also, it gives you more slack to work with. However, it adds greatly to the cost.
Even though I had the harness, one of the trickiest parts was knowing which wire went where. The color-coding of the harness wasn’t that helpful. However, it does show the pin numbers on the connectors. Using the newtis info site, I was able to find which wire numbers corresponded to the speaker channels I needed.
This is the factory amp on the left side of the trunk area, with the TechnicPNP harness test-fitted.
This is my inital try at wiring the all-pass filter and wiring it to the harness. I had to make further adjustments, but this is allows a clear view of the components.