OBJECTIVE :
- Program code for RMS value for Red and Infrared LED
- Program code for ratio, R
- Program code for SPO2 from 3rd order fit polynomial.
- Program code for Simple Moving Average (SMA) filtering on Heartbeat signal
- Program code for Simple Moving Average (SMA) filtering on SPO2 signal
PROCEDURE :
//Calculate the RMS values of the AC for both RED and IR sources
Rrms = sqrtf(RSum/(float)(SampleCounter-1));
IRrms = sqrtf(IRSum/(float)(SampleCounter-1));- Ratio, Rx is to be insert to SpO2 calculation
//Calculate the Ratio R = (Rrms/Rdc) / (IRrms/IRdc)
Rx = (Rrms/R_DC)/(IRrms/IR_DC);- The constant value in the calculation takes from 3rd order fit polynomial
//Calculate the SPO2 from 3rd order fit polynomial
SPO2 = ((10.002*Rx - 52.887)*Rx + 26.817)*Rx +
98.293; - The simple moving average filter purpose is to smooth the signal for heart beat
//Perform Simple Moving Average (SMA) filtering on Heartbeat
signal
SMA = SMAM1 + (float)(X[Beats] - X[SMAindex])/(MEDIAN_SIZE-1);
SMAM1 = SMA; - Signal for SpO2 also implement simple moving average filter
//Perform Simple Moving Average (SMA) filtering on SPO2
signal
SPO2ave = SPO2aveM1 + (float)(SP2[Beats] - SP2[SMAindex])/(MEDIAN_SIZE-1);
SPO2aveM1 = SPO2ave;
CONCLUSION
- All calculation regarding formula is ready to implement. next step will be the integration with the main program
No comments:
Post a Comment