Understanding Power Spectral Density and the Power Spectrum

Поделиться
HTML-код
  • Опубликовано: 21 дек 2024
  • Learn how to get meaningful information from a fast Fourier transform (FFT). There is a lot of confusion on how to scale an FFT in a way that provides an understanding of the properties of the time-domain signal, which is addressed in this tech talk. Specifically, it covers how to go from an FFT to amplitude, power, and power density and why you may choose one representation over another-and the scenarios in which they are valid.
    Learn more:
    Understanding the Discrete Fourier Transform and the FFT: • Understanding the Disc...
    Equivalent Noise Bandwidth Derivation: bit.ly/3SJoVbI
    Download the MATLAB Live Scripts Used in the Video on GitHub: bit.ly/3OHWucJ
    --------------------------------------------------------------------------------------------------------
    Get a free product trial: goo.gl/ZHFb5u
    Learn more about MATLAB: goo.gl/8QV7ZZ
    Learn more about Simulink: goo.gl/nqnbLe
    See what's new in MATLAB and Simulink: goo.gl/pgGtod
    © 2024 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc.
    See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.

Комментарии • 62

  • @BrianBDouglas
    @BrianBDouglas 9 месяцев назад +60

    Hi everyone! Thanks for stopping by. If you have any questions about the video (once it's live) or in general about PSDs leave them here and I'll try to get them answered. Thanks!

    • @srikondapa11e
      @srikondapa11e 9 месяцев назад +3

      Compare pwelch, pspectrum and periodogram. Also comment on spectral mask and windowing for standard specific waveforms

    • @BrianBDouglas
      @BrianBDouglas 9 месяцев назад +2

      @@srikondapa11e This video doesn't cover pwelch or any averaging of the power spectrum. It's mostly about how to scale an FFT to get the visualization you're looking for and why you may choose to look at power instead of power density and vice versa. There is a short section on windowing, but only to explain how the scaling we are doing in the video is only valid for rectangular windows. Maybe I can cover your other concerns in a different video. Thanks for the comment!

    • @leonoortideman3433
      @leonoortideman3433 9 месяцев назад +1

      Hi Brian! Thank you so much for all the educational videos about signal processing and control engineering! I was wondering if you could make some videos about wavelet transforms? That would be amazing!

    • @ang7082
      @ang7082 8 месяцев назад

      A periodic signal is a Fourier series (i.e. a countable sum of sharp frequencies). I understand that for this a Power Spectrum is more suitable/meaningful than than a PSD. Is it so? Can you elaborate?

    • @迪-e4b
      @迪-e4b 8 месяцев назад

      I really love to watch your video! Brian. Very good lectures!

  • @erickappel4120
    @erickappel4120 9 месяцев назад +3

    Dear Brian,
    As usual, you blew me away!
    Thankyou!!!

  • @scttstnfld
    @scttstnfld 9 месяцев назад +4

    I see @BrianBDouglas post a video, I watch. Love these Brian!

  • @tjmozdzen
    @tjmozdzen 3 месяца назад

    The second half was really helpful. I was trying to figure out how to scale the fft amplitude to get something meaningful and used a gaussian because I know what it is supposed to be when transformed: e^(-ax*x) --> (pi/a)^0.5*e^(-pi*pi*k*k/a), where a=1/(2*sigma_x*sigma_x). my Ts = 1e-12 seconds and sigma was 150e-12 seconds. I was expecting an amplitude of 375e-12, but got 375 instead as an amplitude. I need to multiply my fft by Ts (or divide by Fs). Why that works, I'm not 100% sure, but the second half of your tutorial has given me a hint where to look. Thanks!

  • @vinZukaZ
    @vinZukaZ 7 месяцев назад +2

    I have been waiting for a video like this for ages now! Great overwie of a topic that is not well understood by many (me included)!

  • @lohsolomon402
    @lohsolomon402 9 месяцев назад +2

    Thanks alot for the video, I’ve been struggling until now🙏🏽

  • @neilphilip2320
    @neilphilip2320 8 месяцев назад

    Brilliant exposition of the subject!!!!

  • @nicholaselliott2484
    @nicholaselliott2484 8 месяцев назад +3

    I've been ignorantly neglecting some of the nuances here. Working the matlab examples which model this are the only way to get these fixed permanently in my brain and to apply them correctly at work. Thanks!

  • @munifzeybek4000
    @munifzeybek4000 9 месяцев назад

    Best explanations and proofs so far. Thanks a lot! Waiting for the similar videos from you Brian. Your help is priceless.

  • @arash4232
    @arash4232 Месяц назад

    Hi, thank you so much for your excellent work. Maybe that is my mistake but at 7:20, it seems to be the power of two sided FFT, not one sided; lets forget about one sided and as the arrow on the slide shows, proceed with two sided FFT: you correctly apply power 2 and then to fulfill the definition of power you must multiple by 2 and all the time that is two sided FFT.

    • @BrianBDouglas
      @BrianBDouglas Месяц назад

      If I understand your question correctly, I think I confused the situation with the way I drew it. At 7:17, this is the two-sided spectrum. It's the equation that ends with A^2/4. I then go on to talk about how we have to double that to get the one-sided spectrum and for some reason I wrote the "*2" at the end of the equation without explaining that I was doubling it and that it is no longer the two-sided equation but the one-sided. The equation at the bottom at 7:20 is correct for one-sided power. Is that what you were asking?

  • @ninepuchar1
    @ninepuchar1 2 месяца назад

    At 5:02, why does the summation sin(.)cos(.) results in tends to ZERO?

  • @kurtgn
    @kurtgn 8 месяцев назад +1

    at 5:00 why have the blue and violet sin() the same argument?

  • @chencanqian73
    @chencanqian73 9 месяцев назад +3

    Thank you for you great videos! I was wondering why we are interested in power over amplitude? Why squared?

    • @BrianBDouglas
      @BrianBDouglas 9 месяцев назад +2

      Great question. I do answer that in the video so check back on Wednesday when it's live :)

    • @-muac7191
      @-muac7191 9 месяцев назад

      Thanks for this information, I'm interested in this video

  • @johnkod
    @johnkod 4 месяца назад

    Thanks for rhese beautiful educational videos. Great work!

  • @khaledsalem9617
    @khaledsalem9617 Месяц назад

    Rectangular window should be used by calculating the signal in frequency domain using fft. Is it right ?

  • @pietrofavalesi
    @pietrofavalesi Месяц назад

    very well done video, thank you!

    • @MATLAB
      @MATLAB  Месяц назад

      Thank you for watching! Glad you liked it.

  • @ps12132
    @ps12132 8 месяцев назад

    Hi Brian, Can you help me understand the relation between the PSD of a continuous time signal and its sampled version?

  • @shubhamvyas8951
    @shubhamvyas8951 28 дней назад

    What if the discreet samples are obtained at a non uniform sampling rate? Can we still compute an fft? Also if a spatial signal is changing with time, can fft still be used for each time step?

    • @BrianBDouglas
      @BrianBDouglas 19 дней назад

      You need a more general version of the FFT that can handle the nonuniform sampling rate: like NUFFT (nl.mathworks.com/help/matlab/ref/double.nufft.html). If the signal is changing in time, then you might want to look at something like the short-time fourier (nl.mathworks.com/help/signal/ref/stft.html) transform which basically runs an FFT on just a shorter window of time and then that is swept across the whole signal.

  • @Pedritox0953
    @Pedritox0953 9 месяцев назад +1

    Great video!

  • @KRSK36
    @KRSK36 9 месяцев назад +2

    Thanks for the video. My requests are
    Please talk about the units also. If it is a vibration signals, how volts are becoming v2/Hz or something like that.
    Also please explain about windowing of time series signal. I heard that it is done to avoid signal leakage stuff
    Whether twice the maximum frequency as sampling frequency is enough or more is needed?
    And how to find maximum frequency..

    • @jayakumarsingaram8218
      @jayakumarsingaram8218 9 месяцев назад +1

      Hi, Computation of Power Spectral Density (PSD) is reliant on various factors, including the frequency bin width parameter determined by the number of points in the Fast Fourier Transform (FFT) and the signal bandwidth. This dependency underscores the importance of selecting an appropriate frequency bin width to accurately represent the power distribution across the frequency spectrum. If the bin width is too coarse, the PSD may lack resolution and fail to capture important frequency components, despite a quality input signal. Conversely, overly fine bin widths may introduce noise and artifacts, particularly in regions of low signal-to-noise ratio. Thus, achieving an optimal balance in frequency bin width is essential to ensure that the PSD effectively characterizes the underlying signal's power spectrum.
      How to reach Optimal balance ?
      // thanks in advance

  • @RamavathKavitha
    @RamavathKavitha 9 месяцев назад

    Hi, can i use the same formulas mentioned in the video for calculating fft, power spectrum & PSD of a random vibration signal?

  • @lautiwillhuber7493
    @lautiwillhuber7493 7 месяцев назад

    what a beauty of video, great job!

  • @melvinkencana1757
    @melvinkencana1757 9 месяцев назад

    thanks for the video, really helps my thesis.
    can you explain the relationship spectral density used by choi (1999) to modified variance ratio into automatic variance ratio?Thanks

  • @udivyasree6347
    @udivyasree6347 9 месяцев назад

    how to calculate the PSD for GPS signal at L1 BAND

  • @radon3292
    @radon3292 9 месяцев назад

    Hi Brian! Big fan of your videos. Is it possible for you to show an actual application of looking at random vibration data, performing FFT and make conclusions after looking at amplitude vs freq and PSD? Thanks!

  • @hsbedi88
    @hsbedi88 9 месяцев назад +1

    Hi, is there any way to find the sampling frequency of a signal if the instrument doesnt provides it clearly? Thanks in advance.

    • @GabrieleBunkheila
      @GabrieleBunkheila 9 месяцев назад

      When a time vector with the sampling times t is available I sometimes have used fs = 1/median(diff(t))

    • @hsbedi88
      @hsbedi88 9 месяцев назад

      @@GabrieleBunkheila thanks, I'll explore this more. 👍

  • @dominikz5776
    @dominikz5776 9 месяцев назад

    Great video Bryan but u could have mentioned the Welch-Method which is the most common for non parametric Systemidentifikation😉

  • @mahditabatabaei5776
    @mahditabatabaei5776 9 месяцев назад

    Thank you for this great video.
    If we have a complex signal, what is the difference? For FFT or other frequency domain evaluation, should we just on the real part or the image part? Or we can do it on the complex value?

  • @austinfinnegan7185
    @austinfinnegan7185 9 месяцев назад

    This video was great! Thnx

  • @joelevi9823
    @joelevi9823 6 месяцев назад

    this tutorial is great, explained so much things I wanted to know so simple.. thank you sir❤
    just one question..
    the script graph plot for the power and the PSD looks the same, shouldn't they be different as for PSD we divide by the sampling rate?

  • @SnehaRupa1
    @SnehaRupa1 8 месяцев назад

    Thank you @BrianBDouglas, I was waiting for such a video all along. the FFT was the first MATLAB code for my work 3 years ago and it took me this video to really understand what's going on.. Good work @BrianBDouglas and @MATLAB. A quick follow up question on pspectrum function in the close sine waves live script, can you comment on how to select the variable 'lt'? Choosing a higher value for 'lt' always improves the frequency resolution, but the amplitude starts to increase from the actual power as well. Can you suggest an optimal value to choose for 'lt' given a certain sampling frequency and a frequency resolution needed to be achieved by the resulting power spectrum so that the amplitude can somehow still be closer to the real power.

    • @BrianBDouglas
      @BrianBDouglas 8 месяцев назад

      Thanks for the comment. 'lt' is the length of the FFT. If 'lt' is shorter than the signal length then increasing it will improve frequency resolution - since you're adding more signal to the FFT. If 'lt' is longer than the signal itself (like I have in my script) then the pscpectrum function zero-pads the data to the length. When you zero-pad, that doesn't change the amplitude of the returned power or the frequency resolution, it just fills in the frequencies that were previously skipped over. So, it shrinks the sampling frequency but it's not actually giving you more resolution. If those frequencies have higher or lower power values then it'll look like the amplitude is changing. But if you keep increasing 'lt' until the frequency spectrum is really dense you'll see the true shape of the spectrum (given the finite data you're looking at). For example, if the signal has a dominant frequency at 10 Hz, but your data length is such that the sampled frequencies are at 9 Hz and 11 Hz, then you'll jump over the peak and the returned power will look small. But if you her-pad the data such that you sample also at 10 Hz, then you've hit the peak and the returned power will look like it increases. But all you're doing is actually sampling at a frequency that has higher power - not changing it. So, as long your computer can perform the FFT in a reasonable amount of time, then you could zero-pad enough to fully capture the shape of the power spectrum - but just remember that you're not improving resolution, just visualization of the spectrum. I explain it a bit in my video called "Understanding the Discrete Fourier Transform and the FFT" starting at 14:40. I'd put a link here but my comments get rejected with links. Good luck!

  • @PlanetTrantor
    @PlanetTrantor 9 месяцев назад +2

    So, if I have a pulse (not periodic) I should use the PSD, right? Can I calculate an amplitud graphic or is that a wrong idea?
    Edited: forgot it, Now I understand. Amplitud is only for periodic signals. Thanks a lot, great video.

    • @BrianBDouglas
      @BrianBDouglas 9 месяцев назад +1

      If you have a non-periodic signal then time-frequency plots are usually the way to go. For example, you could take an FFT of a small subset of the data at the beginning, then move to the next set of data and take and FFT again, and move it again and so on. In this way, you can see how the amplitude/power/power density changes over time.

  • @BoZhaoengineering
    @BoZhaoengineering 4 месяца назад

    What it is the application of FFT? This is a step further naturally, once you got FFT understood.

  • @tathagatabiswas9
    @tathagatabiswas9 9 месяцев назад

    Hi everyone, I am trying to check whether a given audio signal qualify a recommended power (in dBA) across specific frequency ranges. The audio signal is normalized between -1 to 1, so after doing the FFT, the PSD values are negative dB values. However the recommended dB(A) values are all positive and I cannot understand how to translate this to positive values. How to tackle this problem?

    • @BrianBDouglas
      @BrianBDouglas 9 месяцев назад +1

      I'm not sure of the question exactly, but if you are looking at normalized audio data then haven't you removed any notion of absolute power? You've already manipulated your audio signal and so a PSD would return the power density of that normalized signal and there wouldn't be a way to compare that to the recommended power density levels. Could you give more details?

    • @tathagatabiswas9
      @tathagatabiswas9 9 месяцев назад

      Hi Brian, thanks for your wonderful videos and replying to my concern.
      So the audio file is in wav format. I am reading it in matlab and the converted variable is between (-1,1). Here i am unable to find the normalising constant. However when I play it using sound() command, I can hear the audio fine. How is the actual audio power conversion happening in these functions?
      Now, On finding the PSD of the audio wave, the values of power are in negative dB (as it is normalised) hence I am unable to find the actual power of the audio signal. Will the power change if I assume the normalising constant based on recording device depth (like 16bit/24bit)?

  • @asifmohammadmithu8950
    @asifmohammadmithu8950 9 месяцев назад

    Great content

  • @donaldbagwell6309
    @donaldbagwell6309 5 месяцев назад

    would love to send you a 30 minute file of 20hz (u,v,w,T) temperature and wind velocity data from a CSAT-3D sonic anemometer; How would to segment (e.g. 5 minutes 10 minutes etc.) the data for FFT analysis and producing the PSD and turbulence spectra (i.e. -5/3 slope

  • @10bokaj
    @10bokaj Месяц назад

    amazing

    • @MATLAB
      @MATLAB  Месяц назад

      Glad you think so!

  • @pietrofavalesi
    @pietrofavalesi Месяц назад

    very well done video, thank you!