|
| 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...
|
| |
◆ __init__()
| def controller.Ctrl.__init__ |
( |
|
self, |
|
|
|
k1, |
|
|
|
k2, |
|
|
|
k3, |
|
|
|
k4 |
|
) |
| |
Initializes the Controller based on calculated gain values.
- Parameters
-
| k1,k2,k3,k4 | The constants calculated for the system model |
- Returns
- Returns nothing.
◆ 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
-
| pos | The position of the ball according to the touch panel measurement |
| ang | The angle of the ball according to the encoder measurement |
| vel | The velocity / change in position of the ball |
| ang_vel | The 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: