TECHNICALLY SPEAKING...

By Steve Somers, Vice President of Engineering

Digital Signal Processing Reshaping Your Perceptual Environment One Digital Sample at a Time

t was the 60’s when I fondly recall watching the sci-fi TV show The Outer Limits. It competed for Iattention with Rod Serling’s The Twilight Zone. In TTZ, strange things just happened to people. TOL set the stage with a “control voice” stating in part:

"There is nothing wrong with your television set. Do not attempt to adjust the picture. We are “controlling transmission. If we wish to make it louder, we will bring up the volume. If we wish to make it softer, we will tune it to a whisper. We will control the horizontal. We will control the vertical… You are about to experience the awe and mystery which reaches from the inner mind to... The Outer Limits.”

Both series broadcast in black and white, What is DSP, Really? of a time-varying, real world analog which in retrospect really magnified their Underneath it all, DSP is all about creating event. Given sufficient discrete samples, warp from reality. If TOL had been in focus. Focusing on something is akin those samples may be ingested by a color, perhaps the control voice could to honoring its message or its intrinsic processor, manipulated mathematically, have corrected the color and tint for me beauty. For example, DSP can remove and reconstructed as a new version of too. I’m certain that all of you survivors unwanted noise so we can focus on the that analog signal with such accuracy so of NTSC’s early days can relate. As the unique quality of a sound. DSP can filter as to be indistinguishable, or enhanced, control voice for this article, I hope to out a range of frequencies, much like from the original. DSP unintentionally maintain the awe and dispel some of the the adaptiveness of the human ear, to directs new focus on how users interface mystery about digital signal processing. allow focus on a specific message. DSP with and use products more than on its can remove the mundane and the clutter technical functionality. The typical DSP Controlling, filtering, re-blending, much like a photographer crops an image product feature list is often complicated enhancing, compressing, and replaying to focus attention on one visual concept. with so many choices that the user the everyday analog events of our lives interface must not only be graphical, but is the new reality that we lump into the We’ve been filtering signals for years in it must guide the user’s setup choices phrase “digital signal processing”, or DSP the analog domain. Why is digital signal and decision-making method to a greater in daily tech-speak. DSP is implemented filtering so important? The difference is degree. in various forms and means different analogous to the accuracy of cutting things to different people. While the most something with an axe compared to DSP State of the Art common inference ties DSP to audio cutting with a focused laser beam. Analog One question that invariably comes up processing, any manipulation of digital bits filtering is coarser with commensurate is: “So, what is the state of the art in representing picture or sound information difficulties controlling the filter response. DSP?” It’s a valid question, but tends is a form of digital signal processing. DSP Digital signal processing manipulates to focus on the hardware and not on is now the default acronym associated numbers that lie within specific ranges what the hardware is doing. DSP is with manipulation of audio signals; an which support very precisely designed about processing numbers rapidly attribution tied to the reality that digitally digital filters having stable, predictable to perform calculations required by processing audio information occurred response. DSP can “surgically remove algorithms designed to address a specific earlier than video because the audio or modify” information with relative ease problem. Just as in traditional computer frequency range is much lower than the compared to analog methods. programming, the DSP engineer writes basic video frequency range. Therefore, an algorithm, or process, for solving a audio signals initially required less digital The strength and the foundation of DSP is problem. The problem solution is usually processing, which could be implemented the manipulation of the numbers, or digital modeled into one or more equations with lower cost processors. data, which represent discrete samples that can be systematically solved by

continued on page 26

www.extron.com 25 TECHNICALLY SPEAKING... TECHNICALLY SPEAKING...

Digital Signal Processing — continued a microcomputer through iteration. result is the prime process in a DSP. A multiple MAC units, local instruction cache The faster that the microcomputer can DSP can typically perform one MAC memory, data address generation units, perform the required calculations, the in one clock cycle while a standard and circular addressing. closer the solution approaches what we microcomputer may require four or more consider to be real time. For audio signals, clock cycles. Processing Power… Approaching ‘The it must be fast enough that we do not Outer Limits’ perceive the result as abnormal. Figure 1 shows the basic architectural One of the most common design difference between a DSP and a considerations with a DSP is the data How does a digital signal processor microprocessor. The shared bus in the format used for calculations… that compare to a regular microcomputer? typical microprocessor necessitates is, fixed-point versus floating-point Are they really the same thing? DSPs incremental fetching of program steps, processing. A fixed-point processor has are specialized, highly streamlined then data. Further, the data must be its binary point, which corresponds to implementations of microcomputers with moved into registers and the appropriate the decimal point in our base 10 number unique features. All microcomputers can operations executed. The result is system, fixed at one position within be programmed to perform digital signal obtained at the cost of several steps and the data word. Floating-point allows processing functions in the general sense. considerable additional time. In the DSP movement of the binary point by utilizing The microcomputer limitations become architecture, program and data are usually a mantissa and an exponent; whereby evident with the type of algorithm typically separate with dedicated bus pathways. the binary point can “float” based on the needed for the DSP solution, such as Both program steps and data can be exponent value. with audio filtering. The difference boils fetched and moved simultaneously, thus down simply to efficiency and speed effecting much faster processing. Fixed-point format limits the processor’s of execution. The internal architecture number range for a given data word. The of a regular microcomputer, while very There are many facets that contribute to fixed point is maintained by using a single capable at performing looping calculations the fast architecture of a DSP. Among scaling factor. For example, the value of and multiplications characteristic of them are: high memory bandwidth, π, 3.14, can be represented in fixed- filter algorithms, does not make efficient use of its memory or management of program steps for DSP-type calculations. Microprocessor Architecture A microcomputer would have to run at several times the speed of a typical DSP Program General for even the simplest filtering operations. and Data Bus Purpose When addressing multiple algorithms, Memory Microprocessor the microcomputer solution becomes too slow or non-functional very quickly. Microcomputers are optimized for control applications where sequential timing of events is necessary without significant DSP Architecture mathematical operations.

DSP Algorithms Dictate DSP Engine Program Bus Design Memory So, the design of a DSP is dictated by DSP the types of algorithms, or calculation Core sequences, it most often executes. DSP architecture is optimized to handle Data multiple calculation sequences in parallel Memory Bus while minimizing clock cycles. At the heart of a DSP is one or more MACs, or “multiply and accumulate” units. Multiplication and accumulation of the Figure 1: Basic architectural difference between basic microprocessor and a DSP

­26 ExtroNews 21.2 | Summer 2010 TECHNICALLY SPEAKING...

point notation by the integer value 314 Bit Depth and Latency incurred while performing operations. divided by the scale factor 100. Numbers The topic always comes up, so let’s talk For one-way audio processing and larger than one data word require about it. Of course, under the hood, it’s broadcasting, latency may not be concatenation of an additional data important that a DSP system uses lots of important. In telephony, latency is very word, or words, for the range required. bits per word. More bits is better, right? important because it affects the quality Concatenation requires additional No system designer is going to look of the conversation between two people. calculation time, which affects processing ‘cool’ if he designs an 8-bit DSP solution. In conversation, the listener issues speed accordingly. This situation is one Moreover, are there any out there? In a unconscious utterances subtly notifying factor relating directly to processing fixed-point DSP, if there are more bits the talker that both are engaged in the latency in DSP. The primary concern with needed to maintain numeric fidelity, and conversation. Video conferencing and fixed-point designs is the maintenance of I love that term, we can concatenate live broadcasting likely demand the most “numeric fidelity”, or managing number more data words to make up any level control over latency since action and overflow in the processor. Fixed-point of processing precision needed. So discussion must remain in sync to realize DSPs typically garner lower cost what’s to give up? Speed, of course. a ‘normal’ experience. Live audio systems than their floating-point counterparts. But, processing power is getting cheaper should limit latency to no more than about Tradeoffs like management of numeric by the day. This makes the bit depth 10 milliseconds. fidelity and programming complexity question a bit difficult to answer. If the often redirect designers toward use of DSP is processing your needs in real time, Latency in image processing is problematic floating-point processors. do you care? depending on the ability to maintain lip sync. In fact, having adjustable latency in Floating-point format is similar to We do care about the front-end and the audio processing path is often desirable scientific notation in the decimal back-end conversion. Professional audio for matching lip sync timing with video system where a large number may be essentially dictates a minimum of 24-bit processing delays. What is an acceptable represented by an integer value multiplied processing with 48 KHz sampling. The amount of latency? For telephony, by some power of ten. Multiplication analog-to-digital and digital-to-analog latency of less than 150 milliseconds is by a power of ten implies an exponent conversion must be designed quite well perceived as acceptable. Image processing which will dictate the final precision with the dynamic range bounded by the typically demands no more than about 30 by shifting the decimal point, or radix, 24-bit architecture. What happens to 24- milliseconds, about one video frame, before by the number of places equal to the bit words in the processing chain is the lip sync difficulty is noticeable. value of the exponent. Floating-point domain of the DSP architect. representation supports a much wider Controlling the Horizontal and the range of number values. A fixed-point DSP can operate in double Vertical -- Common DSP Functions precision mode, which is 48-bits, and Whether an audio product design utilizes Arguments debating fixed-point versus provide very adequate control over fixed-point or floating-point DSP, the floating-point processing can be found dynamic range as well as have sufficient following is a common stable of functions among DSP manufacturers, users, processing power for its MACs. Double created in DSP to provide the intricate and specifiers. In the final analysis, precision may require additional time, but signal processing functionality for which the DSP equipment designer must may be mitigated by processor speed. A audio DSPs are famous: use great skill such that the user need 32-bit floating-point processor handling not be so concerned with the ‘how’ 24-bit data words provides us an 8-bit • Feedback suppression in DSP-equipped products so much exponent for exceptional dynamic range. • Ducking and Auto-mixing as whether the product appropriately However, professional audio processing • Dynamics and Delays addresses the problem/solution scenario. using 32-bit floating point, or 48-bit • Filtering Another common user concern with fixed-point for that matter, can result in • Automatic Echo Cancellation, AEC DSP-supported products centers on noticeable distortion. Double precision processing bit-depth and processing 64-bit operations easily mitigate distortion Feedback suppression counteracts the latency. Bit depth is another way of issues, which is why you’ll see reference common problem of acoustic ringing due expressing concern for range and to 32/64-bit floating point functionality to acoustic waves cycling between the accuracy of the digital representation of referenced in Extron DSP products. and loudspeakers. Feedback the real-world analog signal. Latency simply relates to the time is a positive reinforcement effect where

continued on page 28

www.extron.com 27 TECHNICALLY SPEAKING... TECHNICALLY SPEAKING...

Digital Signal Processing — continued

Noise gating sets a threshold where signal level below a set point is attenuated and/ or not passed through the signal chain. This can enhance the perception of signal-to- noise performance in noisy environments or where noise exists in equipment within the signal chain. Although when the is ‘open’ during louder passages, noise is allowed to pass through.

Delays are important. Delay is needed to control the time at which the signal emerges from one processing task with respect to other signals’ processing tasks. Within the DSP system, parallel channels will require differing processing times depending on the type of feature. For example, echo cancellation may introduce more delay than a simple bandpass filter. So, the Figure 2: DSP control software can be used to customize and fine-tune DSP filtering functions. ability to set a delay time for one channel room acoustics facilitate coupling between Ducking and Auto-mixing are features versus another is necessary in order to speaker emission and microphone that automatically attenuate the level of keep signal chains in relative sync. Another reception of a specific frequency, or or program sources in favor very important need for variable delay is group of frequencies. The coupling effect of a primary source whenever it has priority. re-establishment of lip sync where the video creates a gain loop that builds until the This feature enhances intelligibility by channel and audio channels are processed audio system oscillates out of control at a providing a significant differential between separately. dominant frequency. Feedback suppression the two sources. Dropping level on a utilizes multiple dynamic filters precisely continuous source, such as background Filtering is one of the most common and controlled by DSP. The DSP detects the music, improves our ability to focus on an least complex DSP functions. Filters are sensitive frequencies and adjusts the important voice-over message. usually performing parametric , dynamic filter’s resonant point to coincide low pass, high pass, or bass/treble shelving with the offending acoustic oscillation. Most Dynamics describes a set of DSP features functions. DSP commonly provides a DSP systems employ a group of dynamic that includes automatic gain control, collection of customizable filters for the and fixed filters that may be adjusted compression, limiting, and noise gating. input section and a separate group for manually or automatically. The DSP realm opens many possibilities the output section. Filter functions in DSP here in terms of functionality and the represent quick, recursive routines that Since the acoustic performance of each number of processing steps available. For perform the task at a much higher degree room situation is different, one of the prime example, compressors traditionally affect of accuracy and efficiency than any analog DSP features of feedback suppression is the dynamic range of the entire audio counterpart. Figure 2 shows how the the ability to detect and converge upon bandwidth being processed within the designer can interface with DSP control resonant frequencies rapidly. Once filters chain. Digital processing affords the ability software to implement a specific filter are tailored to manage room resonances, to perform parallel compression and/or function. the next challenge is to decide when a multiband compression. particular set of filters should be released Automatic Echo Cancellation, or and a new set converged as the room DSP also offers the opportunity, with little AEC, is the most active and, intensive dynamics change. Why would it change? incremental design effort, to include peak of the routines in DSP. Echoes occur in Room acoustics can change as people and RMS sensing of level changes so teleconferencing when the local microphone move around in the room activity, the that the compressor’s action can be more picks up not only the speaker’s voice, but temperature changes, or when the widely tailored to the type of compensation retransmits the voice of the far-end speaker microphone is moved. needed based upon the source material. as their voice emanates from the local

­28 ExtroNews 21.2 | Summer 2010 TECHNICALLY SPEAKING...

DSP Functional Hierarchy Figure 3 provides a relative sense of the typical topology that has flexibility with DSP hierarchy, or level of complexity and respect to the setup of the DSP functions Highest Auto Echo Cancellation processing required, for the typical DSP within the topology. This control interface Complexity functions. aids the user’s ability to setup DSP Feedback suppression applications quickly. Figure 4 illustrates the Dynamics Controlling the Transmission… flexible, simple design support provided Delay A unique aspect of a DSP is its control by a compartmentalized approach. Loudness interface. In fact, a DSP system may be Filters more notable or desirable for its software- Reaching The Outer Limits Ducking and Auto-mixing based control interface as this is the day- The old episodes of TOL ultimately to-day interactive means for functional took the viewer to the point where the Lowest Gain stage setup. The typical software control outcome was often incredulous, or was Complexity interface is highly graphic and should it? Approaching the brink of unbelievability Figure 3: DSP functions arranged in descending order facilitate ease of understanding and is like standing on the edge of a of complexity implementation. A really good interface technological cliff. This thing I want to do paints a picture of the audio processing may not be possible, but yet it might be. loudspeaker. This effect creates positive chain in the mind of the system designer Continuously advancing DSP technology reinforcement which builds into sustained or installer that mentally ‘pops up’ each requires that we always question the acoustic feedback. If there is sufficient time a DSP system is implemented. challenge and remain open for what is delay in the link, sustained feedback now possible. Such is the realm of DSP. may not occur, but intelligibility is greatly Some interfaces support a fully open Do you hear a control voice in your head hampered. Similar to local acoustic control architecture, which may require each time the need for DSP arises? feedback, the automatic echo canceller significant training for the system installer. “There is nothing wrong with your audio attempts to ‘learn’ the actual transfer Another approach that is often more channel. Do not attempt to adjust the function between the microphone and intuitive utilizes a fixed signal flow where master gain. We are controlling acoustic speaker on the conferencing system. features are compartmentalized into a feedback…” Once learned, AEC cancels the interfering feedback. Easy-to-use DSP Configurator Software for Fast Setup However, this feature is much more complex than acoustic feedback because the AEC must determine groups of frequencies within voice patterns so that the voice from the far end can be subtracted from the microphone signal to cancel the feedback while not affecting the reproduction of the near-end speaker’s voice. In other words, all the audio coming out of the local speaker must be removed from the microphone signal. With changing room environments or teleconference attendees talking from different places within a room, echo cancellation becomes very challenging. Therefore, AEC requires significant processing power due to the dynamics of the situation. An echo decays over a period of time called the “tail length”. Processing the tail length must extend for a period of 100 milliseconds or longer. Figure 4: Compartmentalized topology for DSP functions as shown in the Extron DSP Configurator Software

www.extron.com 29