A closed loop speed control used in conjuction with the motor and encoder drivers. More...
Public Member Functions | |
| def | __init__ (self, sat_max, sat_min, L, state_vect, gain) |
| Constructs a controller object that computes an actuation value based on reference and measured values. More... | |
| def | run (self) |
| Uses state vector values and gain values to compute torque to compute actuation value L. | |
| def | get__Kp (self) |
| Returns gain value for modification. | |
| def | set__Kp (self, Kp) |
| Sets modified gain value. | |
Public Attributes | |
| sat_max | |
| Variable used to define maximum saturation limit for the PWM level. More... | |
| sat_min | |
| Variable used to define minimum saturation limit for the PWM level. More... | |
| L | |
| Variable used to define actuation level for motor 1. More... | |
| gain | |
| Variable used to define proportional gain value. More... | |
| state_vect | |
| Variable used to define state vectors. More... | |
| state_vect_array | |
| Variable used to define the array for state vectors. More... | |
| Torque | |
| Variable used to define the torque calculated. More... | |
| Kp | |
| Kp represents the proportional gain value. More... | |
A closed loop speed control used in conjuction with the motor and encoder drivers.
Objects of this class can be used to control and monitor motor speed
| def closedloop.ClosedLoop.__init__ | ( | self, | |
| sat_max, | |||
| sat_min, | |||
| L, | |||
| state_vect, | |||
| gain | |||
| ) |
Constructs a controller object that computes an actuation value based on reference and measured values.
This class uses gains and position and angle data to compute an actuation value.
| sat_max | Variable used to define maximum saturation limit for the PWM level used for motor speed |
| sat_min | Variable used to define minimum saturation limit for the PWM level used for motor speed |
| L | Variable used to define actuation level @state_vect Variable used to define state vectors |
| gain | Variable used to define proportional gain value |
| closedloop.ClosedLoop.gain |
Variable used to define proportional gain value.
This value is the proportional gain inputted by the user.
| closedloop.ClosedLoop.Kp |
Kp represents the proportional gain value.
This value is used for modification
| closedloop.ClosedLoop.L |
Variable used to define actuation level for motor 1.
This value is calculated using gain, position data, and angle data
| closedloop.ClosedLoop.sat_max |
Variable used to define maximum saturation limit for the PWM level.
This value is set to ensure the motor does not fall below a maximum PWM level
| closedloop.ClosedLoop.sat_min |
Variable used to define minimum saturation limit for the PWM level.
This value is set to ensure the motor does not fall below a minimum PWM level
| closedloop.ClosedLoop.state_vect |
Variable used to define state vectors.
This array is filled with data in the following order: [position, velocity, angle, angular velocity]
| closedloop.ClosedLoop.state_vect_array |
Variable used to define the array for state vectors.
This array will be filled with state vector data read from the touch panel and IMU
| closedloop.ClosedLoop.Torque |
Variable used to define the torque calculated.
This value is calculated using gain values and the state vector values