This class implements a controller driver for a motor and flywheel rig.
More...
|
def | __init__ (self, K_p, i_set) |
| Creates a controller driver by initializing the gain and initial setpoint used in closed-loop control. More...
|
|
def | run (self, pos, max_duty) |
| Called repeatedly to run the control algorithm. More...
|
|
def | flag (self) |
| Sets returns a true statement if the error lands within the specified bounds to stop the controller and move to the next value. More...
|
|
def | set_setpoint (self, setpoint) |
| Sets the setpoint. More...
|
|
def | set_gain (self, gain) |
| Sets the proportional gain. More...
|
|
|
| K_p |
| Proportional Gain.
|
|
| i_set |
| Initial setpoint.
|
|
| error |
| Error, difference between the current position and initial setpoint.
|
|
This class implements a controller driver for a motor and flywheel rig.
◆ __init__()
def controller_agena_chiu.ControllerDriver.__init__ |
( |
|
self, |
|
|
|
K_p, |
|
|
|
i_set |
|
) |
| |
Creates a controller driver by initializing the gain and initial setpoint used in closed-loop control.
- Parameters
-
K_p | The initial proportional gain for the controller. |
i_set | The initial setpoint for the controller. |
◆ flag()
def controller_agena_chiu.ControllerDriver.flag |
( |
|
self | ) |
|
Sets returns a true statement if the error lands within the specified bounds to stop the controller and move to the next value.
- Returns
- flag returns a true statement if error is within the bounds.
◆ run()
def controller_agena_chiu.ControllerDriver.run |
( |
|
self, |
|
|
|
pos, |
|
|
|
max_duty |
|
) |
| |
Called repeatedly to run the control algorithm.
- Parameters
-
pos | Current position of the encoder. |
- Returns
- duty Duty cycle to set the motor.
◆ set_gain()
def controller_agena_chiu.ControllerDriver.set_gain |
( |
|
self, |
|
|
|
gain |
|
) |
| |
Sets the proportional gain.
- Parameters
-
gain | The new proportional gain used for the controller. |
◆ set_setpoint()
def controller_agena_chiu.ControllerDriver.set_setpoint |
( |
|
self, |
|
|
|
setpoint |
|
) |
| |
Sets the setpoint.
- Parameters
-
setpoint | The new setpoint used for the controller. |
The documentation for this class was generated from the following file: