Skip to content

Commit

Permalink
Updates and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AnesBenmerzoug committed May 8, 2024
1 parent a77692f commit 9b3932a
Show file tree
Hide file tree
Showing 13 changed files with 1,242 additions and 1,978 deletions.
3 changes: 3 additions & 0 deletions notebooks/_static/images/20_optimality_principle_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 28 additions & 12 deletions notebooks/nb_10_introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 8,
"metadata": {
"editable": true,
"init_cell": true,
Expand All @@ -23,7 +23,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 9,
"metadata": {
"init_cell": true,
"scene__Default Scene": true,
Expand Down Expand Up @@ -201,7 +201,7 @@
"<IPython.core.display.HTML object>"
]
},
"execution_count": 2,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -513,9 +513,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/html": [
"<iframe width=\"800\" height=\"480\" src=\"https://www.youtube.com/embed/-cdXw1MyTUA?si=S3DXY90f8QEPFddI\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen></iframe>\n"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%html\n",
"<iframe width=\"800\" height=\"480\" src=\"https://www.youtube.com/embed/-cdXw1MyTUA?si=S3DXY90f8QEPFddI\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen></iframe>"
Expand Down Expand Up @@ -746,7 +759,12 @@
"source": [
"# Optimal Control\n",
"\n",
"Optimal control theory is a branch of control theory that deals with finding a control for a dynamical system over a period of time such that an objective function is optimized. The fundamental idea in optimal control is to formulate the goal of control as the long-term optimization of a scalar cost function as opposed to formulating the objective as direct constraints on the system's behaviour (e.g. overshoot) as done in classical control.\n",
"Optimal control theory is a branch of control theory that emerged an independent field emerged in the 1950s. It deals with finding a control for a dynamical system over a period of time such that an objective function is optimized. The fundamental idea in optimal control is to formulate the goal of control as the long-term optimization of a scalar cost function as opposed to formulating the objective as direct constraints on the system's behaviour (e.g. overshoot) as done in classical control.\n",
"\n",
"Optimal control is one of the most useful systematic methods for controller design. It has several advantages:\n",
"- It gives a systematic approach to the solution of control problems.\n",
"- There are normally many possible solutions to a control problem. Some are good, others are poor.\n",
" Optimal control reduces this redundancy by selecting a controller that isoptimalbest according to some cost function.\n",
"\n",
"The optimal control problem is to find a control $u^* \\in \\mathbf{U}$ which causes the system $\\dot{x}(t) = f(x(t), u(t))$ to follow a trajectory $x^* \\in \\mathbf{X}$ that minimizes the cost (performance measure)."
]
Expand Down Expand Up @@ -802,11 +820,9 @@
"- Infinite Horizon:\n",
"\n",
" $$\n",
" J(x_0, u) = \\sum \\limits_{k = 0}^{\\infty} \\gamma^k c_k(x_k, u_k)\n",
" J(x_0, u) = \\sum \\limits_{k = 0}^{\\infty} c_k(x_k, u_k)\n",
" $$\n",
"\n",
" Where $0 < \\gamma \\le 1$ is a discount factor.\n",
"\n",
"- Stochastic finite horizon:\n",
"\n",
" $$\n",
Expand Down Expand Up @@ -855,10 +871,10 @@
"Optimal control problems solving methods can be classified in three main families:\n",
"Dynamic Programming (DP), Indirect Methods based on calculus of variation and Direct Methods.\n",
"\n",
"- DP is helpful where the number of states is limited and the dynamics are known. It divides an optimal control issue into smaller subproblems and recursively solves each.\n",
"- DP is helpful where the number of states is limited and the dynamics are known. It divides an optimal control problem into smaller subproblems and recursively solves each one of them.\n",
"\n",
"- Indirect methods rely on Pontryagin’s Minimum Principle (PMP) to derive the necessary conditions\n",
" for optimality. This method uses the Hamiltonian of the system to reduce the global optimal control problem\n",
"- Indirect methods rely on Pontryagin’s Minimum Principle (PMP) to derive the necessary conditions for optimality.\n",
" This method uses the Hamiltonian of the system to reduce the global optimal control problem\n",
" to the solution of a system of $2N$ equations given in the form of a two-point boundary value problem (BVP). \n",
" Problems involving continuous states and control inputs benefit most from it.\n",
"\n",
Expand Down
Loading

0 comments on commit 9b3932a

Please sign in to comment.