Anda di halaman 1dari 36

Control System Design for an Autonomous Mobile Robot

Masters Thesis By:

Sathish K Shanmugasundaram
Department of Industrial Engineering, 2000

Introduction

Bearcat II Control systems in mobile robots Need for feedback control Manipulating the error and need for a good control system Use of the Proportional-Integral-Derivative algorithm or PID controller Optimization approach

Motivation, and credit


Use of a PID Controller Difficulty in tuning


System Changes Load Changes Iterative Brute Force

Tuning Methods

Extension to previous team member work

Bearcat II

Autonomous mobile robot Motors, drive train and control system Vision guidance system

Main guidance Leader following Pothole detection

Obstacle avoidance system Computer interface Safety circuitry

Systems in the Robot


Monitor Vision Tracking Lef t Camera JVC To Galil Breakout Board

MAXIM Video Switch

ISCAN Sonar

Right Camera JVC


Obstacle Av oidance Left Polaroid

Sens or L1

Sens or L2

+
Battery 12 V Inv ertor 120 VAC

ISCAN Interfac e

DMC103 0

CPU
4 port RS232 Sens or R2

Backup Battery 12 V

+ -

Right Polariod Sens or R1

Key board

Mouse

Monitor Power Supply 12 V

Control system layout


Central Computer
Input from vision tracking system and sonar system

Galil DMC 3 Axis Motion Controller


Amplifier Amplifier

Left Wheel

Gear box

Motor

Motor

Gear box

Right Wheel

Encoder

Encoder

Introduction to Control theory


Consists of systems and processes for controlling output For example a furnace is made of subsystems like valves, thermostats, sensors etc. It gives an output response for a given input stimulus Basic form is open loop The output required is set at a fixed value No feed back correction

Open loop control

Feed back control


Designed to generate an output Corrective effort to be applied Drives variable to set point Actuator to actuate and sensor to sense Input Controller Plant to be controlled Measurement device Output Reward function

Components of feed back control

Description of Input and desired response

PID Controller

Proportional, Integral and Derivative Closed loop controller with elaborate algorithm for output determination Current value of error Integral value of error over recent time interval Current derivative of the signal to determine length of time and an amount of correction

PID controller contd.

Three quantities multiplied by tuning constants P is proportional constant I is the integral constant D is the derivative constant

PID explained

With proportional band, controller output is proportional to the error or change in measurement O = E*100/P With integral action, the controller output is proportional to the amount of time error is present. It eliminates the offset by the prop. band With derivative action, the controller output is proportional to the rate of change of measurement with time O = D (dm/dt)

Tuning of the PID parameters


Very important to get a well-designed loop Thats all there is on a PID controller Tricky part is setting the P, I, D constants Idea is to weight the sum of of PID terms so as to produce a controller output that steadily drives the process variable to eliminate error

Possible solutions

Use largest possible values of tuning constants Controller amplifies every error Initiates extremely aggressive efforts to eliminate discrepancy between set point and process variable But, aggressive controller will drive the variable past the set point On the other hand, conservative tuning may be unable to eliminate an error before next appears Controller should work between these extremes

Tuning methods

Three methods

Simple trial and error Intuitive tuning Analytical approach

In first method just tweak the constants and watch the controller handle the next error Uses the experience of people to correct the error, but affects the other terms Involves mathematical modeling of the process that relates the current value of variable to history of the controllers output

Galil DMC 1000 controller

Serial motion controller, plugs into a PC bus Available for 1, 2, 3, or 4 axes per card Can interface to a variety of motors and drives Accepts feedback from linear or rotary encoder Provides many modes of motion Easy to program, instruction represented by easy two letter commands Provided motion smoothening to eliminate jerk

Accessories to the controller


32-bit Motorola 68331 series with 64K RAM Motor interface Communication is using a bi-directional FIFO and PC interrupt handling General I/O Amplifier converts a +/- 10v signal into current to drive the motors. Encoder translates motion to electrical pulses to be fed into the DMC 1000

Current tuning method

Trial-and-error, iterative Uses a software called Windows Servo Design Kit (WSDK) First a sinusoidal input is supplied to the motors This causes the wheel to rotate back and forth The system response is collected Done with wheels off the ground, on the ground Various surfaces that the robot encounters are grass, asphalt, wood, tarp, sand and polished surfaces

Tuning continued

System response is collected Using these values a bode plot frequency response is plotted Overshoot level is inspected visually If it is okay then the PID value are used in the main program

WSDK response plot

Problems with the process

Parameter slides can be changed to adjust the PID constants It is iterative. If the plot is not good then the values have to be adjusted to get a good plot If there is a change in the drive system hardware or the load then the whole process would have to be repeated again To eliminate a new optimized process is dealt next

Simulation and optimization

Model of the system setup using Mat lab's Simulink toolbox Optimization using the Optimization toolbox Mat lab file that has the models transfer function Mat lab file converting the digital gains to analog signals Simulink graphics model which takes the analog gains and simulates the step response

Simulink model of the system


Step Input + Sum gs 2+(g*a+f)s+f*b s 2+bs The PID controller 1 .0005s+1 Zero Order Hold 0.00122 DAC 2 AMP .54 .0003773s2 Motor and Load

-KGain2 Auto-Scale Graph Auto-Scale Graph1

Model explanation

Step input signal fed to a summation block Constant values to be used are calculated using a separate M-file Analog values in the Mat lab kernel Zero on hold DAC Amplifier Encoder feedback fed to the summation block for correction

Model to be optimized

A general model representative of any motor and load is considered

Step response of the system

Shows the output response Ideally we would like the response to rise immediately to the signal This gives rise to error

Time (seconds)

Optimization of the parameters

Non-linear model Enables the system to track a unit step input into the system Two methods are used lsqnonlin is the non-linear least squares method. It minimizes the error between the output and input fminmax minimizes the maximum value of the output at anytime. The first method is chosen It is a multi-objective function because the error needs to be minimized for all time steps

Lsqnonlin method

Least square fit on the tracking of output E = Input-output Objective is Minimize

Mat lab optimizing files

Step 1: the first file defines the function

function F = lsq(pid, a1, a2) Kp = pid(1); % Move variables into model parameters Ki = pid(2); Kd = pid(3); % choose solver and set model workspace to this function opt = simset('solver', 'ode5', 'SrcWorkspace', 'Current'); [tout, xout, yout] = sim('optsim', [0 100], opt); F = yout-1; % compute error signal

Mat lab optimizing files contd.

Step 2: The second file invokes the model and the optimizing routine
kolmodel % loads the model

pid0 = [1 10 12] % setting initial values a1 = 0; a2 = 0.0005; options = optimset('LargeScale', 'off', 'Display', 'iter', 'TolX', 0.001, 'TolFun', 0.001); pid = lsqnonlin('lsq', pid0, [], [], options, a1, a2) % put variables back into the base workspace Kp = pid(1); Ki = pid(2); Kd = pid(3);

Initial values of the parameters are defined

Optimization results

Kp, Ki, Kd values after 55 function evaluations


pid0 = 1 5 10 Step-size 1 0.375 0.253 0.293 0.0868 0.119 3.28e-007 Directional derivative -4.91e+012 -1.51e+011 -2.33e+011 -8.38e+010 -8.32e+010 -1.63e+011 -3.27e+011 Lambda 1.32032e+012 8.77204e+011 1.68981e+012 2.02202e+012 2.60576e+012 1.07078e+018

Iteration Func-count Residual 1 3 4.76719e+012 2 10 4.70723e+012 3 17 4.65431e+012 4 24 4.58281e+012 5 31 4.56367e+012 6 39 4.53102e+012 7 55 4.53102e+012 Optimization terminated successfully: Search direction less than tolX pid = 0.7234

4.9399 10.0233

Results

The results obtained are nearly the best approximation for a stable system because of error minimization It is a more scientific and logical method Better than the current trial and error method The values can be directly used on the WSDK kit to see how they fit

Recommendations for future work

Due to difficulty of using a specific model a generic model was chosen. Future team members could try to work on the specific model Thought the iterative steps were eliminated, still the initial value had to be chosen. Only one method was dealt with. More methods can be used and compared for the best results

Acknowledgements

Dr. Hall, Dr. Shell and Dr. Huston Robotics team members, past and present MINE department staff

Anda mungkin juga menyukai