The Physics of Suspensions Using Computer Simulation
The Physics of Suspensions Using Computer Simulation
Introduction
Vehicles have changed dramatically over the last century, and will continue to change as long as transportation remains a vital part of the economy. However, the road remains the same. As streets heat and cool on a daily basis, cracks and holes start to develop. Vehicles have to account for this imperfect surface and so suspension systems for vehicles must be state-of-the-art in order to protect the vehicles payload. While suspension systems have gotten better at handling rough surfaces, the principles behind them remain the same. Car suspensions can be simplified to a mass-spring system, from which important properties can be derived with Newtonian mechanics. My project seeks to understand the physics behind car suspensions through the creation of a computer simulation. This simulation will allow the user to modify different properties of the suspension, so they can perform experiments and determine the best possible suspension for each scenario.
2
2.1
Theory
Springs and Hookes Law
A suspension is at its most basic level, a mass-spring system. This system is governed by Hookes Law, which states that Fspring = -k x. This means that the force that the spring 1
pushes or pulls with is k in kg/s2 called the spring constant, times the displacement x in meters. Springs resist changes in displacement, so they are ideal for suspensions where cars will be going up and down. This is what will be used to model a spring in the simulation.
2.2
Viscous Damping
While springs resist changes in displacement, dampers resist changes in velocity. Since dampers try to return to 0 velocity, they are good for preventing a car from continuously bouncing up and down after a big bump. Damping in harmonic motion is like friction in linear motion. In car suspensions, this damping is in the form of a dashpot. This dashpot resists motion by means of viscous friction. In a perfect world set in a vacuum, if a spring was set in motion, it would continue bouncing forever. However, due to some amount of damping caused by the friction of the metal, there will always be some amount of damping. In this project, it would be difficult to model the internal friction of the spring, so friction of this type was modeled by the damping equation, Fdamping = -b v. This equation is similar to the spring constant, where b represents the damping coefficient and v represents the current velocity. The negative sign signifies that the damping force will act opposite to the velocity. In the simulator, the shock absorbers will be represented by this model.
2.3
Resonant Frequency
object can vibrate wildly out of control. For our system, the effects of resonant frequencies through forced vibration can cause a couple different effects to occur. For this example, a spring-mass-damper system will be vibrated through external motion. If this external frequency is less than the resonant frequency, the mass will generally move with the external motion. If the external frequency is near the resonant frequency, the mass will move much farther than the original external motion, but will also be 90 degrees out of phase with the external motion.
The spring-mass system previously mentioned has the ability to oscillate, forming a harmonic oscillator. This system has a resonant frequency, otherwise known as a natural frequency. This frequency is the lowest frequency of the waveform created by the spring. Given the spring constant and mass of the system, one can calculate the natural frequency such that fnatural = (1/2) * (k/m). By moving an object externally at this frequency, the
2.4
Car Suspensions
Car suspensions are very complex systems, but as described above there are a few main components. The first is the frame, which is what supports all of the cars structural 2
components. This frame is then supported by the suspension. Next, there is the suspension system itself. This contains a series of springs, dampers, and other adjusting components to lessen shock and maintain tire contact. Third, there is the steering system which connects to the front wheels and guides the cars direction. Finally, there are the tires/wheels that provide traction and keep the car in motion. Within the suspension system, there are springs, dampers, and anti-sway bars. The Figure 1: Basic Car Suspension most common type of spring is the coil spring, which is what is often used as the standard spring in physics. Next, there are leaf springs, torsion bars, and air springs, all of which are not nearly as popular as the coil spring, nor are as simple to model. Apart from the springs, there are shock absorbers, also known as dashpots. These come in different designs, but the most common is a twin-tube shock absorber, as seen at right. This works to slow down the spring because it is essentially an oil pump that is placed between the frame and the wheel. It is called a twin-tube shock absorber because there are two tubes, one inner tube, located at the wheel, and an outer tube, located at the frame. When the car goes over a bump, the hydraulic fluid (usually oil) pushes up on the piston. Conversely, the piston moves downward and compresses the fluid. Due to the pressure, this takes a great amount of force, so the kinetic energy from the spring is transferred to the shock absorbers, thereby slowing down the motion of the spring. After the bump is crossed, the extension cycle releases the pressure by having the piston Figure 2: Shock Absorber push down on the fluid, making the piston itself go up. In modern suspensions, the shock absorbers are velocity-sensitive, which means that the faster the suspension moves, the more resistance the shock absorber provides. 3
Finally, there are the anti-sway bars which give the car additional stability. It prevents the vehicle from swaying (hence the name) from side-to-side if the two sides of the suspension are not equally balanced. All modern vehicles include anti-sway bars, which often help cars round tight corners without tipping over from excess vibration. For this simulation, a few assumptions will be made. First, we will only look at the car from a two-dimensional perspective, so anti-sway bars will not be needed. Secondly, dashpots will be modeled as simple dampers. Third, we will assume that the tires are rigid and will transfer all energy to the springs and dampers. Because we are trying to keep the simulation simple, these are important assumptions to make. Future complexities may be added as needed.
3
3.1
Procedure
Development Intro
For this simulation, the programming language Java will be utilized. Java has been selected for its usability in creating scientific simulations, as well as the high amount of support material it provides. The development environment on which the simulation will be built will be an Ubuntu Linux machine, using the NetBeans IDE 7.3. This will ensure crossplatform support and easy debugging.
3.2
Figure 3: Calculation Engine Components First, all of the basic theories need to be modeled in code. To do this, a Java class was created for each component of the suspension. The classes and their purposes are listed in 4
Figure 3. Using these components, a theoretical model of the car was able to be simulated. This model was used to perform calculations for the simple car described in Section 3.3.
3.3
With the calculation engine complete, the next major step was to create a Car class that utilized the calculation engine to simulate a real car and model the movement of it. There was only one class for this step, and the various functions for the Car class are explained in Figure 4. Function Name Purpose Car(array(properties)) Creates a new car getCoords() Get the current coordinates of the car thrust(int component, Apply a force to a double x, double y) component of the car run() Start the simulation reset(bool fullReset) Re-initialize the car pause() Pause time Figure 4: Car Class Functions Using these methods, we now had a ready-to-use car. The car was first initialized with the Car() method, setting the properties to the ones defined from the interface. After all the necessary properties were defined, the simulation would run via the run() method. It would continue to run until either paused or reset. Next came the challenge: displaying this car in the applet. Returns null double x, double y null null Car float time
3.4
Now that the car was coded, the final step is to display the model, as well as the current energies in graph form. First, the interface for the simulation was designed. The goal of this was to keep it easy-to-use and simple, but also incorporate lots of customizability for the user. This was done with the user interface builder in NetBeans. There would be multiple textboxes where the user could enter various number values, a few checkboxes to show/hide components of the interface, and some selectboxes for the user to select from multiple variations. The interface of the applet is shown in Figure 5.
As shown, the position graph is displayed in the left half of the applet, and the car is displayed in the right half. The car is made up of different Java2D graphics, which are a rectangle, two circles for wheels, two black lines for the shock absorbers, and the two red lines for the springs. The dimensions of these graphics are sent to the Car class, where the values will be input into Figure 5: Simulation Interface the calculation engine for later use. The various options in the control panel at the bottom half of the interface shows multiple properties. The elasticity is how elastic the rigid parts of the car are, which will be needed when the car hits a wall. The thrust refers to how much thrust is emitted when the arrow keys are pressed. Other properties are fairly self-explanatory, which can be experimented with at will. To create the graphs on the left in Figure 5, the cars velocity, position, and any movement of the springs was recorded and put into the calculation engine to find the current kinetic, potential, and any other energy. There are multiple ways to solve differential equations in order to determine the energies; where the Runge Kutta 4 method is selected is the current method. The calculation engine determines the current position of the car, and that position is used to set the position/rotation of the individual graphics. The user is able to move the car by moving either the base, or the left or right wheels. This is the project itself, a simulator that models a real car suspension. You can access it at http://iit.io/phys/ as of June 10th, 2013.
Conclusion
This project was very ambitious from the beginning, and of course had many challenges along the way. Initially, I thought I would be able to create a full-fledged suspension simulator. As I dove more into my research, I realized just how unfeasible that would be. So instead, I decided to simplify things greatly and make a 2D representation with just two wheels. It was much less advanced, but it demonstrated the concepts. Additionally, one of the greatest challenges was figuring out how to connect all the different components together. I had a bunch of different physics models that had been coded, but at the time I 6
had no idea how to make one talk to the other. Thankfully, I was able to get some advice from a couple websites and ended up building a mini-API to get and send simulation data. Without this, I would still just have a Spring class and a couple variables. Working on this project alone, it required lots of extra work on my part to make sure all my calculations were accurate. I had taken AP Physics C: Mechanics last year, so I remembered a little bit of spring mechanics involving damping (after doing some review problems and research) which has helped me greatly in being able to accomplish this project. I was able to apply my knowledge of these concepts to the real world, which is something I value greatly. I now know all the different types of suspensions and how they work. Most importantly, I now know that if one were to optimize a car suspension, the variables they would want to optimize are spring stiffness, damping, and mass distribution. By changing these variables, this will lead to the least excessive motion when a vehicle goes over a bump. If I get the chance to expand this in the future, my goals for improving the simulation would be to have the track customizable, so it does not go over a flat surface but rather real bumps in the road. Additionally, I did not get a chance to create a scoring method yet, so in the next iteration I want to get a start on that. Concluding, I think that this project turned out very well given the time constraints. I learned a lot about mechanics throughout AP Physics B, and I enjoyed using this project to show off my knowledge. Hopefully I can use this paper as practice for writing college lab reports!
References
[1] Dubson, M., & Perkins, K. (n.d.). Masses & Springs - Mass, Springs, Force - PhET. PhET: Free online physics, chemistry, biology, earth science and math simulations. Retrieved May 20, 2013, from http://phet.colorado.edu/en/simulation/mass-springlab [2] Harris, W. (n.d.). How Car Suspensions Work. HowStuffWorks "Auto". Retrieved June 11, 2013, from http://auto.howstuffworks.com/car-suspension.htm [3] Kanber, B. (n.d.). Physics in Javascript: Car Suspension - Part 1 (Spring, Mass, Damper) | Burak Kanber's Blog. Burak Kanber, Engineer. Retrieved May 20, 2013, from http://burakkanber.com/blog/physics-in-javascript-car-suspension-part-1spring-mass-damper/ [4] Longhurst, C. (n.d.). Car Bibles : The Car Suspension Bible page 1 of 5. The Car Maintenance Bibles. Retrieved May 20, 2013, from http://www.carbibles.com/suspension_bible.html 7