FIR Filter delay for Realtime Signal Processing
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone, i am trying to simulate a realtime signal processing through simulink with all of these block in the picture below. Without the filter, it works fine. But as soon as the filter is introduced we can see a big delay with only 501 filterkoef. Why is this happening ? What can i do to fix this delay ? As for the coefficients, i should be using an impuls where i recorded a clap in my room and then transfer it to matlab. but for the sake of testing i used this instead : filterkoef = [ zeros(1,500) 1 ].
0 commentaires
Réponses (1)
Christopher McCausland
le 26 Mai 2021
Hi Ghazian,
Your question is more about sampling theroy than matlab. Using an FIR filter will intorduce group delay to the signal. i.e. there is a delay from the signal entering the FIR filter to the signal being output. Group Delay can be calculated as:
Where N is the number of filter taps and T is the sampling time. Assuming a sample frequency of T is 20 Hz, the expected phase delay is 12.5 seconds provided the FIR filter is linear which is about what your image shows.
Are you sampling the signal at a sufficently high enough frequency, I would expect 48 khz or so?
Christopher
Voir également
Catégories
En savoir plus sur Get Started with DSP System Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!