Owning Palette: Fixed-Point Tools VIs
Installed With: Digital Filter Design Toolkit
Quantizes the coefficients of a floating-point filter and generates a fixed-point filter. You must manually select the polymorphic instance you want to use.
Use the DFD FXP Coef Report VI to generate a report on the effect that quantization has on the filter.
Use the pull-down menu to select an instance of this VI.
Place on the block diagram | Find on the Functions palette |
DFD FXP Quantize Coef (Easy)
coefficients b/v word length specifies the word length, in number of bits, that the quantizer uses to represent coefficients b/v. | |||||||||
coefficients a/k word length specifies the word length, in number of bits, that the quantizer uses to represent coefficients a/k. | |||||||||
filter in specifies the input floating-point filter. | |||||||||
error in describes error conditions that occur before this VI or function runs.
The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
| |||||||||
gain settings specifies the settings for the filter gain.
| |||||||||
filter out returns a fixed-point filter. | |||||||||
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
|
DFD FXP Quantize Coef (Advanced)
coefficients b/v quantizer specifies the settings for the coefficients b/v quantizer.
| |||||||||||||||||||||||||||||||||||||
coefficients a/k quantizer specifies the settings for the coefficients a/k quantizer.
| |||||||||||||||||||||||||||||||||||||
filter in specifies the input floating-point filter. | |||||||||||||||||||||||||||||||||||||
error in describes error conditions that occur before this VI or function runs.
The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
| |||||||||||||||||||||||||||||||||||||
gain settings specifies the settings for the filter gain.
| |||||||||||||||||||||||||||||||||||||
filter out returns a fixed-point filter. | |||||||||||||||||||||||||||||||||||||
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces.
Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
|
DFD FXP Quantize Coef Details
You can represent an integer, or binary number, with a length wl as b1b2b3 bwl where bi is a binary digit. Both wl and iwl determine the position of the binary point and the range the binary number can represent.
For a signed fixed-point number in two's complement, the value of the fixed-point number is defined by the following equation:
The highest representable number is 2iwl(2–1–2–wl) and the lowest representable number is –2iwl–1.
For an unsigned fixed-point number, the value of the fixed-point number is defined by the following equation:
For unsigned fixed-point numbers, the highest representable number is 2iwl(1–2–wl) and the lowest representable number is 0.
The rounding mode input controls the operation of quantizing to wl bits. If you set rounding mode to Nearest, the quantizer rounds the result to the closest representable number. If the two closest representable numbers are equidistant, the quantizer rounds the result to the closest representable number with a least significant bit of 0. If you set rounding mode to Truncation, the quantizer rounds to the closest representable number lower than the original value.
overflow mode determines the quantized value when an overflow or underflow occurs. If you set overflow mode to Saturation, the quantizer converts the specified value to the highest representable number for overflow or to the lowest representable number for underflow. If you set overflow mode to Wrap, the quantizer wraps around the specified value from the highest representable number to the lowest representable number for overflow or from the lowest representable number to the highest representable number for underflow. The size of the error does not increase as abruptly with Saturation as the size does with Wrap when overflow or underflow occurs.
Examples
Refer to the following VIs for examples of using the DFD FXP Quantize Coef VI:
- How to Build Coefficients Quantizer VI: labview\examples\Digital Filter Design\Getting Started\Apply Filters
- Analyze Coefficients-Quantized Filter VI: labview\examples\Digital Filter Design\Fixed-Point Filters\Single-Rate
- Easy Fixed-Point Filter Modeling and Simulation VI: labview\examples\Digital Filter Design\Fixed-Point Filters\Single-Rate
- Structure Selection and Quantization VI: labview\examples\Digital Filter Design\Fixed-Point Filters\Single-Rate