math - 给定位移和离散时间的恒定减速度的最大可停止速度
问题描述
我想知道,我可以行走的最大速度是多少,并且能够通过以速度 0 达到位移 0 来制动。
我需要一个适用于离散时间的方程。
我如何更新和移动身体?
一、速度更新
二、位置更新:NewPosition = LastPosition + Velocity
因此,例如,预期结果表如下:
MaxStoppableVelocity ( Displacement = 0m, Deceleration = -2m/s² ) should be 2m/s
MaxStoppableVelocity ( Displacement = 1m, Deceleration = -2m/s² ) should be 3m/s
MaxStoppableVelocity ( Displacement = 2m, Deceleration = -2m/s² ) should be 4m/s
MaxStoppableVelocity ( Displacement = 3m, Deceleration = -2m/s² ) should be 4.5m/s
MaxStoppableVelocity ( Displacement = 4m, Deceleration = -2m/s² ) should be 5m/s
MaxStoppableVelocity ( Displacement = 5m, Deceleration = -2m/s² ) should be 5.5m/s
MaxStoppableVelocity ( Displacement = 6m, Deceleration = -2m/s² ) should be 6m/s
MaxStoppableVelocity ( Displacement = 7m, Deceleration = -2m/s² ) should be 6.33m/s
MaxStoppableVelocity ( Displacement = 8m, Deceleration = -2m/s² ) should be 6.66m/s
MaxStoppableVelocity ( Displacement = 9m, Deceleration = -2m/s² ) should be 7m/s
MaxStoppableVelocity ( Displacement = 10m, Deceleration = -2m/s² ) should be 7.33m/s
MaxStoppableVelocity ( Displacement = 11m, Deceleration = -2m/s² ) should be 7.66m/s
MaxStoppableVelocity ( Displacement = 12m, Deceleration = -2m/s² ) should be 8m/s
MaxStoppableVelocity ( Displacement = 13m, Deceleration = -2m/s² ) should be 8.25m/s
MaxStoppableVelocity ( Displacement = 14m, Deceleration = -2m/s² ) should be 8.5m/s
MaxStoppableVelocity ( Displacement = 15m, Deceleration = -2m/s² ) should be 8.75m/s
MaxStoppableVelocity ( Displacement = 16m, Deceleration = -2m/s² ) should be 9m/s
MaxStoppableVelocity ( Displacement = 17m, Deceleration = -2m/s² ) should be 9.25m/s
MaxStoppableVelocity ( Displacement = 18m, Deceleration = -2m/s² ) should be 9.5m/s
MaxStoppableVelocity ( Displacement = 19m, Deceleration = -2m/s² ) should be 9.75m/s
MaxStoppableVelocity ( Displacement = 20m, Deceleration = -2m/s² ) should be 10m/s
表中的所有这些数据都是使用我所做的模拟测试的,但我想找到一个给出这些值的方程。
请记住,我的模拟时间是离散的,因此连续时间方程将不起作用。
如果您有任何问题,请告诉我,提前谢谢
解决方案
让我们考虑及时逆转的问题。
假设您有模拟的 dt-time 步长并且它是恒定的。假设总迭代次数为 N。假设当前迭代为 i。A - 加速度,D - 位移,V - 速度
因此
V[i] = (i+1) * A * dt
D[N] = D = SUM (V[i] * dt) From i = 0 To N-1
D = (N-1)^2 / 2 * dt^2 * A
N = sqrt(2* D / A) / dt + 1
但 N - 1 是整数,因此四舍五入
N = floor(sqrt(2D/A)/dt + 1)
所以
V = floor(sqrt(2D/A)/dt + 1) * A * dt
如果你不知道 dt 的值,你可以从你的例子中找到
推荐阅读
- ios - 在地图 Swift 上选择注释时坐标为零
- omnet++ - 关于开关的 Omnet++ 模拟
- r - bookdown 到 html_document2 中的数字列表
- php - 图片路径未上传到数据库php codeigniter
- android - android 的 AES 加密问题 - 使用 react-native-crypto-js 包进行开发与发布构建
- google-sheets - 登录后的 ImportXML 功能
- c# - 从 StandardOutput.ReadToEnd 获取整个输出时遇到问题
- python-3.x - 使用 PySpark 在读取时过滤镶木地板文件
- react-native - React native 在异步函数上不显示错误
- python - 使用 struct 和 char* 从 python 取回数据的 Ctypes