filtering DC from digital audio signal
Mostrar comentarios más antiguos
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 :)
Respuestas (1)
Star Strider
el 11 de En. de 2019
0 votos
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 comentarios
Min Nepali
el 16 de Feb. de 2022
Editada: Min Nepali
el 16 de Feb. de 2022
Would the highpass filter with a very low cut-off frequency ( < 1 Hz) work with sampling rate as high as 1MHz?
Star Strider
el 16 de Feb. de 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.
Comunidades de usuarios
Más respuestas en Power Electronics Control
Categorías
Más información sobre Audio Processing Algorithm Design en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!