syntfil[BS2NLP] - frequency transformation from the non-symmetrical band-rejection (BS) to the normalized lowpass (NLP) filter specification
Calling sequence:
BS2NLP(fp, fs, f_s, f_p, ap, as)
Parameters:
fp - lower cutoff frequency [Hz]
fs - lower stopband frequency [Hz]
f_s - upper stopband frequency [Hz]
f_p - upper cutoff frequency [Hz]
ap - passband ripple [dB]
as - stopband attenuation [dB]
All parameters must be positive real values, where fp < fs < f_s < f_p and ap < as .
Description:
Os - stopband frequency of normalized lowpass filter [1/s]
ap - passband ripple [dB]
as - stopband attenuation [dB]
Info level:
Setting of variable infolevel[syntfil] can be used to get more detailed results.
infolevel[syntfil] =
2 - signalize non-symmetrical BS, print new values f_s and fs, passband geometric centre, passband width, stopband width and specification of NLP (Os, ap, as)
3 - as level 2 + print specification of entered BS (fp, fs, f_s, f_p, ap, as) and plot BS filter specification
4 - as level 3 + plot specification of NLP
Example:
> | with(syntfil): |
> | infolevel[syntfil]:=1; |
> | x:=BS2NLP(1000,2000,3000,4000,3,40); |
> | infolevel[syntfil]:=4; |
> | BS2NLP(1000,2000,3000,4000,3,40); |
Filter specification:
fp = 1000.000000 Hz
fs = 2000.000000 Hz
f_s = 3000.000000 Hz
f_p = 4000.000000 Hz
ap = 3.000000 dB
as = 40.000000 dB
Non-symetrical BS was entered.
New stopband frequency was calculated fs = 1333.333333 Hz.
fm = 2000.000000 Hz
delta_fp = 3000.000000 Hz
delta_fs = 1666.666667 Hz
Specification of NLP:
Os = 1.800000 1/s
ap = 3.000000 dB
as = 40.000000 dB