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 (very simple) vehicle suspension

  1. Jul 26, 2015 #1

    I am generating synthetic images from the perspective of a moving vehicle, i.e. a camera mounted on a vehicle driving through a computer generated scene.

    Now i want to simulate the motions of the vehicle body that result from road roughness (bumps, patches).

    I modeled my road roughness as vertical displacement over time.
    What I am looking for is the frequency of the bounces and pitch motions that the vehicle body experiences as a result of driving over the road profile (plotted it looks like this http://imgur.com/0AiwnBy).

    Due to time constraints and general inability, I can not model a complete suspension system. Instead, I think a quarter vehicle model should suffice (see here: http://imgur.com/VhdJMBn).
    So the model should consist only of unsprung mass, sprung mass and suspension stiffness

    All that I have found so far goes way beyond what I need. I am only interested in an approximately correct movement of the vehicle body, the other effects on vehicle dynamics are not relevant for me.

    So my questions is:
    Is the general idea okay in that I would get some approximately accurate results?
    And if so, are simple equations for springs enough, or do I need something more sophisticated?
  2. jcsd
  3. Jul 26, 2015 #2


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    It seems like that should work. The plot you show looks like it is virtually undamped. Is that what you intended? I hope that you are taking into account that the rolling motion of the vehicle makes all the 4 wheels interact with each other.
  4. Jul 27, 2015 #3


    User Avatar
    Gold Member

    shock absorbers are not just springs.

    Perhaps this will help http://www.ijer.in/ijer/publication/v2s7/IJER_2013_712.pdf

    I think for first order effects you can probably assume you are on a unicycle. But, a platform connected to 4 dampened wheels will have a different range of angular motions, not just up and down. But, once you model 1 wheel, modeling 4 and connecting them becomes a less daunting task.

    The human eye (well, the human optical processing system, actually) is very sensitive to motion and acceleration. I expect the unicycle approach will not give you the richness of motion you will want.

    You can maybe experiment with polynomials to generate smoother road tracks and get close to what you want. Maybe the above paper will help.
  5. Jul 27, 2015 #4
    Thanks for your input.

    I think I have trouble with understanding even before damping comes into effect.

    What exactly happens with the spring forces (in terms of hookes law) when the suspension goes over a bump?
    Is the spring simpy compressed by the amount of vertical displacement, or do I have to calculate this in some other way?
  6. Jul 27, 2015 #5


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    If you do the calculation in small time steps (say 1/50 or 1/100 sec), then you can assume that the springs are compressed by the change in surface height. Then you need to calculate the reaction of the vehicle for that small time step. Don't let the spring force get out of hand. Limit it.
  7. Jul 27, 2015 #6


    User Avatar
    Gold Member

    A car has both springs, and shock absorbers. Two different things. Have you ever ridden in a car with no shock absorbers (just springs). It bounces up and down like a boat on waves. The shock absorber dampens that spring oscillation. So, you are talking about a damped system.

    It can be over damped, or under damped.

    This page has exactly what you need to do. You need to read it over and over until it makes sense. Feel free to ask questions as you try to learn it.
    Again, I stress that you cannot model what you want to do with just a spring.


    Notice the system is a spring AND a dampener giving this differential equation, which they then solve.
    They show it for a cart, but that could just as easily be vertical with a car (well, unicycle)


    They then show solutions, notice they changed over to y instead of x. Not sure why y (lol)

    So choose a zeta (dampening) and tau (time constant) and solve away.
    Last edited: Jul 27, 2015
  8. Jul 28, 2015 #7
    Hey, this piqued my curiosity, so I looked at the link they gave, but it didn't totally click, so I found code.
    This was pretty clear to me. You can see the function that defines the "road" is just Math.sin in the loop. If your road surface is a 3D mesh, it shouldn't be too hard to define your wheels as vectors attached to a rectangle, and take samples with the frame rate to determine the displacement in each time frame, and apply the function to the displacements to the rectangle which is the car frame, to get camera displacements.
  9. Jul 28, 2015 #8


    User Avatar
    Gold Member

    When I think about my post, I guess it really isn't an answer. You can use it to determine the response to an impulse, but not much there for continuous displacement as an input. The java script sums the forces. Nice little demo at the end showing how it looks for a sinewave road.
  10. Jul 28, 2015 #9
    Yeah, that's what I couldn't quite figure out when I was reading it, how to model that continuous changes in the road. It would probably be obvious if I had more physics, but I'm still lacking in that department, so I was glad I found that code.
  11. Jul 29, 2015 #10
    Thanks for your input so far, I think I am progressing slowly.

    What I do not yet understand is what happens in terms of forces when the maximum extension or compression of the spring is reached?
    I also have problems with my damping which always results in the spring eventually not moving at all after it has rested once. The excitation is never enough to overcome the damping force, even with large displacements and low damping.

    What I am doing right now (in terms of variables from the link that you provided) is when the suspension "drives" over an elevation that has height floor_height, i simply subtract this from the spring length:
    Code (Javascript):
    spring_length -= floor_height;
  12. Jul 29, 2015 #11
    If you want it like car suspension, there is a maximum extension and compression, at which point, until gravity is introduced, the var should just move along with the road, with no suspension. Later, it should be able to jump when it goes over bumps, in accordance with Newtons laws, but for right now you could just have a min and max distance from the road it can have: So basically, if the suspension grounds out, the car lifts right along with the rough bump, which is what happens, and if it reaches maximum lift, the wheels stick to the road.

    If you have downloaded the code into a web page on your computer and are messing around with it, (let me know if you need help with this) you would go into the code block after /* Move the block. */ , and put it at the end of that block, if its outside the bounds of min or max you decided, set it to min or max, and set the velocity (block.v) to 0 as well, and see what happens when you turn up the velocity of the road..
  13. Jul 29, 2015 #12


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    The motion of the vehicle (position and orientation) caused by forces (springs, gravity, motor, brakes) is calculated from equations of motion. That gives you the motion for one small time step. That gives the position of the attached end of the spring at the end of the time step. So the spring compression is the distance from the ground contact position to the attachment point on the car frame. If the spring is uncompressed, there is no compression force. If it is bottomed out, you should set some maximum force and limit it to that. The new calculated forces allow you to apply esuations of motion for the next time step.
  14. Jul 29, 2015 #13
    Here is what I am currently working with. it is only one spring and one damper, meaning the tires are currently made out of concrete;)

    If you play around with the sliders you can see the behavior, and the function plot looks kinda cool;)
    I am especially unhappy with the way that I handle max and min compression (around line 65), but this approach stopped all weird behavior in these scenarios, so I went with that

    Sorry for the super messy code, I tried a lot of stuff and have not yet cleaned it up properly. I think it is fun to play around with it a bit=)
  15. Jul 31, 2015 #14
    Looks good! It looks like a lot of the fundamentals are there.

    I just checked Unity, to see what they have builtin. They have a strait up AddForce method for rigid bodies, check it out:
    So once you have the basics down there, it looks like the transition to 3D is going to be pretty straitforward if you're using something like Unity. Its just a matter of tracking the forces at each moment, and applying them to the rigid objects. They have a constant force method too:
    So long as it can be changed at each frame, you're fully in business.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook