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.
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!
Compare pwelch, pspectrum and periodogram. Also comment on spectral mask and windowing for standard specific waveforms
@@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!
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!
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?
I really love to watch your video! Brian. Very good lectures!
Dear Brian,
As usual, you blew me away!
Thankyou!!!
I see @BrianBDouglas post a video, I watch. Love these Brian!
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!
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)!
Thanks alot for the video, I’ve been struggling until now🙏🏽
Brilliant exposition of the subject!!!!
Thanks!
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!
Best explanations and proofs so far. Thanks a lot! Waiting for the similar videos from you Brian. Your help is priceless.
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.
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?
At 5:02, why does the summation sin(.)cos(.) results in tends to ZERO?
at 5:00 why have the blue and violet sin() the same argument?
Thank you for you great videos! I was wondering why we are interested in power over amplitude? Why squared?
Great question. I do answer that in the video so check back on Wednesday when it's live :)
Thanks for this information, I'm interested in this video
Thanks for rhese beautiful educational videos. Great work!
Rectangular window should be used by calculating the signal in frequency domain using fft. Is it right ?
very well done video, thank you!
Thank you for watching! Glad you liked it.
Hi Brian, Can you help me understand the relation between the PSD of a continuous time signal and its sampled version?
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?
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.
Great video!
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..
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
Hi, can i use the same formulas mentioned in the video for calculating fft, power spectrum & PSD of a random vibration signal?
what a beauty of video, great job!
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
how to calculate the PSD for GPS signal at L1 BAND
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!
Hi, is there any way to find the sampling frequency of a signal if the instrument doesnt provides it clearly? Thanks in advance.
When a time vector with the sampling times t is available I sometimes have used fs = 1/median(diff(t))
@@GabrieleBunkheila thanks, I'll explore this more. 👍
Great video Bryan but u could have mentioned the Welch-Method which is the most common for non parametric Systemidentifikation😉
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?
This video was great! Thnx
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?
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.
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!
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.
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.
What it is the application of FFT? This is a step further naturally, once you got FFT understood.
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?
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?
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)?
Great content
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
amazing
Glad you think so!
very well done video, thank you!