Skip to main content
PLOS One logoLink to PLOS One
. 2023 Feb 27;18(2):e0278961. doi: 10.1371/journal.pone.0278961

A bicycle can be balanced by stochastic optimal feedback control but only with accurate speed estimates

Eric Maris 1,*
Editor: Ning Cai2
PMCID: PMC9970107  PMID: 36848331

Abstract

Balancing a bicycle is typical for the balance control humans perform as a part of a whole range of behaviors (walking, running, skating, skiing, etc.). This paper presents a general model of balance control and applies it to the balancing of a bicycle. Balance control has both a physics (mechanics) and a neurobiological component. The physics component pertains to the laws that govern the movements of the rider and his bicycle, and the neurobiological component pertains to the mechanisms via which the central nervous system (CNS) uses these laws for balance control. This paper presents a computational model of this neurobiological component, based on the theory of stochastic optimal feedback control (OFC). The central concept in this model is a computational system, implemented in the CNS, that controls a mechanical system outside the CNS. This computational system uses an internal model to calculate optimal control actions as specified by the theory of stochastic OFC. For the computational model to be plausible, it must be robust to at least two inevitable inaccuracies: (1) model parameters that the CNS learns slowly from interactions with the CNS-attached body and bicycle (i.e., the internal noise covariance matrices), and (2) model parameters that depend on unreliable sensory input (i.e., movement speed). By means of simulations, I demonstrate that this model can balance a bicycle under realistic conditions and is robust to inaccuracies in the learned sensorimotor noise characteristics. However, the model is not robust to inaccuracies in the movement speed estimates. This has important implications for the plausibility of stochastic OFC as a model for motor control.

Introduction

Keeping balance is an important function for many organisms. With this function, the organism controls one body axis relative to gravity, and it achieves this by keeping the body’s center of mass (CoG) above its area of support (AoS). In this paper, I will focus on balancing a bicycle. However, much of what I will say also holds for other forms of balancing that involve a human body: walking, running, skating, skiing, etc. For example, all forms of balancing a human body involve the same two basic actions for keeping the body’s CoG above its AoS: (1) changing the AoS while keeping the CoG fixed (e.g., by stepping out with one leg), and (2) shifting the CoG while keeping the AoS fixed (e.g., by leaning the upper body). Keeping balance during walking is an active field of research, and the recent review paper by Bruijn and Van Dieën [1] gives a good overview.

Keeping balance is a sensorimotor control problem: the central nervous system (CNS) receives sensory information about the body, the body-attached tools (bicycle, skates, skis, …), and their environment (turn radius, speed, …), and uses this information for calculating actions with which it controls the position of body and tools relative to gravity. The dominant model for sensorimotor control assumes that the CNS makes use of an internal model to determine these control actions [2, 3]. In some publications [4, 5], a distinction is made between forward and inverse internal models, but here I will only consider forward models. The (forward) internal model simulates the dynamics of the plant (body plus body-attached tools) it attempts to control.

A very influential version of this model claims that this control is optimal in the sense that it minimizes a cost functional that depends on movement precision (here, deviation from the upright position) and energetic costs [2, 3]. This model is called optimal feedback control (OFC), and in this paper I will apply the model’s stochastic version to bicycle balance control; the deterministic version would predict that the CoG stays exactly above the AoS once this position is reached, which is unrealistic.

To evaluate the plausibility of stochastic OFC as a model for bicycle balance control, one must address at least the following questions: (1) Is the model good enough to balance a bicycle under realistic conditions (lean and steering angles that are observed with real riders), and (2) Is the model robust to inaccuracies in the model parameters? The relevance of robustness follows from the fact that the model parameters must allow for an accurate simulation of the plant dynamics. However, in some inevitable cases (e.g., in the beginning of a learning process), the parameter values cannot be very close to their optimal values, and therefore the model must have some minimal robustness to inaccurate parameter values. Of course, the stabilization performance (indexed by, e.g., lean angle variability) may decrease with parameter inaccuracy, but for a realistic range of values (see Results), the bicycle and rider should not fall over.

It is useful to distinguish different types of inaccuracies with respect to the time it takes to reduce them. On the one extreme, there are inaccuracies that are reduced between (instead of within) cycling trips. These inaccuracies pertain to slowly varying characteristics of the plant (gain factors, moment arms, sensorimotor noise characteristics, …) that the CNS must learn from experience.

At the other extreme, there are the inaccuracies in the state variables (i.e., the variables of the equations of motion). In this paper, all state variables are related to limb configurations and gravity (steering angle, upper- and lower body angle) about which the CNS obtains information via the somatosensory (including proprioception) and the vestibular system. Inaccuracies in the CNS-estimated state variables are reduced on a timescale that is set by the delays in these sensory systems, which are around 100 ms [6]. Although I will not investigate this in the present paper, some minimal robustness is required to inaccuracies in these estimates. Fortunately, there is good evidence from psychophysical studies that, in healthy humans, the CNS obtains reliable sensory information about the body’s orientation relative to gravity: for body orientations near the vertical axis, the noise standard deviation of the CNS’s estimate is approximately 4 degrees [7].

In between these two extreme time scales (slowly varying plant characteristics and state variables), there is an intermediate time scale that is characteristic for parameters such as movement speed. According to the literature, movement speed estimates depend on optical flow [8]. However, these estimates are very unreliable, as is clear from its Weber fraction (the smallest step increase in forward optical flow velocity necessary for the difference to be perceived): to perceive an increase within 500 ms. the increase had to be at least 50% [9]. Therefore, a plausible model for bicycle balance control must have some minimal robustness to inaccuracies in movement speed estimates.

In the remainder of this introduction, I will first describe the mechanical aspects of bicycle balance control, and next how bicycle balance control can be formulated as a stochastic optimal control problem. In the Results section, I will first introduce a model of sensorimotor control that is based on the idea that a mechanical system (plant) is both controlled and learned by a computational system that uses an internal model to calculate optimal control actions. Next, in a simulation study, I will evaluate (1) whether this model is good enough to balance a bicycle under realistic conditions, and (2) whether it is robust to inaccuracies in the values of two parameters of the computational system, sensorimotor noise characteristics (slowly varying) and movement speed (intermediate time scale).

Control actions for balancing a bicycle

Problem definition

A standing human is balanced when his center of gravity (CoG) is above his area of support (AoS), which is formed by the soles of his two feet plus the area in between. Balance follows from the fact that the gravitational force (a vector quantity in 3D passing through the CoG) intersects this AoS. The situation is similar but not identical for a bicycle. A stationary bicycle (i.e., a bicycle in a track stand) is balanced when the combined CoG of rider and bicycle is above the one-dimensional line of support (LoS), the line that connects the contact points of the two wheels with the road surface. In this position, the direction of the gravitational force intersects the LoS. However, because of disturbances, the CoG cannot be exactly above this one-dimensional LoS for a finite period. Therefore, a bicycle is considered balanced if the CoG fluctuates around the LoS within a limited range, small enough to prevent the bicycle from touching the road surface.

Compared to a stationary bicycle, the balance of a moving bicycle is more complicated because, besides gravity, also the centrifugal force acts on the CoG. Crucially, the centrifugal force is under the rider’s control via the turn radius [10]. The balance of a moving bicycle depends on the resultant of all forces that act on the CoG: a bicycle is balanced if the direction of this resultant force fluctuates around the LoS within a fixed range. Besides the forces that act on the CoG, there are also forces that are responsible for the turning of the bicycle’s front frame, and some of these do not depend on the rider [11]. These latter forces are responsible for the bicycle’s self-stability and will be discussed later (see Bicycle self-stability).

The geometry of the rider-bicycle combination

The control actions with which a rider can balance his bicycle are constrained by the geometry of the bicycle and the rider’s position on it. To describe the possible control actions, I start from the kinematic variables of a model of the rider-bicycle combination, shown in Fig 1. This model consists of three rigid bodies: front frame, rear frame, and the rider’s upper body. The positions of these three bodies are specified by three angular variables: (1) the steering angle (the position of the front frame relative to the rear frame), denoted by δ, (2) the rear frame lean angle (the position of the rear frame relative to gravity), denoted by ϕ1, and (3) the upper body lean angle (the position of the upper body relative to gravity), denoted by ϕ2.

Fig 1. Kinematic variables of the bicycle model plus the rider-controlled torques.

Fig 1

(A) Side view. In green, the bicycle rear frame, characterized by its lean angle ϕ1 over the roll axis (green arrow). In red, the bicycle front frame, characterized by its angle δ over the steering axis (red arrow). In blue, the rider’s upper body, characterized by its lean angle ϕ2 over the roll axis (blue arrow). In black, (1) the steering torque Tδ and the lean torque Tϕ2, which are both applied by the rider, and (2) the steering axis angle λ, which is set equal to 90 degrees for the purposes of the present paper (see text). (B) Rear view. In green, the bicycle rear frame (plus lower body) lean angle ϕ1. In blue, the rider’s upper body lean angle ϕ2. The symbol ⨂ denotes the CoG of the upper body (in blue), the lower body (in green), and the combined CoG (in black).

I assume that the rider sits on the saddle and keeps his feet resting on the non-moving pedals. In this position, the rider’s lower body (the hips/pelvis and below) is firmly supported and can be considered a part of the rear frame. This simplification implies that leg movements are not used for balance control. However, the stochastic version of this bicycle model (see, Sensorimotor noise and stochastic OFC) allows for pedaling-related movements to be included as motor noise and, in this way, to produce associations between lean- and steering angles. In sum, the only forces that can be used for balance control are (1) a steering torque Tδ on the handlebars, and (2) a lean torque Tϕ2 at the hinge between the rider’s upper body and the rear frame, corresponding to the hips.

Cycling involves a double balance problem

Cycling involves a double balance problem, of which I have described the first part: keeping the combined CoG of the rider and the bicycle above the LoS. The second balance problem pertains to the rider only: keeping his CoG above his AoS. In the bicycle model in Fig 1, the rider is represented by his upper body, of which the CoG must be kept above the saddle. The balance problem with respect to the rider is further simplified by only considering the balance over the roll axis (parallel to the LoS), which corresponds to upper body movements to the left and the right. I thus ignore the balance over the pitch axis (perpendicular to the LoS and gravity), which corresponds to upper body movements to the front and the back, typically caused by accelerations and braking. With this simplification, the joint between the rider’s upper body and the rear frame is a hinge with a single degree of freedom.

Balance control strategies from a mechanical point of view

For keeping the combined CoG over the LoS (the first balance problem), the relevant control actions must result in a torque over the LoS (roll axis). Within the constraints of our kinematic model, there are two ways for a rider to perform a control action: (1) by turning the handlebars, and (2) by leaning the upper body. To explain these control actions, it is convenient to make use of Fig 1B. This is the schematic of a double compound pendulum, of which the dynamics depend on how it is actuated: (1) if the contact between the green rod and the road surface is controlled by a linear force, the dynamics is known as the “double compound pendulum on a cart” [12], and (2) if the angle between the green and the blue rod (the upper body lean angle) is controlled by a torque at this joint, the dynamics is known as the Acrobot [13].

We first take the perspective of a double compound pendulum on a cart. This involves that, by turning the handlebars, the contact point of the green rod (representing the combined front and rear frame) with the road surface moves to the right under the combined CoG. In fact, turning the handlebars changes the trajectory of the tire-road contact points and, because the CoG wants to continue in its pre-turn direction (by Newton’s first law), this results in a centrifugal force in the bicycle reference frame (of which the LoS is one of the defining axes). This centrifugal force is perpendicular to the LoS and results in a torque over the roll axis in the direction opposite to the turn (a tipping out torque). This steering-induced tipping out torque can be used to move the combined CoG to the opposite side of the turn. Thus, steering in the direction of the lean produces a tipping out torque that brings the combined CoG over the LoS. This explains the name of this control mechanism: “steering to the lean”.

We now take the perspective of the Acrobot, which involves that, by applying a lean torque at the hips, the lean angles of both body parts change. Consequently, the separate CoGs of both body parts are shifted, and this in turn affects the gravity-dependent torques on these body parts. Crucially, a lean torque at the hips does not shift the combined CoG, and therefore cannot bring this combined CoG above the LoS in a direct way. However, it can do so in an indirect way, namely by turning the front frame. This is essential for the mechanism via which a bicycle can be balanced when riding no handed. First, when leaning the upper body sufficiently to one side, the bicycle and the lower body lean to the other side. Next, depending on properties of the bicycle (wheel flop, the wheels’ gyroscopic forces, the combined CoG [11, 14]), leaning the bicycle to one side turns the front frame to the same side. This lean-induced turn of the front frame then initiates the same mechanism as when turning the front frame by means of the handlebars: a change in the trajectory of the tire-road contact points results in a centrifugal force perpendicular to the LoS, producing a torque over the roll axis in the direction opposite to the turn. This lean torque brings the LoS under the CoG.

For the second balance problem (keeping the upper body’s CoG over its AoS), the same two control actions can be used: (1) turning the handlebars, and (2) applying a lean torque at the hips. Turning the handlebars in the direction of the upper body lean produces a lean torque in the other direction (i.e., away from the lean), and this allows to control this upper body lean angle. By applying a lean torque at the hips, this upper body lean angle can be controlled in a more direct way, but at the expense of leaning the bicycle (and the lower body) in the opposite direction.

Because the two balance problems use the same control actions, coordination is required. For example, a torque at the hips can be used to counter the turning-induced centrifugal torque on the upper body: by applying a hip torque of equal magnitude as this centrifugal torque (but opposite direction), the position of the upper body can be controlled. There exists an energy-efficient alternative for this upper body control strategy, well-known in motorcycle racing: leaning the upper body to the inside of the turn. When the upper body is sufficiently leaned to the inside of the turn, the resulting gravity-induced torque will counter the centrifugal torque on the upper body CoG.

Balancing and steering

When riding a bicycle, the rider typically does not only want to balance his bicycle, but also wants to steer it over a chosen/indicated trajectory. This paper only considers control actions for balancing the bicycle, and therefore will not consider constraints on the trajectory, such as obstacles and bicycle path edges. This pure balance task corresponds to cycling blindfolded on an empty parking lot. After a brief familiarization, most humans can cycle blindfolded on an empty parking lot; a search on social media will show several demonstrations of this.

Bicycle self-stability

At this point, it is necessary to mention the self-stability of the bicycle, the fact that, within some range of speeds, the bicycle is balanced without control actions by the rider [11]. Self-stability is investigated by modelling the rider as a mass that is rigidly attached to the rear frame and does not touch the front frame, allowing the handlebars to move freely. Self-stability depends on multiple factors, such as geometric trail, pneumatic trail, wheel flop, the wheels’ gyroscopic forces, and the combined CoG [11, 14]. These factors all contribute to the bicycle’s tendency to steer in the direction of the lean.

The focus of the present paper is on the rider’s contribution to bicycle stability, and therefore I used a model bicycle from which I removed all known factors that contribute to the bicycle’s self-stability (see Fig 2). Specifically, I removed the effects of pneumatic trail and the wheel’s gyroscopic forces by replacing the wheels by ice skates (or, equivalently, tiny roller skate wheels). And I removed the effects of geometric trail and wheel flop by choosing a vertical steering axis (i.e., by setting λ in Fig 1 to 90 degrees), as in most bicycles for bicycle motocross (BMX) and artistic cycling. I also keep the CoG at approximately the same position as on a regular bicycle (i.e., 30 cm before the rear wheel contact point), because a CoG with a more anterior position may result in bicycle self-stability [14]. Without all these effects, the bicycle’s front frame does not steer in the direction of the lean unless the rider turns the handlebars. Therefore, the balance control strategy for riding no handed that I described before, cannot be used on this model bicycle. In the Methods and Models section, I will describe how this simplified bicycle-rider combination can be modeled as a double pendulum of which the base can be moved by turning the front wheel/skate, and the joint at the hips can be actuated. This model will be called the “steered double pendulum” (SDP).

Fig 2. Bicycle model without the known factors that affect bicycle self-stability.

Fig 2

Compared to Fig 1, this model has ice skates instead of wheels and a vertical steering axis.

Linear and nonlinear bicycle models

The SDP is a nonlinear model. This nonlinearity a desirable property because the objective of the present paper is to demonstrate that a linear control mechanism can balance a nonlinear mechanical system. The most popular bicycle model is linear, and it was proposed by Meijaard, Papadopoulos et al. [11] as a benchmark for studying the passive dynamics of a bicycle. Depending on the model parameters, this linear model is self-stable in some range of speeds.

For comparison with the nonlinear SDP without self-stabilizing forces, I also used a linear bicycle model with self-stabilizing forces (gyroscopic forces plus the forces that depend on geometric trail and wheel flop) to check the generality of some results obtained with the nonlinear SDP without self-stabilizing forces. This linear model will be called the “benchmark double pendulum” (BDP), and it is a combination of an existing benchmark model [11] and the double pendulum.

Another nonlinear bicycle model has been proposed by Basu-Mandal, Chatterjee et al. [15]. Just like the linear benchmark model [11], this nonlinear model does not include an upper body. However, it turns out to be straightforward to produce the BDP by linearizing the double pendulum and combining these with the linear benchmark model. Such an extension was much less straightforward starting from the nonlinear model by Basu-Mandal, Chatterjee et al. [15]. This motivates my choice for the SDP and the BDP. For this paper, the mechanical details of the bicycle model are not crucial. Instead, it is my objective to demonstrate that a linear control mechanism can balance a whole range of bicycle models and does so under realistic conditions. Because almost all mechanical systems are nonlinear, I will focus on the SDP, and use the BDP to investigate the generality of the SDP results.

Control and noise forces

For investigating balance control, one must distinguish between control and noise forces. Loosely formulated, control forces are the forces that the rider uses to balance the bicycle. For a more precise formulation, I use the optimal control framework, which defines control actions as the actions that optimize a quantitative performance index. Thus, control forces are the optimal forces for a given performance index.

Noise forces are the difference between the forces that are applied and the optimal control forces. It is useful to distinguish between (1) noise forces that originate from the rider, and (2) noise forces that originate from interactions of the bicycle with the environment (e.g., collisions, gusts of wind). In this paper, I only consider noise forces that originate from the rider. These noise forces affect the balance via the same contact points as the two control forces (the handlebars and the saddle). These noise forces are an important instrument in the simulations that I have run to investigate bicycle balance control: they distort the balance, and this allows to investigate different stabilizing (balance-restoring) mechanisms.

Balancing a bicycle as a stochastic optimal control problem

Optimal feedback control

Every motor task can be performed in an infinite number of ways, and this is for two reasons: (1) the human body has a very large number of joints that can be used in various combinations to produce the same trajectory of the relevant body part (the combined CoG in a balance task, an effector endpoint in reaching task, …), and (2) a motor task unfolds over time and can be performed with different speed profiles. Nevertheless, most motor tasks are performed in a highly stereotyped manner. For instance, reaching tasks consistently show roughly straight-line paths with bell-shaped speed profiles [3].

To explain these highly stereotyped actions among skilled performers, Todorov and colleagues [3, 16] proposed optimal feedback control (OFC). This theory uses a scalar cost functional that increases with time-integrated imprecisions and energetic costs. OFC involves that the control actions are chosen such that this cost functional is minimized. OFC is sometimes proposed as an alternative for feedforward trajectory planning [2], but this incorrectly suggests that OFC and trajectory planning cannot be combined. In this paper, I will present a model for the specific task of balance control, as when cycling blindfolded on an empty parking lot. For this specific task, one can ignore all aspects of cycling that involve trajectory planning, such as steering a bicycle over an indicated path or an obstacle course.

In previous work, OFC has been mainly applied to reaching tasks [2, 1619]. For such tasks, the overall precision predominantly depends on the precision at the endpoint of the reaching movement. In line with this fact, the cost functional is dominated by imprecisions (distances between the end effector and the reach target) near the endpoint [16]. In contrast, for tasks in which a state must be maintained over time, such as balancing a bicycle, the cost functional must depend on the imprecisions uniformly across the theoretically infinite lean angle trajectory.

For applying OFC, one needs the equations of motion (EoM) that describe the dynamics of the system (here, the rider-bicycle combination) as a set of differential equations. The variables of these differential equations are called state variables, and for my two bicycle models (SDP and BDP) they are the following: the steering angle δ, the rear frame lean angle θ1, the upper body lean angle θ2 (see Fig 2), plus their corresponding angular rates. In the Materials and Methods, I will derive the SDP EoM from Lagrangian mechanics, and the BDP EoM by linearizing the double pendulum EoM and combining these with the linear benchmark model.

The fact that the SDP EoM are nonlinear has important implications for the use of OFC for stabilization. Specifically, OFC does not provide general results for stabilizing a nonlinear system. However, it provides very useful results for stabilizing a linear system, and this has led to the common practice in robotics to linearize the nonlinear system, apply OFC for linear systems, and use the resulting optimal control signals to stabilize the nonlinear system [13]. I hypothesize that the CNS implements a similar solution for stabilizing a bicycle and the rider’s upper body: build an internal linear approximation of the external nonlinear system that the CNS wants to stabilize and use calculations like those from OFC to achieve this. In a later section, Stabilizing a nonlinear mechanical system by linear stochastic OFC, I will describe this model in more detail.

OFC uses a scalar cost functional to define the optimal control actions. This is in line with the fact that the CNS implements functions for setting goals and evaluating actions. For our application to bicycle balance control, it is natural to define this cost functional as one that increases with (1) deviations between the CoGs (combined and upper body) and their respective support, and (2) the energetic costs of the control actions. The control actions that result from the minimization of this cost functional are the steering and the lean torque.

Sensorimotor noise and stochastic OFC

Because riders and other biological systems suffer from sensor and motor noise [20], deterministic OFC is an unrealistic model for bicycle balance control. As a result of this noise, the CNS cannot perfectly know nor control the outside world, which includes the body that is attached to the CNS. Specifically, if the sensory feedback is noisy, the CNS cannot infer the state variables perfectly from this feedback. Also, the CNS is unaware of the motor noise that is generated at the muscular level, which is added after the CNS has produced the motor command. Therefore, even if the CNS were able to calculate an optimal motor command based on perfectly accurate state information, that command would not fully control the muscles.

Fortunately, for a system whose behavior depends on noise, optimal control is still defined, namely if the system is governed by linear stochastic differential equations (SDEs) with additive Gaussian noise and a quadratic cost functional. Under these conditions, control is optimal if it is based on an optimal state estimate [21]. The optimality of this state estimate is relative to the conditional probability distribution of the state estimate at time t given the values of all variables on previous times. Therefore, this optimal estimate not only depends on the sensory feedback at time t, but also on the optimal state estimate and the control action (actually, its efference copy) just before this time. This optimal estimate involves the familiar Kalman filter, which weights the sensory feedback in proportion to its reliability. Several empirical studies have suggested that state estimation in the CNS involves this type of weighting in proportion to the reliability of the available information [2224].

The ability to correct for motor and sensor noise depends on the CNS’s internal model of the dynamics of the plant and the sensory feedback. The CNS uses this internal model to estimate the current state from (1) the previous state, (2) the most recent control action, and (3) the sensory feedback. Several psychophysical [2527] and neurophysiological [28, 29] studies have provided evidence for such internal models. An internal model can be conceived as a set of differential equations that allows the CNS to simulate state variables and to combine this information with the sensory feedback to obtain an optimal state estimate.

The robustness of control based on an internal model

Because an internal model cannot be directly observed, its hypothesized role in sensorimotor control must be evaluated based on its performance. This performance pertains to how well the optimal controls under a linear approximation can stabilize a nonlinear system. This linear approximation involves several parameters, such as the matrices that define the linear approximation to the nonlinear EoM and the noise covariance matrices (see Stabilizing a nonlinear mechanical system by linear stochastic OFC). The larger the range of parameter and state values for which the internal model can stabilize the nonlinear system, the more robust the control. Because the CNS must learn the internal model from experience with the mechanical system, which may be a slow process, the imperfect internal must be robust to some inaccuracies in the internal model.

In this paper, for two types of parameters, the learned sensorimotor noise characteristics, and movement speed, I will determine the range of values for which the internal model can stabilize the nonlinear bicycle model while producing realistic state values. From these values, it can be concluded that the model is robust to inaccuracies in the learned sensorimotor noise characteristics, but not to inaccuracies in the movement speed estimates.

Methods and models

Equations of motion (EoM) for the steered double pendulum (SDP)

The SDP is depicted schematically in Fig 1. The SDP contains ingredients of three familiar models: the double compound pendulum on a cart [DCPC, 12], the Acrobot [13], and the torsional spring-mass-damper system. Roughly speaking, the SDP is a double compound pendulum of which the base can be steered by a wheel (instead of a cart) and the joint between the two rods (at the hips) can be actuated, as in the Acrobot. Both actuated joints, one at the handlebars and one at the hips, are modeled as a torsional spring-mass-damper system. I will denote the lower and the upper rod as, respectively, the lower and the upper body. The lower body represents the rear frame plus the rider’s lower body; the upper body only represents the rider’s upper body.

The kinematic model

Fig 3 depicts the relevant kinematic variables in both an inertial (yellow origin) and a rider/bicycle-centered (purple origin) reference frame. The inertial reference frame has an arbitrary origin, a vertical coordinate axis V perpendicular to gravity, and an arbitrary horizontal coordinate axis H perpendicular to V. The rider/bicycle-centered reference frame has its origin at the orthogonal projection of the combined CoG on the LoS, and a vertical and horizontal coordinate axis V’ and H’ that are parallel to those of the inertial reference frame. The rider/bicycle-centered reference frame is non-inertial because, when the bicycle turns, the origin no longer moves in a straight line, and therefore accelerates in the inertial reference frame.

Fig 3. The relevant kinematic variables of the SPD in both an inertial (yellow origin) and a rider/bicycle-centered (purple origin) reference frame.

Fig 3

The inertial reference frame has an arbitrary origin, and the rider/bicycle-centered reference frame has its origin at the orthogonal projection of the combined CoG on the LoS. These reference frames have parallel coordinate axes. In green and blue, I depict the lean angles of the lower and the upper body (ϕ1 and ϕ2), and in red, I depict the yaw angle ψ of the LoS. The horizontal plane (road surface) is colored light yellow.

I will use the rider/bicycle-centered reference frame to define three kinematic variables. The first two kinematic variables are the lower and the upper body lean angles (ϕ1 and ϕ2), which are defined relative to the vertical axis V’. The third kinematic variable is the yaw angle ψ of the LoS, which is defined relative to the horizontal axis V’. When describing the dynamics of the SDP, we need an expression for the centrifugal acceleration α at the combined CoG. I assume identical speeds at the separate CoGs of the lower and the upper body as well as identical angular rates of the projections on the horizontal plane. Then, the centrifugal acceleration only depends on the yaw angular rate ψ˙=ψ/t and the speed v:

α=vψ˙

Crucially, ψ˙ depends on the steering angle δ, and this allows the rider to control the LoS.

For the SDP EoM, one must know the precise dependence of ψ˙ on δ. Deriving this dependence is a well-known problem in vehicle dynamics [30], and here I use the known result. This result involves the so-called slip angle β(δ), which is the angle between the velocity vector of the combined CoG and the LoS. This slip angle can be obtained as follows:

βδ=tan1wrtanδW

In this equation, W is the wheelbase and wr is the position of the combined CoG on the LoS. More precisely, wr is the distance between the road contact point of the rear wheel and the orthogonal projection of the combined CoG on the LoS. For realistic values (W = 1.02, wr = 0.3, -20° < δ < 20°), the slip angle β(δ) is almost a linear function of δ:

βδwrδW

For steering angles -20° < δ < 20°, all deviations from linearity are less than 0.36%. I will continue to use this approximation. Following [30], one can obtain the centrifugal acceleration α(δ) as follows:

αδ=v2cosβδWtanδ Eq 1

For a constant speed v, the centrifugal acceleration is only a function of the steering angle δ.

The steering model

The steering model assumes that the steering angle δ is fully controlled by rider-applied forces on the handlebars. Thus, I ignore all forces that may contribute to the bicycle’s self-stability.

The steering assembly consists of the front wheel, the fork, the handlebars, and the rider’s arms. I model this assembly as a torsional spring-mass-damper system:

Isteerδ¨+Csteerδ˙+Ksteerδ=Tδ Eq 2

In Eq 2, Isteer is the assembly’s rotational inertia, Csteer its damping, and Ksteer its stiffness. The input to the steering assembly is the net torque produced by the rider’s muscles and denoted by Tδ on the right-hand side of Eq 2.

The double compound pendulum with a steer-actuated base

I model the lean angles ϕ1 and ϕ2 as the result of a double compound pendulum on a virtual (zero mass) cart with acceleration equal to α(δ), the centrifugal acceleration derived under our kinematic model (see Eq 1). Like the Acrobot, this double compound pendulum has an actuated joint between the upper and the lower body (the hips). To make the model more biologically realistic, I add stiffness and damping to the hips.

The EoM for ϕ1 and ϕ2 are obtained by first applying the Euler-Lagrange method to the DCPC with a zero-mass cart, and then adding the constraint that the cart is controlled by the steering-induced centrifugal acceleration α(δ). The derivation of the DCPC EoM using the Euler-Lagrange method can be found in the literature. Here, I started from Bogdanov (12) and added stiffness, damping and torque input at the joint between the two rods (the hips). Next, I added the constraint that the angles ϕ1 and ϕ2 have no direct effect on the position of the base of the first rod (in the DCPC, the point where the cart is attached). This constraint follows from the fact that the bicycle’s wheels are oriented perpendicular to the cart’s wheels. Under this constraint, the position of the base of the first rod is fully controlled by the steering-induced centrifugal acceleration α(δ). The result is the following:

d1cosϕ1d2cosϕ2αδ+d3d4cosϕ1ϕ2d4cosϕ1ϕ2d5ϕ¨1ϕ¨2+0d4sinϕ1ϕ2ϕ2d4sinϕ1ϕ2ϕ10ϕ˙1ϕ˙2+f1sinϕ1f2sinϕ2+Kpelvisϕ1ϕ2+Cpelvisϕ˙1ϕ˙2Kpelvisϕ1ϕ2Cpelvisϕ˙1ϕ˙2=0Tϕ Eq 3

The crucial difference between Eq 3 and the corresponding equation for the DCPC is that α(δ) replaces the acceleration of the cart. The constants in Eq 3 are defined as follows:

d1=m1l1+m2L1d2=m2l2d3=m1l12+m2L12+I1d4=m2L1l2d5=m2l22+I2f1=m1l1+m2L1gf2=m2l2g Eq 4

The constants m1, L1, l1 and I1 are, respectively, the mass, the length, the CoG (L1/2) and the mass moment of inertia of the double pendulum’s first rod, which represents the bicycle and the rider’s lower body. The constants m2, L2, l2 and I2 are defined in the same way, but now for the second rod, which represents the rider’s upper body. Further, g is the gravitational constant, and Kpelvis, Cpelvis and Tϕ are the stiffness, the damping, and the torque at the hips.

The SDP EoM are obtained from Eqs 2 and 3 by deriving expressions for the second derivatives δ¨ and ϕ¨1,ϕ¨2T. These expressions are complicated and not insightful. I use these EoM to define the state-space equations x˙=Ωx,u+m for the state variables x=δ,ϕ1,ϕ2,δ˙,ϕ1˙,ϕ2˙T, external forces u=Tδ,Tϕ2T, and motor noise m.

An optimal linear approximation of the SDP EoM

In our model for sensorimotor control, the computational system is a linear approximation of Ω(x, u). I find an optimal linear approximation by calculating the Jacobian of Ω(x, u) at the unstable fixed point x = 0 and without external input (i.e., u = 0). I obtained this Jacobian using the Matlab function jacobian.m. By taking the Jacobian of Ω(x, u) with respect to x and u, I obtain, respectively, the matrices A and B. This allows for the following approximation near the unstable fixed point:

x˙Ax+Bu

I numerically evaluated the accuracy of this approximation by calculating finite differences [Φ(ε, 0) - Φ(0, 0)]/ε (for A) and [Φ(0, ε) - Φ(0, 0)]/ε (for B) for decreasing values of ε. I found that for ε → 0 the finite difference approximations converged to A and B.

Equations of motion (EoM) for the benchmark double pendulum (BDP)

The BDP is based on three ideas. The first idea is to follow the approach of Meijaard, Papadopoulos et al. [11] and derive linearized EoM for a bicycle with the rider’s lower body rigidly attached to the rear frame and no upper body. These linearized EoM depend on a number of constants, and I chose these constants such that (1) the front frame is as similar as possible to the self-stable benchmark bicycle model described by Meijaard, Papadopoulos et al. [11], and (2) the lengths and masses are as similar as possible to the SDP. The second idea is to model the interactions between the upper body and the rear frame (which includes the lower body) by the linearized EoM of the double compound pendulum, similar to Dialynas, Christoforidis et al. [31]. The nonlinear EoM of the double compound pendulum are obtained from Eq 3 by removing the terms that correspond to the centrifugal acceleration α(δ), the stiffness and the damping. Finally, the third idea is to first derive the BDP EoM without stiffness and damping terms, and to add these terms only in the last step.

The approach of Meijaard, Papadopoulos et al. [11] involves a method to calculate the defining matrices of linearized EoM of the following type:

Mδ¨ϕ¨1ϕ¨2+Cδ˙ϕ˙1ϕ˙2+Kδϕ1ϕ2=0

The matrices M, C and K are functions of several constants (angles, lengths, masses, mass moments of inertia, gravitational acceleration, speed) that characterize the bicycle components and the internal forces that act on them. However, Meijaard, Papadopoulos et al. [11] only derived linearized EoM for bicycles with a rider that was rigidly attached to the rear frame. Thus, the upper body lean angle ϕ2 is absent from their EoM. This missing component can be obtained by linearizing the double pendulum EoM which models the interactions between ϕ1 and ϕ2. Schematically, each of the matrices M, C and K is composed as follows:

MP1,1MP1,20MP2,1MP2,20000+0000DP1,1DP1,20DP2,1DP2,2

in which “MP” denotes “Meijaard, Papadopoulos et al” [11], and “DP” denotes “Double Pendulum”. The MP calculations were performed by means of the Matlab toolbox Jbike6 [32], in which I entered the constants for a bicycle with the rider’s lower body rigidly attached to the rear frame and no upper body. This produced the constants MP(i,j) (i, j = 1,2) for M, C and K.

I now model the interactions between the upper body and the rear frame by the linearized EoM of the double compound pendulum. The nonlinear EoM of the double compound pendulum are obtained from Eq 3 by removing the terms that correspond to the centrifugal acceleration α(δ), the stiffness and the damping:

d3d4cosϕ1ϕ2d4cosϕ1ϕ2d5ϕ¨1ϕ¨2+0d4sinϕ1ϕ2ϕ2d4sinϕ1ϕ2ϕ10ϕ˙1ϕ˙2+f1sinϕ1f2sinϕ2=0Tϕ

I evaluate these EoM at ϕ1 = ϕ2 and replace sin(x) by its linear approximation near 0: sin(x) ≈ x. This results in

d3d4d4d5ϕ¨1ϕ¨2+f100f2ϕ1ϕ2=0Tϕ

The constants d3, d4 and d5 contain elements that must be added to the matrix M, and the constants f1 and f2 contain elements that must be added to the matrix K (for the definitions, see Eq 4). I will use the notation DP(i, j) (i, j = 1,2) to denote these elements. For M, the following elements are added:

  • DP(1, 1) = m2 L12

  • DP(1, 2) = DP(2, 1) = d4 = m2 L1 l2

  • DP(2, 2) = d5 = m2 l22 + I2

And for K, the following elements are added:

  • DP(1, 1) = m2 L1 g

  • DP(2, 2) = -f2 = -m2 l2 g

Finally, I added stiffness and damping terms that were also added to the SDP. The stiffness and damping terms were added to, respectively, K and C.

Realistic constants for the SDP and the BDP

I grouped the constants of the two bicycle models in several sets. Within every set, the constants for the SDP are described first, followed by those for the BDP.

Stiffness, damping and mass moment of inertia for the steering model

To assign realistic values to the stiffness and damping parameters of the steering model, it is useful to divide both sides of Eq 2 by Ksteer and to reparametrize the model as follows:

τ2δ¨+2ζτ+δ˙=TδKsteer, Eq 5

in which ζ is the damping ratio and τ is the time constant. Equating corresponding parts in Eqs 2 and 5, one obtains

Ksteer=Isteerτ2 Eq 6
Csteer=2ζτ Eq 7

For a damping ratio ζ < 1 the steering assembly oscillates in response to torque input. Because this does not happen in reality, ζ must be at least 1. The smaller the damping ratio ζ, the faster the response of the steering assembly, which is advantageous for stabilization. I will consider the most responsive steering assembly, and therefore set ζ = 1.

I now set the time constant τ to an empirically determined value. For that, I make use of the fact that a speeded single joint movement governed by a second order system reaches its maximum speed τ seconds after the beginning of the movement (see Empirical determination of the time constant of a critically damped second order system). From visual inspection of Fig 3B in Lewis & Perreault (2009) [33], I estimate τ = 0.33 seconds. From Eq 7, I find that, in the critically damped case, Csteer equals 2τ.

The mass moment of inertia Isteer has two components, one determined by the bicycle’s front assembly (Isteer_bic), and one by the rider’s arms (Isteer_arms). Isteer_bic was calculated as the sum of two component mass moments of inertia: (1) the fork about its main axis, and (2) the wheel about an axis through the rim. These two values were obtained from the MP benchmark model [11]: Isteer_bic = 0.006 + 0.1405 = 0.1465.

The mass moment of inertia Isteer_arms results from the fact that the arm muscles must also move themselves plus the bones to turn the front assembly. I treat the arms as 4 kg point masses at the end of the handlebars (turn radius 0.3 m.). It follows that Isteer_arms = 2 × 4 × 0.32 = 0.72 kg m2. Thus,

Isteer=Isteer_bic+Isteer_arms=0.1465+0.72=0.8665kgm2

For the BDP, the complete 3 × 3 mass moment of inertia matrix of the front frame must be specified. I specified this matrix using JBike6, in which I adjusted the values of the MP benchmark model. For two of three axes, these values had to be increased by a factor of approximately 12 because the arms were not a part of the MP benchmark model. I specified the stiffness and damping of the front frame in the same way as for the SDP, namely by setting the damping ratio (ζ = 1) and the time constant (τ = 0.33).

Stiffness, damping and mass moment of inertia for the hips

I follow the same reasoning as for the steering model, and I also set the damping ratio ζ = 1 and the time constant τ = 0.33. The mass moment of inertia for the hip joint depends on the geometry and the mass of the model for the upper body, which I describe in the next paragraph.

Lengths and masses of the bicycle and upper body models

The SDP models the bicycle (plus lower body) and the upper body as rods. I consider a 15 kg. bicycle and a 85 kg. rider with a 45%-55% mass distribution between the lower and the upper body. The bicycle (lower body) height is 1.1 m., and the upper body height is 0.75 m. In terms of the constants in Eq 4:

m1=0.45×85+15=53kg
m2=0.55×85=47kg
L1=1.1m
L2=0.75m

Using the formula for the mass moment of inertia of a homogeneous rod, I obtain

I1=m1L1212=5.34kgm2
I2=m2L2212=2.2031kgm2

For the BDP rear frame, I adjusted the values of the MP benchmark model to consider the lower mass and CoG. The new values were approximately 75 percent lower than the MP benchmark model.

Bicycle geometry

The bicycle geometry parameters were identical to those of the MP benchmark model. Specifically, the wheelbase and the CoG on the LoS were, respectively, W = 1.02 and wr = 0.3 m. The angle of steering axis (only relevant for the BDP) was λ = 72 degrees.

Gravity and speed

I set the gravitational constant g = 9.81 m/sec2, and the bicycle speed v = 4.3 m/sec, the average bicycle speed in Kopenhagen [34].

Self-stability of the BDP

Without the upper body, the BDP EoM are for a bicycle with the rider’s lower body rigidly attached to the rear frame, and no components taken from the double pendulum EoM. The self-stability of this simplified bicycle can be investigated using the established criterium that the eigenvalues’ real parts must be negative. With the constants used in this paper, this simplified bicycle is not self-stable. (This holds with or without the stiffness and damping terms for the arms and the hips.) However, by changing some constants (e.g., the front frame’s mass moment of inertia), it is easy to make this simplified bicycle self-stable. I did not do this because I wanted to stay as close as possible to both the MP benchmark model and the SDP.

Empirical determination of the time constant of a critically damped second order system

I will now show that the time constant τ of a critically damped second order system can be determined empirically from an experiment in which participants make speeded movements of the joint that is modeled by this system. I start from the step response of this critically damped system:

δt=1Ksteer11+tτet/τ

Using Eq 6, I can replace Ksteer by Isteer/τ2, such that I obtain

δt=τ2Isteer11+tτet/τ

Our objective is to find the time at which the angular rate δ˙t is the highest. This angular rate is the following:

δ˙t=δt=tet/τIsteertet/τ

The strictly monotone transformation lnδ˙t is a concave function of t, and therefore the maximum of δ˙t can be found by solving

lnδ˙tt=0

The result of this equation is t = τ. Thus, the time constant τ is the time after movement onset at which the speed is the highest.

What are realistic turn radiuses, lean angles and steering angular rates?

I start from the following requirements: (1) the turn radius may not be less than the minimum radius below which the tires loose traction, (2) the lean angle may not exceed an upper bound above which most riders would feel uncomfortable, and (3) the steering angular rates may not exceed the ones that the fastest human hands can make. Starting with the first requirement, skidding occurs when the centrifugal force mv2/R exceeds the frictional force mμg, with m being the mass of the bicycle-rider combination and μ the coefficient of friction. For rolling rubber tires on asphalt, μ = 0.75 is a good choice [35], and this corresponds to a minimum turn radius of v2/μg = 4.30562/(0.75 × 9.81) = 2.5196 m. In the following, we will report the curvature, which is the inverse of the radius. The maximum curvature is 1/2.5196 = 0.3969 m-1.

The curvature C follows from the kinematics of the bicycle model (see The kinematic model). I use an equation that takes into account the location of the combined CoG along the longitudinal axis [30] and the fact that curvature depends on the steering axis angle λ [36]:

CtanδcosβδWhλ,ϕ1

in which β(δ) is the slip angle, which accounts for the location of the combined CoG along the longitudinal axis, and h(λ, ϕ1) is a correction factor for a non-vertical steering axis (λ ≠ π⁄2). In the SDP, λ = π⁄2 and h(λ, ϕ1) = 1; in the BDP, λ ≠ π⁄2 and h(λ, ϕ1) = cos(π⁄2 - λ)/cos(ϕ1).

I now determine an upper bound for the combined CoG lean angle above which most riders would feel uncomfortable. Based on informal observations, I start from a rider that makes a steady U-turn at 15.5 km/h (= 4.3056 m/s) on a 7 m. wide two-way road, which is a regular width in Europe. To stay balanced in such a turn, the combined CoG lean angle must produce a gravitational acceleration that balances the turn-induced centrifugal acceleration. A simple geometrical argument shows that this lean angle is the following: tan-1((v2R)/g) = tan-1((4.30562/7)/9.81) = 0.2637 rad. (= 15.1072 degrees). Because the objective of the model is to keep the bicycle upright, and not to keep it in a steady U-turn, the average combined CoG lean angle must be substantially less than 0.2637 rad.

Finally, to find an upper limit for the steering angular rate, I start from the fastest hand movement observed in a reaching task, which is 4 m/s [37]. Combining this linear velocity with a typical commuter handlebar width of 0.6 m, I find a critical steering angular rate of 13.33 rad/s.

Simulating the stabilization of the mechanical by the computational system

I have written computer code in Matlab for simulating the stabilization of the mechanical by the computational system and visualizing the results. This code is added to the supplementary information for this paper. With this code, one can perform all the simulations on which I have reported in this paper as well as variations inspired by one’s own questions and hypotheses. Running simulations is only possible in discrete time, and I must therefore discretize the continuous time model. This is the main topic of this section.

Simulating the combined system in discrete time

The discrete time axis is defined by the increment Δt: 0, Δt, 2Δt, 3Δt …. The model in Fig 5 involves a closed loop, and to describe it, one can start at every point. Here, I start from the sensory input system, which receives the state x(t) from the mechanical system and feeds the noise-corrupted sensory input y(t) = Cx(t) + s(t) into the computational system. This is depicted schematically in Fig 4. The computational system determines the internal state estimate x^t+Δt on the basis of y(t), the previous internal state estimate x^tΔt, and the previous control action u(t - Δt). No internal state estimate is calculated for time t. The new control action u(t + Δt) is obtained from x^t+Δt. Adding the motor noise m(t + Δt) to u(t + Δt) produces z(t + Δt), the input to the mechanical system. This input z(t + Δt), together with the previous state x(t) produces the new state x(t + 2Δt). From this new state and the sensor noise s(t + 2Δt), the new sensory input y(t + 2Δt) is obtained, which closes the loop. No actual state and sensory input is calculated at time t + Δt.

Fig 5. Sensorimotor control of a mechanical system (in red) by input from a computational system (in blue).

Fig 5

The mechanical system is governed by the nonlinear differential equations x˙=Ωx,z, and the computational system produces an optimal control action u. The motor output system (in black) adds noise m to u and feeds this into the mechanical system. The sensory input system (in green) maps the state variables x to sensory variables, adds noise s and feeds the resulting sensory input y into the computational system. The computational system calculates an optimal internal state estimate x^ by integrating a linear differential equation (characterized by the matrices A, B, C, and the Kalman gain K) that takes the sensory feedback y as input. The optimal control action u is obtained from x^ and the linear quadratic regulator (LQR) gain -M.

Fig 4. Schematic representation of the simulation of the combined system in discrete time.

Fig 4

In red, green, blue and black, I show the variables that generated in, respectively, the mechanical, the sensory input, the computational, and the motor output system.

Solving the discrete time computational and mechanical system

For simulating the combined system, one must solve the discrete time mechanical and computational system. For the mechanical system, this involves finding x(t + 2Δt) by numerically integrating x˙=Ωx,z=Ωx,u+m over the interval [t, t + 2Δt] starting from the initial condition x(t) and with external input u = u(t + Δt) and m = m(t + Δt). For this, I used the Matlab function ode45, which is based on an explicit Runge-Kutta (4,5) formula [38].

To solve the discrete time computational system, I follow a similar approach, but now take advantage of the fact that an explicit solution exists for linear systems. Using this explicit solution, I can write the discrete time version of the linear approximation as follows:

xt+Δt=A2ΔtxtΔt+B2ΔtutΔt+Σ2Δt1/2n1 Eq 8
yt=C2ΔtxtΔt+Ψ2Δt1/2n2 Eq 9

The simulated versions of the actual motor and sensor noise are, respectively, Σ2Δ1/2n1 and Ψ2Δ1/2n2, with n(1) and n(2) denoting independent normally distributed random variables with an identity covariance matrix. The noises Σ2Δt1/2n1 and Ψ2Δt1/2n2 thus have a normal distribution with respective covariance matrices Σ2Δt and Ψ2Δt, which are defined as follows:

Σ2Δt=02ΔteAτΣeATτdτ
Ψ2Δt=2ΔtΨ

The matrices A2Δt, B2Δt, and C2Δt follow from the well-known solution of a linear state-space model with defining matrices A,B, and C: A2Δt = eA(2Δt), Bt = A-1 (A2ΔtI)B, and C2Δt = C [39]. Note that the sensory input y (see Fig 4) is evaluated at a different time than the simulated state variable x^, because the former is obtained from the mechanical system.

In one of the simulation studies (Is the model robust to inaccuracies in the learned noise covariance matrices Σ and Ψ?), I used the optimal learned motor and sensor noise covariance matrices Σ2Δt and Ψ2Δt. For the continuous time case, these optimal learned noise covariance matrices are the following functions of the actual noise covariance matrices Φ and Ξ: Σ = BΦBT and Ψ = Ξ. For the discrete time case, the corresponding formulas are the following:

Σ2Δt02ΔteAτBΦBTeATτdτ
Ψ2Δt=2ΔtΞ

For the discrete time computational system in Eqs 8 and 9, I calculate control actions u that minimize a cost functional J2Δt:

J2Δt=limN1NEn=1Nxn2ΔtΔt'Qxn2ΔtΔt+un2ΔtΔt'Run2ΔtΔt

The cost functional J2Δt is minimized by control actions u=M2Δtx^, in which -M2Δt is the discrete time LQR gain (which depends on the matrices A2Δt, B2Δt, Q, and R), and x^ is the optimal state estimate defined by this discrete time ODE:

x^t+Δt=A2ΔtB2ΔtMx^tΔt+K2ΔtytC2Δtx^tΔt

The matrix K2Δt is the discrete time Kalman gain, which depends on A2Δt, C2Δt, Σ2Δt, and Ψ2Δt.

Discrete time motor and sensor noise

From the properties of a Wiener process, it is straightforward to obtain the discrete time motor and sensor noise from the continuous time equations Eqs 1 and 2:

zt+Δt=ut+Δt+Φ2Δt1/2n1
yt=Cxt+Ξ2Δt1/2n2

The noises Φ2Δt1/2n1 and Ξ2Δt1/2n2 have a normal distribution with respective covariance matrices Φ2Δt = (2Δt)Φ and Ξ2Δt = (2Δt)Ξ.

Results

Stabilizing a nonlinear mechanical system by linear stochastic OFC

A model for sensorimotor control

The EoM for most dynamical systems are nonlinear. This holds for the SDP model bicycle, but also for common movements such as reaching, throwing, and walking; these movements are all performed by changing joint angles, which results in EoM involving trigonometric functions. I denote the nonlinear EoM as follows:

x˙=Ωx,u

The vector x contains the state variables, and x˙ their first derivatives with respect to time. For the SDP, x=δ,ϕ1,ϕ2,δ˙,ϕ1˙,ϕ2˙T and u=Tδ,Tϕ2T (see Fig 2). In the Methods and Models section, I derive the SDP EoM from Lagrangian mechanics.

OFC calculates optimal control actions u that minimize a cost functional J(x(∙), u(∙)), in which x(∙) and u(∙) denote the trajectories of, respectively, the state variables and the control actions. Typically, this cost functional increases with the integrated imprecision and energetic costs (e.g., the integrated squared length of x(∙), resp., u(∙); see further). Crucially, this cost functional depends on the EoM, and this raises the important question how the CNS can calculate optimal control actions in the extremely likely scenario that it does not know Ω(x, u) exactly. For this scenario, I assume that the CNS learns an approximation to Ω(x, u) from experience with the mechanical system. The CNS then uses this approximation as an internal model to estimate the state and calculate the optimal control actions.

In Fig 5, I have depicted a model for sensorimotor control that is based on an internal model that is a linear approximation of the unknown nonlinear dynamics Ω(x, z). These nonlinear dynamics are depicted in red and will be denoted as the mechanical system. In its application to balancing a bicycle, this mechanical system corresponds to the rider’s body plus his bicycle, and the linearization is around the equilibrium point (unstable fixed point). In other applications, the mechanical system may also involve objects in the environment that are sensed from a distance using vision and/or audition, and the linearization may be around a trajectory. The mechanical system receives input z from the motor output system (in black), which adds noise m to the optimal control action u. The sensory input system (in green) maps the state variables x onto sensory variables (as specified by the matrix C), adds noise s and feeds the resulting sensory input y into the computational system (in blue).

The computational system consists of two components: (1) the internal model, which calculates an optimal internal state estimate x^ by integrating a linear differential equation (characterized by the matrices A, B, C and the Kalman gain K) that takes the sensory feedback y as input, and (2) the feedback control law, which determines the control action u by multiplying the state estimate x^ with the LQR gain -M (minus sign added for consistency with the existing literature). The matrices A, B and C must be learned from experience with the mechanical system. Useful reference values for A and B can be obtained from the first order Taylor approximation of the nonlinear Ω(x, u) at the unstable fixed point x = 0 and u = 0. That is, Ω(x, u) can be linearly approximated by Ax + Bu, with A and B being the Jacobian of Φ(x, u) at the unstable fixed point.

Motor and sensor noise

The stabilizing performance of the combined mechanical-computational system (i.e., how close x stays to its target value) is adversely affected by motor and sensor noise: motor noise directly feeds into the mechanical system, and sensor noise degrades the internal state estimate. The model for the motor input z to the mechanical system is a simple errors-in-variables model: z = u + m. And the model for the sensory input y to the computational system is the linear model y = Cx + s. All variables are functions of continuous time. I assume that the noise terms m and s are linear combinations of independent vector-valued Wiener processes v(1) and v(2):

z=u+Φ1/2dv1 Eq 10
y=Cx+Ξ1/2dv2 Eq 11

The scaling matrices Φ1/2 and Ξ1/2 determine the covariance of the motor noise m = Φ1/2 dv(1) and the sensor noise s = Ξ1/2 dv(2). Specifically, the motor and the sensor noise are normally distributed with covariance matrices Φdt and Ξdt, respectively.

Stochastic OFC deals with noise in an optimal way

Stochastic OFC provides the tools to deal with motor and sensor noise, and it does so in an optimal way if the noise is Gaussian and additive [21]. This optimality is central to the proposed model for sensorimotor control, which I now formulate with the detail that is required to simulate it on a computer:

  1. The CNS learns from experience the following matrices: A, B, C, and the covariances of the motor and the sensor noise. For the purposes of this paper, the matrix C that maps x onto y is assumed to be known. The learned noise covariance matrices can be given plausible values, as I will describe in the Results section.

  2. The control actions are produced by an internal model that is based on the following linear approximation of the other three systems:
    x˙=Ax+Bu+Σ1/2dw1 Eq 12
    y=Cx+Ψ1/2dw2 Eq 13

    in which w(1) and w(2) are independent vector-valued Wiener processes. The terms Σ1/2 dw(1) and Ψ1/2 dw(1) are simulated versions of the motor and sensor noise. These noise terms are normally distributed with covariance matrices Σdt and Ψdt, respectively. The matrix Σ represents the learned amplitude of the movement inaccuracies that are produced by a noisy motor input (u + noise), and the matrix Ψ represents the learned amplitude of the sensory discrepancies (yCx). Although the actual and the simulated state may differ, I will use the same state variable x for the mechanical model x˙=Ωx,z as for the linear model in Eqs 12 and 13. The representation of this linear model in Eqs 12 and 13 is called a state-space representation.

  3. The CNS calculates the control action u such that a cost functional J is minimized:
    J=limT1TE0Txt'Qxt+ut'Rutdt Eq 14

    in which ε () denotes expected value, and Q and R are positive definite matrices of the appropriate dimensions. The component x(t)’ Qx(t) quantifies the precision of the internal state variable x when the target state equals 0; for the general case of a target state equal to c, this component is [x(t)–c]’ Q[x(t)–c]. The component u(t)’ Ru(t) quantifies the energetic cost.

  4. Under the linear model in Eqs 12 and 13, the cost functional J is minimized by control action u=Mx^, in which -M is the LQR gain, and x^ is an optimal state estimate defined by this ODE:
    x^˙=ABMx^+KyCx^

    The term ABMx^=Ax^+Bu only depends on the internal model, and the term KyCx^ also depends on the sensory feedback y. The matrix K is the Kalman gain, which depends on A, C, Σ, and Ψ, the covariance matrices of the learned motor and sensor noise. The LQR gain -M depends on the matrices A, B, Q, and R.

Motor and sensor noise have both a direct and an indirect effect on the stabilizing performance of the combined system: (1) motor and sensor noise directly feed into, respectively, the mechanical and the computational system, and (2) via the Kalman gain K, the state estimate x^ depends on the internal covariance matrices Σ and Ψ, which the CNS must learn from experience with the actual motor and sensor noise. The importance of this learning process follows from the fact that the accuracy of Σ and Ψ has a positive effect on the stabilizing performance of the computational system. This fact can be proved for a linear mechanical system, and it is approximately true for a nonlinear mechanical system in a region of the state-space for which this system is approximately linear. Specifically, for a linear mechanical system, Φ(x, z) = Ax + Bz, and using Eq 10, this system can be rewritten as Φ(x, z) = Ax + Bu + B Φ1⁄2 dv(1). Comparing this with the first state-space equation of the computational system (Eq 12), we see that the two systems are identical if Σ = BΦBT. In addition, comparing Eq 11 and Eq 13, we see that the sensory system is identical to the state-space equation of the computational system if Ψ = Ξ. Thus, optimal control of a linear mechanical system involves a Kalman gain that is calculated using Σ = BΦBT and Ψ = Ξ.

Is the optimal model good enough?

For stochastic OFC to be a good model for bicycle balance control, the bicycle and the rider must remain balanced over a range of lean and steering angles that is observed. Importantly, the optimality of stochastic OFC does not automatically ensure that the model is also good enough in that respect [40]. The performance of the model depends on how well the linear internal model approximates the external nonlinear dynamical system plus the motor and the sensor noise covariance matrices. The accuracy of the approximation in turn depends on two factors: (1) how good is the linear approximation with optimal values for the linear model’s parameters A, B, C, Σ and Ψ, and (2) how close are the actual values to these optimal parameter values? The performance of the optimal linear approximation is investigated in the first of three simulation studies. Specifically, in this simulation study, I will evaluate whether stochastic OFC with optimal parameter values can balance the model bicycle for steering and lean angles that are observed with real riders on real bicycles, without requiring steering angular rates that no real rider can produce. However, it is unlikely that the linear model’s parameters are exactly at their optimal values, and the possible consequences of this are discussed next.

Which parameters are responsible for stabilization failures?

Stabilization may fail (i.e., bicycle and rider fall over) because of motor and sensor noise. However, stabilization also depends on the parameters of the computational system, and in this paper, I will investigate the role of a few of these parameters. The computational system is fully specified by the following seven matrices: A, B, C, Σ, Ψ, Q and R, and I will investigate the role of the following three: A, Σ and Ψ.

It is useful to distinguish between the static and the dynamic parameters of the computational system: the dynamic parameters are the state variables x, and the static parameters are the seven matrices on which these state variables depend. From a theoretical perspective, it is a matter of choice whether a parameter is considered static or dynamic. However, from an applied perspective (here, bicycle balance control), it is important to know the time scale over which the parameters are likely to change. This is related to the robustness of the computational system: if the system is not robust to inaccuracies in some dynamic parameter, then the organism needs a mechanism to correct these inaccuracies. If this mechanism is slow (more than a day), it is usually called “learning” (offline updating), and if it is fast, it is usually called “sensory feedback” (online updating). For the model considered here, the CNS must learn the internal noise covariance matrices Σ and Ψ from experience with the mechanical system and the motor and sensor noise. The required learning rate is set by the robustness of the computational system: the more robust the computational system to inaccuracies in Σ and Ψ, the slower the learning rate may be.

The matrix A depends on the bicycle speed v, which I assume to be constant when calculating the Kalman and the LQR gain. However, in reality, A is a dynamic parameter because the bicycle speed v changes over time: A = A(v) = A(v(t)). The time scale of the changes in bicycle speed is in the order seconds (e.g., accelerating from 0 to 1.5 m/sec. takes about 1 sec.). Thus, the CNS probably needs online updates of the bicycle speed. Crucially, the robustness of the computational system to inaccuracies in the speed estimates becomes more important as these updates are less reliable. This is relevant here, because there is good psychophysical evidence against reliable speed estimates based on optical flow [9]. Thus, a plausible computational system must be robust to inaccurate speed estimates.

In sum, the CNS must learn and/or estimate some parameters of the computational system. Because this process takes time, the system’s performance must be robust to inaccuracies in the system’s parameters. I investigated this robustness in two simulation studies in which I manipulated the accuracy of (1) the learned noise covariance matrices Σ and Ψ, and (2) the system (state) matrix A. These two parameter sets correspond to two different aspects of the environment that the CNS must learn: (1) the reliability of the motor output and the sensory input, and (2) the physical laws that govern the movements of our body and bicycle. They also play different roles in the computational model: the learned noise covariance matrices only affect the Kalman gain (which updates the internal state estimate), whereas the learned system matrix also affects the LQR gain (which maps the state estimate on the control action).

How plausible is stochastic OFC as a model for sensorimotor control?

To evaluate the plausibility of stochastic OFC as a model for sensorimotor control, in three simulation studies, I address the following questions: (1) Is the optimal model good enough to balance a bicycle under realistic conditions, and (2) Is the model robust against inaccuracies in the model parameters? I begin by describing what I mean by “realistic conditions”.

What are realistic turn radiuses, lean angles, and steering angular rates?

For our model to be plausible, it must balance the model bicycle for lean angles that approach the values observed with real riders on real bicycles, without requiring turn curvatures (inverse turn radiuses) and steering angular rates that cannot be produced. To determine critical values for these parameters, I put forward the following requirements: (1) the turn curvatures may not exceed the maximum curvature above which the tires loose traction (i.e., skid), (2) the lean angle may not exceed an upper bound above which most riders would feel uncomfortable, and (3) the steering angular rates may not exceed the ones that the fastest human hands can produce.

In the Materials and Methods, I give a quantitative rationale for the maximum curvature, the maximum combined CoG lean angle, and maximum angular rate: 0.3969 m-1, 0.2637 rad. and 13.33 rad/s, respectively. In all simulations, the trials without skidding (i.e., curvature everywhere less than 0.3969 m-1) had steering angular rates that were more than an order of magnitude smaller than the critical steering angular rate 13.33 rad/s. More detailed results will therefore only be shown for the curvatures and the combined CoG lean angles.

What are plausible parameter values for the OFC cost functional?

I calculated the LQR gain for a cost functional that implements the objective that the combined CoG must be kept over the LoS. Because the LQR cost functional is a quadratic form, an objective with respect to the combined CoG lean angle must be expressed as a linear function of the state variables. Because the combined CoG lean angle is a nonlinear function of the state variables ϕ1 and ϕ2, I approximated it by a linear Taylor series approximation in which I inserted the lengths and masses used in the simulations. The following linear approximation resulted: 0.821 × ϕ1 + 0.179 × ϕ2.

I used a block-diagonal precision matrix Q (see Eq 14) with the following submatrix for the angles [δ, ϕ1, ϕ2 ]:

diagwδ,0.82120.821×0.1790.179×0.8210.1792+wϕ2

The weights wδ and wϕ2 quantify the importance of keeping δ and ϕ2 close to 0 relative to the importance of keeping the combined CoG close to 0. Because the steering angle is not involved in the balancing objective, I chose a very small value for wδ: wδ = 0.001. I chose the value 1 for wϕ2, which assigns an equal importance to the balance objective with respect to the combined CoG, and the one with respect to ϕ2 (see Cycling involves a double balance problem). Drastically increasing wϕ2 (to wϕ2=100) improved the stabilization of both ϕ2 and the combined CoG lean angle (keeping them closer to 0), as quantified by the stabilization metrics of the simulation study (see further). Because the focus of the present paper is on the robustness of control based on an internal model, this effect will not be investigated any further. Finally, I used the same submatrix for the angular rates δ˙,ϕ˙1,ϕ˙2 as for the corresponding angles [δ, ϕ1, ϕ2 ], which implements the objective that it is equally important to keep the angles stationary as it is to keep them close to 0.

The LQR gain also depends on the matrix R, which quantifies the relative importance of the energetic cost (see Eq 14). I ran my simulations with R = diag([1, 1]). Increasing the diagonal elements of R reduces the stabilization performance.

Is the optimal model good enough to balance a bicycle under realistic conditions?

To evaluate the plausibility of the model, I simulated state variables for increasing noise amplitudes, which produced increasing lean and steering angles. I evaluated whether, over the increasing noise amplitudes, the average combined CoG lean angle remains well below angles at which most riders start feeling uncomfortable (0.2637 rad.) without skidding (i.e., curvatures exceeding 0.3969 m-1).

Noise enters the mechanical system via the motor output z and the sensory input y, and its amplitude is determined by the motor and the sensor noise covariance matrices Φ and Ξ. The dimensions of Φ correspond to the two control actions, steering and upper body lean torque (u=Tδ,Tϕ2T), and the dimensions of Ψ correspond to the six sensory inputs. I independently varied the amplitudes of three different noise types: steering noise, upper body noise, and sensor noise. I did this by specifying Φ and Ψ as diagonal matrices defined by three scalar constants, cδ,cϕ2 and cy:Φ=diagcδ,cϕ2, and Ψ = diag([cy, cy, cy, cy, cy, cy ]). There were only small differences between the three noise types with respect to how much they affected the lean and the steering angles. These differences did not justify a discussion of the more complicated pattern of results as compared to the results for homogeneous noise amplitudes, cδ=cϕ2=cy=c.

I evaluated the plausibility of the model at its optimal parameter values. Specifically, the matrices A and B were set equal to the Jacobian of the EoM at the unstable fixed point, and the learned motor and sensor noise covariance matrices Σ and Ψ were given values that correspond to the actual motor and sensor noise covariance matrices Φ and Ξ (see Which learned parameters are responsible for stabilization failures?).

I linearly increased the values of the noise amplitude c from 0.001 to 0.05 and simulated the model under the resulting motor and sensor noise. For every noise amplitude, I simulated 100 trials of 60 seconds at Δt = 0.01. As expected, with increasing noise amplitude, also the number of trials with skidding increased (see Fig 6A). The rest of the results is based on the successful (no skidding) trials, for which I quantified the model’s performance by the root-mean-square (RMS) combined CoG lean angle and the maximum curvature. These numbers were subsequently averaged over the trials. As expected, both the RMS combined CoG lean angle and the maximum curvature increased with the noise amplitude (see Fig 6C). Crucially, even for the highest noise level, the RMS combined CoG lean angle was well below its upper bound (0.2637 rad.).

Fig 6. Simulation results for the model at its optimal parameter values.

Fig 6

(A, B) Percentage of trials with skidding, separately for the SDP (in A) and BDP (in B) simulations. (C, D) RMS combined CoG lean angle and maximum curvature, averaged over the successful trials in the SDP (in C) and BDP (in D) simulations.

I next investigated whether the results for the SDP generalize to a linearized model with self-stabilizing forces, the BDP. The BDP is a combination of an existing benchmark model for studying the passive dynamics of a bicycle [11] and the double pendulum.

The simulations for the BDP were performed in the same way as for the SDP, and the results are shown in Fig 6B and 6D. Crucially, to obtain approximately the same percentage of skid trails in the BDP as in the SDP simulations, the noise amplitude had to be increased by a factor of approximately 14 (compare the x-axes of Fig 6A and 6B). This shows that the BDP is much less susceptible to noise than the SDP. This is most likely due to the positive trail of the BDP, which is responsible for caster forces in the front frame. Caster forces reduce the impact of the noise on the handlebars because they align the front wheel with the rear frame [36].

Except for the reduced susceptibility to noise, the results for the BDP are like those for the SDP: even for the highest noise level, the RMS combined CoG lean angle is well below the upper bound for a comfortable lean angle (0.2637 rad.), and even lower than for the SDP. Thus, stochastic OFC with optimal parameter values can balance a bicycle under realistic conditions and this does not depend on the bicycle model.

Is the model robust to inaccuracies in the learned noise covariance matrices?

I investigated the robustness to inaccuracies in Σ and Ψ by systematically varying the difference between these parameters and their corresponding optimal values Σ = BΦBT, Ψ = Ξ. I ran the study with actual motor and sensor noise covariance matrices Φ=diagcδ,cϕ2 and Ξ = diag([cy, cy, cy, cy, cy, cy]). For the SDP simulations, I set cδ=cϕ2=cy=0.035. I manipulated the accuracy of Σ and Ψ by means of a noise fraction f with logarithmically spaced values between 0.1 and 10 (two orders of magnitude). I investigated two types of inaccuracy: motor noise inaccuracy (Σ = fBΦBT) and sensor noise inaccuracy (Ψ = fΞ).

The results for the SDP are shown in Fig 7, separately for the manipulations of the learned motor noise Σ (panels A and C) and those of the learned sensor noise Ψ (panels B and D). For both noise types, the model performed best when the learned and the actual motor noise were equal. This effect on performance is only visible in the percentage of skid trials; the RMS combined CoG lean angle remained well below its upper bound (0.2637 rad.). Interestingly, there was an asymmetry between the motor and the sensor noise in the model’s performance as a function of the learned noise fraction: suboptimal learned motor noise reduced performance much less when it was too small whereas suboptimal learned sensor noise reduced performance much less when it was too large. Thus, model-based balance control for the SDP has a specific type of robustness to inaccuracies in the learned noise covariance matrices: the stabilization is robust to learned motor noise covariances that are too small and learned sensor noise covariances that are too large.

Fig 7. Simulation results for the SDP model with learned noise covariance matrices at 11 logarithmically spaced fractions of the actual noise covariance matrices.

Fig 7

(A, B) Percentage of trials in which skidding occurred, separately for trials in which the learned motor noise Σ (in A) and the learned sensor noise Ψ (in B) was manipulated. (C, D) RMS combined CoG lean angle and maximum curvature, averaged over the successful trials in which the learned motor noise (in C) and the learned sensor noise (in D) was manipulated.

I next investigated whether the results for the SDP generalize to the BDP. For these simulations, I set cδ=cϕ2=cy=0.4833. The results are shown in Fig 8. For the BDP, the model’s performance was unaffected by the difference between the learned and the actual noise.

Fig 8. Simulation results for the BDP model with learned noise covariance matrices at 11 logarithmically spaced fractions of the actual noise covariance matrices.

Fig 8

See the caption of Fig 7.

In sum, both for the SDP and the BDP, the stabilization is robust to inaccuracies over two orders of magnitude for the learned motor and sensor noise covariances. For the SDP, the stabilization is only robust to learned motor noise covariances that are too small and learned sensor noise covariances that are too large. For the BDP, this robustness is uniform.

Is the model robust to inaccuracies in the system matrix due to speed misestimation?

To investigate the robustness to inaccuracies in the system matrix A I used the fact that the optimal system matrix (the Jacobian of Ω(x, u) with respect to x and evaluated at the unstable fixed point) depends on the bicycle speed v via the centrifugal acceleration (Eqs 1 and 3). I simulated a SDP with an actual speed of v = 4.3 m/sec., and calculated 13 different inaccurate system matrices A by evaluating the Jacobian of Ω(x, u) at linearly spaced values of v between 90 and 110 percent of the actual speed. For the SDP simulations, I set cδ=cϕ2=cy=0.015, for which no skidding occurs when the optimal system matrix is used (see Fig 6).

The results in Fig 9 (panels A and C) show that SDP stabilization strongly depends on the accuracy of the speed estimate: successful trials were only found for speed fractions between 0.917 (51% completed) and 1 (100% completed). The robustness is asymmetrical around the true speed: there is a small range of underestimated speeds (fractions 0.9333 to 1) that allow for stabilization, but for overestimated speeds this range is much smaller (less than from 1 to 1.0167).

Fig 9. Simulation results as a function of 11 linearly spaced fractions of the actual speed for which the system matrix A was calculated.

Fig 9

Across all simulations, the actual speed was kept constant at v = 4.3 m/sec. (A, B) Percentage of trials with skidding, separately for the SDP (in A) and BDP (in B) simulations. (C, D) RMS combined CoG lean angle and maximum curvature, averaged over the successful trials in the SDP (in C) and BDP (in D) simulations. Values are omitted for speed fractions at which no successful trials were obtained.

For the BDP simulations, I set cδ=cϕ2=cy=0.1944, for which no skidding occurs when the optimal system matrix is used. The pattern of results for the BDP is like the one for the SDP (see Fig 9, panels B and D) but the range of speed fractions that allows for BDP stabilization is much wider than for the SDP: from 0.725 to 1.1625. The risk for stabilization failures is again at the high end of the speed estimates.

In sum, compared to the robustness to inaccuracies in the learned noise covariance matrices (over two orders of magnitude), the stabilization is much less robust to inaccuracies in the system matrix that result from misestimation of the bicycle speed. This holds for both bicycle models.

Discussion

I proposed and evaluated a model for sensorimotor control. The central concept in this model is a computational system, implemented in the CNS, that not only controls but also learns a mechanical system that exists outside the CNS. At the interface between these two systems, there is a motor output system that transfers a control signal to the mechanical system, and a sensory system that maps the state of the mechanical system into the computational system. The computational system can simulate the combined mechanical, motor output, and sensory input system. It does so by means of a learned approximation of (1) the physical laws that govern the mechanical system, (2) the mapping performed by the sensory system, and (3) the reliability of the motor output and the sensory input. In my implementation of the computational system, I assumed that (1) the optimal learned approximation of the physical laws is linear, with the defining matrices (A and B) being the Jacobian of the EoM evaluated at the unstable fixed point, and (2) the optimal learned approximations of the internal noise covariance matrices are the noise covariance matrices of the optimal linear approximation of the combined system.

The control of the mechanical system by the computational system is optimal in the sense of stochastic OFC. It follows that the stabilization performance of the model only depends on three factors: (1) the amplitude of the motor output and the sensory input noise, (2) the optimality criterion (i.e., the expected cost-to-go), and (3) the accuracy of the learned approximation. Of these three, the accuracy of the learned approximation is the most interesting from a cognitive point of view, and the amplitude of the motor output and the sensory input noise is the most interesting from a physiological point of view.

I have applied this model to the balancing of a bicycle. This is not common in sensorimotor control, where the relevant data are often collected in experimental paradigms that ask for more isolated movements (e.g., reaching, pointing, lifting) that occur naturally as a part of more complex movements involving the whole body. Balancing a bicycle is more like walking but with the important advantage that the movements are strongly constrained by the geometry of the bicycle and the rider’s position on it. It therefore does not come as a surprise that balancing a bicycle has become a topic of interest for non-academics with an interest in sensorimotor control; that community has contributed valuable observations by experimenting with the handling properties of a bicycle (e.g., by reversing the steering response). Compared to the isolated movements in typical laboratory tasks, bicycle balance control has the additional advantage of societal relevance for the large group of senior citizens that want to maintain their mobility.

I conducted three simulation studies. In the first of these studies, I demonstrate that the model can balance a bicycle under realistic conditions. In the second study, I demonstrate that the model’s stabilization performance is robust to inaccuracies in the learned noise covariance matrices. For the BDP, this robustness is uniform across the noise levels, but for the SDP, stabilization performance is only robust to learned motor noise covariances that are too small and learned sensor noise covariances that are too large. The third simulation study shows that, compared to the robustness to inaccuracies in the learned noise covariance matrices, the stabilization is much less robust to inaccuracies in the system matrix that result from misestimation of the bicycle speed.

All three simulation studies showed that the BDP is much less susceptible to noise than the SDP. This is probably due to the positive trail of the BDP, which generates caster forces in the front frame. These forces reduce the impact of the noise on the handlebars by aligning the disturbed front wheel with the non-disturbed rear frame [36].

As holds for every model, my model is only an approximation of reality. It is important to be aware of a few aspects for which I made a choice for the sake of computational feasibility or simplicity. Not all choices are inevitable, but more work is needed to extend the model, allowing it to perform all computations that are performed by the CNS. The first useful extension immediately follows from the third simulation study: if the model must apply to a wide range of speeds, a mechanism must be added for accurate speed estimation and selection of the appropriate system matrix. For motor control in general, this idea also has been proposed by Scott [41], but focusing only on the feedback (LQR) gain matrix (which depends on the system matrix). The question now is “What is the speed-related information based on which the appropriate system matrix is selected?”. Because of its large Weber fraction [9], it is doubtful that optic flow is the only source of information for speed estimation. This is supported by the fact that many experienced cyclists can ride on stationary bicycle rollers. Moreover, they can do so while shifting gears, and this is inconsistent with a simple readout of proprioceptive information (pedaling cadence) as a substitute for the missing optic flow. I conclude that none of the known sources of sensory information is a plausible candidate for selecting the appropriate system matrix.

The second aspect to be aware of, is that the computational system is based on a linear approximation of the unknown mechanical system. Although it is difficult to argue against the idea that the internal model must be based on some sort of approximation, there is no reason that it should be linear and optimal for a single point (i.e., the unstable fixed point). For example, if it were the optimal linear approximation for the unstable fixed point, and the bicycle rider had learned the linear coefficients based on experience with lean angles below 5 degrees, then this linear approximation would also allow him to simulate the linear ODE in Eq 12 for much larger lean angles than he is familiar with. This would allow him to balance his bicycle outside the range he is familiar with. Whether this is possible, is still an empirical question.

The third aspect to be aware of pertains to the biological delays between the state estimate x^ and (1) the mechanical system input z (the motor delay), and (2) the sensory feedback y (the sensory delay). The motor delay is caused by the fact that the control action must pass via motor axons and muscles before it affects the mechanical system. And the sensory delay is caused by the fact that the sensory feedback must pass via a series of sensory neurons before it arrives in the computational system. In my model, I made the unrealistic assumption that both delays are zero. With respect to the motor delay, for a model that only estimates the current state x^t, the following must hold:

zt+Tmot=Mx^t+mt+Tmot,

in which Tmot is the motor delay. Even for a small motor noise m and a state estimate x^ that approximates the mechanical system states x very well, the torque z(t + Tmot) will not stabilize the mechanical system if x(t + Tmot) differs too much from x(t). This is a well-known problem in sensorimotor control, and it has been proposed that the prediction of future states may solve it [4247]. This implies that the estimate x^t is replaced by a prediction x˜t,Tmot, which extrapolates the estimate at time t (i.e., x^t) to time t + Tmot.

With respect to the sensory delay, for a model that only estimates the current state x^t, the following must hold:

x^˙t=ABMx^t+KytTsensCx^t,

in which Tsens is the sensory delay. Like the problem that is caused by a motor delay, if x(tTsens) (the state reflected by y(tTsens)) differs too much from x(t), the state estimate x^t will be incorrectly updated. This problem can be solved by only updating the past state estimate x^tTsens. Combining this solution with the one for the motor delay, this results in a model in which the state estimate x^ lags Tmot + Tsens behind the true state x, and the control action is calculated using the prediction x˜t,Tmot+Tsens. More work is required to evaluate whether the SDP and BDP can be balanced with a realistic motor and sensory delay, and whether prediction is necessary to achieve this.

The fourth aspect of the model to be aware of is that the control action is specified in torque values, whereas the output of the CNS are neuronal firing rates that are converted to joint torques by the muscles. This firing-rate-to-torque conversion is not a part of the model, and this most likely has consequences for the model’s validity. For instance, in the computational model, the LQR gain performs a linear mapping from the state estimate to the control action, and this ignores the fact that the muscles may not be able to produce the required torques. This is especially important in the context of ageing and physical training, which affect the available torque ranges. Most likely, motor skill learning involves two parallel processes, one at the muscular level that determines the available torque ranges, and one at the level of the CNS that learns the mapping from the state estimate to the required torques. For the model to be valid, the CNS-level process must be informed by the available torque ranges.

It is possible to extend the model such that it incorporates the firing-rate-to-torque conversion, and this requires knowledge of the muscular physiology. Specifically, if the optimal control action u is a vector of firing rates, then one needs a new matrix B that must be decomposable as follows:

B=Bx˙u=Bx˙τBτu,

in which Bτu specifies the mapping from the firing rate vector u on the joint torques τ, and Bx˙τ (the old matrix B) specifies the mapping from the joint torques on the state derivatives x˙. The matrix Bτu must be specified based on knowledge of muscular physiology, and the matrix Bx˙τ can be calculated as the Jacobian of Ω(x, τ) with respect to τ, evaluated at τ = 0.

The fifth aspect to be aware of is that the control actions are only two-dimensional (steering and hip torque), whereas the number of balance-relevant muscles and joints is much larger. This simplification can be motivated by the fact that the relevant control input is strongly constrained by the geometry of the bicycle and the rider’s position on it. This simplification is specific to balancing a bicycle, and this points to the challenges one may encounter when extending the model to other forms of balance control (e.g., cycling while standing on the pedals, walking, running, skating, skiing). In principle, the extension is straightforward, as it only requires the EoM for this other form of balancing. However, the challenging part may be the derivation of the EoM, which starts by identifying the balance-relevant joints and selecting the ones that can be actuated. Once the EoM are derived, the linearization and the calculations for the computational system are identical to those for balancing the SDP.

The sixth aspect to be aware of is that the current sensory model is underspecified: it assumes that the sensory input is identical to the state variables x (as implemented by the assumption that the matrix C is the identity matrix) plus some noise. From sensory neurophysiology, it is known that information about the state variables (steering, lower body, and upper body angles and angular rates) must be obtained from the somatosensory and/or the vestibular system, but the details of that knowledge are not yet incorporated in the model.

The seventh aspect to be aware of pertains to the assumption that the motor and the sensor noise are additive, although there is good evidence that motor noise is multiplicative [48, 49]. The advantage of additive over multiplicative noise, is that it is much easier to derive the optimal control actions. For multiplicative noise, optimal control actions were derived by Todorov and colleagues [3, 16], but these are restricted to movements with a finite horizon (e.g., pointing, reaching, throwing, hitting). Keeping balance is an infinite horizon problem (i.e., the cost-to-go functional is an integral from zero to infinity), and this requires mathematical results for which a convenient computational implementation is not yet available [50, 51].

Concluding, I have proposed and evaluated a model for sensorimotor control that is based on the idea that a computational system in the CNS learns and controls an external mechanical system. This control is optimal in the sense of stochastic OFC. The model can balance a bicycle and its rider under realistic conditions and is robust to inaccuracies in the learned noise covariance matrices. It is not robust to inaccuracies in the learned system matrix caused by a misestimation of the speed. The model is a very useful starting point for investigations into human balance control, and there are several ways in which it can be extended to provide a more realistic account.

Supporting information

S1 Data. All results on which this paper reports can be reproduced using a set of Matlab live scripts and functions.

This set is documented in the live script BicBalOFC.mlx.

(ZIP)

Data Availability

All relevant data are within the paper and its Supporting Information files.

Funding Statement

The authors received no specific funding for this work.

References

  • 1.Bruijn SM, Van Dieën JH. Control of human gait stability through foot placement. Journal of The Royal Society Interface. 2018;15(143):20170816. doi: 10.1098/rsif.2017.0816 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Todorov E. Optimality principles in sensorimotor control. Nature neuroscience. 2004;7(9):907–15. doi: 10.1038/nn1309 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Todorov E, Jordan MI. Optimal feedback control as a theory of motor coordination. Nature neuroscience. 2002;5(11):1226–35. doi: 10.1038/nn963 [DOI] [PubMed] [Google Scholar]
  • 4.Franklin DW, Wolpert DM. Computational mechanisms of sensorimotor control. Neuron. 2011;72(3):425–42. doi: 10.1016/j.neuron.2011.10.006 [DOI] [PubMed] [Google Scholar]
  • 5.Wolpert DM, Ghahramani Z, Flanagan JR. Perspectives and problems in motor learning. Trends in cognitive sciences. 2001;5(11):487–94. doi: 10.1016/s1364-6613(00)01773-3 [DOI] [PubMed] [Google Scholar]
  • 6.Scott SH. A functional taxonomy of bottom-up sensory feedback processing for motor actions. Trends in neurosciences. 2016;39(8):512–26. doi: 10.1016/j.tins.2016.06.001 [DOI] [PubMed] [Google Scholar]
  • 7.Clemens IA, De Vrijer M, Selen LP, Van Gisbergen JA, Medendorp WP. Multisensory processing in spatial orientation: an inverse probabilistic approach. Journal of Neuroscience. 2011;31(14):5365–77. doi: 10.1523/JNEUROSCI.6472-10.2011 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Nash CJ, Cole DJ, Bigler RS. A review of human sensory dynamics for application to models of driver steering and speed control. Biological cybernetics. 2016;110(2):91–116. doi: 10.1007/s00422-016-0682-x [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Monen J, Brenner E. Detecting changes in one’s own velocity from the optic flow. Perception. 1994;23(6):681–90. doi: 10.1068/p230681 [DOI] [PubMed] [Google Scholar]
  • 10.Dong O, Graham C, Grewal A, Parrucci C, Ruina A. The bricycle: a bicycle in zero gravity can be balanced or steered but not both. Vehicle system dynamics. 2014;52(12):1681–94. [Google Scholar]
  • 11.Meijaard JP, Papadopoulos JM, Ruina A, Schwab AL, editors. Linearized dynamics equations for the balance and steer of a bicycle: a benchmark and review. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences; 2007: The Royal Society.
  • 12.Bogdanov A. Optimal control of a double inverted pendulum on a cart. Oregon Health and Science University, Tech Rep CSE-04-006, OGI School of Science and Engineering, Beaverton, OR. 2004.
  • 13.Tedrake R. Underactuated Robotics: Algorithms for Walking, Running, Swimming, Flying, and Manipulation (Course Notes for MIT 6.832). Downloaded on 20-08-2021 from http://underactuated.mit.edu/. 2021.
  • 14.Kooijman J, Meijaard JP, Papadopoulos JM, Ruina A, Schwab A. A bicycle can be self-stable without gyroscopic or caster effects. Science. 2011;332(6027):339–42. doi: 10.1126/science.1201959 [DOI] [PubMed] [Google Scholar]
  • 15.Basu-Mandal P, Chatterjee A, Papadopoulos JM. Hands-free circular motions of a benchmark bicycle. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences. 2007;463(2084):1983–2003. [Google Scholar]
  • 16.Todorov E. Stochastic optimal control and estimation methods adapted to the noise characteristics of the sensorimotor system. Neural computation. 2005;17(5):1084–108. doi: 10.1162/0899766053491887 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Nagengast AJ, Braun DA, Wolpert DM. Risk-sensitive optimal feedback control accounts for sensorimotor behavior under uncertainty. PLoS computational biology. 2010;6(7):e1000857. doi: 10.1371/journal.pcbi.1000857 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Nagengast AJ, Braun DA, Wolpert DM. Optimal control predicts human performance on objects with internal degrees of freedom. PLoS computational biology. 2009;5(6):e1000419. doi: 10.1371/journal.pcbi.1000419 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Yeo S-H, Franklin DW, Wolpert DM. When optimal feedback control is not enough: Feedforward strategies are required for optimal control with active sensing. PLoS computational biology. 2016;12(12):e1005190. doi: 10.1371/journal.pcbi.1005190 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Faisal AA, Selen LP, Wolpert DM. Noise in the nervous system. Nat Rev Neurosci. 2008;9(4):292–303. doi: 10.1038/nrn2258 ; PubMed Central PMCID: PMC2631351. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Åström KJ. Introduction to stochastic control theory: Courier Corporation; 2012. [Google Scholar]
  • 22.Wolpert DM, Ghahramani Z, Jordan MI. An internal model for sensorimotor integration. Science. 1995;269(5232):1880–2. doi: 10.1126/science.7569931 [DOI] [PubMed] [Google Scholar]
  • 23.Körding KP, Wolpert DM. Bayesian integration in sensorimotor learning. Nature. 2004;427(6971):244–7. doi: 10.1038/nature02169 [DOI] [PubMed] [Google Scholar]
  • 24.Saunders JA, Knill DC. Visual feedback control of hand movements. Journal of Neuroscience. 2004;24(13):3223–34. doi: 10.1523/JNEUROSCI.4319-03.2004 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Shadmehr R, Mussa-Ivaldi FA. Adaptive representation of dynamics during learning of a motor task. Journal of neuroscience. 1994;14(5):3208–24. doi: 10.1523/JNEUROSCI.14-05-03208.1994 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Flanagan JR, Wing AM. The role of internal models in motion planning and control: evidence from grip force adjustments during movements of hand-held loads. Journal of Neuroscience. 1997;17(4):1519–28. doi: 10.1523/JNEUROSCI.17-04-01519.1997 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Flanagan JR, Lolley S. The inertial anisotropy of the arm is accurately predicted during movement planning. Journal of Neuroscience. 2001;21(4):1361–9. doi: 10.1523/JNEUROSCI.21-04-01361.2001 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Li C-SR, Padoa-Schioppa C, Bizzi E. Neuronal correlates of motor performance and motor learning in the primary motor cortex of monkeys adapting to an external force field. Neuron. 2001;30(2):593–607. doi: 10.1016/s0896-6273(01)00301-4 [DOI] [PubMed] [Google Scholar]
  • 29.Gribble PL, Scott SH. Overlap of internal models in motor cortex for mechanical loads during reaching. Nature. 2002;417(6892):938–41. doi: 10.1038/nature00834 [DOI] [PubMed] [Google Scholar]
  • 30.Rajamani R. Vehicle dynamics and control: Springer Science & Business Media; 2011. [Google Scholar]
  • 31.Dialynas G, Christoforidis C, Happee R, Schwab A. Rider control identification in cycling taking into account steering torque feedback and sensory delays. Vehicle System Dynamics. 2022:1–25. [Google Scholar]
  • 32.A.L. Schwab JMP, A. Ruina and A. Dressel. JBike6, a benchmark for bicycle motion [cited 2022 14-7-2022]. Available from: http://ruina.tam.cornell.edu/research/topics/bicycle_mechanics/JBike6_web_folder.
  • 33.Lewis GN and Perreault EJ. An assessment of robot-assisted bimanual movements on upper limb motor coordination following stroke. IEEE Transactions on Neural Systems and Rehabilitation Engineering 17.6 (2009): 595–604. doi: 10.1109/TNSRE.2009.2029315 [DOI] [PubMed] [Google Scholar]
  • 34."Bicycle statistics". City of Copenhagen website.: City of Copenhagen; 2013 [Archived from the original on 12 December 2013. Retrieved 12 December 2013.].
  • 35.[cited 2022 29–6]. Available from: http://hpwizard.com.
  • 36.Cossalter V. Motorcycle dynamics: Lulu. com; 2006.
  • 37.Kitazawa S, Kimura T, Uka T. Prism adaptation of reaching movements: specificity for the velocity of reaching. Journal of Neuroscience. 1997;17(4):1481–92. doi: 10.1523/JNEUROSCI.17-04-01481.1997 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.Shampine LF, Reichelt MW. The matlab ode suite. SIAM journal on scientific computing. 1997;18(1):1–22. [Google Scholar]
  • 39.DeCarlo RA. Linear systems: A state variable approach with numerical implementation: Prentice-Hall, Inc.; 1989. [Google Scholar]
  • 40.Green M, Limebeer DJ. Linear robust control: Courier Corporation; 2012. [Google Scholar]
  • 41.Scott SH. The computational and neural basis of voluntary motor control and planning. Trends in cognitive sciences. 2012;16(11):541–9. doi: 10.1016/j.tics.2012.09.008 [DOI] [PubMed] [Google Scholar]
  • 42.Desmurget M, Grafton S. Forward modeling allows feedback control for fast reaching movements. Trends in cognitive sciences. 2000;4(11):423–31. doi: 10.1016/s1364-6613(00)01537-0 [DOI] [PubMed] [Google Scholar]
  • 43.Miall RC, Weir DJ, Wolpert DM, Stein J. Is the cerebellum a smith predictor? Journal of motor behavior. 1993;25(3):203–16. doi: 10.1080/00222895.1993.9942050 [DOI] [PubMed] [Google Scholar]
  • 44.Wolpert DM, Kawato M. Multiple paired forward and inverse models for motor control. Neural networks. 1998;11(7–8):1317–29. doi: 10.1016/s0893-6080(98)00066-5 [DOI] [PubMed] [Google Scholar]
  • 45.Crevecoeur F, Gevers M. Filtering compensation for delays and prediction errors during sensorimotor control. Neural computation. 2019;31(4):738–64. doi: 10.1162/neco_a_01170 [DOI] [PubMed] [Google Scholar]
  • 46.Crevecoeur F, Munoz DP, Scott SH. Dynamic multisensory integration: somatosensory speed trumps visual accuracy during feedback control. Journal of Neuroscience. 2016;36(33):8598–611. doi: 10.1523/JNEUROSCI.0184-16.2016 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 47.Crevecoeur F, Scott SH. Priors engaged in long-latency responses to mechanical perturbations suggest a rapid update in state estimation. PLoS computational biology. 2013;9(8):e1003177. doi: 10.1371/journal.pcbi.1003177 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 48.Schmidt RA, Zelaznik H, Hawkins B, Frank JS, Quinn JT Jr. Motor-output variability: a theory for the accuracy of rapid motor acts. Psychological review. 1979;86(5):415. [PubMed] [Google Scholar]
  • 49.Todorov E. Cosine tuning minimizes motor errors. Neural computation. 2002;14(6):1233–60. doi: 10.1162/089976602753712918 [DOI] [PubMed] [Google Scholar]
  • 50.Phillis Y. Controller design of systems with multiplicative noise. IEEE Transactions on Automatic Control. 1985;30(10):1017–9. [Google Scholar]
  • 51.Phillis Y. A smoothing algorithm for systems with multiplicative noise. IEEE transactions on automatic control. 1988;33(4):401–3. [Google Scholar]

Decision Letter 0

Ning Cai

27 Oct 2022

PONE-D-22-23009A bicycle can be balanced by stochastic optimal feedback control but only with accurate speed estimatesPLOS ONE

Dear Dr. Maris,

Thank you for submitting your manuscript to PLOS ONE. After careful consideration, we feel that it has merit but does not fully meet PLOS ONE’s publication criteria as it currently stands. Therefore, we invite you to submit a revised version of the manuscript that addresses the points raised during the review process.

Please submit your revised manuscript by Dec 11 2022 11:59PM. If you will need more time than this to complete your revisions, please reply to this message or contact the journal office at plosone@plos.org. When you're ready to submit your revision, log on to https://www.editorialmanager.com/pone/ and select the 'Submissions Needing Revision' folder to locate your manuscript file.

Please include the following items when submitting your revised manuscript:

  • A rebuttal letter that responds to each point raised by the academic editor and reviewer(s). You should upload this letter as a separate file labeled 'Response to Reviewers'.

  • A marked-up copy of your manuscript that highlights changes made to the original version. You should upload this as a separate file labeled 'Revised Manuscript with Track Changes'.

  • An unmarked version of your revised paper without tracked changes. You should upload this as a separate file labeled 'Manuscript'.

If you would like to make changes to your financial disclosure, please include your updated statement in your cover letter. Guidelines for resubmitting your figure files are available below the reviewer comments at the end of this letter.

If applicable, we recommend that you deposit your laboratory protocols in protocols.io to enhance the reproducibility of your results. Protocols.io assigns your protocol its own identifier (DOI) so that it can be cited independently in the future. For instructions see: https://journals.plos.org/plosone/s/submission-guidelines#loc-laboratory-protocols. Additionally, PLOS ONE offers an option for publishing peer-reviewed Lab Protocol articles, which describe protocols hosted on protocols.io. Read more information on sharing protocols at https://plos.org/protocols?utm_medium=editorial-email&utm_source=authorletters&utm_campaign=protocols.

We look forward to receiving your revised manuscript.

Kind regards,

Ning Cai, Ph.D.

Academic Editor

PLOS ONE

Journal Requirements:

When submitting your revision, we need you to address these additional requirements.

1. Please ensure that your manuscript meets PLOS ONE's style requirements, including those for file naming. The PLOS ONE style templates can be found at

https://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf and

https://journals.plos.org/plosone/s/file?id=ba62/PLOSOne_formatting_sample_title_authors_affiliations.pdf

2. We note that the grant information you provided in the ‘Funding Information’ and ‘Financial Disclosure’ sections do not match.

When you resubmit, please ensure that you provide the correct grant numbers for the awards you received for your study in the ‘Funding Information’ section.

3. In your Data Availability statement, you have not specified where the minimal data set underlying the results described in your manuscript can be found. PLOS defines a study's minimal data set as the underlying data used to reach the conclusions drawn in the manuscript and any additional data required to replicate the reported study findings in their entirety. All PLOS journals require that the minimal data set be made fully available. For more information about our data policy, please see http://journals.plos.org/plosone/s/data-availability.

Upon re-submitting your revised manuscript, please upload your study’s minimal underlying data set as either Supporting Information files or to a stable, public repository and include the relevant URLs, DOIs, or accession numbers within your revised cover letter. For a list of acceptable repositories, please see http://journals.plos.org/plosone/s/data-availability#loc-recommended-repositories. Any potentially identifying patient information must be fully anonymized.

Important: If there are ethical or legal restrictions to sharing your data publicly, please explain these restrictions in detail. Please see our guidelines for more information on what we consider unacceptable restrictions to publicly sharing data: http://journals.plos.org/plosone/s/data-availability#loc-unacceptable-data-access-restrictions. Note that it is not acceptable for the authors to be the sole named individuals responsible for ensuring data access.

We will update your Data Availability statement to reflect the information you provide in your cover letter.

4. Please review your reference list to ensure that it is complete and correct. If you have cited papers that have been retracted, please include the rationale for doing so in the manuscript text, or remove these references and replace them with relevant current references. Any changes to the reference list should be mentioned in the rebuttal letter that accompanies your revised manuscript. If you need to cite a retracted article, indicate the article’s retracted status in the References list and also include a citation and full reference for the retraction notice.

Additional Editor Comments :

All two reviewers reach a consensus about the merit of the work. One raises some suggestions for improvement of the presentation. Please prepare a minor revision taking account of the suggestions.

[Note: HTML markup is below. Please do not edit.]

Reviewers' comments:

Reviewer's Responses to Questions

Comments to the Author

1. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #1: Partly

Reviewer #2: Yes

**********

2. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: N/A

Reviewer #2: Yes

**********

3. Have the authors made all data underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: Yes

Reviewer #2: Yes

**********

4. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: Yes

Reviewer #2: Yes

**********

5. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: The paper overall is interesting. The author replies all the questions from previous reviewers.

1. One major concern is that the paper is too long and contains many known works. The author may consider condensing the work and focus more on the major contributions. The author discussed the human brain and neuro; However, it is not clear to see this in the control design part.

2. Is there any experiment validation of the proposed method.

3. There are still some typos. For instance, in line 26 and line 30, OFC are defined two times.

4. It is not common to see “I” in a research paper. Instead, most time we use “We”.

Reviewer #2: he work is very interesting and difficult. It should be encouraged. There are some minor problems that I hope can be corrected. When the first time a variable appears, it should be written in its full name. For example, BMX on line 310 and LQR on line 552. In line 1467, the units of curvature should be m^{-1}.

**********

6. PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: No

Reviewer #2: Yes: Lei Guo

**********

[NOTE: If reviewer comments were submitted as an attachment file, they will be attached to this email and accessible via the submission site. Please log into your account, locate the manuscript record, and check for the action link "View Attachments". If this link does not appear, there are no attachment files.]

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool, https://pacev2.apexcovantage.com/. PACE helps ensure that figures meet PLOS requirements. To use PACE, you must first register as a user. Registration is free. Then, login and navigate to the UPLOAD tab, where you will find detailed instructions on how to use the tool. If you encounter any issues or have any questions when using PACE, please email PLOS at figures@plos.org. Please note that Supporting Information files do not need this step.

PLoS One. 2023 Feb 27;18(2):e0278961. doi: 10.1371/journal.pone.0278961.r003

Author response to Decision Letter 0


11 Nov 2022

Academic editor

1. Please ensure that your manuscript meets PLOS ONE's style requirements, including those for file naming. The PLOS ONE style templates can be found at

https://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf and

https://journals.plos.org/plosone/s/file?id=ba62/PLOSOne_formatting_sample_title_authors_affiliations.pdf

>>

I made the following changes to the paper’s style: (1) I placed the Methods section after the Introduction, and (2) I changed the formatting of the headings.

<<

2. We note that the grant information you provided in the ‘Funding Information’ and ‘Financial Disclosure’ sections do not match.

When you resubmit, please ensure that you provide the correct grant numbers for the awards you received for your study in the ‘Funding Information’ section.

>>

I ticked the box “The author(s) received no specific funding for this work.” and did not add a Financial Disclosure section because this was not asked for. Should I do something more?

<<

3. In your Data Availability statement, you have not specified where the minimal data set underlying the results described in your manuscript can be found. PLOS defines a study's minimal data set as the underlying data used to reach the conclusions drawn in the manuscript and any additional data required to replicate the reported study findings in their entirety. All PLOS journals require that the minimal data set be made fully available. For more information about our data policy, please see http://journals.plos.org/plosone/s/data-availability.

Upon re-submitting your revised manuscript, please upload your study’s minimal underlying data set as either Supporting Information files or to a stable, public repository and include the relevant URLs, DOIs, or accession numbers within your revised cover letter. For a list of acceptable repositories, please see http://journals.plos.org/plosone/s/data-availability#loc-recommended-repositories. Any potentially identifying patient information must be fully anonymized.

Important: If there are ethical or legal restrictions to sharing your data publicly, please explain these restrictions in detail. Please see our guidelines for more information on what we consider unacceptable restrictions to publicly sharing data: http://journals.plos.org/plosone/s/data-availability#loc-unacceptable-data-access-restrictions. Note that it is not acceptable for the authors to be the sole named individuals responsible for ensuring data access.

We will update your Data Availability statement to reflect the information you provide in your cover letter.

>>

In my Data Availability statement I have indicated that “All relevant data are within the manuscript and its Supporting Information files.”. This paper uses simulations to investigate whether a computational model is plausible for actual bicycle balance control. The documented computer code (Matlab Live scripts) to run these simulations and to extend on them, are provided in the Supporting Information. No experiment has been conducted to test this model, but we make use of empirical information. In fact, we know from experience what turn radiuses are physically possible, and what lean angles are acceptable for a rider.

<<

4. Please review your reference list to ensure that it is complete and correct. If you have cited papers that have been retracted, please include the rationale for doing so in the manuscript text, or remove these references and replace them with relevant current references. Any changes to the reference list should be mentioned in the rebuttal letter that accompanies your revised manuscript. If you need to cite a retracted article, indicate the article’s retracted status in the References list and also include a citation and full reference for the retraction notice.

>>

I have performed this check, and no papers have been retracted.

<<

Reviewer #1

The paper overall is interesting. The author replies all the questions from previous reviewers.

1. One major concern is that the paper is too long and contains many known works. The author may consider condensing the work and focus more on the major contributions. The author discussed the human brain and neuro; However, it is not clear to see this in the control design part.

>>

It is good to know that the original submission to PLOS Computational Biology was 11 pages shorter than the current version. The length of the current version has increased because I had to reply to the criticism of Reviewer #2 of PLOS Computational Biology. Here, I copy his first three points, all of which ask for more information to be included in the paper:

“1. The majority of the introduction includes no citations to support the author’s statements. The definition of balance for walking, for example, is well-defined in the literature.

2. There has been significant, serious, and quality research on bicycle dynamics in the past 20 years. While the author does identify a subset of the published works, there also exists significant work examining the human control of the bicycle – most work in this area has been led by Dr. Arend Schwab or Dr. Jason Moore. The current study is not a rigorous scientific study, as it largely ignores the existing knowledge and best approaches for evaluating control models.

3. The author developed his own model of the bicycle rather than using the validated equations of motion for a bicycle. The bicycle the author uses can easily be obtained using the bicycle model of Meijaard et al. 2007 by simply choosing parameter values. The author spends way too much of the paper talking about the development of his own model, which would be unnecessary if he simply utilized the established linearized equations of motion for a bicycle.”

<<

2. Is there any experiment validation of the proposed method.

>>

I did not run an experiment to collect data for testing my model for bicycle balance control. Instead, I used simulations to investigate whether this model is plausible for actual bicycle balance control. For that, I do make use of empirical information. In fact, we know from experience what turn radiuses are physically possible, and what lean angles are acceptable for a rider. Therefore, an empirically plausible model must balance a bicycle without producing turn radiuses that are physically impossible, and/or lean angles that are unacceptable. My model does this. However, it is extremely sensitive to misestimation of the speed, and this is not empirically plausible given what we currently about how the CNS estimates speed.

<<

3. There are still some typos. For instance, in line 26 and line 30, OFC are defined two times.

>>

Thank you, I corrected those.

<<

4. It is not common to see “I” in a research paper. Instead, most time we use “We”.

>>

I am the sole author of this paper. I did a search on the web, and I found approximately as many fora/web pages that advise “I” for as single author paper as fora/web pages that advise “We”.

<<

Reviewer #2

The work is very interesting and difficult. It should be encouraged. There are some minor problems that I hope can be corrected. When the first time a variable appears, it should be written in its full name. For example, BMX on line 310 and LQR on line 552. In line 1467, the units of curvature should be m^(-1).

>>

Thank you. I added the full names for BMX and LQR. However, I could not find an error w.r.t. the appropriate units of curvature.

<<

Attachment

Submitted filename: BalanceBicycleOFCResponseToReviewers_20221111.docx

Decision Letter 1

Ning Cai

25 Nov 2022

A bicycle can be balanced by stochastic optimal feedback control but only with accurate speed estimates

PONE-D-22-23009R1

Dear Dr. Maris,

We’re pleased to inform you that your manuscript has been judged scientifically suitable for publication and will be formally accepted for publication once it meets all outstanding technical requirements.

Within one week, you’ll receive an e-mail detailing the required amendments. When these have been addressed, you’ll receive a formal acceptance letter and your manuscript will be scheduled for publication.

An invoice for payment will follow shortly after the formal acceptance. To ensure an efficient process, please log into Editorial Manager at http://www.editorialmanager.com/pone/, click the 'Update My Information' link at the top of the page, and double check that your user information is up-to-date. If you have any billing related questions, please contact our Author Billing department directly at authorbilling@plos.org.

If your institution or institutions have a press office, please notify them about your upcoming paper to help maximize its impact. If they’ll be preparing press materials, please inform our press team as soon as possible -- no later than 48 hours after receiving the formal acceptance. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information, please contact onepress@plos.org.

Kind regards,

Ning Cai, Ph.D.

Academic Editor

PLOS ONE

Additional Editor Comments (optional):

Reviewers' comments:

Reviewer's Responses to Questions

Comments to the Author

1. If the authors have adequately addressed your comments raised in a previous round of review and you feel that this manuscript is now acceptable for publication, you may indicate that here to bypass the “Comments to the Author” section, enter your conflict of interest statement in the “Confidential to Editor” section, and submit your "Accept" recommendation.

Reviewer #2: All comments have been addressed

Reviewer #3: All comments have been addressed

**********

2. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #2: Yes

Reviewer #3: Yes

**********

3. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #2: N/A

Reviewer #3: Yes

**********

4. Have the authors made all data underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #2: Yes

Reviewer #3: Yes

**********

5. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #2: Yes

Reviewer #3: Yes

**********

6. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #2: The authors responded properly to my comments. I think the manuscript can be accepted for publication.

Reviewer #3: This paper presents a computational model of this neurobiological component, based on the theory of stochastic optimal feedback control. there is some theoretical value in this article and the quality of article to meet the requirements of the journal.

**********

7. PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #2: No

Reviewer #3: No

**********

Acceptance letter

Ning Cai

12 Dec 2022

PONE-D-22-23009R1

A bicycle can be balanced by stochastic optimal feedback control but only with accurate speed estimates

Dear Dr. Maris:

I'm pleased to inform you that your manuscript has been deemed suitable for publication in PLOS ONE. Congratulations! Your manuscript is now with our production department.

If your institution or institutions have a press office, please let them know about your upcoming paper now to help maximize its impact. If they'll be preparing press materials, please inform our press team within the next 48 hours. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information please contact onepress@plos.org.

If we can help with anything else, please email us at plosone@plos.org.

Thank you for submitting your work to PLOS ONE and supporting open access.

Kind regards,

PLOS ONE Editorial Office Staff

on behalf of

Dr. Ning Cai

Section Editor

PLOS ONE

Associated Data

    This section collects any data citations, data availability statements, or supplementary materials included in this article.

    Supplementary Materials

    S1 Data. All results on which this paper reports can be reproduced using a set of Matlab live scripts and functions.

    This set is documented in the live script BicBalOFC.mlx.

    (ZIP)

    Attachment

    Submitted filename: BalanceBicycleOFCReply2PlosCompBiolReviews_20220818.docx

    Attachment

    Submitted filename: BalanceBicycleOFCResponseToReviewers_20221111.docx

    Data Availability Statement

    All relevant data are within the paper and its Supporting Information files.


    Articles from PLOS ONE are provided here courtesy of PLOS

    RESOURCES