S15 · Lesson 19 · Biopotential lab
Resting potentials from the Goldman equation under changing potassium, a finite-difference cable solved against its exact cosh profile, electrode impedances turning common-mode voltage into differential error, and all six limb leads with the axis from two
Biopotentials start as ion gradients across membranes, spread along cells as through a leaky cable, reach the skin as millivolt patterns, and enter an amplifier through electrodes that are anything but ideal. Lessons 10 to 18 took each step in turn. In this lab you'll compute each one numerically: the resting potential as concentrations change, the voltage along a finite nerve fiber, the interference an electrode mismatch lets in, and the full set of limb leads from the two an ECG actually measures.
- The solid curve is the resting potential from the Goldman equation ( = 1 : 0.04 : 0.45) against extracellular potassium; the dashed curve is the potassium Nernst potential.
- At normal potassium (4 mM) the membrane sits 20 mV above , pulled up by sodium. As potassium rises, both rise, but the resting potential less steeply.
- Raising the sodium permeability pulls the resting potential further from .
Predict
Extracellular potassium doubles from 4 to 8 mM. The potassium Nernst potential rises 18.5 mV. The resting potential rises by
The Goldman equation weights each ion by its permeability, and sodium and chloride keep pulling the potential where they want it, so the resting potential moves 7.9 mV (from −75.4 to −67.4 mV), less than half of 's shift. Task 1 computes it.
Name it
What the lab computes
- Goldman: , at 37 °C unless told otherwise.
- The cable: a steady voltage held at one end of a fiber of length L sealed at the other obeys , with exact solution . On a grid of spacing h, is a tridiagonal system, solved in one forward and one backward sweep; the sealed end uses a mirror node, .
- Electrodes: each is . A common-mode voltage reaching an amplifier with input impedance through electrodes and becomes a differential error , about .
- Leads: III = II − I, aVR = −(I + II)/2, aVL = I − II/2, aVF = II − I/2, and the frontal axis from I and aVF: .
Check
Write ghk(K, Na, Cl, P=(1, 0.04, 0.45), T=310.15), where each ion is an (inside, outside) pair in mM, returning millivolts.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write cable(V0, lam, L, n): the steady voltage at the n + 1 grid points along a fiber of length L sealed at its far end, with held at x = 0, by finite differences.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write electrode_z(Rs, Rd, Cd, f) returning a complex impedance, and cm_error(vcm, Z1, Z2, Zin), the magnitude of the differential error.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write limb_leads(I, II) returning a dict of all six limb leads, and axis(I, II) in degrees.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Explain why
Why does a short nerve fiber sealed at its far end hold more of an applied voltage there than an infinitely long fiber would?
In an infinite fiber, current injected at one point leaks out through the membrane as it spreads, and the voltage falls exponentially with the length constant, because there is always more membrane ahead to leak through. A sealed end stops the axial current: the charge that would have flowed onward has nowhere to go and must leave through the remaining membrane near the end. That raises the voltage near the end, so the profile flattens into a hyperbolic cosine, and at the end itself the voltage is the applied value divided by cosh(L/λ) rather than multiplied by e^{−L/λ}, which is larger by up to a factor of two.