Tissue and skeleton together
The question. A muscle is fastened to bones that have mass and are moving. In one time step, what is worked out first, what passes between the two, and how can you tell that the result is right?
The two halves of the problem wait on each other. The shape of the muscle, and so its pull, depends on where the bones are and how fast they got there. The bones’ acceleration depends on that pull. A simulator has to break the circle somewhere in every step, and where it breaks it decides what each step costs, how long a step can be, and how far the answer can be trusted.
This chapter takes the muscle’s own mass to be nothing beside the bones’, as the laboratory below does; the simulator’s arm gives its tissue weight and inertia, and When tissue’s own inertia matters shows what that adds to the step. By the end you will be able to take one step of a bone and a muscle by hand, say why the simulator solves the muscle once per step, work out the longest step that stays stable, and check a whole run by its account of work.
The two halves
The bone. Take one bone on a hinge, turning through the angle , in radians. The equations of a moving chain give its motion; with one joint the mass matrix is a single number, the bone’s rotational inertia about the hinge, , in kg·m². The torques on the bone are the tissue’s pull, , and the bone’s weight, , both in N·m. So
In words: the angular acceleration is the sum of the torques divided by the rotational inertia. To find it, the tissue’s torque must already be known.
The muscle. Fibres that feel their own speed turned one time step of tissue into one search for balance: find the shape at the end of the step in which the forces on every node balance, with every fibre’s speed measured from the shape at the start of the step. The tissue here has no mass, so nothing in that search needs an acceleration. With mass the search gains one more term, the inertia’s bowl of When tissue’s own inertia matters, and needs the tissue’s own velocity and acceleration at the start of the step; it is still one search. What it does need in either case is where the tissue is held.
What passes from the bone to the muscle. A bound node is a node of a body of tissue that moves with a bone: its place in the bone’s own frame is fixed, and the bone’s pose puts it in the world. Give the bone its angle at the end of the step and every bound node has its position there. The search for balance holds those nodes still and moves the rest. That is all the bone tells the tissue, and it tells it how fast the bone moved as well: the bound nodes went from where the last step left them to where this one puts them, in the time of one step, and every fibre’s speed is measured over the same change.
What passes from the muscle to the bone. At the balanced shape the free nodes have no force left on them, but a bound node still has one: the force the bone must supply to hold it where it is. Forces come in equal and opposite pairs (Dourmashkin, sections 7.3–7.4), so the tissue pulls on the bone with that force reversed. Each such pull, times its lever arm about the hinge, is a torque; added up over the bound nodes they are .
There is a second way to see the same torque, by virtual work. Turn the hinge by a small angle and let the tissue find its balance again. The bound nodes move with the bone; the free nodes rearrange, but their forces balance, so moving them costs nothing. The potential energy of the tissue therefore changes by exactly the work its pull does on the bone, with the sign reversed:
In words: the tissue’s torque on the bone is minus the rate at which its potential energy changes as the hinge turns. Within a time step, is the potential of the step, the one the search for balance minimises.
One more consequence of masslessness: the forces the tissue applies to all the bones together, and their turning effects, add up to nothing. Whatever it pulls one bone with, it pulls the other back with. A tissue with weight and inertia also hands the bones its weight, less what it spends on changing its own momentum.
The step the simulator takes
Stepping through time gave the rule to start from. Semi-implicit Euler updates the velocity first and moves the angle with the new velocity:
where is the time step in seconds. Its energy wobbles but does not drift, which is what a long run needs. It has one fault for the present purpose. Its velocities belong, in effect, to the middles of the steps and its angles to their ends (Hairer, Lubich and Wanner 2003, section 1.2), so the velocity and the angle it reports never describe the same instant. The rule is first order, and an account of energy built from what it reports is out by an amount in proportion to the step.
The repair is to split the change of velocity in two halves, one on each side of the move of the angle. Write , and for the angle, angular velocity and angular acceleration at the start of a step, and number the end of the step 1.
- Half the change of velocity, with the acceleration at the start: .
- The whole move of the angle, with that velocity: .
- One search for the tissue’s balance, with the bound nodes where the angle puts them, over a step of length . With the tissue’s mass, this search is also the tissue’s own step in time, by its own integrator. It returns the tissue’s torque , and with the weight’s torque at the acceleration .
- The other half of the change of velocity, with the acceleration at the end: .
In words: the angle moves on as a stone would under the acceleration it had at the start of the step; the muscle is solved once, at that new angle; and the velocity is finished with the mean of the accelerations at the two ends of the step. Line 2 uses nothing that line 3 produces, and that is the point of the order. The angle at the end of the step is known before the muscle is solved, so the muscle is solved once per step, at a known pose. The search for the tissue’s balance is nearly all the work of a step, so one search per step is the least a step can cost.
This is the velocity Verlet rule: half the change of velocity, the whole move of the position, and the other half of the change of velocity, worked out with the acceleration at the new position. It has several names, among them Störmer–Verlet and leapfrog, and it is two half steps of semi-implicit Euler in turn, one that updates the velocity first and one that updates the position first (Hairer, Lubich and Wanner 2003, sections 1.2 to 1.4). Eliminate the velocities from two steps in a row and what is left is
In words: the angle one step ahead, plus the angle one step back, less twice the angle now, is the step squared times the acceleration now. That is the same equation that semi-implicit Euler gives for its angles, so the two rules trace the same angles and differ only in the velocity they report. The equation reads the same with time run backward, and the rule is said to be symmetric; it is of second order; and for forces that depend on the pose alone its error in the energy stays of the size of over very long runs, without drift (Hairer, Lubich and Wanner 2003, sections 2.1 and 4.2 and theorem 5.1).
The speed the muscle sees. The muscle’s fibres measure their speed over the step, from the shape it began with to the shape it ends with. The bound nodes moved by in the time , so the speed they impose is , which by line 2 is exactly : the velocity at the middle of the step. The torque the muscle hands back at the end of the step was worked out with a speed half a step old. The force–velocity factor is the only part of the tissue that depends on speed, and the simulator treats it in this explicit way, half a step late.
The simulator’s code evaluates the acceleration of line 3 twice, once with the velocity predicted as and once more with the velocity of line 4. That matters when the skeleton’s own equations depend on the velocity, as they do in a chain of several bones or with friction at a joint. For one hinge without friction the two evaluations agree.
What the simulator does not do. The circle could be closed exactly instead: guess the angle at the end of the step, solve the muscle, work out the acceleration, correct the guess, and repeat until bone and muscle agree. Such a coupling would have no limit on its step from either of the two causes below. The simulator’s documentation records why it was not chosen: each pass of that repetition is a whole search for the muscle’s balance, and the step is in any case held to a few milliseconds by accuracy, since activation changes on a time scale of 15 ms and the fibres’ speed is a difference over one step.
A worked example
The laboratory below is the smallest system with both halves in it. A forearm of 1.5 kg hangs from a fixed upper bone by a hinge, with its centre of mass 0.15 m below the hinge and a rotational inertia of 0.005 kg·m² about that centre. A block of muscle 240 mm long and 12 mm square runs from 200 mm up the upper bone to 40 mm down the forearm, 30 mm in front of the hinge. Each end is bound to its bone along one line of nodes parallel to the hinge axis, and the last 6 mm at each end is stiff tissue without fibres, standing in for tendon. The fibres are those of fibres that feel their own speed, at 0.95 of their optimal length when the forearm hangs straight. The muscle is switched on to an activation of 0.5 and held still while the forearm is held at 0.2 rad; then the forearm is let go from rest. The step is 8 ms.
The forearm’s rotational inertia about the hinge comes from the parallel-axis rule, and its weight, 1.5 × 9.81 = 14.7 N, acts 0.15 m from the hinge, so its torque is N·m: negative, back toward hanging straight down.
Step 1.
| Quantity | Calculation | Result |
|---|---|---|
| Rotational inertia about the hinge | 0.03875 kg·m² | |
| Torque of the weight at the start | −0.4385 N·m | |
| Torque of the muscle held still at the start | the simulator’s search | 0.7573 N·m |
| Acceleration at the start | 8.227 rad/s² | |
| Turn in the step (line 2) | 0.000 2633 rad | |
| Torque of the muscle at 0.200 263 rad (line 3) | one search for balance | 0.7566 N·m |
| Torque of the weight there | −0.4391 N·m | |
| Acceleration at the end | 8.195 rad/s² | |
| Angular velocity at the end (line 4) | 0.065 69 rad/s |
The forearm rose, yet the muscle’s torque fell a little, from 0.7573 to 0.7566 N·m. Its fibres were shortening during the step, and fibres that shorten pull less than fibres held still.
Step 2 starts from where step 1 ended. Line 2 gives rad; the muscle there gives 0.7553 N·m, and the angular velocity at the end of the step is 0.1309 rad/s.
The account after step 1. The work the muscle did on the forearm is its torque times the angle turned, taken with the mean of the torques at the two ends of the step, which is the trapezoidal rule. The forearm’s gain is its kinetic energy plus the rise in its gravitational potential energy.
| Quantity | Calculation | Result |
|---|---|---|
| Work of the muscle on the forearm | 0.1993 mJ | |
| Kinetic energy gained | 0.0836 mJ | |
| Potential energy gained | 0.1155 mJ | |
| Gain less work | −0.0002 mJ |
The gain and the work agree to within a thousandth of the work, after one step.
How long a step can be
Two things limit the step. Both appear when the torque on the forearm is replaced by its straight-line approximation near the angle at which the muscle held still balances the weight.
Stiffness. Near the balance, the torque on the forearm falls by for each radian it turns beyond , with the fibres held still: . This , in N·m/rad, is the stiffness of the joint at that pose. Put it into the equation for the angles, measure the angle from , and write for the factor by which one step multiplies that distance, so that times the starting distance:
The two values of that solve this multiply to 1, since that is the last term. While the bracket lies between −2 and 2 the equation has no solution among ordinary numbers, and the two factors are then of size exactly 1: the swing neither grows nor shrinks (Hairer, Lubich and Wanner 2003, example 3.4). Once the bracket falls below −2 the two values are ordinary negative numbers whose product is 1, so one of them is larger than 1 in size: the distance from the balance grows and changes sign at every step. The bracket stays above −2 while , so the step is stable when
In words: the step must be shorter than twice the square root of the rotational inertia over the joint’s stiffness. This is the limit that Stepping through time found for semi-implicit Euler, , there with the stiffness measured as an acceleration per radian; the two rules trace the same angles.
Damping. The fibres’ speed adds a torque that opposes the motion. Near the balance the muscle’s torque falls by for each radian per second at which the joint turns: is the damping of a joint, in N·m·s/rad. Its source is the slope of the force–velocity curve. Turn the joint at and the muscle shortens at , its moment arm times the joint’s speed. Divided by the optimal fibre length and by the maximum shortening velocity, that is a change in the fibres’ normalised velocity. The fibres’ force changes by that, times the maximum isometric force, the activation, the length factor and the slope of the speed factor; and the torque changes by times the force. So grows with the square of the moment arm. In the scheme this torque is worked out with the speed half a step late, . With nothing else acting, the equation for the angles becomes, for the turn in each step,
which stays bounded only while :
In words: the step must be shorter than twice the rotational inertia over the joint’s damping. A longer step would make the late damping push the joint back further than it had come.
For the worked example. The laboratory finds the balance at 0.3851 rad, and measures the joint there. Its stiffness is 1.743 N·m/rad. The weight alone would give N·m/rad; the muscle held still takes 0.303 of it away, because its torque grows as the forearm rises, as the curve of the muscle held still on the third plot of the laboratory shows. The damping, measured as the shortfall of the muscle’s torque when the same small turn is made in a time step instead of held still, is 0.0345 N·m·s/rad. So
| Limit | Calculation | Result |
|---|---|---|
| Set by stiffness | 298 ms | |
| Set by damping | 2.25 s |
Both are far longer than any step that follows the swing closely. On this problem the step is set by accuracy and by the cost of the muscle’s search, not by stability. A muscle with a long, stiff tendon can be different. Within one step its fibres resist a change of length through their speed, and the shorter the step the harder they resist; the simulator’s documentation notes that the stiffness that then counts in is in effect that of the tendon, which is far greater than the joint’s stiffness with the fibres held still. In this block the fibres’ resistance within a step is small beside the stiffness of its end layers, and the end layers play no part in the limit; step 7 of the laboratory below finds the limit where the stiffness with the fibres held still puts it.
What a step costs
Each step costs one search for the muscle’s balance, and the search costs more the further the step goes from the last balance. The search starts from the shape carried on from the last two steps, so in a steady motion it starts close to its answer. Over the two seconds of the laboratory’s run, the searches together took 1096 steps of Newton’s method with time steps of 4 ms, 722 with 8 ms and 444 with 16 ms: halving the time step doubles the number of searches but not the work, because each search has less far to go. With steps of 256 ms each search takes between 25 and 42 Newton steps. The same held the other way on the arm built of tissue bodies curling 2 kg, solved without the tissue’s mass: letting the step grow from 5 ms to as much as 50 ms where the motion is smooth took 22 % fewer steps but 13 % more Newton steps, and the whole curl cost 1.17 times as much.
When a step moves the bound nodes so far that the bricks beside them would be turned inside out, the simulator carries the bound nodes there in two halves, and each half again if need be; the intermediate shapes only lead the search, and the answer is the balance at the end of the step. Such a first search fails at its very start, not after many iterations: moving the bound nodes alone, by a few millimetres in the fast part of a move, turns a brick beside them inside out before the search has begun. A better start carries the free nodes along with the bound ones, by the tangent of the stiffness: one Newton step from the moved shape, worked out with the stiffness of the last balance. The simulator has it as an option, not the default. Under a twist it helps less, because moving a nearly incompressible brick’s nodes along straight lines changes its volume, a little, even where the turn itself would not.
How you can tell it is right
Energy gives two checks, and neither needs a formula for the motion.
The forearm’s account. By the work–energy relation, the forearm’s gain in kinetic and gravitational potential energy must equal the work the muscle did on it. The work is added up step by step with the trapezoidal rule, . With these the account closes to second order in the step: the share left unaccounted for should fall fourfold each time the step is halved.
The muscle’s account. The muscle here has no mass, so it has nowhere to keep energy except in its passive structures: the ground substance, its change of volume, and the passive stretch of its fibres. The arm’s tissue also keeps kinetic and gravitational energy, and loses energy to its own damping and to the stepping rule; Keeping the books on energy adds those lines. The work done by the active fibres must therefore equal the work the muscle did on the forearm plus its gain in stored energy. The simulator adds the fibres’ work up at every sample point of every brick: the mean active stress over the step, times the shortening of the fibre, times the volume the point stands for.
Over the whole run with steps of 8 ms the muscle did 94.94 mJ of work on the forearm, and the forearm’s gain differs from it by −0.0199 mJ, two parts in ten thousand. The fibres delivered 92.04 mJ and the stored energy fell by 2.90 mJ, so that the muscle’s account closes to 0.0009 mJ. With steps of 4 ms and 16 ms the forearm’s account is out by −0.004 97 and −0.0799 mJ: a quarter and four times as much, as a second-order rule should give. The muscle’s account goes the same way, 0.000 22 and 0.003 65 mJ.
Try it
Each press of Step takes one time step. The first plot is the forearm’s angle, with the angle of balance and the swing of a spring and damper, explained below, as dashed lines. The second is the account of work. The third is the torque on the forearm against its angle: the muscle held still, the torque that would hold the weight up, and the path of this run.
- Check the worked example. Before pressing anything, read the torque of the muscle, 0.7573 N·m, the torque of the weight, −0.4385 N·m, and the angular acceleration, 8.227 rad/s². Press Step once. The angle reads 0.200 263 rad, the muscle’s torque 0.7566 N·m and the angular velocity 0.065 69 rad/s; the work reads 0.1993 mJ and the forearm’s gain 0.1991 mJ. Press again: 0.201 05 rad and 0.1309 rad/s.
- Let it run. Press Play. The forearm rises past the dashed line of balance at 0.385 rad, turns at 0.534 rad after 0.46 s, falls back to 0.263 rad, and swings about the balance with each swing about four fifths of the last.
- Read the torque plot. On the way up the run’s path lies below the curve of the muscle held still, and on the way down above it: shortening fibres pull less than fibres held still, and lengthening fibres more. Each swing makes a loop, and the area it encloses is the energy the muscle takes back from the forearm in that swing.
- Read the account. At the end of the run, the gain less the work reads −0.0199 mJ, and the fibres’ account 0.0009 mJ. On the second plot the work and the gain lie on one another, and so do the fibres’ work and the work plus the energy stored.
- Predict, then check. Halve the step to 4 ms and run again. What will the forearm’s account be out by at the end? A quarter as much: −0.004 97 mJ. Now 16 ms: −0.0799 mJ. Read the Newton steps in the run each time: 1096, 722 and 444.
- A crude step. Choose 256 ms, just inside the stiffness limit of 298 ms, and play. The swing is drawn with eight straight strokes and no longer follows the dashed curve, but it stays within 0.2 rad of the balance. Each search now takes between 25 and 42 Newton steps.
- Cross the limit. Choose 320 ms and press Step three times. The distance from the balance reads 0.236, −0.559 and 1.162 rad: each step multiplies it by about −2.1, which is the larger root of the equation above, −2.14 for this step. The run stops there, because the forearm has been thrown far beyond its swing.
A check against an exact result
The numbers and describe the joint only near the balance, but there they make a prediction that owes nothing to the time stepping. A rotational inertia with a torque on it is a spring and damper, and when it swings about with the angular frequency , while its swings shrink as , with (Dourmashkin, section 23.5, with , and in place of a mass, a spring constant and a damping constant). Its turning points come every half period, , and each swing is of the one before.
| Quantity | Calculation | Spring and damper | The laboratory, 8 ms |
|---|---|---|---|
| 0.445 per second | |||
| 6.69 rad/s | |||
| Period | 0.939 s | 0.944 s | |
| Each swing over the one before | 0.811 | 0.815 | |
| Highest angle of the first rise | 0.535 rad | 0.534 rad |
The laboratory’s period is read between its first and third turning points, to the nearest step. The coupled model and the spring and damper agree to within 1 %, although neither the stiffness nor the damping was put into the model: both were measured from it, the one with the muscle held still and the other from a single slow time step. The swing is not a property of the stepping rule; it is a property of the bone and the muscle, and the rule follows it.
No measurement of a joint moved by a deformable muscle was compared with the model here.
What this model leaves out
- The muscle’s own mass. The tissue here has none. The simulator’s arm gives it weight and inertia: When tissue’s own inertia matters.
- Solving bone and muscle as one. The muscle is solved once per step at a pose fixed in advance. The circle is never closed by repetition, for the reasons above.
- Activation that changes. Here it is switched on before the forearm is let go. A real muscle takes tens of milliseconds to switch on, as Switching a muscle on and off describes, and a step in which activation changes much is taken in smaller parts.
- Bone that the muscle presses on. A muscle that lies against a bone also pushes it, through the contact of Tissues that touch. The simulator returns that push to the bone as it returns the pull of the bound nodes; nothing touches the block here.
- Many joints and many muscles. One hinge and one block show the scheme. The whole arm in three dimensions is the arm.
Summary
- The bone tells the muscle where its bound nodes are at the end of the step, and through their change over the step how fast they moved. The muscle tells the bone the forces at those nodes, reversed: its torque about the joint.
- The simulator’s step is velocity Verlet: half the change of velocity, the whole move of the angle, one search for the muscle’s balance at the new angle, and the other half of the change of velocity. One search per step is the least a step can cost.
- The muscle sees the speed at the middle of the step, so its damping is treated half a step late.
- The step is stable while it is shorter than and : 298 ms and 2.25 s in the worked example, where accuracy and cost set the step instead.
- Two accounts check a run: the bone’s gain against the work done on it, and the fibres’ work against that work plus the energy stored. Both close to second order in the step.
Next: the tissue arm’s forearm muscles have no bodies yet; Line muscles beside tissue bodies shows how they pull beside the nine that do.