RPNI Design & Testing Laboratory / model 1.0.0

Model, evidence & numerical verification

A transparent design experiment for the muscle-graft regenerative peripheral nerve interface: specified anatomy, prescribed muscle sources, calculated extracellular pickup, and a separate transport benchmark.

Exploratory / uncalibrated

The laboratory implements an original reduced forward model. It has not been fitted to an RPNI recording dataset or validated for clinical outcomes, implant safety, graft viability, muscle force, sensory perception or prosthesis control.

1. What the laboratory represents

A muscle-graft regenerative peripheral nerve interface supplies a terminal nerve or separated fascicle with a free muscle target. After reinnervation, muscle-derived electrical activity can be recorded by electrodes. This laboratory represents that nerve-to-muscle recording architecture with idealized graft modules and synthetic equivalent motor units. [1] [9]

Compare geometry, electrode placement and assumed source activity under an explicit, reproducible electrical model. All outputs are conditional on the selected geometry, source activity and tissue assumptions. No patient-specific fit, graft-survival prediction, clinical efficacy estimate, stimulation safety calculation or prosthetic task-accuracy prediction is supplied.

The signal is muscle-derived EMG. The model does not simply multiply an extracellular nerve signal by a gain. It prescribes muscle sources after assumed arrival, computes their extracellular potentials and samples those potentials with finite contacts. A nerve bridge, regenerative sieve, TEENI construct, targeted muscle reinnervation, dermal interface or composite RPNI requires different anatomy and equations.

Published observationUse in this laboratoryLimit on interpretation
30 × 15 × 5 mm harvested grafts in one human feasibility study.A labeled starting geometry for an idealized placement envelope.Harvest dimensions are not mature graft measurements or an optimized implant prescription.
Rat graft-mass groups differed in regenerated tissue and function.Motivation to inspect transport distance alongside electrical pickup.No conversion to a human thickness cutoff or a survival probability.
Human implanted prosthesis-control studies.Motivation for independent source pools and multichannel recording.RPNIs were part of systems containing residual-muscle channels, hardware and decoders. Those results do not calibrate geometry-to-task accuracy.

Sources: Vu 2020, Hu 2021, Vu 2023, Wallace 2026.

2. Geometry, routing and equivalent motor units

The design contains one to four rectangular muscle-graft placement envelopes. All share the selected length, width and thickness. The x axis follows muscle fibers, y separates modules, and z spans thickness; every coordinate is in millimeters. Spacing is the edge-to-edge gap. Each graft receives a terminal nerve and one bipolar recording pair.

Seeded equivalent motor units occupy each graft. Three equally weighted, parallel representative fibers sample each unit’s spatial territory. This is a reduced source quadrature, not a reconstruction of every muscle fiber or a measured motor-unit census. Increasing the number of equivalent units changes total source power. Holding unit count fixed while enlarging a graft tests a different hypothesis from holding source density fixed.

Physical graft identity and source command identity are distinct. The same-pool allocation parameter is the probability that a source in graft i receives command label i; remaining assignments go to other labels. This is a synthetic routing stress test, not a surgical sorting-success probability. With one graft, only one command label exists.

The nerve-tip position determines the assumed straight-line regrowth distance. Nerve diameter is a geometric envelope; it does not determine motor-axon count, fascicular anatomy or electrical amplitude. The model does not solve Schwann-cell guidance, intramuscular branching mechanics, target recognition or failure to establish a functional synapse.

Geometry normalization keeps finite contact disks within the graft planform and bounds nerve dimensions, insertion depth, territory radius and pole spacing. A size change can therefore alter dependent parameters. Every sweep retains its effective configuration. Zero or overlapping contact spacing is available as a mathematical control and is labeled when it cannot represent two separate physical electrodes.

3. Electrical forward calculation

3.1 Quasi-static anisotropic volume conduction

The conductor is infinite and has constant conductivity tensor Σ = diag(σL, σT, σT). An impressed point current produces the Green-function potential below, with a zero-potential limit at infinity:

φ(r) = I / [4π √det(Σ) √((r − rs)ᵀ Σ⁻¹ (r − rs))]

With current in amperes, distance in meters and conductivity in S/m, the result is volts. If all conductivities equal σ, the expression reduces to I/(4πσr). Transforming coordinates by Σ⁻¹ᐟ² gives the isotropic Poisson problem and its Jacobian factor √det(Σ). Published EMG forward models provide precedents for separating source, conductor and detector, including more detailed layered and nonuniform domains. [13] [14]

The implemented source has an explicit smooth core. Let σg = (σLσT²)¹ᐟ³. With coordinates and core radius as in mm, source current IµA in µA and potential in µV:

φµV = 1000 IµA / [4π √(σLσT²) √(Δx²/σL + (Δy² + Δz²)/σT + as²/σg)]

The factor 1000 combines the mm, µA and µV conversions. A zero core is the exact point-source solution away from its singularity. A positive core is a near-field approximation in conductivity-transformed coordinates; it is not a membrane radius. Near-contact results depend on this regularization.

The graft outline is not an electrical boundary. It bounds source placement while the same conductor fills all space. No fat layer, host-muscle discontinuity, scar shell, insulating wrap, saline pocket or skin surface is resolved. Current scaling is linear; uniformly multiplying all conductivities by b divides voltage by b.

3.2 Current-balanced traveling muscle sources

An event launches two traveling tripoles in opposite x directions from each representative fiber’s endplate. Each tripole has weights (+1, −2, +1), so instantaneous impressed current sums to zero. The two directions each receive half the unit current scale, distributed over three weighted fibers, with a seeded source-strength multiplier.

Ip(t) = [½ I0 si wf B(t) E(t)] × (1, −2, 1);   Σ Ip(t) = 0

B and E are smooth onset and endpoint tapers; a common taper multiplies every pole in a tripole, preserving balance as a wave enters or leaves its finite fiber. Muscle wave speed is in m/s, numerically equal to mm/ms. It is distinct from axonal regrowth in mm/day. The slow source-maturation factor multiplies the completed waveform.

These are prescribed equivalent sources. The laboratory does not solve muscle membrane channels, the action-potential cable equation, tendon current redistribution, motor-unit force or fatigue. Current-balanced spatial sources should not be confused with charge-balanced stimulation pulses. No stimulation threshold is calculated.

3.3 Finite contact integration and bipolar recording

φ̄A(t) = (1/|A|) ∫A φ(r,t) dA;   vAB(t) = φ̄A(t) − φ̄B(t)

A contact is an ideal disk in the x–y plane. Gauss–Legendre integration in squared radius and equally spaced angular points average potential over its area. Order n uses 4n² samples. A zero-radius contact is a point detector. Identical coincident contacts cancel exactly; swapping their order reverses polarity without changing RMS.

This is an ideal high-impedance sensing approximation. Electrode polarization, material electrochemistry, contact impedance, amplifier loading, frequency filtering, motion artifact and lead mechanics are absent. A primary electrode comparison motivates contact design as a separate variable but used native rat muscle; its ranking is not adopted as a universal regenerated-graft result. [3]

4. Arrival, maturation and two time scales

For territory i, di is the straight-line distance from the terminal nerve tip. The chosen delay t0, regrowth speed va and maturation constant τm define:

ta,i = t0 + di/va
mi(t) = 0 for t ≤ ta,i
mi(t) = a [1 − exp(−(t − ta,i)/τm)] for t > ta,i

Zero regrowth speed assigns no arrival. At the arrival instant the maturation gain is still zero. The mean source-maturation readout averages m over the original equivalent-unit cohort. It is an amplitude factor, not a proportion of histologically confirmed NMJs, viable cells or functional motor units.

The model does not represent early graft degeneration and muscle rebuilding in detail. Its monotonic gain is an explicit hypothesis. Availability a is independently imposed and does not come from the oxygen panel. Published culture-based constructs are distinguished from free muscle grafts in the evidence ledger. [15]

Biological replay uses days; electrical replay uses milliseconds. The anatomy can replay assumed regrowth over the biological horizon. The voltage traces remain tied to the chosen recording day. Playing or scrubbing electrical activity returns anatomy to that day, so its source activation corresponds to the displayed recording.

5. Signal statistics and source separation

Prescribed activation

Equivalent units have recruitment thresholds spanning zero to 0.8. Above threshold, the selected drive determines a firing rate between the chosen minimum and maximum. Events follow independent seeded Poisson processes. Fibers within one unit share events. Refractoriness, common synaptic drive, spike synchrony, adaptation and fatigue are absent. Target and other command pools have separately adjustable drive.

Expected source power

For channel c and source i, hci is the bipolar waveform, λi is event rate in Hz and mi is slow source gain. Centered variance under independent stationary Poisson events is:

Pc = Σi λi mi² ∫ hci(s)² ds
Ccd = Σi λi mi² ∫ hci(s) hdi(s) ds

The integral has units µV²·s; multiplying by event rate in s⁻¹ gives variance in µV². The source matrix takes the square root of power separately for each recording channel and command pool at the stated drive and biological age. It is not a dimensionless gain. The channel-similarity matrix is signed Ccd/√(CccCdd), undefined when either channel has no clean variance.

Expected clean RMS excludes acquisition noise. Expected total RMS adds the imposed noise variance. The target power fraction PT/(PT + PO) also excludes noise. Perfect routing can produce a selective channel; correlated biological commands, absent here, could still correlate real recordings.

A finite synthetic recording

Source waveforms use a finer internal grid set by the kernel-oversampling factor. Seeded event times are convolved with these waveforms using linear interpolation onto the selected recording grid. Expected power and covariance integrate the same piecewise-linear kernel exactly segment by segment. Kernel oversampling refines the source waveform and expected power; it does not provide an antialias filter for the recording output. Fast, narrow sources can require refinement of both grids. Each command-pool trace is demeaned over the window. Independent Gaussian channel noise is added and demeaned. For these traces, RMS = √(Σv²/N). Because finite target and other traces can covary, actual clean RMS uses the summed trace rather than replacing it with a quadrature sum.

Clean/noise SNR is 20 log₁₀(RMSclean/RMSnoise). “Clean” includes target and other command pools: high SNR does not guarantee selectivity. Zero signal and zero noise receive explicit states rather than a fabricated finite decibel value. Rat studies used different signal definitions, including integrated-EMG active/rest ratios; their values are not interchangeable with this metric. [4] [7]

Finite recordings fluctuate; window-mean removal also lowers expected squared RMS, especially for short windows. Sweeps and repeat-seed studies use expected source variance, while the trace panel reports the actual finite realization. Neither metric is a classifier accuracy, mutual information, clinical recovery measure or prosthesis score.

6. Independent steady transport diagnostic

A slab of full thickness h has the same fixed concentration cb at both faces. Diffusivity D is in mm²/s and first-order consumption k is in s⁻¹. No supply from side faces or internal vessels is included.

D c″ − k c = 0;   c(−h/2) = c(h/2) = cb
λ = √(D/k);   c(z)/cb = cosh(z/λ)/cosh(h/(2λ))
c(0)/cb = sech(h/(2λ));   c̄/cb = tanh(h/(2λ))/(h/(2λ))

At k = 0, both concentration ratios are one. The implementation uses an algebraically equivalent exponential form to avoid overflow at large h/λ. The normalized result does not give measured tissue oxygen tension or absolute concentration. Only h√(k/D)/2 determines the ratios, so a profile alone cannot identify D and k independently.

At the initial h = 5 mm, D = 0.002 mm²/s and k = 0.01 s⁻¹, the exact hypothetical center/face ratio is about 0.0075 and the thickness mean about 0.179. These are consequences of the selected avascular slab assumptions. A mature graft’s vascular network invalidates interpreting this as its day-120 oxygen measurement.

There is no concentration threshold or oxygen-to-survival mapping. The diagnostic never multiplies electrical source availability or maturation. Thus the page can show a low slab ratio alongside mature modeled sources without asserting that such a tissue state is biologically viable. A coupled model would require measured vessel distribution, consumption kinetics, remodeling and independently validated oxygen-history effects. The rat mass comparison motivates the question but does not supply those functions. [2]

7. Parameters, units and provenance

Ranges are computational exploration bounds. They are not manufacturing tolerances, anatomical norms or approved implant settings. Defaults marked “evidence-context” provide scale context; the model has no species-specific fitted parameter set.

ParameterDefaultRangeClass & interpretation
Separate muscle grafts
moduleCount
2 1–4 designEach rectangular graft receives one terminal nerve and one differential recording channel.
Graft length
graftLengthMm
30 mm8–80 mmevidence-context30 × 15 × 5 mm is a harvested human graft example in Vu et al. 2020. Dimensions here are editable and are not an optimized implant prescription.
Graft width
graftWidthMm
15 mm3–40 mmevidence-contextA rectangular placement envelope, with x-aligned representative muscle fibers. Real implanted graft geometry is not reconstructed.
Graft thickness
graftThicknessMm
5 mm0.5–15 mmevidence-contextControls geometry and the separate steady slab transport diagnostic. Does not automatically determine survival.
Gap between graft edges
moduleGapMm
10 mm0–50 mmdesignActual edge-to-edge spacing in y. The same coordinates drive the electrical calculation and anatomy view.
Nerve diameter
nerveDiameterMm
2 mm0.2–6 mmdesignAn illustrative terminal nerve envelope. Diameter does not set an anatomical motor-axon count or source amplitude.
Nerve insertion depth
insertionDepthMm
5 mm0–30 mmdesignThe terminal nerve tip is the origin of the assumed intragraft regrowth path; there is no distal nerve stump.
Equivalent units per graft
motorUnitsPerModule
24 units1–64 unitsnumericalA representative equivalent-source cohort, not measured motor-unit number. Changing it changes total source power.
Same-pool allocation
routingFidelity
1 fraction0–1 fractionassumptionProbability that a physical graft source retains its correspondingly labeled command pool. Off-label allocations are synthetic; no fascicle identification or surgical efficacy is predicted.
Equivalent territory radius
territoryRadiusMm
1.2 mm0–8 mmassumptionThree weighted representative fibers span each territory. This is a reduced spatial quadrature, not a histologic fiber census.
Bipolar center spacing
electrodeSpacingMm
8 mm0–60 mmdesignPositive and negative contacts differ along x; zero spacing is the exact common-mode cancellation control.
Pair midpoint along fibers
electrodeOffsetMm
2 mm-35–35 mmdesignMidpoint x relative to each graft center. Geometry normalization keeps contact disks within the rectangular planform.
Pair lateral offset
electrodeLateralMm
0 mm-18–18 mmdesignMidpoint y relative to each graft center; both contacts lie in the x-y plane.
Contact depth below top
electrodeDepthMm
1 mm0–15 mmdesign0 is the top graft face. This controls physical position; it does not specify an insertion procedure.
Contact disk radius
contactRadiusMm
0.4 mm0–3 mmdesignArea-averaged extracellular potential over a disk. Electrode-tissue impedance and contact polarization are not modeled.
Contact quadrature order
contactOrder
3 1–6 numericalGauss integration in squared radius with 4 × order angular samples; refine to assess spatial averaging error.
Longitudinal conductivity
sigmaLongitudinalSm
0.5 S/m0.02–2 S/massumptionConstant conductivity along x throughout the infinite domain. An exploratory value, not a measured graft property.
Transverse conductivity
sigmaTransverseSm
0.1 S/m0.02–2 S/massumptionConstant conductivity along y and z throughout the domain. No muscle-host discontinuity is resolved.
Equivalent tripole current
sourceAmplitudeUa
1 µA0–20 µAassumptionNominal current scale of one unit; each traveling tripole receives half this scale, distributed across three weighted fibers. Absolute amplitudes require calibration.
Source regularization radius
sourceRadiusMm
0.15 mm0.02–2 mmassumptionSmooth ellipsoidal source core in conductivity-transformed coordinates. Explicitly limits point-source singularities; not an anatomical fiber radius.
Tripole pole spacing
poleSpacingMm
1 mm0.1–4 mmassumptionPrescribed +1, −2, +1 source separation. Current balance holds through onset and endpoint tapers.
Prescribed muscle wave speed
conductionVelocityMps
3 m/s0.5–8 m/sassumptionSpeed of the equivalent traveling muscle source; distinct from axonal regrowth in mm/day. No membrane dynamics are solved.
Regrowth onset lag
regenerationLagDays
7 days0–90 daysassumptionAn assumed postconstruction delay before growth from the terminal nerve tip.
Assumed intragraft regrowth
axonSpeedMmDay
1 mm/day0–5 mm/dayassumptionArrival is lag + straight branch length / speed. No mechanistic axon guidance or biological calibration is implied.
Source maturation constant
nmjMaturationDays
21 days0.5–180 daysassumptionAfter assumed arrival, equivalent source amplitude rises exponentially. This is not a validated NMJ formation or force-recovery law.
Available source-amplitude fraction
sourceAvailability
1 fraction0–1 fractionassumptionAn independently imposed amplitude multiplier. It is not an oxygen-derived viability, surviving-cell fraction, or clinical success probability.
Biological observation horizon
durationDays
180 days1–730 daysscenarioTime since construction; independent of the millisecond recording window.
Recording day
observationDay
120 days0–730 daysscenarioSource maturation is evaluated on this day for the finite stochastic recording.
Target command pool
targetModule
0 0–3 scenarioZero-based source-pool label used for target versus other decomposition, not an anatomical motor-function identity.
Target pool drive
targetDrive
0.7 fraction0–1 fractionassumptionDrives synthetic threshold recruitment and independent Poisson event trains; no descending neural control model is included.
Other pools drive
otherDrive
0.7 fraction0–1 fractionassumptionThe same drive is applied to every non-target labeled source pool. Zero provides a target-only experiment.
Rate at recruitment
minFiringHz
8 Hz1–40 HzassumptionPoisson event-rate assumption, not a measurement of reinnervated motor neurons. No refractory period, fatigue or synchronization is modeled.
Rate at full drive
maxFiringHz
24 Hz1–60 HzassumptionSynthetic recruitment thresholds range from 0 to 0.8, with linear rate increase above threshold.
Independent channel noise RMS
noiseRmsUv
5 µV0–100 µVassumptionUser-imposed white Gaussian noise, independent between channels. Not an empirical implant noise floor or impedance prediction.
Recording sample rate
sampleRateHz
8000 Hz1000–12000 HznumericalFinite trace sampling rate. Source kernels are independently oversampled and interpolated at fractional event times; no antialias filter is imposed.
Source waveform oversampling
kernelOversampling
4 factor1–8 factornumericalSource kernels use this many steps per recording sample. Expected variance integrates the piecewise-linear kernel exactly; refine independently to assess waveform error.
Recording window
traceDurationMs
400 ms50–2000 msscenarioA finite realization of prescribed equivalent sources; mean is removed separately from each command-pool trace.
Slab diffusivity
oxygenDiffusivityMm2S
0.002 mm²/s0.0001–0.02 mm²/sassumptionExploratory transport coefficient in D c″ − k c = 0; fixed bath concentrations on the two thickness faces.
First-order consumption
oxygenConsumptionPerS
0.01 s⁻¹0–0.2 s⁻¹assumptionConsumption is k × concentration. This exact steady 1D diagnostic omits capillaries, convection, zero-order metabolism and survival thresholds.
Random seed
seed
2048 0–4294967295 numericalReproducible territories, routing, source strengths, Poisson events and channel noise. Seeds index synthetic realizations, not patients.

Graft dimensions and module layout

Published size context plus exploratory geometryThe 30 × 15 × 5 mm starting dimensions describe the harvested graft in one human study.

The same dimensions define a simplified computational domain. Module count, separation and alternative sizes are design hypotheses; mature shape, folding, atrophy and perfusion are not inferred. [9] [2] [6]

Nerve entry and motor-command routing

Exploratory geometry and functional-mapping assumptionsDifferent reinnervated grafts can convey distinct command-related activity, but fascicles are not guaranteed to represent one isolated action.

Nerve diameter is geometric context, not a calibrated motor-axon count. Routing fidelity specifies hypothetical source-to-command assignments; it is not an observed surgical success probability. [6] [9]

Equivalent motor units and current source

Synthetic source model; uncalibrated coefficientsEMG forward models separate excitable sources from tissue conduction and detector geometry.

Each modeled unit is an equivalent source, not a counted biological motor unit. Current, territory, propagation speed and source regularization are explicit assumptions; absolute microvolt outputs depend on them. [13]

Assumed arrival and source maturation

Prescribed temporal surrogate; not a calibrated regeneration modelExperiments evaluate structural reinnervation and electrical function on different timescales.

A distance/speed arrival time followed by exponential source gain controls the synthetic signal. The gain is not NMJ occupancy, surviving fiber fraction or measured regeneration probability. [1] [2] [5]

Bipolar contact geometry and position

Exploratory geometry with numerical contact integrationPlacement, electrode form and differential recording affect target signal and contamination.

Ideal disk contacts average extracellular potential; bipolar voltage is their difference. No contact impedance, coating, interface capacitance, lead failure or surgical placement error is calculated. [3] [4] [6]

Tissue conductivities

Homogeneous anisotropic conductor assumptionPublished EMG models show that anisotropy, tissue layers and conductivity variations affect recorded fields.

Conductivities in S/m apply throughout space. The displayed graft outline is a source-domain boundary, not an electrical material boundary. Defaults are not measured RPNI conductivity values. [13] [14]

Recruitment, firing and recording noise

Synthetic activity and acquisition assumptionsPublished amplitude and SNR values depend on task, electrode and processing definitions.

Seeded spike trains and additive noise create test signals. Noise, firing rates and input independence are prescribed. A simulated RMS ratio or dB conversion is not a clinical study’s controller performance. [7] [10] [11]

Oxygen transport diagnostic

Exact solution of an assumed steady slab equationGraft size can affect regenerated tissue and function; this does not identify oxygen coefficients or a viability threshold.

D in mm²/s and first-order consumption k in 1/s are hypotheses. The dimensionless concentration ratio assumes equal fixed oxygen at two slab faces. It does not drive source availability or predict survival. [2]

Numerical resolution, seeds and robustness

Numerical resolution and computational experiment designRefining the source time grid tests numerical resolution. Repeating the model with different synthetic populations probes conditional model variability.

Kernels use kernelOversampling steps per recording sample; expected variance and covariance integrate their piecewise-linear interpolants exactly. This does not provide an antialias filter for the recording grid. Use matched seeds for design comparisons, then vary seeds and assumptions. Seed intervals are not patient confidence intervals, and numerical agreement is not biological validation.

8. Numerical verification and reproducibility

Verification checks the declared equations and their implementation. Biological validation asks whether predictions agree with independent observations in a specified experimental domain. The latter has not been performed.

48 of 48 named tests passed: 40 numerical checks and 8 experiment-format checks for model 1.0.0. Source SHA-256 98ce671c27a1076d4d258c29ef6979609a3bf2173f11b7d0f20ce08b3f0b73f2. Recorded with v24.19.0 on linux. These results verify implementation, not biological predictions.

Analytic or physical controlMeasured error / residualToleranceResult
Point solution versus independent isotropic SI calculation: absolute error2.842e-14 µV1.0e-10Passed
Anisotropic axis ratio versus √(σ∥/σ⊥): absolute error0.000 1.0e-12Passed
Disk average versus closed-form on-axis integral: absolute error3.411e-13 µV1.0e-10Passed
Triangular waveform energy versus exact 2/3 ms integral: absolute error0.000 µV²·s1.0e-16Passed
Largest net instantaneous current residual across sampled tripole phases0.000 µA1.0e-14Passed
Two-face inward flux minus integrated first-order consumption: absolute error1.735e-18 normalized concentration·mm/s1.0e-14Passed
Largest clean voltage in a zero-source/noise-only experiment0.000 µVExact zeroPassed

Retained resolution study

Resolution changeChannelExpected clean RMS / µVRelative change
Source waveform oversampling: 4 → 8ch05.180594 → 5.1848450.08200%
Source waveform oversampling: 4 → 8ch114.021849 → 14.0390650.1226%
Contact quadrature order: 3 → 6ch05.180594 → 5.1805946.851e-8%
Contact quadrature order: 3 → 6ch114.021849 → 14.0218610.00008785%

For the retained paired-graft reference, refining the internal kernel from ×4 to ×8 changes expected clean RMS by less than 0.13% on either channel. This bound applies to that benchmark. A source close to a contact, smaller source core, faster wave or different geometry requires its own refinement.

The recorded default solve took 385.6 ms in one local Node run with 48 equivalent units and two channels. Browser and hardware timings vary.

Complete retained numerical verification record
{
  "schema": "rpni-design-numerical-verification",
  "schemaVersion": 1,
  "generatedAt": "2026-10-23T15:11:12.925Z",
  "engine": {
    "version": "1.0.0",
    "source": "src/lib/rpni-design/model.mjs",
    "sha256": "98ce671c27a1076d4d258c29ef6979609a3bf2173f11b7d0f20ce08b3f0b73f2",
    "dependencies": [
      {
        "path": "src/lib/rpni-design/export.mjs",
        "role": "Experiment schema, CSV and provenance export",
        "sha256": "d48d97d447d3acc27a020f0df4cae4c8a29daf7be525c269aa6af6645d5420a9"
      },
      {
        "path": "src/lib/rpni-design/evidence.mjs",
        "role": "Evidence ledger and exported claim provenance",
        "sha256": "a460cd4f8ab2d3e79f23c6693be3717b6689cd9f59d4f3fcdb602fe73c4df686"
      }
    ]
  },
  "environment": {
    "node": "v24.19.0",
    "platform": "linux",
    "architecture": "x64"
  },
  "tests": {
    "count": 48,
    "passed": 48,
    "failed": 0,
    "files": [
      {
        "path": "tests/rpni-design.mjs",
        "sha256": "99f077de917628b8cc56e807738b5f449873c45e7ddba06877a68f2f59afa06e",
        "count": 40,
        "passed": 40,
        "failed": 0,
        "command": "node --test-reporter=tap tests/rpni-design.mjs"
      },
      {
        "path": "tests/rpni-design-export.mjs",
        "sha256": "26b3e8677d44718e1e1bc94d8cca875c108b97cde6577c99d70c4e4d1c5f5131",
        "count": 8,
        "passed": 8,
        "failed": 0,
        "command": "node --test-reporter=tap tests/rpni-design-export.mjs"
      }
    ]
  },
  "checks": [
    {
      "id": "isotropic-si",
      "label": "Point solution versus independent isotropic SI calculation: absolute error",
      "measured": 2.842170943040401e-14,
      "tolerance": 1e-10,
      "unit": "µV",
      "pass": true
    },
    {
      "id": "anisotropy-axis",
      "label": "Anisotropic axis ratio versus √(σ∥/σ⊥): absolute error",
      "measured": 0,
      "tolerance": 1e-12,
      "unit": "",
      "pass": true
    },
    {
      "id": "disk-integral",
      "label": "Disk average versus closed-form on-axis integral: absolute error",
      "measured": 3.410605131648481e-13,
      "tolerance": 1e-10,
      "unit": "µV",
      "pass": true
    },
    {
      "id": "linear-energy",
      "label": "Triangular waveform energy versus exact 2/3 ms integral: absolute error",
      "measured": 0,
      "tolerance": 1e-16,
      "unit": "µV²·s",
      "pass": true
    },
    {
      "id": "net-source-current",
      "label": "Largest net instantaneous current residual across sampled tripole phases",
      "measured": 0,
      "tolerance": 1e-14,
      "unit": "µA",
      "pass": true
    },
    {
      "id": "slab-conservation",
      "label": "Two-face inward flux minus integrated first-order consumption: absolute error",
      "measured": 1.734723475976807e-18,
      "tolerance": 1e-14,
      "unit": "normalized concentration·mm/s",
      "pass": true
    },
    {
      "id": "zero-source",
      "label": "Largest clean voltage in a zero-source/noise-only experiment",
      "measured": 0,
      "tolerance": 0,
      "unit": "µV",
      "pass": true
    }
  ],
  "convergence": [
    {
      "parameter": "kernelOversampling",
      "coarse": 4,
      "fine": 8,
      "channel": "ch0",
      "metric": "Expected clean RMS at the default benchmark",
      "unit": "µV",
      "coarseValue": 5.180593937981942,
      "fineValue": 5.184845320784153,
      "absoluteDifference": 0.004251382802211268,
      "relativeDifference": 0.0008199632851473939,
      "tolerance": 0.002,
      "pass": true
    },
    {
      "parameter": "kernelOversampling",
      "coarse": 4,
      "fine": 8,
      "channel": "ch1",
      "metric": "Expected clean RMS at the default benchmark",
      "unit": "µV",
      "coarseValue": 14.021849017327721,
      "fineValue": 14.039064758557398,
      "absoluteDifference": 0.01721574122967695,
      "relativeDifference": 0.0012262740806280015,
      "tolerance": 0.002,
      "pass": true
    },
    {
      "parameter": "contactOrder",
      "coarse": 3,
      "fine": 6,
      "channel": "ch0",
      "metric": "Expected clean RMS at the default benchmark",
      "unit": "µV",
      "coarseValue": 5.180593937981942,
      "fineValue": 5.180593941531103,
      "absoluteDifference": 3.5491609651217004e-9,
      "relativeDifference": 6.850876569709999e-10,
      "tolerance": 0.001,
      "pass": true
    },
    {
      "parameter": "contactOrder",
      "coarse": 3,
      "fine": 6,
      "channel": "ch1",
      "metric": "Expected clean RMS at the default benchmark",
      "unit": "µV",
      "coarseValue": 14.021849017327721,
      "fineValue": 14.021861335907406,
      "absoluteDifference": 0.000012318579685199893,
      "relativeDifference": 8.785267084088385e-7,
      "tolerance": 0.001,
      "pass": true
    }
  ],
  "benchmarks": {
    "defaultRuntimeMs": 385.56744099999923,
    "defaultConfiguration": {
      "moduleCount": 2,
      "graftLengthMm": 30,
      "graftWidthMm": 15,
      "graftThicknessMm": 5,
      "moduleGapMm": 10,
      "nerveDiameterMm": 2,
      "insertionDepthMm": 5,
      "motorUnitsPerModule": 24,
      "routingFidelity": 1,
      "territoryRadiusMm": 1.2,
      "electrodeSpacingMm": 8,
      "electrodeOffsetMm": 2,
      "electrodeLateralMm": 0,
      "electrodeDepthMm": 1,
      "contactRadiusMm": 0.4,
      "contactOrder": 3,
      "sigmaLongitudinalSm": 0.5,
      "sigmaTransverseSm": 0.1,
      "sourceAmplitudeUa": 1,
      "sourceRadiusMm": 0.15,
      "poleSpacingMm": 1,
      "conductionVelocityMps": 3,
      "regenerationLagDays": 7,
      "axonSpeedMmDay": 1,
      "nmjMaturationDays": 21,
      "sourceAvailability": 1,
      "durationDays": 180,
      "observationDay": 120,
      "targetModule": 0,
      "targetDrive": 0.7,
      "otherDrive": 0.7,
      "minFiringHz": 8,
      "maxFiringHz": 24,
      "noiseRmsUv": 5,
      "sampleRateHz": 8000,
      "kernelOversampling": 4,
      "traceDurationMs": 400,
      "oxygenDiffusivityMm2S": 0.002,
      "oxygenConsumptionPerS": 0.01,
      "seed": 2048
    },
    "defaultExpectedRmsUv": [
      7.199899551400369,
      14.886646696443574
    ],
    "defaultExpectedCleanRmsUv": [
      5.180593937981942,
      14.021849017327721
    ],
    "defaultRecordingRmsUv": [
      7.3849658600421835,
      13.89052754594968
    ],
    "defaultRecordingCleanRmsUv": [
      5.54854802332629,
      13.125700837078725
    ],
    "defaultOxygenCenterRatio": 0.0074686821920171564,
    "defaultOxygenMeanRatio": 0.17888044890697827,
    "expectedRmsInterpretation": "Stationary centered independent-Poisson equivalent-source variance; total expected RMS includes the imposed noise variance.",
    "recordingRmsInterpretation": "Finite seeded, mean-removed waveform realization with independent imposed noise; it is not expected to equal ensemble RMS exactly.",
    "timingInterpretation": "One local Node run, not a hardware-independent or browser performance guarantee."
  },
  "passed": true,
  "interpretation": "Verifies stated analytical limits, implementation invariants, selected default refinements, and strict experiment schema behavior. This does not validate biological remodeling, graft survival, absolute RPNI voltage, clinical SNR, electrode safety, or a design optimum. Refinement tolerances apply only to the retained benchmark; arbitrary geometries can require additional refinement."
}

Physics limits

Isotropic Green-function limit, units, current linearity, conductivity scaling and source superposition.

Source and detector controls

Instantaneous current balance, finite contact integration, coincident bipolar cancellation and polarity reversal.

Resolution

Contact quadrature and temporal refinement assess the declared discretization; extreme near-contact sources require their own refinement.

Transport

Exact face conditions, symmetry, zero-consumption limit, profile/mean agreement and the diffusion–reaction equation.

Event and statistical limits

Zero drive, zero source, zero regrowth, independent source power and finite-trace component accounting.

Reproducible designs

Seeded geometry and events, normalized geometry bounds, exact-version parameter restore and source-independent transport.

Controlled studies and uncertainty

A sweep varies one requested parameter over five values with a common seed. Dependent geometry can normalize to different effective values, all retained. Seed studies vary the synthetic source realization at fixed parameters; their 10th–90th percentile interval excludes parameter uncertainty, patient variability, measurement error and model-form error. It is not a biological confidence interval.

Absolute amplitude is nonidentifiable from RMS alone: increasing current, decreasing conductivity, increasing source count or increasing source gain can compensate for each other. Before fitting, specify which parameters are independently measured and which endpoints will be tested. Fitting one waveform does not validate distant cross-talk, transport or human outcomes.

Exports and restore

Experiment JSON retains the exact model version, normalized design, geometry, sources, waveform kernels, recordings, metrics, biological-age samples, transport solution, comparisons and assumptions. Recording CSV preserves each channel’s total, clean, target, other and noise samples in µV. Growth CSV preserves slow-time values and explicitly named expected metrics.

Restore accepts only the exact current format/model version and a complete finite numeric configuration satisfying supported bounds. Unknown keys, malformed values, incompatible versions and geometry-changing normalization are rejected. Saved result objects are ignored and recomputed. Display state, pinned references and previous studies are retained in the export for inspection but are not silently restored.

Inspect the numerical engine · Inspect the numerical tests · Read the scientific specification

9. What would establish predictive validity?

A useful validation dataset would connect the same construct’s measured three-dimensional graft/contact geometry, nerve inputs, reinnervation state, raw multichannel recordings, acquisition settings and source-isolation experiments. Transport validation additionally needs vessel or oxygen measurements over time. Calibration and held-out testing should be separated by construct or subject, not merely adjacent waveform samples.

Future validation targetPublished anchorRequired comparison & missing data
Graft geometry and tissue outcome
Candidate validation study; no fit performed. The current oxygen slab cannot reproduce survival or force.
Rat graft-mass groups differed in tissue regeneration, CMAP and force. [2] A later coupled biological model should predict independently measured histology and electrophysiology across held-out geometries.
Individual geometry, vascular measurements, fiber counts, electrode positions and subject-level outcome data.
Target signal versus crosstalk
Mechanism-informed comparison only; no percentage imported as a universal crosstalk target.
Recordings change when neighboring sources or recording configurations change. [4] [3] [6] Measure one graft at a time, preserving contact geometry, and compare off-target/target RMS transfer ratios with simulation.
Three-dimensional electrode and source locations, conductivity estimates, raw traces and matched activation levels.
Human channel amplitudes and stability
No human calibration. Matching an amplitude by adjusting source current would not validate the mechanism.
Human studies demonstrate voluntary RPNI signals and repeated recordings. [9] [10] Fit source scale and acquisition noise on a training session, then evaluate waveform and amplitude predictions on separate sessions.
Matched graft geometry, acquisition filters, source recruitment, electrode position and independently measured noise.
Functional hand and wrist control
Outside this forward model. No simulated SNR-to-task-accuracy conversion is supplied.
Published systems evaluate behavior, control errors and task completion in addition to electrical signal quality. [8] [7] [11] A future decoder module needs defined training/test splits and prospective closed-loop task validation.
Labeled motor commands, multi-channel recordings, controller implementation and task-level outcomes.
Sensory stimulation
Outside this recording model. Passive field strength does not establish percept quality or safe stimulation.
Perception, discomfort, localization and discrimination are experimentally distinct outcomes. [12] A future stimulation model would require electrode electrochemistry, axon activation and participant-specific psychophysics.
Validated recruitment models, electrode polarization, actual nerve trajectories and prospective percept measurements.

Unresolved endpoints

  • Graft survival probability, clinical efficacy, neuroma pain, prosthesis task accuracy or an optimized surgical prescription.
  • Patient-specific anatomy, cell-resolved angiogenesis, free-graft myonecrosis and myogenesis, or measured motor-unit reconstruction.
  • Nerve conduits, sieve electrodes, TEENI constructs, targeted muscle reinnervation and dermal or composite RPNIs as interchangeable configurations.
  • Layered scar/skin/fat fields, full membrane electrophysiology, muscle force, electrode electrochemistry and mechanical failure.
  • Stimulus recruitment, safe charge limits, sensory perception and stimulation discomfort thresholds.

Sensory responses to RPNI stimulation have been studied experimentally, including separate perception and discomfort assessments. Those observations do not provide an electrical safety rule or a sensory-threshold model for this recording simulator. [12]

10. Primary-source evidence dossier

Reviewed 2026-10-23. Original human, animal and computational studies remain separately identified. No source below validates the complete browser model, and a listed intervention is not automatically implemented.

[01]
2014

Regenerative peripheral nerve interface viability and signal transduction with an implanted electrode

Kung TA et al. · Primary animal experiment; seven-month electrode study
Rat; 16 free EDL muscle grafts
DOI: 10.1097/PRS.0000000000000168

Reported findingFree grafts developed vascular supply, axonal ingrowth and neuromuscular connections. Both stainless steel and PEDOT-coated electrodes recorded evoked muscle responses; coating affected amplitude.

Use in this modelDefines the nerve-to-muscle-to-electrode interface and separates biological regeneration from electrical recording.

BoundaryNo universal human graft-survival rule, source-current calibration or electrode-service-life guarantee follows from this rat experiment.

[02]
2021

Regenerative peripheral nerve interface free muscle graft mass and function

Hu Y et al. · Primary animal experiment; four initial graft masses
Rat; divided peroneal nerve and free muscle grafts
DOI: 10.1002/mus.27138

Reported findingAt three months, 150 and 300 mg grafts had greater CMAP and force measures than 600 and 1200 mg grafts; larger grafts contained central regions without regenerated muscle fibers.

Use in this modelMotivates examining transport distance alongside electrical pickup when varying graft geometry.

BoundaryThese rat mass groups do not establish a human thickness cutoff or a quantitative oxygen-to-survival relation.

[03]
2016

Regenerative Peripheral Nerve Interface for Prostheses Control: Electrode Comparison

Sando IC et al. · Primary chronic electrode comparison; four months
Rat; native EDL muscles, patch n = 4 and hook n = 6
DOI: 10.1055/s-0035-1565248

Reported findingEpimysial patches recorded larger target responses than intramuscular hooks, and bipolar recording reduced noise relative to monopolar recording in the tested preparation.

Use in this modelMotivates contact geometry, positioning and differential recording as separate design variables.

BoundaryDespite the title, this comparison used native muscle implantation; its ranking is not a universal result for regenerated human grafts.

[04]
2014

Quantification of muscle-derived signal interference during monopolar needle electromyography of a peripheral nerve interface in the rat hind limb

Woo SL et al. · Primary conference study; adjacent-muscle removal experiment
Rat; 18 preparations with preserved neurovascular supply
DOI: 10.1109/EMBC.2014.6944595

Reported findingRemoving adjacent anterior-compartment muscles reduced monopolar EDL CMAP amplitude by 32 ± 18% (mean ± SD), demonstrating substantial volume-conducted contamination in that configuration.

Use in this modelSupports explicit source-by-source crosstalk measurements rather than equating recorded voltage with target activity.

BoundaryThe preparation preserved innervation and perfusion. Its contamination fraction is not a benchmark for all regenerated grafts or bipolar electrodes.

[05]
2016

In vivo characterization of regenerative peripheral nerve interface function

Ursu DC et al. · Primary treadmill EMG and kinematics experiment
Rat; two animals each in RPNI, intact-control and denervated groups
DOI: 10.1088/1741-2560/13/2/026012

Reported findingFour-month RPNIs produced gait-related signals around 1 mV peak-to-peak during walking and below 0.1 mV during standing; denervated preparations remained relatively quiet.

Use in this modelSuggests active/rest and source-isolation experiments for later validation.

BoundarySmall animal groups and task-specific recordings; simulated signal magnitudes are not fitted to these observations.

[06]
2017

Adjacent regenerative peripheral nerve interfaces produce phase-antagonist signals during voluntary walking in rats

Ursu D et al. · Primary adjacent-graft and gait experiment
Rat; two dual-RPNI animals and two controls
DOI: 10.1186/s12984-017-0243-0

Reported findingAdjacent grafts innervated by antagonist nerves showed different gait-phase activation patterns at four months. Bipolar patches were placed on opposite sides of the graft pair.

Use in this modelMotivates independent graft inputs, electrode placement and off-target pickup comparisons.

BoundaryNo universal minimum graft separation was established. Correlation can reflect neural coactivation as well as electrical crosstalk.

[07]
2018

Regenerative peripheral nerve interfaces for real-time, proportional control of a Neuroprosthetic hand

Frost CM et al. · Primary EMG-to-prosthesis demonstration
Rat; RPNI, intact and denervated groups
DOI: 10.1186/s12984-018-0452-1

Reported findingIntegrated EMG supported graded hand actuation. Active/rest iEMG ratios were 3.81 ± 0.52 for RPNIs and 3.55 ± 0.38 for controls (mean ± SD).

Use in this modelShows why signal processing and task definitions belong beside a reported recording metric.

BoundaryThe ratios used integrated EMG and a particular controller; they are neither decibels nor the laboratory model’s RMS/noise metric.

[08]
2016

Chronic recording of hand prosthesis control signals via a regenerative peripheral nerve interface in a rhesus macaque

Irwin ZT et al. · Primary chronic recording and behavioral study
Rhesus macaque; nine RPNIs in two animals
DOI: 10.1088/1741-2560/13/4/046007

Reported findingRPNI EMG associated with cued finger movements was recorded for up to 20 months; reported SNR exceeded eight under the study’s recording conditions.

Use in this modelSupports distinct motor-command inputs and the need to evaluate chronic signal stability.

BoundaryTwo nonhuman primates do not supply human longevity distributions, electrode failure probabilities or a geometry-to-control function.

[09]
2020

A regenerative peripheral nerve interface allows real-time control of an artificial hand in upper limb amputees

Vu PP et al. · Primary nonrandomized feasibility study
Human; four reported participants, two prosthesis-control participants
DOI: 10.1126/scitranslmed.aay2857

Reported findingThe protocol harvested 30 × 15 × 5 mm muscle grafts. RPNIs showed voluntary contractions and motor-related EMG; two participants performed prosthetic control tasks.

Use in this modelProvides a labeled human-scale starting geometry and motivates separate biological and recording endpoints.

BoundaryHarvest dimensions are not mature graft measurements or an optimized prescription. Electrode spacing, targeting and time after surgery varied.

[10]
2023

Long-term upper-extremity prosthetic control using regenerative peripheral nerve interfaces and implanted EMG electrodes

Vu PP et al. · Primary longitudinal recording and control study
Human; two participants
DOI: 10.1088/1741-2552/accb0c

Reported findingRPNI active/rest RMS ratios remained above 15 through observations up to 276 and 1054 days. Control experiments used RPNI and residual-muscle channels together.

Use in this modelMotivates recording repeatability, explicit noise definitions and combined-channel evaluation.

BoundaryThe ratio is not dB. A two-participant series cannot calibrate a survival probability, general decoder accuracy or the assumed source-current scale.

[11]
2026

Regenerative peripheral nerve interfaces (RPNIs) and implanted electrodes improve online control of prostheses for hand and wrist

Wallace DM et al. · Primary implanted-versus-surface control comparison
Human; two transradial participants
DOI: 10.1088/1741-2552/ae36d2

Reported findingA combined RPNI/residual-muscle implanted-electrode system supported more accurate hand-and-wrist control than the tested surface recordings, including during arm motion.

Use in this modelIdentifies channel independence, motion robustness and task-level validation as distinct future endpoints.

BoundaryOne participant completed the functional coffee task. The study does not isolate RPNI geometry effects or establish population-wide comparative effectiveness.

[12]
2024

Electrical Stimulation of Regenerative Peripheral Nerve Interfaces (RPNIs) Induces Referred Sensations in People With Upper Limb Loss

Gonzalez MA et al. · Primary longitudinal sensory-stimulation study
Human; four participants
DOI: 10.1109/TNSRE.2023.3345164

Reported findingElectrical stimulation elicited sensations referred to the missing limb. Perception, discomfort and discrimination were measured as distinct endpoints over observations extending to 54 months.

Use in this modelDefines the evidence needed for a future sensory module; the present laboratory models recording only.

BoundaryPercept locations and thresholds depended on participant and interface. They cannot be inferred from recording amplitude or a passive field map.

[13]
2001

A novel approach for precise simulation of the EMG signal detected by surface electrodes

Farina D, Merletti R · Primary mathematical model
Computational; muscle-fiber source and volume-conductor model
DOI: 10.1109/10.923782

Reported findingSeparates the traveling muscle source, layered anisotropic tissue and electrode spatial filtering, including source generation and extinction at fiber boundaries.

Use in this modelMotivates explicit source, conductor and finite-contact components.

BoundaryThis laboratory is a simpler original approximation. It does not reproduce the paper’s layered or capacitive conductor, detailed fiber currents or physiological end effects.

[14]
2006

An analytical model for surface EMG generation in volume conductors with smooth conductivity variations

Mesin L, Farina D · Primary analytical volume-conductor model
Computational; anisotropic muscle and nonuniform subcutaneous layer
DOI: 10.1109/TBME.2006.872825

Reported findingAnalyzes how spatial conductivity variation changes extracellular EMG using a layered conductor and perturbation method.

Use in this modelIdentifies tissue heterogeneity as a material limitation of a homogeneous anisotropic approximation.

BoundaryThe current solver has one conductivity tensor throughout space; it does not reproduce tissue boundaries, scars, fat or skin layers.

[15]
2016

Development of a Regenerative Peripheral Nerve Interface for Control of a Neuroprosthetic Limb

Urbanchek MG et al. · Primary developmental tissue-engineering experiment
Rat; 25 cultured-myoblast scaffold constructs
DOI: 10.1155/2016/5726730

Reported findingCultured-myoblast constructs formed vascularized muscle, nerve connections and recordable evoked responses after implantation, with a mean evaluation time of 93 days.

Use in this modelHistorical evidence that regeneration and neuromuscular coupling are separate requirements for a biological interface.

BoundaryThese were myoblast-populated scaffolds, not conventional autologous free muscle grafts; their dimensions and maturation cannot be transferred directly.

← Return to the RPNI Design & Testing Laboratory