Showing posts with label theory. Show all posts
Showing posts with label theory. Show all posts

Thursday, May 22, 2008

Vista Audio Playback, Part 2

I've been pretty busy lately, so haven't had time to post any articles. Earlier today I received a nice email from someone (won't mention names unless I have permission) who's also a big HTPC proponent. He mentioned that he's been following Amplio Audio and anxiously awaits updates on our amps and our next article about Vista audio playback. Well, that was the kick in the ass I needed.

BTW, if you read an article that you would like me to follow up on, or have any questions, please feel free to use the comments at the end of the posts. I realize that most people are comfortable with email, but I'd like to see these articles become more of an open conversation that anyone can contribute to.

Anyhow, back to the topic... In the original Part 1 article I mentioned comments I read in a thread on diyAudio titled "Is Vista really capable of bit perfect output?" The original poster started by explaining that the sound quality when playing audio/music with his computer was better than using his expensive dedicated audio components. There are a couple of reasons some may believe a computer based audio system can never sound as good as dedicated stand-alone components. One is that the computer is just too electronically noisy to pass an analog signal without some distortion. The second reason is that the computer software and/or operating system modifies the audio data before passing it to the soundcard and DACs, thus distorting and/or damaging the sound quality.

There are several ways to avoid the first problem. One is to purchase a good quality soundcard that is properly shielded from any electro-magnetic interference. The other is to use a product who's analog circuitry is external to the PC. All FireWire and USB based soundcards fall under this category, as do a new generation of USB DACs. The product Amplio Audio is working on falls under this category as well. Up to this time, we have been using FireWire and it still proves to be the best technical solution.

The second problem is a little more complicated. Sound degradation caused by the operating system was true with Windows XP and standard WDM drivers. XP's audio engine relied on a mixer (KMixer) that would resample all audio to 48 KHz so everything output from the PC would use the same sample rate. There are some ways to avoid resampling, but if you adjusted the volume or simultaneously allowed sound output from other applications (including system sounds), resampling was performed. That means the CD's 44.1 KHz sample rate was always converted to 48 KHz. Another problem with this audio engine was that to lower the sound volume, the data was simply truncated to a lower resolution. So 16 bit audio was reduced to 14, 12 or 10, etc., bit data to get a lower volume. This can dramatically decrease the sound quality.

This is where the thread then moves on to the bit-perfect discussion. To avoid degrading the sound by modifying or truncating the bits, you could use a driver like ASIO that bypasses the Windows audio engine so that the original source audio data is not changed all the way to the DACs. This is how you could get bit-perfect output. Of course the software players had to provide support for these sort of drivers. Windows Media Player or Windows Media Center do not. So you had to use other players like J.River's Media Center, Winamp (with a special ASIO plug-in), Foobar, etc., to achieve bit-perfect performance. Now with Vista, a couple things have changed. First, the audio engine is much better. Even if the audio is resampled, the algorithms are much better and the effect on sound quality is not nearly as bad as what happened in XP. They've also improved the volume control so that they no longer truncate the bits to reduce sound levels. Instead, it converts the data to 32-bit floating point, then performs the volume adjustment calculations and then converts back to the original sample rate. This basically gives you lossless attenuation. It's not bit-perfect, but there is no degradation in sound quality. Some dedicated audio hardware that uses high quality DSP chips use this same technique. For the purist, who still want bit-perfect operation, they can still use ASIO drivers if they've been updated to work under Vista. These drivers will also bypass the audio engine, just like they did with XP. Vista also supports a new feature called "exclusive mode". Exclusive mode also bypasses the Vista audio engine and will provide bit-perfect playback. However, you need an application that supports exclusive mode and most I'm familiar with, like J.River Media Center, Windows Media Play, Vista Media Center, Foobar, etc., don't.

Getting back to the diyAudio thread, the bit-perfect discussion mentions that there is a newer software player, called XXHighEnd, that uses Vista's exclusive mode. There's another program called XMPlay that can run in exclusive mode when using a WASAPI output plugin. The sound output from a program using an ASIO driver or running in exclusive mode should be identical, because bit-perfect is bit-perfect. However, several people, including the original poster and the developer of XXHighEnd (not the same person), claim that XXHighEnd sounds better than other bit-perfect solutions. In fact the original poster was also a big fan of using Foobar with ASIO drivers, and he claims the sound has improved a lot when using XXHighEnd. When asked how something that outputs the exact same data can sound better, the developer doesn't provide any answers that satisfy the skeptics. The closest he comes to any technical explanation is that he does something to minimize jitter. But that doesn't make much sense given the way the audio chain works. If the audio data is buffered and the DAC is driven by a local clock, the audio software player shouldn't have any effect on jitter. He also admits that he doesn't know why it sounds better, but that there are many ways a software application can have an effect on the audio quality and he's just been tinkering around trying to find the best sound quality. That's where things get confusing to me. Or as another poster/skeptic put it:
  1. It's bit-perfect
  2. PCM needs to be processed some special new way to sound best
  3. No, it's bit-perfect
  4. If you were to, say, play a byte later in the stream than it was originally, that might be useful
  5. No, really, it's bit perfect!
  6. You're mucking around with the data based on some theories you have that you won't explain and if we don't just accept that it is bit perfect and magically sounds better than we are just mean, old unbelievers.
  7. Oh, and it is bit perfect.
The developer of a kernel streaming (KS) output driver, which is also achieving bit-perfect performance like ASIO drivers, compared the output from three different bit-perfect solutions - Foobar2000 with his KS output driver, XMPlay running in exclusive mode and XXHighEnd running in exclusive mode using it's third engine. Using an oscilloscope, he found that the output was identical. They are all bit-perfect. He also says he cannot hear any difference, so he doesn't recommend the XXHighEnd software because they charge for it (and Foobar2000) is free, the user interface is pretty weak and the program is immature. Like I said, others, including the original poster, claim it sounds better.

I have to admit, if it sounds good to you, I'm not going to try to convince you otherwise. I'm also not convinced bit-perfect output is the only acceptable way to listen to audio. Especially since Vista is not bit-perfect, unless you use exclusive mode, but it still sounds great because any changes are lossless.

Thursday, November 01, 2007

Go Green with Class D Amps

Here's an article from Electronic Design that talks about the advantages of running a Class D amp when compared to other amplifier designs with regard to power efficiency.

They explain that an amplifier works by applying a voltage of alternating polarity to a loudspeaker, driving it back and forth to move the air that produces the sound. The amp basically has 2 power rails for the + and - polarity voltages.

With a Class A amp, both switches are on simultaneously to create the required voltage, so they're only about 15% efficient. This means that only 15% of the power is used to drive the speakers. The other 85% is lost as heat. That's why the higher power (over 100W) Class A amps are usually pretty large and include massive heat sinks. With Class B amps, only one switch is on at a time, resulting in efficiencies of around 75%. Unfortunately the trade off is poorer sound quality. Class AB is a combination or compromise between A and B with both switches on simultaneously, but the non-load carrying rail was only minimally on. This improved the sound, but only resulted in efficiencies of about 30% due to switching losses. The Class D amp does this by switching these voltages on and off. With the Class D amps, the switching losses are very low resulting in an overall efficiency of more than 90% with very good sound quality.

Read the article if you are interested in more of the details.

Sunday, October 14, 2007

How Much Storage Space Will I Need For HD Audio

I've been following several threads (including this AVS Forum thread) that talk about how the audio tracks of an HD DVD or Blu-ray movie when played on your HTPC using PowerDVD Ultra are downrez'd from 24bit/48kHz to 16bit/48kHz because of copy protection issues. I think they say you cannot pass the full resolution digital audio of protected (flagged) sources unless you have a protected path. The protected path is all part of the solution that makes it impossible to copy high resolution audio and video using DRM schemes like AACS for audio and HDCP for video. It seems PowerDVD is trying to comply by just converting every audio track down to 16bit/48kHz even if the tracks are not flagged to be protected. I also thought this rule only applied to digital audio and not analog audio. Nobody seems to have a complete handle on what's really going on here, but I did read that Microsoft and Cyberlink (the developer of PowerDVD) are trying to work together to get this resolved. Hopefully they'll come up with some solution so we can listen to the audio tracks from these discs in all their high resolution glory from our PCs.

'jdyoung75'
commented that maybe people aren't even going to get 24bit/96kHz or 24bit/192kHz soundtracks anyhow because the movie studios will probably only provide at best 24bit/48kHz soundtracks. (Actually, I would probably be satisfied with that, but I'd still like to hear 24bit/96kHz surround and/or 24bit/192kHz stereo tracks for concert performances.) His post implies that since the studios aren't going to include anything with a sampling rate higher than 48kHz, then maybe the problem with PowerDVD downrez'g isn't such a big deal. They're still converting the bitdepth from 24bit to 16bit and I'd like to hear them in 24bit. He referenced an article that appeared in EngadgetHD that said the real reason is because of storage space. There isn't enough space to include the uncompressed high resolution audio. But that's why they use lossless compression like Dolby TrueHD and DTS-HD MA to give you the same high quality using less space. These losslessly compressed HD tracks should still maintain the same resolution of 24bit/48kHz or higher (if available).

Just to give you an idea of how much storage space you need for uncompressed HD audio files, take a look at the following chart:
Bit DepthSample Rate# of channelsBit Rate (Mbps)File Size for 1 minute
File Size for 90 minutes
16bit44.1KHz2 (stereo)1.411
10 MB
900 MB
16bit48KHz2 (stereo)1.46
11 MB
990 MB
16bit48KHz6 (5.1 surround)4.6
33 MB
2.9 GB
24bit48KHz6 (5.1 surround)6.9
49.5 MB
4.35 GB
24bit48KHz8 (7.1 surround)9.2
66 MB
5.8 GB
24bit96KHz6 (5.1 surround)13.8
99 MB
8.7 GB
24bit96KHz8 (7.1 surround)18.4
132 MB
11.6 GB
24bit192KHz2 (stereo)9.2
66 MB
5.8 GB

As you can see, these HD tracks take up a lot of space. However, those numbers are for uncompressed audio. Don't get confused by the way they measure bit rate and storage size. When calculating the bit rate they refer to million bits per second (divide by 1,000,000) and for storage requirements, they refer to megabytes (divide by 1024 a couple times and also multiply by 8 bits to get a byte).

I don't know exactly how much space we'll save by using the losslessly compressed codecs. The only information I could find regarding the efficiency of these codecs was from this FAQ for Dolby's TrueHD. If I'm interpreting this correctly, with a 24bit recording, they achieve compression ratios of about 2 to 1, for a file size savings of about 50%. So we might be able to store 90 minutes of a 24bit/96Khz 5.1 surround sound track in 4.3 GB of space.

Since HD DVD has a storage capacity of 15 GB for single-layer and 30 GB for dual-layer discs (and 51 GB for single sided triple-layer discs); and, Blu-ray's capacity is 25 GB for single-layer and 50 GB for dual-layer, you'd think they'd have enough space at least for one of the losslessly encoded HD tracks.

Tuesday, September 11, 2007

Dynamic Range and HD Audio

Recently, I responded to a comment in an AVS Forum thread where someone posted that people shouldn't get too upset if their high definition audio is converted and resampled to 16 bit/48KHz. Apparently PowerDVD, the only PC software capable of playing HD DVD or Blu-ray movies, converts and resamples all of the HD 24bit/96kHz uncompressed or losslessly compressed audio (DTS-HD, Dolby TrueHD, etc.) to 16bit/48kHz. Many people are upset and would like to find a way to play the full resolution HD audio tracks from their HTPCs. The developer of PowerDVD says they have to downsample the audio because the PC doesn't provide a secure pathway for digital or analog output. I can understand why there might be some problems with a secure pathway for digital output without something like HDCP or AACS, but I don't understand why they have to downsample the audio for analog output. Anyhow, he/she basically stated that since the highest frequency a human is capable of hearing is 20,000 Hz, even when applying the Nyquist theorem to 48 kHz, the downsampled audio can still easily reproduce all audible frequencies. Therefore, I think he/she assumed the only advantage to 24bit/96kHz HD audio is the fact they can play higher frequency sounds. Well, there's a lot more to it than that...

My response just touched on the issue of how the resolution of the audio data is related to dynamic range. There are other factors that come into play, like the tonal effects of high frequency harmonics and phase accuracy. There's also the argument that when an analog waveform is converted into digital data, the higher the sampling rate and resolution of the data, the representation of the original analog signal will be much more accurate. There are also concerns about the quality of the resampling algorithm, etc., etc.

Let me get back to the subject of this post - dynamic range. Dynamic range, when used in audio measurements, refers to the difference between the loudest undistorted sound and the quietest passages. In digital audio, the maximum possible dynamic range depends on the bit depth of the audio data.

To calculate the maximum theoretical dynamic range based on a digital audio bit depth, you multiply the log of the total bit depth by 20.

Dynamic Range = 20 * log(bit depth)

For example, CD audio has a bit depth of 16 bits. A bit is a binary unit, so they are actually referring to 2 to the power of 16, which comes to 65536 decimal units. To be more accurate, we would use 65535 because they use values from 0 to 65535.

When we apply this to the formula above, we get:
DR (16 bit CD) = 20 * log(65535) = 96dB

The maximum theoretical dynamic range for 24 bit audio comes to:
DR (24 bit) = 20 * log(16777215) = 144dB

If it is true that some classical music performances can have a dynamic range of over 110 dB, then it's also possible that an HD movie could also have this large of a dynamic range. Hopefully, there will also be some other musical performances (live or studio) that were recorded in HD and become available in HD DVD or Blu-ray that will also have this high of a dynamic range.

My point is, if the audio data is always converted down to 16 bits, we won't be able to enjoy the full dynamic range available from a high definition audio performance.

Wednesday, August 29, 2007

How Much Power Do I Need?

Have you ever wondered how much power you will need from your amplifier to drive your loudspeakers?

Maybe this information will help you figure this out.

Amplifier power is usually given in watts, which is the amount of energy expended in one second (1 joule per second). In electrical terms 1 watt is equal to 1 volt multiplied times 1 ampere. Not sure if that helps here, because this doesn't seem to directly relate to how much sound you can generate with an amplifier. We usually measure the loudness of something using decibels or dB. The dB uses the logarithmic (base 10) scale because that is how our ear/brain perceives sound changes. Theoretically, the smallest change in sound level the human ear can perceive is 1 dB.

The following chart shows the amount of dB per watts ((dBW), which will make it a little easier to relate the amplifier's power rating to the amount of sound it can provide:
dBW
WattsdBW
Watts
17
50
24
251
18
63
25
316
19
79
26
400
20
100
27
500
21
126
28
630
22
156
29
795
23
200
30
1000

As you can see from this chart, an increase of 3 dB results in a doubling of power. So to handle an increase in dB from 23 to 26dB, you will need to double the power from 200 to 400 watts. To be able to notice the next incremental increase in loudness, you would need to go up to 500 watts.

Another factor that we need to consider is -- How loud do you need to go? That depends on your listening preferences. If you normally listen at fairly quiet levels, you don't need a lot of power, but if you like listening to rock music at live concert levels, then you may need a lot. Here's another chart (I love charts) to show how the dB relates to different sound levels:


Decibel (dB) level
Cause or Effect
-80 (p)
Underwater nuclear submarine microphones listening to shrimp chewing on food at 100 meters distance
-30 (n)
One human talking 20 miles away (60 db / meter at a distance of 20 miles)
-4 to +4 (n)
The ticking of an ordinary wristwatch at 1 meter
0 (n)
Beginning of hearing, a mosquito 10 feet away, the ear drum moves less than 1/100 the length of an air molecule
10 (p)
Absolute silence, AT&T - Bell Labs "Quiet Room"
13 (p)
Ordinary light bulb hum
15 (n)
A pin drop from a height of 1 centimeter at a distance of 1 meter
30 (p)
Totally quiet nighttime in desert - impossible anywhere near city
35 (p)
Anechoic hearing test room
40
A whisper
50-65
A normal conversation
80
Average city traffic noise
85
Beginning of hearing damage (8 hrs), earplugs should be worn
85-90
Lawnmower, food blender
100
Normal average car or house stereo at maximum volume
104-107 (p)
The beginning of pain at the most sensitive frequency of 2750 hertz
110
Symphony orchestra
116
Human body begins to perceive vibration in the low frequencies
117-123
Home stereo system, a very loud and powerful 200-2000 watts
120-130
front row at a rock concert - up to 200 refrigerator size speakers and 50000-300000 watts of clean, full frequency sound
125
Drum set - only at the moment of striking, continous level 115
127
Human tinnitus (ringing in the ears) begins
128 (p)
Human, loudest scream measured at a distance of 8 feet 2 inches, head hair begins to detect vibration, can begin to detect very slow “blast wind” of 0.124 meters/second
130 (n)
Marching band - overall level at a distance, 100-200 members
132
Eardrum “flex” totally noticeable
133 (n)
Gunshot- ear level, may vary greatly to size and type of gun, duration converted to one second, peak level may reach 140-160
130-135 (n)
Large train horn
135
Human, a slight cooling effect begins to be noticed, from air expansion
137
Human body vibration is strong
137-140
Human ear all frequencies are painful
140
Extremely damaging to hearing no matter how short the time exposure, human throat and vocal cord vibration begins
141
Human body begins to feel nausea after a few minutes
142
Human body chest pounding is intense
143
Human body feels as if someone just football tackled your chest
144
Human nose itches
145
Human vision begins to vibrate making it slightly blurry, 1-3 degrees
148
Human vibration very uncomfortable and slightly painful
149
Human lungs and breathing begins vibrating to the sound
150 (n)
Rock concert “The Who” two 10 story stacks = 144 double refrigerator sized speakers, actual level reached 120 db at a distance of 32 meters for this normalized reading of 150 db. Continuous level 114-118db (p) at 32 meters
158
Human body vibration is violent, nausea becomes more intense
153-163
N.H.R.A. Dragsters- 5000 to 7000 horsepower, liquid nitroglycerin fuel, earthshaking at 50 feet, humans find it hard to see, and breathe 140db (p)
163 (p)
Glass breaking level, minimum, it is very hard to break glass windows. Many stories come from breaking glass but it is highly variable: it is easier to break if the window already has a crack, is very large or old and brittle and not car safety glass which can flex massively before breaking. An opera singer at 110 db may break a wineglass but it is an example of frequency resonance, and not high sound db level
145-165 (np)
Common type of fireworks at professional pyrotechnic shows
172 (n)
Boeing 727, 737, 747, 757, 767 cruising at 6 miles high mach 0.84, at the ground (sea level) loses an additional 6 db because air density is only half sea level at a height of 6 miles
180.5
Alan Dante reportedly set a new record in the world of in-car bass output by using four Stetsom 7KD amplifiers, 15 Power Master batteries, and a single Digital Designs 9918Z subwoofer.
183 (p)
6 p.s.i. Total destruction of all structures, particle velocity (blast wind) is 180 miles per hour. 0.9 miles from Hiroshima atomic bomb and 3.3 miles from 1 megaton nuclear bomb, less 0.1 % object survival
190.6 (np)
Richter scale 0 (zero) earthquake
190-195 (p)
Human eardrums rupture 50% of time
210 (np)
Richter scale 2.0 earthquake
215 (n)
Thunder, the largest positive giants. Ordinary thunder 165-180 db. Lightning strike on ocean surface 234db (p) at 2exp-5 newtons per square meter
240 (n)
Tornado, Fujitsu 5, energy guess based on 300 mile per hour wind, 1 mile wide
257 (n)
Nuclear bomb, 1 megaton (1 million tons of t.n.t.)
300 (n)
Hurricane – average, extreme energy is “diluted” by covering 500,000 square miles. Energy = approx. 1000 nuclear bombs a second.
320 (n)
Volcano eruption, Tambora Indonesia, 1815, ejected 36 cubic miles. Approximately equal to 14,000 megaton nuclear bombs or a 14 gigaton bomb based on ejected volume, change in megatons times 1.345 equals volume ejected change. If was a nuclear bomb it would create a crater about 12.4 miles wide and 1.33 miles deep. Internal pressure is believed to be about 47 million p.s.i. = 347 db (p)
(n) = Normalized total air power energy level sound plus any wind, watts or joules per second. These levels have been converted.
(p) = actual Peak pressure meter readings i.e. a force per unit area
(np) = Normalized Pressure used in explosive measurements, blast wind is not included
sources: Ultimate Sound Pressure Level Decibel Table, COPYWRITE WILLIAM HAMBY 2004, National Institute on Deafness and Other Communication Disorders.

Update 9/11/07: new entry for 180.5dB from Engadget post.

So, if you want to listen to your sound system at the same level as a symphony orchestra (I assume this is during a loud passage), you would want amplifiers with enough power to deliver around 110 dB. For rock concert levels, something between 120-130 dB. Most of the time you're probably not going to listen at these levels, especially for those of us who share their dwellings with other people, like wives, children, pets, plants, etc., etc. Maybe an amplifier that can provide 105 dB without clipping would be good enough, since you are probably listening between 85-90 dB most of the time. The dynamic range (the difference between the loudest and the quietest sound) for a good system should be from about 105dB down to maybe 35dB. This gives us a total dynamic range of about 70dB.

Now let's take this information and apply it to choosing the right size amplifier for your loudspeakers (if you like to do things ass backwards - you can also choose the right loudspeakers for your amplifier).
  1. You need to find the loudspeaker's efficiency or sensitivity specification. This is the sound pressure level (SPL) at 1 watt from a distance of 1 meter, given in dB. My Precise Monitor 10s have an efficiency spec of 88dB/1 watt/1 meter. My Era D5s use those 5" long excursion drivers that provide good bass for a small driver, but they are not super efficient with a spec of 86dB. There are a lot of speakers out there today with higher efficiency, but that doesn't mean they will sound better.

  2. Subtract about 10db SPL to account for the drop in sound level from the speaker to the listening position. (When you double the distance from the speaker, the SPL drops 6dB. The speaker's efficiency spec is based on a distance of 1 meter, and if the distance between the listening position and the loudspeaker is 2 meters, then the SPL drops 6dB. If this distance is 4 meters, the SPL will drop another 6dB for a total of 12dB. If the total distance is 10' (just over 3 meters) then the SPL will drop about 9dB.)

  3. Add 3dB for each additional speaker in the room that will be playing music at the same level (so when you do this calculation for a stereo system you simply add 3 dB).

  4. For my example with the Era D5s, I would get:
    86dB - 10dB + 3dB (for stereo music) = 79dB.

  5. Next, I need to calculate how much amplifier power is needed to get peak levels to 105dB without clipping.

    So I take the difference between the peak level and the loudspeaker value:
    105dB - 79dB = 26dB, which gives me the amount of power needed from the amplifier.

  6. Using the first chart, you can see that I will need 400W of power to get 26dBW.
Using this method, I would need about 250W to power my pair of Precise Monitor 10s. It gets a little more complicated when you try to calculate power requirements for multichannel 5.1 or 7.1 surround sound amplifiers. That's because the amount of sound from the surround speakers is usually less than the front right, center and front left channels. If you use bass management to send all signals below a certain frequency to a powered subwoofer, that will also decrease the power requirements of the multichannel amplifier. If I find a little more data on the most common multichannel surround mastering methods, maybe I will try to tackle this problem in a future post.

Here's a handy dandy dynamic slide rule that you can also use to perform these calculations.

Update 4/8/08: I discovered that Crown has a good article on their website to help you determine how much amplifier power is needed for your loudspeakers.

Tuesday, January 30, 2007

Audio DesignLine: Class D Audio Amplifiers

The Audio DesignLine website has posted a series of Class D Audio Amplifier articles. These were written by Eric Gaalaas of Analog Devices and are based on his original article which was published in EE Times magazine. Some of the data used to show the performance of Class D amplifiers in these articles is based on technology from Analog Devices, like the AD1994 Class D amplifier. The 25W AD1994 doesn't necessarily meet the performance specifications of a high end home theater system, like the Class D amplifier modules from Hypex, ICEpower or ColdAmp, because it is designed primarily for applications like automotive audio, or integration with flat panel televisions. However, this series of articles does provide a fairly good overview of the technology.

The first article, Class D Audio Amplifiers: What, Why, and How, describes the different topologies of Class A, B and A/B linear amplifiers and their power dissipation characteristics. The main point here is the Class A amps dissipate a lot of power in the form of heat (in fact, more power is dissipated than is sent to the loudspeakers), but the sound quality is very good; Class B amps don't dissipate as much power, but the sound quality isn't very good; and, Class A/B, which is a hybrid of the two, dissipate less power than Class A and a little more than Class B, but also sounds much better than Class B.

The second installment, Class D Audio Amplifiers: What, Why, and How - Part 2, describes the basic architecture of a Class D amplifier and explains how they are much more efficient with regards to power dissipation. They mention how the output efficiency effects system design and that products with less efficient amplifier topologies sometimes use large, heavy heat sinks or fans to avoid over heating the components.

In the third article, Class D Audio Amplifiers: What, Why, and How - Part 3, the author talks about Class D amplifier terminology and compares single ended to differential designs.

The fourth article, Class D Audio Amplifiers: What, Why, and How - Part 4, describes some of the challenges with Class D technology and discusses techniques for improving sound quality by using feedback circuits.

In the fifth installment, Class D Audio Amplifiers: What, Why, and How - Part 5, he discusses the modulation techniques used to convert the analog signal into pulses. The most common method used is pulse-width modulation (PWM), which is why you may find Class D amplifiers sometimes referred to as PWM amplifiers. The PWM modulators may have problems with distortion in some implementations and can generate EMI (electromagnetic interference). The author also explains that with PWM, pulse widths become very small near full modulation, and because of the limited drive capability of the output-stage gate-driver, which cannot switch fast enough to produce the very short pulses, it is almost impossible to get full modulation. This means you cannot achieve full theoretical power. Alternatives to PWM include pulse-density modulation or PDM, which has an advantage when it comes to EMI, but has limited power efficiency. Another alternative, uses a self oscillating technique instead of the fixed frequency modulator used with PWM. This is the method used with the Hypex amplifers that we included in our prototype system. The self oscillating amplifier avoids some of the problems associated with PWM.

The sixth article, Class D Audio Amplifiers: What, Why, and How - Part 6, mentions that the high-frequency components of a Class D amplifier can generate a lot of EMI, which can interfere with the operation of other nearby equipment. The author then discusses several techniques used to minimize EMI.

The seventh and final article in the series, Class D Audio Amplifiers: What, Why, and How - Part 7, talks about the cost savings associated with audio systems that use Class D amplifiers. These costs savings are due to the higher efficiency of the Class D amplifers. Since they don't generate nearly as much heat, the systems don't need the large expensive heat sinks and chassis. However, the advanced circuitry for feedback loops and filtering adds to the expense. So in reality, using Class D amplifiers doesn't necessarily mean they will be less expensive than a system that uses Class A/B amplifiers.

Thursday, November 16, 2006

Choosing the DAC, Part 2 -- Narrowing it Down

We're still trying to pick the best DAC (digital to analog converter) for our product. We've looked at all the data sheets and compared the specs and test results. There are hundreds of DACs from several manufacturers to choose from. Using the specs, we were able to identify what we think are the best products on the market. Since we want to support playback of all currently known audio formats (at least those that you can play using an HTPC, which means no SACD because Sony/Philips will not license the necessary hardware and software for playing SACD with a PC), we will need to use a DAC that has a sampling rate of up to 192 kHz and bit depth of at least 24 bits. For our application, we would also like to use DACs with fully differential outputs because of the benefits of eliminating noise from the signal path and the fact that our amp modules work best with a differential input. That narrows our choice down a little bit.

The three key parameters that we looked at for evaluating different DACs were the signal-to-noise ratio (SNR), dynamic range (DR) and total harmonic distortion (THD+N). Based on the three main criteria, we decided to limit our final choice to a DAC with a SNR and DR of at least 120 dB, and a THD+N of at least -100 dB. Here’s a list of DACs that meet our specifications:

Manufacturer

Part #

SNR

DR (dB)

THD+N (dB)

AKM Semiconductor

AK4396

120

120

-100

Cirrus Logic

CS4398

120

120

-107

TI/Burr Brown

PCM1792

132

129

-108

Analog Devices

AD1955

120

120

-110


We've also tried to contact a representative of these highly respected manufacturers, Texas Instruments/Burr Brown, Cirrus Logic, Analog Devices, and AKM Semiconductor, for advice. So far the only ones to respond have been Richard Kulavik, Manager of Marketing and Applications at AKM and John Melanson of Cirrus Logic. TI/Burr Brown, and Analog Devices have yet to respond. Could it be that Amplio is just too small and insignificant? Maybe -- that's one of the challenges and frustrations of being a start-up.

Wednesday, November 15, 2006

Choosing the DAC, Part 1 -- Basic Theory

When we talk about digital to analog conversion in our application, we are referring to converting PCM (pulse-code modulation) data into an analog signal. This resulting analog signal can either be represented as an electrical voltage or current. So, for a voltage output, a number is the input and a voltage is the output. These numbers are updated at the sampling interval (or sampling rate) of x times per second. For example, CD data is represented with a 16-bit number at a sampling rate of 44,100 times per second. So a 16-bit number, which represents the amplitude of the audio at a point in time is sent to the DAC (digital to analog converter), along with a clock signal, which causes each number to be stored with the correct sequence and timing (lets ignore that relatively important detail for now). Then the output voltage changes very rapidly from the previous value to the value represented by the currently stored number. So basically, the voltage (or current) is set and held in time until the next number is set. What you end up with is a bunch of rectangular pulses that look like the red line shown in the graph below, instead of the smooth gray lines which represent the ideal analog signal.

The differences between the red stair steps and the smooth waveform create a type of distortion in the signal called aliasing. According to good ole Harry Nyquist, the aliasing distortion can be avoided if the sampling frequency is two times greater than the bandwidth of the maximum frequency of your signal. That may not make a lot of sense, so let me use CD audio in another example. Many experts believe the frequency range of human hearing is between 20 and 20,000 Hz. For the majority of us, we can’t hear any sounds above or below that range. So, if you apply the Nyquist sampling theorem (actually Vladimir Kotelnikov and Claude Shannon deserve some mention here, but our friend Harry seems to get all the credit) and double the upper range, we get a sampling rate of 40,000 Hz. So to avoid the aliasing distortion, 44,100 Hz was selected as the sampling frequency for audio CDs.

Thursday, November 09, 2006

All About Sound, Part 12

This is it. The final installment in the introduction to sound technology from Scott Janus' book "Audio in the 21st Century" (courtesy of Audio DesignLine).

In Part 12 he writes about Measuring Sound Quality, Harmonic Distortion, Total Harmonic Distortion, and Signal to Noise Ratio. I'll probably want to cover some of these topics in a little more detail in future posts and discuss how these measurements are applied to the technology in our products.

I hope you enjoyed this series.

Monday, November 06, 2006

All About Sound, Part 11

The introduction to sound technology from Scott Janus' book "Audio in the 21st Century" (courtesy of Audio DesignLine) continues.

In Part 11 we learn more about Sine Waves, Triangular Waves, Square Waves, and Sawtooth Waves..

Thursday, November 02, 2006

Wednesday, November 01, 2006

All About Sound, Parts 8 and 9

There's more!! Part 8 from Scott Janus' book "Audio in the 21st Century" courtesy of Audio DesignLine continues to cover sound pressure and intensity. Part 9 uses a few examples to explain sound pressure and decibels in more detail.

Thursday, October 26, 2006

All About Sound, Part 7

Another installment!! This is the latest installment of Scott Janus' "Audio in the 21st Century" from Audio DesignLine. Part 7 talks about measuring sound intensity and power.

In this article, he covers the basic math computations using the logarithmic scale and decibels. He briefly mentions that human hearing is not linear -- we can hear slight changes at low levels, but don't notice similar differences at high volumes. I think he plans to discuss this topic in more detail in a later installment.

In case he doesn't mention this... I thought I would go ahead and offer a little more detail. As mentioned in earlier installments, sound is created when something strikes another object. So when a guitar string vibrates, it is striking against air molecules. The vibrations cause the air nearby to compress and expand. A shorter string vibrates at a faster rate than a longer string, creating a higher pitched sound... The more compressed (or expanded), the more energy it contains and can expend. The loudness, or intensity of the sound is measured in terms of the amount of energy passing each second through one square centimeter of area. Energy expended over time is power and the unit is the watt. A watt is one joule per second. As you know, a 75 watt light bulb is pretty bright. A 40 watt bulb, not so bright. One of those small little night lights used to find the bathroom without bumping into a wall is probably around 1/4 watt. The amount of power found in sound is really small. The amount of power carried by ordinary conversational sound is about 1/1000 watt.

The human ear detects the difference in loudness by ratios of the power, not the actual differences. So, a 2000 microwatt (1/2000 watt) sound will seem louder than a 1000 microwatt sound, but a 3000 microwatt sound will not seem to sound louder by as much again. It actually takes a 4000 microwatt sound to seem louder by as much as a 2000 microwatt sound compares to a 1000 microwatt sound. To get a sound that is as much louder again than a 4000 microwatt sound, we would need an 8000 microwatt sound. The rations 2000/1000, 4000/2000, and 8000/4000 are all equal even though the difference are not, and it is the ratios that the ear detects.

This is where he explains that we don't hear linearly, but on a logarithmic scale. When one sound carries 10 times the power of a second sound, the ratio of the first to the second is 10 and the log (base 10) of this is 1. The difference in sound power is then said to be one 'Bel'. If a sound is 100 times more powerful than another sound, it is two Bels louder, 1000 times would be 3 Bels, etc. Since the Bel is too large of a scale for practical use, we use the decibel, which is 1/10th a Bel. A sound is a decibel louder than another when the first is 1.26 times as powerful as the second -- log(1.26) is about equal to 0.10.

The decibel is used one of two ways:
  1. to measure power or intensity
  2. to measure amplitude
The equation used to to measure sound power is (10 * log(N1/N2)). To measure sound amplitude we use the equation (20 * log(N1/N2)). So, a sound that is 10 times louder than a second sound (20 * log(10/1)) = 20 decibels. A sound that is twice as loud (20 * log(2/1)) = 6.02 decibels.

When dealing with these ratios, they use a standard reference for the denominator. For sound power or intensity, the denominator is the threshold of hearing (about the sound of a mosquito flying about 3 meters away), which is about 10-12 watts/m2. Sound pressure level (SPL) is usually used to specify the sound intensity. The upper limit of sound, before it behaves like a shock wave is about 194 dB (SPL). For comparison, windows break at about 163 dB; the sound of a jet engine from 30 meters (100 feet) is about 150 dB; the threshold of pain is about 130 dB; the sound of a train horn from 1 meter is about 120 dB and at this level can cause immediate perforation of your ear drum (so don't stand too close to a train when the horn goes off); and, loud music in a dance club is probably at 100 dB. They say anything above 85 dB is considered harmful and over 95 dB for long periods is considered unsafe.

BTW, so far, no one has entered the contest. I wonder why...? Is it the award -- no one likes beer or cheese? If so, any recommendations for a more enticing award? Is it because no one likes taking tests? Oh come on, it should be easy. All you have to do is read the articles. Is it because no one is reading those articles? (I know, I know, not many people are even reading this blog, so I'd really like to come up with useful info that potential readers find interesting). I'd really like some feedback on this. If there is a response, I might go ahead and post another test covering the later installments and award the winner with something like a gift certificate from Amazon.

Tuesday, October 24, 2006

Testing 1, 2, 3... (Parts 1 - 4)

Okay, I've decided to post the sound test after all. Actually this only covers the first 4 parts and depending how this goes, I may post another one covering later installments. I'm really curious to see how many people are actually reading those articles. The person with the highest score will win a prize. If more than one person has the highest score, I will put their names in a hat and draw a winner. The winner will get to choose between a six-pack of Wisconsin micro-brewed beer or a pound of premium award winning Wisconsin cheese (or maybe I could be convinced to substitute something of equal value). At the end of the test, we have instructions for submitting your answers.

Here's the test:

  1. True or False, sound requires a medium through which to propagate; sound does not travel through a vacuum.
  2. True or false, the speed of sound is faster at lower temperatures.
  3. Airborne sound travels in the form of:
    1. Latitudinal waves
    2. Awesome waves
    3. Transverse waves
    4. Longitudinal waves
    5. Attitudinal waves
  4. In the early evening when the air closer to the ground is still warm and the air higher in the sky is cool, sound waves will:
    1. Bend downward
    2. Continue moving straight
    3. Bend upward
    4. Reflect off the cooler air
  5. True or False, sound waves consist of alternating regions of compression (increased pressure) and rarefaction (decreased pressure). There is also an ambient pressure before the wave propagates.
  6. True or False, a pure tone is a sound with sinusoidal time fluctuations.


  7. The above figure represents a pure tone waveform. True or False, a period (T) is the time it takes for the wave to go from the highest amplitude to the lowest amplitude.
  8. True or false, in general, all sounds move at the same speed within the same medium.
  9. Given a pure tone with a period of 1 ms, what is the frequency of the tone?
  10. If a tree falls in the forest, does it make a sound?
  11. True or false, phase can be used to compare the alignment of two tones of the same frequency. This difference between two tones is known as a phase offset or phase difference. Phase offset is also loosely referred to as simply phase.
  12. Two pure tones with a frequency of 1000 hertz are 90 degrees out of phase. What is their phase offset in units of time?
  13. What is a convenient way to diagram how sound moves?
    1. Bubble diagrams
    2. Wave fronts
    3. Sound rays
    4. Both a and c
    5. Both b and c
  14. Since c (speed of sound) = f (frequency) multiplied times λ (wavelength); what is the wavelength of a pure tone with a frequency of 1500 hertz at STP (standard temperature and pressure)?
  15. True or false, the angles a sound wave hits and reflects off a smooth surface are the same.
  16. When two waves have a non-zero phase offset, they are said to be in phase. When two waves have zero phase offset, they are out of phase.
  17. True or false, when a sound wave refracts through another material with a higher speed of sound, the wavelength of the sound wave will decrease.
  18. True or false, the frequency (f) is the rate at which the wave repeats (cycles per second, called hertz).


To qualify for entry into this "contest", you must leave a comment to this post with some way to identify yourself -- maybe leave a nickname and your location. DO NOT INCLUDE YOUR ANSWERS IN YOUR COMMENT. Then submit your answers to soundtest1@amplioaudio.com. Be sure to include the same nickname identified in the exam's comments. The winner will be announced next Tuesday (Halloween), so you can submit answers until Monday night, which is October 30th.

All About Sound, Part 6

There's more!! They should just post the whole darn book. Here's the latest installment of Scott Janus' "Audio in the 21st Century" from Audio DesignLine. Part 6 discusses the doppler effect.

I think I'm going to postpone the test because I'd like to post it after all installments are posted at DesignLine. BTW, the highest score will get their choice of either a six-pack of wonderful Wisconsin micro-brewed beer or a block of premium cheese.

Monday, October 23, 2006

All About Sound, Part 5

Another installment of Scott Janus' "Audio in the 21st Century" from Audio DesignLine.

Part 5 is getting a little more technical, so pay attention. Oh, and don't forget about tomorrow's test.

Wednesday, October 18, 2006

All About Sound, Parts 2, 3 and 4

Here are Part 2, Part 3, and Part 4 in the series about sound theory from the Audio DesignLine Website. These are also excerpted from Scott Janus' book "Audio in the 21st Century." There will be a test next Tuesday. ;^) I'd like to thank Scott Janus for allowing Henry Davis and the folks at Audio DesignLine for posting these articles. And of course thanks to Henry for his work as well.

Tuesday, October 17, 2006

What is Sound?, Pt. 1

On the column to the right, we have a links section that includes the Audio DesignLine website, where you can find all sorts of interesting information about audio news, engineering and theory. They currently have a series of articles about sound that I thought some of you might find interesting. Here's the first part, which is an excerpt from Scott Janus' book "Audio in the 21st Century."
Powered By Blogger