Closed-Loop Transportation Simulation. Outlines

Similar documents
Experiment 9. PID Controller

A Rubik s Cube Solving Robot Using Basic Lego Mindstorms NXT kit

-binary sensors and actuators (such as an on/off controller) are generally more reliable and less expensive

acknowledgments...xv introduction...xvii 1 LEGO MINDSTORMS NXT 2.0: people, pieces, and potential getting started with the NXT 2.0 set...

MM7 Practical Issues Using PID Controllers

Mindstorms NXT. mindstorms.lego.com

Robot Programming Manual

Embedded Control Project -Iterative learning control for

After Performance Report Of the Robot

Digital Control of MS-150 Modular Position Servo System

Glossary of terms. Short explanation

TODO add: PID material from Pont slides Some inverted pendulum videos Model-based control and other more sophisticated

Sensors and Sensing Motors, Encoders and Motor Control

VEX Robotics Platform and ROBOTC Software. Introduction

Embedded Robust Control of Self-balancing Two-wheeled Robot

SINGLE SENSOR LINE FOLLOWER

Lego Mindstorms as a Simulation of Robotic Systems

Figure 1.1: Quanser Driving Simulator

Servo Tuning. Dr. Rohan Munasinghe Department. of Electronic and Telecommunication Engineering University of Moratuwa. Thanks to Dr.

Pre-Day Questionnaire

PROCESS DYNAMICS AND CONTROL

PROCESS DYNAMICS AND CONTROL

GE420 Laboratory Assignment 8 Positioning Control of a Motor Using PD, PID, and Hybrid Control

Design of stepper motor position control system based on DSP. Guan Fang Liu a, Hua Wei Li b

Teleoperation and System Health Monitoring Mo-Yuen Chow, Ph.D.

CHAPTER 2 PID CONTROLLER BASED CLOSED LOOP CONTROL OF DC DRIVE

Basic Tuning for the SERVOSTAR 400/600

Low-Cost hardware connectivity with Simulink MATLAB-Day RWTH Aachen Sebastian Groß October 24th, 2013

An Introduction to Programming using the NXT Robot:

Introduction to Robotics Rubrics

Multi-Robot Cooperative System For Object Detection

FABO ACADEMY X ELECTRONIC DESIGN

Robot Olympics: Programming Robots to Perform Tasks in the Real World

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING BANGLADESH UNIVERSITY OF ENGINEERING & TECHNOLOGY EEE 402 : CONTROL SYSTEMS SESSIONAL

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. LEGO Bowling Workbook

Line Detection. Duration Minutes. Di culty Intermediate. Learning Objectives Students will:

Introduction to the VEX Robotics Platform and ROBOTC Software

6.270 Lecture. Control Systems

Welcome to. NXT Basics. Presenter: Wael Hajj Ali With assistance of: Ammar Shehadeh - Souhaib Alzanki - Samer Abuthaher

Based on the ARM and PID Control Free Pendulum Balance System

Preliminary Design Report. Project Title: Search and Destroy

GE423 Laboratory Assignment 6 Robot Sensors and Wall-Following

EV3 Advanced Topics for FLL

The Open Automation and Control Systems Journal, 2015, 7, Application of Fuzzy PID Control in the Level Process Control

AVR221: Discrete PID Controller on tinyavr and megaavr devices. Introduction. AVR 8-bit Microcontrollers APPLICATION NOTE

MEM380 Applied Autonomous Robots I Winter Feedback Control USARSim

Chapter 5. Tracking system with MEMS mirror

PID-CONTROL FUNCTION AND APPLICATION

Artificial Intelligence Planning and Decision Making

SRV02-Series Rotary Experiment # 3. Ball & Beam. Student Handout

An examination of Echoic Flow based autonomous guidance. using the Lego Mindstorms NXT robot

Teaching Children Proportional Control using ROBOLAB 2.9. By Dr C S Soh

Robotics using Lego Mindstorms EV3 (Intermediate)

Pre-Activity Quiz. 2 feet forward in a straight line? 1. What is a design challenge? 2. How do you program a robot to move

Current Rebuilding Concept Applied to Boost CCM for PF Correction

Hardware Implementation of Automatic Control Systems using FPGAs

Sensors and Sensing Motors, Encoders and Motor Control

: Robots for Education and Entertainment. Sara Schütz

Logic Developer Process Edition Function Blocks

Programming PIC Microchips

Paul Schafbuch. Senior Research Engineer Fisher Controls International, Inc.

Path Following and Obstacle Avoidance Fuzzy Controller for Mobile Indoor Robots

International Journal of Advance Engineering and Research Development

QuickBuilder PID Reference

Total Hours Registration through Website or for further details please visit (Refer Upcoming Events Section)

of harmonic cancellation algorithms The internal model principle enable precision motion control Dynamic control

Advanced Servo Tuning

Lab 2, Analysis and Design of PID

CHAPTER 6 DEVELOPMENT OF A CONTROL ALGORITHM FOR BUCK AND BOOST DC-DC CONVERTERS USING DSP

Loop Design. Chapter Introduction

TUTA/IOE/PCU All rights reserved. Printed in Nepal Fax: My First Humanoid Robot An Experience worth Sharing with Freshmen and Sophomore

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

International Journal of Research in Advent Technology Available Online at:

Electrical Drives I. Week 4-5-6: Solid state dc drives- closed loop control of phase controlled DC drives

COSC343: Artificial Intelligence

L09. PID, PURE PURSUIT

Development of a MATLAB Data Acquisition and Control Toolbox for BASIC Stamp Microcontrollers

EFFICIENT CONTROL OF LEVEL IN INTERACTING CONICAL TANKS USING REAL TIME CONCEPTS

SxWEB PID algorithm experimental tuning

Nebraska 4-H Robotics and GPS/GIS and SPIRIT Robotics Projects

Lecture 10. Lab next week: Agenda: Control design fundamentals. Proportional Control Proportional-Integral Control

Chapter 1. Robots and Programs

BEYOND TOYS. Wireless sensor extension pack. Tom Frissen s

Positive Promotion: Use the FIRST and FTC logos in a manner that is positive and promotes FIRST.

UTILIZATION OF ROBOTICS AS CONTEMPORARY TECHNOLOGY AND AN EFFECTIVE TOOL IN TEACHING COMPUTER PROGRAMMING

Automobile Prototype Servo Control

PERFORMANCE ANALYSIS OF PERMANENT MAGNET SYNCHRONOUS MOTOR WITH PI & FUZZY CONTROLLERS

Design of a Simulink-Based Control Workstation for Mobile Wheeled Vehicles with Variable-Velocity Differential Motor Drives

Procidia Control Solutions Dead Time Compensation

Control and Optimization

Design of Compensator for Dynamical System

Report on Dynamic Temperature control of a Peltier device using bidirectional current source

TC LV-Series Temperature Controllers V1.01

Linear Control Systems Lectures #5 - PID Controller. Guillaume Drion Academic year

Building an autonomous light finder robot

Smart-M3-Based Robot Interaction in Cyber-Physical Systems

Rockets, Robots, Hovercraft, and Quadracopters, all for the STEM of IT! John J. Helferty Temple University

Semi-Autonomous Parking for Enhanced Safety and Efficiency

General Description. The TETRIX MAX Servo Motor Expansion Controller features the following:

Designing Toys That Come Alive: Curious Robots for Creative Play

Transcription:

Closed-Loop Transportation Simulation Deyang Zhao Mentor: Unnati Ojha PI: Dr. Mo-Yuen Chow Aug. 4, 2010 Outlines 1 Project Backgrounds 2 Objectives 3 Hardware & Software 4 5 Conclusions 1

Project Background AIS Gene Library Based Real-Time Resource Allocation on Time-Sensitive Large- Scale Multi-Rate Systems Artificial Immune System Adaptive systems, inspired by theoretical immunology and observed immune functions, principles and models, which are applied to problem solving. - L.N. de Castro, J. Timmis Basics of artificial immune systems A representation for the components of the system. A set of mechanisms to evaluate the interaction of individuals with the environment and each other. The environment is usually simulated by a set of input stimuli, one or more fitness function(s), or other means. Procedures of adaptation that govern the dynamics of the system, i.e., how its behavior varies over time. Project Background Final Goal Integrated systems using different types of information from distributed sensors, communicate by networks to assist and warn drivers of potentially hazardous situations Simulation by Matlab/Simulink Closed-Loop Transportation Simulation by Robots 2

Project Background Simulink model Stateflow Quadratic Curve Path-tracking Controller Dynamics model Result Project Background States defined by stateflow Drive Robot follows the lane autonomously when no other robots are in front of it.(normal, Drunk) Follow Robot slows down or stops when detects another robot in front to avoid collision. Stop Robot stops for 1~2 seconds at the stop. Wait If detects another robot with higher priority at the cross, robot waits until the former leaves. 3

Objectives Real Transportation Simulation emulate common traffic scenarios and implement lowlevel control on the platform below Lane A Lane B Objectives Work in Steps 1 2 3 4 Design and complete the construction of robots. Modify the platform in ispace to facilitate line tracking.. Calibrate the light and ultrasonic sensors. Implement the line-tracking algorithm. Implement the drive and stop states defined by Matlab/Simulink program. Locate vehicles in front of the current vehicle. Implement the follow and wait states. 4

Hardware & Software Hardware Lego Mindstorms NXT is a line of programmable robotics/construction toys, manufactured by the Lego Group. it comes in a kit containing many pieces including sensors and cables. What we use include but not limit to NXT brick Interactive Servo Motor Ultrasonic Sensor Light Sensor Hardware & Software NXT brick Atmel 32-bit ARM processor, AT91SAM7S256 Atmel 8-bit AVR processor, ATmega48 Bluetooth wireless communication itle Four input ports & Three output ports USB 2.0 communication LCD display & Loudspeaker 5

Hardware & Software Interactive Servo Motors Built-in rotation Sensor, not so accurate, in my point of view Ultrasonic Sensor Measures distance in centimeters from 0 to 255, with a precision of +/- 3cm Light Sensor Measures light level, obtains gray value Hardware & Software Our robots Lego Robots Our Robots Lego Company has provides many robot designs, but none equipped with rotatable ultrasonic sensor, which is a vital function in our project Therefore our own special robots are designed and completed. An extra motor is applied to drive the ultrasonic sensor. A flat board is mounted on the back of the robot for better sensing. 6

Hardware & Software Hardware & Software Outer loop & inner loop Black lane for tracking Red stop mark Green branch mark Specified loop direction 7

Hardware & Software Software Programming Software Bricx Command Center supports programming the LEGO Mindstorms NXT brick using Not exactly C (NXC) Programming Language Not exactly C (NXC) is a high level language, similar to C, built on top of the NBC compiler. It can also be used to program the NXT brick. Four basic states: drive, follow, stop and wait Branch point state and crossing state Remote control Priorities 8

Drive state Robot follows the lane autonomously when no other robots are in front of it. Line following is based on the PID controller using three light sensors to see the black line in the middle of the lane line Why PID controller? Comparing to other simple algorithms, PID controller with finely tuned factors makes the robot moves more smoothly. It is able to discover a deviation in the line soon enough, so that the robot can adapt in time Also PID control is more robust to the disturbance, avoiding oscillation It can ignore the differences caused by the motors when follow the direct line. 9

PID controller theory A proportional integral derivative controller (PID controller) is a generic control loop feedback mechanism (controller) systems, calculating an "error" value as the difference between a measured process variable and a desired setpoint (from the light sensor). Discrete implementation of PID error = setpoint - actual_position integral = integral + (error*dt) derivative = (error - previous_error)/dt output = (Kproportional*error) + (Kintegral*integral) +(Kderivative*derivative) previous_error = error dt determines the responsiveness of the PID controller Configuration of light sensors The actual values at present and the initial set value are crucial to the effect of the control. The configuration of the sensors are shown below Only the middle light sensor is complete in the lane so that only error from the middle sensor is the input of PID controller Errors from the other sensors determine the direction that the robot will turn to if((errorr<0)&&(errorr<errorl)) Turn right if((errorl<0)&&(errorr>errorl) Turn Left 10

Improvements & Modifications of PID Integral-windup refers to the situation in a PID controller where a large change in setpoint occurs (ALWAYS POSITIVE HERE) and the integral terms accumulates a significant error during the rise (windup), thus overshooting and continuing to increase as this accumulated error is unwound. The specific problem is the excess overshooting. Solution Clear up the integral every ten seconds Feed-forward is a term describing an element or pathway within a control system which passes a controlling signal from a source in the control system's external environment. Here it means the motor has a basic speed (reference speed) that is not effected by the errors. The output from PID controller is added to or minuses the feedforward to adjust the robot s direction. Gain scheduling uses the error as the scheduling variables, to determine what region (direct lane, mild curve or sharp curve) the robot is currently in and to enable the appropriate PID controller with different PID parameters and reference speeds available (and automatically plugged into the controller). Direct lane Mild curve Sharp curve 11

Compensation In the tracking closed-loop control, the motor is open-loop controlled, which means the output from controller is directly given to the motor without feedback. Each motor has different features due to manufacturing error Compensation is added to the input of motors to make the right and left turning the same Output of the PID controller is multiplied by a coefficient to adjust the algorithm to both the sharp turning and the smooth turning in the road scenario Follow state Robot slows down or stops when detects another robot in front to avoid collision. The program incorporates periodic readings from ultrasonic sensor, which can locate vehicles in front of the current vehicle if(15<distance <30) Slow down if(distance <15) Stop 12

Stop state Robot stops for 1~2 seconds at the stop, which has a red mark, recognized by light sensors. Although the light sensors can not distinguish different colors. The gray value of red & green have small difference from that of white &black Gray value <35 35~50 50~60 Wait state Wait state follows the stop state. If detects another robot with higher priority at the cross, robot waits until the former leaves. In wait state, the robot stays still, the ultrasonic turns to directions that other robots will come, if it detects others, wait; otherwise, it moves on. 13

Branch point state Branch point state is active when the robot recognizes the branch mark by the light sensors. The robot will decide whether to go straight forward or make a turn according to the loop ID If the robot chooses to turn left, it will activate the stop state and the wait state first, avoiding collision. Crossing state Lanes are crossed at certain points, which will confuse the light sensors when the robot is tracking the lane. All the three sensors detect black at the crossing. In the crossing state, the program will force the robot to turn a slight distance via PID control module of motors Used light sensors, loop ID and state variable to enable the crossing state, avoiding turning while the robot is going straight 14

Remote control NXTs can communicate with each other via Bluetooth in Master-Slave mode. The NXT that starts the connection is called Master, and can have up to three Slave NXTs connected. In the project, we use one control NXT brick to start and stop the four robots simultaneously Control NXT1 Control NXT2 Robot1 Robot2 Robot3 Robot4 Loop ID Loop ID is sent to each robot when it is started to identify the loop. With the loop ID, the robot is able to locate itself which stop & branch it is at. Outer loop straight Outer loop turn Inner loop-straight Inner loop-turn two stops one stop & one branch two stops one stop & one branch 15

Priorities Priority is set to each robot at the certain points where several robots meet and have a potential possibility to collide. Therefore priority identify the order of the robot to pass to avoid accidents How to implement priority? Priority is achieved based on the location of the robot instead of the robot itself, which means: The priority of each robot is different at different location Combing pre-determined moving direction, loop ID & state variable, the robot can exactly know which stop & branch it is at Define the behavior at each stop &branch, the priority is guaranteed Priority: 1>2>3 16

If receives loop ID Crossing state Loop ID ==2 Former state = branch Stateflow Turning 1 If distance<30cm 2 Turning If all light sensors detect black Go straight Loop ID ==4 Follow state If distance<30cm Drive state If light sensors recognize green mark Loop ID ==1 ==3 Turning Loop ID ==4 ==2 If light sensors recognize red mark Branch state Wait state Stop state Loop ID ==2 Conclusions Achievements Design and complete the construction of robots. Modify the road scenarios Implement the robot lane tracking Implement the states that defines the behaviors of the robots Achieve the priorities of the robots to avoid accidents Future improvements Use all errors from light sensors to improve tracking Implement lane changing 17

Manual tuning Step 1 Set the Kintegral and Kderivative values to zero. Increase Kproportional until the robot finds the line after it run of the line. Step 2 Then Kproportional is set at about half that value. Increase Kintegral until the robot goes back on the line. Step 3 Kderivative is increased, if necessary, so the robot will quickly go back to normal driving, after it has returned to the line. 18

Kproportional - straight forward reaction. Larger values mean faster response. An excessively large proportional gain will lead to process instability and oscillation. Kintegral - improves the accuracy. Larger values imply steady state errors are eliminated more quickly. However, any negative error integrated must be integrated away by positive error before reaching steady state. Kderivative - improves the controller speed. Larger values decrease overshoot, but slow down transient response and may lead to instability due to signal noise amplification in the differentiation of the error. Since both the wait state and the follow state depends on ultrasonic sensors to start transition, they might conflict with each other. We should determine the state by force. Solution Once the stop state activated, the follow state will not be activated When the wait state is active after the stop state, read the ultrasonic sensor after the sensor turns by a angle If no robots are detected, the robot turns and return to the drive state 19

Project Background Artificial Immune System Adaptive systems, inspired by theoretical immunology and observed immune functions, principles and models, which are applied to problem solving. - L.N. de Castro, J. Timmis Basics of artificial immune systems A representation for the components of the system. A set of mechanisms to evaluate the interaction of individuals with the environment and each other. The environment is usually simulated by a set of input stimuli, one or more fitness function(s), or other means. Procedures of adaptation that govern the dynamics of the system, i.e., how its behavior varies over time. 20