UP | HOME

List of filters - Matlab Implementation

Table of Contents

1 Low Pass

1.1 First Order

\[ H(s) = \frac{1}{1 + s/\omega_0} \]

w0 = 2*pi; % [rad/s]

H = 1/(1 + s/w0);

lpf_first_order.png

Figure 1: First Order Low Pass Filter (png, pdf.

1.2 Second Order

\[ H(s) = \frac{1}{1 + 2 \xi / \omega_0 s + s^2/\omega_0^2} \]

w0 = 2*pi; % [rad/s]
xi = 0.3;

H = 1/(1 + 2*xi/w0*s + s^2/w0^2);

lpf_second_order.png

Figure 2: Second Order Low Pass Filter (png, pdf.

1.3 Combine multiple filters

\[ H(s) = \left( \frac{1}{1 + s/\omega_0} \right)^n \]

w0 = 2*pi; % [rad/s]
n = 3;

H = (1/(1 + s/w0))^n;

lpf_multiple_first_order.png

Figure 3: Combine Multiple First Order Low Pass Filter (png, pdf.

2 High Pass

2.1 First Order

\[ H(s) = \frac{s/\omega_0}{1 + s/\omega_0} \]

w0 = 2*pi; % [rad/s]

H = (s/w0)/(1 + s/w0);

hpf_first_order.png

Figure 4: First Order High Pass Filter (png, pdf.

2.2 Second Order

\[ H(s) = \frac{s^2/\omega_0^2}{1 + 2 \xi / \omega_0 s + s^2/\omega_0^2} \]

w0 = 2*pi; % [rad/s]
xi = 0.3;

H = (s^2/w0^2)/(1 + 2*xi/w0*s + s^2/w0^2);

hpf_second_order.png

Figure 5: Second Order High Pass Filter (png, pdf.

2.3 Combine multiple filters

\[ H(s) = \left( \frac{s/\omega_0}{1 + s/\omega_0} \right)^n \]

w0 = 2*pi; % [rad/s]
n = 3;

H = ((s/w0)/(1 + s/w0))^n;

hpf_multiple_first_order.png

Figure 6: Combine Multiple First Order High Pass Filter (png, pdf.

3 Band Pass

4 Notch

5 Chebyshev

5.1 Chebyshev Type I

n = 4; % Order of the filter
Rp = 3; % Maximum peak-to-peak ripple [dB]
Wp = 2*pi; % passband-edge frequency [rad/s]

[A,B,C,D] = cheby1(n, Rp, Wp, 'high', 's');
H = ss(A, B, C, D);

cheby1_hpf.png

Figure 7: First Order Low Pass Filter (png, pdf.

6 Complementary

Author: Dehaeze Thomas

Created: 2019-08-15 jeu. 12:24

Validate