Download presentation
Presentation is loading. Please wait.
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์ผ ๋ ์ ๋ณ์๊ฐ ์๋ก ์์ด๊ฒ ๋๋ค. ์ฆ. ์ด์ ๊ฐ์ด ์ฝ๋๋ฅผ ์ง๋ฉด ์ ๋๋ค.
Similar presentations
ยฉ 2025 slidesplayer.org Inc.
All rights reserved.