A series of electrocardiogram (ECG) artefact identification algorithms for the Zephyr BioHarness 3.
Written as part of a deliverable to the Commodity12 project by James Mardell <james@keot.co.uk> on behalf of Imperial College London.
A Java project for developing and testing the artefact identification algorithms before implementing them on the Commodity12 SmartHub.
ECGLowSNR.m
ecg-mains.csv
ecg-mains-ECGMainsInterference.csv
ECGMainsInterference.m
ecg-normal.csv
ecg-saturated.csv
ecg-saturated-ECGLowSaturation.csv
ecg-saturated-ECGSaturation.csv
ECGSaturation.m
BioHarness_caller.m
breathing.m
data_rate_calc.m
ecg_loader.m
ecg_loader_v02.m
heart_in_resp.m
load_accelerometer.m
load_bioharness.m
driftButterworth.m
driftMeanMedian.m
driftMedian.m
lowSnrStaticThreshold.m
mainsArraySlicing.m
mainsIirNotch.m
saturationStaticThreshold.m
derivsecgsyn.m # Required by ecgsyn.m
ecgsyn.m # ECGSYN[1] is a realistic ECG waveform generator, and is used to produce the artificial signals for comparative analysis throughout the profiling
filterProfiling.m # An example profiling script using MATLAB DCS
filterProfilingStarter.m # An example wrapper for the profiling script
noiseProfiling.m # The noise profiling script returns the results for the seven SQIs (Signal Quality Indicies) for all combinations of noise and heart rate
qrsDetector.m # A helper script to load two beat-detection scripts: OSEA (a.k.a. Epilimited) and WQRS
saveResults.m # Dumps the contents of an SQI result structure to a file
sqi.m # The Signal Quality Indicies calculator
The beat-detection algorithms require WQRS installed, and OSEAWRAPPER to function correctly.
Peforms seven Signal Quality Indicies (SQIs) to determine the quality of the ECG signal. Some of these indices may require normalisation.
- iSQI: Calculates the percentage of beats detected on each lead that were deteted on all leads
- bSQI: Calculates the percentage of beats detected by 'wqrs' that were also detected by 'eplimited' (a.k.a 'osea')
- pSQI: Calculates the relative power in the QRS complex
- sSQI: Calculates the third moment (skewness) of the distribution
- kSQI: Calculates the fourth moment (kurtosis) of the distribution
- fSQI: Calculates the percentage of the signal which appeared to be a flat line
- basSQI: Calculates the relative power in the baseline
bioharness_grabber.py # Using the zephyr-bt library, this outputs the ECG signal to stdout
bioharness_grabber.sh # A wrapper for the python code
d3.js # D3.JS is a very good JavaScript charting engine
render_bioharness.html # A static HTML file containing the Zephyr BioHarness grapher
Render the ECG signal from the Zephyr BioHarness on a tablet with ease. Run the bioharness_grabber.sh
script[2] through websocketd
[3], to open a port for the client's browser to connect. By default this chart displays the most recent four seconds of data.
[1]: McSharry P. E., Clifford G. D., Tarassenko, L. and Smith, L. "A Dynamical Model for Generating Synthetic Electrocardiogram Signals". In IEEE Transactions on Biomedical Engineering 50(3): 289--294; March 2003. [2]: zephyr-bt: https://github.com/jpaalasm/zephyr-bt [3]: websocketd: https://github.com/joewalnes/websocketd