02.10.2019 Views

UploadFile_6417

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

610 Chapter 12 APPLICATIONS IN COMMUNICATIONS<br />

In the reconstruction of the signal from the quantized values, the<br />

decoder employs an inverse logarithmic relation to expand the signal<br />

amplitude. For example, in µ-law the inverse relation is given by<br />

|s| = (1 + µ)|y| − 1<br />

; |y| ≤1, |s| ≤1 (12.7)<br />

µ<br />

The combined compressor-expander pair is termed a compander.<br />

12.1.1 PROJECT 12.1: PCM<br />

The purpose of this project is to gain an understanding of PCM compression<br />

(linear-to-logarithmic) and PCM expansion (logarithmic-to-linear).<br />

Write the following three MATLAB functions for this project:<br />

1. a µ-law compressor function to implement (12.5) that accepts a zeromean<br />

normalized (|s| ≤1) signal and produces a compressed zero-mean<br />

signal with µ as a free parameter that can be specified,<br />

2. a quantizer function that accepts a zero-mean input and produces an<br />

integer output after b-bit quantization that can be specified, and<br />

3. a µ-law expander to implement (12.7) that accepts an integer input<br />

and produces a zero-mean output for a specified µ parameter.<br />

For simulation purposes generate a large number of samples (10,000<br />

or more) of the following sequences: (a) a sawtooth sequence, (b) an exponential<br />

pulse train sequence, (c) a sinusoidal sequence, and (d) a random<br />

sequence with small variance. Care must be taken to generate nonperiodic<br />

sequences by choosing their normalized frequencies as irrational numbers<br />

(i.e., sample values should not repeat). For example, a sinusoidal sequence<br />

can be generated using<br />

s(n) =0.5 sin(n/33), 0 ≤ n ≤ 10,000<br />

From our discussions in Chapter 2, this sequence is nonperiodic, yet it<br />

has a periodic envelope. Other sequences can also be generated in a similar<br />

fashion. Process these signals through the above µ-law compressor,<br />

quantizer, and expander functions as shown in Figure 12.2, and compute<br />

FIGURE 12.2<br />

PCM project<br />

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).<br />

Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!