From ControlTheoryPro.com

Contents
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 1^{st} Order High Pass Filter
The transfer function of a first order high pass filter is
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 2^{nd} Order High Pass Filter
The transfer function for a second order high pass filter is
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.
3 See Also
4 MATLAB Related Books