creating a continuous and interactive simulation using bicycle dynamics and real world factors

Upload: seantrobinson

Post on 06-Apr-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    1/21

    CREATING A CONTINUOUS AND INTERACTIVE

    SIMULATION USING BICYCLE DYNAMICS AND

    ACCURATELY MODELLED ENVIRONMENTAL FACTORS

    SEAN ROBINSON

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    2/21

    Abstract Following on from the work

    completed in a previous paper, where the

    specific dynamics and mechanics of

    particular problems were investigated, this

    paper sets out to compile these results and

    demonstrate the significant steps needed tobe taken in order to develop a coherent

    model. Each stage required will be

    introduced and explained before a

    demonstration that shows the solution in

    practice is given. These demonstrations and

    experiments show how it is possible to

    model a bicycles dynamics to a high degree

    of accuracy in a limited scope and then

    interact with the model using accurately

    modelled environmental factors. This paper

    will document the logical enhancements thatcould be taken in order to extend the project

    and then conclude with a summary of the

    work.

    TABLE OF CONTENTS

    1. Introduction .................................................. 2

    2. Defining Constants ........................................ 2

    3. Calculating Velocity ....................................... 3

    I. Power........................................................ 3

    II. Surface Friction ......................................... 3

    III. Braking ...................................................... 3

    IV. Slopes ....................................................... 4

    V. Watts to Overcome Gravity ...................... 4

    VI. Watts to Overcome Surface Friction ........ 4

    VII. Watts to Overcome Air Resistance ...... 4

    VIII. Final Power Output .............................. 5

    IX. Calculating Acceleration ........................... 5

    4. Integrating Velocity ....................................... 7

    5. Calculating Lean .......................................... 10

    6. Calculating Steering Angle .......................... 14

    7. Integrating and Mapping Movement .......... 17

    8. Enhancements ............................................ 19

    9. Conclusions ................................................. 19

    Bibliography ......................................................... 20

    1.INTRODUCTIONWhereas the previous report was focussed

    almost exclusively on finding solutions to

    problems, this paper documents the timeline

    that was taken in order to pipe thosesolutions together. In some respects it is

    more difficult to concatenate solutions

    together as there is not usually an existing

    perfect solution, the solution needs to be

    developed dynamically for the particular

    problem.

    This paper takes a linear format as that is the

    way in which the experiments were

    completed. As each experiment is reliant onprevious work completed, it is necessary that

    problems are accurately solved before moving

    on. Some issues that were solved were found

    to be simply too complicated or costly and it is

    recommended that these are avoided in

    favour of more simple solutions.

    The experiments were simply completed in a

    Microsoft Excel Workbook as this provided

    immediate and clear results that could be

    plotted to give a visual representation of

    exactly what was happening. This workbook

    can also form a core component of any testing

    modules for work that expands on the basic

    demonstrations given here.

    Each experiment takes place over 30 steps

    using a randomised delta based on 0.1

    seconds. Using a randomised delta allows the

    experiment to mimic to difference in screen

    refresh rates if the model was developed for a

    computer.

    2.DEFINING CONSTANTSTo provide a more interactive and dynamic set

    of experiments, a single page in the workbook

    was created to house the constants used

    throughout the work. These constants range

    from fundamental constants such asacceleration due to gravity on earth, to more

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    3/21

    Page 3 of21 Sean Robinson 2012

    technical data such as the bicycles wheelbase

    length, to more arbitrary factors such as an air

    resistance coefficient.

    As this paper progresses, it will becomes clear

    what each of these constants represent.

    It is also important to note that by having a

    single cell that is used throughout, it is easy to

    modify certain factors to see immediate

    changes in results. It would be the work of

    seconds to see how doubling the riders

    weight affects acceleration on a slope or how

    much wind resistance would be required to

    bring the rider to a complete stop.

    Wheelbase 115 cm

    Caster Angle 18 Degrees

    Gravity 9.82 m/s/s

    Centre of mass height 66 cm

    Tyre Thickness 2.5 cm

    Velocity 10 m/s

    Dt 0.1 s

    Randomise 1 Boolean

    Weight of Object 80 kg

    MaximumDeceleration 0.5 G

    Air Resistance 0.7 Coefficient

    3.CALCULATING VELOCITYI. POWER

    The first item to consider when modelling the

    propulsion of an object is the amount of

    power that is being fed into it. On a bicycle

    this is the amount of watts generated by the

    cyclist pedalling. It would easy to simply forgo

    this and use an arbitrary value for

    acceleration but in order to accurately model

    and allow for hardware integration, a power

    output should first be defined. Based on

    research by Coggan (1), a value of 100 watts

    foran experienced cyclist has been used. This

    is achieved through 25 watt increases initially

    to approximate a build up as pedalling

    commences.

    II. SURFACE FRICTIONSurface friction is a difficult thing to model ina limited example as each surface will have a

    very different coefficient for the friction

    applied. In this limited experiment, a value of

    0.1 has been used for a flat road based on

    work by May (2).

    In a more developed project, this value can

    easily be changed to reflect the surface

    currently being used. This could either be an

    arbitrary value that seems to give anappropriate feel or something more accurate

    that has been researched.

    III. BRAKINGBraking can be modelled in many different

    ways. In bicycles, the brake force applied to a

    machine is the result of friction generated

    between the brake pad and tyre of the wheel.

    In a simplistic model, the velocity could simply

    be reduced by a fraction of a certain value

    defined as maximum brake.

    In a more complex model, the brake force

    could be modelled in a specific measure

    relative to the actual physics, such a G

    (gravity) or Newtons. In this model, the brake

    force if modelled in gravities.

    Should a user be allowed to apply excessive

    braking then it will be quite likely that a crash

    will occur at some point as the bicycle will

    decelerate too quickly. As this is not a

    concern of the basic model described here, a

    maximum safe brake value has been defined

    as 0.5g has been used based on a report by

    Whitt and Wilson (3). Any brake measure

    applied will be considered a fractional value of

    its maximum, which is then applied to the

    0.5g value in order to determine a brake force

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    4/21

    Page 4 of21 Sean Robinson 2012

    in gravities that need to be used to reduce the

    velocity.

    IV. SLOPESIn this experiment, a slope was defined simplyby specifying a percentage; this percentage is

    a fraction of angle defined on a road ranging

    from 0 with a horizontal plane to 100 with a

    fully vertical surface. Conversely, the value

    can also be defined as a negative which is

    indicative of a slope that is being travelled in a

    downward direction. In order to output a

    visual representation, this slope was tallied in

    a separate column that provided a general

    overview of how the landscape changed

    within the experiment.

    V. WATTS TO OVERCOME GRAVITYFollowing on from the slope definition is

    something that directly affects the velocity

    because of it. Gravity is apparent from any

    cycling situation but it begins to affect the

    machine and rider depending on the

    steepness of the hill currently being traversed.Travelling up a hill will increased the

    gravitational pull, travelling downwards will

    do the inverse and the rider will find himself

    being pulled forwards. In this model, the

    force isnt actually calculated but a value of

    watts is given in the calculation below. This is

    the amount of watts that should be

    subtracted from the initial power in order to

    compensate for the effect of gravity. Positive

    and negative values are both used. The

    formula, given by May (2) is:

    = Where:

    G: Standard acceleration due to gravity

    P: Weight of object is kg

    : Slope PercentageV: Current velocity in m/s

    VI. WATTS TO OVERCOME SURFACEFRICTION

    Surface friction has already been discussed

    and explained. Similarly to gravity, a formula

    has been used to identify the amount of watts

    required to overcome this friction. Provided

    again by May, the formula is:

    = . Where:

    0.1: Friction coefficient

    V: Current velocity in m/s

    P: Weight of object is kg

    VII. WATTS TO OVERCOME AIRRESISTANCE

    The final subtraction of power in the model

    comes in the form of air resistance. Air

    resistance plays a huge role in cycling and is

    an important factor to consider when

    attempting to model accurately. It would be

    outside the scope of this project to determine

    a truly valid coefficient for wind resistance so

    0.7, a value based on work by May (2) has

    been used in addition to the rest of the

    formula for calculating the watts required to

    overcome the resultant force. This formula

    has been simplified as wind is not being

    considered in this project, the referenced

    website has further information that can be

    used for an expanded model.

    = ()Where:

    : Air resistance coefficientV: Current velocity in m/s

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    5/21

    Page 5 of21 Sean Robinson 2012

    VIII. FINAL POWER OUTPUTThe final power if what remains once all

    subtractions for environmental factors have

    been applied. The formula is simply:

    = Where:

    w: Power output in watts

    p: Initial power output from pedalling

    : Watts to overcome gravitywf: Watts to overcome friction

    wa: Watts to overcome air resistance

    IX. CALCULATING ACCELERATIONAcceleration was the goal of this section of

    experimentation, a value that could be used

    throughout further experiments that allowed

    for the propulsion of an object. The

    acceleration is calculated using the mass of an

    object and a force acting upon it. Using the

    following formula (4), this can be calculated:

    = Where:

    f: Force

    m: Mass

    With regard to propulsion of an object, this is

    the final step of the section. If a basic

    integration method was being used, then this

    acceleration could be simply added to the

    existing velocity, which then could be used to

    calculate the new position using an Euler

    integration (5). As a runge-Kutta4 method is

    going to be used, there is much more work tobe done in order to fully utilise the results so

    far so this will be covered in the next section.

    Below is the final datasheet from the excel

    workbook that shows how user modified data

    in the left columns propagate throughout the

    rest.

    wer Friction Brake Slope% Veloc (m/s) Gravity w Friction w Air Res w Final P (w) Accel (m/s)

    0 0.1 0 0 0 0 0 0 0 0

    25 0.1 0 0 0 0 0 0 25 0.3125

    50 0.1 0 0 0.3125 0 2.5 0.021362305 47.4786377 0.593482971

    75 0.1 0 0 0.905982971 0 7.24786377 0.520544838 67.23159139 0.840394892

    100 0.1 0 2 1.746377864 27.43908899 13.97102291 3.728315818 54.86157228 0.685769654

    100 0.1 0 2 2.432147517 38.21390179 19.45718014 10.07088828 32.2580298 0.403225372

    100 0.1 0 2 2.83537289 44.54937884 22.68298312 15.95616754 16.81147051 0.210143381

    100 0.1 0 2 3.045516271 47.85115165 24.36413017 19.77337543 8.01134275 0.100141784

    100 0.1 0 2 3.145658055 49.42457936 25.16526444 21.78876296 3.621393228 0.045267415

    100 0.1 0 2 3.190925471 50.13582099 25.52740377 22.74301417 1.59376107 0.019922013

    100 0.1 0 2 3.210847484 50.44883567 25.68677987 23.17165592 0.692728541 0.008659107

    100 0.1 0 6 3.219506591 151.7546627 25.75605273 23.35963193 -100.8703473 -1.260879342

    100 0.1 0 6 1.958627249 92.32185402 15.66901799 5.25960848 -13.2504805 -0.165631006

    100 0.1 0 6 1.792996243 84.51467091 14.34396994 4.034931616 -2.893572474 -0.036169656

    100 0.1 0 6 1.756826587 82.80977801 14.0546127 3.795637475 -0.660028183 -0.008250352

    100 0.1 0 6 1.748576235 82.42088941 13.98860988 3.742413358 -0.151912643 -0.001898908

    100 0.1 0 6 1.746677327 82.33138248 13.97341861 3.730234105 -0.035035196 -0.00043794

    100 0.1 0 6 1.746239387 82.31073974 13.96991509 3.727428992 -0.008083826 -0.000101048

    100 0.1 0 0 1.746138339 0 13.96910671 3.726781956 82.30411133 1.028801392

    100 0.1 0 -6 2.774939731 -130.7995591 22.19951785 14.95748945 193.6425519 2.420531898

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    6/21

    Page 6 of21 Sean Robinson 2012

    100 0.1 25 -6 5.070471629 -239.0017507 40.56377303 91.25215113 207.1858265 2.589822832

    100 0.1 25 -6 7.535294461 -355.1836397 60.28235568 299.5013087 95.39997532 1.192499692

    100 0.1 25 -6 8.602794152 -405.5013052 68.82235322 445.6733175 -8.994365601 -0.11242957

    100 0.1 50 -6 8.240364582 -388.4178249 65.92291666 391.685343 30.80956527 0.385119566

    100 0.1 50 -6 8.375484148 -394.7868208 67.00387318 411.2707309 16.51221671 0.206402709

    100 0.1 25 -6 8.456886857 -398.6238189 67.65509485 423.3792808 7.589443211 0.09486804

    100 0.1 0 0 8.551754897 0 68.41403918 437.7879212 -406.2019604 -5.077524505

    100 0.1 0 0 3.474230392 0 27.79384313 29.35444578 42.85171108 0.535646389

    100 0.1 0 0 4.00987678 0 32.07901424 45.13267992 22.78830584 0.284853823

    100 0.1 0 0 4.294730603 0 34.35784483 55.45054522 10.19160995 0.127395124

    100 0.1 0 0 4.422125728 0 35.37700582 60.53287459 4.090119592 0.051126495

    This data was mapped to several graphs in order to obtain an overview of the output. Some of the

    more significant show the correlation between velocity and the height of a slope or the amount of

    acceleration given by certain amounts of power in watts.

    0

    10

    20

    30

    40

    50

    60

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29

    Height

    Height

    0

    1

    2

    3

    4

    5

    6

    7

    89

    10

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29

    Velocity (m/s)

    Velocity (m/s)

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    7/21

    4.INTEGRATING VELOCITYUsing a base velocity calculated by adding the

    acceleration to the previous velocity and

    subtracting the deceleration due to braking,

    the distance an object moves can be

    calculated by integrating the velocity using

    the Runge-Kutta 4 method developed by

    Runge (6) and then modified by Kutta (7) .RK4 is usually used to integrate a position but

    can become very complex when using

    multiple variables; a good balance can be

    achieved by using RK4 to integrate the

    velocity based on a differing delta time and by

    then using a simple Euler to calculate the

    distance moved.

    The RK4 method works by taking several

    derivatives of a value in a given time step andthen summing them using weights. This then

    gives a good approximation of what the

    velocity will be (8).

    -500

    -400

    -300

    -200

    -100

    0

    100

    200

    300

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29

    Final Power (w)

    Final Power (w)

    -6

    -5

    -4

    -3

    -2

    -1

    0

    1

    2

    3

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29

    Acceleration (m/s)

    Acceleration (m/s)

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    8/21

    Page 8 of21 Sean Robinson 2012

    The first step is to calculate the derivatives.

    Each derivative has a slightly different formula

    but the one used here is as follows:

    D1:

    (2 + )D2:

    (2( + 0.51) + (.))D3:

    (2( + 0.52) + (.))D4:

    (2( + 2) + (.))Where:

    t: Delta TimeT: Current Time

    V: Current velocity in m/s

    D1: Derivative 1D2: Derivative 2

    D3: Derivative 3

    D4: Derivative 4

    e: Constant

    The derived velocity can now be calculated

    using the following formula

    = +16 + 23 +

    33 +

    46

    This integrated velocity is now used in a basic

    Euler by multiplying the current distance

    moved by the derived velocity squared.

    In this manner, thought slightly convoluted in

    parts, it is possible to obtain the accuracy of

    using RK4, keep the cost of the program down

    by using more basic approaches where

    possible and obtain a solid value of distance

    moved that can be used to accurately indicate

    where the object is going to be at the next

    step.

    Below is the datasheet used to calculate the

    integration during the experiment.

    dt Time Position Velocity d1 d2 d3 d4 dv

    0.119469 0 1 0 0.119469 0.099016 0.099283 0.097513 0.102263

    0.015962 0.119469 1.010457734 0 0.011154 0.010889 0.010889 0.010886 0.010933

    0.075284 0.135431 1.010577262 0.3125 0.003095 0.029943 0.028646 0.02727 0.337091

    0.037452 0.210715 1.124207402 0.905983 -0.04796 -0.03945 -0.04002 -0.03735 0.865274

    0.146287 0.248167 1.872906372 1.746378 -0.44146 -0.6252 -0.54566 -0.36602 1.221511

    0.139759 0.394454 3.364996098 2.432148 -0.63703 -1.21403 -0.8964 -0.62454 1.51841

    0.079715 0.534213 5.670564296 2.835373 -0.43599 -1.07795 -0.8265 -0.62915 2.0230330.076205 0.613928 9.7632255 3.045516 -0.45209 -1.2008 -0.90042 -0.69053 2.154672

    0.176485 0.690133 14.40583602 3.145658 -1.08806 -2.37198 -1.33843 -1.13575 1.538221

    0.16561 0.866618 16.77196004 3.190925 -1.0446 -2.34921 -1.33699 -1.12883 1.599952

    0.181669 1.032229 19.33180658 3.210847 -1.15841 -2.51006 -1.3836 -1.20688 1.518747

    0.103211 1.213898 21.63840049 3.219507 -0.66187 -1.72004 -1.14687 -0.88443 2.006153

    0.136179 1.317109 25.6630501 1.958627 -0.53083 -0.77871 -0.66858 -0.45113 1.312539

    0.121356 1.453288 27.38580863 1.792996 -0.43363 -0.60169 -0.53911 -0.38031 1.277074

    0.115821 1.574643 29.01672769 1.756827 -0.40593 -0.55843 -0.50489 -0.3622 1.274365

    0.12158 1.690464 30.64073508 1.748576 -0.42442 -0.57332 -0.51904 -0.36696 1.252556

    0.157394 1.812044 32.20963235 1.746677 -0.54915 -0.68163 -0.62162 -0.3979 1.154419

    0.082432 1.969438 33.54231542 1.746239 -0.28767 -0.42312 -0.38809 -0.3039 1.377238

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    9/21

    Page 9 of21 Sean Robinson 2012

    0.086196 2.05187 35.43910112 1.746138 -0.30084 -0.4388 -0.40167 -0.31145 1.363931

    0.172084 2.138066 37.29940996 2.77494 -0.95476 -1.81656 -1.199 -0.85455 1.468199

    0.093859 2.31015 39.45501925 5.070472 -0.95173 -3.96273 -1.79124 -2.01853 2.657441

    0.047556 2.404009 46.51701066 7.535294 -0.71666 -4.89909 -2.46003 -2.4499 4.554494

    0.140591 2.451565 67.2604288 8.602794 -2.41886 -15.3699 -0.23682 -19.6798 -0.28254

    0.053788 2.592156 67.34025614 8.240365 -0.88644 -6.54006 -2.65754 -3.35287 4.467948

    0.042478 2.645943 87.30281102 8.375484 -0.71153 -5.46399 -2.70574 -2.73098 5.078489

    0.114501 2.688421 113.0938629 8.456887 -1.9366 -12.8421 -0.94909 -12.9081 1.385701

    0.035488 2.802922 115.0140314 8.551755 -0.60696 -4.82873 -2.67346 -2.4525 5.541115

    0.188078 2.83841 145.7179848 3.47423 -1.30681 -2.99306 -1.47123 -1.50911 1.516813

    0.183596 3.026488 148.0187054 4.009877 -1.47238 -3.9352 -1.5315 -2.2554 1.566344

    0.195959 3.210084 150.4721404 4.294731 -1.68317 -4.6733 -1.50263 -3.05531 1.446341

    0.142212 3.406043 152.5640436 4.422126 -1.25775 -4.0925 -1.60551 -2.25642 1.937094

    Graphing this data can give a clear indicationof what is happening over time. The following

    graphs indicate the movement of an object

    over the steps based on the velocity shown.

    The derived velocity is also given for

    comparison. A correlation can be mappedhere that shows a higher velocity will push the

    position of an object further from the origin at

    a greater speed.

    0

    20

    40

    60

    80

    100

    120

    140

    160

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31

    Position

    Position

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    10/21

    Page 10 of21 Sean Robinson 2012

    5.CALCULATING LEANThe lean, or Yaw, of an object is the amount

    of angle by which it is rotated about a virtual

    line drawn along the Z axis at the lowest part

    of the plane. For humans, this would

    represent the angle our bodies make to the

    perpendicular when swaying to either side.

    The lean of a bicycle can be thought of in the

    same way. As a machine goes around a

    corner, a certain degree of leaning is

    inevitable and this can be calculated.

    To provide some level of interactivity and

    dynamism, functionality allowing users to

    alter the angle of steering was provided. This

    meant that at each step, or row, a certain

    amount of steering could be applied either

    left or right. These angles referred to a

    change in steering, not the actual angle. From

    here, the new angle was calculated. The

    workbook that details the steering is quite

    large so each section will be displayed

    individually in order to provide easier viewing.

    0

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31

    Velocity

    Velocity

    -4

    -3

    -2

    -1

    0

    1

    2

    3

    4

    5

    6

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31

    dv

    dv

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    11/21

    Page 11 of21 Sean Robinson 2012

    Left

    Turn

    Right

    Turn

    Change in

    Steering

    Steering

    Angle

    0 0 0 0

    5 0 -5 -55 0 -5 -10

    0 3 3 -7

    15 0 -15 -22

    5 0 -5 -27

    8 0 -8 -35

    0 14 14 -21

    0 10 10 -11

    0 10 10 -1

    0 5 -3 4

    0 5 -5 90 10 -10 19

    0 3 -3 22

    6 0 6 16

    8 0 8 8

    11 0 5 -3

    5 0 -5 -8

    9 0 -9 -17

    6 0 -6 -23

    0 9 9 -14

    0 0 0 -140 4 4 -10

    0 0 0 -10

    0 9 9 -1

    0 2 0 1

    0 0 0 1

    0 3 -3 4

    0 0 0 4

    0 6 -6 10

    0 2 -2 12

    In order to calculate the lean, something

    called the radius of the turn needed to be

    known. The radius of the turn is the radius of

    an imaginary circle drawn based on the angle

    of the steering. With the steering at a certain

    angle and with a flat plane to experiment

    with, riding a bicycle while maintaining the

    angle will eventually lead the rider back to the

    origin. This can visualised by imagining therider leaving a mark from the tyres wherever

    they go. When the radius of a circle is

    mentioned in relation to steering in this

    paper, metres is the measurement being

    considered.

    The upright turn radius of a circle is the radius

    that would be made based on a bicycle with

    no lean. This is simply a starting point and

    gives a base to work with for refinement. The

    formula, given by Sharp (9) is:

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    12/21

    Page 12 of21 Sean Robinson 2012

    = ()

    Where:

    r: Radius

    w: Wheelbase in cm

    : Steering Angle: Caster Angle

    The ideal lean can now be calculated. Ideal

    here means ideal tyres and centre of mass,

    infinitely slim and low respectively. As this is

    never the case, a more developed solution is

    required. This is a modification of the answer

    given by the ideal lean formula given byFajans (10).

    = ()Where:

    : Caster Anglev: Velocity

    g: Acceleration due to gravity

    r: Upright turn radius

    The modification mentioned previous is a way

    of giving the increase the lean should take as

    a result of tyre and centre of mass

    considerations. The output of this formula is

    added to the ideal lean in order to give a more

    accurate representation. The formula, given

    by Cossalter (11), is:

    (. ().)

    Where:

    : Caster Anglet: Tyre thickness in cm

    h: Centre of mass height

    For the sake of this demonstration, the tyre

    thickness has been given as 2.5cm. This was

    simply the output from a brief averaging of

    several tyres and types. The centre of mass,

    given by h, was decided upon using a similar

    measure.

    The value now given is the amount of lean, or

    yaw, which the object being modelled will

    need to be rotated by in order to map closelyto real world dynamics. A final value was

    calculated that was to be an experiment in

    how far it is realistically possible to pursue

    accuracy in a limited model such as this. The

    lean of a bicycle affects the radius of its

    turning circle by a small amount. The new

    radius was calculated using a formula given by

    Cossalter (11).

    = ()() : Caster Anglew: Wheelbase in cm

    : Steering Anglea: Lean

    The relevant sections of the data sheet areincluded below:

    Upright Turn Radius Ideal Lean Lean Increase Lean Final Radius

    0 0 0 0 0

    34.83177044 0 0 0 34.83177044

    17.41588522 0.000571009 -2.3402E-05 0.000547607 17.41588261

    24.87983603 0.003359537 -0.000137686 0.003221851 24.8797069

    7.916311464 0.039212037 -0.00160664 0.037605398 7.910714635

    6.450327859 0.093116958 -0.003810765 0.089306193 6.424622346

    4.975967206 0.163063977 -0.006653422 0.156410555 4.9152245118.293278676 0.113400991 -0.004637643 0.108763348 8.244274485

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    13/21

    Page 13 of21 Sean Robinson 2012

    15.83262293 0.063558452 -0.002603104 0.060955348 15.80321855

    174.1588522 0.005953483 -0.000243994 0.00570949 174.1560136

    43.53971305 0.024107832 -0.00098793 0.023119902 43.52807693

    19.35098358 0.05449215 -0.002232182 0.052259968 19.32456481

    9.166255379 0.042592919 -0.001745085 0.040847835 9.158609285

    7.916311464 0.041331104 -0.001693416 0.039637688 7.910093436

    10.88492826 0.028866895 -0.001182905 0.02768399 10.88075741

    21.76985653 0.0143012 -0.000586095 0.013715105 21.76780906

    58.05295074 0.005351622 -0.000219328 0.005132294 58.05218617

    21.76985653 0.014263006 -0.00058453 0.013678476 21.76781998

    10.24463837 0.03029816 -0.001241538 0.029056622 10.24031396

    7.572124009 0.103188813 -0.004221561 0.098967252 7.535071618

    12.43991801 0.207431862 -0.008440571 0.198991291 12.19443463

    12.43991801 0.435097909 -0.017275416 0.417822493 11.36977004

    17.41588522 0.408403976 -0.016277156 0.392126819 16.09399126

    17.41588522 0.377953275 -0.015124305 0.36282897 16.28205025

    174.1588522 0.040993918 -0.001679609 0.039314309 174.0242783

    174.1588522 0.04179372 -0.00171236 0.040081361 174.0189765

    174.1588522 0.042735516 -0.001750923 0.040984592 174.0126022

    43.53971305 0.028223109 -0.001156531 0.027066577 43.52376544

    43.53971305 0.037588967 -0.001540169 0.036048798 43.51142584

    17.41588522 0.107433427 -0.004394558 0.103038869 17.32351469

    14.51323768 0.136358722 -0.005571199 0.130787524 14.38928732

    0

    20

    40

    60

    80

    100

    120

    140

    160

    180200

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31

    Upright Turn Radius

    Final Radius

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    14/21

    Page 14 of21 Sean Robinson 2012

    From the visual representation, it is very clear

    that the difference between ideal and actual

    lean is very small, as is the difference between

    the initial radius and the final radius. These

    changes are very small and will go unnoticed

    in almost every application using these

    equations. Unless a very high degree of

    accuracy is required, there is little point in

    making use of the full set.

    6.CALCULATING STEERINGANGLE

    As the radius of the turn changed slightly due

    to the lean of the bicycle, it is apparent that

    the angle of rotation will also be different. In

    order to calculate this new angle, an

    experiment was devised. The aim of the

    experiment was to derive a new point on the

    virtual circle based on the distance travelled

    in the step. By taking the angle between this

    new point and the origin, which would be the

    top point of the circle at X = 0, Y = Radius, it

    would be possible to accurately model the

    slight change.

    Despite several days of experimentation, this

    method was never conclusively proved.

    Discrepancies between the new derived angle

    and the original steering angle were too large

    to ignore. This coupled with the vast amount

    of time being tunnelled into the solution and

    with the possibility of a very small return but

    huge costs associated meant that the pursuit

    of the solution was abandoned. The method

    0

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    0.35

    0.4

    0.45

    0.5

    1 2 3 4 5 6 7 8 9 10111213141516171819202122232425262728293031

    Ideal Lean

    Lean

    -150

    -100

    -50

    0

    50

    100

    150

    200

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31

    Change In Radius

    Change in Steering

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    15/21

    Page 15 of21 Sean Robinson 2012

    used to arrive at the results shown later will

    not be detailed.

    The first step in completing this was to derive

    a new point based on the distance travelled;

    the new point would be a new point on the

    circumference of the virtual circle. The new

    point was derived using formula from

    MathWarehouse (12).

    = : Arc lengthr: Radius

    : Inner angle between both points in radians

    With this inner angle, the new point could be

    derived using the parametric equation of a

    circle. An offset was then applied in order to

    ensure the point had moved in the correct

    direction around the circumference. The two

    points now represented a coord across the

    virtual circle and a tangent was given by the

    original point. The coord tangent equation

    given by Warendorff (13), states that the

    angle between a coord and an angle is half of

    the inscribed angle between the points. This

    means that by halving the angle already

    calculated, the angle between the points

    could be obtained.

    At this point, the new angle showed large

    differences to the original and could not be

    consolidated despite attempting several

    tweaks and rebuilds. There is no doubt a way

    to realise this solution, but considering theextra cost and complexity for such a small

    reward in a small project indicates that the

    matter should not be pursued further.

    The relevant data is given below.

    x1 y1 Distance In Angle x2 y2 Angle Diff

    0 0 0 0 0 0 0 0

    0 34.83177044 2.72365E-06 4.48249E-06 -2.7237E-06 34.83177044 2.24124E-06 4.999998

    0 17.41588261 0.007671051 0.025249469 -0.00767105 17.41588092 0.012624735 9.987375

    0 24.8797069 0.129164651 0.297605718 -0.12916523 24.87937162 0.148802859 6.851197

    0 7.910714635 0.748529241 5.424202687 -0.74964572 7.875327307 2.712101343 19.2879

    0 6.424622346 3.007668784 26.8364621 -3.11633219 5.733370743 13.41823105 13.58177

    0 4.915224511 1.903198808 22.19645682 -1.95040058 4.55134123 11.09822841 23.90177

    0 8.244274485 3.097967283 21.54106847 -3.17036212 7.669026873 10.77053424 10.22947

    0 15.80321855 2.505435053 9.08825408 -2.51591747 15.60502893 4.54412704 6.455873

    0 174.1560136 8.917113432 2.935139 -8.92100915 173.927777 1.4675695 0.46757

    0 43.52807693 7.996715297 10.53137339 7.951808532 42.79558648 5.265686694 1.265687

    0 19.32456481 5.326940935 15.8019621 5.259734204 18.59499937 7.900981052 1.099019

    0 9.158609285 4.016425364 25.13929105 3.888919047 8.291949872 12.56964553 6.430354

    0 7.910093436 1.383989933 10.02984391 1.376939439 7.789327054 5.014921957 16.98508

    0 10.88075741 1.854653751 9.771170056 1.845685906 10.72307443 4.885585028 11.11441

    0 21.76780906 2.169375502 5.71298218 2.165786218 21.65979874 2.85649109 5.143509

    0 58.05218617 1.236323776 1.220833672 -1.23641723 58.03902182 0.610416836 2.389583

    0 21.76781998 1.393239209 3.669049812 -1.39419027 21.72324838 1.834524906 6.165475

    0 10.24031396 2.500530828 13.99786492 -2.52530642 9.93653189 6.998932459 10.00107

    0 7.535071618 1.140764954 8.678639387 -1.14511771 7.448883917 4.339319693 18.66068

    0 12.19443463 5.988721 28.15238985 -6.22656322 10.75321483 14.07619493 0.076195

    0 11.36977004 2.865699468 14.44846862 -2.89594476 11.01053452 7.224234311 6.775766

    0 16.09399126 0.189352234 0.674449643 -0.1893566 16.09287737 0.337224821 9.662775

    0 16.28205025 1.803351402 6.349128663 -1.80703613 16.18228539 3.174564332 6.825436

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    16/21

    Page 16 of21 Sean Robinson 2012

    0 174.0242783 17.67808631 5.823287949 -17.7084749 173.1271446 2.911643975 1.911644

    0 174.0189765 6.62304149 2.181743661 6.621442682 173.8929575 1.09087183 0.090872

    0 174.0126022 0.762456583 0.251175499 0.762454144 174.0109318 0.12558775 0.874412

    0 43.52376544 1.493802479 1.967476581 1.493509221 43.49813316 0.983738291 3.016262

    0 43.51142584 11.89277748 15.66833452 11.74525113 41.89622005 7.83416726 3.834167

    0 17.32351469 12.81166186 42.39477319 11.67532036 12.79808797 21.19738659 11.19739

    0 14.38928732 4.241694814 16.89829901 4.180530049 13.76861497 8.449149507 3.55085

    -30

    -25

    -20

    -15

    -10

    -5

    0

    5

    10

    15

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31x1

    x2

    0

    20

    40

    60

    80

    100

    120

    140160

    180

    200

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31

    y1

    y2

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    17/21

    Page 17 of21 Sean Robinson 2012

    Despite there being a very close correlation

    between the derived Y values and a broad

    correlation between the original angle and

    the angle considering lean, it is recommended

    to use the angle of steering for these

    calculations.

    7.INTEGRATING AND MAPPINGMOVEMENT

    The final stage in this process is to actually plot

    some points to demonstrate the movement.

    Movement is considered to be the distance and

    direction travelled to the next point. The angle of

    the turn and distance travelled in the current dt is

    already known so the new point can be calculated

    using the parametric equation of a circle and thenadding the previous position, which will act as the

    origin.

    dt Time Angle Movement X Y

    0.068843953 0 0 0 0 0

    0.074739419 0.068843953 -5 0.003972623 -0.000346062 0.003957521

    0.022569843 0.143583373 -10 0.003054153 -0.000876144 0.006965322

    0.021356104 0.166153216 -7 0.102812872 -0.013399561 0.109012618

    0.076438383 0.18750932 -22 0.781158696 -0.305885767 0.833347296

    0.014518368 0.263947703 -27 2.045595522 -1.234131248 2.65620806

    0.025705863 0.278466071 -35 5.255263349 -4.247093188 6.962001044

    0.114520799 0.304171934 -21 6.339302551 -6.517796338 12.88067184

    0.06889548 0.418692733 -11 3.544323525 -7.193746519 16.35994197

    0.127438314 0.487588213 -1 5.182484641 -7.284147499 21.54163809

    0.023090648 0.615026526 4 3.371261219 -7.04909923 24.90469541

    0.180005126 0.638117175 9 8.06788396 -5.78763868 32.87335081

    0.029316446 0.818122301 19 2.354997378 -5.021300878 35.10017344

    0.118324639 0.847438747 22 3.146233466 -3.843268943 38.01753968

    0.025785655 0.965763386 16 1.667161222 -3.383963912 39.62018294

    0.10360612 0.991549041 8 2.630018933 -3.018120376 42.224632620.100718349 1.09515516 -3 1.717853055 -3.107980321 43.9401338

    0

    5

    10

    15

    20

    25

    30

    35

    40

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31

    Angle

    Original

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    18/21

    Page 18 of21 Sean Robinson 2012

    0.002857348 1.19587351 -8 1.736843071 -3.349580411 45.66009114

    0.044747185 1.198730858 -17 2.993869404 -4.22447245 48.52327432

    0.188248492 1.243478042 -23 2.327484513 -5.133457079 50.66592014

    0.065680894 1.431726534 -14 1.9700843 -5.609826812 52.57754354

    0.169819225 1.497407428 -14 9.998422682 -8.027462416 62.27926989

    0.120381681 1.667226654 -10 0.161225934 -8.055444957 62.43804892

    0.107851001 1.787608334 -10 0.852591764 -8.203421671 63.27770099

    0.126320329 1.895459335 -1 3.554743207 -8.265429046 66.83190334

    0.077535861 2.021779665 1 0.617145321 -8.254663835 67.44895477

    0.087319371 2.099315526 1 11.20717209 -8.059170859 78.65442168

    0.19686197 2.186634897 4 8.015844019 -7.500296855 86.65075929

    0.051299809 2.383496867 4 2.160636998 -7.349654721 88.80613842

    0.064542392 2.434796677 10 8.62022407 -5.853519662 97.29553433

    -40

    -30

    -20

    -10

    0

    10

    20

    30

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29

    Angle

    Angle

    -6

    -5

    -4

    -3

    -2

    -1

    0

    1

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29

    X

    X

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    19/21

    Page 19 of21 Sean Robinson 2012

    The graphs above clearly show the movement

    between data points based on the criteria

    previously explained. By comparing the X and

    Angle graphs, it becomes apparent that altering

    the angle of the steering has an effect on

    movement, but even a sudden alteration still

    describes a smooth curvature. This is an ideal

    result as it satisfies many criteria with regard to

    accuracy of dynamics but also outputs a model

    that is highly indicative of what would be

    expected.

    8.ENHANCEMENTSDespite overall success in the experiments detailed

    here, there have been some sections that

    presented substantial difficulty. A complete

    solution would be providing proof of the improved

    turning equations. Despite the differences being

    too large, there is still something to be gained for

    truly accurate models if the problem can be solved

    or conclusively proved.

    Although the transition of the object can be clearly

    tracked over the graphs, there are issues that limit

    the model. The Z axis has been completely

    ignored in this paper as the values for it have no

    bearing on the research. Converting to three

    dimensions requires the alteration of the current Y

    axis becoming the new Z component and a new Y

    set being established to hold vertical data. At

    every point in this model, the vertical component

    will just be the height of the terrain currently being

    used. As the equations are calculated using the

    slope before any integration occurs, the propulsion

    of the object has already factored the

    modifications required by the terrain. The object

    is then moved by the specified amount in the

    indicated direction. Improving on this would mean

    a substantial overhaul to much of the system but

    would allow the bicycle to potentially leave the

    ground in moments of severe terrain by utilising

    equations of inertia and momentum.

    A final point to make is that a second run of RK4

    could be used to integrate the actual movement

    more accurately. Although the velocity is already

    integrated, as demonstrated by the smooth

    curvature, further refinement could be achieved

    with little added cost.

    9.CONCLUSIONSThis paper detailed the pipeline of equations and

    calculations necessary to model the core features

    of a bicycle. Power is the first thing needing to be

    calculated, this is a value determined by the power

    being put in to something minus the power being

    taken out. These factors are usually the riders

    pedal power and any environmental factors.

    It was then shown how this power gave an

    acceleration, which could then be integrated using

    RK4 to give a measure of distance that would be

    traversed during the current delta time step.

    0

    20

    40

    60

    80

    100

    120

    140

    1 3 5 7 9 11 13 15 17 19 21 23 25 27 29

    Y

    Y

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    20/21

    Page 20 of21 Sean Robinson 2012

    The third stage was steering. The lean of the

    bicycle was demonstrated to be easily calculable

    but the addition of further equations and

    complexity meant that choices should be made

    with regard to specific problems. This paper

    recommends that unless a very high level ofaccuracy to real world dynamics is paramount,

    more basic measures will easily suffice. The Yaw

    of a bicycle should be calculated based on an

    upright position and any small increase can be

    safely ignored as the difference is infinitesimal and

    will be unseen by any users. Furthermore, any

    change in radius from lean should be avoided in all

    but the most important cases. The closest

    approximation to a solution shown here clearly

    demonstrates a very high cost and minimal return.

    Finally, the movement of the object was plotted in

    two dimensional space in order to prove the

    accuracy and workings of the solutions provided.

    BIBLIOGRAPHY

    1. Coggan A. Training Peaks. [Online]. [cited 2012 01 05. Available from:

    http://home.trainingpeaks.com/articles/cycling/power-profiling.aspx.

    2. May Q. MayQ. [Online].; 2010 [cited 2012 01 05. Available from:

    http://www.mayq.com/Best_european_trips/Cycling_speed_math.htm.

    3. Whitt FR, G WD. Bicycling Science. 2nd ed. Massachusetts: Massachusetts Institute of technology; 1982.

    4. Newton I. Philosophiae Naturalis Principia Mathematica. 1st ed. London; 1687.

    5. Euler L. Institutionum calculi integralis volumen secundum St. Petersburg: Imperial Academy of Science;

    1769.

    6. Encyclopedia.com. Encyclop. [Online].; 2008 [cited 2011 11 02. Available from:

    http://www.encyclopedia.com/doc/1G2-2830903781.html.

    7. GAP. http://www-gap.dcs.st-and.ac.uk. [Online]. [cited 2011 11 02. Available from: http://www-gap.dcs.st-

    and.ac.uk/~history/Biographies/Kutta.html.

    8. Fiedler G. gafferongames.com. [Online].; 2006 [cited 2011 11 02. Available from:

    http://gafferongames.com/.

    9. Sharp RS. Motorcycle Steering Control by Road Preview. Journal of Dynamic Systems, Measurement andControl (ASME). 2007 July;(129).

    10. Fajans J. Steering in Bicycles and Motorcycles. American Journal of Physics. 2000 July; 68(7).

    11. Cossalter V. Motorcycle Dynamics. 2nd ed.: Lulu; 2006.

    12. Math Warehouse. Math Warehouse. [Online]. [cited 2012 01 05. Available from:

    http://www.mathwarehouse.com/trigonometry/radians/s=r-theta-formula-equation.php#.

    13. Warendorff J. Wolfram Demonstrations project. [Online].; 2012 [cited 2012 01 05. Available from:

    http://demonstrations.wolfram.com/TangentChordAngle/.

  • 8/3/2019 Creating a Continuous and Interactive Simulation Using Bicycle Dynamics and Real World Factors

    21/21

    Page 21 of 21 Sean Robinson 2012