当前位置:首页 > 生物医学信号处理第一次上机
第一次上机
1, Signal obtain and input: EEG in eyes close and open (eegclose.mat and eegopen.mat). Fs=250 Hz
Question 1, how long, and how many channels were used when we recorded these two data, respectively?
load('E:\\1111\\lab 1\\eegclose.mat'); load('E:\\1111\\lab 1\\eegopen.mat'); my_close=U(:,11); my_open=U(:,22); fs=250;
close_length=length(my_close)/fs open_length=length(my_open)/fs
Myclose=U(:,11),绘图得到eeclose长度为4500,采样率为:250hz, open_length=30 Myopen=U(:,22) 绘图得到eeopen长度为4500,采样率为:250hz, close_length=30 2, Pick up one channel signal from both data to analyze.
max(my_open) = 46.1769 max(my_close) = 46.1769 min(my_open)= 46.1769 min(my_close)= 46.1769
Question 2, state the max. and min. of both time courses. In your lab report, include a picture of both signals. Units are ms and uV.
3, Design two filters to get 4-8 Hz and 8-12 Hz signals. You can use FIR or IIR filters to finish this request. (if you have trouble in this step, see cue 1)
3.1, fs=250; Rp=1;Rs=50;
Wp=[2*4/fs 2*8/fs];Ws=[2*2/fs 2*10/fs]; [N, Wn] = ellipord(Wp, Ws, Rp, Rs); [B,A] = ellip(N,Rp,Rs,Wn); freqz(B,A)
0Magnitude (dB)-50-100-150-20000.10.20.30.40.50.60.70.8Normalized Frequency (?? rad/sample)0.91500Phase (degrees)0-50000.10.20.30.40.50.60.70.8Normalized Frequency (?? rad/sample)0.91fs=250; Rp=1;Rs=50;
Wp=[2*8/fs 2*12/fs];Ws=[2*6/fs 2*14/fs]; [N, Wn] = ellipord(Wp, Ws, Rp, Rs); [D,C] = ellip(N,Rp,Rs,Wn); freqz(D,C)
100Magnitude (dB)0-100-200-30000.10.20.30.40.50.60.70.8Normalized Frequency (?? rad/sample)0.91500Phase (degrees)0-50000.10.20.30.40.50.60.70.8Normalized Frequency (?? rad/sample)0.91
Question 3, state the features of your filters. In your lab report, include two pictures of both filters’ frequency response.
? 4, Filter the raw signal to obtain two new signals by both methods. (filter.m and
filtfilt.m)
load my_open
y=filter(B,A,my_open); plot(my_open); hold on plot(y,'y')
6040200-20-40-60010002000300040005000600070008000y=filter(B,A,my_close); plot(my_close); hold on plot(y,'y')
title(' filter my_ close’)
共分享92篇相关文档