DSP Blockset |
 |
Weight Parameters. The Remez FIR Filter Design and Least Squares FIR Filter Design blocks allow you to weight the error minimization in certain frequency bands by entering a vector for the band Weights. The Weights parameter is useful when designing a compound filter (for example, a lowpass differentiator). For example, to specify a lowpass filter with a transition region in the normalized frequency range 0.4 to 0.5, and 10 times more error minimization in the stopband than the passband, use:
- Band edge frequency vector =
[0 0.4 0.5 1]
- Magnitudes at these frequencies =
[1 1 0 0]
- Weights =
[1 10]
The Weights vector is always half the length of the Band edge frequency vector and Magnitudes at these frequencies vectors; there must be exactly one weight per band.
The Weights vector is interpreted differently when Hilbert Transformer or Differentiator is selected from the Filter type parameter:
- Differentiator -The differentiator designs use special weighting techniques for nonzero magnitude bands. The Remez FIR Filter Design block assumes that the weight is equal to the inverse of the frequency multiplied by the weight specified in the Weights vector. The Least Squares FIR Filter Design block assumes that the weight is equal to the inverse of the frequency squared, multiplied by the weight specified in the Weights vector. In each case, the result is a filter with much better fit at low frequencies than at high frequencies. In most cases, however, differentiators have only a single band, so the weight is a scalar value that does not affect the final filter.
- Hilbert Transform - The Hilbert transform designs apply a constant weight in each nonzero magnitude band, simply multiplying the error by the specified weight for that band. Similar to the differentiators, Hilbert transformers usually have only a single band, so the weight is a scalar value that does not affect the final filter.
| Frequency and Magnitude Parameters: Remez and Least Squares FIR Filter Design | | Example: Least Squares Multiband Filter |  |