Thesis Proposal for: Companding in Fixed Point DSPs A scheme to reduce the quantization (roundoff) errors in Fixed Point DSPs Ari Klein ADVANTAGE OF LARGE SIGNALS • When the signals in the DSP are large, they take full advantage of the available bits. • When the signals in the DSP are small, only a few of the available bits are used. • The roundoff error is essentially independent of the signal level, so the distortion due to roundoff is much worse for small signals LARGE SIGNALS CONSTANT ENVELOPE •To reduce roundoff error, all signals should be “as large as possible” whenever digital •Since the system has a set overflow tolerance, “as large as possible” means that all digital signals should have a roughly constant envelope, where the constant is slightly lower than the system overflow tolerance If there is only an ADC and a DAC (no DSP in between): u(nT) g(n) X ADC X DAC y(nT) 1/g(n) •Since the input is NOT generally constant envelope, multiply the input by a time-varying signal, g(n), BEFORE the ADC. g(n) should be LARGE when the input signal is SMALL, and SMALL when the input signal is LARGE •To make the output equal to the input, the output must be multiplied by 1/g(n) •The multiplication by 1/g(n) must be done AFTER the DAC, so that the signal is large whenever it is digital What about with a DSP between the ADC and DAC? Might consider: u(nT) g(n) X ADC DSP DAC 1/g(n) Would this scheme work? X y(nT) NO! this will horribly distort the input/output behavior u(nT) g(n) X ADC DSP DAC X y(nT) 1/g(n) Taking a DSP, multiplying its input by a timevarying signal g(n), and then multiplying the output by 1/g(n) will, in general, CHANGE the input/output behavior of the DSP (dramatically) For example, let y(n)=u(n-k) So the DSP is a k-sample delay. If I do: u(nT) g(n) X ADC Z-k DAC X y(nT) 1/g(n) •The output is now g(n-k)*u(n-k)/g(n) •This is NOT equal to u(n-k). •It is DISTORTED by the factor g(n-k)/g(n). •This is a time-varying distortion. •More complicated systems will have more complicated distortions Must make internal corrections in DSP to ensure that there is no change in input/output behavior. Consider a system given by: x(n+1)=A*x(n)+B*u(n) y(n)=C*x(n)+D*u(n) I want the internal states to be large for all n, so set w(n)=G(n)*x(n) Doing the algebra gives Prof. Tsividis’s Equations: w(n+1)= [G(n+1)*A* G-1(n)]*w(n)+[G(n+1)*B]*u(n) y(n)=[C*G-1(n)]*w(n)+D*u(n) This is a new internally time-varying system, whose states are always large, but whose input/output behavior is identical to the original system’s! Companding for DSPs (in principle) input X ADC DSP DAC DAC ADC G(n) generator DAC X output Single-g Companding: G(n) = g(n) * I / ADC DSP DAC X ADC Envelope Detection •simple •works well for systems where all the signals are “roughly” in phase with each other •set g(n) = k / env(n) where env(n) is the envelope of the input, and k is a constant dependent on the overflow tolerance Single-g Companding: G(n) = g(n) * I Starting from Professor Tsividis’s Equations: And setting G(n) = g(n) * I gives: w(n+1) = d(n) * (A*w(n)+B*[g(n)*u(n)] ) [g(n)*y(n)] = C*w(n)+D*[g(n)*u(n)] where d(n) = g(n+1) g(n) Companding system has: •Input = g(n)*u(n) •Output = g(n)*y(n) Single-g Companding: G(n) = g(n) * I w(n+1) = d(n) * (A*w(n)+B*[g(n)*u(n)] ) In general, [g(n)*y(n)] = C*w(n)+D*[g(n)*u(n)] Can be implemented as: Z-1 / ADC DSP ADC Envelope Detection Z-1 / DAC X Unfortunately, single-g companding does NOT work well for systems where some signals are large at the same time as other signals are small For such systems, need multi-g companding: G(n) still diagonal, but with unequal elements on diagonal Multi-g Companding G(n) is diagonal, but with unequal elements on diagonal X ADC DSP with companding DAC X DAC ADC G(n) generator The G(n) generator could be (for example): DSP without companding Envelope Detection DAC •More complicated than single-g companding •But works for any system Simplifications for multi-g companding Consider a k-delay element: If the input is large: gi(n) * xi(n) the output is also large: gi(n-k) * xi(n-k) Can get desired Can just delay gi(n) by k, Z-k Thesis Proposal •Implement companding on some actual DSPs • I have already implemented it on the simple digital reverberator shown below Thesis Proposal Explore Possible Improvements For example: Taking advantage of masking by using a bank of bandpass filters Thesis Proposal Theoretical Considerations Already Proven: Companding does not change the original system’s •Stability •Controllability •Observability Would like to find: •General method for easily implementing multi-g companding •The “optimal” G(n) for minimizing quantization errors •Upper bound on performance improvement due to companding •General description of the type of systems where companding is most useful Thesis Proposal Implementing in Hardware Implement the companding system on an actual fixed-point DSP in real-time •Build the necessary analog components: •Timeshare ADCs and DACs (current implementation requires 2 ADCs and 3 DACs – probably too expensive) •Make them variable gain to “absorb” the multiplies and divides •Get the Simulink model for the digital companding system to work on the DSP in real time •Prototype (non-companding) system •Real-time digital envelope detection to create g(n) signals •Companding system Thesis Proposal Qualitative Comparisons • For a given output “quality” how many bits are needed in the original, non-companding DSP versus in the companding DSP? • For a given number of bits, how does the output “quality” compare between the original, noncompanding DSP versus the companding DSP? • Conduct objective listening tests, similar to psychoacoustic experiments Thesis Proposal Quantitative Comparisons Quantify the improvements as a function of signal level and number of bits For example: •Mean square error of output •SNR •Harmonic distortion in spectrum If these are NOT good metrics for quantifying improvements due to companding, I will also need to FIND some good metrics
© Copyright 2026 Paperzz