Difference between revisions of "Controllers"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
*In order from high level to low level: | *In order from high level to low level: | ||
# Navigation controller, which tries to follow a desired path | # Navigation controller, which tries to follow a desired path | ||
− | # Balance controller, which tries to achieve a desired lean angle ( | + | # Balance controller, which tries to achieve a desired lean angle (φ<sub>d</sub>) and desired steer angle (δ<sub>d</sub>). For straight line balance (no navigation), this controller attempts to achieve φd = 0 and δd = 0. In this position, the bicycle is balanced (upright and steered straight ahead). |
# Front motor controller, which controls front wheel angle (δ). | # Front motor controller, which controls front wheel angle (δ). | ||
*Using cascaded controllers allows us to develop each controller semi-independently. | *Using cascaded controllers allows us to develop each controller semi-independently. | ||
===Front Motor Controller=== | ===Front Motor Controller=== | ||
+ | *The front motor controller works to minimize the angle between the current steer angle (δ) and the commanded steer angle (δ<sub>c</sub>). | ||
+ | *Currently (Spring 2018), the front motor controller is PD (Proportional-Derivative) | ||
+ | controller. Specifically, | ||
+ | total_error = k<sub>p</sub>(δ<sub>c</sub> − δ) + k<sub>d</sub>d/dt(δ<sub>c</sub> − δ). | ||
+ | **total_error is converted into a direction (DIR) and a magnitude (motor_output). | ||
===Balance Controller=== | ===Balance Controller=== | ||
===Euler Integrator=== | ===Euler Integrator=== |
Revision as of 23:44, 27 March 2019
Intro
- The control algorithms on our bicycle are separated into three cascaded controllers. The output of one controller is input to another controller.
- In order from high level to low level:
- Navigation controller, which tries to follow a desired path
- Balance controller, which tries to achieve a desired lean angle (φd) and desired steer angle (δd). For straight line balance (no navigation), this controller attempts to achieve φd = 0 and δd = 0. In this position, the bicycle is balanced (upright and steered straight ahead).
- Front motor controller, which controls front wheel angle (δ).
- Using cascaded controllers allows us to develop each controller semi-independently.
Front Motor Controller
- The front motor controller works to minimize the angle between the current steer angle (δ) and the commanded steer angle (δc).
- Currently (Spring 2018), the front motor controller is PD (Proportional-Derivative)
controller. Specifically, total_error = kp(δc − δ) + kdd/dt(δc − δ).
- total_error is converted into a direction (DIR) and a magnitude (motor_output).