# High pass filter

A high pass filter is a frequency filter that allows (passes) frequency above a certain cutoff frequency and disallows (stops) the frequencies below that cutoff frequency.

The following is a graph of the ideal magnitude response of a high pass filter.

All frequencies above the cutoff frequency remain at their original amplitude. All frequencies below the cutoff frequency are completely removed.

## Example: Digital filter with finite impulse response

Consider a filter w(k) that takes the incoming signal x(n) and computes the output signal y(n) with the formula

$$y(n)=\sum_{k=0}^{N} w(k)\,x(n-N+k)$$

with weights defined according to the following formula.

$$w(k)=\begin{cases} -\frac{sin(2\pi \frac{f}{f_s}(k-\frac{N-1}{2}))}{\pi (k-\frac{N-1}{2})}, k \ne \frac{N-1}{2} \\ 1-2\frac{f}{f_s}, k=\frac{N-1}{2} \end{cases}$$

Here fs is the sampling frequency, N is the length of the filter (the number of items in the weighted sum), w(k) are the filter weights, and f is some frequency between 0 and fs / 2. This filter is a high pass filter with a cutoff frequency f as it allows frequencies above f to pass and as it attenuates frequencies below f.

If, for example, fs = 2000 Hz, f = 40 Hz, and N = 201, the magnitude response of the filter will be as in the graph below.

While the magnitude response of this filter is not ideal, this filter passes frequencies above 40 Hz almost unchanged and attenuates frequencies below 40 Hz. It is thus a high pass filter with a cutoff frequency of 40 Hz.

### Filtered HTML

• Freelinking helps you easily create HTML links. Links take the form of [[indicator:target|Title]]. By default (no indicator): Click to view a local node.