Presentation is loading. Please wait.

Presentation is loading. Please wait.

Medical Instrumentation

Similar presentations


Presentation on theme: "Medical Instrumentation"β€” Presentation transcript:

1 Medical Instrumentation
μƒμ²΄μ˜κ³΅ν•™κ³Ό κΉ€νƒœμ‚°

2 QRS Detector Digital filter BPF ECG Signal LPF HPF 𝑑 𝑑𝑑 ( ) 2 𝑑𝑑
( ) 2 𝑑𝑑 thresholding decision Digital filter BPF

3 Low pass filter Low passν•„ν„°μ˜ μ „λ‹¬ν•¨μˆ˜κ°€ 이와 같이 κ²°μ • λ˜μ—ˆμ„ λ•Œ, λ―ΈλΆ„ 방정식을 κ΅¬ν•˜λ©΄
Int QRS_LPF(int x) { static int y1=0, y2=0, x[26], p=12; //p λŠ” λ°°μ—΄μ—μ„œ ν˜„μž¬μ˜n값을 μ§€μΉ­ν•œλ‹€.// 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둜 λ‚˜λˆˆλ‹€.// }

4 High pass filter High passν•„ν„°μ˜ λ―ΈλΆ„ 방정식이 이와 같이 κ²°μ • λ˜μ—ˆμ„ λ•Œ,
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)); }

5 μœ„μ™€ 같이 λ³€μˆ˜ μ—…λ°μ΄νŠΈ μ‹€μˆ˜λ₯Ό ν•˜κΈ° μ‰¬μš°λ‹ˆ 주의 ν•˜μ—¬μ•Ό ν•œλ‹€.
λ―ΈλΆ„ 미뢄은 두 κ°€μ§€μ˜ λ°©λ²•μœΌλ‘œ ν‘œν˜„ ν•  수 μžˆλ‹€. 으둜 으둜 Two point derivation이닀. Int QRS_derivative(int x) { static int x1=0; int y =0; y= x –x1; x1= x; return(y); } 으둜 Int QRS_derivative(int x) { static x1, x2. x3, x4; int y; y = [(x<<1)+x1-x3-(x4<<1)]>>3; x4=x3; x3=x2; x2=x1; x1=x; return(y); } x2=x1; x1=x2; x3=x2; or x2=x3; x4=x3; x3=x4; μœ„μ™€ 같이 λ³€μˆ˜ μ—…λ°μ΄νŠΈ μ‹€μˆ˜λ₯Ό ν•˜κΈ° μ‰¬μš°λ‹ˆ 주의 ν•˜μ—¬μ•Ό ν•œλ‹€.

6 제곱 (μ–‘μˆ˜ν™”) κ°’ λΉ„μ‹Ό processorμ—μ„œλŠ” κ³±ν•˜κΈ°μ˜ 처리 속도가 λΉ λ₯΄λ‚˜
λ³΄ν†΅μ˜ processorλŠ” 5msμ΄μƒμ˜ μ‹œκ°„μ΄ κ±Έλ¦¬λ―€λ‘œ μ œκ³±μ„ μ‚¬μš© ν•  μ‹œ real time으둜 정보λ₯Ό μ œκ³΅ν•  수 μ—†κ²Œ λœλ‹€. Int QRS_squre(int x) { return( π‘₯ 2 ) } Int QRS_ADS(int x) { if(x<0) return(-x); else return(x); } μ ˆλŒ€κ°’μ„ μ·¨ν•¨μœΌλ‘œμ¨ μ–‘μˆ˜ν™”μ˜ 효과λ₯Ό λ³Ό 수 μžˆλ‹€.

7 Moving window integral
Int QRS_moving_window_integral(int x) { static int x[32], p=0; static long sum=0; long ly; // sum값이 intλ²”μœ„λ₯Ό μ΄ˆκ³Όν•  수 μžˆμœΌλ―€λ‘œ// int y; if(++p=32)p=0; sum - =x[p]; // κ°€μž₯ 였래된 값을 λΉΌλŠ” κ³Όμ •// sum + =x; //μƒˆλ‘œμš΄ 값을 λ”ν•˜λŠ” κ³Όμ •// x[p]=x; ly=(sum>>5); if(ly>32400) y= 32400; else y=(int)ly; return (y); } μƒ˜ν”Œλ§ freq. 200Hz은 μƒ˜ν”Œλ§ 간격 5ms μ΄λ―€λ‘œ 2의 배수둜 μ •ν•œλ‹€. 즉, 16개 -> 80ms 32개 -> 160ms 으둜 κ΅¬ν•΄μ§€λŠ”λ° QRS폭 의 평균은 100msμ΄λ―€λ‘œ 32개의 windowκ°€ μ λ‹Ήν•˜λ‹€.

8 μ£Όμ˜μ‚¬ν•­. d1=GetDatach1(); d2=GetDatach2(); d1=GetDatach1();
l1=myLPF1(d1); l2=myLPF2(d2); Int myLPF1(int x) { static int x1,x2; x2=x1; x1=x; return(y); } Int myLPF2(int x) d1=GetDatach1(); d2=GetDatach2(); l1=myLPF(d1); l2=myLPF(d2); Int myLPF(int x) { static int x1,x2; x2=x1; x1=x; return(y); } 이와 같이 같은 ν•„ν„°λ₯Ό μ“°κ²Œ λ˜λ”λΌλ„ λ”°λ‘œ ν•¨μˆ˜λ₯Ό μƒμ„±ν•˜μ—¬ 각각의 dataλ₯Ό 집어넣어야 ν•œλ‹€. 이와 같이 ν–ˆμ„ λ•Œ, Static λ³€μˆ˜ 값이 l1 일 λ•Œμ™€ l2일 λ•Œ 의 λ³€μˆ˜κ°€ μ„œλ‘œ μ„žμ΄κ²Œ λœλ‹€. 즉. 이와 같이 μ½”λ“œλ₯Ό 짜면 μ•ˆ λœλ‹€.


Download ppt "Medical Instrumentation"

Similar presentations


Ads by Google