Vehicle Dynamics
Vehicle dynamics tells us how our Vehicle States change over time as we apply different inputs.
A good introduction is this lecture: F1TENTH L06  Vehicle States, Vehicle Dynamics and Map Representations, accompanying slides can be found here.
Fundamental papers
 Impacts of Model Fidelity on Trajectory Optimization for Autonomous Vehicles in Extreme Maneuvers
 Modeling and Control for Dynamic Drifting Trajectories
Vehicle Dynamics Models
Listed by increasing accuracy (but also increasing number of parameters)
 Single Track Model
 Linear Single Track Model
 Kinematic Single Track Model
 Nonlinear Single Track Model
 Double Track Model
 MultiBody Simulation
 Finite Elements Simulation
Single track model follows Ackermann Steering, this is probably what I am going to work on.
Use from CommonRoad Vehicle Dynamics package (Python), this is what F1TENTH gym uses as they say here: https://f1tenthgym.readthedocs.io/en/latest/customized_usage.html
Single Track Model
Can look at this. https://kktse.github.io/jekyll/update/2018/09/18/singletrackbicycle.html
State variables $[x,y,θ,v,ω]$
 $x$: Longitudinal position
 $y$: Lateral position
 $θ$: Yaw angle
 $v$: Velocity
 $ω$: Yaw rate
Control Variables $[a,δ]$
 $a$: Acceleration
 $δ$: Steering angle
From Treys Paper
Notes from Modeling and Control for Dynamic Drifting Trajectories
Parameters
 Mass $m$
 Yaw Moment of Inertia $I_{z}$
 Distance from CG to Front Axle $a$
 Distance from CG to Rear Axle $b$
 Total Wheelbase $L$
 Height of CG
 affine parameters
 etc.
Rear axle force:
 When we talk about forces acting on a turning axle, we’re referring to the interaction between the tires (which are in contact with the ground) and the road surface, NOT forces directly acting on the axle shaft itself
Variables (these capture Vehicle State)
 to write
For the optimization, the state vector is $x=[r,V,β,s,e,Δφ,ω_{R},ΔF_{z},δ,τ]_{T}$ and input vector is $u=[˙δ,τ˙]_{T}$.
The state vector and control vectors are slight modified to the following

Notice that this basically says that velocity is ignored

$k_{r}$, $k_{β}$, these are handtuned gains
Practical tips
 Relatively large costs are put on tracking the desired path (ke) and desired sideslip angle (kβ). A small cost on rear wheelspeed (kωR ) encourages the controller to operate close to the equilibrium wheelspeed and use steering for any small corrections, while kΔφ improves damping in the lateral path tracking state.
 very small cost on yaw rate (kr) aids in convergence time of the nonlinear optimization, while not overly restricting the controller’s ability to use yaw rate to generate sideslip angle.
 Costs on actuator Slew Rate (k_\dot{δ} and k_\dot{τ}) help ensure a smooth closedloop response.
 They using the control input as part of the cost that is minimized, to force control inputs to not be super jerky
 If this was not part of the cost, I think it would be fine, but might be jerky
Then the minimization is the following
$k_{term}$ is a scalar that adjusts the weight of the terminal state cost in the objective function