In file No file:

IIRFilter zpk (double fs, int nzeros, const dComplex* zero, int npoles, const dComplex* pole, double gain = 1.0, const char* plane = "s", bool prewarp = true)

Make a filter from zeros, poles and gain (zpk)

Documentation

Make an IIR filter from zeros and poles. Poles and zero can be specifed in the s-plane using units of rad/s (set plane to "s") or units of Hz ("f"). In both cases the real part of the roots are expected to be NEAGTIVE. Alternativly, one can also specify normalized poles and zeros ("n"). Normalized poles and zeros are expected to have POSITIVE real parts and their respective low and high frequency gains are set to 1---unless they are located a 0Hz. The default loaction is the s-plane. For the s-plane the formula is
zpk(s) = k \frac{(s - s_1)(s - s_2) \cdots}{(s - p_1)(s - p_2) \cdots}$$
with $s_1$, $s_2$,... the loactions of the zeros and $p_1$, $p_2$,... the
loaction of the poles. By replacing s_1->$2 \pi fz_1$and p_1->$2 \pi fp_1$
one obatines the "f" representation. For normalize poles and zeros ["n"] 
one uses poles of the form $pole(f0) = 1/(1 + i f/f0)$; $f0 > 0$ and 
$pole(f0) = 1/(i f)$; $f0 = 0$. The zeros are then of the form 
$zero(f0) = (1 + i f/f0)$; $f0 > 0$ and $zero(f0) = (i f)$; $f0 = 0$.
Poles and zeros with a non-zero imaginary part must come in pairs 
of complex conjugates.

Throws a runtime_error or invalid_argument exception, if an illegale 
argument is specified.



Returns:
IIRFilter
Parameters:
fs - Sampling frequency
nzeros - Number of zeros
zero - Array of zeros
npoles - Number of poles
pole - Array of poles
gain - Gain
plane - location where poles/zeros are specified
prewarp - True for prewarping freqencies.

alphabetic index hierarchy of classes


Please send questions and comments to zweizig_j@ligo.caltech.edu


generated by doc++