Bicycle Pedal Stroke Simulator

Technical Guide & Equation Reference

This document describes the biomechanical model, physics equations, and research basis for the interactive pedal stroke simulator. The simulator compares two crank lengths side-by-side, showing how crank length affects joint kinematics, pedal forces, power output, and metabolic efficiency.

Contents 1. Coordinate System & Geometry 2. Rider Geometry & Bike Fit 3. Inverse Kinematics (Leg Model) 4. Pedal Force Model 5. Torque & Power 6. Efficiency Models 7. Optimal Cadence 8. Constant Power Mode 9. Assumptions & Limitations 10. Research References

1. Coordinate System & Geometry

The model uses a 2D sagittal-plane (side view) coordinate system:

This means:

Pedal Position

The pedal traces a circle of radius L (crank length) around the bottom bracket:

px(θ) = L · sin(θ)
py(θ) = L · cos(θ)

At TDC (θ=0): pedal is at (0, +L), directly above the BB.
At BDC (θ=π): pedal is at (0, −L), directly below the BB.


2. Rider Geometry & Bike Fit

Leg Segment Lengths

The rider's leg is modeled as two rigid segments (thigh and shank) connected at the knee. Segment lengths are derived from inseam (standing leg length) using standard anthropometric ratios from biomechanics literature:

Lthigh = Linseam × 0.512
Lshank = Linseam × 0.488

For the default 840 mm inseam: thigh = 430 mm, shank = 410 mm.

Hip Position

The hip joint is fixed (rigid torso assumption). Its horizontal position is:

xhip = −0.02 m (2 cm behind the BB, typical road bike geometry)

The vertical position (seat height) is the critical fit parameter. It is automatically computed so that the rider's knee is at 150° internal angle when the pedal is at BDC — this is a standard bike fitting rule (30° of flexion from full extension). This models what a real rider does: when you change crank length, you adjust your seat height to maintain proper fit.

Derivation of Hip Height

At BDC, the pedal is at position (0, −L). The distance from hip to pedal must equal the distance between hip and ankle when the knee is at 150°. Using the law of cosines:

dBDC = √(Lthigh² + Lshank² − 2 · Lthigh · Lshank · cos(150°))

Since cos(150°) ≈ −0.866, the double-negative makes dBDC larger than either segment alone. Then:

yhip = √(dBDC² − xhip²) − Lcrank

The subtraction of Lcrank accounts for the fact that the pedal is Lcrank below the BB at BDC, and the hip must be positioned so the total hip-to-pedal distance equals dBDC.

Key insight: When you shorten the crank, the hip drops (seat lowers) by approximately the same amount. A 20 mm crank reduction results in roughly a 20 mm seat height reduction. This keeps the knee angle at BDC constant, which is the primary bike fit constraint.
Crank LengthHip Height (yhip)Change from 170mm
150 mm661 mm−20 mm
170 mm641 mm—
180 mm631 mm−10 mm

3. Inverse Kinematics (Leg Model)

Given the hip position (fixed) and pedal position (varies with θ), we solve for the knee position using a 2-link inverse kinematics solver based on the law of cosines. This is the geometric core of the simulator.

Step 1: Distance from Hip to Pedal

Δx = px − xhip
Δy = py − yhip
d = √(Δx² + Δy²)

The distance d is clamped to the reachable range to prevent mathematical errors:

dmin = |Lthigh − Lshank| + 0.001
dmax = Lthigh + Lshank − 0.001
d = clamp(d, dmin, dmax)

Step 2: Angle from Hip to Pedal

α = atan2(Δy, Δx)

Step 3: Knee Internal Angle (Law of Cosines)

The internal angle at the knee joint (the angle between thigh and shank, measured on the posterior side):

cos(θknee) = (Lthigh² + Lshank² − d²) / (2 · Lthigh · Lshank)
θknee = arccos(clamp(cos(θknee), −1, 1))

Step 4: Thigh Angle

The offset angle β accounts for the triangle geometry:

cos(β) = (Lthigh² + d² − Lshank²) / (2 · Lthigh · d)
β = arccos(clamp(cos(β), −1, 1))

φthigh = α + β

The + sign places the knee anterior (in front of) the hip-to-pedal line, which is the anatomically correct configuration for cycling.

Step 5: Knee Position

xknee = xhip + Lthigh · cos(φthigh)
yknee = yhip + Lthigh · sin(φthigh)

Step 6: Anatomical Joint Angles

For the dashboard display, we compute anatomical angles that correspond to how joint angles are reported in clinical biomechanics:

Hip flexion (relative to vertical trunk):
  θhip = atan2(xknee − xhip, yhip − yknee) × 180/π

Knee flexion (0° = fully extended):
  θknee-flex = (180° − θknee)

The range of motion (ROM) is the difference between maximum and minimum joint angle across one full pedal revolution:

ROMhip = max(θhip) − min(θhip) over θ ∈ [0, 2π)
ROMknee = max(θknee-flex) − min(θknee-flex) over θ ∈ [0, 2π)

Typical ROM Values (default parameters)

Crank LengthHip ROMKnee ROM
150 mm44.4°75.1°
170 mm49.5°81.8°
180 mm52.1°85.1°

These align closely with published research: Barratt et al. reported hip ROM of ~45° at 150 mm vs ~51° at 180 mm, and knee ROM of ~67° at 150 mm vs ~75° at 180 mm (our model's absolute values differ slightly due to simplified 2-link geometry, but the trends and magnitudes are consistent).


4. Pedal Force Model

The effective (tangential) pedal force — the component that actually produces crank torque — varies through the pedal stroke. The model uses a phenomenological profile that approximates measured pedal force data from instrumented studies:

Downstroke (0 ≤ θ < π)

Feff(θ) = Fpeak · sin(θ) · (1 + 0.1 · sin(2θ − π/3))

The primary sin(θ) term creates the basic activation pattern: zero at TDC, peak near 90°, back to zero at BDC. The modulation term (1 + 0.1 · sin(2θ − π/3)) introduces two effects:

Upstroke (π ≤ θ < 2π)

Feff(θ) = −Fpeak · kupstroke · sin(θ − π)

where kupstroke = 0.05 (5% of peak downstroke force). The negative sign indicates this force opposes crank rotation — during the upstroke, the weight of the rising leg resists motion. Even with clipless pedals, most riders produce very little positive upstroke force; trained cyclists with clipless pedals might reach kupstroke = 0.15–0.25.

Important: Feff represents the tangential component of pedal force — the part perpendicular to the crank arm that produces torque. The radial component (along the crank arm) does no useful work. Force-instrumented pedals measure both components, but only the tangential component matters for propulsion. Our model defines the force profile directly as this effective tangential component.

5. Torque & Power

Instantaneous Crank Torque

Torque is force times lever arm length:

τ(θ) = Feff(θ) × Lcrank

This is the fundamental mechanical advantage equation. Longer cranks multiply force into more torque, but research shows that within the typical 145–175 mm range, this advantage is almost entirely offset by compensatory changes in cadence and pedaling mechanics (see References).

Instantaneous Power

Power is torque times angular velocity:

P(θ) = τ(θ) × ω

where ω is the angular velocity in radians per second:

ω = 2π × cadencerpm / 60

Since ω is constant (steady-state cadence assumption), instantaneous power has exactly the same shape as the force profile — just scaled by Lcrank × ω.

Average Power

The average power over one complete revolution is the mean of instantaneous power across 360 evenly-spaced samples:

Pavg = (1/360) × Σi=0359 P(θi)

Cumulative Energy

Displayed during animation as the total mechanical work done:

E(t) = Pavg × t     (in joules; displayed as kJ)

6. Efficiency Models

The simulator reports two efficiency metrics, reflecting the distinction between physiological and whole-system efficiency.

Physiological (Metabolic) Efficiency

This is the research-derived efficiency of converting metabolic energy into mechanical work at the pedals. It varies with crank length based on a linear interpolation of published data from Barratt et al.:

ηbase(L) = 0.221 − (0.005 / 0.030) × (L − 0.150)

where L is crank length in meters. This gives:

Crank Lengthηbase
150 mm22.1%
165 mm21.85%
170 mm21.77%
175 mm21.68%
180 mm21.6%

The value is clamped to the range [15%, 25%] for extreme crank lengths outside the research data range.

Why shorter cranks are more efficient: Shorter cranks reduce the range of motion at the hip and knee joints. This means the leg muscles operate closer to their optimal length-tension relationship throughout the pedal stroke, and less energy is wasted on accelerating/decelerating the limbs through large angular excursions. The muscles also operate at more favorable shortening velocities (force-velocity relationship). The effect is modest (~0.5% absolute between 150 mm and 180 mm) but measurable and consistent across studies.

Gross Efficiency

The net efficiency including basal (resting) metabolic cost. This represents the overall fraction of total energy expenditure that becomes mechanical work:

ηgross = Pavg / (Pavg / ηbase + Prest)

where Prest = 75 W is the resting metabolic rate. This value is always lower than ηbase because the resting metabolic cost is a fixed overhead that dilutes efficiency. At low power outputs, gross efficiency is much lower than metabolic efficiency; at high power outputs, they converge.


7. Optimal Cadence

Research shows that the cadence which minimizes metabolic cost (or maximizes efficiency) shifts upward with shorter cranks. The model uses an empirical fit:

cadenceoptimal(L) = 120 × √(0.170 / L)

Calibrated against research data:

Crank LengthModel PredictionResearch Data
150 mm~128 rpm~130 rpm
170 mm120 rpm120 rpm (reference)
200 mm~111 rpm~110–120 rpm

The square-root scaling reflects the biomechanical principle that shorter cranks reduce pedal travel distance per revolution, allowing higher spin rates before muscle contraction velocity penalties dominate. This value is displayed as a reference only — the user sets their own cadence.


8. Constant Power Mode

The simulator offers two comparison modes:

Constant Force Mode (default)

Both sides use the same peak pedal force (Fpeak). This shows the pure mechanical effect of crank length: the longer crank produces more torque and power simply because τ = F × L. This is useful for understanding the physics, but doesn't reflect how a rider actually behaves.

Constant Power Mode

Side B's peak force is adjusted so that its average power matches Side A. This models a rider who adjusts their effort to maintain the same output regardless of crank length:

Fpeak,B(adjusted) = Fpeak × (Pavg,A / Pavg,B)

This mode reveals the interesting finding from research: to maintain the same power with shorter cranks, a rider pushes slightly harder per stroke, but the net effect on perceived effort and fatigue is still lower due to reduced joint excursion and more favorable muscle mechanics.


9. Assumptions & Limitations

  1. Rigid links: No soft tissue deformation, no shoe/pedal compliance, no elastic energy storage in tendons.
  2. Sagittal plane only: 2D model. No lateral knee motion, no Q-factor (pedal stance width), no hip ab/adduction. Real cycling involves non-trivial out-of-plane motion, especially at the knee.
  3. Fixed hip: No pelvic rock, no postural sway, no saddle interaction. In reality, the hip oscillates several millimeters per pedal stroke, especially at high cadences.
  4. Single leg: Only one leg is modeled per side. The contralateral leg would be 180° out of phase but is omitted for visual clarity.
  5. No inertial effects: The model assumes constant angular velocity (no flywheel effects, no crank acceleration within a revolution). Real pedaling involves crank speed fluctuations of ±5–15% within each revolution.
  6. Steady state: Constant cadence, no fatigue progression, no metabolic drift.
  7. Phenomenological force profile: The pedal force shape is an approximation based on typical EMG and force-pedal data. A true musculoskeletal model would compute forces from individual muscle activations using Hill-type muscle models, accounting for force-length and force-velocity relationships. This would make the force profile itself depend on crank length, but requires ~50 muscle parameters and substantially more computational complexity.
  8. Linear efficiency interpolation: The metabolic efficiency is linearly interpolated between two data points (150 mm and 180 mm). The true relationship may be nonlinear, and individual variation is large.

10. Research References

The following published studies informed the model parameters and validation targets:

Joint Kinematics & Crank Length

[1] Barratt, P.R., Korff, T., Elmer, S.J., & Martin, J.C. (2011). "Effects of Pedal Speed and Crank Length on Pedaling Mechanics during Submaximal Cycling." Medicine & Science in Sports & Exercise. PMC5638423
— Key findings used: crank length significantly affects ankle, knee, and hip angular excursions (p<0.001). Hip and knee ROM increase with longer cranks. Joint moments are largely unaffected by crank length at matched pedal speeds.

[2] Turpin, N.A. & Watier, B. (2025). "The impact of minor crank length adjustments on lower body cycling kinematics." Sports Biomechanics. DOI link
— Minor crank reductions decrease hip and knee flexion and limit non-sagittal plane motion, potentially reducing overuse injury risk.

Efficiency & Economy

[3] Phan, G.T., et al. (2022). "Cycling with Short Crank Lengths Improved Economy in Novices." International Journal of Exercise Science. PMC8758175
— Novice cyclists achieved 3–5.5% greater power output with 145 mm cranks vs 175 mm at 60% VO2peak, with no difference in physiological parameters (HR, RER, lactate). Cycling economy was significantly better at all time points (p<0.03). Large effect sizes (Cohen's d = 0.80–1.19).

[4] ThickBits Research. "Optimal Crank Length Analysis." thickbits.com
— Comprehensive analysis showing: within 145–170 mm range, power varies by only ~1.6%. Gross efficiency: ~22.1% at 150 mm vs ~21.6% at 180 mm. Optimal cadence scales from ~130 rpm at 150 mm to ~110–120 rpm at 200+ mm.

Fatigue & Performance

[5] Ortega-Montiel, J., et al. (2025). "Effects of crank length on cycling efficiency, sprint performance, and perceived fatigue in high-level amateur road cyclists." PeerJ. PMC12060448
— 28 trained cyclists (VO2max ~59 ml/kg/min). No significant differences in sprint peak power (~13.2 W/kg) or economy across 165/170/175 mm cranks. Perceived fatigue (RPE) was significantly lower with shorter cranks: 3.21±0.88 at 165 mm vs 4.50±0.69 at 175 mm (p<0.001, δ=−0.72).

Torque & Force Modeling

[6] Rasmussen, J., et al. (2015). "Prediction of crank torque and pedal angle profiles during pedaling movements by biomechanical optimization." Structural and Multidisciplinary Optimization. Springer link
— Inverse-inverse dynamics method for predicting pedaling motion. Musculoskeletal model with parameterized movement optimized against user-defined cost functions.

[7] Quintana-Duque, J.C., et al. (2015). "Estimation of Torque Variation from Pedal Motion in Cycling." Proc. ISBS. PDF
— Methods for estimating crank torque from motion data. Net torque decomposition into applied torque and brake torque components.

Aerodynamic Case Study

[8] British Cycling / ThickBits analysis of Bradley Wiggins' hour record preparation.
— Crank reduction from 177.5 mm to 165 mm allowed a 30 mm front-end drop, resulting in ~3.5% aerodynamic drag (CdA) reduction. Demonstrates that shorter cranks enable more aggressive aerodynamic positioning as a secondary benefit beyond the direct biomechanical effects.


Bicycle Pedal Stroke Simulator — Technical Guide
Model equations and research review compiled February 2026