Lucas Murray ME 305 Portfolio
|
A closed loop feedback object that calculates error in velocity. More...
Public Member Functions | |
def | __init__ (self, controlParameters, delta) |
Initializes and returns a closed loop object. More... | |
def | update (self, controlParameters, delta) |
Updates the feedback error found by the closed loop control. More... | |
def | setGain (self) |
A currently unused function that would set the gain value for the proportional control. More... | |
Public Attributes | |
actualVel | |
propGain | |
motorDuty | |
A closed loop feedback object that calculates error in velocity.
Objects of this class can find the error in the current velocity when compared to an arbitrary desired velocity when paired with a proportional gain coefficient.
def closedLoopControl.ClosedLoop.__init__ | ( | self, | |
controlParameters, | |||
delta | |||
) |
Initializes and returns a closed loop object.
controlParameters | A shared variable that contains the reference velocity and proportional gain |
delta | A shared variable that contains the change in position of the motor, updated every 10ms |
def closedLoopControl.ClosedLoop.setGain | ( | self | ) |
A currently unused function that would set the gain value for the proportional control.
Instead of using this function, we found it easier to use a shared variable that contains the gain as the gain is reference in the user Task which never instantiates a closed loop object
def closedLoopControl.ClosedLoop.update | ( | self, | |
controlParameters, | |||
delta | |||
) |
Updates the feedback error found by the closed loop control.
controlParameters | A shared variable that contains the reference velocity and proportional gain |
delta | A shared variable that contains the change in position of the motor, updated every 10ms |