filter_var

filter_var :
An variable filter for xreal-typed signals.

The filter_var primitive models a linear dynamical system whose gain, poles, and zeros are time-varying, controlled by real-typed inputs, gain, poles, and zeros, respectively.

The gain input specifies the DC gain of the filter. The poles and zeros inputs specify the lists of pole and zero frequencies, respectively, using the following real-typed array format:

poles = '{ real(fp1), imag(fp1), real(fp2), imag(fp2), ..., real(fpM), imag(fpM) }
zeros = '{ real(fz1), imag(fz1), real(fz2), imag(fz2), ..., real(fzN), imag(fzN) }

where fp1, fp2, … are the pole frequencies of the filter in Hz and fz1, fz2, … are the zero frequencies of the filter in Hz. Note that one must specify both the real and imaginary values of each pole or zero. For instance, to specify a DC pole (i.e., fp=0), the poles input must contain ‘{0.0, 0.0}.

The transfer function of this filter_var primitive is then defined as the following canonical form:

             z(s)         (1+s/(2pi*fz1))(1+s/(2pi*fz2))...(1+s/(2pi*fzN))
H(s) = gain*----- = gain* ------------------------------------------------ ,
             p(s)         (1+s/(2pi*fp1))(1+s/(2pi*fp2))...(1+s/(2pi*fpM))

The filter_var can also model an ideal all-pass variable-gain amplifier. In this case, the number of poles and the number of zeros should be set to 0, and both of poles and zeros should be given as ‘{0.0, 0.0}.

The transport delay is set by the delay parameter.

Input/Output Terminals

Name I/O Type Description
out output xreal output signal
in input xreal input signal
gain input real DC gain
poles input real pole frequencies
zeros input real zero frequencies

Parameters

Name Type Default Unit Description
num_poles integer 2 None number of poles
num_zeros integer 1 None number of zeros
delay real 0.0 seconds transport delay
« filter_sel
ilo »