ME405: Mechatronics
Project Documentation and Portfolio by Neil Patel
controller.Ctrl Class Reference

Public Member Functions

def __init__ (self, k1, k2, k3, k4)
 Initializes the Controller based on calculated gain values. More...
 
def DutyCycle (self, pos, ang, vel, ang_vel)
 Determines the correct duty cycle for the motor to follow the system model. More...
 

Public Attributes

 k1
 
 k2
 
 k3
 
 k4
 

Constructor & Destructor Documentation

◆ __init__()

def controller.Ctrl.__init__ (   self,
  k1,
  k2,
  k3,
  k4 
)

Initializes the Controller based on calculated gain values.

Parameters
k1,k2,k3,k4The constants calculated for the system model
Returns
Returns nothing.

Member Function Documentation

◆ DutyCycle()

def controller.Ctrl.DutyCycle (   self,
  pos,
  ang,
  vel,
  ang_vel 
)

Determines the correct duty cycle for the motor to follow the system model.

Parameters
posThe position of the ball according to the touch panel measurement
angThe angle of the ball according to the encoder measurement
velThe velocity / change in position of the ball
ang_velThe angular velocity / change in angle of the ball
Returns
Returns the calculated Duty Cycle for the appropriate Torque.

The documentation for this class was generated from the following file: