filtering DC from digital audio signal

Hi people, i need help / advice filtering dc from a 18 bit digital audio signal .
  • the signal i need to filter is an audio signal + dc component in 2´s compliment format, so max=(2^17)-1 and min=-(2^17).
  • i need to filter the dc component and be careful about the output amplitude ranges.
i filtered the dc using highpass(blue_signal,63,Fs) and this happens ( see image ):
  • blue signal: audio signal + dc
  • red signal: audio signal after highpass
  • red line: maximum possible value for 2´s compliment input signal
  • blue line: minimum
Capture.PNG
so , as seen in the picture, the filtered signal exceeds the expected maximum value, so i dont know whats happening, i need to know the output amplitude ranges in order
to reescale the signal between -1 and 1 and do various operations without that dc component, but i dont know how to deal with this.
hope somebody can help me,
thanks anyways :)

回答 (1 件)

Star Strider
Star Strider 2019 年 1 月 11 日

0 投票

To filter D-C from any signal, simply subtract the mean value of the signal from the signal. The mean and minus (binary subtraction) functions will work with int8 arguments.
You could also use a highpass filter with a very low frequency (1 Hz or less) cutoff. The highpass filter function in MATLAB only works with single or double precision signals, so simply subtracting the mean would likely be your best option, unless you convert your signals first to do the filtering.

2 件のコメント

Min Nepali
Min Nepali 2022 年 2 月 16 日
編集済み: Min Nepali 2022 年 2 月 16 日
Would the highpass filter with a very low cut-off frequency ( < 1 Hz) work with sampling rate as high as 1MHz?
Star Strider
Star Strider 2022 年 2 月 16 日
Yes, although the cutoff frequency does not have to be that low.
The filter characteristics (such as cutoff frequency) depend on the sampling frequency of the signal. The filter will need to be designed to give the best results for the signal it is designed to be used with.

サインインしてコメントする。

コミュニティ

カテゴリ

ヘルプ センター および File ExchangeAudio Processing Algorithm Design についてさらに検索

質問済み:

2019 年 1 月 11 日

コメント済み:

2022 年 2 月 16 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by