===== Electrocardiography (ECG) ===== Goal: //Learn the basics of the ECG signal analysis// ==== Prepare for the lab ==== * Chapter 8 on Cardiovascular Psychophysiology in: John T. Cacioppo, Louis G. Tassinary, Gary G. Berntson - [[https://doi.org/10.1017/CBO9780511546396|Handbook of Psychophysiology]] (Cambridge University Press, 2007). The most important parts: * Anatomy and physiology: Overview, The heart, The cardiac cycle (pp. 182-183; figures on p. 184) * Psychophysiological measures: ECG, Heart rate, Heart rate variability (pp. 193-197) * Note: we are using the 3 channel ECG with RA/LA/LL (right arm/left arm/left leg) electrodes able to catch I/II/III bipolar leads, so there is no need to remember the placement of other electrodes (V1-V6) and leads (aVL, aVR, aVF) * Psychophysiological context (pp. 204-205) * [[wp>Pan–Tompkins_algorithm|Pan–Tompkins algorithm]] (the most common algorithm for QRS complex detection) ==== Materials ==== - Q&A Session: - Can you identify the QRS complex in the ECG signal? - In which locations are electrodes placed for 3-channel ECG? - What extremity leads (PL: //odprowadzenia kończynowe//) do we measure with 3-channel ECG? - What is the difference between ECG and PPG? How is PPG measured? - What is the HRV analysis? - What is the Pan-Tompkins algorithm used for? - Measurement time: - The electrode placement for ECG measurement is based on [[wp>Einthoven's_triangle|Einthoven's triangle]], composed of three leads (I, II, III). Measurement of all three at once is possible in a clinical setup with 12 electrodes. We have only 3 electrodes, which allows us to measure one selected lead at a time. But: each lead is based on the same positions of the electrodes - so you just need to stick them once and then rearrange the wires - Electrode placement: * **RA** (right arm) > in the dimple below the sternum; on the "soft piece of flesh" (not on muscles or bones) * **LA** (left arm) > in the same way as RA, but on the left side * **LF** (left foot) > under the last left rib, on the soft part of the body - Follow the [[lab_devices|Devices 101]] lab to connect the biosignalsplux with the PC - Use the {{https://krzysztof.kutt.pl/didactics/psaw/ECG_Datasheet.pdf|ECG Datasheet}} and {{https://krzysztof.kutt.pl/didactics/psaw/ECG_User_Manual.pdf|ECG User Manual}} to properly record the ECG signal - **Tasks:** - Check all three leads (I, II, III) from [[wp>Einthoven's_triangle|Einthoven's triangle]] (for details, see page 7 in {{https://krzysztof.kutt.pl/didactics/psaw/ECG_User_Manual.pdf|ECG User Manual}}) - What happens when the **+** (red) and **-** (black) electrodes are swapped? Check it out! - **At the end of class:** - clean the equipment with disinfectant wipes - throw away the disposable electrodes (or keep them as souvenirs ;-) ) - pack all items in bags - make sure all items are in the case: * biosignalsplux hub * bluetooth dongle * 4 sensors (each has a sticker with the name on it) * reference electrode (single, no stickers) * power supply - give the case to the teacher - Practice session: - Today's lab is placed in one Jupyter Notebook: [[https://colab.research.google.com/drive/1c07j8VSBFe2w-7juXosU62HSGh0gOE-p?usp=sharing|Electrocardiography (ECG)]] - Advanced practice session: - If you want to tackle additional topics, do the optional Advanced section in the notebook. It will give you the opportunity to explore basics of the HRV analysis. ==== Learn more! ==== === ECG === * Chapter 8 on Cardiovascular Psychophysiology in: John T. Cacioppo, Louis G. Tassinary, Gary G. Berntson - [[https://doi.org/10.1017/9781107415782|Handbook of Psychophysiology]] (Cambridge University Press, 2016) -- great handbook if you want to know more about all the physiology behind analysed signals (3rd edition available online via EBSCO) * You can also check Dzedzickis et al. - [[https://doi.org/10.3390/s20030592|Human Emotion Recognition: Review of Sensors and Methods]] (Sensors, 2020) for a short summary of ECG measurement * [[https://ecgpedia.org/|ECGpedia]] (a free electrocardiography tutorial and textbook to which anyone can contribute, designed for medical professionals such as cardiac care nurses and physicians) * You can start here: [[https://en.ecgpedia.org/wiki/Basics|ECG Basics]] * [[https://www.fibricheck.com/fibricheck-beat-to-beat-accuracy-compared-with-wearable-ecg-in-broad-dynamic-range/|FibriCheck Beat-to-Beat Accuracy Compared With Wearable ECG in Broad Dynamic Range]] (ECG and PPG compared) * [[https://www.amazon.com/Facts-Made-Incredibly-Quick-Easy/dp/1605474762|ECG Facts Made Incredibly Quick!]] (provides instant access to information that every nurse needs for safe patient care; you can download it from [[https://www.academia.edu/11326555/ECG_Facts_Made_Incredibly_Quick|Academia.edu]]) === Tools === * [[https://pypi.org/project/hrv-analysis/|hrv-analysis]] (HRV analysis based on R-R intervals) * [[https://python-heart-rate-analysis-toolkit.readthedocs.io/|HeartPy]] (HR analysis for PPG signal; not for ECG) * [[https://neurokit2.readthedocs.io/en/latest/|NeuroKit2]] (toolbox for BVP, ECG, EDA, EEG, EMG, EOG, Respiration; it has a __physiological signal generator__) * [[https://biosppy.readthedocs.io/en/stable/|BioSPPy]] (toolbox for BVP, ECG, EDA, EEG, EMG, Respiration) === biosignalsplux === {{section>lab_devices#biosignalsplux&noheader&nofooter}}