脑电图小波分析

发布于 2024-11-17 06:20:23 字数 838 浏览 0 评论 0原文

我想对脑电图信号进行时频分析。我找到了用于计算小波系数的 GSL 小波函数。如何从该系数中提取实际频带(例如 8 - 12 Hz)? GSL手册说:

对于正向变换,原始数组的元素被离散小波变换替换f_i -> w_{j,k} 在打包三角形存储布局中,其中 J 是级别 j = 0 ... J-1 的索引,并且 < code>K 是每个级别内系数的索引,k = 0 ... (2^j)-1。总级别数为 J = \log_2(n)

输出数据的形式如下:(s_{-1,0}, d_{0,0}, d_{1,0}, d_{1,1}, d_{2,0} , ..., d_{j,k}, ..., d_{J-1,2^{J-1}-1})

如果我理解正确的话,输出数组 data[] 包含在位置1(例如data[1])频带2^0 = 1 Hz的幅度,依此

data[2] = 2^1 Hz  
data[3] = 2^1 Hz  
data[4] = 2^2 Hz  
until  
data[7] = 2^2 Hz  
data[8] = 2^3 Hz

类推...

这意味着我只有以下幅度频率 1 Hz、2 Hz、4 Hz、8 Hz、16 Hz... 我怎样才能获得以 5.3 Hz 振荡的频率分量的幅度?如何获得整个频率范围的幅度,例如8 - 13 Hz 的幅度?有什么建议如何获得良好的时频分布吗?

I want to do a time-frequency analysis of an EEG signal. I found the GSL wavelet function for computing wavelet coefficients. How can I extract actual frequency bands (e.g. 8 - 12 Hz) from that coefficients? The GSL manual says:

For the forward transform, the elements of the original array are replaced by the discrete wavelet transform f_i -> w_{j,k} in a packed triangular storage layout, where J is the index of the level j = 0 ... J-1 and K is the index of the coefficient within each level, k = 0 ... (2^j)-1. The total number of levels is J = \log_2(n).

The output data has the following form, (s_{-1,0}, d_{0,0}, d_{1,0}, d_{1,1}, d_{2,0}, ..., d_{j,k}, ..., d_{J-1,2^{J-1}-1})

If I understand that right an output array data[] contains at position 1 (e.g. data[1]) the amplitude of the frequency band 2^0 = 1 Hz, and

data[2] = 2^1 Hz  
data[3] = 2^1 Hz  
data[4] = 2^2 Hz  
until  
data[7] = 2^2 Hz  
data[8] = 2^3 Hz

and so on ...

That means I have only the amplitudes for the frequencies 1 Hz, 2 Hz, 4 Hz, 8 Hz, 16 Hz, ... How can I get e.g. the amplitude of a frequency component oscillating at 5.3 Hz? How can I get the amplitude of a whole frequency range, e.g. the amplitude of 8 - 13 Hz? Any recommendations how to get a good time-frequency distribution?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

薄荷港 2024-11-24 06:20:23

我不确定您对一般信号处理有多熟悉,所以我会尽力说清楚,但不会为您咀嚼食物。

小波本质上是滤波器组。每个滤波器将给定信号分成两个不重叠的独立高频和低频子带,以便随后可以通过逆变换来重建它。当连续应用此类过滤器时,您会得到一棵过滤器树,其中一个过滤器的输出馈入下一个过滤器。构建这种树的最简单、最直观的方法如下:

  • 将信号分解为低频(近似)和高频(细节)分量
  • 取出低频分量,并对其执行相同的处理
  • 继续下去,直到您'已经处理了所需数量的级别

这样做的原因是,您可以下采样生成的近似信号。例如,如果您的滤波器以采样频率 (Fs) 48000 Hz 分割信号,则产生的最大频率为 24000 Hz 奈奎斯特定理 -- 转化为 0 至 12000 Hz 近似分量并12001 到 24000 Hz 细节分量,然后您可以对近似分量每隔一个采样一次,而无需混叠,本质上是削弱信号。这广泛用于信号和图像压缩

根据此描述,在第一级,您将频率内容从中间分开并创建两个单独的信号。然后你取出低频分量并再次将其从中间分开。现在,您总共获得三个分量:0 到 6000 Hz、6001 到 12000 Hz 和 12001 到 24000 Hz。您会看到两个较新的组件的带宽都是第一个细节组件的一半。您会得到这样的图片:

在此处输入图像描述

这与您上面描述的带宽相关 (2^ 1 Hz2^2 Hz2^3 Hz 等)。然而,使用更广泛的过滤器组定义,我们可以按照自己的喜好排列上述树结构,并且它仍然是一个过滤器组。例如,我们可以同时输入近似和细节分量,将其分成两个高频和低频信号,如下所示

在此处输入图像描述

如果您仔细观察,您会发现高频分量和低频分量都位于其频率的中间,因此您会得到一个统一的滤波器组其频率间隔看起来更像是这样的:

在此处输入图像描述

请注意,所有条带的大小相同。通过构建具有 N 级的统一滤波器组,您最终会得到 2^(N-1) 个带低音滤波器的响应。您可以微调滤波器组,最终获得所需的频段 (8-13 Hz)。

一般来说,我不建议您使用小波来执行此操作。您可以阅读一些有关设计良好带通滤波器的文献,然后简单地构建一个仅允许 8-13 Hz 的 EEG 信号通过的滤波器。这就是我以前做过的,而且对我来说效果很好。

I'm not sure how familiar you are with general signal processing, so I'll try to be clear, but not chew the food for you.

Wavelets are essentially filter banks. Each filter splits a given signal into two non-overlapping independent high frequency and low frequency subbands such that it can then be reconstructed by the means of an inverse transform. When such filters are applied continually, you get a tree of filters with output of one fed into the next. The simplest, and the most intuitive way to build such tree is as follows:

  • Decompose a signal into low frequency (approximation) and high frequency (detail) components
  • Take the low frequency component, and perform the same processing on that
  • Keep going until you've processed the required number of levels

The reason for this is that you can then downsample the resulting approximation signal. For example, if your filter splits a signal with sampling frequency (Fs) 48000 Hz -- which yields maximum frequency of 24000 Hz by Nyquist Theorem -- into 0 to 12000 Hz approximation component and 12001 to 24000 Hz detail component, you can then take every second sample of the approximation component without aliasing, essentially decimating the signal. This is widely used in signal and image compression.

According to this description, at level one you split your frequency content down the middle and create two separate signals. Then you take your lower frequency component and split it down the middle again. You now get three components in total: 0 to 6000 Hz, 6001 to 12000 Hz, and 12001 to 24000 Hz. You see that the two newer components are both half the bandwidth of the first detail component. You get this sort of a picture:

enter image description here

This correlates with the bandwidths you describe above (2^1 Hz, 2^2 Hz, 2^3 Hz and so on). However, using a broader definition of a filter bank, we can arrange the above tree structure as we like, and it will still remain a filter bank. For example, we can feed both approximation and detail component to to split into two high-frequency and low-frequency signals like so

enter image description here

If you look at it carefully, you see that both high and low frequency components down the middle in their frequencies and as a result you get a uniform filter bank whose frequency separation looks more like this:

enter image description here

Notice that all bands are of the same size. By building a uniform filter bank with N levels, you end up with responses of 2^(N-1) band-bass filters. You can fine-tune your filter bank to eventually give you the desired band (8-13 Hz).

In general, I would not advise you to do this with wavelets. You can go through some literature on designing good band-pass filters and simply build a filter that would only let through 8-13 Hz of your EEG signals. That's what I've done before and it worked quite well for me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文