File Exchange

image thumbnail

The DC Blocking Filter

version 1.0.0.0 (256 KB) by J De Freitas
An IIR first order dc blocking filter.

9 Downloads

Updated 29 Jan 2007

No License

This submission contains an article describing the ins and outs of the dc blocking filter, giving the relationships between the lone filter coefficient and the cut-on frequency. The implementation aspects are also discussed showing how to interpret the effects of an impulse or step response on the data. The filter is capable of cut-on frequencies far less than 0.01% Nyquist. The article is accompanied by a Matlab function.

The Matlab function dcblock.m is given for the calculation of the lone filter coefficient, a. The syntax includes:

a = dcblock(Fc);
a = dcblock(fc,fs);
[Fc,fc] = dcblock(a,fs);

where Fc is the normalized cut-on frequency, fc is the cut-on frequency in Hz, and fs is the sampling frequency also in Hz. If no outputs are declared at function call, a plot of the filter frequency response is given. Examples provided in the article address the overall performance of the filter in terms of signal distortion, its removal and limitations.

Comments and Ratings (9)

yahya khatami

Vojtech Ters

Awesome,thanks :)

Thank you for the notes and codes.

Just one doubt in notes, why equation (8) is required to check the samples in impulse response? i did not understand its significance clearly! if possible can you explain it.

Kevin Richardson

Removed the offset with ease! Good notes as well.

Matt Rose

simple filter to remove dc-offset in digital signal. works great

andrew labul

apply it to grout tests see what happens

Bool Deci.

formula (3a) is right, since it has been normalized.

Andrey Bakulin

Great!

sergelen bazarragchaa

Derivation of the formula (3a) is not right

MATLAB Release Compatibility
Created with R14SP2
Compatible with any release
Platform Compatibility
Windows macOS Linux

MATLAB Online Live Editor Challenge

View the winning live scripts from faculty and students who participated in the recent challenge.

Learn more

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video