Interesting how, even with a "non-normalized" broad signal space, the track of the imaginary values at 8:29 reminds me very much of the typical simulated 2D track for Brownian motion of a single particle. Came here to learn more about Hilbert transfoms in the audio dsp realm, came away with ideas re: sonification and dynamical systems.. learning is cool, kids!😉
Mike, Very nice exposition of the ideas. Your lecture style is clear and concise. This happens less often than one would like in this kind of area. ;-) Thanks for the video.
This video is part of a larger course on signal processing in neuroscience (ANTS -- Analyzing Neural Time Series data). If you go to the main page for my channel, you'll find a list of all the playlists associated with this course. Look for "ANTS #".
Because life always gets more complicated ;) But in this case, it's because we need to rotate the Fourier coefficients in the complex plane by -90 degrees (e.g., turns a cosine into a sine), and that rotation can be implemented by multiplying by i=sqrt(-1). This is part of one of the algorithms for obtaining the Hilbert transform.
6:25. I don't understand this. Why do they match exactly? Does it happen always? Let's say that the ERP is sin(t). The Hilbert transform of sin(t) is cos(t), the real part of which doesn't match sin(t).
I think I've got the answer. What I thought to be Hilbert transform is actually called "phase-quadrature component". Now all makes sense. I was confused because according to Wikipedia, a result of Hilbert transform is what you call "phase-quadrature component".
Hi Mike, to which book are you referring to in this lecture? Is it your most recent work, "Analyzing Neural Time Series Data: Theory and Practice" (The MIT Press)? I'd like to get a copy. Great work and thanks!
You stated we start with a real valued cosine wave. In a real valued signal you can of course get the power. AS an electrical engineer I do it routinely? The phase is none other that where the wave real value is at that point in time so again the statement you cant get the phase angle from a real valued function is confusing?
For a pure sign wave, you are correct. But for many applications, the raw signal is noisy or has multispectral elements, and the argument of the Hilbert transform helps to better estimate the phase.
Hi Mike thank you so much for your explanations. I am a civil engineer and had a really hard time understanding these concepts. I have a question about Hilbert transform. in Fourier transform, we obtain magnitude and phase in frequency domain, and horizontal axis is frequency, so we can understand that how much energy is present in each frequency. but here you obtained magnitude and phase in time domain. I have watched your other videos about band pass filtering data before using Hilbert transform too. but I still don't understand that why magnitude and phase are shown in time domain. Isn't Hilbert transform a method for spectral analysis? how can we reach information in frequency domain, because I can't interpret magnitude plot in time domain. thank you so much
Hi Farzan. The Hilbert transform involves three steps (1) FFT, (2) double the positive frequencies and zero the negative frequencies, (3) IFFT. From that third step, you get back to the time domain. So when the signal is narrowband, then the Hilbert transform gives a complex analytic signal, from which instantaneous (time-varying) magnitude/phase can be extracted.
@@mikexcohen1 Now I think I understand what's going on. So if we want to obtain information about frequency content let's say from 0 to 10 hz with 0.1 hz frequency resolution, I should make FIR filters with different bands like 0.1 hz, 0.2 hz, 0.3 hz, ..., 9.8 hz, 9.9 hz, 10 hz ; and dot product it with the signal to obtain a three dimensional time-frequency-power plot like what you said in wavelet lecture, right? And if it's correct, is there any matlab code for it? Sorry for my long question
Hello Mike, I call you Mike, because I know you hate formalities. First of all, thank you for making your courses accessible to everyone, they are very helpful to me, I am a doctoral student and I have learned more from you than I did at my university. I wanted to apply myself to EEG signal processing, and I wanted to use the data you use but I can't find where to download it. Is there a link from where we could take EEG data? Thank you.
Thank you, Yacine. It's not so much that I hate formalities, but names like "Dr. Cohen" or "prof Cohen" make me feel old, which is generally the opposite of how I like to feel :D. The link to the data file is in the comments (...sampleEEGdata.mat).
why do we need more transformations than Laplace's ? Laplace scans for sinusoids (like Fourier) and exponentials in a signal, why do we need strange transformations like the wavelet one ?
Hi Mike, I've spent dozens of hours watching your videos and they have helped greatly. In my research, I'm interested in measuring the instantaneous frequency of heart rate modulation, and how this frequency changes during a half hour meditation. I thought the Hilbert transform might be the tool I need, but after I've digested your stuff, I've realized that the Hilbert transform won't do the job. The Hilbert gives a instantaneous phase and amplitude, but it is not a useful tool for finding an instantaneous frequency. Is that fair to say? The Hilbert transform is applicable when you already know the frequency you are interested in. In my case, the whole point is to find that frequency as a function of time.
Good evening Mike :) Best wishes from Poland. I wanted to ask if you prefer macOS or WIndows for performing analyses on EEG data in Matlab / Python. Second question - is EEG data analysis with matlab / python performable on ios / android devices (how real is possibility to launch it on them)?
Hi Marcin. I don't think the desktop OS really matters. MATLAB is the best programming language/environment for EEG analysis. My personal OS preferences are linux > windows > mac. As for doing analyses on the phone, sure, a smartphone is definitely powerful enough. The question is how interactive you can be with the data. I guess there are already EEG analysis apps out there (e.g., for BCI or neurofeedback apps), but I don't use them.
"Event-related potential." It is the average of repeated electrical brain responses to a stimulus. My apologies for the neuroscience-specific terminology, but this videos is part of a neuroscience data analysis lecture series :P There is an earlier video where I define these terms, probably one of the intro videos. But of course the Hilbert transform works the same for any kind of signal.
How to forecast stock market using this method ? I there any online software to execute this algo ? As I dont understand these mathematics concepts but in desperate need to apply the same on stocks ... could you please help me to understand the same ... many thanks
Hi Gurpreet. If I knew how to predict the stock market, then, well, I'd be a very wealthy person. It's pretty much impossible to do, and I don't think the Hilbert transform will help you with that ;) But I'll give you some financial advice: Don't try to predict stock prices. You are more likely to lose. The best thing is to invest in low-cost index-tracking funds. They follow the market, growing slow but steady. It's the safest and best way to invest (although it's for long-term, not short-term). Mike
lool :) usually i don't comment, but Hilbert is not the proper way to predict stock data. To do it properly, you need much sophisticated statistical methods, such as Monte-Carlo model or others. There is one easy method for predicting values that i know, only and only in a very special case, which is the Eliotte Wave method. if the stock starts an Eliotte wave, you can predict future values with 90% precision only till the wave ends. @Mike: Thanks Mike for your nice Video, i can point my students to your channel for extra topics.
Hi Mike, thank you so much for these great lectures. These are exactly what I want. ## I have a question about Hilbert Transform: By using complex morlet wavelet, we can extract the time series with a specified frequency range (i.e. centered at 6.5). I am a little bit confused about the plots in this lecture, where is the frequency information in these pictures? What is the meaning of abs(hilbert(erp))? which frequency does it reflect?
Hi go. To get frequency information from a signal after applying the Hilbert transform, you would need to narrowband filter the signal first. I talk about that at the end of the video. The Hilbert transform (particularly the phase) of a broadband signal is difficult to interpret, because it reflects whatever frequency has the highest energy at each time point. So I don't think abs(hilbert(erp)) is really interpretable. I meant it in the video more as an illustration than as a practical tool (for the ERP). I hope that wasn't too confusing! Mike
@@mikexcohen1 Thank you so much for your reply. I have watched your next lecture, you filtered the data first, then calculated the signal's power by Hilbert Transform. So, after narrowing the frequency band, we can say the power or phase is a reflection of that band, right? I still have a question. How narrow of the frequency band should be?
For your first question, yes, the power and phase time series as estimates of instantaneous features of the signal at that frequency. Your second question is a good one, but there is no easy answer. If the filter is too narrow, then you'll remove all the dynamics (non-stationarities), but are usually the parts of the signal you are interested in. But if the filter is too wide, then you'll lose specificity. It also depends on the nature of the signal and the center frequency of the filter. All that said, bandwidths of around 2-5 Hz should be appropriate in many cases.
@@mikexcohen1 Hi Mike, I have a follow-up question to go's question: After you bandpass filtered the signal, say, around 30-35 Hz, what do the Hilbert transform power and phase reflect? Do they reflect the mean power and mean phase of the signal at 30-35 Hz at each time point, or they reflect whatever frequency has the highest energy?
for those who like to see the Hilbert transform used in SSB communications: ruclips.net/video/IuQPZKQ3cBM/видео.html these equations run our modern communication systems!!
It depends on the kind of data you will be working with. The Hilbert transform is used a lot in signal processing and time series analysis. If you're not working with those kinds of data, then I don't think you would need to know about it. This video is part of a course on signal processing.
Hi, at time 2:30 the formula on top right has an extra argument of "cos".
Interesting how, even with a "non-normalized" broad signal space, the track of the imaginary values at 8:29 reminds me very much of the typical simulated 2D track for Brownian motion of a single particle. Came here to learn more about Hilbert transfoms in the audio dsp realm, came away with ideas re: sonification and dynamical systems.. learning is cool, kids!😉
Nice :)
Mike, Very nice exposition of the ideas. Your lecture style is clear and concise. This happens less often than one would like in this kind of area. ;-) Thanks for the video.
Many thanks!
Simple yet great explanation! Thank you
dear proffessor, what is the course of this video ?
This video is part of a larger course on signal processing in neuroscience (ANTS -- Analyzing Neural Time Series data). If you go to the main page for my channel, you'll find a list of all the playlists associated with this course. Look for "ANTS #".
I was also curious since I learned about this in my Telecommunications course.
Is the Hilbert Transform short for the Hilbert-Hung Transform, or are they two different transforms?
They are different transform, the Hilbert-Huang Transform is a development of the Hilbert Transform.
wanted to say that Euler is spelled Oiler, not Youler. Thanks!
Mike explained why he says Youler but not Euler in another video lol
Why do you need to make things more complicated with complexf = 1i*f in your code?
Because life always gets more complicated ;)
But in this case, it's because we need to rotate the Fourier coefficients in the complex plane by -90 degrees (e.g., turns a cosine into a sine), and that rotation can be implemented by multiplying by i=sqrt(-1). This is part of one of the algorithms for obtaining the Hilbert transform.
6:25. I don't understand this. Why do they match exactly? Does it happen always? Let's say that the ERP is sin(t). The Hilbert transform of sin(t) is cos(t), the real part of which doesn't match sin(t).
I think I've got the answer. What I thought to be Hilbert transform is actually called "phase-quadrature component". Now all makes sense.
I was confused because according to Wikipedia, a result of Hilbert transform is what you call "phase-quadrature component".
Is there any specific reason to use bandpass filter or will passing the signal through low pass filter work?
Hi Mike, to which book are you referring to in this lecture? Is it your most recent work, "Analyzing Neural Time Series Data: Theory and Practice" (The MIT Press)? I'd like to get a copy. Great work and thanks!
Yes, it's the ANTS book.
Thanks, Mike!
You stated we start with a real valued cosine wave. In a real valued signal you can of course get the power. AS an electrical engineer I do it routinely? The phase is none other that where the wave real value is at that point in time so again the statement you cant get the phase angle from a real valued function is confusing?
For a pure sign wave, you are correct. But for many applications, the raw signal is noisy or has multispectral elements, and the argument of the Hilbert transform helps to better estimate the phase.
Hi Mike
thank you so much for your explanations. I am a civil engineer and had a really hard time understanding these concepts.
I have a question about Hilbert transform. in Fourier transform, we obtain magnitude and phase in frequency domain, and horizontal axis is frequency, so we can understand that how much energy is present in each frequency.
but here you obtained magnitude and phase in time domain. I have watched your other videos about band pass filtering data before using Hilbert transform too. but I still don't understand that why magnitude and phase are shown in time domain. Isn't Hilbert transform a method for spectral analysis?
how can we reach information in frequency domain, because I can't interpret magnitude plot in time domain.
thank you so much
Hi Farzan. The Hilbert transform involves three steps (1) FFT, (2) double the positive frequencies and zero the negative frequencies, (3) IFFT. From that third step, you get back to the time domain. So when the signal is narrowband, then the Hilbert transform gives a complex analytic signal, from which instantaneous (time-varying) magnitude/phase can be extracted.
@@mikexcohen1 Now I think I understand what's going on.
So if we want to obtain information about frequency content let's say from 0 to 10 hz with 0.1 hz frequency resolution, I should make FIR filters with different bands like 0.1 hz, 0.2 hz, 0.3 hz, ..., 9.8 hz, 9.9 hz, 10 hz ; and dot product it with the signal to obtain a three dimensional time-frequency-power plot like what you said in wavelet lecture, right?
And if it's correct, is there any matlab code for it?
Sorry for my long question
See this video: ruclips.net/video/jy7IxIXUAJk/видео.html&ab_channel=MikeXCohen
Hello Mike,
I call you Mike, because I know you hate formalities. First of all, thank you for making your courses accessible to everyone, they are very helpful to me, I am a doctoral student and I have learned more from you than I did at my university.
I wanted to apply myself to EEG signal processing, and I wanted to use the data you use but I can't find where to download it. Is there a link from where we could take EEG data?
Thank you.
Thank you, Yacine. It's not so much that I hate formalities, but names like "Dr. Cohen" or "prof Cohen" make me feel old, which is generally the opposite of how I like to feel :D.
The link to the data file is in the comments (...sampleEEGdata.mat).
why do we need more transformations than Laplace's ? Laplace scans for sinusoids (like Fourier) and exponentials in a signal, why do we need strange transformations like the wavelet one ?
ruclips.net/video/jnxqHcObNK4/видео.html&ab_channel=ArtemKirsanov
Hi Mike, I've spent dozens of hours watching your videos and they have helped greatly. In my research, I'm interested in measuring the instantaneous frequency of heart rate modulation, and how this frequency changes during a half hour meditation. I thought the Hilbert transform might be the tool I need, but after I've digested your stuff, I've realized that the Hilbert transform won't do the job. The Hilbert gives a instantaneous phase and amplitude, but it is not a useful tool for finding an instantaneous frequency. Is that fair to say? The Hilbert transform is applicable when you already know the frequency you are interested in. In my case, the whole point is to find that frequency as a function of time.
Perhaps this video will help: ruclips.net/video/fqkLgJ0Czoc/видео.html&ab_channel=MikeXCohen
I couldn't see the code into the files to download
Good evening Mike :) Best wishes from Poland. I wanted to ask if you prefer macOS or WIndows for performing analyses on EEG data in Matlab / Python. Second question - is EEG data analysis with matlab / python performable on ios / android devices (how real is possibility to launch it on them)?
Hi Marcin. I don't think the desktop OS really matters. MATLAB is the best programming language/environment for EEG analysis. My personal OS preferences are linux > windows > mac.
As for doing analyses on the phone, sure, a smartphone is definitely powerful enough. The question is how interactive you can be with the data. I guess there are already EEG analysis apps out there (e.g., for BCI or neurofeedback apps), but I don't use them.
what does ERP stand for? genuinely confused but great vid
"Event-related potential." It is the average of repeated electrical brain responses to a stimulus. My apologies for the neuroscience-specific terminology, but this videos is part of a neuroscience data analysis lecture series :P There is an earlier video where I define these terms, probably one of the intro videos. But of course the Hilbert transform works the same for any kind of signal.
How to forecast stock market using this method ? I there any online software to execute this algo ? As I dont understand these mathematics concepts but in desperate need to apply the same on stocks ... could you please help me to understand the same ... many thanks
Hi Gurpreet. If I knew how to predict the stock market, then, well, I'd be a very wealthy person. It's pretty much impossible to do, and I don't think the Hilbert transform will help you with that ;)
But I'll give you some financial advice: Don't try to predict stock prices. You are more likely to lose. The best thing is to invest in low-cost index-tracking funds. They follow the market, growing slow but steady. It's the safest and best way to invest (although it's for long-term, not short-term).
Mike
lool :) usually i don't comment, but Hilbert is not the proper way to predict stock data. To do it properly, you need much sophisticated statistical methods, such as Monte-Carlo model or others. There is one easy method for predicting values that i know, only and only in a very special case, which is the Eliotte Wave method. if the stock starts an Eliotte wave, you can predict future values with 90% precision only till the wave ends.
@Mike: Thanks Mike for your nice Video, i can point my students to your channel for extra topics.
Mike X Cohen Thanks for your reply.
Sherif Omran Thanks for your reply
@@mikexcohen1 lol, nice answer
Hi Mike, thank you so much for these great lectures. These are exactly what I want.
## I have a question about Hilbert Transform: By using complex morlet wavelet, we can extract the time series with a specified frequency range (i.e. centered at 6.5).
I am a little bit confused about the plots in this lecture, where is the frequency information in these pictures? What is the meaning of abs(hilbert(erp))? which frequency does it reflect?
Hi go. To get frequency information from a signal after applying the Hilbert transform, you would need to narrowband filter the signal first. I talk about that at the end of the video. The Hilbert transform (particularly the phase) of a broadband signal is difficult to interpret, because it reflects whatever frequency has the highest energy at each time point. So I don't think abs(hilbert(erp)) is really interpretable. I meant it in the video more as an illustration than as a practical tool (for the ERP). I hope that wasn't too confusing!
Mike
@@mikexcohen1 Thank you so much for your reply. I have watched your next lecture, you filtered the data first, then calculated the signal's power by Hilbert Transform. So, after narrowing the frequency band, we can say the power or phase is a reflection of that band, right?
I still have a question. How narrow of the frequency band should be?
For your first question, yes, the power and phase time series as estimates of instantaneous features of the signal at that frequency.
Your second question is a good one, but there is no easy answer. If the filter is too narrow, then you'll remove all the dynamics (non-stationarities), but are usually the parts of the signal you are interested in. But if the filter is too wide, then you'll lose specificity. It also depends on the nature of the signal and the center frequency of the filter. All that said, bandwidths of around 2-5 Hz should be appropriate in many cases.
@@mikexcohen1 Hi Mike, I have a follow-up question to go's question: After you bandpass filtered the signal, say, around 30-35 Hz, what do the Hilbert transform power and phase reflect? Do they reflect the mean power and mean phase of the signal at 30-35 Hz at each time point, or they reflect whatever frequency has the highest energy?
Thank you for the video!
for those who like to see the Hilbert transform used in SSB communications:
ruclips.net/video/IuQPZKQ3cBM/видео.html
these equations run our modern communication systems!!
Thanks! Always interesting to see how important and ubiquitous these methods are.
great video
My only question is why do I have to know this in a data science program
It depends on the kind of data you will be working with. The Hilbert transform is used a lot in signal processing and time series analysis. If you're not working with those kinds of data, then I don't think you would need to know about it. This video is part of a course on signal processing.
thank you very much kind sir
Not bad, thanks.
A
ty )
euler is pronounced as _oi-ler_ not _you-ler_