
int  dspl_ap2bpass (double *b, double *a, int n, double wp0, double wp1, double *beta, double *alpha) 
 Analog lowpass prototype frequency transformation to a bandpass filter with [wp0 ... wp1] passband. More...


int  dspl_ap2bstop (double *b, double *a, int n, double ws0, double ws1, double *beta, double *alpha) 
 Analog lowpass prototype frequency transformation to a bandstop filter with [wp0 ... wp1] stopband. More...


int  dspl_ap2high (double *b, double *a, int n, double wp, double *beta, double *alpha) 
 Analog lowpass prototype frequency transformation to a highpass filter with wp cutoff. More...


int  dspl_ap2low (double *b, double *a, int n, double wp, double *beta, double *alpha) 
 Analog lowpass prototype frequency transformation to a lowpass filter with wp cutoff. More...


int  dspl_butter_ap (double Rp, int ord, double *b, double *a) 
 Analog Butterworth filter prototype. More...


int  dspl_cheby1_ap (double Rp, int ord, double *b, double *a) 
 Analog Chebyshev type 1 filter prototype. More...


int  dspl_cheby2_ap (double Rs, int ord, double *b, double *a) 
 Analog Chebyshev type 2 filter prototype. More...


Functions for digital IIR filter design.
◆ dspl_ap2bpass()
int dspl_ap2bpass 
( 
double * 
b, 


double * 
a, 


int 
n, 


double 
wp0, 


double 
wp1, 


double * 
beta, 


double * 
alpha 

) 
 
Analog lowpass prototype frequency transformation to a bandpass filter with [wp0 ... wp1] passband.
Function transforms analog prototype filter transfer function \( H_{\text{ap}}(s) \) to a bandpass filter transfer function \( H(s) \):
\[ H(s) = H_{\text{ap}} \left(\frac{s^2 + w^2_0}{B \cdot s} \right), \]
here \(w^2_0 = \) wp0 * wp1 , \(wB = \)wp1  wp0 .
Result bandpass filter order is 2*n .
 Parameters

[in]  b  Analog prototype \( H_{\text{ap}}(s) \) numerator coefficients vector pointer. Vector size is [n+1 x 1] . 
[in]  a  Analog prototype \( H_{\text{ap}}(s) \) denominator coefficients vector pointer. Vector size is [n+1 x 1] . 
[in]  n  Analog prototype filter order 
[in]  wp0  Bandpass low frequency (rad/s) after transformation 
[in]  wp1  Bandpass hight frequency (rad/s) after transformation 
[out]  beta  Analog bandpass filter \( H(s) \) numerator coefficients vector pointer after transformation. Vector size is [2n+1 x 1] . 
[out]  alpha  Analog bandpass filter \( H(s) \) denominator coefficients vector pointer after transformation. Vector size is [2n+1 x 1] . 
 Returns
DSPL_OK if filter has been transformed successfully or code of error otherwise.
 Author
 Sergey Bakhurin. www.dsplib.org
◆ dspl_ap2bstop()
int dspl_ap2bstop 
( 
double * 
b, 


double * 
a, 


int 
n, 


double 
wp0, 


double 
wp1, 


double * 
beta, 


double * 
alpha 

) 
 
Analog lowpass prototype frequency transformation to a bandstop filter with [wp0 ... wp1] stopband.
Function transforms analog prototype filter transfer function \( H_{\text{ap}}(s) \) to a bandstop filter transfer function \( H(s) \):
\[ H(s) = H_{\text{ap}} \left(\frac{B \cdot s}{s^2 + w^2_0} \right), \]
here \(w^2_0 = \) wp0 * wp1 , \(wB = \)wp1  wp0 .
Result bandstop filter order is 2*n .
 Parameters

[in]  b  Analog prototype \( H_{\text{ap}}(s) \) numerator coefficients vector pointer. Vector size is [n+1 x 1] . 
[in]  a  Analog prototype \( H_{\text{ap}}(s) \) denominator coefficients vector pointer. Vector size is [n+1 x 1] . 
[in]  n  Analog prototype filter order 
[in]  wp0  Bandstop low frequency (rad/s) after transformation 
[in]  wp1  Bandstop hight frequency (rad/s) after transformation 
[out]  beta  Analog bandstop filter \( H(s) \) numerator coefficients vector pointer after transformation. Vector size is [2n+1 x 1] . 
[out]  alpha  Analog bandstop filter \( H(s) \) denominator coefficients vector pointer after transformation. Vector size is [2n+1 x 1] . 
 Returns
DSPL_OK if filter has been transformed successfully or code of error otherwise.
 Author
 Sergey Bakhurin. www.dsplib.org
◆ dspl_ap2high()
int dspl_ap2high 
( 
double * 
b, 


double * 
a, 


int 
n, 


double 
wp, 


double * 
beta, 


double * 
alpha 

) 
 
Analog lowpass prototype frequency transformation to a highpass filter with wp cutoff.
Function transforms analog prototype filter transfer function \( H_{\text{ap}}(s) \) to a highpass filter transfer function \( H(s) \):
\[ H(s) = H_{\text{ap}} \left(\frac{w_p}{s} \right), \]
Result highpass filter order is n .
 Parameters

[in]  b  Analog prototype \( H_{\text{ap}}(s) \) numerator coefficients vector pointer. Vector size is [n+1 x 1] . 
[in]  a  Analog prototype \( H_{\text{ap}}(s) \) denominator coefficients vector pointer. Vector size is [n+1 x 1] . 
[in]  n  Analog prototype filter order 
[in]  wp  Highpass cutoff frequency (rad/s) after transformation 
[out]  beta  Analog highpass filter \( H(s) \) numerator coefficients vector pointer after transformation. Vector size is [n+1 x 1] . 
[out]  alpha  Analog highpass filter \( H(s) \) denominator coefficients vector pointer after transformation. Vector size is [n+1 x 1] . 
 Returns
DSPL_OK if filter has been transformed successfully or code of error otherwise.
 Author
 Sergey Bakhurin. www.dsplib.org
◆ dspl_ap2low()
int dspl_ap2low 
( 
double * 
b, 


double * 
a, 


int 
n, 


double 
wp, 


double * 
beta, 


double * 
alpha 

) 
 
Analog lowpass prototype frequency transformation to a lowpass filter with wp cutoff.
Function transforms analog prototype filter transfer function \( H_{\text{ap}}(s) \) to a lowpass filter transfer function \( H(s) \):
\[ H(s) = H_{\text{ap}} \left(\frac{s}{w_p} \right), \]
Result lowpass filter order is n .
 Parameters

[in]  b  Analog prototype \( H_{\text{ap}}(s) \) numerator coefficients vector pointer. Vector size is [n+1 x 1] . 
[in]  a  Analog prototype \( H_{\text{ap}}(s) \) denominator coefficients vector pointer. Vector size is [n+1 x 1] . 
[in]  n  Analog prototype filter order 
[in]  wp  Lowpass cutoff frequency (rad/s) after transformation 
[out]  beta  Analog lowpass filter \( H(s) \) numerator coefficients vector pointer after transformation. Vector size is [n+1 x 1] . 
[out]  alpha  Analog lowpass filter \( H(s) \) denominator coefficients vector pointer after transformation. Vector size is [n+1 x 1] . 
 Returns
DSPL_OK if filter has been transformed successfully or code of error otherwise.
 Author
 Sergey Bakhurin. www.dsplib.org
◆ dspl_butter_ap()
int dspl_butter_ap 
( 
double 
Rp, 


int 
ord, 


double * 
b, 


double * 
a 

) 
 
Analog Butterworth filter prototype.
Function calculates Analog Butterworth filter transfer function \(H(s)\) coefficients. Filter has order ord cutoff frequency 1 rad/s with distortion level Rp dB in passband (from 0 rad/s to 1 rad/s).
 Parameters

[in]  Rp  Filter passband distortions dB. Distortions level from 0 rad/s to 1 rad/s. Must be positive. 
[in]  ord  Filter order. Transfer function \(H(s)\) numerator and denominator coefficients number is ord+1 . 
[out]  b  Transfer function \(H(s)\) numerator coefficients vector pointer. Vector size is [ord+1 x 1] . Memory must be allocated. 
[out]  a  Transfer function \(H(s)\) denominator coefficients vector pointer. Vector size is [ord+1 x 1] . Memory must be allocated. 
 Returns
DSPL_OK Filter is calculated successfully .
DSPL_ERROR_FILTER_RP Parameter Rp must be positive.
DSPL_ERROR_FILTER_ORD Filter order must be positive.
DSPL_ERROR_PTR Pointers b and a cannot be as NULL .
 Author
 Sergey Bakhurin. www.dsplib.org
◆ dspl_cheby1_ap()
int dspl_cheby1_ap 
( 
double 
Rp, 


int 
ord, 


double * 
b, 


double * 
a 

) 
 
Analog Chebyshev type 1 filter prototype.
Function calculates Analog Chebyshev type 1 filter transfer function \(H(s)\) coefficients. Filter has order ord cutoff frequency 1 rad/s with distortion level Rp dB in passband (from 0 rad/s to 1 rad/s). Chebyshev type 1 filter magnitude is equiripple in passband.
 Parameters

[in]  Rp  Filter passband distortions dB. Distortions level from 0 rad/s to 1 rad/s. Must be positive. 
[in]  ord  Filter order. Transfer function \(H(s)\) numerator and denominator coefficients number is ord+1 . 
[out]  b  Transfer function \(H(s)\) numerator coefficients vector pointer. Vector size is [ord+1 x 1] . Memory must be allocated. 
[out]  a  Transfer function \(H(s)\) denominator coefficients vector pointer. Vector size is [ord+1 x 1] . Memory must be allocated. 
 Returns
DSPL_OK Filter is calculated successfully .
DSPL_ERROR_FILTER_RP Parameter Rp must be positive.
DSPL_ERROR_FILTER_ORD Filter order must be positive.
DSPL_ERROR_PTR Pointers b and a cannot be as NULL .
 Author
 Sergey Bakhurin. www.dsplib.org
◆ dspl_cheby2_ap()
int dspl_cheby2_ap 
( 
double 
Rs, 


int 
ord, 


double * 
b, 


double * 
a 

) 
 
Analog Chebyshev type 2 filter prototype.
Function calculates Analog Chebyshev type 2 filter transfer function \(H(s)\) coefficients. Filter has order ord stopband frequency 1 rad/s with suppression level Rs dB in stopband.
 Parameters

[in]  Rs  Filter stopband suppression dB. Must be positive. 
[in]  ord  Filter order. Transfer function \(H(s)\) numerator and denominator coefficients number is ord+1 . 
[out]  b  Transfer function \(H(s)\) numerator coefficients vector pointer. Vector size is [ord+1 x 1] . Memory must be allocated. 
[out]  a  Transfer function \(H(s)\) denominator coefficients vector pointer. Vector size is [ord+1 x 1] . Memory must be allocated. 
 Returns
DSPL_OK Filter is calculated successfully .
DSPL_ERROR_FILTER_RS Parameter Rs must be positive.
DSPL_ERROR_FILTER_ORD Filter order must be positive.
DSPL_ERROR_PTR Pointers b and a cannot be as NULL .
 Author
 Sergey Bakhurin. www.dsplib.org

Select spelling error with your mouse and press  
