Modelling road cycling as motion on a curve

We present a mathematical model of road cycling on arbitrary routes using the Frenet–Serret frame. The route is embedded in the coupled governing equations. We describe the mathematical model and numerical implementation. The dynamics are governed by a balance of forces of gravity, drag, and friction, along with pedalling or braking. We analyse steady-state speed and power against gradient and curvature. The centripetal acceleration is used as a control to determine transitions between pedalling and braking. In our model, the rider looks ahead at the curvature of the road by a distance dependent on the current speed. We determine such a distance (1–3 s at current speed) for safe riding and compare with the mean power. The results are based on a number of routes including flat and downhill, with variations in maximum curvature, and differing number of bends. We find the braking required to minimise centripetal acceleration occurs before the point of maximum curvature, thereby allowing acceleration by pedalling out of a bend.


Introduction
Cycling concerns human power transmission on a bicycle to overcome forces to produce motion. Pedalling drives motion, while braking, friction, and drag act against motion. Gravity assists motion on descents and opposes on ascents (Fig. 1). Studies in cycling analyse these forces on each bicycle component individually and as a whole [1].
Aerodynamics in cycling has been studied extensively. Drag forces while drafting vary by seating position [2] on flat and ascents [3]. Bicycle design is continuously developing to improve aerodynamics [4,5]. Cornering influences aerodynamics as a change in direction increases the magnitude of the airflow and pressure [6]. When taking a corner, cyclists tend to use an anticipatory steering strategy. The distance and road position ahead, and time spent looking, depend on current speed and position [7]. Studies of vehicle drivers show that the tangent point on the inside of a bend, beyond which one cannot see the full breadth of the road, is an observational focus [8]. In cycling, faster riders over a set course brake later at corners and use the full width of the road [9].
Mathematical models for cycling dynamics use decomposed forces parallel and perpendicular to the direction of motion. Simple models accounting for friction and aerodynamics may accurately predict output power [10]. On a track (velodrome), forces incorporate curvature and banking, lean, and tyre slip angles [11,12], improving the calculation of rolling resistance [11]. A Brachistochrone problem in Cartesian coordinates solves the optimal dynamics in a velodrome [13]. For road cycling, weakly undulating courses in one dimension allow for analysis of riding dynamics, incorporating physiology for energy expenditure [14]. A further model considers the time evolution of the energy balance between kinetic and potential energy for external forces of mechanical power, drag, and rolling resistance [15]. This approach allows for comparison of pre-defined strategies for racing on different routes, but does not include braking at turns.
On a three-dimensional route, pacing and cornering strategies may be modelled based on differential geometry relating bicycle heading, lateral position on the road, road curvature, and velocity. Pedalling rates to maintain constant power output may be adjusted via gears to account for varying elevation [15,16]. Optimal control techniques are used to minimise time, steering, and power [17]. Furthermore, combining mechanical and physiological parameters, optimal control models suggest pacing strategies for endurance races [18]. A comparison of optimal pacing and constant power strategies for road cycling shows a small, but consistent time saving for optimal pacing [19]. The gradient and drag terms are by far the most sensitive parameters in many cycling models, followed by rolling resistance [20,21].
We model the motion of a rider along a three-dimensional road, given as a continuous curve. Motion is governed by a balance of forces: drag, gravity, friction, pedalling, and braking. Linear acceleration solely applies when travelling in a straight line. However, centripetal acceleration is also experienced along a curved path. By describing motion in the Frenet-Serret frame following the road, rather than in Cartesian directions, we simplify the governing equations. We consider a number of prescribed routes including bends and downhill sections. We set limits for centripetal acceleration to ensure safe passage around a bend, and consider how far ahead to read the road to determine when to slow down or speed up based on centripetal acceleration restrictions. The routes chosen, and riding parameters used, allow for successive periods of pedalling and braking without prolonged periods of pedalling.

Frenet-Serret frame
In differential geometry, the Frenet-Serret frame is a common description of the kinematic properties along a continuous curve in ℝ 3 . For a curve r(s) , parameterised with respect to arc-length s, the frame is formed by three orthonormal unit vector-valued functions T(s) , N(s) , and B(s) , defined as where || ⋅ || is the vector magnitude. Physically, T is the unit vector tangent, and points along the curve; N is a unit normal vector, normal to the curve; and B is the binomial unit vector, a second normal vector. The vectors are related to each other via two scalar functions, (s) and (s) , such that where (s) is the curvature and (s) the torsion [22]. We take curvature always to be positive. The functions (s) and (s) completely determine the shape of a regular curve [23], providing important environmental properties for a road. The vectors T , N , and B determine the orientation of the curve. Most of the forces and accelerations acting on a rider naturally arise in the directions of these vectors.
Consider a rider on a road r(s) with Frenet-Serret frame (T, N, B, , ) in terms of the arc-length s. The route is parameterised by s, but the rider's position is parameterised by time t. These two are connected by the velocity v of the rider along the route so that the speed u is in the T direction. Applying an additional time derivative, we express acceleration a in the Frenet-Serret frame, Fig. 1 Sketch of forces acting on a rider. All forces but gravity align with the direction of motion along the route Acceleration has components in two directions, linear acceleration in T and centripetal acceleration in N.

Forces on a rider
We model a rider at speed u (4) in a direction T determined by a road. Forces acting on the rider depend on position, orientation, and speed: drag is due to motion through air; the gravity component depends on orientation; friction may depend on both motion and orientation. The rider pedals to generate motion and applies brakes to slow down. Application of pedalling and braking is a choice of the rider, with safety concerns on a curved route and other factors such as fatigue.
The hydrodynamic drag force F d acts against the direction of motion in the T direction, given by where is the density of air, C d the drag coefficient, and A the projected surface area in the direction of motion. We assume that no wind is present, though this may be added as a relative velocity.
Gravity F g acts in the negative z-direction (Cartesian frame). The component experienced by the rider in the T direction is where m is the mass of rider and bicycle, g the acceleration due to gravity, and T z the component of T in the vertical direction. On an ascent ( T z > 0 ), gravity opposes motion. Conversely, on a descent ( T z < 0 ), gravity assists motion.
The friction force F f is due to the bicycle tyres in contact with the road surface. We model Coulomb friction [24], neglecting corrections for speed and heat generated on tyres, though a simpler constant friction force is also widely used [14]. As T 2 x + T 2 y + T 2 z = 1 , the component experienced by the rider in the T direction is proportional to the normal force due to gravity, given by where R is the rolling resistance and T x and T y are the two horizontal components of T . The friction force opposes motion and increases with a flatter surface, as expected. The coefficient of rolling resistance is much less than that of both sliding and static friction [1,25].
A rider generates force via pedalling F p . A linear force-velocity relationship is determined experimentally [26]. The pedalling force is related [13] to the maximum torque M, maximum pedalling frequency rotation Ω , development D, and linear velocity u , so that The maximum torque is that which occurs at zero pedalling frequency, and maximum pedalling frequency is that which occurs at zero torque [13]. This form (9) is a simplification of the force and torque profiles during a pedal stroke [27].
Heuristic fits for power-to-mass ratios may be employed using rider-specific data [15]. The development is the distance travelled in one rotation of the pedals, the product of the wheel perimeter and gear ratio [13]. Pedalling force (9) decreases with speed, though we do not consider fatigue as an element. However, we require u < DΩ 2 for a positive force. We impose this limit as a speed above which the rider is freewheeling (neither pedalling nor braking). We write the force as where H[ ⋅ ] is the Heaviside function. Freewheeling typically occurs on descents.
A key quantity to evaluate and compare work done by a rider is power P , the rate at which work is done, using velocity v (3) and pedal force F p (10) [13]. Hence, power has a quadratic relationship with velocity [26], and in our case is maximised when that is, half the speed before freewheeling. Power is based on instantaneous force and velocity, and is zero when the rider is not pedalling.
The rider may slow down by applying the brakes. This generates a force F b , where b is a braking factor. The b factor depends on whether the front, rear, or both brakes are applied, as well as the coefficient of friction between the brake pad and wheel [1]. When braking we take F p = 0 , and when pedalling F b = 0.
There is a further frictional force F s that prevents lateral sliding when passing through a bend in the road. This force is normal to the direction of motion, where is a minimum required coefficient of friction, related to the lean angle [1,28].
We neglect a number of other effects in our model such as wheel bearing friction, slope resistance (ascending) and assistance (descending), frictional loss in the drive chain, and the inertial force [1,10,18], as well as environmental and physiological factors [14,29]. For simplicity, we neglect changes in aerodynamic effects when cornering [6]. The model is applicable to cycling on a known smooth three-dimensional route. Deviation from the route is not possible, but centripetal acceleration may be controlled by braking. An additional feature to use for control that we do not consider is the effect of jerk when accelerating or decelerating [30], where evasive action such as powerful braking leads to large jerk forces [31].

Equations of motion
Given a road route, we determine the Frenet-Serret frame (T, N, B, , ) in terms of arc-length s. The forces of the system depend on the position along any particular route. We develop a coupled system of differential equations for motion on an embedded route.
The position on the route, given by arc-length s, allows us to determine the forces acting on the rider. The arc length is given by with s 0 = 0 at the beginning of the route.
The speed is determined by a balance of forces in the T direction. The representation depends on whether the rider is pedalling or braking, typically not applied at the same time.

Newton's second law gives
where u e is the velocity at an event at time t e , for continuity. This velocity may be the initial at t e = 0 or at a time of transition between pedalling and braking. The forces, given by Eqs. (6), (7), (8), (10), and (13), incorporate the route by their dependence on s.
The work done W is the total power (11), given by When braking or freewheeling, F p = 0 and no additional work is done.
The equations for position (15), velocity (16), work done (17), and the transition between pedalling and braking (20) comprise the coupled and nonlinear governing equations of the system. The forces, given by (6), (7), (8), (10), and (13), depend on position s, speed u , and an external factor, the road geometry. When a transition occurs, at t = t e , we impose continuity in the dynamics (15)- (17). We solve the governing system until the rider reaches the end of the route at arc-length s l at some t end , i.e., s(t end ) = s l .
Finally, we discuss the transition between braking and pedalling. The main concern in this paper is when taking a bend. Deviation from the line of the road may lead to an accident due to an impact, sliding, or skidding. We consider the force balance in the normal N direction where the centripetal acceleration (5) should be less than the sliding force F s (14). To ensure the rider does not exceed such a threshold, we set a lower bound with a parameter Γ such that with 0 < Γ < 1 . When entering a bend in the road, the rider is typically pedalling. As the curvature increases, the threshold on centripetal force m u 2 (18) may be exceeded. In that case, pedalling is stopped and braking is applied. We take Γ = Γ 1 with, for illustrative purposes, Γ 1 = 0.8 . Braking is applied until it is safe to start pedalling again, when Eq. (18) is satisfied with Γ = Γ 2 < Γ 1 (otherwise there is an immediate return to braking). We take Γ 2 = 0.2 to reflect a decrease in velocity or curvature, or both, before pedalling again. Hence, we have the following switch conditions: There is an additional consideration to model. A rider on a bicycle looks ahead, judging the road geometry and their speed. The conditions in (19) are instantaneous at the arclength position s of the rider's current location. We introduce a new parameter, s * > 0 , so that the rider looks ahead by this distance to judge the centripetal acceleration. This parameter is only applied to the road curvature , while we take the speed at the rider's current location, s. Hence, the applied transition conditions read There is choice in s * . Absolute or bespoke values do not scale up on generic routes where the magnitudes of speed and curvature may vary considerably. We choose s * to depend on the current velocity, so that the rider looks ahead to the position in t * seconds at the current velocity.
The dynamics of pedalling and braking may be understood by centripetal acceleration. By looking ahead a distance s * (21), the rider observes upcoming increases in curvature in the route. Note that even while braking, the centripetal acceleration may increase if deceleration does not compensate enough for increases in curvature as motion continues. This potential increase in centripetal acceleration is a key reason for always looking ahead by some distance s * .
So far, we have built a model for motion on a threedimensional route. In the remaining sections we analyse that model, specifically with the objective to find a generic estimate of t * to minimise centripetal acceleration along routes. This is a safety-first approach to using pedalling and braking at bends, rather than minimising total time by braking as late as possible [9]. One potential issue is that for a region of large curvature, the rider may be unable to see beyond the bend, limiting t * . We neglect this consideration, assuming the rider is familiar with the route, and allowing for greater scope in terms of application to GPS-and map-led devices.

Interpolation
We consider a three-dimensional route r presented in a discrete three-tuple set of n + 1 position coordinates . The x and y coordinates represent the East-North plane and z the vertical height. Standard transformations exist to transform GPS coordinates into this form [32], allowing for distance and gradient along the route to be calculated and used in the governing dynamics [33]. Interpolation techniques and curve fitting provide for smoothness in recreating a route from discrete data points [33,34].
We require a continuous representation of the route as a curve to call properties of the curve, such as curvature, at any point. We parameterise the curve in terms of a computed arc length, s, via and s l = s n . We interpolate each coordinate of r as a function of s, producing r(s) . Each interpolation is composed of piecewise cubic Hermite interpolating polynomials (PCHIP) [35,36]. This interpolation scheme suppresses oscillations for non-smooth data. Note that we find no practical difference in using other local interpolating functions, such as spline functions [37].
We use the cubic interpolant r(s) to evaluate the Frenet-Serret frame via Eqs. (1) and (2). For the governing dynamics (15)-(17), we require only the tangent vector T(s) and curvature (s) . However, these may be computed explicitly using only r(s) . For any parameterisation r( ) , we evaluate the geometric properties as where × is the vector product and [ ⋅ , ⋅ , ⋅ ] the scalar triple product. Using cubic interpolating functions, the expressions in (24) are well defined.

Numerical integration
Given the route properties, we solve the governing system (15)-(17) using an explicit Runge-Kutta scheme (MATLAB's ode45). For convergence, when transitioning between pedalling and braking at time t e , we impose a continuous transition in the forces rather than an on/off switch. We ramp up or down either force using modulating functions of the form These functions tend to 1 and 0, respectively, as t increases from an event at t e . A ramp-down is imposed quicker than a ramp-up to impose continuity, while also reducing the significant time during which the rider is simultaneously pedalling and braking.
The conditions (20) for transitions between pedalling and braking are identified with MATLAB's ode event location option [38].
Typically, we solve the dynamics until the rider reaches a certain point, at a distance s l . However, we note that in our simulations the rider uses the road for an additional distance s * (20). For simplicity, we use a route that is longer than s l + max(s * ) with a continuous straight section beyond s l .

Parameter values
In Table 1 we list the parameter values used for physical constants. Many parameters are based on a racing bike with rider in a touring position, with C d A = 0.3 [1]. The coefficient of friction is 0.4 for a wet road and 0.6 for a dry road. Rolling resistance depends on friction and tyre deformation (mass of bicycle and rider, tyre width, and tyre pressure), and is usually in the range R ∈ (0.002-0.008) [1]. We choose an intermediate value [33]. The development may be calculated by the gear ratio and perimeter of the wheel. Parameter values of maximum torque and pedalling frequency are based on world-class performance [39,40]. For example, the maximum values of torque (260 Nm) and pedalling rotation (25 rad s −1 ) are based on a velodrome where speeds are higher than on the road [13]. Our range of D takes the upper limit of 10 [13], with lower values to represent lower gears.
The braking factor b is also subjective. An upper limit of b = 0.5 is required for safety (exceeding this may result in going over the handlebars [1]). If only the rear wheel brake is applied, then we may have b = 0.26 , resulting in a stopping distance twice that of the front brake [1]. We choose this for a smoother ride, i.e., no sudden braking force.

Steady motion and calibration of the model
In this section, we analyse steady-state motion and calibrate the model for appropriate parameters.

Steady motion
We consider steady motion in our model, via (16a) when pedalling or freewheeling. We examine the balance of forces such that The result is a quadratic equation for steady speed u * , requiring positive solutions. When pedalling, the steady speed is (27) is analogous to the equilibrium velocity (5.2) in [13], however for an arbitrary route. The speed (27) is positive provided that a condition relating the torque M to physical and geometric parameters. Work done (17) increases linearly as u , and hence F p , are constant. As a route develops, with T varying, the speed adjusts to a new steady state over a transient period. A rider decelerates to zero if sufficient time is spent without satisfying the condition (28). When freewheeling, with F p = 0 , the steady speed is analogous to a terminal velocity with frictional resistance and drag balancing gravity. The freewheeling steady speed u * fw is We note that freewheeling an ascent, T z > 0 , is not possible, as expected. However, a descent ( T z < 0 ) is insufficient to ensure a real and positive steady state. For a real-number value u * fw (29), we require a descending gradient such that For R = 0.0045 , this means > 0.2578 • for steady freewheel motion. For a rolling resistance as high as 0.008, we require > 0.458 • . No work (17) is done as F p = 0 when freewheeling.

Calibration on flat straight section
On a constant route ( T constant), the dynamics tend to a steady state as opposing forces, especially drag (6) and pedalling (10), balance. To test and calibrate the model, we consider three cases of motion along a straight road. We compare steadystate outputs of speed and power for differing input parameters ( Table 2) with each other and with values from the literature. The route is parameterised by r(s) = (s, 0, 0) , without loss of generality, for arc-length parameter s ∈ [0, 1000] . The tangent vector is and = 0 everywhere. The three cases take parameter values listed in Table 2. The resulting speed profiles in Fig. 2 are determined by integrating Eqs. (15)- (17).
All cases are initialised with u 0 = 5 m/s (18 km/h). Cases 1 and 2 are designed to produce the same output speed and power, u * = 8.33 m/s (30 km/h) and P * = 115 W respectively. Case 1 has a larger torque M and development D, but lower pedalling rotation Ω than Case 2. We observe a small difference in how each rider reaches the same steady state. The rider in Case 1 accelerates faster than Case 2 (Fig. 2), reaching a steady state and final position at 1000 m earlier ( Table 2). Case 3 is a rider with high torque M, pedalling rotation Ω , and development D. The steady speed is u * = 12 m/s (43.2 km/h) and power is P * = 300 W. As expected, the final time t f is less than Cases 1 and 2.
Furthermore, these speed and power pairings correspond to those of a road-racing bicycle with similar input parameters [1]. The pedalling rotations and power pairings fall in typical ranges corresponding to 17-19% efficiency [1]. The steady speeds from each numerical solution match theoretical predicted values (27) and satisfy the condition in Eq. (28).

Parameter variation
We briefly consider the effect of a small change in parameter value to the steady-state speed u * (27). Since u * = u * ({q i }) with {q} the parameter set (27). In effect, the magnitude of rolling friction and gravity depend on the gradient. The change in steady speed du * due to a change in parameters dq i is given by du * = ∑ i u * q i dq i . However, some perturbations increase and others decrease the speed. We measure an upper bound to be where each partial derivative is evaluated at the reference parameter values (Table 1). We take T z = 0.01 , a small uphill gradient for the purpose of illustration. The coefficients u * q i are the local sensitivities of the output, here steady speed, to input parameters [21,41].
In Table 3, we consider the local sensitivities with respect to the three reference cases (Table 2). Physically, these numbers make sense: increase in air density , drag coefficient C d , surface area A , mass m , local gravity g , rolling resistance   Table 2 R , and gradient T z reduces speed; increase in development D, pedalling Ω , and torque M increases speed; and vice versa. The coefficients for R and T z are large. However the absolute value of rolling friction is small, and a small change in gradient is well known to have a considerable effect on speed for the same power [20].
In Fig. 3, we show the maximum relative change in speed du * ∕u * as all ten parameters are changed by the same relative amount to the reference values, dq i ∕q i ∈ 0 − 5 %. The size of the change is skewed by the well-known sensitivity to drag, rolling resistance, and gradient [20,21].

Dynamic motion on curved routes
In this section, we analyse unsteady dynamics on a number of routes. We include transitions (20) between pedalling and braking to determine optimal ranges for s * (21) at current speed. The aim is to minimise the centripetal acceleration (18) at a bend. We compare centripetal acceleration with mean power.

Routes
We consider three non-trivial routes parameterised as r( ) = (x( ), y( ), z( )) . They comprise flat and downhill components, differing scales of maximum curvature, and differing number of bends.
Route 1 is a flat meandering (cubic) curve given by with ∈ [−L, 1.2L] for L = 50 (Fig. 4a). The total distance is s l = 287.72 m. Route 2 is an approximate Gaussian fit (Fig. 5a) to a rider travelling straight through a roundabout, with inner circle of radius R. The profile reads, with ∈ [0, L] for L = 200 (Fig. 4c). In other words, the route is centred at L/2, with amplitude R and standard deviation R 2 . The total distance is s l = 203 m.
Route 3 is a descending route that meanders sinusoidally, given by with parameter ∈ [0, 1.2L] for L = 1000 m (Fig. 4e). While progressing in the x direction, the z direction linearly decreases with x only. The y direction has three stages. The   . 3 Small change in speed du * (33) due to a small change in each parameter dq i . Each parameter is changed by the same relative amount to its reference values (Table 1) for the three cases (Table 2) with T z = 0.01 . The steady-state speeds (27) in each case are given and a reference line (dashed) is du * ∕u * = dq i ∕q i middle stage consists of two sinusoidal periods of amplitude 125 m. The sections to either side are straight and continuous up to the first derivative. We run our simulations until the rider reaches the point x = L (i.e., = L ), a distance of s l = 1768.26 m. The total descent along this route is 50 m. The unsigned curvatures (24b) for each route are shown in Fig. 4b,d,f. The routes have two, three, and four bends, respectively, and their maximum magnitudes differ for a wider application of the model. As curvature is higher for Route 2 with R = 7.5 m (Fig. 4d), we simulate the dynamics with slower Case 1 parameter values (Table 1). For Routes 1 and 3, we use Case 3 parameters. In all routes, torsion (24c) is zero.
The curvature on a roundabout with a Gaussian fit (35) is maximised at x = L∕2 , with | (L∕2)| = 1∕R . Traversing a larger roundabout has a smaller curvature, as expected. For a given steady speed u * , the maximum centripetal acceleration (5) is (u * ) 2 ∕R . Hence, a theoretical threshold speed u † without exceeding the centripetal acceleration (20) is taking Γ = 1 (18) for an upper limit. The maximum steadystate speed scales with √ R (Fig. 5b). The scaling with √ , illustrating the speed adjustment required for wet or dry  Table 2 conditions (Table 1). This limit is independent of s * as it is designed so that braking is not required.

Dynamics
On all three routes (34)-(36), the rider dynamics are broadly similar. We calculate the geometric properties of the route (24). We may then solve the governing Eqs.
When looking ahead by a distance travelled of t * = 1 s at the current velocity, the regions of pedalling (solid) and braking (dashed) for each of the three routes is shown in Fig. 4a, c, e. The corresponding route curvature during pedalling and braking is shown in Fig. 4b, d, f. We observe that braking occurs while approaching and during the region of largest curvature.
In Fig. 6, we show the full dynamics for distance, speed, and work done for Route 3 corresponding to Fig. 4e, f with t * = 1 s. For simplicity, the rider begins with the flat for traversing a roundabout of inner radius R without exceeding the centripetal acceleration leading to sliding (18). The coefficient of friction is taken to be 0.6 for dry (solid) conditions and 0.4 for wet (dashed) conditions ( Table 1). The left y-axis displays u † in m/s and the right y-axis in km/h Fig. 6 Distance, speed, and work done on Route 3 (36) according to the governing Eqs. (15)- (17) with pedalling/braking subject to (20) with s * (21) given by t * = 1 s. The pedalling parameters are given by Case 3 in Table 2 with u 0 = 12 m/s. Solid sections correspond to pedalling and dashed to braking steady-state speed, u 0 = 12 m/s, as opposed to a descending steady-state speed (27). The rider brakes for ≈ 3.5 s at each bend. When braking no work is done, remaining constant in this period, though the distance travelled increases as the speed is positive. The bends are sufficiently far apart (Fig. 4f) so that the dynamics of the rider through each bend is independent: a pseudo-steady-state speed (27) is reached. Variations in gradient with curvature in the middle section (36) means an unsteady transient region is always present, but the dynamics are periodic.

Centripetal acceleration
We use thresholds on centripetal acceleration (20) to alternate between pedalling and braking by looking ahead by s * > 0 , as discussed. The actual centripetal acceleration experienced at position s remains below the threshold Γ 1 g (20a). In Fig. 7a, c, e, we show the centripetal accelerations that are experienced (thick solid) and anticipated ahead with t * = 1 s (solid/dashed), so a distance ahead corresponding to 1 s at the current speed (21). The maximum centripetal acceleration experienced is marked ( • ), and is used as an overall measure for the dynamics of the simulation with s * > 0 . The improvement over the centripetal acceleration anticipated is greater in Routes 1 and 2 than 3.
We vary t * to find an optimal value for each route that minimises the maximum centripetal acceleration ( • ) experienced along that whole route (Fig. 7b, d, f). For Route 1, t * opt ≈ 2.06 s; Route 2, t * opt ≈ 2.6 s; and for Route 3, t * opt ≈ 2.55 s. In all cases, for t * < 1 s and t * > 3 s, the centripetal acceleration increases; in the former case the rider brakes too late and in latter too early. For 1 s< t * < 3 s, in  (34). c, d Route 2 (35). e, f Route 3 (36). Routes 1 and 3 are simulated with parameters from Case 3 and Route 2 with parameters from Case 1 ( Table 1)

. (Left)
Centripetal acceleration at the current position s (thick solid) and that by looking ahead by s * = s + t * u(s) (thin solid/ dashed) with t * = 1 . The curve looking ahead is broken into solid and dashed to represent pedalling or braking, respectively. The maximum centripetal acceleration experienced (thick curve) is shown with a marker ( • ). The horizontal lines represent the thresholds (20) for transitioning between pedalling and braking: Γ 2 g (dashed) < Γ 1 g (dot-dashed) < g (dotted). Here Γ 1 = 0.8, Γ 2 = 0.2 , and = 0.6 (dry). (Right) Maximum centripetal acceleration (solid; left y-axis) and mean power (dashed; right y-axis) against t * which the maximum centripetal acceleration is minimised, it remains below the threshold Γ 1 g.
Interestingly, the maximum centripetal acceleration may be found at different bends for different values of t * . We observe the switch between bends by a sharp kink. For example, consider t * ≈ 1 s in Fig. 7b for Route 1. The maximum centripetal acceleration changes from being experienced at the first bend to the second bend (Fig. 4b). The approach of this transition may be seen in Fig. 7a where two peaks in centripetal acceleration, one at each bend, are nearly equal. In this case, for t * > 1 s, the rider brakes far enough in advance, and hence may begin pedalling again, to regain enough speed subsequently into the second bend for maximal centripetal acceleration to occur there. Route 2 possesses two kinks (Fig. 7d) in the optimal value as it changes back-and-forth from the first to the second bend.
In Fig. 8, the pedalling and braking dynamics for the optimal solution for each route (Fig. 8a, c, e) and the corresponding curvature (Fig. 8b, d, f) are shown in solid/ dashed. Comparing the dynamics with the same routes in Fig. 4 with t * = 1 s shows an optimal braking period while approaching the maximum curvature. Pedalling may be resumed before the maximum curvature point.
We consider the change in mean power over the range of t * . For Routes 1 and 2, the changes are ∼ 12 W, however these routes are short so that small changes in acceleration after braking have a larger overall effect. For Route 3, the  Table 2 route is long enough ( s l = 1768.26 m) so that change in mean power, ∼ 4 W, is small; the long sections in between bends, most of which are covered at pseudo-steady state (Fig. 6), allow for mean values to be reached. The difference in acceleration periods after braking become small when measured against the whole route.

Discussion
We present a mathematical model of road cycling with pedalling, braking, gravity, drag, and friction on arbitrary curved routes. The route is embedded in a coupled model via the Frenet-Serret frame in which many of the forces point in these natural directions. Our model presents two novel steps in modelling cycling motion by including: (i) motion on curved routes and (ii) braking when cornering. The route is fundamentally built into the model, extending insights in the literature [13,14]. Our model allows us to study the second dynamic feature of pedalling and braking at bends in the road, not modelled in the literature to our knowledge. We incorporate a brand-new feature, using curvature and speed, of viewing the road ahead to make decisions now.
Thresholds on centripetal acceleration are used to determine transitions between pedalling and braking with the rider looking ahead by a distance dependent on current speed. We fix the route, and do not allow the rider to deviate in order to reduce centripetal acceleration. The model neglects a number of forces, such as wind and inertia, and we restrict our simulations to a subset of riding parameters as a full study is beyond the scope of the paper.
We provide a simplified, yet applicable model for those with the ability to produce quality data, or indeed to be used to inform on quality control of data. We welcome and encourage readers to test the model for motion on a three-dimensional route with real data. Data should include motion (such as GPS, rider-collected data, inertial measurement units) in combination with environmental knowledge such as surface roughness for friction. We calibrate the model with representative parameters, with resulting steady-state speeds and powers matching those in the literature ( Table 2). The steady-state speeds, (27) and (29), depend on input parameters incorporating pedalling strategy, physical parameters, and the route. We determine conditional relationships, (28) and (30), on inputs parameters. Outputs of our model such as speed are most sensitive to drag, rolling resistance, and gravity (Table 3), agreeing with the literature [20,21]. For a 5% change in each of ten parameter values, the combined speed variation is at most 12%. In the dynamic model more care is needed by the user in applications such as parameter fitting with real data, such as a sensitivity analysis about both the parameters and route where the environment may change in a spatio-temporal manner and over a large range.
For our full dynamic model, we use routes (34)- (36). We include flat and downhill, with variations in maximum curvature, and differing number of bends. In all cases, to minimise centripetal acceleration throughout, an optimal value for the distance to look ahead is found to be the distance that would be travelled in 1-3 s at the current speed ( Fig. 7(b,d,f)). This distance gives the rider time to react gradually but also maintain speed for as long as possible. Periods of braking corresponding to optimal centripetal accelerations are found to occur before the point of maximum curvature (Fig. 8), thereby allowing acceleration out of a bend.

Conclusions
We simulate road cycling along three-dimensional routes using the Frenet-Serret frame generated by treating a route as a curve in space. Along with environmental parameters, we include pedalling and braking as rider-controlled parameters. We optimise rider dynamics based on safety at bends on three-dimensional routes by minimising centripetal acceleration.
Our model forms the basis of more general models for control of motion, including automated driving, along a route. Forces and parameters may be tuned appropriately. The model may be adapted for spatially varying environmental parameters and additional features such as physiology (fatigue) may be incorporated.