Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - 日本語

Please note that the recommended version of Scilab is 6.0.0. This page might be outdated.
See the recommended documentation of this function

Справка Scilab >> Signal Processing > filters > analpf


create analog low-pass filter

Calling Sequence




positive integer: filter order


a string: that indicated the filter design method:

  • "butt" is for Butterworth filter.

  • "cheb1" is for Chebyshev type I filter.

  • "cheb2" is for Chebyshev type II filter (also called inverse Chebyshev filter).

  • "ellip" is for elliptic filter.


a 2-vector of ripples values for "cheb1", "cheb2" and "ellip" filters. It's elements value must respect 0<rp(1),rp(2)<1.

  • For "cheb1" filters only rp(1) is used. The passband ripple is between 1-rp(1) and 1.

  • For "cheb2" filters only rp(2) is used. The stopband ripple is between 0 and rp(2).

  • For "ellip" filters rp(1) and rp(2) are both used. The passband ripple is between 1-rp(1) and 1 while the stopband ripple is between 0 and rp(2).


cut-off frequency of low-pass filter in rad/s


the rational polynomial transfer function (see syslin). Is is hs = gain*syslin("c", real(poly(zers, "s")), real(poly(pols, "s")))


a row vector: the poles of transfer function


a row vector: zeros of transfer function


a scalar: the gain of transfer function


This Creates analog low-pass filter with cut-off pulsation at omega. It is a driver over the zpbutt, zpch1, zpch2 and zpell functions.

The Butterworth filter has no ripples in the passband and slowly rolls off towards zero in the stopband. Butterworth filters have a monotonically changing magnitude function with omega, unlike other filter types that have non-monotonic ripple in the passband and/or the stopband. Butterworth filters have a more linear phase response in the pass-band than the others.

Chebyshev filters have a steeper roll-off and more passband ripple (type I) or stopband ripple (type II) than Butterworth filters. Chebyshev filters have the property that they minimize the error between the idealized and the actual filter characteristic over the range of the filter, but with ripples in the passband.

Elliptic filter have equalized ripple behavior in both the passband and the stopband. The amount of ripple in each band is independently adjustable, and no other filter of equal order can have a faster transition in gain between the passband and the stopband, for the given values of ripple.


// Evaluate magnitude response of the filter
fcut = 5; //hz
n = 7; // Filter order
hc1 = analpf(n, 'cheb1', [0.1 0], fcut*2*%pi);
hc2 = analpf(n, 'cheb2', [0 0.1], fcut*2*%pi);
he = analpf(n, 'ellip', [0.1 0.1], fcut*2*%pi);
hb = analpf(n, 'butt', [0 0], fcut*2*%pi);
hc1.dt = 'c';
hc2.dt = 'c';
he.dt = 'c';
hb.dt = 'c';
[fr, hf] = repfreq(hc1, 0, 15);
plot(fr, abs(hf), 'b')
[fr, hf] = repfreq(hc2, 0, 15);
[fr, hf] = repfreq(he, 0, 15);
[fr, hf] = repfreq(hb, 0, 15);
plot(fr, abs(hf), 'c')

legend(["Chebyshev I", "Chebyshev II", "Elliptic", "Butterworth"]);
xlabel("Frequency (Hz)")
title("Analog filters of order 7")

See Also

  • repfreq — frequency response
  • bode — Bode plot
  • csim — simulation (time response) of linear system
  • syslin — определение линейной системы
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 14:01:06 CEST 2014