필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
alaisya
alaisya 2016년 11월 11일
댓글: Star Strider 2016년 11월 13일
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
alaisya
alaisya 2016년 11월 13일
i'm using matlab r2008a.. is it suitable to used
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