mechmotum / bicycle-kickplate-model

Nonlinear and linear bicycle model that includes realistic tires and a kickplate perturbation input.
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Implement nonlinear tire model #13

Closed moorepants closed 2 months ago

moorepants commented 6 months ago

A general nonlinear tire model takes the lateral slip angle, camber angle, and normal force as inputs and outputs the lateral force.

$$ F_y = f(\alpha, \gamma, F_z) $$

If the tires are modeled as rigid, then the normal force between ground and wheel is a noncontributing force. This means you get equations that look like

$$ \begin{bmatrix} M & c \ c & 1 \end{bmatrix} \begin{bmatrix} \dot{\bar{u}} \ F_z \end{bmatrix} = \begin{bmatrix} F(F_y) \ f \end{bmatrix} $$

I currently solve the above system numerically at each time step. So that creates a circular dependency for F_y(F_z) but F_z depends on known F_y if you want to implement an arbitrary nonlinear function for F_y.

We could solve the system symbolically and it would give $F_z(\bar{x})$ which you can replace in the first equation and that gives F_y as a pure function of state. This will make for some nasty long equations with chances of divide by zero.

A second option is to introduce a vertical tire compliance and a new state to track this spring deformation. Then F_z = k*x and F_z is no longer a noncontributing force.

I guess a third option would be to iteratively solve the above to equations to home in on the value of F_z and F_y that satisfy both equations.

moorepants commented 6 months ago

Comment from the code:

# We need to solve the dynamic equations and the auxiliary equations
# simultaneously to avoid having to solve the dynamic equations first and then
# substitute in the derivatives of the speeds. So reconstruct the equations of
# motion to this form:
# [Mp  0,  0, -Mf]*[up ] = [F     ]
# [0, Cf,  0,  Cz] [fyp]   [-Fy   ]
# [0,  0, Df,  Dz] [mzp]   [-Mz   ]
# [Ap, 0,  0,  Af] [fz ]   [-B_aux]

The dynamical equations end up depending on fz in this formulation and are not decoupled from the noncontributing force equations like in https://moorepants.github.io/learn-multibody-dynamics/noncontributing.html#augmented-dynamical-differential-equations

I forget why that is the case.

moorepants commented 2 months ago

Nonlinear model functions at a minimum level in #15.