1 / 8

Medical Instrumentation 학습노트 9

Medical Instrumentation 학습노트 9. 생체의공학과 2010103805 이규락. QRS Detection. ECG Signal. Band pass Filtering. 미분. Thresholding. 제곱 ( 전파정류 ). 적분. QRS Detection. 1) L PF. Int QRS_LPF( int x) { static int y1=0, y2=0, x[26], p=12; int y; x[p]=x[p+13]=x;

gene
Télécharger la présentation

Medical Instrumentation 학습노트 9

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Medical Instrumentation학습노트9 생체의공학과 2010103805 이규락

  2. QRS Detection ECG Signal Band pass Filtering 미분 Thresholding 제곱 (전파정류) 적분

  3. QRS Detection 1) LPF Int QRS_LPF(int x) { static int y1=0, y2=0, x[26], p=12; int y; x[p]=x[p+13]=x; y=x[p]-(x[p+6]<<1)+x[p+12]+(y1<<1)-y2; y2=y1; y1=y; if(--p<0) p=12; return (y>>5); } LPF필터의 이득(32배)을 없애주기 위해 나눠준다. ‘Ring Buffer’ Arr[13] Arr[25] Arr[0] Arr[12] Arr[12],Arr[25]가 최신 데이터면 Arr[11], Arr[24]가 가장 오래된 데이터이다.

  4. QRS Detection 2) HPF LPF Int QRS_HPF(int x) { static int l1=0, x[66], p=32; int l; x[p]=x[p+33]=x; l=l1+x[p]-x[p+32]; l1=l; if(--p<0) p=32; return (x[p+16]-(l>>5)); } Delay가 15.5 sample 정도 생겨서 16만큼 당겨준다.

  5. QRS Detection 3) 미분 Int QRS_Denivative(int x) { static int x1=0; int y; y=x-x1; x1=x; return (y); } Int QRS_Denivative(int x) { static int x1, x2, x3, x4; int y; y=((x<<1)+x1-x3-(x4<<1))>>3; x4=x3; x3=x2; x2=x1; x1=x; return (y); } 현재와 바로 전의 차만 구함. 시간적 경향을 볼 수 있다.

  6. QRS Detection 4) Square(제곱) IntQRS_Square(int x) {return (x*x); } 곱셈이 얼마나 걸리는지 datasheet를 참조하여 전체가 Realtime이 되는지를 확인해줘야 한다. 4) 절대값 IntQRS_Abs(int x) { if(x<0) return (-x); else return (x); } 곱셈이 없으므로 속도가 빠르다.

  7. QRS Detection 5) 적분 IntQRS_MWI(int x) { static int x[32], p=0; static long sum; long ly; int y; if(++p=32) p=0; sum-=x[p]; sum+=x; x[p]=x; ly=(xum>>5); if(ly>32400) y=32400; else y=(int) ly; return (y); } Moving window integral =>최근 들어온 n개의 data를 더한다. QRS의 폭을 고려하여 Window폭을 설정해야 한다. Return type이 int형이므로 int의 범위가 넘었는지 파악해준다.

  8. QRS Detection • 주의할 점 d1=Getdatach1(); d2=Getdatach2(); -------------------------------------------------- int MyLPF1(int x) { static int x1,x2,x3,x4; x4=x3; x3=x2; x2=x1, x1=x; return y; } intMyLPF2(intx) { static int x1,x2,x3,x4; x4=x3; x3=x2; x2=x1, x1=x; return y; } --------------------------------------------------- l1=MyLPF1(d1); l2=MyLPF2(d2); d1=Getdatach1(); d2=Getdatach2(); -------------------------------------------------- intMyLPF(int x) { static int x1,x2,x3,x4; ∙∙∙ x4=x3; x3=x2; x2=x1, x1=x; ∙∙∙ return y; } --------------------------------------------------- l1=MyLPF(d1); l2=MyLPF(d2); Static변수들을 두 데이터가 공통으로 사용하므로값들이 섞인다.

More Related