Giter Club home page Giter Club logo

Comments (2)

BystrickyK avatar BystrickyK commented on July 23, 2024

To get the cutoff frequency, I first calculate the PSD of each signal using Welch's method (calculates periodogram, robust against noise but lower frequency resolution). Then I calculate the mean log value of PSD for each signal and multiply it by some number smaller than 1 ( 0.8 in this case). This mean is visualized in the plots as a horizontal dotted line, it's supposed to be above the higher frequency PSD values. The base cutoff frequency is calculated as the highest frequency where the log-mean and the PSD intersects. This base cutoff frequency is then multiplied by some number ( 1.7 in this case), to increase the bandwidth, since the base cutoff results in bad signal reconstruction when the signal's transformed back into time domain. The new cutoff frequency is then used in the filtering phase.
The filtering is done by first transforming the signals to the Fourier domain using FFT and then setting all frequencies higher than the cutoff to 0 and transforming back into time domain.

Finding cutoff frequencies:
welch

Magnitudes of the Fourier coefficients (sqrt of PSD?), kept frequencies are green:
psd

State signals after iFFT:
sig

Zoomed:
sigzoom

Signal reconstruction is pretty good, the noise in this example is pretty heavy, especially for some signals.

from sindy.

BystrickyK avatar BystrickyK commented on July 23, 2024

Filtering a signal with 3x weaker noise, zoomed:
image

from sindy.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.