Our dynamics model takes in state and control input and outputs
the next state after a given timestep. We make a Markov assumption that the future state depends only on the current state and control input.
Given x=xyψv and u=[δτmotor]Define the dynamics function f such that: xnext=f(x,u,Δt)where xnext=xnextynextψnextvnext
We use a modified bicycle model that introduces a couple of assumptions:
There is no lateral slip on the tires.
Between model timesteps, the car moves in approximately uniform circular motion.
There is no longitudinal slip on the tires.
The angular inertia of the wheels is negligible compared to the inertia of the car and the torque being applied.
This assumption holds true unless the car is cornering very fast.
We will refer to the assumptions as [1], [2], [3] and [4].
During cornering, the car is modeled as such:
From [1], both tires move parallel to themselves with no sideway slip. Thus, given solely by the steering angle,
the turning radius and center should be calculable.
However, as speed increases, the car understeers more. The steering wheel needs to be turned more to achieve the same
turning radius. This is a consequence of our slipless assumption.
We characterize this with a tunable parameter called the understeer gradient κ, and define the
kinematic steering angle δ^=1+κvδ, which is used to determine turning
radius and center.
Calculate the slip angle α, which is the angle between the car’s velocity vector and the car’s body.
We calculate the higher order terms of xnext first - speed.
From [2], the car’s velocity is perpendicular to the turning axis. Thus, to find δv, we need to find the
net force on the car in the direction of v.
τfront and τrear are derived from τmotor, gear ratio and drive mode.Because of [3] and [4], all torque goes into force on the wheelsFfront=Rτfront and Frear=RτrearFnet=Ffrontcos(δ−α)+Frearcos(α)−Fdragδv=mFnetΔtvnext=∣v+δv∣, since the car can’t go backwards(negative torque is regenerative braking)
Actual steering angle is used here since that determines the direction of the forces.
Over the model timestep, the average speed vˉ=2v+vnext. Use this to recalculate δ^,r,α.
Angular speed ω=rvˉ, and because of [2], dtdψ=ω.
Thus, the new yaw angle ψnext=ψ+ωΔt.
Finally, calculate the new position of the car. Because of [2], instead of extrapolating vˉ into the future,
we can find its position by moving it along the circular path.
We use rrear instead of r because the car body is perpendicular not to the turning axis, but the line
connecting the rear wheel to the center of the turning circle.