Ask the Doctors: Why So Much DSP?
By Dave Berners

Why do some emulations take a lot of DSP, while others don't? Are some of the emulations better quality?

The cost of each DSP algorithm is determined largely by two factors: The first is the complexity of the process being modeled. The second is the ease with which the resulting model can be implemented in the discrete-time domain. Sometimes, relatively simple algorithms can take up large amounts of DSP, because of difficulties encountered in doing calculations with high precision. Other times, complex schemes can be carried out with minimal computational cost. For all emulations, the goal is to make the model indistinguishable from the original system. Guidelines for just-perceptible amounts of distortion and just-perceptible differences are taken from the RCA Radiotron Designer's Handbook and other sources.

In terms of computational expense, there are a few broad categories of processing that are almost guaranteed to be costly. Distortion (which used to be called nonlinear distortion) is the most well-known of these. A memoryless distortion is a great example of a process that can be very simple, yet costly to implement. Most of the expense associated with memoryless distortion is because oversampling is needed to prevent aliasing in a discrete-time system when nonlinearities are applied. In an oversampling system, two costly filters are required: one for producing the oversampled signal, and one for performing an alias-free decimation back down to the original sampling rate. Besides these filters, there is additional cost because the algorithm must run at the higher sampling rate. For a simple nonlinear function, the up- and down-sampling filters can be up to ten times the cost of the nonlinearity. This means that for a four-times oversampling nonlinear function, the total cost can be twenty-four times that of implementing the function itself.

"In terms of computational expense, there are a few broad categories of processing that are almost guaranteed to be costly."

Another example of an expensive algorithm is the nonlinear feedback loop. Often, dynamic range processors work by sensing the amplitude of the output signal. The detected amplitude is used to calculate the gain to be applied to the input. Because the amplitude of the output depends on the gain, a feedback loop is formed. Usually, the bandwidth of amplitude-detectors in dynamic range control devices is extremely limited, so aliasing is not necessarily a problem. However, the presence of feedback sometimes requires extraordinary precision to be used in calculations. Minute errors in feedback loops can lead to instability, limit cycles, or grossly inaccurate behavior. Sometimes, transcendental functions must be approximated by iteration. Depending on the function being approximated, iterative procedures can sometimes be made to converge quickly. Nevertheless, an iterated calculation that must be performed for each sample can lead to an enormous computational expense.

Sometimes, computational expense is increased for indirect reasons. For example, several EQ algorithms have been designed using oversampling. In some cases, nonlinearities in the EQ processes being modeled are not significant, and models of these processes would not produce perceptible aliasing, even if implemented at the base sampling rate. In these cases, oversampling is used because the design of the required filters may not be tractable at the original sampling rate. Oversampling provides a way to design accurate filters directly from the parameters of the circuit being modeled.

Usually, the more costly memoryless nonlinear functions of one variable can be approximated adequately using polynomials, or combinations of simpler nonlinear functions. However, functions of two or more variables can be difficult to approximate accurately. These functions often must be implemented by brute force, leading to high computational cost.

In the course of producing an emulation, various functional parts of an algorithm are identified and separated. As each part of an algorithm is implemented, various schemes are reviewed in terms of cost and accuracy. If a scheme exists that can significantly reduce cost without a great impact on accuracy, an "SE" version of the algorithm may be contemplated. In some cases, huge cost savings can be achieved with little perceptible impact on quality. However, if no low-cost alternatives are discovered that have acceptable quality, no SE version of the algorithm will be created.

In short, the cost of an emulation can be highly sensitive to details of topology, nonlinearities, and sampling-related complications. DSP usage and viability of an SE version for an algorithm depend more on these details than on the function of the device being modeled. As a result, DSP usage will have great variability for different emulations, even though the faithfulness of the emulations may be consistent. The one exception is devices that produce large amounts of distortion. These devices will be universally costly to emulate.

Questions or comments on this article?