A step-by-step technical guide for configuring MATLAB to model cardiovascular dynamics, including file organization, script execution for hemodynamic analysis, and data visualization of pressure-volume relationships.
Question 1 (10 pts). A lumped parameter mechanics model of the cardiac left ventricle coupled to the systemic circulation is shown below. The various elements of the circulation are represented using electric circuit analogues. Explain which circuit features represent each below and why:
Volumetric flow rate
Valves
Vessel compliance
Pressure
Ventricular Volume
Question 2 (40 pts). The following set of ODEs modified from McSharry et al. reproduce a synthetic electrocardiogram (ECG) waveform in variable z:
Where α=1-√(x^2+y^2 ), ω=2π rad s-1, z0 = 0, and θ=atan2(y,x).
Remaining model parameters are given below. Given the initial values, x(0) = −1, y(0) = 0, z(0) = 0, numerically solve this ECG model in MATLAB from t = 0 to 1s, plotting z against t, where z,t are in units of mV and s respectively.
Question 3 (50 pts). Last night, the ER had a spate of emergency cases, and in the ensuing chaos, the ECG results were not correctly marked. As the head of the hospital Bioengineering Dept, you are asked to look through four samples and create a program that can assess whether they belong to a patient with normal sinus rhythm, ventricular flutter/fibrillation, atrial fibrillation, or a patient that was moving around during the measurement (hint: causing a motion artifact in the reading).
What do you expect to see in each of the four cases mentioned above?
Import the csv files into MATLAB and create tables with each. Evaluate for peak voltage and heart rate. What guesses can you make?
Calculate the R-R interval using the findpeaks() function. What guesses can you make?
Use the fft() function to perform a Fast Fourier Transform and evaluate the frequency spectrum of each sample. What guesses can you make?
Create a program that analyzes each individual sample, uses the above methods to characterize it, and prints out text indicating whether that sample is a normal sinus rhythm, atrial fibrillation, ventricular flutter/fibrillation, or a noisy ECG with motion artifact.