ECE 331 · Introduction to Biomedical Engineering · Virtual Laboratory

Electrocardiography

Explore ECG waveform generation, heart-rate measurement, standard three-lead placement, Einthoven’s law and augmented unipolar limb leads through interactive, self-contained browser experiments.

Third-Year Electrical and Communication EngineeringDepartment of Electrical & Communication EngineeringMasinde Muliro University of Science and Technology

Laboratory objectives

What you will investigate

By the end of this virtual laboratory, you should be able to connect cardiac electrical activity, ECG waveform features and lead mathematics to the signals acquired by a biomedical instrument.

01

Experiment 1

Virtual ECG waveform and heart-rate simulator

  • Relate P, QRS and T waves to atrial and ventricular activity.
  • Change waveform amplitudes and calculate rate from the R–R interval.
  • Observe the effect of noise and calibration settings.
02

Experiment 2

Virtual 3-lead placement and Einthoven’s law

  • Correctly place RA, LA and LL electrodes.
  • Define leads I, II and III as voltage differences.
  • Verify that II = I + III experimentally.
03

Experiment 3

Augmented unipolar lead system: aVR, aVL, aVF

  • Derive augmented leads from the Wilson central terminal.
  • Compare aVR, aVL and aVF polarities with the cardiac vector.
  • Explain the identity aVR + aVL + aVF = 0.
Virtual-instrument note: this laboratory simulates electrode voltages and mathematical relationships. A real patient-connected ECG requires medically approved, isolated equipment and trained supervision.

Background theory

From cardiac activity to limb-lead voltages

ECG waves and rate

The P wave represents atrial depolarisation, the QRS complex represents ventricular depolarisation and the T wave represents ventricular repolarisation. In a regular rhythm, the heart rate is calculated from the R–R interval.

HR (beats/min) = 60 / R–R interval (seconds)
At 25 mm/s: 1 small square = 0.04 s, 1 large square = 0.20 s
HR = 300 / number of large squares between R waves

Standard limb electrodes

For limb leads, the right arm (RA), left arm (LA) and left leg (LL) electrodes form three bipolar leads. A right-leg electrode may provide a reference or driven common-mode connection.

Lead I = VLA − VRA
Lead II = VLL − VRA
Lead III = VLL − VLA
PQRSTR–R interval RALALLIIIIIIEinthoven relationship: II = I + III
Original illustrations: PQRST timing and the frontal-plane limb-lead triangle.

Augmented unipolar limb leads

The Wilson central terminal averages the three limb potentials. A unipolar limb lead is the selected limb potential minus the central-terminal potential. “Augmentation” multiplies the signal by 3/2 so that the resulting aVR, aVL and aVF have more practical amplitude.

VW = (VRA + VLA + VLL) / 3
aVR = VRA − ½(VLA + VLL)
aVL = VLA − ½(VRA + VLL)
aVF = VLL − ½(VRA + VLA)

Learning relationship

Adding the three standard limb-lead equations gives:

aVR + aVL + aVF = 0

Axis convention

Lead I is 0°, lead II +60°, lead III +120°, aVL −30°, aVF +90° and aVR −150° in the frontal plane.

Clinical significance

aVR, aVL and aVF provide frontal-plane views; changes in their polarity and amplitude help infer electrical axis and regional patterns.

Virtual equipment and conventions

Laboratory setup

Virtual equipment

  • ECG waveform generator
  • RA, LA, LL and reference electrode models
  • Lead I, II and III voltmeters
  • Augmented-lead computation module
  • Digital oscilloscope / ECG display
  • Data recorder and CSV export

Measurement conventions

  • Amplitudes are displayed in millivolts (mV).
  • Time is displayed in seconds (s); standard ECG paper speed is 25 mm/s.
  • The cardiac vector model is educational and simplified.
  • RA is assigned 0 V in some calculations only as a relative reference; all lead conclusions remain unchanged.
Data recording: use the “Record Snapshot” buttons in the experiments to build an evidence table, then export it as a CSV file for your laboratory report.

Experiment 1 · Waveform and rate

Virtual ECG waveform and heart-rate simulator

Vary the heart rate and P/QRS/T amplitudes, observe a simulated ECG trace and calculate heart rate from the R–R interval. Add noise to examine the engineering challenge of obtaining a clean diagnostic signal.

Heart rate
75 bpm
R–R interval
0.80 s
R–R large boxes
4.00
Expected QRS in 10 s
12.5
The waveform is ready.

Procedure

  1. Set the heart rate to 75 bpm and record the theoretical R–R interval.
  2. Reduce and increase heart rate; state how the waveform spacing changes.
  3. Change P, QRS and T amplitudes independently and identify each feature on the display.
  4. Add random noise and 50 Hz interference; describe the effect on measurement reliability.
  5. Record at least six snapshots for different heart rates, then plot calculated against simulated heart rate.

Experiment 1 observations

No.HR setting (bpm)R–R (s)R–R (large boxes)Calculated HR (bpm)Noise (%)50 Hz (%)
Expected result: calculated HR = 60/R–R. Because R–R is generated from the selected HR, the calculated and simulated values should agree within numerical rounding.

Experiment 2 · Three limb leads

Virtual 3-lead placement and Einthoven’s-law experiment

Drag each electrode to the correct anatomical target. Once the three-limb configuration is valid, inspect the instantaneous voltages and verify that lead II equals lead I plus lead III.

Front viewPatient’s right is shown on the left
RA
LA
LL
RL ref
RALALLRL reference
Place RA on the patient’s right wrist, LA on the left wrist and LL on the left ankle. RL is the reference.

Lead definitions

I = LA − RA
II = LL − RA
III = LL − LA
Einthoven: II = I + III
Lead I
0.000 mV
Lead II
0.000 mV
Lead III
0.000 mV
Einthoven error
0.000 mV
VRA
0.000 V
VLA
0.000 V
VLL
0.000 V
Correct electrode placement is required before the voltage test can be enabled.

Procedure

  1. Drag the RA, LA, LL and RL reference electrodes to their anatomical positions.
  2. Click Check Placement. Correct any red targets and repeat.
  3. Change the cardiac vector angle and magnitude. Predict which lead should become more positive or negative.
  4. Move the sample-phase control and verify that II − (I + III) remains zero.
  5. Record snapshots for at least five vector angles, including values that make one lead approximately zero.

Experiment 2 observations

No.Vector angle (°)Magnitude (mV)Lead I (mV)Lead II (mV)Lead III (mV)II − (I+III) (mV)
Expected result: with the simplified frontal-plane model, lead II equals I + III at every phase. In a real measurement, amplifier tolerance, electrode motion and noise produce a small non-zero error.

Experiment 3 · Augmented unipolar leads

Augmented lead system: aVR, aVL and aVF

Use the cardiac-vector controls to derive the three augmented limb leads, inspect their polarities and verify the identity aVR + aVL + aVF = 0.

RALALLaVR · −150°aVL · −30°aVF · +90°Wilson terminalAxes are shown in the standard frontal-plane convention.

Augmented-lead equations

aVR = RA − ½(LA + LL)
aVL = LA − ½(RA + LL)
aVF = LL − ½(RA + LA)
aVR + aVL + aVF = 0
aVR peak
−0.693 mV
aVL peak
0.000 mV
aVF peak
0.693 mV
Identity sum
0.000 mV
A +60° vector is represented by negative aVR, near-zero aVL and positive aVF.

Procedure

  1. Set the cardiac vector to +60° and record the aVR, aVL and aVF amplitudes.
  2. Rotate the vector toward +90° and explain the change in aVF and aVL.
  3. Find the angle that makes aVL approximately zero and the angle that makes aVF approximately zero.
  4. Verify that the algebraic sum of the three augmented leads remains zero.
  5. Predict what happens when the vector points directly toward aVR.

Experiment 3 observations

No.Vector angle (°)Magnitude (mV)aVR (mV)aVL (mV)aVF (mV)Sum (mV)
Axis observation: aVR is commonly negative in a normal frontal-plane axis because the normal ventricular vector is directed away from the right shoulder.
Clinical caution: normal amplitudes and polarities vary with patient anatomy, lead placement and physiological state. These simulations teach relationships and should not be used for diagnosis.

Laboratory report

Guidelines for report writing

Required structure

  1. Title page: experiment title, course code, student name, registration number, group and date.
  2. Objectives: state the purpose of each of the three experiments.
  3. Theory: summarise ECG waves, Einthoven’s law and augmented-lead equations.
  4. Equipment and setup: describe the virtual modules and control settings.
  5. Procedure: write the steps in your own words and include screenshots where useful.
  6. Results: present observation tables, calculations and waveform screenshots.
  7. Discussion: explain trends, compare expected and measured results, and identify likely sources of discrepancy.
  8. Conclusion: answer each objective in one or two concise statements.
  9. References: cite textbooks, standards and course materials used.

Discussion prompts

  • How does the R–R interval change when heart rate doubles?
  • Why is lead II equal to lead I plus lead III?
  • What happens to aVR, aVL and aVF when the cardiac vector is +90°?
  • Why can electrode misplacement change the calculated cardiac axis?
  • Which filtering approach would reduce 50 Hz interference without removing clinically useful QRS detail?

Submission checklist

  • All three procedures completed
  • At least six Experiment 1 records
  • At least five Experiment 2 records
  • At least five Experiment 3 records
  • CSV export attached or data tables reproduced
  • Calculations and units included
Academic integrity: your report should explain your observations and reasoning. Do not copy simulator descriptions as if they were personal findings.