70 likes | 251 Views
Medical Instrumentation 학습노트 8. 생체의공학과 2010103805 이규락. 디지털 신호처리. 심전도 출력과 QRS 검출. DSP. +-. Micro processor. ADC. Amp. C language. firmware. Output. QRS Detection. 적분. 제곱 ( 전파정류 ). 미분. Band pass Filtering. Band pass filtering (LPF-> H PF) 미분 제곱 Moving window integration
E N D
Medical Instrumentation학습노트8 생체의공학과 2010103805 이규락
디지털 신호처리 • 심전도 출력과 QRS검출 DSP +- Micro processor ADC Amp C language firmware Output
QRS Detection 적분 제곱 (전파정류) 미분 Band pass Filtering • Band pass filtering (LPF->HPF) • 미분 • 제곱 • Moving window integration • Thresholding
Digital Filter X[n-1] Raw Data x[n] t nTs (n-1)Ts Sampling x[n] x(t) H(z) xi[n] y[n]
QRS Detection • FIR Filter • IIR Filter • Z transform • Difference Equation
QRS Detection • Digital filter coding • C language function intMyfirstDF(int d) { static int x1,x2,y1,y2; int y; y=d+(x1<<1)+x2+(y1>>2)-[(y2+y2+y2)>>>3]; x2=x1; x1=d; y2=y1; y1=d; return y; } //함수가 끝나도 남아 있어야 하므로 static으로 선언 //real time이므로 다음 콜에는 1만큼 밀려있어야 한다.
QRS Detection • LPF int QRS_LPF(int d) { static int y1=0, y2=0, x[26], n=12; int y; x[n]=x[n+13]=d; y=x[n]-(x[n+6]<<1)+x[n+12]+(y1<<1)-y2; y2=y1; y1=y; if(--n<0) n=12; return y; } ‘Ring Buffer’ Arr[13] Arr[25] Arr[0] Arr[12] Arr[12],Arr[25]가 최신 데이터면 Arr[11], Arr[24]가 가장 오래된 데이터이다.