{"id":20247323,"url":"https://github.com/alvgaona/automatic-qrs-detection","last_synced_at":"2026-04-19T17:04:28.843Z","repository":{"id":128890512,"uuid":"243640468","full_name":"alvgaona/automatic-qrs-detection","owner":"alvgaona","description":"A project from Signal and Systems at FIUBA University in 2014","archived":false,"fork":false,"pushed_at":"2020-03-03T23:52:05.000Z","size":3738,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T02:14:29.106Z","etag":null,"topics":["filtering","frequency-analysis","frequency-characteristics","qrs-complex","signal-processing"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alvgaona.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-27T23:50:52.000Z","updated_at":"2023-05-15T08:37:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"df6f765c-b90b-417c-b034-927218ba268c","html_url":"https://github.com/alvgaona/automatic-qrs-detection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvgaona%2Fautomatic-qrs-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvgaona%2Fautomatic-qrs-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvgaona%2Fautomatic-qrs-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvgaona%2Fautomatic-qrs-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvgaona","download_url":"https://codeload.github.com/alvgaona/automatic-qrs-detection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241693230,"owners_count":20004372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filtering","frequency-analysis","frequency-characteristics","qrs-complex","signal-processing"],"created_at":"2024-11-14T09:36:51.700Z","updated_at":"2026-04-19T17:04:28.794Z","avatar_url":"https://github.com/alvgaona.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automatic QRS Complex Detection\n\nThis project aims to apply signal processing techniques and tools to peform an analysis and automatic QRS complex detection on large duration ECG signals.\n\n## Techniques\n\n- Fast Fourier Transform\n- Digital filters design\n- Time-frequency analysis (i. e. Poles and zeros, Bode Diagram, Group Delay)\n\n# Introduction\n\nAn ECG signal has intervals between different events which are called **segments**.\nEach segment corresponds to the four different states the heart has when pumping blood.\nMoreover, the signal has a few events called waves which are described next.\n\n- **P wave**: Represents the depolarization of the atrium. Its duration is less than 100ms and its voltage\ndoes not exceed 2.5 mV.\n\n- **PR segment**: Shows the period of electrical inactivity corresponding to the physiological delay that\nsuffers the stimulus in the atrioventricular node. Its duration must be between 120 ms\nand 200 ms.\n\n- **QRS complex**: Represents the depolarization of the ventricles. It is formed by the Q waves,\nR and S. This portion of the signal is the largest of the entire normal ECG. Its duration is of\n80 to 100ms.\n\n- **ST segment**: Comprised from the end of the QRS complex to the beginning of the T wave.\n\n- **T wave**: Represents the repolarization of the ventricles.\n\n- **QT segment**: Comprised from the beginning of the QRS complex to the end of the T wave and represents\ndepolarization and ventricular repolarization. Its duration will be between 320 and 400ms.\n\n# Rubric\n\n1. **Manual QRS complex detection**\n\nManually locate the QRS complexes and determine the segments that make up the wave.\n\n2. **QRS Frequency characteristics**\n\nShow the frequency characteristics of the QRS complex.\n\n3. **ECG Spectrogram**\n\nPerform an spectrogram of the electrocardiogram signal that allows visualizing the QRS wave frequency characteristics.\nImplement the spectrogram to observe the frequency characteristics described in the previous point.\n\n4. **ECG Noise**\n\nDetermine what type of noise is present in the ECG signal.\nFirst, describe the stationary noises you find, using both time and frequency plots.\nThen determine which portions of the ECG signal have added non-stationary noises. \nExplain possible sources for each noise.\n\n5. **Low-pass Filter**\n\nObtain the pole diagram analytically and using MATLAB functions\nand zeros, the frequency response and the impulse response of the low-pass filter proposed.\nCalculate the delay produced by the filter.\nAnalyze causality, stability and the effect produced on the ECG signal.\n\n![LPF](images/low-pass.png)\n\n6. **High-pass Filter**\n\nObtain the pole diagram analytically and using MATLAB functions\nand zeros, the frequency response and the impulse response of the high-pass filter proposed.\nCalculate the delay produced by the filter.\nAnalyze causality, stability and the effect produced on the output signal from the previous stage.\nAlso obtain the difference equation that characterizes the filter.\n\n![HPF](images/high-pass.png)\n\n7. **FIR Filters**\n\nObtain FIR versions of the previous filters.\nDiscuss advantages and disadvantages\nof both implementations.\nThe filters analyzed above are FIR filters even though their difference equation is recursive.\nThis is done in such a way as to represent a FIR filter with an IIR shape.\nPlus specifically, these filters are called __FIR filters implemented as Tail-Canceling IIR filters__. \n\n8. **ECG derivative**\n\nObtain a discrete time LTI system and causal filter that allows you to approximate the derived from the ECG signal.\nJustify for which frequencies this approach is valid based\nin the frequency response of the system obtained.\nCalculate the delay produced by the filter and obtain the derivative of the output signal from the previous stage.\n\n9. **Squared Output**\n\nObtain the square of the output signal of the differentiation stage and show the effect produced in time and frequency.\n\n10. **Integrator System Frequency Response**\n\nObtain the frequency response of the integrator system and analyze the delay generated By himself.\nAdjust the value of N in order to highlight the temporal position of the complexes QRS.\n\n11. **Automatic Detection**\n\nImplement an automatic detection algorithm of QRS complexes\nusing the output signal of the preprocessing stage.\nYou can use the first minute of the signal to adjust the parameters of said algorithm.\n\n12. **Gold Standard**\n\nUse the Gold Standard algorithm, whose implementation is in the file\n`qrs.m` detection, to perform automatic detection of QRS complexes from the signal output of the preprocessing stage.\nEvaluate performance by counting the number of false positive and false negative.\nA false positive is a brand that does not correspond to a complex\nQRS This can also be taken as the erroneous insertion of a QRS complex brand. \nA false negative is not marking a QRS complex.\nUse as a tolerance for the calculation of the error of\nlocation the approximate width of the QRS complexes.\n\n13. **Signal-to-noise Ratio**\n\nAdd white noise to the ECG signal to obtain signals with a signal relationship\nat noise of `30 dB`, `20 dB` and `10 dB`, respectively.\nEvaluate detector performance with these new signs.\nThe signal to noise ratio can be obtained as:\n\n![SNR](images/SNR.png)\n\n14. **Resampling**\n\nPerform all previous processing but with resampled signals at 360 Hz\ninstead of 200 Hz.\nDescribe the discrete processing required to change the frequency of\nsampling and determine the new form of the all the previous filters.\nThey meet the same processing requirements as in the case of the sampling frequency original.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvgaona%2Fautomatic-qrs-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvgaona%2Fautomatic-qrs-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvgaona%2Fautomatic-qrs-detection/lists"}