Holonomic Controlled Robot with Tracing and Collision...

13
Development of PID controller for Autonomous Mecanum Wheel Robot with Tracing and Collision Avoidance Properties (Holobot) Cole Perrault 3/26/2015 ET 493 Wesley Deneke Mecanum wheeled robots are used to describe the ability of a system to move in a desired direction instantaneously from any configuration. Recently, the Mecanum Wheel has seen more attention from its conventional design in mobility to suit vast applications. In terms of robot control, differential control algorithms such as PI or PID controllers pass a control signal to achieve steady speed of the motor. However, existing systems have issues in terms of time response, and percentage of error. The Holobot will be developed as a basic platform to implement PID controls to research closed loop feedback systems. Not only will it will it be a platform for PID controls but will also serve as an autonomous robot. The Holobot will utilize ping sensors and a color generator to follow a certain color while avoiding obstacles. The Mecanum wheels will allow for unparalleled performance in terms of mobility and stability, thus making the Holobot a great platform for future research and development.

Transcript of Holonomic Controlled Robot with Tracing and Collision...

Page 1: Holonomic Controlled Robot with Tracing and Collision ...csit.selu.edu/~csit/seniorprojects/SeniorProjects2015/Spring_2015... · Development of PID controller for Autonomous Mecanum

 

Development of PID controller for Autonomous Mecanum Wheel Robot with Tracing and Collision Avoidance Properties (Holobot)

Cole Perrault 3/26/2015 ET 493

Wesley Deneke Mecanum wheeled robots are used to describe the ability of a system to move in a desired direction instantaneously from any configuration. Recently, the Mecanum Wheel has seen more attention from its conventional design in mobility to suit vast applications. In terms of robot control, differential control algorithms such as PI or PID controllers pass a control signal to achieve steady speed of the motor. However, existing systems have issues in terms of time response, and percentage of error. The Holobot will be developed as a basic platform to implement PID controls to research closed loop feedback systems. Not only will it will it be a platform for PID controls but will also serve as an autonomous robot. The Holobot will utilize ping sensors and a color generator to follow a certain color while avoiding obstacles. The Mecanum wheels will allow for unparalleled performance in terms of mobility and stability, thus making the Holobot a great platform for future research and development.

Page 2: Holonomic Controlled Robot with Tracing and Collision ...csit.selu.edu/~csit/seniorprojects/SeniorProjects2015/Spring_2015... · Development of PID controller for Autonomous Mecanum

TABLE OF CONTENTS

CHAPTER 1 #2

BUILDERS PERSPECTIVE #1 MICROCONTROLLER #1 MOTOR SHIELD #2 H- BRIDGE DC MOTOR #3 MECANUM WHEELS #3 COLOR SENSOR #4 DISTANCE SENSOR #4

CHAPTER 2 #5

DELIVERABLES a. POWERPOINT PRESENTATION b. PLATFORM c. MATHEMATICAL METHODS SHEET d. TEST EACH PERIPHERAL e. CODE f. BUILD HOLOBOT g. TEST HOLOBOT h. IMPLEMENTATION OF PID i. TESTING OF PID

CHAPTER 3 #6

CHALLENGES a. CODE b. MECANUM WHEELS c. PID SYSTEM

CHAPTER 4 #7 METHODOLOGY

a. TRANSFER FUNCTION- LAPLACE TRANSFORM- DC MOTORS b. PERCENT OVERSHOOT c. PROPORTIONAL- INTEGRAL- DERIVATIVE d. ROOT LOCUS

CHAPTER 5 #8 CODE

a. COLOR SENSOR b. DISTANCE SENSOR c. DC MOTOR(S) d. I/O SHIELD

Page 3: Holonomic Controlled Robot with Tracing and Collision ...csit.selu.edu/~csit/seniorprojects/SeniorProjects2015/Spring_2015... · Development of PID controller for Autonomous Mecanum

e. PID SYSTEM

Page 4: Holonomic Controlled Robot with Tracing and Collision ...csit.selu.edu/~csit/seniorprojects/SeniorProjects2015/Spring_2015... · Development of PID controller for Autonomous Mecanum

H o l o b o t     P a g e  | 1 

 

Builders Perspective a. Microcontroller At the heart of the Holobot will be an Arduino Mega (Figure 1) that will allow me to

program the various activities that will be the functioning “Heart” of the autonomous robot. Some of these functions include, but are not limited to: Motor Control/Movement, Processing/Decision Making, Collision Avoidance and Guidance. The Arduino Mega in particular has 54 digital input/output pins that will help support the numerous devices that will be working to make the Holobot function. Another nice function about the Arduino Mega is that it can support multiple Motor Shields that will help power the DC motors.

Figure 1

b. Motor Shield The Motor Shield (Figure 2) that I will be using is manufactured by Adafruit. The shield

contains two L293D motor drivers and one 74HC595 shift register. The shift register expands 3 pins of the Arduino to 8 pins to control the direction for the motor drivers. The output enable of

1

Page 5: Holonomic Controlled Robot with Tracing and Collision ...csit.selu.edu/~csit/seniorprojects/SeniorProjects2015/Spring_2015... · Development of PID controller for Autonomous Mecanum

H o l o b o t     P a g e  | 2 

 

the L293D is directly connected to PWM outputs of the Arduino. The reason I chose this shield is that it will be able to control our four full H-Bridge DC motors along with allowing parallel operation. It also boasts several external +5V connections to power the motors.

Figure 2

c. H-Bridge DC Motor The H-Bridge DC Motor(s) (Figure 3) the Holobot will use are 12V DC Coreless Motors.

The DC motor (Figure 4) provided by NEXUS Robots has six basic parts: axle, rotor, stator, decoder, field magnet(s) and brushes. When 12V is applied to the motor it outputs 17W of Power at 8100 RPM/min under no load.

Figure 3 Figure 4

Page 6: Holonomic Controlled Robot with Tracing and Collision ...csit.selu.edu/~csit/seniorprojects/SeniorProjects2015/Spring_2015... · Development of PID controller for Autonomous Mecanum

H o l o b o t     P a g e  | 3 

 

d. Mecanum Wheels What does being Holonomic mean? The Holobot can move holonomically across flat

surfaces, which in this case means it, may move in any direction while simultaneously controlling rotational speed. This is true because the Omni-wheels have rollers that allow them to freely roll sideways but control the motion in the direction the wheel is pointing. Figure 4 shows the vectors in which the velocity of each wheel contains in a particular direction at a specific point; Figure 5 shows the Mecanum wheel. It is a conventional wheel with a series of rollers attached to its circumference. These rollers typically each have an axis of rotation at 45° to the plane of the wheel and at 45° to a line through the center of the roller parallel to the axis of rotation of the wheel. By alternating wheels with left and right-handed rollers, in such a way that each wheel applies force roughly at right angles to the wheelbase diagonal the wheel is on, the vehicle is stable and can be made to move in any direction and turn by varying the speed and direction of rotation of each wheel. Moving all four wheels in the same direction causes forward or backward movement, running the wheels on one side in the opposite direction to those on the other side causes rotation of the vehicle, and running the wheels on one diagonal in the opposite direction to those on the other diagonal cause’s sideways movement. Combinations of these wheel motions allow for vehicle motion in any direction with any vehicle rotation.

Figure 5 Figure 6

Page 7: Holonomic Controlled Robot with Tracing and Collision ...csit.selu.edu/~csit/seniorprojects/SeniorProjects2015/Spring_2015... · Development of PID controller for Autonomous Mecanum

H o l o b o t     P a g e  | 4 

 

e. Color Sensor The Holobot will boast a color and ambient light sensor and color generator, colorPal

(Figure 7), manufactured by Parallax, Inc. It is used for sensing color, using its LED to illuminate a sample, one color at a time, along with a broad-spectrum light-to-voltage converter to measure the light reflected back. The amount of light reflected from the sample under illumination from each red, green and blue LED can be used to determine the sample’s color. The colorPal also has onboard EEPROM for saving custom color detection and generation programs. The auto run feature permits running a pre-designed EEPROM program with only a power supply.

Figure 7

f. Distance Sensor Mounted on each side of the Holobot are ping Ultrasonic Distance Sensor (Figure 8). The

Distance Sensor sends 40 kHz chirps from one speaker and measures the echo’s return time to the other sensor. When the sensor detects a pulse it will send and active LOW signal.

Figure 8

Page 8: Holonomic Controlled Robot with Tracing and Collision ...csit.selu.edu/~csit/seniorprojects/SeniorProjects2015/Spring_2015... · Development of PID controller for Autonomous Mecanum

H o l o b o t     P a g e  | 5 

 

Deliverables a. PowerPoint Presentation……………………………………...…April 1 b. Platform……………………………………………………………TBD c. Mathematical Methods Sheet…………………………………….May 6 d. Test each Peripheral……………………………………………..April 2 e. Code………………………………………….……...……………April 2 f. Build Holobot……………………………………..…..….Summer 2015 g. Test Holobot…………………………………………Summer/Fall 2015 h. Implementation of PID……………………………………......Fall 2015 i. Testing of PID…………………………………………….……Fall 2015

2

Page 9: Holonomic Controlled Robot with Tracing and Collision ...csit.selu.edu/~csit/seniorprojects/SeniorProjects2015/Spring_2015... · Development of PID controller for Autonomous Mecanum

H o l o b o t     P a g e  | 6 

 

Challenges a. Code Some challenges we may face while building the Holobot is coding the coordination

between the individual peripherals. My main concern is from the input that will be coming through the ping sensors and the color sensor. The main objective is to follow the programmed hue that is detected in the color generator. Through this the wheels will move in order to reduce the distance between the Holobot and the target. While it is moving, sensors will be giving input to the system. This input will determine whether the Holobot can progress in a linear path or if avoidance will be necessary. Furthermore, the ping sensor will relay how far something is and the system needs to determine what actions must be taken to avoid the object in question.

b. Mecanum Wheels There is minimal braking power, because each wheel is made of independently formed

wheels or rollers. We cannot simply rotate the wheels in the opposite direction to stop, and depending on our speed it will drift. Mecanum wheels have difficulty on inclines and need a suspension. These wheels are designed for horizontal surfaces and virtually have no capabilities of going up steep angles or over rough terrain. The Mecanum Wheels may help the Holobot accomplish moving around in a unique fashion, but the main objective of it is to pursue a particular target.

c. PID system The PID system may be hard to implement considering there are many other factors that

can interrupt our feedback or cause or system to respond slowly. These false values may further falsify our feedback causing instability or total failure. Implementing the PID function into the Arduino may pose some issues as it will be difficult to measure our desired output without having developed support for MATLAB libraries for data observation.

3

Page 10: Holonomic Controlled Robot with Tracing and Collision ...csit.selu.edu/~csit/seniorprojects/SeniorProjects2015/Spring_2015... · Development of PID controller for Autonomous Mecanum

H o l o b o t     P a g e  | 7 

 

Methodology a. Transfer Function →LaPlace Transform → DC Motors Define the Transfer Function of the DC motor and Use the Laplace Transform to define the Function with respect to Vin(s).

i. Relating mathematical equations to a DC Motor (Figure 9) there are three parts: Electrical, Relational, and Mechanical.

Figure 9

ii. These three parts (Figure 10) combined to account for the transfer function (Figure 11). In figure 11 we can see that there are four separate equations

Figure 10 Figure 11

4

Page 11: Holonomic Controlled Robot with Tracing and Collision ...csit.selu.edu/~csit/seniorprojects/SeniorProjects2015/Spring_2015... · Development of PID controller for Autonomous Mecanum

H o l o b o t     P a g e  | 8 

 

iii. Lalace Transforms we are using is to find the speed (input) and position (input) of the motor with respect to the voltage input (output). The LaPlace Differential Operator and Integral Operation can be seen at the top of (Figure 12). Our output corresponding transfer functions for speed and position can be seen at the bottom of figure 12. These transfer functions will allow us to build a close loop negative feedback system that will help keep our output desired. We will be able to tune our gains for each gain value (Kp,Ki,Kd respectively) of the dynamic system.

Figure 12

b. P.O. (Percent Overshoot) Solve for Wn in order to determine the desirable characteristics of our system.

c. P.I.D (Proportional-Integral-Derivative) Determine which part of the system provides lower percent overshoot within the system.

d. Root Locus Study the stability of our system changes with a variation in gain.

Page 12: Holonomic Controlled Robot with Tracing and Collision ...csit.selu.edu/~csit/seniorprojects/SeniorProjects2015/Spring_2015... · Development of PID controller for Autonomous Mecanum

H o l o b o t     P a g e  | 9 

 

Code a. Color Sensor b. Distance Sensor c. DC Motor(s) d. I/O Shield e. PID System

5

Page 13: Holonomic Controlled Robot with Tracing and Collision ...csit.selu.edu/~csit/seniorprojects/SeniorProjects2015/Spring_2015... · Development of PID controller for Autonomous Mecanum

H o l o b o t     P a g e  | 10 

 

Citation Voltage Regulation: http://www.societyofrobots.com/schematics_powerregulation.shtml DC Motor 2: http://www.superdroidrobots.com/shop/item.aspx/ig42-24vdc-340-rpm-gear-motor/1097/ DC Motor: http://www.nexusrobot.com/product.php?id_product=88 Platform: http://www.seeedstudio.com/depot/4WD-Mecanum-Wheel-Robot-Kit-p-2276.html Arduino PID Library: http://playground.arduino.cc/Code/PIDLibrary Platform 2: http://www.studica.com/us/en/nexus/4wd-60mm-mecanum-wheel-arduino-robot-kit/10021.html?utm_source=google&utm_medium=ppc&kpid=806043&gclid=Cj0KEQjwxd6oBRCRoMrWmLOCvI4BEiQAYyZdkYxqePOe4lD2ai7Vt5IN-SiGuF4TogZJ8L5NvFqxgcAaAnj88P8HAQ Nexus Robot: http://www.robotshop.com/media/files/pdf/datasheet-10011.pdf Holonomic Control: http://people.idsia.ch/~foerster/2006/1/omnidrive_kiart_preprint.pdf ColorPal Arduino: http://learn.parallax.com/colorpal-arduino-demo ColorPal Datasheet: https://www.parallax.com/sites/default/files/downloads/28380-ColorPAL-Documentation.pdf Microcontrollers: https://itp.nyu.edu/physcomp/lessons/microcontrollers/microcontrollers-the-basics/ Motor Shield: http://playground.arduino.cc/Main/AdafruitMotorShield Arduino Mega: http://arduino.cc/en/Main/arduinoBoardMega Mechanum Wheels (54mm): https://www.sparkfun.com/products/11578 Mechanum Wheels (100mm): http://www.robotshop.com/en/100mm-aluminum-mecanum-wheel-set.html Kinematics: http://files.andymark.com/2008CON-Omni-Baker-McKenzie.pdf Distance Sensor: https://www.parallax.com/sites/default/files/downloads/28029-Smart-Sensors-Text-v1.0.pdf Distance Sensor Robot: http://learn.parallax.com/activitybot/navigate-ultrasound Distance Sensor Code Tutorial: http://learn.parallax.com/propeller-c-simple-devices/sense-distance-ping

6