Difference between revisions of "Controllers"
Jump to navigation
Jump to search
(→Balance Controller) |
(→Balance Controller) |
||
Line 16: | Line 16: | ||
*In addition to the desired state (φ<sub>d</sub>, δ<sub>d</sub>), the balance controller takes as input current lean angle (φ), lean angle rate (φ), and steer angle (δ). The balance controller outputs a steer angle rate (δ). | *In addition to the desired state (φ<sub>d</sub>, δ<sub>d</sub>), the balance controller takes as input current lean angle (φ), lean angle rate (φ), and steer angle (δ). The balance controller outputs a steer angle rate (δ). | ||
*Currently (Spring 2018), the balance controller is the linear controller: | *Currently (Spring 2018), the balance controller is the linear controller: | ||
− | ̇δ<sub>d</sub> = k<sub>d</sub>(φ − φ<sub>d</sub>) + k<sub>2</sub>φ ̇ + k<sub>3</sub>(δ − δ<sub>d</sub>) | + | ̇δ<sub>d</sub>dot = k<sub>d</sub>(φ − φ<sub>d</sub>) + k<sub>2</sub>φ ̇ + k<sub>3</sub>(δ − δ<sub>d</sub>) |
===Euler Integrator=== | ===Euler Integrator=== |
Revision as of 00:28, 28 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 − δ) + kd d/dt(δc − δ).
- total_error is converted into a direction (DIR) and a magnitude (motor_output).
Balance Controller
- The balance controller attempts to achieve a desired lean angle (φd) and steer angle (δd). In navigation mode, the navigation algorithm sets φd and δd. Without navigation (in balance only mode), φd = 0 and δd = 0.
- In addition to the desired state (φd, δd), the balance controller takes as input current lean angle (φ), lean angle rate (φ), and steer angle (δ). The balance controller outputs a steer angle rate (δ).
- Currently (Spring 2018), the balance controller is the linear controller:
̇δddot = kd(φ − φd) + k2φ ̇ + k3(δ − δd)