Skip to content

Commit

Permalink
Fix format for params in docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
m-lundberg committed Oct 8, 2018
1 parent 27277e0 commit e4c24a5
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions simple_pid/PID.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,18 @@ def __init__(self,
:param Kd: The value for the derivative gain Kd
:param setpoint: The initial setpoint that the PID will try to achieve
:param sample_time: The time in seconds which the controller should wait before generating a new output value.
The PID works best when it is constantly called (eg. during a loop), but with a sample time set so that the
time difference between each update is (close to) constant. If set to None, the PID will compute a new output
value every time it is called.
:param output_limits: The initial output limits to use, given as an iterable with 2 elements, for
example: (lower, upper). The output will never go below the lower limit or above the upper limit. Either of
the limits can also be set to None to have no limit in that direction. Setting output limits also avoids
integral windup, since the integral term will never be allowed to grow outside of the limits.
The PID works best when it is constantly called (eg. during a loop), but with a sample
time set so that the time difference between each update is (close to) constant. If set to
None, the PID will compute a new output value every time it is called.
:param output_limits: The initial output limits to use, given as an iterable with 2 elements, for example:
(lower, upper). The output will never go below the lower limit or above the upper limit.
Either of the limits can also be set to None to have no limit in that direction. Setting
output limits also avoids integral windup, since the integral term will never be allowed
to grow outside of the limits.
:param auto_mode: Whether the controller should be enabled (in auto mode) or not (in manual mode)
:param proportional_on_measurement: Whether the proportional term should be calculated on the input directly
rather than on the error (which is the traditional way). Using proportional-on-measurement avoids overshoot
for some types of systems.
rather than on the error (which is the traditional way). Using
proportional-on-measurement avoids overshoot for some types of systems.
"""
self.Kp, self.Ki, self.Kd = Kp, Ki, Kd
self.setpoint = setpoint
Expand Down

0 comments on commit e4c24a5

Please sign in to comment.