SlideShare a Scribd company logo
1 of 20
Companding in Fixed Point DSPs
A scheme to reduce the quantization
(roundoff) errors in Fixed Point DSPs
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
To reduce roundoff error, I
would like to keep all digital
signals as large as possible at all
times.
Since the system has a set
overflow tolerance, I would
like all digital signals to have a
roughly constant envelope,
where the constant is slightly
lower than the system
overflow tolerance
Suppose I have analog input, u(t), and analog
output, y(t), so I need an ADC and a DAC:
ADC DAC
u(t) y(t)
Consider multiplying the analog input by a time
varying signal, g(n), which is LARGE when the
input signal is SMALL, and SMALL when the
input signal is LARGE, so that I get a roughly
constant envelope signal
For example, if env(n) is the (sampled) envelope
of the input, g(n) could be k/env(n) where k is
some constant slightly lower than the system
overflow tolerance level.
If g(n) is LARGE when u(nT) is SMALL, and SMALL
when u(nT) is LARGE, then g(n)*u(nT) stays at a
roughly constant signal level, and can be set large always.
I would therefore like to multiply my input by g(n)
BEFORE it gets to the ADC, so that the ADC ALWAYS
sees a large signal.
To preserve the input/output behavior (but with less
quantization noise), I would like to multiply the output signal
by 1/g(n).
The multiplication by 1/g(n) should come AFTER the DAC so
that THE SIGNAL STAYS LARGE WHENEVER IT IS
DIGITAL.
ADC DAC
u(nT)
y(nT)
So I would get:
X
g(n)
X
1/g(n)
This is “classical” companding.
The input signal level can vary wildly, but the digital system
sees a signal level that is essentially constant.
This can therefore allow a digital system to cover a large
dynamic range with only a few bits.
But note that there is NO DSP here between the ADC and DAC
I would like to try this with a DSP in between the ADC and DAC.
Would the scheme below work?
ADC DAC
u(nT) y(nT)
g(n)
X
1/g(n)
DSP
X
NO! Using classical companding
on a DSP will horribly distort the
input/output behavior
Taking a DSP, multiplying its input by
a time-varying 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:
ADC DAC
u(nT) y(nT)
g(n)
X
1/g(n)
Z-k
X
•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
All is not lost: I can preserve
input/output behavior by making
internal corrections in the DSP
I want the internal states to be large for all n,
so I will do a change of basis in the state space:
w(n)=G(n)*x(n)
Consider a system given
by:
x(n+1)=A*x(n)+B*u(n)
y(n)=C*x(n)+D*u(n)
w(n)=G(n)*x(n) so x(n)=G-1(n)*w(n)
w(n+1)=G(n+1)*x(n+1)=
G(n+1)*A*x(n)+G(n+1)*B*u(n)=
[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!
In block form:
ADC DAC
u(nT) y(nT)
gu(n)
X
gy(n)
DSP
X
G(n)
Taken together, the multiplications at the input and
output, along with the internal corrections in the
DSP, ensure two things:
•All digital signals are always large
•The input/output behavior (not including
quantization error) is the same as in the original
(non-companding) DSP
•Multiplies the input by a signal (based on the G(n) matrix), which
ensures that the signal at the ADC is always large.
•Makes internal corrections to the states of the DSP to ensure that the
states are always large.
•Multiplies the output of the DAC by another signal (based on G(n)).
This is necessary, since companding ensures that the output of the DAC
is always large, while the actual output will not always be large.
•These modifications do NOT change the input/output behavior (they
only lower the quantization error).
Companding for DSPs
Project Proposal
•Implement companding on an actual
DSP – a simple digital reverberator
Project Proposal (cont’d)
• 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, non-companding DSP versus the
companding DSP?
Project Proposal (cont’d)
• Can I quantify the improvements?
For example:
•Mean square error of output
•SNR (as a function of signal level)
•Harmonic distortion in spectrum
I would like to find all these for both the companding and the
non-companding systems as a function of the number of bits
used in the system.

More Related Content

Similar to companding.ppt

47296653 testing-adc
47296653 testing-adc47296653 testing-adc
47296653 testing-adc
Gururaj B
 
L 1 5 sampling quantizing encoding pcm
L 1 5 sampling quantizing encoding pcmL 1 5 sampling quantizing encoding pcm
L 1 5 sampling quantizing encoding pcm
DEEPIKA KAMBOJ
 

Similar to companding.ppt (20)

Analog to digital converters, adc
Analog to digital converters, adcAnalog to digital converters, adc
Analog to digital converters, adc
 
Introduction to digital signal processing
Introduction to digital signal processingIntroduction to digital signal processing
Introduction to digital signal processing
 
Computer hardware
Computer hardware Computer hardware
Computer hardware
 
Adc &dac ppt
Adc &dac pptAdc &dac ppt
Adc &dac ppt
 
Delta Modulation & Adaptive Delta M.pptx
Delta Modulation & Adaptive Delta M.pptxDelta Modulation & Adaptive Delta M.pptx
Delta Modulation & Adaptive Delta M.pptx
 
Speech technology basics
Speech technology   basicsSpeech technology   basics
Speech technology basics
 
Analog-to Digital Conversion
Analog-to Digital ConversionAnalog-to Digital Conversion
Analog-to Digital Conversion
 
CE_PCM.ppt
CE_PCM.pptCE_PCM.ppt
CE_PCM.ppt
 
DSP intro 1.pptx
DSP intro 1.pptxDSP intro 1.pptx
DSP intro 1.pptx
 
Introduction to dsp
Introduction to dspIntroduction to dsp
Introduction to dsp
 
47296653 testing-adc
47296653 testing-adc47296653 testing-adc
47296653 testing-adc
 
Real time signal processing
Real time signal processingReal time signal processing
Real time signal processing
 
NI Presenation Delta
NI Presenation DeltaNI Presenation Delta
NI Presenation Delta
 
Analog to Digital Converters
Analog to Digital ConvertersAnalog to Digital Converters
Analog to Digital Converters
 
dsd.pptx
dsd.pptxdsd.pptx
dsd.pptx
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Digital Audio
Digital AudioDigital Audio
Digital Audio
 
30 CHL PCM PDH SDH BY SKG
30 CHL PCM PDH SDH BY SKG30 CHL PCM PDH SDH BY SKG
30 CHL PCM PDH SDH BY SKG
 
L 1 5 sampling quantizing encoding pcm
L 1 5 sampling quantizing encoding pcmL 1 5 sampling quantizing encoding pcm
L 1 5 sampling quantizing encoding pcm
 
analog to digital adn digital to analog .ppt
analog to digital adn digital to analog .pptanalog to digital adn digital to analog .ppt
analog to digital adn digital to analog .ppt
 

More from AbdullahOmar64 (14)

digital anlage c converter for digital .ppt
digital anlage c converter for digital .pptdigital anlage c converter for digital .ppt
digital anlage c converter for digital .ppt
 
LineCoding_ADCS.ppt
LineCoding_ADCS.pptLineCoding_ADCS.ppt
LineCoding_ADCS.ppt
 
The_Role_of_Raised_Cosine.pdf
The_Role_of_Raised_Cosine.pdfThe_Role_of_Raised_Cosine.pdf
The_Role_of_Raised_Cosine.pdf
 
09-SpreadSpectrum.ppt
09-SpreadSpectrum.ppt09-SpreadSpectrum.ppt
09-SpreadSpectrum.ppt
 
3-Matched-Filter.ppt
3-Matched-Filter.ppt3-Matched-Filter.ppt
3-Matched-Filter.ppt
 
mod.pptx
mod.pptxmod.pptx
mod.pptx
 
waveforms.ppt
waveforms.pptwaveforms.ppt
waveforms.ppt
 
aliasing.ppt
aliasing.pptaliasing.ppt
aliasing.ppt
 
Lecture_4_Data_Gathering_and_Analysis.pdf
Lecture_4_Data_Gathering_and_Analysis.pdfLecture_4_Data_Gathering_and_Analysis.pdf
Lecture_4_Data_Gathering_and_Analysis.pdf
 
INI_800_Lecture_1_Introduction.pdf
INI_800_Lecture_1_Introduction.pdfINI_800_Lecture_1_Introduction.pdf
INI_800_Lecture_1_Introduction.pdf
 
books-library.online-02011910Vr3Z0.pdf
books-library.online-02011910Vr3Z0.pdfbooks-library.online-02011910Vr3Z0.pdf
books-library.online-02011910Vr3Z0.pdf
 
نظم-العد.pdf
نظم-العد.pdfنظم-العد.pdf
نظم-العد.pdf
 
convert number.pdf
convert number.pdfconvert number.pdf
convert number.pdf
 
Guide latex.
Guide latex.Guide latex.
Guide latex.
 

Recently uploaded

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 

Recently uploaded (20)

Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 

companding.ppt

  • 1. Companding in Fixed Point DSPs A scheme to reduce the quantization (roundoff) errors in Fixed Point DSPs
  • 2. 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
  • 3. To reduce roundoff error, I would like to keep all digital signals as large as possible at all times.
  • 4. Since the system has a set overflow tolerance, I would like all digital signals to have a roughly constant envelope, where the constant is slightly lower than the system overflow tolerance
  • 5. Suppose I have analog input, u(t), and analog output, y(t), so I need an ADC and a DAC: ADC DAC u(t) y(t)
  • 6. Consider multiplying the analog input by a time varying signal, g(n), which is LARGE when the input signal is SMALL, and SMALL when the input signal is LARGE, so that I get a roughly constant envelope signal For example, if env(n) is the (sampled) envelope of the input, g(n) could be k/env(n) where k is some constant slightly lower than the system overflow tolerance level.
  • 7. If g(n) is LARGE when u(nT) is SMALL, and SMALL when u(nT) is LARGE, then g(n)*u(nT) stays at a roughly constant signal level, and can be set large always. I would therefore like to multiply my input by g(n) BEFORE it gets to the ADC, so that the ADC ALWAYS sees a large signal.
  • 8. To preserve the input/output behavior (but with less quantization noise), I would like to multiply the output signal by 1/g(n). The multiplication by 1/g(n) should come AFTER the DAC so that THE SIGNAL STAYS LARGE WHENEVER IT IS DIGITAL.
  • 9. ADC DAC u(nT) y(nT) So I would get: X g(n) X 1/g(n) This is “classical” companding. The input signal level can vary wildly, but the digital system sees a signal level that is essentially constant. This can therefore allow a digital system to cover a large dynamic range with only a few bits. But note that there is NO DSP here between the ADC and DAC
  • 10. I would like to try this with a DSP in between the ADC and DAC. Would the scheme below work? ADC DAC u(nT) y(nT) g(n) X 1/g(n) DSP X
  • 11. NO! Using classical companding on a DSP will horribly distort the input/output behavior Taking a DSP, multiplying its input by a time-varying signal g(n), and then multiplying the output by 1/g(n) will, in general, CHANGE the input/output behavior of the DSP (dramatically)
  • 12. For example, let y(n)=u(n-k) So the DSP is a k-sample delay. If I do: ADC DAC u(nT) y(nT) g(n) X 1/g(n) Z-k X •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
  • 13. All is not lost: I can preserve input/output behavior by making internal corrections in the DSP
  • 14. I want the internal states to be large for all n, so I will do a change of basis in the state space: w(n)=G(n)*x(n) Consider a system given by: x(n+1)=A*x(n)+B*u(n) y(n)=C*x(n)+D*u(n)
  • 15. w(n)=G(n)*x(n) so x(n)=G-1(n)*w(n) w(n+1)=G(n+1)*x(n+1)= G(n+1)*A*x(n)+G(n+1)*B*u(n)= [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!
  • 16. In block form: ADC DAC u(nT) y(nT) gu(n) X gy(n) DSP X G(n) Taken together, the multiplications at the input and output, along with the internal corrections in the DSP, ensure two things: •All digital signals are always large •The input/output behavior (not including quantization error) is the same as in the original (non-companding) DSP
  • 17. •Multiplies the input by a signal (based on the G(n) matrix), which ensures that the signal at the ADC is always large. •Makes internal corrections to the states of the DSP to ensure that the states are always large. •Multiplies the output of the DAC by another signal (based on G(n)). This is necessary, since companding ensures that the output of the DAC is always large, while the actual output will not always be large. •These modifications do NOT change the input/output behavior (they only lower the quantization error). Companding for DSPs
  • 18. Project Proposal •Implement companding on an actual DSP – a simple digital reverberator
  • 19. Project Proposal (cont’d) • 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, non-companding DSP versus the companding DSP?
  • 20. Project Proposal (cont’d) • Can I quantify the improvements? For example: •Mean square error of output •SNR (as a function of signal level) •Harmonic distortion in spectrum I would like to find all these for both the companding and the non-companding systems as a function of the number of bits used in the system.