[结论版]带空气阻力的抛射体飞行运动轨迹

带空气阻力的抛射体飞行运动轨迹

Write By Champrin From 2022-11-20 To 2022-11-
GUET Evolution Team Visual Group

在低速情况下,常用的空气阻力模型有两种:

  1. 空气阻力与速度的一次方成正比
  2. 空气阻力与速度的二次方成正比

论文《两种空气阻力模型的抛射体飞行轨迹研究 闵永林 陈池》指出:

  • 物体的速度低于\(200m/s\)时,可认为阻力与物体速度大小的平方成正比
  • 物体速度远小于低速炮弹(\(300m/s\))时,采用第一种模型;物体速度接近于低速炮弹时,采用第二种模型

对于42mm弹丸和飞镖的初射速都低于这两个值,因此对于文章中指出的,两种模型是否都能采用,需要进行验证采用哪种模型效果更好

在上赛季英雄视觉代码中,建立的是对42mm弹丸忽略了竖直方向上的空气阻力的方程,这或许对短距离来说影响不大,但是若要英雄进行远距离吊射,以及用于飞镖视觉当中,需要更高的准确性,需要建立更精确和更细致的方程


空气阻力与速度的一次方成正比

由牛顿第二定律:

\[\begin{aligned} ma_x & = - kv\cos{\theta} \\ ma_y & = - (mg + kv\sin{\theta}) \end{aligned} \]

也即:

\[\begin{aligned} m\frac{d^2x}{d^2t} & = - k\frac{dx}{dt} \\ m\frac{d^2y}{d^2t} & = -mg - k\frac{dy}{dt} \end{aligned} \]

也即:

\[ m\frac{dv_x}{dt} = - kv_x \tag{1} \]

\[ m\frac{dv_y}{dt} = -mg - kv_y \tag{2} \]

速度与位移方程

\(\text{(1)}\text{(2)}\)式分离变量,且两边同时积分,
又有\(v_x > 0\),且当 \(t = 0,\, v_x = v_0\cos{\theta},\, v_y = v_0\sin{\theta}\)
可得:

\[ v_x = v_0\cos{\theta} \cdot e^{- \frac{k}{m}t} \tag{3} \]

\[ v_y = (\frac{mg}{k} + v_0\sin{\theta})e^{-\frac{k}{m}t} - \frac{mg}{k} \tag{4} \]

对于\(v_x,v_y\),有:

\[\begin{aligned} v_x & = \frac{dx}{dt} \\ v_y & = \frac{dy}{dt} \end{aligned} \]

\(\text{(3)}\text{(4)}\)式分离变量,且两边同时积分,
且当 \(t = 0,\, x = x_0,\, y = y_0\)
可得:

\[ x = x_0 + \frac{mv_0\cos{\theta}}{k}(1 - e^{- \frac{k}{m}t}) \tag{5} \]

\[ y = y_0 + \frac{m}{k}(\frac{mg}{k} + v_0\sin{\theta})(1 -e^{-\frac{k}{m}t}) - \frac{mg}{k}t \qquad \tag{6} \]

轨迹方程

\(\text{(5)}\)式可得:

\[ 1 - e^{- \frac{k}{m}t} = \frac{k(x - x_0)}{mv_0\cos{\theta}} \tag{7} \]

\[ t = - \frac{m}{k}\ln(1 - \frac{k(x - x_0)}{mv_0\cos{\theta}}) \tag{8} \]

联立\(\text{(6)}\text{(7)}\text{(8)}\)式,消去\(t\),可得轨迹方程:

\[ y = y_0 + (\frac{mg}{kv_0\cos{\theta}} + \tan{\theta})(x - x_0) + \frac{m^2g}{k^2}\ln(1 - \frac{k(x - x_0)}{mv_0\cos{\theta}}) \tag{9} \]

\(v_y = 0\),由式\((3)\)可得抛射体到达最高点的时间:

\[t = -\frac{m}{k}\ln{(\cfrac{mg}{mg + kv_0\sin{\theta}})} \]

落回初始高度所需时间\(t\)

\(y = y_0\)为初始高度,那么令\(\text{(6)}\)式中\(y = y_0\)得:

\[ y_0 = y_0 + \frac{m}{k}(\frac{mg}{k} + v_0\sin{\theta})(1 -e^{-\frac{k}{m}t}) - \frac{mg}{k}t \\ \]

\[ gt = (\frac{mg}{k} + v_0\sin{\theta})(1 - e^{-\frac{k}{m}t})\tag{10} \]

可见,这是一个超越方程,无法直接求出\(t\),那么可以想到展开\(e^{-\frac{k}{m}t}\)

展开\(e^{-\frac{k}{m}t}\)
\(t = 0\)处,把\(e^{-\frac{k}{m}t}\)展开成\(t\)的幂级数:
第一步:

\[f(0) = 1 ,f'(0) = (-\frac{k}{m})^1 ,f''(0) = (-\frac{k}{m})> ^2, ... ,f^{(n)}(0) = (-\frac{k}{m})^n \]

第二步:

\[ f(0) + f'(0)t + \frac{f''(0)}{2!}t^2 + ... + \frac{f^{(n)} (0)}{n!}t^n + ... \]

得级数:

\[ 1 + (-\frac{k}{m})t + \frac{(-\frac{k}{m})^2}{2!}t^2 > + ... + \frac{(-\frac{k}{m})^n}{n!}t^n + ... \]

\[ \sum_{n=0}^{\infty}\frac{(-\frac{k}{m})^n}{n!}t^n \]

求此级数收敛半径:

\[ \rho = \lim_{n \Rightarrow \infty} \lvert \frac{a_{n + 1}}{a_n} \rvert = \lim_{n \Rightarrow \infty} \lvert \frac{\frac{(-\frac{k}{m})^{n+1}}{(n+1)!}}{\frac{(-\frac{k}{m})^n}{n!}} \rvert = \lim_{n \Rightarrow \infty} \lvert -\frac{k}{m(n + 1)} \rvert = 0 \]

因此,收敛半径\(R\)

\[ R = + \infty \]

进而利用余项\(R_n(t)\)的表达式,求得当\(t \in (-R, R)\)内时,余项\(R_n(t)\)的极限为0
因此:

\[ e^{-\frac{k}{m}t} = \sum_{n=0}^{\infty}\frac{(-\frac{k}{m})^n}{n!}t^n \qquad (-\infty \lt t \lt +\infty) \]

取展开式的二次项:

\[ e^{-\frac{k}{m}t} \approx 1 - \frac{k}{m}t + \frac{1}{2}(\frac{k}{m})^2t^2 \tag{11} \]

联立\(\text{(10)}\text{(11)}\)式,得:

\[ t = \frac{2mv_0\sin{\theta}}{mg + kv_0\sin{\theta}} \qquad \tag{12} \]

最大射程及其对应\(\theta\)

\(\text{(11)}\text{(12)}\)式带入\(\text{(4)}\),得:

\[ x = x_0 + \frac{m^2gv^2_0\sin{2\theta}}{(mg + kv_0\sin{\theta})^2} \tag{13} \]

要求最大射程,即求\(x\)的最大值,对\(\text{(13)}\)式利用求导法:\(\frac{dx}{d\theta} = 0\),求得\(x\)的最大值,及其对应\(\theta\)

\[ 2mgv^2_0\cos^2\theta + b\cos\theta - mgv^2_0 = 0 \tag{14} \]


空气阻力与速度的二次方成正比

运动至最高点过程

由牛顿第二定律:

\[\begin{aligned} ma_x & = - kv^2_x \\ ma_y & = - (mg + kv^2_y) \end{aligned} \]

也即:

\[ m\frac{dv_x}{dt} = - kv^2_x \tag{2.1} \]

\[ m\frac{dv_y}{dt} = -mg - kv^2_y \tag{2.2} \]

速度与位移方程

\((2.1)(2.2)\)式分离变量,且两边同时积分,
且当 \(t = 0,\, v_x = v_0\cos{\theta},\, v_y = v_0\sin{\theta}\)
可得:

\[ v_x = \frac{mv_0\cos{\theta}}{m + ktv_0\cos{\theta}} \tag{2.3} \]

\[ v_y = \frac{mg\tan(-\frac{t\sqrt{mgk}}{m}) + v_0\sin{\theta}\sqrt{mgk}}{\sqrt{mgk} - kv_0\sin{\theta}\tan(-\frac{t\sqrt{mgk}}{m})} \tag{2.4.1} \]

\[ v_y = \sqrt{\frac{mg}{k}}\tan(-t\sqrt{\frac{gk}{m}} + \arctan(v_0\sin{\theta}\sqrt{\frac{k}{mg}})) \tag{2.4.2} \]

对于\(v_x,v_y\),有:

\[\begin{aligned} v_x & = \frac{dx}{dt} \\ v_y & = \frac{dy}{dt} \end{aligned} \]

\(\text{(3)}\text{(4)}\)式分离变量,且两边同时积分,
且当 \(t = 0,\, x = x_0,\, y = y_0\)
可得:

\[ x = \frac{m}{k}\ln(1 + \frac{ktv_0\cos{\theta}}{m}) + x_0 \tag{2.5} \]

\[ y = \frac{m}{k}\ln(\frac{kv_0\sin{\theta}\sin{\frac{t\sqrt{mgk}}{m}} }{\sqrt{mgk}} + \cos{\frac{t\sqrt{mgk}}{m}}) + y_0 \tag{2.6.1} \]

\[ y = \frac{m}{k}\ln|\frac{\cos(t\sqrt{\frac{gk}{m}} - \arctan(v_0\sin{\theta}\sqrt{\frac{k}{mg}}))}{\cos(\arctan(v_0\sin{\theta}\sqrt{\frac{k}{mg}}))}| + y_0 \tag{2.6.2} \]

轨迹方程

\((2.5)\)可得:

\[ t = \frac{m}{kv_0\cos{\theta}}(e^{\frac{k}{m}(x - x_0)} - 1) \]

消去\(t\),可得轨迹方程:

\[ y = \frac{m}{k}\ln(\frac{kv_0\sin{\theta}\sin{\frac{\frac{m}{kv_0\cos{\theta}}(e^{\frac{k}{m}(x - x_0)} - 1)\sqrt{mgk}}{m}} }{\sqrt{mgk}} + \cos{\frac{\frac{m}{kv_0\cos{\theta}}(e^{\frac{k}{m}(x - x_0)} - 1)\sqrt{mgk}}{m}}) + y_0 \tag{2.7.1} \]

\[ y = \frac{m}{k}\ln|\frac{\cos(\frac{m}{kv_0\cos{\theta}}(e^{\frac{k}{m}(x - x_0)} - 1)\sqrt{\frac{gk}{m}} - \arctan(v_0\sin{\theta}\sqrt{\frac{k}{mg}}))}{\cos(\arctan(v_0\sin{\theta}\sqrt{\frac{k}{mg}}))}| + y_0 \tag{2.7.2} \]

抛射体上升到最大高度

\(v_y = 0\),抛射体上升到最大高度\(y_{max}\),由\((2.4.2)\)可得:

\[ t = \sqrt{\frac{m}{gk}}\arctan(v_0\sin{\theta}\sqrt{\frac{k}{mg}}) \]

即抛射体上升到最大高度所需时间

\[ t_m = \sqrt{\frac{m}{gk}}\arctan(v_0\sin{\theta}\sqrt{\frac{k}{mg}}) \tag{2.8} \]

再代入由\(\text{(6.2)}\)可得:

\[\begin{aligned} & 因为\arctan x \in (-\pi/2,\pi/2) \\ y_{max} & = \frac{m}{k}\ln\frac{1}{\cos(\arctan(v_0\sin{\theta}\sqrt{\frac{k}{mg}}))} + y_0 \\ \end{aligned} \]

\(c = \arctan(v_0\sin{\theta}\sqrt{\frac{k}{mg}})\),那么\(\tan c = v_0\sin{\theta}\sqrt{\frac{k}{mg}}\)

\[ 1 + \tan^2 c = 1 + (v_0\sin{\theta}\sqrt{\frac{k}{mg}})^2 = \frac{1}{\cos^2c} \\ \Rightarrow \frac{1}{\cos(\arctan(v_0\sin{\theta}\sqrt{\frac{k}{mg}}))} = \sqrt{1 + (v_0\sin{\theta}\sqrt{\frac{k}{mg}})^2} \]

\[ y_m = \frac{m}{k}\ln\frac{1}{\cos(\arctan(v_0\sin{\theta}\sqrt{\frac{k}{mg}}))} + y_0 \]

\[ y_m = \frac{m}{k}\ln\sqrt{1 + (v_0\sin{\theta}\sqrt{\frac{k}{mg}})^2} + y_0 \tag{2.9} \]

由最高点下降过程

\(v_{y_2} < 0\)

由牛顿第二定律:

\[\begin{aligned} ma_{x_2} & = - kv^2_{x_2} \\ ma_{y_2} & = - mg + kv^2_{y_2} \end{aligned} \]

也即:

\[ m\frac{dv_{x_2}}{dt} = - kv^2_{x_2} \tag{3.1}\\ \]

\[ m\frac{dv_{y_2}}{dt} = -mg + kv^2_{y_2} \tag{3.2} \\ \]

在最高点时,由\((3)(9)\)式,可得抛射体速度:

\[ v_{0x_2} = \cfrac{mv_0\cos{\theta}}{m + k\sqrt{\cfrac{m}{gk}}\arctan(v_0\sin{\theta}\sqrt{\cfrac{k}{mg}})v_0\cos{\theta}} \\ v_{0y_2} = 0 \]

速度与位移方程

\((3.1)(3.2)\)式分离变量,且两边同时积分,
且当 \(t = t_m,\, v_{x_2} = v_{0x_2},\, v_{y_2} = 0\)
可得:

\[ v_{x_2} = \frac{mv_0\cos{\theta}}{m + ktv_0\cos{\theta}} \tag{3.3} \]

\[ v_y = -\sqrt{\frac{mg}{k}}\tanh{(\sqrt{\frac{k}{mg}}g(t-t_m))} \tag{3.4} \]

对于\(v_x,v_y\),有:

\[\begin{aligned} v_x & = \frac{dx}{dt} \\ v_y & = \frac{dy}{dt} \end{aligned} \]

\((3.3)(3.4)\)式分离变量,且两边同时积分,
且当 \(t = t_m,\, x = x_m,\, y = y_m\)
可得:

\[ x = \frac{m}{k}\ln(1 + \frac{ktv_0\cos{\theta}}{m}) + x_0 \tag{3.5} \]

\[ y = y_m -\frac{m}{k}\ln\coth(\sqrt{\frac{k}{mg}}g(t-t_m)) \tag{3.6} \]

轨迹方程

消去t

\[ y = y_m -\frac{m}{k}\ln\coth(\sqrt{\frac{k}{mg}}g(\frac{m}{kv_0\cos{\theta}}(e^{\frac{k}{m}(x - x_0)} - 1)-t_m)) \tag{3.7} \]

\[ y = \frac{m}{k}\ln\sqrt{1 + (v_0\sin{\theta}\sqrt{\frac{k}{mg}})^2} + y_0 -\frac{m}{k}\ln\coth(\sqrt{\frac{k}{mg}}g(\frac{m}{kv_0\cos{\theta}}(e^{\frac{k}{m}(x - x_0)} - 1)- \sqrt{\frac{m}{gk}}\arctan(v_0\sin{\theta}\sqrt{\frac{k}{mg}}))) \tag{3.8} \]


运用至英雄吊射或飞镖视觉

  1. 视觉识别装甲板或其他方法定位装甲板,得到装甲板坐标\((x_0, y_0)\)

  2. 云台枪口移至装甲板正中心

  3. 以此时云台pitch轴为y轴,枪口朝向为x轴建立坐标系

  4. 将装甲板坐标转换至该坐标系

  5. 已知初始射速\(v_0\),目标装甲板坐标\((x_0, y_0)\)
    使\((2.7.2)和(3.8)\)都是非线性方程,只能用数值求解的方式,使用牛顿迭代法求得数值解\(\theta\),这个解,即为解得pitch轴所需的转角

    • 吊射前哨站,不需要使42mm弹丸做完整抛物线运动,即不需要使其运动至最高点才能击中前哨站,利用\((2.7.2)\)式,解得\(\theta\)
    • 吊射基地,这个距离下需要使42mm弹丸运动至最高点才能击中基地,那么就需要\((2.8)\)式,解得\(\theta\)

    同时需要寻找一个角度,在弹道稳定的情况下,在初射速存在波动的情况下也能命中目标TODO


posted @ 2023-08-19 20:29  Champrin  阅读(537)  评论(2编辑  收藏  举报