From be2c95845a7998a3b2a035b36c536ac27da59d63 Mon Sep 17 00:00:00 2001 From: "John U. Balis" Date: Fri, 23 Jun 2023 04:00:38 -0400 Subject: [PATCH] small fixes to tutorial formatting --- .../dataset_creation/point_maze_dataset.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/tutorials/dataset_creation/point_maze_dataset.py b/docs/tutorials/dataset_creation/point_maze_dataset.py index 1962d413..1d94d27c 100644 --- a/docs/tutorials/dataset_creation/point_maze_dataset.py +++ b/docs/tutorials/dataset_creation/point_maze_dataset.py @@ -59,7 +59,7 @@ # {(5, 1): (4, 1), (4, 1): (4, 2), (4, 2): (3, 2), (3, 2): (2, 2), (2, 2): (2, 1), (2, 1): (1, 1)} # # The keys of this dictionary are the current state of the agent and the values the next state of the wapoint path. -# +# UP = 0 DOWN = 1 @@ -160,6 +160,7 @@ def _check_valid_cell(self, cell): else: return True + # %% # Waypoint Controller # ~~~~~~~~~~~~~~~~~~~ @@ -167,8 +168,9 @@ def _check_valid_cell(self, cell): # D4RL uses a PD controller to output continuous force actions from position and velocity. # A PD controller is a variation of the PID controller often used in classical Control Theory. # PID combines three components Proportial Term(P), Integral Term(I) and Derivative Term (D) +# # 1. Proportial Term(P) -# ~~~~~~~~~~~~~~~~~~~ +# ------------------- # The proportional term in a PID controller adjusts the control action based on the current error, # which is the difference between the desired value (setpoint) and the current value of the process variable. # The control action is directly proportional to the error. A higher error results in a stronger control action. @@ -179,8 +181,8 @@ def _check_valid_cell(self, cell): # \tau = k_{p}(Error) # # 2. Derivative Term (D) -# ~~~~~~~~~~~~~~~~~~~ -#The derivative term in a PD controller considers the rate of change of the error over time. +# ------------------- +# The derivative term in a PD controller considers the rate of change of the error over time. # It helps to predict the future behavior of the error. By dampening the control action based # on the rate of change of the error, the derivative term contributes to system stability and reduces overshooting. # It also helps the system respond quickly to changes in the error. @@ -196,20 +198,20 @@ def _check_valid_cell(self, cell): # \tau = k_{p}(Error) + k_{d}(d(Error) / dt) # # 3. Integral Term (I) -# ~~~~~~~~~~~~~~~~~~~ -#The integral term in a PID controller integrates the cumulative error over time. +# ------------------- +# The integral term in a PID controller integrates the cumulative error over time. # It helps to address steady-state errors or biases that may exist in the system. # The integral term continuously adjusts the control action based on the accumulated error, # aiming to eliminate any long-term deviations between the desired setpoint and the actual process variable. # references. # # .. math :: -# \tau = k_{I}\(\int\)(Error) dt +# \tau = k_{I}(\int)(Error) dt # # Finally for a PID controller we have the equation below # # .. math :: -# \tau = k_{p}(Error) + k_{d}(d(Error) / dt) + k_{I}\(\int\) Error dt +# \tau = k_{p}(Error) + k_{d}(d(Error) / dt) + k_{I}(\int) Error dt # # In the PID controller formula, Kp, Ki, and Kd are the respective gains for the proportional, integral, and derivative terms. # These gains determine the influence of each term on the control action.