ME 305 Group 6 Documentation
Functions
taskController_05.py File Reference

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...
 

Detailed Description

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.

Author
Caleb Savard
Chris Linthacum
Date
February 17, 2022

Function Documentation

◆ taskControllerFcn_05()

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.

Parameters
taskNameTask name label for debugging purposes.
periodPeriod to run taskControllerFcn
input_signalShared variable to store controller input signal. In this case the actual encoder velocity.
target_valShared variable to store the target value for encoder velocity.
prop_gainShared variable to store the controller proportional gain value.
cont_enableShared variable to store a boolean whether to enable or disable the controller.
target_dutyShared variable to point to the duty cycle to be affected by the controller.