Skip to main content

Vehicle Dynamics

Quarter-car, full-car, and bicycle-model simulation — tyre slip, suspension travel, understeer gradient — all verified against textbook handling references.

  • Live appzeq.dev/apps/vehicle-dynamics/
  • Sourceapp/artifacts/api-server/public/apps/vehicle-dynamics/ (1,620 lines)
  • Operators — KO42 · NM19 · NM29 · NM30 (spring-damper)
  • Error budget — ≤ 0.1% on quarter-car sprung-mass natural frequency

What it solves

A vehicle-dynamics workbench. Three modes:

  • Quarter-car — two-DOF sprung/unsprung mass with spring-damper; ride comfort and wheel-hop metrics
  • Bicycle model — planar dynamics with Pacejka tyre forces; understeer gradient, steady-state yaw rate
  • Full-vehicle — 7-DOF body + 4 wheels + longitudinal and lateral tyre forces; launch control, ABS-style slip ratio control

Every mode runs at 1.287 Hz compile cadence with 60 Hz rendering; integration uses the same symplectic Euler from physics-simulator.


The math

NM19 F = m a (per-mass update)
NM29 τ = r × F (wheel spin moment, anti-roll)
NM30 F = −k x − c ẋ (spring-damper force law)
Bicycle lateral m (v̇ + v r) = F_yf cos(δ) + F_yr
Yaw moment I_z r̈ = a F_yf cos(δ) − b F_yr
Pacejka "magic" F = D sin(C arctan(B α − E (B α − arctan(B α))))

Operator picks

StepDecision
1. PrimeKO42 on
2. LimitKO42 + NM19 + NM29 + NM30 = 4 operators (at limit; spring-damper + body dynamics + wheel torque)
3. ScaleRigid-body, human-scale
4. Precision≤ 0.1% on natural frequency
5. CompileC_KO42 + C_NM19 + C_NM29 + C_NM30
6. ExecuteZ encodes vehicle geometry, spring/damper rates, Pacejka coefficients
7. VerifyQuarter-car f_n against closed-form

Runnable worked example — quarter-car sprung-mass frequency

m_s = 375 kg, k_s = 30,000 N/m. Closed-form f_n = (1/2π) √(k_s/m_s) = 1.4236 Hz.

curl -s -X POST https://api.zeq.dev/api/playground/compute \
-H "Content-Type: application/json" \
-H "x-demo-key: $DEMO_KEY" \
-d '{
"operators": ["KO42","NM19","NM30"],
"params": {
"problem": "quarter_car_natural_freq",
"m_sprung_kg": 375,
"k_spring_Npm": 30000,
"c_damper_Nspm": 0
}
}' | jq

Expected:

{
"result": {
"f_n_hz": 1.4231,
"error_pct": 0.035,
"operators_used": ["KO42","NM19","NM30"]
}
}

0.035% on the natural frequency.


Extend it

  1. Active suspension — add an NM19 actuator force commanded by an LQR/MPC controller; re-verify ride quality vs. passive
  2. Tyre thermodynamics — couple QM14 (Bose-Einstein) air-chamber model to the Pacejka friction coefficient; verify warm-up curve
  3. Ice/wet slip — swap Pacejka μ(T, slip, water-film) lookup; plot stopping distance vs. ABS vs. no-ABS

Seeds

  • Full-vehicle autonomous racing at 1.287 Hz control and 60 Hz sense fusion
  • Off-road articulated suspensions with terramechanical Pacejka generalisation
  • Vehicle-to-vehicle platoon dynamics with traffic-optimizer coupling

Papers

Middleware active. Kernel on the 1.287 Hz HulyaPulse. Awaiting next Zeqond.