hi all, i'm having trouble to get transfer function for these sub-band frequency.

3 次查看(过去 30 天)
Delta = 0 - 4 Hz
theta = 4 - 8 Hz
Alpha =8 - 13 Hz
Beta = 13 - 31 Hz
Gamma= 31 - 51 Hz
High Gamma= 51 - 120 Hz
sampling frquency=1000 Hz
eeg channel from 1-19 channel

回答(1 个)

Star Strider
Star Strider 2016-11-11
EEG filters are extremely difficult to design because of the frequency definitions. They are best filtered with active filters in hardware.
These look reasonable, and are the best I can design:
frq_pb = [2.1 4; 4 8; 8 13; 13 31; 31 51; 51 120]; % Passband Matrix
frq_sb = [frq_pb(:,1)-2 frq_pb(:,2)+2]; % Stopband Matrix
Fs = 1000; % Sampling Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency (Hz)
Rp = 30; % Passband Ripple (dB)
Rs = 10; % Stopband Ripple (dB)
for k1 = 1:size(frq_pb,1)
[n,Ws] = cheb2ord(frq_pb(k1,:)/Fn, frq_sb(k1,:)/Fn, Rp, Rs); % Chebyshev Type II Filter Order
n = max(k1+1, real(n));
[b,a] = cheby2(n, Rs, Ws); % Transfer Function Polynomial Coefficients
[SOS{k1}, G{k1}] = tf2sos(b,a); % Second-Order-Section For Stability
end
for k1 = 1:size(frq_pb,1) % Plot Filter Passbands
figure(k1)
freqz(SOS{k1}, 4096, Fs)
set(subplot(2,1,1), 'XLim',[0 150]) % Set X-Axis Limits To Improve Visibility
set(subplot(2,1,2), 'XLim',[0 150])
end
Experiment with them to get the result you want. You can also experiment with using designfilt to see if it can produce a better design. I use a Chebyshev Type II FIR filter here, but other designs and IIR filters may also be appropriate.
  4 个评论
Star Strider
Star Strider 2016-11-13
The functions should be available to you. There are probably version differences in the functions between R2008a and R2016b. Beyond that, I have no idea what the problem could be.
I am attaching the filter coefficient cell arrays here. It contains the ‘SOS’ and ‘G’ values calculated from the code I posted, so they are already documented. You can load them directly into your workspace. (See the documentation on the load function for details.)
Remember to use the filtfilt function with them to filter your signals.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 EEG/MEG/ECoG 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by