ME305Lab
|
Impleneted closed loop control of the motor.
This code reads input from a quadrature incremental encoder. There is a user interface (taskUser.py) which allows the user to control the encoder to perform several functions. It also prints out a description of what the functions are and how to execute them. The file taskEncoder.py acts as an interface between the UI file and the encoder driver (encoder.py), calling methods from the encoder and passing them to the UI to print. The driver file sets up an encoder class and creates the methods used by the other files. Additionally, this code includes a closed-loop proportional controller which can be set up using user inputs from the user interface.
This graph shows the data collected for the motor when inputing a reference velocity of 100 rad/s and a proportional gain of Kp = 1.
Source Folder [https://bitbucket.org/ruodolfr/me305_lab/src/master/Lab4/] Demo Video [Link]