|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This interactive simulation demonstrates the Quarter Car Model, the fundamental model for analyzing vehicle suspension systems. It shows how a car's suspension isolates the body from road disturbances using springs and dampers. What is the Quarter Car Model?The quarter car model represents one corner of a vehicle as a 2-DOF (degree of freedom) mass-spring-damper system:
The Equations of MotionThe system is governed by Newton's Second Law applied to each mass:
Sprung Mass (Car Body):
Ms · ÿs = -ks(ys - yus) - cs(ẏs - ẏus)
The body is pushed by suspension spring and damper forces.
Unsprung Mass (Wheel):
Mus · ÿus = ks(ys - yus) + cs(ẏs - ẏus) - kt(yus - yr)
The wheel feels suspension forces AND tire spring force from road.
State-Space RepresentationFor numerical simulation, we convert to first-order ODEs:
State Vector: x = [ys, ẏs, yus, ẏus]T
Derivatives: ẏs = vs v̇s = [-ks(ys - yus) - cs(vs - vus)] / Ms ẏus = vus v̇us = [ks(ys - yus) + cs(vs - vus) - kt(yus - yr)] / Mus How Road Surface Enters the System: Base ExcitationThe road surface is NOT applied as a direct external force. Instead, it enters through the tire spring as a kinematic (base) excitation:
The Tire Spring Model:
┌─────────┐
│ M_s │ Car Body (Sprung Mass)
└────┬────┘
│ k_s, c_s (Suspension Spring + Damper)
┌────┴────┐
│ M_us │ Wheel (Unsprung Mass)
└────┬────┘
│ k_t (Tire Spring) ← Road enters HERE!
═════╧═════════ y_r = Road Height (prescribed input)
The tire force is calculated as:
Ftire = kt × (yus - yr)
Why Base Excitation Instead of Direct Force?
Base excitation is realistic because we know the road's geometry (height profile), not the force. The tire's deflection determines the actual force transferred to the wheel. This also allows modeling tire compliance — softer tires absorb more bumps!
Energy Flow Path:
Road Profile (yr)
↓ Tire Spring (kt) converts displacement → force ↓ Wheel (Mus) receives force, moves ↓ Suspension (ks, cs) filters and dampens ↓ Body (Ms) feels smoothed motion Note: yr(t) is a prescribed input, not a degree of freedom. The system has only 2 DOF (ys and yus); the road acts as a time-varying boundary condition. Why RK4 Integration?Spring-damper systems are stiff - simple Euler integration causes numerical instability (the simulation "explodes"). We use Runge-Kutta 4th Order (RK4) for stability:
Damping and Ride QualityThe damping ratio (ζ) determines how the system responds to disturbances:
Critical Damping: ccr = 2√(ks · Ms)
Damping Ratio: ζ = cs / ccr
Engineering Goal: Most cars target ζ ≈ 0.2-0.4 (under-damped) for comfort, while sports cars use ζ ≈ 0.5-0.7 for better control. Natural FrequencyThe undamped natural frequency determines how fast the system oscillates:
fn = (1/2π) · √(ks / Ms) Hz
🚗 Vehicle Preset⚖️ Mass
Sprung Mass (Ms)
300kg
Unsprung Mass (Mus)
40kg
🔧 Suspension
Spring Stiffness (ks)
20.0kN/m
Damping (cs)
1500N·s/m
Tire Stiffness (kt)
150kN/m
Damping Status
Critical
ζ = 0.61 | fn = 1.3 Hz
🛣️ Road Surface
Vehicle Speed
1m/s
Road Type
📊 State
Body Pos
0.0 cm
Wheel Pos
0.0 cm
Body Vel
0.0 cm/s
Wheel Vel
0.0 cm/s
📈 Position vs Time
● Body
● Wheel
● Road
Displacement vs Accel
● Body
● Wheel
Velocity vs Accel
● Body
● Wheel
Body:
Msÿs = -ksΔy - csΔẏ
Wheel:
Musÿus = ksΔy + csΔẏ - kt(yus-yr)
Δy = ys - yus
Δẏ = ẏs - ẏus
Car Body (Ms)
Wheel (Mus)
Spring (ks)
Damper (cs)
Road Input (yr)
Usage Instructions
Vehicle Presets
Road Surface Types
Key Experiments
Engineering Insights
Visual Synchronization: The "Treadmill" ModelThis simulation uses a "treadmill" coordinate system to visualize car dynamics:
Key Concept: The car doesn't move horizontally on screen. Instead, the road scrolls underneath it — just like running on a treadmill!
The Red Dot (●): This marker shows exactly where the physics engine samples the road height. When you see the car "jump," it's because a bump has reached the red dot — the physics detected the bump at that exact moment!
Synchronization Math:
tireScreenX = canvas pixel where wheel appears road.position = world distance traveled (meters) For any canvas pixel 'px': worldMeter = road.position + (px - tireScreenX) / pixelsPerMeter At tireScreenX: worldMeter = road.position (exact match!) This coordinate system ensures that what you see is what the physics calculates — the visual bump and the physics bump are perfectly aligned. RK4 Integration AlgorithmThe simulation uses 4th-order Runge-Kutta integration:
k1 = f(t, y)
k2 = f(t + h/2, y + h·k1/2) k3 = f(t + h/2, y + h·k2/2) k4 = f(t + h, y + h·k3) yn+1 = yn + (h/6)·(k1 + 2k2 + 2k3 + k4) This provides O(h⁴) accuracy and excellent stability for oscillatory systems. Phase Space PlotsThe simulation displays two phase space plots that reveal the system's dynamic behavior:
Analytical Acceleration: To ensure smooth phase plots, acceleration is calculated directly from forces (F/m) rather than differentiating velocity numerically:
Body Acceleration:
as = (-ks·Δy - cs·Δv) / Ms Wheel Acceleration: aus = (ks·Δy + cs·Δv - kt·(yus - yr)) / Mus A light moving average filter is applied to the wheel acceleration for visualization (window=5) to smooth high-frequency noise without affecting the physics. Step-by-Step ControlsThe simulation supports stepping forward and backward through time:
State history is automatically saved every 3 frames to enable backward stepping without excessive memory usage. Real-World Applications
Extensions Beyond Quarter Car
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||