gnuradio::optfir Namespace Reference


Functions

def low_pass
def high_pass
 FIXME: broken.
def stopband_atten_to_dev
 Convert a stopband attenuation in dB to an absolute value.
def passband_ripple_to_dev
 Convert passband ripple spec expressed in dB to an absolute value.
def remezord
 FIR order estimator (lowpass, highpass, bandpass, mulitiband).
def lporder
 FIR lowpass filter length estimator.
def bporder
 FIR bandpass filter length estimator.

Variables

 remez = gr.remez

Function Documentation

def gnuradio::optfir::bporder (   freq1,
  freq2,
  delta_p,
  delta_s 
)

FIR bandpass filter length estimator.

freq1 and freq2 are normalized to the sampling frequency. delta_p is the passband deviation (ripple), delta_s is the stopband deviation (ripple).

From Mintzer and Liu (1979)

def gnuradio::optfir::high_pass (   Fs,
  freq1,
  freq2,
  stopband_atten_db,
  passband_ripple_db,
  nextra_taps = 0 
)

FIXME: broken.

def gnuradio::optfir::low_pass (   gain,
  Fs,
  freq1,
  freq2,
  passband_ripple_db,
  stopband_atten_db,
  nextra_taps = 0 
)

def gnuradio::optfir::lporder (   freq1,
  freq2,
  delta_p,
  delta_s 
)

FIR lowpass filter length estimator.

freq1 and freq2 are normalized to the sampling frequency. delta_p is the passband deviation (ripple), delta_s is the stopband deviation (ripple).

Note, this works for high pass filters too (freq1 > freq2), but doesnt work well if the transition is near f == 0 or f == fs/2

From Herrmann et al (1973), Practical design rules for optimum finite impulse response filters. Bell System Technical J., 52, 769-99

def gnuradio::optfir::passband_ripple_to_dev (   ripple_db  ) 

Convert passband ripple spec expressed in dB to an absolute value.

def gnuradio::optfir::remezord (   fcuts,
  mags,
  devs,
  fsamp = 2 
)

FIR order estimator (lowpass, highpass, bandpass, mulitiband).

(n, fo, ao, w) = remezord (f, a, dev) (n, fo, ao, w) = remezord (f, a, dev, fs)

(n, fo, ao, w) = remezord (f, a, dev) finds the approximate order, normalized frequency band edges, frequency band amplitudes, and weights that meet input specifications f, a, and dev, to use with the remez command.

* f is a sequence of frequency band edges (between 0 and Fs/2, where Fs is the sampling frequency), and a is a sequence specifying the desired amplitude on the bands defined by f. The length of f is twice the length of a, minus 2. The desired function is piecewise constant.

* dev is a sequence the same size as a that specifies the maximum allowable deviation or ripples between the frequency response and the desired amplitude of the output filter, for each band.

Use remez with the resulting order n, frequency sequence fo, amplitude response sequence ao, and weights w to design the filter b which approximately meets the specifications given by remezord input parameters f, a, and dev:

b = remez (n, fo, ao, w)

(n, fo, ao, w) = remezord (f, a, dev, Fs) specifies a sampling frequency Fs.

Fs defaults to 2 Hz, implying a Nyquist frequency of 1 Hz. You can therefore specify band edges scaled to a particular applications sampling frequency.

In some cases remezord underestimates the order n. If the filter does not meet the specifications, try a higher order such as n+1 or n+2.

def gnuradio::optfir::stopband_atten_to_dev (   atten_db  ) 

Convert a stopband attenuation in dB to an absolute value.


Variable Documentation


Generated on Thu Mar 5 09:03:57 2009 for GNU Radio 3.1.3 by  doxygen 1.5.8