High Pass Filter
 High Pass Filter All MATLAB Articles Low Pass Filter In order to prevent spam, users must register before they can edit or create articles.

1 Introduction to High Pass Filters

Filtering is extremely useful when creating a real world systems. Often times real systems have inconvenient modes that can be reduced with bandpass filtering. Sometimes sensors get noisy in higher frequencies and when the system doesn't require those higher frequencies it is usually best to use a low pass filter to reduce the effect of the high frequency noise.

For example, many DC gyros have noisy low frequency portions. The PSD magnitude of the noise can grow as the frequency lowers. The system will likely not need the rate information all the way down to DC. So adding a high pass filter can reduce the noise passed on to the rest of the system.

2 Construction of a High Pass Filter

Construction of a high pass filter using the tf command is simple. (The tf command requires the Controls toolbox.)

2.1 1st Order High Pass Filter

The transfer function of a first order high pass filter is

 $LaTeX: 1 - \frac{\omega}{s+\omega}=\frac{s}{s+\omega}$

The s (or zero at 0) is how the high pass filter maintains a unity gain at &infty;. A first order high pass filter is easily created in MATLAB with the following commands

>> w = 1;
>> lpf_1st = tf([1 0], [1, w]);

This will create a high pass filter with a corner frequency at w = 1 rad/sec. The magnitude increase will be +20 dB/decade with a phase that starts at +90 and transitions to 0 degrees near w.

2.2 2nd Order High Pass Filter

The transfer function for a second order high pass filter is

 $LaTeX: 1-\frac{\omega^2}{s^2+2\zeta\omega+\omega^2}=\frac{s^2+2\zeta\omega}{s^2+2\zeta\omega+\omega^2}$

A second order high pass filter is easily created in MATLAB with the following commands

>> w = 1;
>> z = 1/sqrt(2);
>> lpf_2nd = tf([1, 2*z*w, 0], [1, 2*z*w, w^2]);

This will create a second order high pass filter.