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