Vector Quantizer Encoder
Index of nearest codeword based on Euclidean or weighted Euclidean distance measure
Libraries:
DSP System Toolbox /
Quantizers
Description
The Vector Quantizer Encoder block compares each input column vector to the codeword vectors in the codebook matrix. Each column of this codebook matrix is a codeword. The block finds the codeword vector nearest to the input column vector and returns its zero-based index. This block supports real floating-point and fixed-point signals on all input ports.
The Vector Quantizer Encoder block accepts real floating-point and fixed-point inputs. For more information, see the Ports section.
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
More About
Algorithms
The block finds the nearest codeword by calculating the distortion. The block uses two methods for calculating distortion –– Euclidean squared error (unweighted) and weighted Euclidean squared error. Consider the codebook . This codebook has N codewords and each codeword has k elements. The i-th codeword is defined as a column vector, . The multichannel input has M columns and is defined as , where the p-th input column vector is .
The squared error (unweighted) is calculated using the equation
The weighted squared error is calculated using the equation
where the weighting factor is defined as . The index of the codeword that is associated with the minimum distortion is assigned to the input column vector.
References
[1] Gersho, A. and R. Gray. Vector Quantization and Signal Compression. Boston: Kluwer Academic Publishers, 1992.
Extended Capabilities
Version History
Introduced before R2006a
See Also
Quantizer (Simulink) | Scalar Quantizer Decoder | Uniform Encoder | Uniform Decoder | Vector Quantizer Decoder