—Learning to ride a bicycle is challenging, and can be dangerous, as it involves acquiring several motor skills, including balance and coordination while interacting with a complex dynamical system. Haptic assistance could potentially help to enhance the learning of this especially complex task in a safe environment. We propose the use of a Model Predictive Controller (MPC) to provide steering assistance while training to learn a complex cycling task. We conducted a feasibility study with ten participants riding a steer-by-wire bicycle on a treadmill. The goal of the task was to collect laterally positioned virtual stars, shown on a display mounted in front of the treadmill. Participants trained under two conditions in random balanced order: with or without assistance from the MPC. Short-term learning was compared between conditions. We did not find evidence that training with MPC-based assistance improves the performance in steering the bicycle to collect the virtual stars after training compared to training without assistance. However, we found initial evidence that training with the MPC could be beneficial for less-skilled cyclists to learn the steering task. In conclusion, haptic steering assistance using MPCs may be a promising tool for enhancing bicycle steering skills, especially in initially less-skilled bicyclists. Index Terms —haptic assistance, model predictive control, mo- tor learning, steering, bicycling I. I NTRODUCTION LEARNING to ride a bicycle is a frequently cited exam- ple of daily-life skill acquisition in the motor learning literature. Learning to ride a bicycle is challenging, especially in children with sensory and motor disorders, as it involves the acquisition of several gross motor skills, including balance and coordination, while interacting with a complex dynamical system. The literature on robotic motor learning often refers to the use of training wheels as a real-life example of the potential benefit of haptic assistance during motor learning [1], [2]. Ironically, despite the fascination that learning this complex task historically had within the motor learning community, to our knowledge, no previous research has attempted to provide robotic assistance to support the learning of riding a bicycle. A gap we aim to address in this work. Bicycles are one of the most abundant modes of transporta- tion in the world. In countries like the Netherlands, bicycle travel accounts for over a quarter of all trips [3]. For the past S. Drauk ˇsas, R. Happee, L. Marchal-Crespo are with the Department of Cognitive Robotics, Delft University of Technology, Delft, The Netherlands L. Alizadehsaravi and J. K. Moore are with the Department of Biomechan- ical Engineering, Delft University of Technology, Delft, The Netherlands L. Marchal-Crespo is also with the Department of Rehabilitation Medicine, Erasmus University Medical Center, Rotterdam, The Netherlandsdecade, the number of electric bicycles (E-bikes) sold each year has been quickly increasing [4]. E-bikes are attractive as they can travel at higher speeds than conventional bicycles for the same rider effort. However, when involved in an accident, they are also associated with more severe injuries [5]. These increasing injury numbers are also associated with the use by elderly riders who might have reduced abilities in steering and balancing as well as in dealing with complex traffic, combined with an increased vulnerability. However, the on-board battery power for propulsion assistance opens up the possibility to also provide electromechanical steering assistance for enhancement of safety and learning the skills needed to master the complex task of cycling. A significant fraction of bicycle riders learned to ride a bicycle using training wheels. However, it can be argued that this method is sub-optimal as it masks the perception of the real bicycle dynamics, i.e., the bicycle becomes a tricycle. This is supported by the Guidance hypothesis that states that too much guidance during training hampers motor learning because it alters the input–output relationship of the task to be learned [6], [7]. It has been stated that motor learning can be optimized by matching the difficulty of the task to be learned to the learner’s skill level [8]. Unwittingly following this framework, Klein et al. [9] replaced the bicycle wheels with rollers of varying radii. A novice rider starts by riding a bicycle equipped with a roller of infinite radius (a cylinder) and gradually moves to rollers of reduced radius as learning progresses. Although this method has been shown to be effective in training children with disabilities to ride [9], it requires continuous mechanical modifications. Robotic assistance could potentially be employed to provide adaptive physical guidance during the continuous learning-to- ride process in order to promote learning while guaranteeing a safe environment. Although there is no clear consensus about the effectiveness of haptic assistance on motor learning, recent reviews [10], [11] suggest that robotic assistance might be beneficial when learning tasks that are especially challenging —e.g. steering a non-holonomic wheelchair [12]—, when the level of assistance is adapted to the learners’ skill level [13], and when allowing variability in movements [14]. Therefore, robotic assistance could be a good candidate to support the learning of riding a bicycle, since this is an especially chal- lenging task. However, this assistance should be adapted to the learners’ skill level, e.g., based on the real-time measurement of their performance, and allow for variability in the movement 2 to prevent “slacking” on the guidance. Most of the literature on robotic motor learning has, how- ever, focused on learning rather artificial tasks in lab-based environments —e.g., reaching [15] or shape tracing [16]—, which do not incorporate the interaction with complex dynam- ical systems, as is the case of riding a bicycle. A potential problem of providing robotic assistance while learning to interact with environments with complex dynamics is that the assistance could inadvertently mask the perception of the dynamics of the environment, just as adding training wheels disturbs the perception of the bicycle dynamics [17]. In a recent experiment [18], ¨Ozen et al. evaluated the effectiveness of different robotic assistance strategies in learn- ing a dynamic task —swinging a virtual pendulum to hit incoming targets with the pendulum ball whose dynamics were rendered using a haptic device. They found that training with robotic assistance from a Model Predictive Controller (MPC) resulted in better motor learning than conventional fixed haptic guidance— i.e., a Proportional-Derivative (PD) controller that physically constrains the movement to a fixed trajectory. MPC is an optimal control strategy that minimizes the assisting forces based on the learner’s ongoing performance, and there- fore, reduces the potential masking of the assisting forces on the perception of the environment dynamics, while promoting motor variability during training, as the optimal trajectory is recalculated on-the-fly. The better perception of the pendulum dynamics due to the lower assisting forces from the MPC, the lower reliance on the assistance, and the higher variability experienced during training probably enhanced the learning of this particular dynamic system. We propose that MPC might be a good robotic assisting strategy to promote the learning of complex bicycling tasks. Bicycling is a complex (and sometimes dangerous) task, as it requires performing lane change maneuvers at relatively high speeds while keeping balance. MPCs have been proven to improve maneuvering performance in other vehicles. For example, Yoshida et al. [19] used an MPC to model a lane change maneuver of an automobile, and Yu et al. [20] imple- mented a non-linear MPC model for a path-following task on a simulated bicycle model and found that MPC outperformed Stanley [21] and Linear Quadratic Regulator controllers in terms of accuracy and responsiveness. However, it is still an open question whether MPCs could be employed to enhance the learning of riding a bicycle. In this study, we investigated the benefit of providing robotic assistance using MPCs to learn to steer a bicycle on a treadmill (Fig. 1). The task consisted of steering the bicycle to different physical lateral positions that correspond with identical virtual laterally positioned star-shaped targets presented on a screen in front of the treadmill. We hypothesized that training with the MPC would enhance the learning of this complex dynamic task, especially in initially less-skilled participants. II. M ETHODS A. Experimental setup We used a custom steer-by-wire bicycle previously developed at the TU Delft Bicycle Lab, TU Delft, the Netherlands, to Fig. 1. Experimental setup with a participant riding the steer-by-wire bicycle on a treadmill. The participants wore a harness securely attached to the ceiling for safety. The width of the treadmill’s usable space is 1.1m. The display showing the virtual star-shaped targets from a first-person perspective is highlighted with a blue box. The locations of the SteamVR Base Stations 2.0 are shown within red rectangles. The location of the HTC Vive Tracker 3.0 is shown in green. provide assistance during bicycle riding [22]. In this steer-by- wire bicycle, the handlebars and front fork are mechanically decoupled. A steer-by-wire connection is created between the handlebar and front fork using two electric motors with respective encoders. The steer angle difference between both motors is minimized using a PD controller, running on a Teensy 4.1 (PJRC, US) microcontroller at 1 kHz, to simulate a rigid steer tube. This setup allows the provision of guiding torques to the handlebar using the upper motor. The lateral position, yaw angle, and roll angle of the steer- by-wire bicycle are measured using an HTC Vive Tracker 3.0 (HTC, Taiwan) installed right above the rear wheel center (Fig. 1). Two SteamVR Base Stations 2.0 (HTC, Taiwan) are located on the back and side of the treadmill to enable this tracking. Tracker data is sent to the supplied USB dongle, which is connected to a Raspberry Pi 4 Model B 4 GB (Raspberry Pi Foundation, UK). This computer runs a 32-bit version of Raspberry Pi OS Lite in headless mode. Libsurvive ’s [23] Simple API is used to read the data coming from the tracker, calculate the position and orientation of the tracker, and send the data using UDP at 220 Hz to a Windows 10 desktop computer, which runs the MPC and virtual reality game. The desktop computer is equipped with Intel i7-7700K 4.2 GHz processor (Intel, US), running Simulink Desktop Real-Time (MathWorks, US). The desktop computer and the bicycle communicate wirelessly using Bluetooth at 200 Hz for the bicycle-to-computer communication, and 75 Hz for the computer-to-bicycle communication. A 24-inch computer monitor was placed around 2 m in front 3 of the participant to show the location of the virtual targets (see subsection B). The game was implemented using Unity (Unity Technologies, US) in the desktop computer and can be seen in Figure 2. Participants wore a safety harness connected to a fixed point on the ceiling, just above the center of the treadmill, to reduce the risk of injury. Note that due to the harness, participants did not need to pedal and thus could mainly focus on the steering and balancing task. B. The Steering Task: Collecting Virtual Stars The steering task consisted of collecting virtual star-shaped targets that were approaching towards the rider at a constant virtual velocity of 15 km/h. To collect a star, the rider had to steer the real bicycle which in turn steered the virtual bicycle —shown on a screen in front of them— to place it in front of the star and pass through it. A first-person perspective of the virtual bicycle was shown on a road of the same width as the usable width of the treadmill (Fig. 2). The real bicycle acted as a Human Interface Device for the game, i.e., the virtual bicycle moved in the lateral direction mapping to the measured lateral position of the real bicycle on the treadmill. To provide feedback to the participants about their perfor- mance on the star collection task, a score was shown on the display every time a star was passed. The score is calculated using Equation 1, where yPis the lateral position of the bicycle’s rear wheel contact point on the treadmill in meters andySis the lateral position of the center of the star, also in meters. The maximum score was set to 100. ∆y=|yP−yS| score =  100, if∆y <0.02 m 500×(0.22−∆y),if0.02≤∆y≤0.22 m 0, otherwise. (1) The interval between the appearance of two consecutive stars was 6seconds. There were seven possible positions for the stars with respect to the center of the treadmill/center of the road shown on the screen: −0.2,−0.133,−0.067 m to the left of the center line and 0.0,+0.067,+0.133,+0.2 mto the right. The game, Figure 2, was implemented using Unity (Unity Technologies, US). C. The MPC Robotic Assistance MPC is an advanced control method that uses a mathematical model of the system to be controlled (the model of the bicycle lateral dynamics [24] in our case) to predict the system’s behavior throughout a specified time horizon. MPC is particularly suitable for the task of steering & balancing a 2- wheeler. Its generally unstable non-minimum phase dynamics requires a good control strategy. This could not be achieved by simply nudging the steer towards the on-road target but requires an initial countersteer, followed by steering towards the target while stabilizing. Such a sequential steering pattern can be very well created with MPC. We choose a control signal such that the predicted system state follows a given Fig. 2. The virtual environment shown to the participants. The participants controlled the lateral position of the virtual bicycle by steering the real bicycle on the treadmill. The task consisted in collecting green stars that appear on the horizon and approach the participant at 15 km/h(the same speed as the treadmill). After passing through each star, a score appeared on the top of the screen that depended on the distance between the virtual bicycle and the center of the star. The red walls correspond to the edges of the treadmill. reference state. A cost function (and its weights) is specified —e.g., minimizing the assistance and/or minimizing the dis- tance to the stars— which is then used by the controller to determine the control action at each time step, through real- time optimization. Several constraints can be put on the system to guarantee, e.g., safety. The linear MPC problem employed in our study is stated in Equation 2, where Jis the cost function to be minimized, tis the current time, Nis the number of steps in the time horizon, xis the bicycle state, ris the reference state, uis the control input, and QandRare designer-defined weighing matrices. The input varies stepwise across the N steps resulting in Ninput values to be optimized by the MPC. Only the first (next) input is applied and the following inputs are reoptimized at the next time step. The subscripts lbandub stand for lower bound andupper bound , respectively, and are used to enforce constraints on the controller, i.e., maximum and minimum values of lateral position ( ±0.5m), steering angle ( ±40deg), roll angle ( ±20deg), and assisting torque (±10Nm ). The matrices AandBare linear time-invariant state-space matrices. J=t+NX k=t(xk−rk)TQk(xk−rk) +t+N−1X k=tuT kRkuk subject to xk+1=Axk+Buk xlb,k≤xk≤xub,k ulb,k≤uk≤uub,k(2) In our study, Nwas set to 150, which is equal to a time horizon of 2seconds with a sample rate of 75Hz. The control input uis the steering torque applied by the handlebar motor. The bicycle and reference states, xandr, consist of the lateral position of the rear wheel of the bicycle yP, the yaw angle ψ, the roll angle ϕ, the steering angle δ, the roll rate ˙ϕand the steering rate ˙δ. Thus, the cost function stabilizes the bicycle in steer and roll while both minimizing deviation from the target and motor steer effort. The target tracking task is represented by the lateral position relative to the target at the time needed 4 to reach the target. Thus, the MPC derives an optimal steering sequence to reach the target. The state-space matrices Aand Bwere obtained using the HumanControl software [25], which can convert the equations of motion of a linear Whipple- Carvallo bicycle model to a state-space representation. Bicycle parameters of the Davis Instrumented Bicycle (specified under Rigid in pages 91-92 of [26]) were used due to its physical similarity to the bicycle used in this study. A forward speed of15 km /h(4.17 m/s), equal to the treadmill’s speed, was chosen. D. Study Protocol Ten healthy adult participants (9 between 25-39 years old, and 1 between 60-64 years old; 3 female) gave written consent to participate in the experiment. The study was approved by the TU Delft Human Research Ethics Committee (HREC). The study protocol is depicted in Figure 3. Participants first cycled for 5 minutes to familiarize them- selves with riding on a treadmill. During the familiarization period, they rode the bicycle on the treadmill without any as- sistance and were verbally encouraged to carry out lane change maneuvers of varying amplitudes. Once the participants were sufficiently confident, the main experimental protocol started. The experiment was split into five blocks: Baseline ( BL), Training 1 ( T1), Mid-Training Retention ( MTR ), Training 2 (T2), and End-of-Training Retention ( ETR). A trial consisted of riding the bicycle for 1 minute and trying to collect the 10 stars appearing (trial). The location of the10stars was pseudo-randomized. From the seven possible locations of the stars, three were located on the right side of the treadmill, five on the left, and the remaining two were in the middle. All participants experienced the same sequences. Baseline, Mid-Training Retention and End-of-Training Re- tention blocks included each two trials and were designed to evaluate the steering performance of the participants before, after the first training block, and after the second training block, respectively. During these evaluation blocks, no MPC assistance was provided. Participants were randomly assigned to one of two groups of five participants each. Participants allocated to Group 1 trained with the MPC assistance during Training 1 and without assistance during Training 2, while the order was reversed in Group 2. Each training block consisted of six trials. The training blocks started right after the Baseline or Mid-Training Retention block, while a two-minute break was enforced between Training 1 and Mid-Training Retention and between Training 2 and End-of-Training Retention. Participants were informed that they may be assisted during the training. E. Statistical Analysis The mean score across stars for each participant and block was calculated and used as the performance measure of the steering task. To evaluate motor learning after each training block, we calculated the difference in performance between baseline and mid-training retention and between mid-training retention and end-of-training blocks.TABLE I RESULTS FROM THE LME MODEL ANALYSIS DF F p Skill 1,19.654 47 .704 .000005 Controller 1,9.753 5 .392 .078 Skill * Controller 1,9.766 5 .167 .084 aSignificant effects are Bolded We were especially interested in evaluating whether the skill level of the participants before undergoing training had an effect on the effectiveness of the MPC steering assistance on motor learning. The participant’s score during the evaluation trials (i.e., BLorMTR ) is assumed to be a good estimate of the participant’s skill at that moment in time [27]. To evaluate the effect of training with or without haptic assistance ( Controller : ON or OFF) and its interaction with the participant’s skill on motor learning, we employed the following Linear Mixed Effects (LME) model: Difference ∼Skill∗Controller + (1|ID) (3) where Difference is the score difference between the evalu- ation blocks before and after training, Skill is the score during the evaluation block right before training, Controller is either OnorOff, and IDis the participant’s ID. We also tested if there is a correlation between the change in the score after the different training conditions and the participants’ initial skill level using Pearson’s correlation tests. The normality of the data was checked using Shapiro-Wilk tests. The significance value was set to α= 0.05. Statistical analyses were performed in R Core Team (2022) . III. R ESULTS All participants managed to stabilize the bicycle after famil- iarization and completed the experiment without simulator sickness. Participants were generally quite close to the targets in baseline with an average score of 88.6 (maximum possible score is 100, Equation 1). Our results showed that after both training methods (with/without MPC) the scores improved. However, we found a tendency of greater improvement when training with MPC assistance compared to training without assistance. Nonetheless, the difference between two methods did not reach significance (Table I; p= 0.078). Also, this improvement was higher for participants with a lower initial skill level (Fig. 4). We also observed that the interaction effect between controller and skill approached significance (Table I, p= 0.084). To visualize the observed (non-significant) interaction ef- fect, a scatter-plot showing the score difference from before to after training versus the score before training is shown in Figure 4. Two regression lines were fitted, one for MPC assistance (Controller On; R=−.85, p= 0.002) and a second for training without assistance (Controller Off; R= −0.67, p= 0.036). Lower initial scores represent lower skill, while higher scores are associated with higher skill. To help visualize differences between more and less skilled participants, we searched for the score threshold that splits the 5 Fig. 3. Study protocol. Participants were randomly assigned to one of two groups. Group 1 trained first with the MPC’s assistance and without assistance during the second training block. This order was reversed in Group 2. Blue rectangles represent trials where the MPC is on and black rectangles represent the trials without assistance. Each trial was 1minute long and contained 10stars. BL: Baseline, MTR : Mid-training retention, ETR: End-of-training retention, T1: Training 1, T2: Training 2 Fig. 4. Scatter-plot and regression lines showing the score increase after train- ing versus the score before training when training with the MPC assistance and without. initial score data into two subgroups using K-means, shown in Figure 4 as a vertical green line. It can be seen that participants with lower skill level increased the score after training with the MPC more compared to training without assistance. This difference is lost when the initial skill level was higher. IV. D ISCUSSION We designed an MPC potentially capable of haptically assisting in steering a bicycle on a treadmill while minimizing the assistance based on the rider’s ongoing performance and allowing variability in their movements. We implemented our controller on a steer-by-wire bicycle previously developed in our lab and ran a pilot experiment on a small group of ten healthy participants to evaluate the potential effectiveness of the MPC on enhancing the learning of a complex virtual steering task. We found that training with the MPC may enhance learning, compared to training without assistance. However, the differ- ence between training conditions did not reach significance. This could be in line with previous literature that showed a benefit of training with MPC-based robotic assistance in learning to control systems with complex dynamics compared to training with a PD controller or without assistance [14].Previous research, however, employed a rather artificial motor task, e.g., controlling a pendulum whose dynamics were haptically rendered by a haptic device. To our knowledge, this is the first attempt to use MPC-based haptic assistance to support the learning of a real task with especially complex dynamics, as is riding a bicycle. Training with the MPC-based haptic assistance may be beneficial for initially less-skilled participants. Although the interaction effects between skill and controller did not reach significance, there seems to be a tendency for better learning when training with the MPC compared to training without assistance in those participants who scored lower before train- ing. The Challenge Point Framework states that motor learning can be optimized by matching the difficulty of the task to be learned to the learner’s skill level [8]. The provision of the haptic assistance probably reduced the difficulty of the task while less-skilled participants trained, providing a more optimal training environment to enhance learning. Finally, MPC could be used not only to enhance the learning of steering tasks but also to provide assistance during on-road cycling. Lane-keeping assistance (LKA) is widely available in current cars and trucks combining guidance and lane departure warning. Users chose to activate LKA on highways in particu- lar in combination with adaptive cruise control [28]. However, LKA sees acceptance issues with drivers criticizing guidance as overly authoritative. This calls for systems adapting to individual driving styles [29] which could be based on MPC. Although results are encouraging, our study has several limitations to be noted. The most obvious is the relatively small sample size that limits the statistical power. Furthermore, the majority of participants in our study (7 out of 10) were skilled bicyclists, and therefore they were quite good at the steering task already at baseline. Future studies can explore a wider range of participant skills as well as a higher number of participants. Furthermore, to avoid the ceiling and floor effects, selecting appropriate outcome measures with different sensitivity levels, not only reflecting on the result (score), but also the performance are suggested. Finally, MPCs are compu- tationally expensive. We employed a desktop to deal with the computational demands which limits the potential use of our MPC on overground free riding. For future development we propose integrating the controller into the bicycle using more powerful embedded hardware installed on the bicycle. Also, for real-world application, image-based visual localization are 6 required. V. C ONCLUSION With this pilot study, we have demonstrated how model pre- dictive control-based assistive bicycle steering can be utilized in a vehicle lateral position targeting task. This is notable due to the use of a steer-by-wire bicycle which exhibits non-trivial dynamics and the real-time control implementation in a mixed real and virtual environment. A limited number of participants, lack of unskilled bicyclists, difficulties in applying precise perceivable haptic rendering, and a task that did not push the subjects towards their performance limits are all likely contributors to our statistically insignificant effects of MPC on learning to control a bicycle. An investigation into the effects associated with less skilled riders taken with the fact that prior studies have shown that assistance is generally only effective when the task is especially challenging or the initial skill level of the learner is relatively low leads us to believe that a redesigned study may show that this type of control assistance can improve performance and learning. Our future studies will address the current limitations. VI. A CKNOWLEDGMENTS We thank Dr. Georgios Dialynas for support with the steer-by- wire bicycle and Rado Dukalski for support with the virtual reality system.