Digital Signal Processing Reference
In-Depth Information
13. When using the window function to design lter coecients, many windows are
supported. Experimenting with the windows gausswin, hamming, rectwin,
and triang, determine which window gives the best results for a lowpass FIR
lter.
14. We saw that ipping every other sign for a lowpass lter's coecients has the
eect of making it a highpass lter. The alternating ip mimics multiplying
each value with a high-frequency sinusoid. Write code to change a set of lter
coecients by multiplying them with a slower sinusoid. What eect do you
observe?
15. Finding the number of distinct values is basically counting. One way to do it
as an algorithm is to sort the values, then eliminate any duplicates, and the
number of values left is the number of distinct values. For example, in the
seriesf7, 3, 5, 1, 3, 3, 5, 4, 1, 7, 4, 5g, there are only 5 distinct valuesf1, 3,
4, 5, 7g. The nearest power of 2 greater than (or equal to) this is 8, or 2 3 .
Thus we can assign each value a dierent code of 3 bits. What we want to do
is store a signal in less space. That is, we could represent these values with
3 bits each. This is not the most ecient way to store these values, but it is
meant to give you an idea of how compression works. (Human encoding is
more ecient.)
Suppose we have the following example signal:
x[n] =f0;1; 9;1; 9; 9; 0; 3;1; 3; 0; 0g:
Storing these in binary as integers, we would probably use 16 bits to store
each value, for a total of 192 bits, but this is wasteful in terms of the amount
of space.
a. How many distinct values are there in the example signal x[n] above?
b. Decide what bit patterns should represent each distinct value (forming a
lookup table).
c. Show what the entire example signal above (x[n]) would look like encoded.
Remember that we want to be able to undo this as well|given the bit pattern
and lookup table, we should be able to get x[n] back.
d. How many bits does the encoded signal take up? What if you included the
encoding table?
Search WWH ::




Custom Search