[Next] [Previous] [Top]

Software Synthesis for Single-Processor DSP Systems Using Ptolemy

4.0 An Application: Adaptive PCM Coding


In this section, I will detail a simple application developed in the CG56 domain. An adaptive DPCM speech coder/decoder system was implemented using the S56XTarget. This target produces two files, one specifying the assembly code and the specifying the asychronous input output user interface. For a listing of each of these files see sections 7.2 and 7.3. The code generated runs in real-time on a Motorola 56000 DSP card installed in the SparcStation. This card is connected to an A/D and D/A that run at 8 kHz producing/consuming 16 bit samples. The coder allows various levels of quantization that can be readily interchanged at run time. The ADPCM coder is one implementation in the broad family of adaptive predictive coders (APC). First, a review of DPCM coders will be presented. For a more detailed derivation of ADPCM coders see [25].

A DPCM coder codes speech by quantizing a difference signal. Let denote the original speech signal, then the difference signal is defined as where is the prediction of . Using a DPCM coder results in a coding gain known as the predictive gain, . A simplified DPCM coder is shown in figure 11. is known as the prediction filter.

In order to be able to quantize , a feedback-around-quantizer structure (figure 12) is used so both of the prediction filters have access to the same information. This structure allows the use of an adaptive predictive filter where both filters adapt in unison, thus avoiding the need to transmit the predictor coefficients. In the system implemented, least mean square (LMS) adaptive filters are used for the prediction filters. This adaptive algorithm uses the instantaneous mean square error to adapt the filter coefficients.

The coder and decoder for the system are shown in figures 13 and 14. The quantizer shown in figure 13 is a galaxy in Ptolemy. Inside this galaxy, there is a system of 4 quantizers feeding into a multiplexer. The multiplexer is controlled by the user interface shown in figure 15. Other parameters controllable here are an optional one second delay on the processed speech and a multiplicative constant applied to the quantizers to control their respective quantization and threshold levels. This constant allows the user to dynamically change the quantization parameters and instantly hear the results. A quantization range that is too large or too small impairs system performance. Thus with the slider, the user is able to fine tune the system.

The system produces intelligible speech at both 1 (8 kbs) and 2 (16 kbs) bit quantizations. At 3 bit quantization (24 kbs), the quality of the speech is very good. At 4 (32 kbs) bit quantization or no quantization, the speech quality is excellent.


Software Synthesis for Single-Processor DSP Systems Using Ptolemy - 04 SEP 94

[Next] [Previous] [Top]