MPC自行车模型

对于车辆横向模型预测控制来说, 建立一个合适的车辆模型是非常重要的, 尤其对于高速情况下的自动驾驶, 如果我们不使用基于模型的控制(Model-free lateral Control)或者预测模型不够准确的话, 车辆对于目标航向角度会特别敏感, 车辆特别容易来回正弦抖动.

自行车运动学模型(Kinematic Bicycle Model)

运动学模型不考虑车辆的受力情况, 运动学模型只根据系统的几何关系. 并且我们假设轮胎没有滑移, 并且前轮和后轮的速度都位于车辆纵轴方向.
x˙=vcos(ψ+β)y˙=vsin(ψ+β)ψ˙=vcos(β)lr+lftan(δf) \dot{x}=v\cos(\psi + \beta) \\ \dot{y}=v\sin(\psi + \beta) \\ \dot{\psi} = \dfrac{v\cos(\beta)}{l_{r}+l_{f}}\tan(\delta_{f})
状态变量一共有三个z=[x,y,ψ]Tz=[x, y, \psi]^{T}, 输入变量为u=[vx,δf]u=[v_{x}, \delta_{f}]
各个变量的说明如下

变量名称 含义
x inertial X coordinate of CoM
y inertial Y coordinate of CoM
ψ\psi global heading angle
vxv_{x} longitudinal velocity of the vehicle at CoM
vyv_{y} lateral velocity of the vehicle at CoM
vv velocity of the vehicle at CoM, v=vx2+vy2v=\sqrt{v_{x}^{2}+v_{y}^{2}}
δf\delta_{f} steering angle of the front wheel
lfl_{f} distance from the CoM to the rear axle
lfl_{f} distance from the CoM to the front axle
β\beta side slip angle at CoM, β=tan1(lrlr+lftan(δf))vyvx\beta = \tan^{-1}(\dfrac{l_{r}}{l_{r} + l_{f}}\tan(\delta_{f}))\approx \dfrac{v_{y}}{v_{x}}

MPC自行车模型

自行车动力学模型(Dynamic Bicycle Model)

假设车辆纵向速度变化较慢, 前轮转角不大并且使用线性轮胎模型, 我们可以使用如下动力学模型去预测车辆的状态
v˙x=wzvy+axv˙y=Cfm(δfvy+lfωzvx)+Crm(vylrωzvx)ωzvxωz˙=lfCfIz(δfvy+lfωzvx)lrCrIz(vylrωzvx)x˙=vxcos(ψ)vysin(ψ)y˙=vxsin(ψ)+vycos(ψ)ψ˙=ωz \dot{v}_{x} = w_{z}v_{y}+a_{x} \\ \dot{v}_{y}=\dfrac{C_{f}}{m}(\delta_{f} - \dfrac{v_{y}+l_{f}\omega_{z}}{v_{x}}) + \dfrac{C_{r}}{m}(-\dfrac{v_{y}-l_{r}\omega_{z}}{v_{x}})-\omega_{z}v_{x}\\ \dot{\omega_{z}}=\dfrac{l_{f}C_{f}}{I_{z}}(\delta_{f} - \dfrac{v_{y} + l_{f}\omega_{z}}{v_{x}})-\dfrac{l_{r}C_{r}}{I_{z}}(-\dfrac{v_{y}-l_{r}\omega_{z}}{v_{x}}) \\ \dot{x}=v_{x}\cos({\psi}) - v_{y}\sin(\psi) \\ \dot{y}=v_{x}\sin(\psi)+v_{y}\cos(\psi) \\ \dot{\psi} = \omega_{z}
一共有6个状态量z=[vx, vy, ωz, x, y, ψ]Tz=[v_{x}, ~v_{y}, ~\omega_{z},~x,~y, ~\psi]^{T}, 输入量为u=[ax,δf]Tu=[a_{x}, \delta_{f}]^{T}
各个变量的说明如下

变量名称 含义
x inertial X coordinate of CoM
y inertial Y coordinate of CoM
ψ\psi global heading angle
vxv_{x} longitudinal velocity of the vehicle
δf\delta_{f} steering angle of the front wheel
lfl_{f} distance from the CoM to the rear axle
lfl_{f} distance from the CoM to the front axle
m vehicle mass
ωz\omega_{z} yaw rate
CrC_{r} rear tire cornering stiffness
CfC_{f} front tire cornering stiffness
IzI_{z} yaw moment of inertia