1 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].

Fig. 1
figure 1

Sketch of forces acting on a rider. All forces but gravity align with the direction of motion along the route

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.

2 Mathematical model

2.1 Frenet–Serret frame

In differential geometry, the Frenet–Serret frame is a common description of the kinematic properties along a continuous curve in \(\mathbb {R}^3\). For a curve \({\varvec{r}}(s)\), parameterised with respect to arc-length s, the frame is formed by three orthonormal unit vector-valued functions \({\varvec{T}}(s)\), \({\varvec{N}}(s)\), and \({\varvec{B}}(s)\), defined as

$$\begin{aligned} {\varvec{T}}&= \frac{\mathrm {d} {\varvec{r}}}{\mathrm {d} s}, \end{aligned}$$
(1a)
$$\begin{aligned} {\varvec{N}}&= \left. \frac{\mathrm {d} {\varvec{T}}}{\mathrm {d} s}\Bigg /\left| \left| \frac{\mathrm {d} {\varvec{T}}}{\mathrm {d} s} \right| \right| \right. , \end{aligned}$$
(1b)
$$\begin{aligned} {\varvec{B}}&= {\varvec{T}} \times {\varvec{N}}, \end{aligned}$$
(1c)

where \(\left| \left| \,\cdot \, \right| \right|\) is the vector magnitude. Physically, \({\varvec{T}}\) is the unit vector tangent, and points along the curve; \({\varvec{N}}\) is a unit normal vector, normal to the curve; and \({\varvec{B}}\) is the binomial unit vector, a second normal vector. The vectors are related to each other via two scalar functions, \(\kappa (s)\) and \(\tau (s)\), such that

$$\begin{aligned} \frac{\mathrm {d} {\varvec{T}}}{\mathrm {d} s}&= \kappa {\varvec{N}}, \end{aligned}$$
(2a)
$$\begin{aligned} \frac{\mathrm {d} {\varvec{N}}}{\mathrm {d} s}&= -\kappa {\varvec{T}} + \tau {\varvec{B}}, \end{aligned}$$
(2b)
$$\begin{aligned} \frac{\mathrm {d} {\varvec{B}}}{\mathrm {d} s}&= -\tau {\varvec{N}}, \end{aligned}$$
(2c)

where \(\kappa (s)\) is the curvature and \(\tau (s)\) the torsion [22]. We take curvature always to be positive.

The functions \(\kappa (s)\) and \(\tau (s)\) completely determine the shape of a regular curve [23], providing important environmental properties for a road. The vectors \({\varvec{T}}\), \({\varvec{N}}\), and \({\varvec{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 \({\varvec{r}}(s)\) with Frenet–Serret frame \(({\varvec{T}},{\varvec{N}},{\varvec{B}},\kappa ,\tau )\) 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 \({\varvec{v}}\) of the rider along the route

$$\begin{aligned} {\varvec{v}} = \frac{\mathrm {d} {\varvec{r}}(s)}{\mathrm {d} t} = \frac{\mathrm {d} s}{\mathrm {d} t} {\varvec{T}}, \end{aligned}$$
(3)

so that the speed \(u\) is

$$\begin{aligned} u= \frac{\mathrm {d} s}{\mathrm {d} t}, \end{aligned}$$
(4)

in the \({\varvec{T}}\) direction. Applying an additional time derivative, we express acceleration \({\varvec{a}}\) in the Frenet–Serret frame,

$$\begin{aligned} {\varvec{a}} = \frac{\mathrm {d} {\varvec{v}}}{\mathrm {d} t} = \frac{\mathrm {d} u}{\mathrm {d} t} {\varvec{T}} + \kappa u^2 {\varvec{N}}. \end{aligned}$$
(5)

Acceleration has components in two directions, linear acceleration in \({\varvec{T}}\) and centripetal acceleration in \({\varvec{N}}\).

2.2 Forces on a rider

We model a rider at speed \(u\) (4) in a direction \({\varvec{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 \({\varvec{F}}_{\text {d}}\) acts against the direction of motion in the \({\varvec{T}}\) direction, given by

$$\begin{aligned} {\varvec{F}}_{\text {d}}= - \frac{1}{2} \rho \, C_{\text {d}}A\, u^2 \, {\varvec{T}}, \end{aligned}$$
(6)

where \(\rho\) is the density of air, \(C_{\text {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 \({\varvec{F}}_{\text {g}}\) acts in the negative \({\varvec{z}}\)-direction (Cartesian frame). The component experienced by the rider in the \({\varvec{T}}\) direction is

$$\begin{aligned} {\varvec{F}}_{\text {g}}&= mg\, [{\varvec{T}} \cdot (0,0,-1)] \, {\varvec{T}} \nonumber \\&= - mg\, T_z \, {\varvec{T}}, \end{aligned}$$
(7)

where \(m\) is the mass of rider and bicycle, \(g\) the acceleration due to gravity, and \(T_z\) the component of \({\varvec{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 \({\varvec{F}}_{\text {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_x^2 + T_y^2 + T_z^2 = 1\), the component experienced by the rider in the \({\varvec{T}}\) direction is proportional to the normal force due to gravity, given by

$$\begin{aligned} {\varvec{F}}_{\text {f}}&= - \mu _{\text {R}}mg(T_x^2 + T_y^2)^{1/2} \, {\varvec{T}}, \end{aligned}$$
(8)

where \(\mu _{\text {R}}\) is the rolling resistance and \(T_x\) and \(T_y\) are the two horizontal components of \({\varvec{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 \({\varvec{F}}_{\text {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 \(\Omega\), development D, and linear velocity \(u\), so that

$$\begin{aligned} {\varvec{F}}_{\text {p}}= \frac{2 \pi M}{D} \left( 1 - \frac{2 \pi u}{D \Omega } \right) {\varvec{T}}. \end{aligned}$$
(9)

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< \frac{D \Omega }{2 \pi }\) 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

$$\begin{aligned} {\varvec{F}}_{\text {p}}= \frac{2 \pi M}{D} \left( 1 - \frac{2 \pi u}{D \Omega } \right) H\left[ 1 - \frac{2 \pi u}{D \Omega } \right] {\varvec{T}}, \end{aligned}$$
(10)

where \(H[\,\cdot \,]\) 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,

$$\begin{aligned} P= {\varvec{v}} \cdot {\varvec{F}}_{\text {p}}, \end{aligned}$$
(11)

using velocity \({\varvec{v}}\) (3) and pedal force \({\varvec{F}}_{\text {p}}\) (10) [13]. Hence, power has a quadratic relationship with velocity [26], and in our case is maximised when

$$\begin{aligned} u = \frac{D \Omega }{4 \pi }, \end{aligned}$$
(12)

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 \({\varvec{F}}_{\text {b}}\),

$$\begin{aligned} {\varvec{F}}_{\text {b}}= - b \, mg\, {\varvec{T}}, \end{aligned}$$
(13)

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 \({\varvec{F}}_{\text {p}}={\varvec{0}}\), and when pedalling \({\varvec{F}}_{\text {b}}={\varvec{0}}\).

There is a further frictional force \({\varvec{F}}_{\text {s}}\) that prevents lateral sliding when passing through a bend in the road. This force is normal to the direction of motion,

$$\begin{aligned} {\varvec{F}}_{\text {s}}= -\mu mg{\varvec{N}}, \end{aligned}$$
(14)

where \(\mu\) 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].

2.3 Equations of motion

Given a road route, we determine the Frenet–Serret frame \(({\varvec{T}},{\varvec{N}},{\varvec{B}},\kappa ,\tau )\) 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

$$\begin{aligned}&\frac{\mathrm {d} s}{\mathrm {d} t} = u, \end{aligned}$$
(15a)
$$\begin{aligned}&s(0) = s_0, \end{aligned}$$
(15b)

with \(s_0 = 0\) at the beginning of the route.

The speed is determined by a balance of forces in the \({\varvec{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

$$\begin{aligned}&m\frac{\mathrm {d} u}{\mathrm {d} t} = {\left\{ \begin{array}{ll} \left( {\varvec{F}}_{\text {p}}+ {\varvec{F}}_{\text {d}}+ {\varvec{F}}_{\text {f}}+ {\varvec{F}}_{\text {g}}\right) \cdot {\varvec{T}} \quad \text {(pedalling)}, \\ \left( {\varvec{F}}_{\text {b}}+ {\varvec{F}}_{\text {d}}+ {\varvec{F}}_{\text {f}}+ {\varvec{F}}_{\text {g}}\right) \cdot {\varvec{T}} \quad \text {(braking)}, \end{array}\right. } \end{aligned}$$
(16a)
$$\begin{aligned}&u(t_{\text {e}}) = u_{\text {e}}, \end{aligned}$$
(16b)

where \(u_{\text {e}}\) is the velocity at an event at time \(t_{\text {e}}\), for continuity. This velocity may be the initial at \(t_{\text {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

$$\begin{aligned}&\frac{\mathrm {d} W}{\mathrm {d} t} = {\varvec{v}} \cdot {\varvec{F}}_{\text {p}}, \end{aligned}$$
(17a)
$$\begin{aligned}&W(0) = 0. \end{aligned}$$
(17b)

When braking or freewheeling, \({\varvec{F}}_{\text {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_{\text {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_{\text {end}}\), i.e., \(s(t_{\text {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 \({\varvec{N}}\) direction where the centripetal acceleration (5) should be less than the sliding force \({\varvec{F}}_{\text {s}}\) (14). To ensure the rider does not exceed such a threshold, we set a lower bound with a parameter \(\Gamma\) such that

$$\begin{aligned} m\kappa u^2 < \Gamma \mu mg, \end{aligned}$$
(18)

with \(0< \Gamma < 1\). When entering a bend in the road, the rider is typically pedalling. As the curvature \(\kappa\) increases, the threshold on centripetal force \(m\kappa u^2\) (18) may be exceeded. In that case, pedalling is stopped and braking is applied. We take \(\Gamma = \Gamma _1\) with, for illustrative purposes, \(\Gamma _1 = 0.8\). Braking is applied until it is safe to start pedalling again, when Eq. (18) is satisfied with \(\Gamma = \Gamma _2 < \Gamma _1\) (otherwise there is an immediate return to braking). We take \(\Gamma _2 = 0.2\) to reflect a decrease in velocity or curvature, or both, before pedalling again. Hence, we have the following switch conditions:

$$\begin{aligned} \kappa u^2&> \Gamma _1 \mu g,&\text {pedalling} \rightarrow \text {braking},\end{aligned}$$
(19a)
$$\begin{aligned} \kappa u^2&< \Gamma _2 \mu g,&\text {braking} \rightarrow \text {pedalling}. \end{aligned}$$
(19b)

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 arc-length 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 \(\kappa\), while we take the speed at the rider’s current location, s. Hence, the applied transition conditions read

$$\begin{aligned} \kappa (s+s^*) \, u(s)^2&> \Gamma _1 \mu g,&\text {pedalling} \rightarrow \text {braking},\end{aligned}$$
(20a)
$$\begin{aligned} \kappa (s+s^*) \, u(s)^2&< \Gamma _2 \mu g,&\text {braking} \rightarrow \text {pedalling}. \end{aligned}$$
(20b)

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,

$$\begin{aligned} s^*= t^*u, \end{aligned}$$
(21)

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 three-dimensional 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.

3 Methods and implementation

3.1 Interpolation

We consider a three-dimensional route \({\varvec{r}}\) presented in a discrete three-tuple set of \(n+1\) position coordinates \(\{(x_i,y_i,z_i)\}_{i=0}^n\). 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

$$\begin{aligned} \delta s_i = \sqrt{(\delta x_i)^2 + (\delta y_i)^2 + (\delta z_i)^2}, \end{aligned}$$
(22)

with \(\delta x_i = x_{i+1}-x_i\), \(\delta y_i = y_{i+1}-y_i\), and \(\delta z_i = z_{i+1}-z_i\), and

$$\begin{aligned} s_i = \sum _{j=0}^{i-1} \delta s_j, \end{aligned}$$
(23)

and \(s_{l} = s_n\). We interpolate each coordinate of \({\varvec{r}}\) as a function of s, producing \({\varvec{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 \({\varvec{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 \({\varvec{T}}(s)\) and curvature \(\kappa (s)\). However, these may be computed explicitly using only \({\varvec{r}}(s)\). For any parameterisation \({\varvec{r}}(\phi )\), we evaluate the geometric properties as

$$\begin{aligned} {\varvec{T}}(\phi )&= \frac{{\varvec{r}}'(\phi )}{\left| \left| {\varvec{r}}'(\phi ) \right| \right| }, \end{aligned}$$
(24a)
$$\begin{aligned} \kappa (\phi )&= \frac{\left| \left| {\varvec{r}}'(\phi ) \times {\varvec{r}}''(\phi ) \right| \right| }{\left| \left| {\varvec{r}}'(\phi ) \right| \right| ^3}, \end{aligned}$$
(24b)
$$\begin{aligned} \tau (\phi )&= \frac{ [{\varvec{r}}'(\phi ), {\varvec{r}}''(\phi ), {\varvec{r}}'''(\phi )] }{\left| \left| {\varvec{r}}'(\phi ) \times {\varvec{r}}''(\phi ) \right| \right| ^2}, \end{aligned}$$
(24c)

where \(\times\) is the vector product and \([\,\cdot \,,\,\cdot \,,\,\cdot \,]\) the scalar triple product. Using cubic interpolating functions, the expressions in (24) are well defined.

3.2 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_{\text {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

$$\begin{aligned}&\tanh [t-t_{\text {e}}]\rightarrow & {} \quad \text {ramp up force}, \end{aligned}$$
(25a)
$$\begin{aligned}&1 - \tanh [10 (t-t_{\text {e}})]\rightarrow & {} \quad \text {ramp down force}. \end{aligned}$$
(25b)

These functions tend to 1 and 0, respectively, as t increases from an event at \(t_{\text {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\).

3.3 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_{\text {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 \(\mu _{\text {R}}\in\) (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.

Table 1 Reference parameter values

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.

4 Steady motion and calibration of the model

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

4.1 Steady motion

We consider steady motion in our model, via (16a) when pedalling or freewheeling. We examine the balance of forces such that

$$\begin{aligned} m\frac{\mathrm {d} u}{\mathrm {d} t} = \left( {\varvec{F}}_{\text {p}}+ {\varvec{F}}_{\text {d}}+ {\varvec{F}}_{\text {f}}+ {\varvec{F}}_{\text {g}}\right) \cdot {\varvec{T}} = 0. \end{aligned}$$
(26)

The result is a quadratic equation for steady speed \(u^*\), requiring positive solutions.

When pedalling, the steady speed is

$$\begin{aligned}&u^* = \frac{1}{\rho \, C_{\text {d}}AD^2 \Omega } \Bigg ( - 4 \pi ^2 M + \Bigg [16 \pi ^4 M^2 \nonumber \\&\quad \quad + 2 \rho \, C_{\text {d}}AD^3 \Omega ^2 \Big ( 2 \pi M \nonumber \\&\left. \quad - D \, mg\left[ \mu _{\text {R}}\left( T_x^2 + T_y^2 \right) ^{1/2} + T_z \right] \right) \Bigg ]^{1/2}\Bigg ), \end{aligned}$$
(27)

where \({\varvec{T}} = (T_x,T_y,T_z)\). Eq. (27) is analogous to the equilibrium velocity (5.2) in [13], however for an arbitrary route. The speed (27) is positive provided that

$$\begin{aligned} M > \frac{mgD}{2 \pi } \left( \mu _{\text {R}}\left( T_x^2 + T_y^2 \right) ^{1/2} + T_z \right) , \end{aligned}$$
(28)

a condition relating the torque M to physical and geometric parameters. Work done (17) increases linearly as \(u\), and hence \({\varvec{F}}_{\text {p}}\), are constant. As a route develops, with \({\varvec{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 \({\varvec{F}}_{\text {p}}= {\varvec{0}}\), the steady speed is analogous to a terminal velocity with frictional resistance and drag balancing gravity. The freewheeling steady speed \(u^*_{\text {fw}}\) is

$$\begin{aligned} u^*_{\text {fw}} = \sqrt{\frac{- 2 mg\left( \mu _{\text {R}}\left( T_x^2 + T_y^2 \right) ^{1/2} + T_z \right) }{\rho \, C_{\text {d}}A}}. \end{aligned}$$
(29)

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^*_{\text {fw}}\) (29), we require a descending gradient \(\theta\) such that

$$\begin{aligned} \theta > \tan ^{-1} \mu _{\text {R}}. \end{aligned}$$
(30)

For \(\mu _{\text {R}}= 0.0045\), this means \(\theta > 0.2578^{\circ }\) for steady freewheel motion. For a rolling resistance as high as 0.008, we require \(\theta > 0.458^{\circ }\). No work (17) is done as \({\varvec{F}}_{\text {p}}= {\varvec{0}}\) when freewheeling.

4.2 Calibration on flat straight section

On a constant route (\({\varvec{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 steady-state 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 \in [0, 1000]\). The tangent vector is

$$\begin{aligned} {\varvec{T}} = (1,0,0), \end{aligned}$$
(31)

and \(\kappa = 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).

Table 2 Summary of calibration numbers for three cases on a straight flat route (31)
Fig. 2
figure 2

Speed versus time for a rider on a 1000 m flat and straight route (31). The three cases are solutions of Eqs. (15)–(17) with parameters given in Table 2

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 \(\Omega\) 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 \(\Omega\), 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).

4.3 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

$$\begin{aligned} \{q_i\} = \{\rho , C_{\text {d}}, A, D, \Omega , M, m, g, \mu _{\text {R}}, T_z\}, \end{aligned}$$
(32)

where we use \(\left| T \right| = 1\) to write \(T_x^2 + T_y^2 = 1 - T_z^2\) in (27). In effect, the magnitude of rolling friction and gravity depend on the gradient. The change in steady speed \(\mathrm {d}u^*\) due to a change in parameters \(\mathrm {d} q_i\) is given by \(\mathrm {d}u^* = \sum _i \frac{\partial u^*}{\partial q_i} \mathrm {d} q_i\). However, some perturbations increase and others decrease the speed. We measure an upper bound to be

$$\begin{aligned} \mathrm {d}u^* \le \sum _i \left| \frac{\partial u^*}{\partial q_i} \right| \left| \mathrm {d} q_i \right| , \end{aligned}$$
(33)

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 \(\frac{\partial u^*}{\partial 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 \(\rho\), drag coefficient \(C_{\text {d}}\), surface area \(A\), mass \(m\), local gravity \(g\), rolling resistance \(\mu _{\text {R}}\), and gradient \(T_z\) reduces speed; increase in development D, pedalling \(\Omega\), and torque M increases speed; and vice versa. The coefficients for \(\mu _{\text {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 \(\mathrm {d}u^*/u^*\) as all ten parameters are changed by the same relative amount to the reference values, \(\mathrm {d}q_i / q_i \in 0-5\)%. The size of the change is skewed by the well-known sensitivity to drag, rolling resistance, and gradient [20, 21].

Table 3 Changes to speady-state speed \(\mathrm {d}u^*\) (33) due to small parameter variations \(\mathrm {d}q_i\) from the reference values (Table 1) and three cases (Table 2) with \(T_z = 0.01\)
Fig. 3
figure 3

Small change in speed \(\mathrm {d}u^*\) (33) due to a small change in each parameter \(\mathrm {d}q_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 \(\mathrm {d}u^*/u^* = \mathrm {d}q_i/q_i\)

5 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.

5.1 Routes

We consider three non-trivial routes parameterised as \({\varvec{r}}(\phi ) = (x(\phi ),y(\phi ),z(\phi ))\). 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

$$\begin{aligned}&\text {Route 1} = {\left\{ \begin{array}{ll} &{}x = \phi , \\ &{}y = \displaystyle \left( \frac{\phi }{10}\right) ^3, \\ &{}z = 0, \end{array}\right. } \end{aligned}$$
(34)

with \(\phi \in [-L,1.2 L]\) 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,

$$\begin{aligned}&\text {Route 2} = {\left\{ \begin{array}{ll} &{}x = \phi , \\ &{} y = 1.5 + R \exp \left( -\frac{(\phi -L/2)^2}{2 R^2}\right) , \\ &{} z = 0, \end{array}\right. } \end{aligned}$$
(35)

with \(\phi \in [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

$$\begin{aligned}&\text {Route 3} = {\left\{ \begin{array}{ll} &{}x= \phi , \\ &{}y= {\left\{ \begin{array}{ll} \displaystyle {\frac{625\pi }{L}} (\phi - 100), &{}\quad (\phi < 100), \\ 125 \, \sin \left( 5 \pi \phi /L\right) , &{}(100 \le \phi \le 900), \\ \displaystyle {\frac{625 \pi }{L}} (\phi - 900), &{}\quad (\phi > 900), \end{array}\right. } \\ &{}z = \displaystyle \frac{L - \phi }{20}, \end{array}\right. } \end{aligned}$$
(36)

with parameter \(\phi \in [0, 1.2 L]\) 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 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., \(\phi = L\)), a distance of \(s_l = 1768.26\) m. The total descent along this route is 50 m.

Fig. 4
figure 4

a Route 1 (34). b Curvature of Route 1 with \(s=0\) m at \((x,y,z) = (-50,-125,0)\) and \(s = s_l = 287.72\) m at \((x,y,z) = (50,125,0)\). c Route 2 (35) with \(R = 7.5\) m. d Curvature of Route 2 with \(s=0\) m at \((x,y,z) = (0,0,0)\) and \(s = s_l = 203\) m at \((x,y,z) = (200,0,0)\). e Route 3 (36). f Curvature of Route 3 with \(s=0\) m at \((x,y,z) = (0,-200,50)\) and \(s = s_l = 1768.26\) m at \((x,y,z) = (1000,200,0)\). Solid sections represent when pedalling and the dashed section represents braking according to the governing Eqs. (15)–(17) with pedalling/braking subject to (20) with \(s^*\) (21) taking \(t^*= 1\) s. We take riding parameters of Case 3 in (a, b); Case 1 in (c, d); and Case 3 in (e, f). The cases are listed in Table 2

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.

Fig. 5
figure 5

a Sketch of a Gaussian fit route (35) (dashed) taken straight through a roundabout with radius R. The road boundaries, including traffic islands, are shown in solid. b Maximum steady speed \(u^{\dagger }\) (37) for traversing a roundabout of inner radius R without exceeding the centripetal acceleration leading to sliding (18). The coefficient of friction \(\mu\) 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^{\dagger }\) in m/s and the right y-axis in km/h

The curvature on a roundabout with a Gaussian fit (35) is maximised at \(x=L/2\), with \(\left| \kappa (L/2) \right| = 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^{\dagger }\) without exceeding the centripetal acceleration (20) is

$$\begin{aligned} u^{\dagger } = \sqrt{\mu gR}, \end{aligned}$$
(37)

taking \(\Gamma = 1\) (18) for an upper limit. The maximum steady-state speed scales with \(\sqrt{R}\) (Fig. 5b). The scaling with \(\sqrt{\mu }\), illustrating the speed adjustment required for wet or dry conditions (Table 1). This limit is independent of \(s^*\) as it is designed so that braking is not required.

5.2 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. (15)–(17), with the transition between pedalling and braking given by (20).

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 steady-state speed, \(u_0 = 12\) m/s, as opposed to a descending steady-state speed (27). The rider brakes for \(\approx 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.

Fig. 6
figure 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

5.3 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 \(\Gamma _1 \mu 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 (\(\bullet\)), 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.

Fig. 7
figure 7

a, b Route 1 (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 (\(\bullet\)). The horizontal lines represent the thresholds (20) for transitioning between pedalling and braking: \(\Gamma _2 \mu g\) (dashed) \(< \Gamma _1 \mu g\) (dot-dashed) \(< \mu g\) (dotted). Here \(\Gamma _1 = 0.8, \Gamma _2 = 0.2\), and \(\mu =0.6\) (dry). (Right) Maximum centripetal acceleration (solid; left y-axis) and mean power (dashed; right y-axis) against \(t^*\)

We vary \(t^*\) to find an optimal value for each route that minimises the maximum centripetal acceleration (\(\bullet\)) experienced along that whole route (Fig. 7b, d, f). For Route 1, \(t^*_{\text {opt}} \approx 2.06\) s; Route 2, \(t^*_{\text {opt}} \approx 2.6\) s; and for Route 3, \(t^*_{\text {opt}} \approx 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 which the maximum centripetal acceleration is minimised, it remains below the threshold \(\Gamma _1 \mu g\).

Fig. 8
figure 8

a Route 1 (34). b Curvature of Route 1 with \(s=0\) m at \((x,y,z) = (-50,-125,0)\) and \(s = s_l = 287.72\) m at \((x,y,z) = (50,125,0)\). c Route 2 (35) with \(R = 7.5\) m. d Curvature of Route 2 with \(s=0\) m at \((x,y,z) = (0,0,0)\) and \(s = s_l = 203\) m at \((x,y,z) = (200,0,0)\). e Route 3 (36). f Curvature of Route 3 with \(s=0\) m at \((x,y,z) = (0,-200,50)\) and \(s = s_l = 1768.26\) m at \((x,y,z) = (1000,200,0)\). Solid sections represent when pedalling and the dashed section represents braking according to the governing Eqs. (15)–(17) with pedalling/braking subject to (20) with \(s^*\) (21) given by: Case 3 with \(t^*_{\text {opt}} = 2.06\) s in (a, b); Case 1 with \(t^*_{\text {opt}} = 2.6\) s in (c, d); and Case 3 with \(t^*_{\text {opt}} = 2.55\) s in (e, f). The cases are listed in Table 2

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^*\approx 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 \(\sim \,12\) W, however these routes are short so that small changes in acceleration after braking have a larger overall effect. For Route 3, the route is long enough (\(s_l = 1768.26\) m) so that change in mean power, \(\sim 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.

6 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.

7 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.