Substituting noise with zeros
Mostra commenti meno recenti
I have a segment of data that has a significant amount of noise. I know the start and end point of the noise when it is graphed and I want to substitute these aberrant values with zeroes OR split the segment into two areas, deleting the noise in the middle.

13 Commenti
Star Strider
il 15 Mar 2016
Before you throw out parts of your data, first determine if the noise if frequency-limited or broadband. If it’s frequency-limited, you can likely filter it, retaining your underlying data.
If it’s broadband impulse noise a frequency-selective filter won’t work, but a Savitzky-Golay filter could work.
You can find out easily enough by taking the fft. (Note specifically the code between the top two plot figures.)
atek
il 15 Mar 2016
Star Strider
il 15 Mar 2016
If you can segregate the noise segments, I would replace them with NaN instead of zero. Since the noise came from railing your amplifier, those are likely not good data anyway.
We can’t help without actually having your data to work with. To upload it here, use the ‘paperclip’ icon and complete both the ‘Choose file’ and ‘Attach file’ steps.
atek
il 15 Mar 2016
atek
il 15 Mar 2016
dpb
il 15 Mar 2016
The use of 0 will introduce discontinuities at the points where the signal breaks are; how significant that might be would depend largely on what the actual patterns are and to a lesser extent how long the overload sections are. I'd be concerned as well from a practical standpoint of how long after return from saturation it is before the sensor, whatever it is, is actually responding without bias or phase issues. Some are fairly tolerant to such transients others "not so much".
atek
il 15 Mar 2016
Image Analyst
il 15 Mar 2016
Andy, you're making us work blind. Please attach a screenshot of your graph so we know what we're dealing with. Code to plot your .mat file would also be good.
Not enough info to answer the question of what the effect of simply ignoring the overload section is. Everything depends on what is the actual measurement and what you intend to get out of it, which as IA says, you're mum about. Trying to answer these kinds of questions independent of context (and very detailed context of both the DUT and the measurement system plus the analysis intent) is simply not possible with any certainty. The answer is, "it all depends"...some systems/analyses will make essentially no difference, others may be totally meaningless to continue. The real result is likely somewhere in the middle; the question is where in that continuum might it lay.
atek
il 15 Mar 2016
atek
il 15 Mar 2016
Star Strider
il 15 Mar 2016
You have three columns in your .mat file.
- What are they?
- What am I looking at?
- How best to plot them?
- What’s your sampling frequency?
atek
il 15 Mar 2016
Risposta accettata
Più risposte (1)
Image Analyst
il 15 Mar 2016
Can you just do a salt and pepper noise cleaning? Just run the signal through a median filter, and where there are huge spikes, replace them with the median filtered version
badElements = abs(signal) > 5; % or whatever constitutes noise.
% Get rid of spikes. However, this alters the "good" elements also.
medianFilteredSignal = medfilt1(signal, 3);
% Replace only the bad elements, not the good ones.
signal(badElements) = medianFilteredSignal(badElements);
Categorie
Scopri di più su Descriptive Statistics in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!