ME 305 Group 6 Documentation
|
Sets up and calls the closed loop controller class. More...
Functions | |
def | taskController_05.taskControllerFcn_05 (str taskName, int period, shares_05.Share_05 euler_angles, shares_05.Share_05 angular_velocities, shares_05.Share_05 roll_target_pos, shares_05.Share_05 roll_target_deriv, shares_05.Share_05 pitch_target_pos, shares_05.Share_05 pitch_target_deriv, shares_05.Share_05 prop_gain, shares_05.Share_05 deriv_gain, shares_05.Share_05 cont_enable, shares_05.Share_05 roll_target_duty, shares_05.Share_05 pitch_target_duty) |
Sets up and calls the closed loop controller class. More... | |
Sets up and calls the closed loop controller class.
Configures a proportional controller object and continuously updates the controller output value and assigns to the proper motor duty cycle.
def taskController_05.taskControllerFcn_05 | ( | str | taskName, |
int | period, | ||
shares_05.Share_05 | euler_angles, | ||
shares_05.Share_05 | angular_velocities, | ||
shares_05.Share_05 | roll_target_pos, | ||
shares_05.Share_05 | roll_target_deriv, | ||
shares_05.Share_05 | pitch_target_pos, | ||
shares_05.Share_05 | pitch_target_deriv, | ||
shares_05.Share_05 | prop_gain, | ||
shares_05.Share_05 | deriv_gain, | ||
shares_05.Share_05 | cont_enable, | ||
shares_05.Share_05 | roll_target_duty, | ||
shares_05.Share_05 | pitch_target_duty | ||
) |
Sets up and calls the closed loop controller class.
Every period, this task resets the Kp using set_Kp and updates the controller. Saturation limits are set to 100 and -100.
taskName | Task name label for debugging purposes. |
period | Period to run taskControllerFcn |
input_signal | Shared variable to store controller input signal. In this case the actual encoder velocity. |
target_val | Shared variable to store the target value for encoder velocity. |
prop_gain | Shared variable to store the controller proportional gain value. |
cont_enable | Shared variable to store a boolean whether to enable or disable the controller. |
target_duty | Shared variable to point to the duty cycle to be affected by the controller. |