Elisa3
|
Speed controler module. More...
#include "variables.h"
Go to the source code of this file.
Functions | |
void | init_speed_control () |
Initialize the speed controller parameters. Actually not used. | |
void | start_vertical_speed_control_left (signed int *pwm_left) |
Control the speed of the left motor in a vertical wall. | |
void | start_vertical_speed_control_right (signed int *pwm_right) |
Control the speed of the right motor in a vertical wall. | |
void | start_horizontal_speed_control_left (signed int *pwm_left) |
Control the speed of the left motor in a flat surface. | |
void | start_horizontal_speed_control_right (signed int *pwm_right) |
Control the speed of the right motor in a flat surface. |
Speed controler module.
The PID controller for the robot velocity is based on the back-emf technique for measuring the current speed of each motor. The module contains both the vertical and horizontal controllers that are activated automatically based on the current orientation of the robot. The two controllers work basically the same way, they differ only on the feed forward parameter handling, that in the case of the vertical controller depends on the vetical orientation of the robot (when the robot is moving up then the feed forward is increased, whereas when the robot is moving down then the feed forward is decreased). The controllers are separated for each motor. The values of the input arguments and parameters are choosen in order to work only with 2 bytes integers.
void init_speed_control | ( | ) |
Initialize the speed controller parameters. Actually not used.
void start_horizontal_speed_control_left | ( | signed int * | pwm_left | ) |
Control the speed of the left motor in a flat surface.
pwm_left | it's a reference; input => desired speed; output => pwm value |
void start_horizontal_speed_control_right | ( | signed int * | pwm_right | ) |
Control the speed of the right motor in a flat surface.
pwm_right | it's a reference; input => desired speed; output => pwm value |
void start_vertical_speed_control_left | ( | signed int * | pwm_left | ) |
Control the speed of the left motor in a vertical wall.
pwm_left | it's a reference; input => desired speed; output => pwm value |
void start_vertical_speed_control_right | ( | signed int * | pwm_right | ) |
Control the speed of the right motor in a vertical wall.
pwm_right | it's a reference; input => desired speed; output => pwm value |