Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Modeling a bicycle

  1. Jul 2, 2012 #1
    First off, this is not a homework question. I am simply trying to figure out how to make a discrete time model into a continuous one. I don't expect anyone to work this out for me, I just want to start heading in the right direction.

    I have a model of a bicycle on a 2d plane that has a position (x,y) and an orientation (theta). Theta is with respect to the X axis. The bike steers with the front wheel at an angle (alpha) with respect to the orientation (theta). The distance between the rear wheel and the front wheel is L. Now, given an initial state (x,y,theta), I am given a distance the bike will travel (d) at a certain steering angle (alpha). It can be shown that the new position and orientation of the bike is as follows:

    x' = cx + sin(theta+Beta)*R
    y' = cy - cos(theta+Beta)*R
    theta' = (theta+Beta) (%mod 2pi optionally)


    cx = x - sin(theta)*R
    cy = y + cos(theta)*R
    R = d/Beta
    Beta = d*tan(alpha)/L

    Now what I want to do is generate a trajectory of the bicycle given an arbitrary time varying function for both the steering angle (alpha) and the instantaenous velocity d(d)/dt. How would I go about starting a problem like this?

    If we ignore all the details that I listed above, I should be able to write the new position and orentation as a vector:

    | x' |
    | y' | = f(x,y,theta,alpha,d)

    What steps do I need to take next? When I move to a continuous model, all the variables become time varying: f(x(t),y(t),theta(t),d(t)). My first thought is that I take the derivative of each component with respect to alpha and d. I would then end up integrating from time zero to time T given the initial state vector and given time varying functions for alpha and d.

  2. jcsd
  3. Jul 5, 2012 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    You cannot integrate arbitrary functions in closed form. For most, numerical solutions are all that's possible. I assume the issue you're worried about is accumulation of errors using a finite time step, but in general I doubt there's much can be done about that.
  4. Jul 5, 2012 #3


    User Avatar
    Science Advisor

    Hey hazuki and welcome to the forums.

    Are you aware of how to derive stability constraints for differential equations?

    This kind of analysis is done for numerical integration schemes and I suggest you get a reference source, be it a text or an online source for error analysis.

    Also a suggestion would be to start with the simpler model and then generalize the parameter after you have done the analysis for the simpler version.

    So in terms of the specifics, start with R being a constant. Then extend R to the definition and keep Beta a constant. Then allow Beta to be defined in the way its defined.

    What background do you have with numerical techniques for integrating systems of differential equations?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook