Question

In this problem, you will write a computer program to design a vector quantizer and generate a codebook of size $[L \times N]$. Here, $L$ is the number of codebook entries and $N$ is the codebook dimension. Step 1 Generate a training set, $T_{i n}$, of size $[L n \times N]$, where $n$ is the number of training vectors per codevector. Assume $L=16, N=4$, and $n=10$. Denote the training set elements as $t_{i n}(i, j)$, for $i=0,1, \ldots, 159$ and $j=0,1,2,3$. Use Gaussian vectors of zero mean and unit variance for training. Step 2 Using the LBG algorithm [Lind80], design a vector quantizer and generate a codebook, $\boldsymbol{C}$, of size $[L \times N]$, i.e., $[16 \times 4]$. In the LBG VQ design, choose the distortion threshold as 0.001 . Label the codevectors as $c(i, j)$, for $i=$ $0,1, \ldots, 15$ and $j=0,1,2,3$. FIGURE CANT COPY Figure 3.23. Four-bit VQ design specifications for Problem 3.9. Step 3 Similar to Step 1 generate another training set, $T_{\text {out }}$ of size $[160 \times 4]$ that we will use for testing the VQ performance. Label these training set values as $t_{\text {out }}(i, j)$, for $i=0,1, \ldots, 159$ and $j=0,1,2,3$. Step 4 Using the codebook, $\boldsymbol{C}$, designed in Step 2, perform vector quantization of $t_{\text {in }}(i, j)$ and $t_{\text {out }}(i, j)$. Let us denote the VQ results as $\hat{t}_{\text {in }}(i, j)$ and $\hat{t}_{\text {out }}(i, j)$, respectively. a. When the test vectors are within the training sequence, compute the over-all SNR and segmental SNR values as follows, $$ \begin{aligned} S N R_{\text {overall }} & =\frac{\sum_{i=0}^{L n-1} \sum_{j=0}^{N-1} t_{i n}^2(i, j)}{\sum_{i=0}^{L n-1} \sum_{j=0}^{N-1}\left(t_{i n}(i, j)-\hat{t}_{i n}(i, j)\right)^2} \\ S N R_{\text {segmental }} & =\frac{1}{L n} \sum_{i=0}^{L n-1} \frac{\sum_{j=0}^{N-1} t_{i n}^2(i, j)}{\sum_{j=0}^{N-1}\left(t_{i n}(i, j)-\hat{t}_{i n}(i, j)\right)^2} \end{aligned} $$ b. Compute the over-all SNR and segmental SNR values when the test vectors are different from the training ones, i.e., replace $t_{i n}(i, j)$ with $t_{\text {out }}(i, j)$ and $\hat{t}_{\text {in }}(i, j)$ with $\hat{t}_{\text {out }}(i, j)$ in (3.57) and (3.58). c. List in Table 3.6 the overall and segmental SNR values for different number of codebook entries and different codebook dimensions. Explain the effects of choosing different values of $L, n$, and $N$ on the SNR values. d. Compute the MSE, $\quad \varepsilon\left(t_{i n}, \hat{t}_{i n}\right)=\frac{1}{L n} \frac{1}{N} \sum_{i=0}^{L n-1} \sum_{j=0}^{N-1}\left(t_{i n}(i, j)-\right.$ $\left.\hat{t}_{i n}(i, j)\right)^2$ for different cases, e.g., $L=16,64, n=10,100,1000$, $N=2,8$. Explain how the MSE varies for different values of $L, n$, and $N$.

   In this problem, you will write a computer program to design a vector quantizer and generate a codebook of size $[L \times N]$. Here, $L$ is the number of codebook entries and $N$ is the codebook dimension.

Step 1
Generate a training set, $T_{i n}$, of size $[L n \times N]$, where $n$ is the number of training vectors per codevector. Assume $L=16, N=4$, and $n=10$. Denote the training set elements as $t_{i n}(i, j)$, for $i=0,1, \ldots, 159$ and $j=0,1,2,3$. Use Gaussian vectors of zero mean and unit variance for training.
Step 2
Using the LBG algorithm [Lind80], design a vector quantizer and generate a codebook, $\boldsymbol{C}$, of size $[L \times N]$, i.e., $[16 \times 4]$. In the LBG VQ design, choose the distortion threshold as 0.001 . Label the codevectors as $c(i, j)$, for $i=$ $0,1, \ldots, 15$ and $j=0,1,2,3$.
FIGURE CANT COPY
Figure 3.23. Four-bit VQ design specifications for Problem 3.9.

Step 3
Similar to Step 1 generate another training set, $T_{\text {out }}$ of size $[160 \times 4]$ that we will use for testing the VQ performance. Label these training set values as $t_{\text {out }}(i, j)$, for $i=0,1, \ldots, 159$ and $j=0,1,2,3$.
Step 4
Using the codebook, $\boldsymbol{C}$, designed in Step 2, perform vector quantization of $t_{\text {in }}(i, j)$ and $t_{\text {out }}(i, j)$. Let us denote the VQ results as $\hat{t}_{\text {in }}(i, j)$ and $\hat{t}_{\text {out }}(i, j)$, respectively.
a. When the test vectors are within the training sequence, compute the over-all SNR and segmental SNR values as follows,
$$
\begin{aligned}
S N R_{\text {overall }} & =\frac{\sum_{i=0}^{L n-1} \sum_{j=0}^{N-1} t_{i n}^2(i, j)}{\sum_{i=0}^{L n-1} \sum_{j=0}^{N-1}\left(t_{i n}(i, j)-\hat{t}_{i n}(i, j)\right)^2} \\
S N R_{\text {segmental }} & =\frac{1}{L n} \sum_{i=0}^{L n-1} \frac{\sum_{j=0}^{N-1} t_{i n}^2(i, j)}{\sum_{j=0}^{N-1}\left(t_{i n}(i, j)-\hat{t}_{i n}(i, j)\right)^2}
\end{aligned}
$$
b. Compute the over-all SNR and segmental SNR values when the test vectors are different from the training ones, i.e., replace $t_{i n}(i, j)$ with $t_{\text {out }}(i, j)$ and $\hat{t}_{\text {in }}(i, j)$ with $\hat{t}_{\text {out }}(i, j)$ in (3.57) and (3.58).
c. List in Table 3.6 the overall and segmental SNR values for different number of codebook entries and different codebook dimensions. Explain the effects of choosing different values of $L, n$, and $N$ on the SNR values.
d. Compute the MSE, $\quad \varepsilon\left(t_{i n}, \hat{t}_{i n}\right)=\frac{1}{L n} \frac{1}{N} \sum_{i=0}^{L n-1} \sum_{j=0}^{N-1}\left(t_{i n}(i, j)-\right.$ $\left.\hat{t}_{i n}(i, j)\right)^2$ for different cases, e.g., $L=16,64, n=10,100,1000$, $N=2,8$. Explain how the MSE varies for different values of $L, n$, and $N$.
Show more…
Audio Signal Processing and Coding
Audio Signal Processing and Coding
Andreas Spanias, Ted… 1st Edition
Chapter 3, Problem 8 ↓

Instant Answer

verified

Step 1

Each element \( t_{in}(i, j) \) is a Gaussian random variable with zero mean and unit variance. This can be achieved using a random number generator that follows a Gaussian distribution. The indices \( i \) range from 0 to 159, and \( j \) range from 0 to 3.  Show more…

Show all steps

lock
AceChat toggle button
Close icon
Ace pointing down

Please give Ace some feedback

Your feedback will help us improve your experience

Thumb up icon Thumb down icon
Thanks for your feedback!
Profile picture
In this problem, you will write a computer program to design a vector quantizer and generate a codebook of size $[L \times N]$. Here, $L$ is the number of codebook entries and $N$ is the codebook dimension. Step 1 Generate a training set, $T_{i n}$, of size $[L n \times N]$, where $n$ is the number of training vectors per codevector. Assume $L=16, N=4$, and $n=10$. Denote the training set elements as $t_{i n}(i, j)$, for $i=0,1, \ldots, 159$ and $j=0,1,2,3$. Use Gaussian vectors of zero mean and unit variance for training. Step 2 Using the LBG algorithm [Lind80], design a vector quantizer and generate a codebook, $\boldsymbol{C}$, of size $[L \times N]$, i.e., $[16 \times 4]$. In the LBG VQ design, choose the distortion threshold as 0.001 . Label the codevectors as $c(i, j)$, for $i=$ $0,1, \ldots, 15$ and $j=0,1,2,3$. FIGURE CANT COPY Figure 3.23. Four-bit VQ design specifications for Problem 3.9. Step 3 Similar to Step 1 generate another training set, $T_{\text {out }}$ of size $[160 \times 4]$ that we will use for testing the VQ performance. Label these training set values as $t_{\text {out }}(i, j)$, for $i=0,1, \ldots, 159$ and $j=0,1,2,3$. Step 4 Using the codebook, $\boldsymbol{C}$, designed in Step 2, perform vector quantization of $t_{\text {in }}(i, j)$ and $t_{\text {out }}(i, j)$. Let us denote the VQ results as $\hat{t}_{\text {in }}(i, j)$ and $\hat{t}_{\text {out }}(i, j)$, respectively. a. When the test vectors are within the training sequence, compute the over-all SNR and segmental SNR values as follows, $$ \begin{aligned} S N R_{\text {overall }} & =\frac{\sum_{i=0}^{L n-1} \sum_{j=0}^{N-1} t_{i n}^2(i, j)}{\sum_{i=0}^{L n-1} \sum_{j=0}^{N-1}\left(t_{i n}(i, j)-\hat{t}_{i n}(i, j)\right)^2} \\ S N R_{\text {segmental }} & =\frac{1}{L n} \sum_{i=0}^{L n-1} \frac{\sum_{j=0}^{N-1} t_{i n}^2(i, j)}{\sum_{j=0}^{N-1}\left(t_{i n}(i, j)-\hat{t}_{i n}(i, j)\right)^2} \end{aligned} $$ b. Compute the over-all SNR and segmental SNR values when the test vectors are different from the training ones, i.e., replace $t_{i n}(i, j)$ with $t_{\text {out }}(i, j)$ and $\hat{t}_{\text {in }}(i, j)$ with $\hat{t}_{\text {out }}(i, j)$ in (3.57) and (3.58). c. List in Table 3.6 the overall and segmental SNR values for different number of codebook entries and different codebook dimensions. Explain the effects of choosing different values of $L, n$, and $N$ on the SNR values. d. Compute the MSE, $\quad \varepsilon\left(t_{i n}, \hat{t}_{i n}\right)=\frac{1}{L n} \frac{1}{N} \sum_{i=0}^{L n-1} \sum_{j=0}^{N-1}\left(t_{i n}(i, j)-\right.$ $\left.\hat{t}_{i n}(i, j)\right)^2$ for different cases, e.g., $L=16,64, n=10,100,1000$, $N=2,8$. Explain how the MSE varies for different values of $L, n$, and $N$.
Close icon
Play audio
Feedback
Powered by NumerAI
Need help? Use Ace
Ace is your personal tutor. It breaks down any question with clear steps so you can learn.
Start Using Ace
Ace is your personal tutor for learning
Step-by-step explanations
Instant summaries
Summarize YouTube videos
Understand textbook images or PDFs
Study tools like quizzes and flashcards
Listen to your notes as a podcast
Continue solving this problem
Create a free account to:
  • View full step-by-step solution
  • Ask follow-up questions with Ace AI
  • Save progress and study later
Continue Free
Numerade

Get step-by-step video solution
from top educators

Continue with Clever
or



By creating an account, you agree to the Terms of Service and Privacy Policy
Already have an account? Log In

A free answer
just for you

Watch the video solution with this free unlock.

Numerade

Log in to watch this video
...and 100,000,000 more!


EMAIL

PASSWORD

OR
Continue with Clever