is there a bandwidth limit on the bandstop filter
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
STEPHEN BARRETT
le 12 Juin 2019
Commenté : Star Strider
le 14 Juin 2019
I have the following code which is stopping a super narrow band on a signal. It runs but won't complete and locks up matlab. I assume becasue I'm pushing the filter past it's limit. Can anyone confirm this?
y = bandstop(signal, [4500 950000], 5e9);
Thanks
4 commentaires
Walter Roberson
le 12 Juin 2019
On my system, with 4 CPUs, that runs 4 threads (automatically) doing the calculation. The amount of memory involved is not much comparatively -- the entire MATLAB process is sitting at less than 1.5 gigabytes including the desktop.
I ran 1 million earlier and it took a bit but finished. I am timing 10M now.
Réponse acceptée
Star Strider
le 12 Juin 2019
The easiest way to see what’s going on with it is to use fvtool to look at it, and to give it a short random signal to look at the output:
signal = rand(1, 1E+4);
[y,df] = bandstop(signal, [4500 950000], 5e9);
fvtool(df)
figure
plot(y)
It appears to be a well-designed filter, and works with a random signal. I suspect that something about your ‘signal’ vector could be part of the problem, possibly its amplitude, since the output of the random signal (with an amplitude between 0 and 1) produces an output on the order of
. The normalised frequency of the stopband center frequency is about
. (In my experience, this is a bit extreme.)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/224195/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/224193/image.png)
In situations like this, it’s sometimes worthwhile to design both a lowpass filter and a highpass filter, and then add the output vectors. (There is no way to cascade them, since the output of one filter will not overlap with the output of the other filter.)
The problem does not appear to be with the filter itself, since the fvtool analysis suggests that it’s stable and works well.
10 commentaires
Star Strider
le 14 Juin 2019
Part of the problem is that wavelets will find it difficult to differentiate completely the spikes from the noise unless you tell them to. That’s simply the nature of wavelets. I¹ve not worked with wavelets in a while (I would have to back and review my wavelet references), however concentrating on the higher-frequency wavelets (that would eliminate the noise) might be worthwhile, and would not attenuate the low-frequency parts of your signal (spikes). For this, you would use wavelet filters.
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!