result spectrogram from lowpass filter still pass frequency above the treshold

2 views (last 30 days)
I am trying use lowpass filter to my time series data and then i perform spectrogram to check wheater the signal still containing freq above the treshold or not.
clear all, clc, close all
yori=load("HHN__20150101T000000Z__20150102T000000Z.DAT");
y=lowpass(yori,10,100);
Nspec=256;
wspec=hamming(Nspec);
Noverlap=Nspec/2;
fs=100;
subplot 211
[S,F,T,P]=spectrogram(yori,wspec,Noverlap,Nspec,fs,'xaxis');
imagesc(T/(60*60),F,10*log10(P));
axis xy, title ("spectogram comp:HHN filter:NO")
ylabel('Frequency(Hz)')
subplot 212
[S,F,T,P]=spectrogram(y,wspec,Noverlap,Nspec,fs,'xaxis');
imagesc(T/(60*60),F,10*log10(P));
axis xy, title ("spectogram comp:HHN filter:YES (lowpass 10Hz")
ylabel('Frequency(Hz)')
Here my code, and the spectrogram shows that signal still contain freq above 10hz (that I don't want to pass). I don't understand why this happened? can someone give me suggestion to lowpass 10Hz signal? Thanks in advance

Accepted Answer

Star Strider
Star Strider on 10 Jun 2024
See if:
y=lowpass(yori,10,100, 'ImpulseResponse','iir');
improves the result.
.

More Answers (0)

Categories

Find more on Time-Frequency Analysis in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!