Kinematic and Dynamic Bicycle Models#3
Open
vvrs wants to merge 5 commits into
Open
Conversation
Implement the two vehicle models from Kong et al. (IEEE IV 2015): - KinematicBicycle: 4-state model [x, y, psi, v] with inputs [delta_f, a]. No tire model, valid at all speeds. - DynamicBicycle: 6-state model [vx, vy, psi, psi_dot, X, Y] with linear tire forces. Low-speed slip angle guard. Also adds: - BicycleParameters / DynamicBicycleParameters dataclasses - BicycleConstraints with Table II bounds from the paper - hyundai_azera() factory for the paper's test vehicle - Example notebook comparing both models (step steer) - Pin pathsim>=0.20 - 30 tests passing Ref: Kong, Pfeiffer, Schildbach, Borrelli, IEEE IV, 2015
- Use explicit 2-DOF lateral-yaw state-space form (A*x + B*u) instead of computing intermediate slip angles/forces which caused nonlinear divergence through Coriolis coupling - Remove dvx = psi_dot*vy term (constant-speed assumption) - Adjust C_af/C_ar to total axle stiffness convention (1/m not 2/m) - Balance front/rear stiffness: C_af=126kN/rad, C_ar=80kN/rad - Add double lane change example (examples/example_lane_change.py) - 30 tests passing
- Point README and pyproject.toml URLs to github.com/vvrs/pathsim-vehicle - Fix steering profile: use 2 sine cycles for proper double lane change (move to adjacent lane and return, net-zero lateral displacement) - Extend simulation to 7s for full maneuver + settling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds kinematic and dynamic bicycle vehicle models based on Kong, Pfeiffer, Schildbach, and Borrelli, "Kinematic and Dynamic Vehicle Models for Autonomous Driving Control Design", IEEE IV, 2015.
What's included
Blocks
KinematicBicycle4-state model[x, y, ψ, v]with inputs[δ_f, a]. No tire model required, valid at all speeds including zero.DynamicBicycle6-state model[vx, vy, ψ, ψ̇, X, Y]using the standard linear 2-DOF lateral-yaw state-space formulation. Captures tire slip effects absent from the kinematic model.Parameters
BicycleParameters(l_f, l_r) andDynamicBicycleParameters(adds m, I_z, C_af, C_ar)hyundai_azera()factory for the paper's test vehicleConstraints
BicycleConstraintsdataclass with Table II bounds (steering angle/rate, acceleration/jerk)clip_steering()andclip_acceleration()utility functionsExample
examples/example_lane_change.py— double lane change maneuver comparing both models at 15 m/s with a 2×2 plot grid (trajectory, heading, steering input, lateral displacement)Tests
30 tests covering parameters, constraints, and both models (ODE RHS verification + full PathSim integration tests).
Dependencies
pathsim>=0.20pathsim.blocks.dynsys.DynamicalSystem, following the same pattern aspathsim-chem's CSTR blockLane change Example in Pathview