




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































the component matrices are projections composed from simple products of eigenvectors. Our approach to the eigendecomposition of matrices requires a brief exposure to the beautiful field of Complex Variables. This foray has the added benefit of permitting us a more careful study of the Laplace Transform, another fundamental tool in the study of dynamical systems.
Steve Cox
–ii–
Contents
1.1. Nerve Fibers and the Strang Quartet
We wish to confirm, by example, the prefatory claim that matrix algebra is a useful means of organizing (stating and solving) multivariable problems. In our first such example we investigate the response of a nerve fiber to a constant current stimulus. Ideally, a nerve fiber is simply a cylinder of ra- dius a and length ` that conducts electricity both along its length and across its lateral membrane. Though we shall, in subsequent chapters, delve more deeply into the biophysics, here, in our first outing, we shall stick to its purely resistive properties. The latter are expressed via two quantities: ρi, the re- sistivity in Ωcm of the cytoplasm that fills the cell, and ρm, the resistivity in Ωcm^2 of the cell’s lateral membrane.
i
i
i
m
m
Figure 1.1. A 3 compartment model of a nerve cell.
Although current surely varies from point to point along the fiber it is hoped that these variations are regular enough to be captured by a multicompart-
ment model. By that we mean that we choose a number N and divide the fiber into N segments each of length /N. Denoting a segment’s axial resistance by Ri = ρi πa/N 2
and membrane resistance by
Rm = (^2) πa`/Nρm
we arrive at the lumped circuit model of figure 1.1. For a fiber in culture we may assume a constant extracellular potential, e.g., zero. We accomplish this by connecting and grounding the extracellular nodes, see figure 1.2. R
R
R R
R R
i i^ i
i (^0) m m m
Figure 1.2. A rudimentary circuit model.
This figure also incorporates the exogeneous disturbance, a current stimulus between ground and the left end of the fiber. Our immediate goal is to compute the resulting currents through each resistor and the potential at each of the nodes. Our long–range goal is to provide a modeling methodology that can be used across the engineering and science disciplines. As an aid to computing the desired quantities we give them names. With respect to figure
The A in (S1) is the node–edge adjacency matrix – it encodes the net- work’s connectivity. The G in (S2) is the diagonal matrix of edge conductances
1.2. Example 1
With respect to the circuit of figure 1.3, in accordance with step (S1), we express the six potentials differences (always tail minus head)
e 1 = x 1 − x 2 e 2 = x 2 e 3 = x 2 − x 3 e 4 = x 3 e 5 = x 3 − x 4 e 6 = x 4
Such long, tedious lists cry out for matrix representation, to wit
e = −Ax where A =
Step (S2), Ohm’s law, states that the current along an edge is equal to the potential drop across the edge divided by the resistance of the edge. In our
case, yj = ej /Ri, j = 1, 3 , 5 and yj = ej /Rm, j = 2, 4 , 6
or, in matrix notation, y = Ge
where
1 /Ri 0 0 0 0 0 0 1 /Rm 0 0 0 0 0 0 1 /Ri 0 0 0 0 0 0 1 /Rm 0 0 0 0 0 0 1 /Ri 0 0 0 0 0 0 1 /Rm
Step (S3), Kirchhoff’s Current Law, states that the sum of the currents into each node must be zero. In our case i 0 − y 1 = 0 y 1 − y 2 − y 3 = 0 y 3 − y 4 − y 5 = 0 y 5 − y 6 = 0
or, in matrix terms By = −f
where
B =
and f =
i 0 0 0 0
Turning back the page we recognize in B the transpose of A. Calling it such, we recall our main steps
e = −Ax, y = Ge, and AT^ y = −f.
specify the number of compartments and that rather than just spewing the x and y values it plots them as a function of distance along the fiber. We note that, as expected, everything tapers off with distance from the source and that the axial current is significantly greater than the membrane, or leakage, current.
1.3. Example 2
We have seen in the previous section how a current source may produce a potential difference across a cell’s membrane. We note that, even in the absence of electrical stimuli, there is always a difference in potential between the inside and outside of a living cell. In fact, this difference is the biologist’s definition of ‘living.’ Life is maintained by the fact that the cell’s interior is rich in potassium ions, K+, and poor in sodium ions, N a+, while in the exterior medium it is just the opposite. These concentration differences beget potential differences under the guise of the Nernst potentials
EN a = RT F log
( (^) [N a]o [N a]i
and EK = RT F log
( (^) [K]o [K]i
where R is the gas constant, T is temperature, and F is the Faraday constant. Associated with these potentials are membrane resistances
ρm,N a and ρm,K
that together produce the ρm above via
1 /ρm = 1/ρm,N a + 1/ρm,K ,
and produce the aforementioned rest potential
Em = ρm(EN a/ρm,N a + EK /ρm,K ).
With respect to our old circuit model, each compartment now sports a battery in series with its membrane resistance.
i i^ i
Figure 1.6. Circuit model with resting potentials. Revisiting steps (S1–4) we note that in (S1) the even numbered voltage drops are now
e 2 = x 2 − Em, e 4 = x 3 − Em and e 6 = x 4 − Em.
We accommodate such things by generalizing (S1) to
(S1’) Express the voltage drops as e = b −Ax where b is the vector of batteries.
No changes are necessary for (S2) and (S3). The final step now reads,
(S4’) Combine (S1’), (S2) and (S3) to produce AT^ GAx = AT^ Gb + f.
Returning to figure 1.6 we note that
b = −Em[0 1 0 1 0 1]T^ and AT^ Gb = (Em/Rm)[0 1 1 1]T^.
This requires only minor changes to our old code. The new program is called fib2.m and results of its use are indicated in the next two figures.
values of N until one can no longer detect changes in the computed potentials. (a) Please run fib1.m with N = 8, 16 , 32 and 64. Plot all of the po- tentials on the same (use hold) graph, using different line types for each. (You may wish to alter fib1.m so that it accepts N as an argument). Let us now interpret this convergence. The main observation is that the difference equation, (1.2), approaches a differential equation. We can see this by noting that dz ≡ `/N
acts as a spatial ‘step’ size and that xk , the potential at (k − 1)dz, is approximately the value of the true potential at (k − 1)dz. In a slight abuse of notation, we denote the latter
x((k − 1)dz).
Applying these conventions to (1.2) and recalling the definitions of Ri and Rm we see (1.2) become
πa^2 ρi
−x(0) + 2x(dz) − x(2dz) dz +
2 πadz ρm^ x(dz) = 0,
or, after multiplying through by ρm/(πadz),
aρm ρi
−x(0) + 2x(dz) − x(2dz) dz^2 + 2x(dz) = 0.
We note that a similar equation holds at each node (save the ends) and that as N → ∞ and therefore dz → 0 we arrive at
d^2 x(z) dz^2 −^
2 ρi aρm^ x(z) = 0.^ (1.3)
(b) With μ ≡ 2 ρi/(aρm) show that
x(z) = α sinh(√μz) + β cosh(√μz) (1.4)
satisfies (1.3) regardless of α and β. We shall determine α and β by paying attention to the ends of the fiber. At the near end we find
πa^2 ρi
x(0) − x(dz) dz =^ i^0 ,
which, as dz → 0 becomes
dx(0) dz =^ −^
ρii 0 πa^2.^ (1.5)
At the far end, we interpret the condition that no axial current may leave the last node to mean dx() dz = 0.^ (1.6) (c) Substitute (1.4) into (1.5) and (1.6) and solve for α and β and write out the final x(z). (d) Substitute into x the, a, ρi and ρm values used in fib1.m, plot the resulting function (using, e.g., ezplot) and compare this to the plot achieved in part (a).
where Yj is the fiber’s Young’s modulus (N/m^2 ), aj is the fiber’s cross- sectional area (m^2 ) and Lj is the fiber’s (reference) length (m). The analog of potential difference is here elongation. If ej denotes the elongation of the jth spring then naturally,
e 1 = x 1 , e 2 = x 2 − x 1 , e 3 = x 3 − x 2 , and e 4 = −x 3 ,
or, in matrix terms,
e = Ax where A =
We note that ej is positive when the spring is stretched and negative when compressed. The analog of Ohm’s Law is here Hooke’s Law: the restoring force in a spring is proportional to its elongation. We call this constant of proportionality the stiffness, kj , of the spring, and denote the restoring force by yj. Hooke’s Law then reads, yj = kj ej , or, in matrix terms
y = Ke where K =
k 1 0 0 0 0 k 2 0 0 0 0 k 3 0 0 0 0 k 4
The analog of Kirchhoff’s Current Law is here typically called ‘force balance.’ More precisely, equilibrium is synonymous with the fact that the net force acting on each mass must vanish. In symbols,
y 1 − y 2 − f 1 = 0, y 2 − y 3 − f 2 = 0, and y 3 − y 4 − f 3 = 0,
or, in matrix terms
By = f where f =
f 1 f 2 f 3
(^) and B =
As is the previous section we recognize in B the transpose of A. Gathering our three important steps
e = Ax (2.2) y = Ke (2.3) AT^ y = f (2.4)
we arrive, via direct substitution, at an equation for x. Namely
AT^ y = f ⇒ AT^ Ke = f ⇒ AT^ KAx = f.
Assembling AT^ KA we arrive at the final system
k 1 + k 2 −k 2 0 −k 2 k 2 + k 3 −k 3 0 −k 3 k 3 + k 4
x 1 x 2 x 3
f 1 f 2 f 3
Although Matlab solves such systems with ease our aim here is to develop a deeper understanding of Gaussian Elimination and so we proceed by hand. This aim is motivated by a number of important considerations. First, not all linear systems have unique solutions. A careful look at Gaussian Elimination will provide the general framework for not only classifying those systems that possess unique solutions but also for providing detailed diagnoses of those systems that lack solutions or possess too many. In Gaussian Elimination one first uses linear combinations of preceding rows to eliminate nonzeros below the main diagonal and then solves the result- ing triangular system via back–substitution. To firm up our understanding let us take up the case where each kj = 1 and so (2.5) takes the form
x 1 x 2 x 3
f 1 f 2 f 3