Filtering Frequency Domain Noise - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim

Filtering Frequency Domain Noise


This application filters out certain frequencies from the frequency domain representation of an experimental data set.



Experimental Data

This data table contains 1024 experimental data points, assigned to the variable 'data'.


From the following plot, there appears to be an underlying trend in the data.

OriginalDataPlotSignalPlotdata, samplerate=1,color=gray, labeldirections=horizontal,vertical: displayOriginalDataPlot;

Frequency Domain Representation

If the data is examined in the frequency domain, the resulting power spectrum shows two dominant frequencies, as well as many low power frequencies.



SignalPlotdata_fft_ps1..10242, samplerate=1024, axis1=mode=log, title=Power Spectrum,labels=Frequency (Hz),Power

Filtering Noise in the Frequency Domain

Frequencies below a specific threshold can be removed with a custom filter. The Explore command can be used to show how the changing the frequency option of the low pass filter changes the resulting filtered signal.

F  procdataset, lp    local filteredData,filteredDataPlot,powspFilteredData,taps;   taps  GenerateFiniteImpulseResponseFilterTaps20,lp,':-filtertype'=lowpass;   filteredData  FiniteImpulseResponseFilterdataset,taps;    filteredDataPlotSignalPlotfilteredData, samplerate=1, title=Filtered Signal,view=mindataset..maxdataset:   powspFilteredDataSignalPlotsqrt~ PowerSpectrumFFTfilteredData1..10242, samplerate=1024, axis1=mode=log,title=Filtered Power Spectrum, labels=Frequency (Hz),Power;     displayArrayOriginalDataPlot,filteredDataPlot,powspFilteredData,size=1.0,600;end proc:Explore F data, 0.5f ,         parameters=f=0.001..0.495,label=0.5 − frequency,         size=1000,600 ;

Comparison of Original and Filtered Data Set

By comparing the original signal plot with the filtered data, the underlying trend is more clearly visible.

filteredData  FiniteImpulseResponseFilterdata,GenerateFiniteImpulseResponseFilterTaps20,0.13,':-filtertype'=lowpass:

filteredDataPlot  SignalPlotfilteredData, view=mindata..maxdata:displayOriginalDataPlot,filteredDataPlot