How to design a butterworth filter for velocity data?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi guys,
I have only just started learning about filters and am having some trouble/questions. I am working with the energy spectrum from velocity data and I would like to do a high-pass butterworth filter with a cut-off frequency of 0.5Hz. I have written a code. However, when I apply it, my velocities increase from 0.5 to 20 or more! And when I use pwelch to plot my spectrum, the energy values increase tremendously, which is definetely wrong.
n = 5; % order of the Butterworth filter
fc = 0.5; % Cut-off frequency in Hz
fs = 8; % Sampling frequency in Hz
[a,b] = butter(n,fc/(fs/2),'high');
Veloc = filter(b,a,Veloc);
For me, the way I have designed, I should be basically filtering out signals with a lower frequency than 0.5Hz, but that's obviously not what is going on. Can someone tell me what I am doing wrong?
If I use filtfilt instead of filter, I get only NaN.
Thanks so much for the help! I am really struggling with this.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Digital Filtering 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!