Denoising Data with FFT [Python]

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 เม.ย. 2020
  • This video describes how to clean data with the Fast Fourier Transform (FFT) in Python.
    Book Website: databookuw.com
    Book PDF: databookuw.com/databook.pdf
    These lectures follow Chapter 2 from:
    "Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control" by Brunton and Kutz
    Amazon: www.amazon.com/Data-Driven-Sc...
    Brunton Website: eigensteve.com
    This video was produced at the University of Washington
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 260

  • @somethingironic2227
    @somethingironic2227 3 ปีที่แล้ว +14

    the way this video is setup, overlaying him, the code and a whiteboard, is really slick

  • @adityams1659
    @adityams1659 3 ปีที่แล้ว +263

    Dude this guy is crazy, I still cant believe these videos are free.Thank You for making it free means a lot.❤️

    • @josephtran1500
      @josephtran1500 3 ปีที่แล้ว

      I havent even watched the video yet and I can tell Im on for a ride. The content looks so good.

    • @payman_azari
      @payman_azari 2 ปีที่แล้ว

      I can't even believe these videos are made

  • @jerickandrerodriguezmotta6809
    @jerickandrerodriguezmotta6809 2 ปีที่แล้ว +14

    I've spent many hours trying to apply FFT to my data and I've finally done it with your amazing explanation. For sure, the best Fourier Transform video.

  • @pipertripp
    @pipertripp 3 ปีที่แล้ว +14

    Pure gold. Fourier analysis still feels a bit like voodoo to me as I'm just learning the basics, and your videos have been very helpful. The python examples are really handy. Thanks for taking the time to do these things in both MatLab and Python.

  • @m.espejo
    @m.espejo 3 ปีที่แล้ว +3

    This has been very useful for me. I am a Mechanical Engineer and I am working in dynamic studies of steel structures. This method is very practical to apply to the acquisition of accelerometer data in dynamic tests. Thank you so much Steve!!!

  • @chongliu7861
    @chongliu7861 4 ปีที่แล้ว

    I found it very refreshing to watch in MATLAB, try to code it in Python myself, then actually watching the explanation in Python to correct my mistakes! Thank you very much for all you did!

  • @andrerangel7654
    @andrerangel7654 2 ปีที่แล้ว

    Steve Brunton, I may never meet you in person but you helped me a lot with these videos. I wish you a good health and a prosper life.

  • @felicemorgigi1764
    @felicemorgigi1764 3 ปีที่แล้ว +1

    People like you make the world a better place. Free education helps everybody in the end. Thank you.

  • @abemartin2002
    @abemartin2002 4 ปีที่แล้ว +19

    Professor Brunton, I love all your videos.

  • @TNTsundar
    @TNTsundar 3 ปีที่แล้ว +1

    Brilliant. Just brilliant. The quality of this lecture is off the charts.

  • @saitaro
    @saitaro 4 ปีที่แล้ว +7

    super-duper, as always. Python examples are what we need!

  • @user-em6vc7dd4c
    @user-em6vc7dd4c 3 ปีที่แล้ว +2

    Thanks a lot again Prof! Just wanted to mention that, when calculating the power spectrum (PSD), the data type of the production result of complex number with its conjugate is actually: complex with 0j (Python3)

  • @umedina98
    @umedina98 ปีที่แล้ว +1

    Your videos are crystal clear! I cant thank enough for sharing this high quality content. Loved the approach you took of writing parallel to the code!

  • @babaksanaee1460
    @babaksanaee1460 3 ปีที่แล้ว +1

    This is so excellent. Absolutely the best, and most comprehensive video regarding real world FFT on youtube. Probably going to buy your book now. Thanks a lot!

  • @doneel.5338
    @doneel.5338 2 ปีที่แล้ว +1

    This is amazing! I am finally getting rid of the feeling that the topic is complicated thanks for these videos! I mean it is, but I also am capable of getting it with your explanation.

  • @yashodhanvivek8086
    @yashodhanvivek8086 2 ปีที่แล้ว

    Amazing Prof. Brunton. These videos are extremely helpful for DPS researchers

  • @paulsenn1281
    @paulsenn1281 2 หลายเดือนก่อน

    this is mind-boggling-ly useful! (written after hours of scrolling in vain attempting to understand both the transform itself and the code that implements it .) Thank you!

  • @ElCanalMeu
    @ElCanalMeu 3 ปีที่แล้ว +3

    Hello Steve, I just wanted to say thank you. It's been really helpful.

  • @hfkssadfrew
    @hfkssadfrew 4 ปีที่แล้ว +2

    Very nice video professor Brunton. I think the idea behind is FOurier transform of white noise is a constant depending its amplitude. So for large signal-to-noise ratio , you will see a plateu + the real signal, then picking those peaks will work.

  • @Via.Dolorosa
    @Via.Dolorosa 4 ปีที่แล้ว +19

    Hi Steve, I watched many of your videos in Control the comments there are disable so I took this opportunity just to say thank you

  • @jinbobian1613
    @jinbobian1613 3 ปีที่แล้ว +1

    Thanks very much! This really helps students who are struggling with denoising.

  • @tedgerhardt2619
    @tedgerhardt2619 2 หลายเดือนก่อน

    Thanks for such great videos! Been following you for years and I’ve learned so much and am truly inspired by your work. Just ordered the book and am excited to apply!

  • @hardeepsingh68
    @hardeepsingh68 ปีที่แล้ว

    Beautifully explained ! Wonderful to learn from Steve !!

  • @MandarPatkar_html_addict
    @MandarPatkar_html_addict 2 ปีที่แล้ว

    Thanks much Prof Brunton! This is gold.

  • @Akshay-cy9tu
    @Akshay-cy9tu 3 ปีที่แล้ว

    just in love with the way u teach concepts

  • @tatianaazarchenko7066
    @tatianaazarchenko7066 2 ปีที่แล้ว

    Thank you a lot, Steve! Your lectures are absolutely amazing and extremely helpful!!

  • @goodlack9093
    @goodlack9093 ปีที่แล้ว

    one of the best channels I could've ever stumbled upon...immediately subscribed😅

  • @robertschofield9838
    @robertschofield9838 3 ปีที่แล้ว

    Thanks for contributing! Exactly what I was looking for.

  • @stijndeboer3721
    @stijndeboer3721 4 ปีที่แล้ว +2

    Thanks for your videos Steve.

  • @larcomj
    @larcomj ปีที่แล้ว

    Great application of the convolution theorem. Well explained.

  • @afghanexperts7815
    @afghanexperts7815 3 ปีที่แล้ว +1

    One of the best explanation I have ever seen ❤️❤️

  • @dom996
    @dom996 2 ปีที่แล้ว

    Thank you very much Prof. Brunton for the interesting video!

  • @Barasuisyou19
    @Barasuisyou19 3 ปีที่แล้ว

    Thank you very much for this amazing video! I was struggling to understand this, but you made it look easy.

  • @rajinfootonchuriquen
    @rajinfootonchuriquen ปีที่แล้ว

    Thanks Steve for your knowledge.

  • @Maria-mt2rz
    @Maria-mt2rz 4 ปีที่แล้ว +1

    This video is adorably stylish!

  • @ilAnfoosh
    @ilAnfoosh 2 ปีที่แล้ว

    Thanks for showing us how useful is learning Math!! Amazing!!

  • @HarrierBr
    @HarrierBr 3 ปีที่แล้ว +2

    Very good explanation. GG for the backwards writing, REALLY nice.

  • @surajyergude
    @surajyergude 3 ปีที่แล้ว

    Your lecture gives insight to the content what is in there books.

  • @otaviocarvalho1140
    @otaviocarvalho1140 3 ปีที่แล้ว +1

    Thank you teacher for the awesome explanation!

  • @matiaharonyan5218
    @matiaharonyan5218 3 ปีที่แล้ว +1

    Steve, you are amazing. Thank you a 1000 times.

    • @Eigensteve
      @Eigensteve  3 ปีที่แล้ว

      You are so very welcome!

  • @shillowcollins6392
    @shillowcollins6392 7 หลายเดือนก่อน

    Wow, I am super impressed, why didn't I find this channel early. Thanks so much for sharing this valuable information.

  • @arturfoden7139
    @arturfoden7139 ปีที่แล้ว

    Thank you for the clean explanation

  • @jacobthomas939
    @jacobthomas939 4 ปีที่แล้ว +3

    Agreed. A wealth of knowledge.

  • @azzouguenachour909
    @azzouguenachour909 3 หลายเดือนก่อน

    Many many thanks professors this was very clear.

  • @rafaelcardoso270
    @rafaelcardoso270 2 ปีที่แล้ว

    You are awesome, dude. Thanks a lot. I wish I had a professor like you at the college.

  • @robv3872
    @robv3872 2 ปีที่แล้ว

    what a great instructor! Thanks!

  • @harisgulzar4605
    @harisgulzar4605 3 ปีที่แล้ว

    Wow great content. Python example just boosted my interest in signals processing by many folds. Thanks a lot Mr. Steve, I really wish to see your behind the scene setup by the way :p

  • @cygtrafolia1007
    @cygtrafolia1007 วันที่ผ่านมา

    epic lighting. subscribed.

  • @XwitterEye
    @XwitterEye 2 ปีที่แล้ว

    damn the video quality is amazing here. got a sub

  • @goodlack9093
    @goodlack9093 ปีที่แล้ว

    thank you very much, you're a really good teacher!!

  • @afsinyilmaz8665
    @afsinyilmaz8665 2 ปีที่แล้ว

    Effective! Your amplitude at per unit time teaching is above threshold.

  • @sennabullet
    @sennabullet 3 ปีที่แล้ว +1

    A fantastic video with great informational content...and mindblowing production!!! How do you do all the overlays???

  • @dudidahan8721
    @dudidahan8721 2 ปีที่แล้ว

    WOW, thank you for sharing this video!

  • @yuanyibing
    @yuanyibing 2 ปีที่แล้ว

    I love all your videos.

  • @nhatson2265
    @nhatson2265 3 ปีที่แล้ว +1

    This work really helps, Sir!
    Thank you for your videos

    • @Eigensteve
      @Eigensteve  3 ปีที่แล้ว

      Glad to hear that!

  • @L2.Lagrange
    @L2.Lagrange ปีที่แล้ว

    Very helpful content. I have used MATLAB but not python. I want to use FFT and some basic signal processing techniques to learn how to use python, so these videos are very helpful

  • @fastlab8506
    @fastlab8506 3 ปีที่แล้ว +1

    thanks for great explanation! You guys are doing it on a different level :)

  • @nitinupadhyay9193
    @nitinupadhyay9193 3 ปีที่แล้ว

    i liked and subscribed before even starting the video.. i knew it was going to be great!

  • @pdirac
    @pdirac 2 ปีที่แล้ว

    Brilliant. Just brilliant. Thanks

  • @monkeypoohonyou
    @monkeypoohonyou ปีที่แล้ว

    Amazing lecturer!

  • @jeremynx
    @jeremynx 3 ปีที่แล้ว

    thank you!!! amazing graphics!!! clear explanation) best wishes

  • @SP-ui6zn
    @SP-ui6zn 3 ปีที่แล้ว

    Thank you Dr. Brunton.

  • @shahriarhabibi8382
    @shahriarhabibi8382 3 หลายเดือนก่อน

    Very nice work! Thanks!

  • @Ting3624
    @Ting3624 4 ปีที่แล้ว +8

    thank you for the education kind sir!
    math + code example is a great idea

  • @VanNguyen-yp7cd
    @VanNguyen-yp7cd ปีที่แล้ว

    So helpful. Thank you so much!!

  • @berkceyhan5031
    @berkceyhan5031 2 ปีที่แล้ว

    First I liked, then I watched. Amazing!

  • @jaehoyoon7061
    @jaehoyoon7061 3 ปีที่แล้ว +1

    You just made my day. THANKS :)

  • @monh964
    @monh964 4 ปีที่แล้ว

    I told my self lets see what this guy is talking about...
    Realized I discovered a wizard. I will have to see all your videos. I always was afraid from fft. Thank you for simplifying it. Thanks again.

  • @NowanIlfideme
    @NowanIlfideme 4 ปีที่แล้ว +2

    I gotta say, watching these and re-remembering uni courses has been quite a blast. Thanks for your lectures!
    Also, what exactly do you use to make these videos? I assume you write on glass and then flip the video? It always turns out surprisingly clean, with the screen projection as well...

    • @Eigensteve
      @Eigensteve  4 ปีที่แล้ว +1

      Thanks! Yep, glass and flip.

  • @DiverselyArtistic
    @DiverselyArtistic 3 ปีที่แล้ว +1

    Thank you so much sir ,i was really confused before this video

  • @juancarlosesquivel7855
    @juancarlosesquivel7855 3 ปีที่แล้ว

    Thanks for your amazing videos and book. I'm watching them all, and I hope they'll help me with a Kaggle competition on detection of gravitational waves from time series obtained by LIGO and Virgo.

  • @TungNguyen-gx1fy
    @TungNguyen-gx1fy ปีที่แล้ว +1

    Take note: f is the noisy data
    1. f_hat = FFT(f)
    - f_hat is a vector of complex Fourier coefficients (increasing frequency: low to high) with its magnitude.
    2. PSD = |f_hat|
    - vector of real magnitude (power) for each frequency.
    3. Filter: on PSD, keep the power > Threshold, and set 0 to the rest (because they are the noise frequency) and we have new f_hat.
    4. f_denoised = iFFT(new f_hat)

  • @lachlanperrier2851
    @lachlanperrier2851 2 ปีที่แล้ว

    absolute king!

  • @amirulsadikin8716
    @amirulsadikin8716 4 ปีที่แล้ว

    Thank you..very good explanation.

  • @MrProzaki
    @MrProzaki 4 ปีที่แล้ว

    wow , ure just great !!!! thank you !!! never pressed that sub button this fast.

  • @arailymserikbay2620
    @arailymserikbay2620 2 ปีที่แล้ว

    really helpful thanks a lot!
    precise and clear!

  • @psheep8206
    @psheep8206 3 ปีที่แล้ว

    Thanks Steve, great footage! Any chance to extend this series with a explainer on how to detrend a periodic signal in 2D data?

  • @shahriarhabibi8382
    @shahriarhabibi8382 3 หลายเดือนก่อน +1

    The magnitudes of the signals with 50 and 120 Hz depends on the random numbers that you generate at the beginning of the code. I had this problem that my magnitudes where different from those presented in this video.

  • @samsmusichub
    @samsmusichub 3 ปีที่แล้ว

    I ❤ FFTs. Thank you!

  • @Asparuh.Emilov
    @Asparuh.Emilov 3 ปีที่แล้ว

    Thank you so much for those lectures! I love it! Is it actually possible to use Fourier series to create time series forecasting?

  • @prakhars962
    @prakhars962 3 ปีที่แล้ว +1

    thanks professor, for this detailed video. I

  • @giovanniiacobello2866
    @giovanniiacobello2866 4 ปีที่แล้ว +8

    Thank you very much Prof. Brunton for the interesting video! It is amazing this way of making videos. Which software and devices do you use for that? Is that a glass board? or something similar?

    • @Eigensteve
      @Eigensteve  4 ปีที่แล้ว +4

      Yes, a glass board

    • @DougWoodrow
      @DougWoodrow 2 ปีที่แล้ว

      @@Eigensteve and yet the writing isn't back-to-front... clever! 🤔

  • @joseftrojan7664
    @joseftrojan7664 3 ปีที่แล้ว

    Dude, thank you! You saved me!

  • @cars7359
    @cars7359 4 ปีที่แล้ว +1

    Good video, very helpful

  • @user-cc1sy5uk6b
    @user-cc1sy5uk6b 3 ปีที่แล้ว

    鏡文字書けるのすごいですね!(
    It's amazing to be able to write mirror writing!)

  • @nightlyowll
    @nightlyowll 2 ปีที่แล้ว

    This video is amazing.. Just to the point !! I'm speechless on how good the video is.. ❤

  • @fernandohood5542
    @fernandohood5542 4 ปีที่แล้ว

    Much respect brother!!!

  • @guhanmuthu4641
    @guhanmuthu4641 2 ปีที่แล้ว

    Thanks .....great teaching ....

  • @ammar9045
    @ammar9045 ปีที่แล้ว

    Well explained... 👏

  • @kivancthewalrus
    @kivancthewalrus 3 ปีที่แล้ว +3

    You forgot to multiply your np.fft.fft(...) output by dt. np.fft module assumes the sampling spacing is 1. So we have to fix for this if we have a different sampling spacing. Also, you don't have to give n as the second argument of your np.fft.fft because n is also the length of your signal, so it's effectless.

  • @tommytankkify
    @tommytankkify 11 หลายเดือนก่อน +1

    Brilliant!!!

  • @JosephRajewskiWIII
    @JosephRajewskiWIII 4 ปีที่แล้ว +3

    I had Steven Brunton as a professor at University of Washington in Applied Mathematics, and he was excellent. So glad I just stumbled upon his channel. It looks really good. Will be tuning in! I am hoping you will do a video on linear programming and optimization; I have a problem at work I want to apply this to. :)

    • @Eigensteve
      @Eigensteve  4 ปีที่แล้ว +2

      Awesome, thanks Joe! I have some optimization videos in the works, so stay tuned!

  • @jakubb4784
    @jakubb4784 ปีที่แล้ว

    awesome! :) Loving it! :)

  • @midasredblade236
    @midasredblade236 ปีที่แล้ว

    Yes, THIS IS WHAT I WAS LOOKING FOR
    THANK YOU TH-cam ALGORITHM

  • @frankkoslowski6917
    @frankkoslowski6917 ปีที่แล้ว +1

    Love your presentation.
    Interesting though that you got your code to work without errors.
    Casting complex values to floats ist verboten! 😏 Here's how it should be for the graphs to display without error:
    plt.plot(freq[L], np.absolute(PSD[L]), color='c', lw=2, label='Noisy')
    However,
    this does not solve the problem at it's root, because the Boolean return for a complex like `PSD` referenced to and integer as in:
    indices = PSD > 100 does only return a Boolean array filled with `False`, unless np.absolute(PSD) gets implemented.
    The best place to do this without undue repetition throughout the code is where the problem starts.
    Here we see the amendment that forces absolutes and brings all the trouble caused by attempting to handle complex values like floats to an end:
    PSD = np.absolute(fhat * np.conj(fhat) / n) # Power Spectrum Density (power of FFT)
    However,
    the error finds itself repeated in the last set of plots with the `Inverse FFT for filtered time signal` and is best corrected like this:
    ffilt = np.absolute(np.fft.ifft(fhat)) # Inverse FFT for filtered time signal 😉
    All in all, a very clear and understandable `toy example`. 💚

  • @Georgesbarsukov
    @Georgesbarsukov 3 ปีที่แล้ว

    Loved the video

  • @prakashmishra9480
    @prakashmishra9480 3 ปีที่แล้ว

    Thank you so much professor

  • @arnoldsu
    @arnoldsu 2 ปีที่แล้ว

    Thanks for the explain, it is very details and easy to understand. One question, how can we demonstrate/apply the 95% significant test onto the plot? Thanks!

  • @matheusdv3920
    @matheusdv3920 4 หลายเดือนก่อน

    Superb video!

    • @Eigensteve
      @Eigensteve  4 หลายเดือนก่อน

      Thanks!

  • @Asparuh.Emilov
    @Asparuh.Emilov ปีที่แล้ว

    This is one of the best videos on how to apply FFT in Python!!! Thank you so much! Is it possible to make a video with Time Series data denoising? And could be applied directly on the original Time Series Data Or first we should obtain the difference on 1st grade?