filtering DC from digital audio signal
Afficher commentaires plus anciens
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

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 :)
Réponses (1)
Star Strider
le 11 Jan 2019
0 votes
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 commentaires
Min Nepali
le 16 Fév 2022
Modifié(e) : Min Nepali
le 16 Fév 2022
Would the highpass filter with a very low cut-off frequency ( < 1 Hz) work with sampling rate as high as 1MHz?
Star Strider
le 16 Fév 2022
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.
Communautés
Plus de réponses dans Power Electronics Control
Catégories
En savoir plus sur Audio Processing Algorithm Design dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!