Elisa3
speed_control.h File Reference

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.

Detailed Description

Speed controler module.

Author:
Stefano Morgani <stefano@gctronic.com>
Version:
1.0
Date:
01.02.12

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.


Function Documentation

Initialize the speed controller parameters. Actually not used.

Returns:
none
void start_horizontal_speed_control_left ( signed int *  pwm_left)

Control the speed of the left motor in a flat surface.

Parameters:
pwm_leftit's a reference; input => desired speed; output => pwm value
Returns:
none
void start_horizontal_speed_control_right ( signed int *  pwm_right)

Control the speed of the right motor in a flat surface.

Parameters:
pwm_rightit's a reference; input => desired speed; output => pwm value
Returns:
none
void start_vertical_speed_control_left ( signed int *  pwm_left)

Control the speed of the left motor in a vertical wall.

Parameters:
pwm_leftit's a reference; input => desired speed; output => pwm value
Returns:
none
void start_vertical_speed_control_right ( signed int *  pwm_right)

Control the speed of the right motor in a vertical wall.

Parameters:
pwm_rightit's a reference; input => desired speed; output => pwm value
Returns:
none
 All Files Functions Variables Defines