mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
update docs
This commit is contained in:
@@ -4,11 +4,20 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Model predictive speed and steering control\n",
|
||||
"## Model predictive speed and steering control\n",
|
||||
"\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\n",
|
||||
"\n",
|
||||
"code:\n",
|
||||
"\n",
|
||||
"https://github.com/AtsushiSakai/PythonRobotics/blob/master/PathTracking/model_predictive_speed_and_steer_control/model_predictive_speed_and_steer_control.py\n",
|
||||
"[PythonRobotics/model\\_predictive\\_speed\\_and\\_steer\\_control\\.py at master · AtsushiSakai/PythonRobotics](https://github.com/AtsushiSakai/PythonRobotics/blob/master/PathTracking/model_predictive_speed_and_steer_control/model_predictive_speed_and_steer_control.py)\n",
|
||||
"\n",
|
||||
"This is a path tracking simulation using model predictive control (MPC).\n",
|
||||
"\n",
|
||||
@@ -23,7 +32,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# MPC modeling\n",
|
||||
"### MPC modeling\n",
|
||||
"\n",
|
||||
"State vector is:\n",
|
||||
"$$ z = [x, y, v,\\phi]$$ x: x-position, y:y-position, v:velocity, φ: yaw angle\n",
|
||||
@@ -49,18 +58,31 @@
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"subject to:\n",
|
||||
"\n",
|
||||
"- Linearlied vehicle model\n",
|
||||
"\n",
|
||||
"$$z_{t+1}=Az_t+Bu+C$$\n",
|
||||
"\n",
|
||||
"- Maximum steering speed\n",
|
||||
"\n",
|
||||
"$$|u_{t+1}-u_{t}|<du_{max}$$\n",
|
||||
"\n",
|
||||
"- Maximum steering angle\n",
|
||||
"\n",
|
||||
"$$|u_{t}|<u_{max}$$\n",
|
||||
"\n",
|
||||
"- Initial state\n",
|
||||
"\n",
|
||||
"$$z_0 = z_{0,ob}$$\n",
|
||||
"\n",
|
||||
"- Maximum and minimum speed\n",
|
||||
"\n",
|
||||
"$$v_{min} < v_t < v_{max}$$\n",
|
||||
"\n",
|
||||
"- Maximum and minimum input\n",
|
||||
"$$u_{min} < u_t < u_{max}$$\n"
|
||||
"\n",
|
||||
"$$u_{min} < u_t < u_{max}$$\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -69,14 +91,14 @@
|
||||
"source": [
|
||||
"This is implemented at \n",
|
||||
"\n",
|
||||
"https://github.com/AtsushiSakai/PythonRobotics/blob/f51a73f47cb922a12659f8ce2d544c347a2a8156/PathTracking/model_predictive_speed_and_steer_control/model_predictive_speed_and_steer_control.py#L247-L301"
|
||||
"[PythonRobotics/model\\_predictive\\_speed\\_and\\_steer\\_control\\.py at f51a73f47cb922a12659f8ce2d544c347a2a8156 · AtsushiSakai/PythonRobotics](https://github.com/AtsushiSakai/PythonRobotics/blob/f51a73f47cb922a12659f8ce2d544c347a2a8156/PathTracking/model_predictive_speed_and_steer_control/model_predictive_speed_and_steer_control.py#L247-L301)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Vehicle model linearization\n",
|
||||
"### Vehicle model linearization\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\n",
|
||||
@@ -106,7 +128,7 @@
|
||||
"source": [
|
||||
"where\n",
|
||||
"\n",
|
||||
"\\begin{equation*}\n",
|
||||
"$$\\begin{equation*}\n",
|
||||
"A' =\n",
|
||||
"\\begin{bmatrix}\n",
|
||||
"\\frac{\\partial }{\\partial x}vcos(\\phi) & \n",
|
||||
@@ -134,7 +156,7 @@
|
||||
"0 & 0 & 0 & 0 \\\\\n",
|
||||
"0 & 0 &\\frac{tan(\\bar{\\delta})}{L} & 0 \\\\\n",
|
||||
"\\end{bmatrix}\n",
|
||||
"\\end{equation*}\n",
|
||||
"\\end{equation*}$$\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
@@ -142,7 +164,7 @@
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\\begin{equation*}\n",
|
||||
"$$\\begin{equation*}\n",
|
||||
"B' =\n",
|
||||
"\\begin{bmatrix}\n",
|
||||
"\\frac{\\partial }{\\partial a}vcos(\\phi) &\n",
|
||||
@@ -162,7 +184,7 @@
|
||||
"1 & 0 \\\\\n",
|
||||
"0 & \\frac{\\bar{v}}{Lcos^2(\\bar{\\delta})} \\\\\n",
|
||||
"\\end{bmatrix}\n",
|
||||
"\\end{equation*}\n",
|
||||
"\\end{equation*}$$\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
@@ -190,7 +212,7 @@
|
||||
"\n",
|
||||
"where,\n",
|
||||
"\n",
|
||||
"\\begin{equation*}\n",
|
||||
"$$\\begin{equation*}\n",
|
||||
"A = (I + dtA')\\\\\n",
|
||||
"=\n",
|
||||
"\\begin{bmatrix} \n",
|
||||
@@ -199,14 +221,14 @@
|
||||
"0 & 0 & 1 & 0 \\\\\n",
|
||||
"0 & 0 &\\frac{tan(\\bar{\\delta})}{L}dt & 1 \\\\\n",
|
||||
"\\end{bmatrix}\n",
|
||||
"\\end{equation*}"
|
||||
"\\end{equation*}$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\\begin{equation*}\n",
|
||||
"$$\\begin{equation*}\n",
|
||||
"B = dtB'\\\\\n",
|
||||
"=\n",
|
||||
"\\begin{bmatrix} \n",
|
||||
@@ -215,14 +237,14 @@
|
||||
"dt & 0 \\\\\n",
|
||||
"0 & \\frac{\\bar{v}}{Lcos^2(\\bar{\\delta})}dt \\\\\n",
|
||||
"\\end{bmatrix}\n",
|
||||
"\\end{equation*}"
|
||||
"\\end{equation*}$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"\\begin{equation*}\n",
|
||||
"$$\\begin{equation*}\n",
|
||||
"C = (f(\\bar{z},\\bar{u})-A'\\bar{z}-B'\\bar{u})dt\\\\\n",
|
||||
"= dt(\n",
|
||||
"\\begin{bmatrix} \n",
|
||||
@@ -253,7 +275,7 @@
|
||||
"0\\\\\n",
|
||||
"-\\frac{\\bar{v}\\bar{\\delta}}{Lcos^2(\\bar{\\delta})}dt\\\\\n",
|
||||
"\\end{bmatrix}\n",
|
||||
"\\end{equation*}"
|
||||
"\\end{equation*}$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -262,14 +284,14 @@
|
||||
"source": [
|
||||
"This equation is implemented at \n",
|
||||
"\n",
|
||||
"https://github.com/AtsushiSakai/PythonRobotics/blob/eb6d1cbe6fc90c7be9210bf153b3a04f177cc138/PathTracking/model_predictive_speed_and_steer_control/model_predictive_speed_and_steer_control.py#L80-L102"
|
||||
"[PythonRobotics/model\\_predictive\\_speed\\_and\\_steer\\_control\\.py at eb6d1cbe6fc90c7be9210bf153b3a04f177cc138 · AtsushiSakai/PythonRobotics](https://github.com/AtsushiSakai/PythonRobotics/blob/eb6d1cbe6fc90c7be9210bf153b3a04f177cc138/PathTracking/model_predictive_speed_and_steer_control/model_predictive_speed_and_steer_control.py#L80-L102)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Reference\n",
|
||||
"### Reference\n",
|
||||
"\n",
|
||||
"- [Vehicle Dynamics and Control \\| Rajesh Rajamani \\| Springer](http://www.springer.com/us/book/9781461414322)\n",
|
||||
"\n",
|
||||
@@ -279,7 +301,7 @@
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python [default]",
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
@@ -293,7 +315,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.6.4"
|
||||
"version": "3.6.6"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
Reference in New Issue
Block a user