Gibbs-like behaviour with lowpass on long signals
I have a signal that is 1000 some data points sampled at a rate of 1/3 hz. I’d like to lowpass it with fpass = 0.08.
I have an example attached the first 196 of them:
t=readtable(‘example_signal.txt’);
filtered=lowpass(t.Var1,0.08,1/3);
plot(filtered)
But this gives something that looks like gibbs!
t=readtable(‘example_signal.txt’);
filtered=lowpass(t.Var1([1:178]),0.08,1/3);
plot(filtered)
And this doesn’t?
Why does making the signal shorter change things? If I increase steepness, I can avoid this, but if the signal is longer yet again, I need to keep increasing steepness, which I can only do so much of — and I can’t make it steep enough to do the whole 1k long signal without an issue.
filtered=lowpass(t.Var1,0.08,1/3,’Steepness’,0.9);
plot(filtered)
My guess is that as the signal lengthens, some part of the Fourier transform of it is getting pushed into the transition band, and that’s why making it steeper helps.
But I don’t know why it’s happening, or how to avoid it.
If I knew how to calculate when this would happen, then I could just break my signal into parts shorter than this critical threshold. But I don’t understand why that should help theoretically (indeed, it seems like I’d be throwing out information on very slow oscillations (which should pass anyways) if I were to do that).I have a signal that is 1000 some data points sampled at a rate of 1/3 hz. I’d like to lowpass it with fpass = 0.08.
I have an example attached the first 196 of them:
t=readtable(‘example_signal.txt’);
filtered=lowpass(t.Var1,0.08,1/3);
plot(filtered)
But this gives something that looks like gibbs!
t=readtable(‘example_signal.txt’);
filtered=lowpass(t.Var1([1:178]),0.08,1/3);
plot(filtered)
And this doesn’t?
Why does making the signal shorter change things? If I increase steepness, I can avoid this, but if the signal is longer yet again, I need to keep increasing steepness, which I can only do so much of — and I can’t make it steep enough to do the whole 1k long signal without an issue.
filtered=lowpass(t.Var1,0.08,1/3,’Steepness’,0.9);
plot(filtered)
My guess is that as the signal lengthens, some part of the Fourier transform of it is getting pushed into the transition band, and that’s why making it steeper helps.
But I don’t know why it’s happening, or how to avoid it.
If I knew how to calculate when this would happen, then I could just break my signal into parts shorter than this critical threshold. But I don’t understand why that should help theoretically (indeed, it seems like I’d be throwing out information on very slow oscillations (which should pass anyways) if I were to do that). I have a signal that is 1000 some data points sampled at a rate of 1/3 hz. I’d like to lowpass it with fpass = 0.08.
I have an example attached the first 196 of them:
t=readtable(‘example_signal.txt’);
filtered=lowpass(t.Var1,0.08,1/3);
plot(filtered)
But this gives something that looks like gibbs!
t=readtable(‘example_signal.txt’);
filtered=lowpass(t.Var1([1:178]),0.08,1/3);
plot(filtered)
And this doesn’t?
Why does making the signal shorter change things? If I increase steepness, I can avoid this, but if the signal is longer yet again, I need to keep increasing steepness, which I can only do so much of — and I can’t make it steep enough to do the whole 1k long signal without an issue.
filtered=lowpass(t.Var1,0.08,1/3,’Steepness’,0.9);
plot(filtered)
My guess is that as the signal lengthens, some part of the Fourier transform of it is getting pushed into the transition band, and that’s why making it steeper helps.
But I don’t know why it’s happening, or how to avoid it.
If I knew how to calculate when this would happen, then I could just break my signal into parts shorter than this critical threshold. But I don’t understand why that should help theoretically (indeed, it seems like I’d be throwing out information on very slow oscillations (which should pass anyways) if I were to do that). signal processing, filter MATLAB Answers — New Questions