-
- News
- Books
Featured Books
- design007 Magazine
Latest Issues
Current IssueRules of Thumb
This month, we delve into rules of thumb—which ones work, which ones should be avoided. Rules of thumb are everywhere, but there may be hundreds of rules of thumb for PCB design. How do we separate the wheat from the chaff, so to speak?
Partial HDI
Our expert contributors provide a complete, detailed view of partial HDI this month. Most experienced PCB designers can start using this approach right away, but you need to know these tips, tricks and techniques first.
Silicon to Systems: From Soup to Nuts
This month, we asked our expert contributors to weigh in on silicon to systems—what it means to PCB designers and design engineers, EDA companies, and the rest of the PCB supply chain... from soup to nuts.
- Articles
- Columns
Search Console
- Links
- Media kit
||| MENU - design007 Magazine
Estimated reading time: 10 minutes
Contact Columnist Form
Maxed Out: DSP? No, I Always Walk This Way! by Clive Maxwell
It's hard to read an electronics product-related article these days without running across the term DSP, but what does this actually mean? Depending on your background, your knee-jerk reaction may have been "DSP means digital signal processing" or "DSP refers to a digital signal processor." In fact, if you were feeling particularly bold, you may even have said "DSP refers to a digital signal processor performing digital signal processing."
Actually, considering DSP is so ubiquitous these days, there's a surprising amount of confusion about all of this. For example, do you actually need a digital signal processor to perform digital signal processing? It may surprise you to hear that the short answer is "No!" (Of course, the longer answer is: "Well, it all depends on what you mean by a 'digital signal processor,' doesn't it?")
Let's take a step back. First we'll set the scene by considering the concept of analog signal processing (ASP); next we'll ponder what we mean by digital signal processing; and finally we'll consider how we might go about actually doing it.
What is Analog Signal Processing?
As we discussed in the first article in this series, in the context of electronics, an analog device or system is one that uses continuously variable signals to represent information for input, processing, output, and so forth. On this basis, analog signal processing (ASP) involves processing signals in the analog domain.
A really simple form of analog signal processor (ASP) would be an analog amplifier. Suppose we took an analog signal from a guitar, for example, fed it into the input to the amplifier, and used the amplified output to drive a loudspeaker as illustrated in Figure 1.
Figure 1. A simple example of analog signal processing.
In this case, our analog signal processing simply involves generating a larger version of our input signal. A slightly more complex form of analog signal processing might be to use a signal generator to output a sine wave, and to use the amplitude of this sine wave to drive a voltage-controlled amplifier as illustrated in Figure 2.
Figure 2. A slightly more complex ASP implementation.
Analog signal processing can be very effective for a variety of tasks, but it tends to be limited to things like amplification, filtering, signal conditioning, and similar activities. One classic example would be guitar sound effect generators such as reverb and echo - when I was a young lad these were implemented using analog signal processing technology. Another classic example would be amplitude modulation (AM) radio.
Analog techniques can achieve large results using relatively few components, but only for relatively simple (conceptually speaking) tasks. If we want to perform more complex signal processing activities, it's generally easier to do so in the digital domain.
What is Digital Signal Processing?
Perhaps not surprisingly, the term digital signal processing refers to processing data (signals) in the digital domain. Let's stick with our guitar-based examples for a while. As we discussed in the second article in this series, we can take an analog signal such as the output from an electric guitar and pass it through an analog-to-digital (A/D) converter, which translates it into a series of digital values (Figure 3).
Figure 3. A simple digital signal processing scenario.
We can now process these digital values in the digital domain. For example, we might use a conventional microprocessor to apply a variety of signal processing algorithms to simulate reverb, delay, or distortion effects to the signal. Following this processing, we can pass our modified digital values through a digital-to-analog (D/A) converter, amplify the resulting analog signal, and use it to drive a loudspeaker.
Actually, Design007 Editor Andy Shaughnessy provided a classic example of the sort of thing you can do here. Andy pointed out that different classic amplifiers had very distinctive sounds. For example, a guitar played through a Fender Bassman amplifier sounds completely different than one amplified using a Mesa Boogie Dual Rectifierunit.
Now, suppose you are in a band and you are playing a number of cover songs. Your first number is from a band whose lead guitarist was a devotee of one particular type of amplifier - your second offering is from another band was an aficionado of a completely different piece of equipment. If you are striving for exactly the right "feel," you've just run into a bit of a problem, haven't you?
One solution would be to have lots of different amplifiers and to switch between them on a tune-by-tune basis. However, this would be a confusing and expensive game to play. Another alternative would be to use what is known as a "DSP Modeling Amplifier" - that is, an amplifier that can employ digital signal processing techniques to emulate the sounds of different classic amplifiers.
In order to illustrate what he is talking about, Andy used one of these DSP modeling amplifiers to imitate the characteristics of three different classic amplifiers; he then provided the ensuing audio files for our delectation and delight. Here's Andy's description of his experiment:
Here we go, Max! I ran my guitar through a Line 6 Spider DSP modeling amp and recorded three different models of the same blues lick. I played a 1999 American Fender Stratocaster with all settings the same on each clip (I had to turn the volume down on No. 3, though). Here's what's on each .wav file:
1. Fender sound - A setting labeled "Twang" is modeled after a 1960s Fender Deluxe and a 1950s Fender Bassman. This is very clean and "twangy."
2. Marshall sound - A setting labeled "Blues" is modeled after a 1965 Marshall. This is slightly more distorted, with more gain than a Fender, but not too distorted. It sounds like a solo by Jimi Hendrix or Stevie Ray Vaughan.
3. Mesa Boogie sound - Labeled "Recto," this setting is modeled after a Mesa Boogie Dual Rectifier amp. Mesa Boogies are famous for their massive overdrive and cascading gain, and they're favored by heavy metal players or anyone who enjoys screaming guitar sounds.
Examples of Digital Signal Processing
These days we are surrounded by devices that are performing digital signal processing activities. For example, the graphics processing unit (GPU) driving my computer display is performing DSP as I pen these words.
Do you have an MP3 player? If so, have you ever taken one of your music CDs and "ripped" it onto your player? In this case, your computer took the uncompressed digital audio signal from the CD and performed digital signal processing to compress it into an MP3 file (where MP3 is a digital audio encoding and compression format). Similarly, when you decide to play a track on your MP3 player, the player performs digital signal processing to un-compress the MP3 data into a form suitable for listening.
As another obvious example, do you own a digital camera? If so, whenever you take a picture, the camera performs a variety of digital signal processing tasks, such as automatically locating and focusing on any human faces in the frame. Later, in addition to compressing the image to make it consume less memory (so you can store more pictures), the camera may use digital signal processing algorithms to adjust the image for brightness, contrast, color balance, and so forth.
Now consider a next-generation conference phone. In addition to the person speaking, a typical conference room will include several sources of noise, such as other attendees chatting to each other in undertones, the background hum of a fan, the sound of the room's air-conditioning system, traffic passing by outside the office, and so forth. In the case of a conventional conference phone using only a single microphone, any background noise will be picked up and will serve to degrade the quality of the primary speaker's contribution. By comparison, a next-generation phone with multiple microphones can use special digital signal processing algorithms called acoustic beamforming to focus on whoever is the primary speaker at the time and to reject any background noise and side-conversations.
And the list goes on, and on, and on...
Performing Digital Signal Processing
Actually, when you come to think about it, the complicated part is deciding on the algorithms we wish to apply to our digital data. Once we've decided on these algorithms, all we have to do is implement them in some way.
Whatever algorithms we decide to use, they ultimately break down into large numbers of relatively simple tasks such as multiplying digital values, adding values together, and similar operations.
Purely for the sake of an example, let's assume that one small part of a digital signal processing algorithm looks like the following:
y = (a * b) + (c * d) + (e * f) + (g * h);
Note that all of these variables (y, a, b, c, ...) represent multi-bit values; for example, 'a' through 'h' might each be 16-bits wide while 'y' might be 32-bits wide.
Now, we could use a general-purpose microprocessor to perform this task. But this would be relatively slow and painful. First the processor would have to load 'a' into one of its internal registers; then it would have to load 'b' into another register; then it would have to multiply them together and store the result in yet another register. Next, the processor would have to repeat these operations for variables 'c' and 'd', but this time it would also have to add this product to the original product from the multiplication of 'a' and 'b'. And on it goes.
An alternative is to use a special-purpose microprocessor called a digital signal processor (DSP). This may be presented as a discrete chip or as a "core" that is built into a larger chip. If you were to look into a cell phone, for example, you might find a small general-purpose processor that is used to monitor the keyboard and suchlike coupled with a DSP that is used to play music and display images on the screen.
The architecture of a digital signal processor is targeted toward performing a certain set of digital signal processing tasks. It may, for example, contain one or more multiply-and-accumulate (MAC) units that can be used to multiply two values together and add the result to a "running total."
Having said this, DSPs are still "von Neumann" machines that have to fetch data and process it in small "chunks". Thus, yet another approach is to use a field programmable gate array (FPGA). As discussed in my book Bebop to the Boolean Boogie, these devices may be visualized as containing hundreds of thousands of small "islands" of programmable logic in a "sea" of programmable interconnect.
The point is that an FPGA can be configured/programmed on-the-fly to implement whatever task we wish it to perform. In the case of our example equation...
y = (a * b) + (c * d) + (e * f) + (g * h);
...we could configure the FPGA to contain four 16 x 16 multipliers coupled with a four-input 32-bit adder. Since a high-end FPGA package may contain hundreds or thousands of pins, we could bring all of the 'a' through 'h' inputs in simultaneously; we could perform all four multiplications in a single clock cycle, and we could add all four products on a second clock cycle.
Truth to tell, I could waffle on about this sort of thing for hours, but Andy is emailing me saying that we're fast approaching the deadline. So until next time - have a good one!
Coming Soon
In addition to a plethora of topics I have up my sleeves, I welcome your suggestions for future articles in this series. Are there any subjects you'd like me to cover? Any perplexing questions you've been puzzling over and pondering, just wishing you had someone to ask? If so, drop me an email and I'll do my best to work them into a future column.
Acknowledgements
This article was abstracted from Bebop to the Boolean Boogie (An Unconventional Guide to Electronics) with the kind permission of the publisher.
About the author
Clive "Max" Maxfield is president of TechBites Interactive, a marketing consultancy firm specializing in high technology. Max is the author and co-author of a number of books, including Bebop to the Boolean Boogie (An Unconventional Guide to Electronics), The Design Warrior's Guide to FPGAs (Devices, Tools, and Flows), How Computers Do Math featuring the pedagogical and phantasmagorical virtual DIY Calculator.
In addition to being a hero, trendsetter, and leader of fashion, Max is widely regarded as being an expert in all aspects of computing and electronics (at least by his mother). Max was once referred to as "an industry notable" and a "semiconductor design expert" by someone famous who wasn't prompted, coerced, or remunerated in any way. Max can be contacted at max@techbites.com.
More Columns from Various Archived Columns
Slash Sheet Chaos: Is What You See, What You Get?Moisture in Materials: Avoiding Process Gremlins
Material Witness: Beat the Heat--A Non-Math Intro to Thermal Properties
Material Witness: Considerations in Using TC Materials for PWBs
Material Witness: Are Your Materials Up to the Challenge?
Material Witness: Thermal Oxidation of Materials, Part I
Material Witness: Thermal Oxidation of Materials, Part II
Material Witness: R.I.P. Speedboard C