Copyright is owned by the Author of the thesis. Permission is given for a copy to be downloaded by an individual for the purpose of research and private study only. The thesis may not be reproduced elsewhere without the permission of the Author. Massey University Library Mechatronic Design and Construction of an Intelligent Mobil_e Robot for Educational Purposes A thesis presented in partial fulfilment of the requirements for the degree of Master of Technology . Ill Engineering and Automation at Massey University, Palmerston North, New Zealand Julian George Phillips 2000 ABSTRACT The main aim of this project was to produce a working intelligent mechatronically designed mobile robot, which could be used for educational purposes. A secondary aim was to make the robot as a test-bed to investigate new systems (sensors, control etc.) if possible. The mechatronic design of the robot was split in to three sections: the chassis, the sensors and the control. The design and construction of the chassis unit was relatively simple and very few problems were encountered. The drive system chosen for the robot was a four-wheeled Mecanum drive. The major advantage of this system is that it allows multiple degrees of freedom while keeping the control and the number of drive motors to a minimum. 11 The design and construction of the sensors was the main research section. The sensor design evolved around the use of ultrasonic sensors. While a phased array type arrangement was tried with the intention of improving the angular accuracy of the sensors, the use of frequency modulation was used in the end and it proved to be excellent except that the problem of angular accuracy was still not solved. The entire mechatronic system was completed except for the micro controller programming. It operated well when it was given the correct inputs and performed all of the functions it was designed for. It is strongly recommended that further work be done on the use of a computer motherboard instead of the current micro controller as this would allow for easier programming, more complex programs and easy implementation of map building. ACKNOWLEDGEMENTS The research was carried out under supervision of Dr Peter Xu, Senior Lecturer, Institute of Technology and Engineering, Massey University. The work in this thesis was made possible by the help of Ken Mercer and Collin Plaw who helped me with the design and construction of the circuits and also helped me learn how to use Orcad. 111 The wheel and chassis unit was also constructed with the help of Leith Baker who machined the rollers for the wheels and gave suggestions, which made the design easier to construct. The technicians in the engineering workshop and particularly Don McLean were also very helpful in producing parts of the chassis unit. The work presented in this thesis was partially supported by MURF (Massey University Research Funds). CONTENTS Abstract Acknowledgements 1 Aim, Objectives and Conceptual Ideas 1.1 Aim 1.2 Objectives 1.3 Mechanical/drive system 1.3.1 Requirements 1.3.2 Mechanical complexity 1.3.3 Proposed drive configuration 1.4 Control 1.4.1 Requirements 1.4.2 Electronic complexity 1.4.3 Difficulty of programming 1.4.4 Proposed control strategy 1.5 Sensors 1.5.1 Requirements 1.5.2 Complexity 1.5.3 Proposed sensor system 1.6 Navigation 1.6.1 Requirements 1.6.2 Complexity 1.6.3 Range 1.6.4 Accuracy 1.6.5 Proposed navigation technique 2 Literature Review 2.1 Introduction 2.2 Configuration 2.2. 1 Drive types 2.2.2 The Mecanum principle iv ii 1 1 1 2 2 2 2 5 5 5 5 5 7 7 7 7 9 9 9 9 9 10 11 11 11 11 14 V 2.2 Sensors 15 2.3.1 Odometry 15 2.3.2 Heading 16 2.3.3 Tactile 17 2.3.4 Range 17 2.3.5 Ultrasonics 18 2.4 Control 22 2.4.1 Regular control 22 2.4.2 Fuzzy Logic 22 2.4.3 Neural Network 23 2.4.4 Genetic Algorithm/Programming 23 2.5 Navigation 24 2.5.1 Odometry 24 2.5.2 Active Beacon Navigation 25 2.5.3 Landmark Navigation 26 2.5.4 Map Based Positioning 28 3 Mechanical design 30 3.1 Materials and Methods 30 3.1.1 Wheels 30 3.1.2 Chassis 32 3.1 .3 Motors and Batteries 33 3.2 Results 34 4 Sensor Design 36 4.1 Ultrasonic Sensing 36 4.2 Materials and Methods 48 4.2.1 Frequency Modulation 59 4.3 Results 69 4.3.1 Frequency Modulation 74 5 Motor Control and Programming 5.1 Materials and Methods 5.2 Results 6 Entire Mechatronic System 7 Discussion 7.1 Motor and Chassis Unit 7.2 Sensors 7.3 Motor Control and Programming 7.4 Entire Mechatronic System 8 Conclusions and Recommendations Appendices Appendix A Appendix B Bibliography vi 77 77 82 84 86 86 88 92 93 94 96 96 109 117 Figure 1.1 Figure 3.1 Figure 3.2 Figure 3.3 Figure 3.4 Figure 4.1 Figure 4.2 Figure 4.3 Figure 4.4 Figure4.5 Figure 4.6 Figure4.7 Figure4.8 Figure4.9 Figure 4.10 Figures and Tables Mecanum drive directions. Final Solid Works wheel design. Digital photo of actual wheel. Solid Works drawing of wheel and chassis assembly. Digital photo of wheel and chassis unit. Direct and indirect crosstalk. Relationship of outgoing and reflected waves. Phase detection circuit. Frequency shift. Arrangement of original sensor layout. Sensor layout for the second method (phased array). Summing operations. Block diagram of program. Block diagram of program extension. Diagram of the frequency modulation/demodulation circuit. Figure 4.11 Representation of the output. Figure 4.12 The amplifier circuitry. Figure 4.13 H-Bridge circuit used for driving the transmitter. Figure 4.14 Oscillator circuit. Figure 4.15 VCOs' and PLLs'. Figure 4.16 The final circuit as it appears in Layout. Figure 4.17 Solder mask of the final design. Figure 4.18 Plot of one of the best outputs. vii Figure 4.19 MATLAB plot of output signal from the best sensor arrangement. Figure 4.20 Graph of threshold result at 38kHz and threshold of 0.55. Figure 4.21 Graph of threshold result at 40kHz and threshold of 0.55. Figure 4.22 Graph of threshold result at 42kHz and threshold of 0.55. Figure 4.23 Resulting graph from multiplication of the three threshold results. Figure 4.24 Graphical results of the physical test. Figure 4.25 Histogram from two different objects at different distances. Figure 4.26 Histogram resulting from a right-angled object. Figure4.27 Figure 5.1 Figure 5.2 Figure 5.3 Figure 5.4 Figure 5.5 Figure 5.6 Figure 6.1 Figure 6.2 Figure 6.3 Figure A1 FigureA2 Figure A3 Figure A4 FigureA5 Figure A6 Figure A? Figure AS Figure A9 Figure A10 Figure A 11 Figure A 12 Figure A 13 Figure A 14 Figure A 15 Figure A 16 Figure A 17 Figure A18 Figure A 19 FigureA20 Table 4.1 Table 5.1 Table B1 Digital photo of the final sensor circuit. Half of the motor drive circuit. Voltage multiplier. Comparator circuitry. Motor control circuit as it appears in layout. Solder mask of the motor control circuit. Digital photo of the final circuit. Right-hand view of the complete system. Front view of the complete system. Left-hand view of the complete system. Original concept. Original design of the chassis extension. Final design of the chassis extension. Main block of the chassis extension. Cross member of the chassis. Side member of the chassis. Base plate. Motor. Wheel arrangement (opposite of A 10). Wheel arrangement (opposite of A9). Alternative wheel design. Motor and chassis unit using Barbeque Rotisserie motors. Isometric view of final design. Top view of final design. Side view of final design. Exploded view of final design. Wheel frame . Engineering drawing of wheel frame. Roller and roller shaft assembly. Engineering drawing of rollers. Table of best initial optimisation results. Table of inputs and outputs for the motor control circuit. Full table of initial simulation results. viii 1 AIM, OBJECTIVES AND CONCEPTUAL IDEAS 1.1 Aim The main aim of this project was to produce a working intelligent mechatronically designed mobile robot, which could be used for educational purposes. A secondary aim was to make the robot as a test-bed to investigate new systems (sensors, control etc.) if possible. 1.2 Objectives The objectives of this project were as follows: 1) Create a working mobile robot. 2) Make the sensor system by means of which the robot can avoid objects in a cluttered room. 3) Give the robot some intelligence so that it can adequately avoid obstacles. 4) Make the robot in such a way that it can be built on in future projects. 5) Make the robot self-navigating (if there is time). 6) Carry out some new research on one or more aspects of the design. The following sections are about the requirements for each part of the robot and the intended solutions. 1 1.3 Mechanical/drive system 1.3.1 Requirements The requirements for the robots mechanical configuration were that the robot had to be able to manoeuvre in tight spaces. It had to be stable. It had to be able to operate by battery power and it had to be robust. 1.3.2 Mechanical complexity 2 The complexity of the drive configuration decides the mobility and agility of a mobile robot. It was not seen as a major problem because the physical aspects of a mobile robot are relatively easy to build (apart from the space requirements). Also the mechanical design and construction is straight forward although time consuming and as long as everything is built strong and light enough with consideration being taken for the circuitry, navigation etc. there should not be any major problems. 1.3.3 Proposed drive configuration The proposed drive system uses a four-wheeled Mecanum drive. This was chosen because the Mecanum drive has multiple degrees of freedom, which give good mobility and agility. The Mecanum drive also uses very few motors, which keeps the complexity of the programming to a minimum. The Mecanum system is where the wheels have free rotating rollers around their circumference. These rollers are set at 45Q to the normal direction of travel. The rollers are also made in such a way as there is at least one roller in contact with the ground at all times. Figure 1.1 (page 3) shows the types of movements that can be achieved with a four-wheeled Mecanum drive system: i Forward l..d t Di a~nal R ,rward Reverse Left Dia~nal R eYeel:e Left Right Dia3=> nal Focwaid Right Diagonal Reve= 0 B I "El od shows \'1 •red LJ di1e-crio n of ,..-,heel mo,-e-raerr C11c,,·e Figure 1. 1 Lateral Arc Rotation Some of the different drive directions possible with a Mecanum drive system. Adapted from [20]. 3 A four wheeled Mecanum drive system requires one motor for each wheel but due to there being no steering of the wheels the only complexity is in the construction of the wheels themselves. It is however believed that the wheels can be constructed relatively easily using the facilities at Massey University. For rigidity and ease of construction it is recommended that the construction of the chassis and wheel units be made from aluminium. Aluminium also has the advantage of being lightweight. For the circuit box it is also recommended that aluminium be used for the same reasons but it will need the use of some insulation material. The rollers on the wheels will need to be made from plastic in order to increase the grip as they only have point contact with the ground. 4 It was proposed that the use of all of the drive directions shown in Figure 1.1 be implemented except for the curve and lateral arc as these required more difficult control of heading and motor speeds. The remaining drive directions are easy to implement, as they only require three states; forward, reverse and stopped. These can be achieved through the use of motor controller chips. 1.4 Control 1.4.1 Requirements The control needs to enable the robot to make a choice about what direction to go in when an obstacle is encountered . It also needs to make sure the robot does not get stuck. This then necessitates a control strategy, which either avoids repetition, or avoids local minima. 1.4.2 Electronic Complexity 5 The complexity of the electronics is not considered to be a serious problem although it will have to be kept to a level , which will be able to be implemented on a small mobile robot and within the time constraints. This of course depends on the complexity of the sensors, the control and the navigation. If the robot creates its own maps or has to store maps the circuitry will of course be more complex because a large memory is required. 1.4.3 Difficulty of Programming The programming can be made easier by splitting the required programming into navigation, sensor control , motor control and robot strategy. The programming could also be done on a higher level programming language but this would involve putting a computer on the robot , which may be a possibility if there is time or it could be the subject of a future project. 1.4.4 Proposed control strategy Firstly it was proposed that a modular system be used for the electronics where extra or different control systems, memory etc. can be put in or swapped at a later date. Also the circuits should be properly designed and etched so as to produce optimal performance, cut down on space and reduce wiring/connection problems. 6 For the actual control system two micro-controllers should be used. One is for the motor and direction control and the other one is for the navigational control. These micro-controllers will have to work together but by making it a master/slave relationship there should not be any problems. It is also proposed that the two micro-controllers should be able to work separately so that the drive and/or navigation systems can be changed at a later date. Also this should help in the testing stage as it makes each part simpler. The programming of the motor control should be simple as the instructions given to the motors are simple and there are only a few outputs and inputs. The programming of the navigation system will likely be a lot more difficult as it requires the timing and comparing of several inputs. This is likely to be the most difficult part of the project and initially it is intended to keep it as simple as possible. 7 1.5 Sensors 1.5.1 Requirements The main requirement of the sensors is that they can detect obstacles at a range sufficient enough to avoid obstacles. Secondary requirements are that the sensors should be accurate and be able to detect the majority of common obstacles. If map creation is used then the sensors also need to be accurate in both distance and angle. 1.5.2 Complexity The complexity of the individual sensors is not seen as a significant problem as most sensors come as a package. The operation of the sensors is however more important due to the limited computing power available. The use of the sensors is however considered to be a significant and vital part of the project. 1.5.3 Proposed sensor system The sensor system proposed was to use ultrasonic sensors for detecting the range and angle of obstacles. The sensors would be placed in an arrangement similar to radar where there is one detector on either end of a rotating beam. This beam is horizontal and is rotated at the centre. The transmitter is also fixed at the centre. The system is intended to work in the following way: 1) The transmitter sends out an ultrasonic pulse at intervals. These intervals are sufficiently far apart to allow the previous pulse to return and be recorded before the next one is sent out. 2) The receivers both pick up the returning signal (if there is an object present) . 3) The two signals from the.sensors are then added together. 4) The resulting signal is then given to a peak detector and when the object is equally distant from both sensors the peak will be at its highest magnitude. This means that the angle can be measured from the angle the beam is at when the peak is at its maximum. 8 5) The return delay of the signals is also recorded when the maximum peak is reached. This gives the distance measurement of the object. There was no intention to use any alternative types of sensor because the aim was to try and get the ultrasonic sensing good enough to avoid all obstacles before the robot gets close enough to hit them. 9 1.6 Navigation 1.6.1 Requirements The robot is required to navigate in a room/corridor type environment without bumping into obstacles. A secondary requirement may also be to avoid other moving objects in the environment. It is also considered that the room or corridor may be cluttered and there may be many narrow objects such as chair legs. 1.6.2 Complexity The navigational complexity must be such that the necessary computations can be made by the robot while allowing the robot to move at a reasonable speed. The number of sensors required for the navigation also needs to be kept to a small number to reduce the amount of information processing. The navigation must also be able to handle the majority of situations the robot is faced with and therefore a reasonable complexity will be required to achieve this . 1.6.3 Range The range of the sensors needs to be sufficient to allow the robot to avoid obstacles in the environment. This means that the robot must have enough space to stop in before it hits the obstacle. A secondary requirement is a sufficient range for the robot to be able to see which path is best. 1.6.4 Accuracy The navigation also needs to be relatively accurate so that the robot is able to see the majority of obstacles and doesn't see fake obstacles (phantom obstacles which are caused by reflections etc.). Also if map building is to be 10 used then the navigation needs to be accurate enough to build a meaningful map of the environment. 1.6.5 Proposed navigation technique The proposed navigation technique was to use local mapping where the robot creates its own maps from sensor scans. The map would consist of an array of cells. The cells will each contain a probability that an obstacle exists within the area of the cell. The reason for this was to hopefully overcome one of the major problems with ultrasonic sensing which is that of reflections causing fake obstacles. The reasoning behind this is that as the robot moves the fake obstacles will only be in a particular position at a particular angle. This means that the cells where a fake obstacle is detected will not register that an obstacle is there because the majority of the sensor sweeps will register no obstacle producing a low probability of an obstacle existing in the cell. As the robot moves the map will also move with it. This means that the robot will always be able to choose the best path through the obstacles around it by consulting the map. 11 2 LITERATURE REVIEW 2.1 Introduction This literature review was carried out in order to obtain a general idea of what has already been done in the various fields of mobile robotics in which this project is involved. The second aim of the literature review was to obtain an understanding of the specific topics that are covered by this project. The final aim of the literature review was to identify new research topics or continuations of research that could be used as a basis for the project. Throughout the literature review the majority of the emphasis is placed on topics that relate either directly or indirectly to the various sections of the project. This was done so that the aims of the project became more focussed. Another reason was that there is not much point in reviewing literature, which has little or no bearing on the project being undertaken. Each section of the literature review also has a general discussion of the various characteristics and techniques. Contained within this, there is also a discussion of their advantages and disadvantages with respect to this project. 2.2 Configuration 2.2.1 Drive Types The lack of modern literature on this topic (except for non-research literature) indicates that this field has already been thoroughly researched . The exceptions to this are the more unusual drive types and walking robots. Through the process of tracking down literature it was discovered that walking robots are still a highly researched topic but the majority are very complex both mechanically and in the programming. This would make the robot too difficult to construct within the time and budget constraints. For this reason walking robots are not included in the literature review. Tricycle Drive Tricycle drives cause the vehicles centre of gravity to move away from the front wheel on an incline causing loss of traction [3]. Tricycle drives are also often used for AGV applications because of their inherent simplicity [3]. Tricycle and Ackerman steering systems are similar to the steering mechanism on a car [20]. There is however no mention that Ackerman steering is more stable and also more difficult to construct. Ackerman Steering Ackerman steering is used almost exclusively in the automotive industry [3] . Unfortunately there is no supporting statement to say why this is but the assumption would be that it is difficult to implement compared to other robot drive configurations. Differential Drive 12 The differential drive has problems with the drive wheels occasionally loosing contact with the ground [20] . This only occurs in rough terrain and it can be improved by the correct placement of the caster wheels. Miss matches in the motors or drive in the differential drive causes the robot to veer to one side making steering difficult [20]. Synchro Drive The Synchro drive has very simple software control [20]. All other literature on this topic points to the same conclusion. The Synchro drive suffers from increased mechanical complexity [20] . There may be errors in wheel alignment for the Synchro drive mechanism [3]. This is mainly caused by the slack in the belts or gears. There may also be problems with friction when the wheels turn [3]. Of the problems mentioned the second problem can easily be overcome by making the turning system more powerful but the first problem may cause friction while the robot is moving and may also introduce errors if Odometry is used [3]. 13 Tracks The use of tracks is a special implementation of the differential drive where skid steering is used (3]. Skid steering relies on wheel slippage resulting in poor Odometry measurement. This is why tracked vehicles are generally only used for tale-operated robots (3]. If however the robot relied on a different source of distance measurement then the skidding action would not be important. Tracked vehicles are generally used for surmounting floor discontinuities (3]. Tracked vehicles are definitely better at this than the other types of drive configuration except for walking robots, which can have the ability to step up, down or over discontinuities. Multi-Degree-Of-Freedom (MDOF) Vehicles Multi-Degree-Of-Freedom (MDOF) vehicles display exceptional manoeuvrability in tight quarters in comparison to conventional mobility systems (3). All other literature read confirms this and it is because the robot does not have to turn corners to get around them i.e. the robot can travel in any direction without turning. In general it is thought that [20] places too much emphasis on suspension systems where they are not really needed. This is because none of the other text read mentions this and all of the robot systems seen working operate perfectly well without suspension. It may however be important in situations where the drive type requires all wheels touching the ground at all times in order to work. In general [3] does not reveal much information about the different drive systems when compared to the other sections of the book. This is probably because the drive systems mentioned are all relatively standard and therefore it is considered that enough is already known about them. Also it would take up a lot of time and effort to go into the more unusual drive configurations in any detail. 14 2.2.2 The Mecanum Principle The Mecanum principle, although it is complicated to construct has the advantage of being Multi-Degree-Of-Freedom (MDOF). Another advantage of the Mecan um principle is that it does not require any turning of the wheels. This cuts out some of the major inaccuracies in steering. The following is a review of the current literature on the Mecanum principle with respect to its use in mobile robotics. It would take six motors to provide the same degrees of freedom as a four wheeled Mecanum drive system using four motors [20]. Another minor point about the Mecanum wheel is that the rollers on the wheel only have point contact with the surface eliminating scuffing [20]. This may also introduce the problem of slipping which reduces the effectiveness of the movement. The Mecanum principle gives a practical way of providing simultaneous vehicle motion in all three directions, longitudinal, lateral and yaw [20]. One of the problems in the construction of a Mecanum drive system is that the wheels have to be orientated correctly and failure to do so results in degradation of the vehicles motion [20]. This however is very simple and is not really a serious problem. The control of a Mecanum wheeled robot is easier and less complex than some of the regular drive configurations [20]. It is similar to the control of a differential drive vehicle, which is very simple, except that there are four wheels to control instead of two. Due to the unrestricted manoeuvrability and simplicity of control, these vehicles are especially adaptable for autonomous or tele-operated operations in tight and cluttered spaces [25]. This is an example of the manoeuvrability of the Mecanum drive system. Any combination of forward , sideways, and rotational movement is possible [26]. Due to the omnidirectional driving concepts this allows the wheelchair to move even within packed indoor environments because of a non-restricted positioning capability [26]. This is another example of the manoeuvrability of the Mecanum drive system. The vehicles presently employed for warehouse and shipboard materials handling operations manoeuvre with precision and operate under low traction conditions, on steep ramps , and over obstacles [25] . This gives a good idea of what a properly constructed Mecanum based system can achieve. 15 2.3 Sensors In general there is a lot of literature on sensors but most of it is from companies trying to sell their products. There is also a lot of literature on applications of sensors and sensor fusion but this does not mention much about the sensors themselves. This review attempts to use a balance of the two types to get a good picture of what is available and what has been done. 2.3.1 Odometry This section covers sensors that are used for Odometry or Dead Reckoning. Odometry systems are self-contained but on the down side the position error grows without bound unless an external reference is used occasionally, the foremost error in odometry is that any small momentary orientation error will cause a constantly growing lateral position error [3]. There is a good range of different optical encoders and velocity sensors that can be used to measure the motion of a robot [3] . A good description of each, how they work , what they are most suited to , advantages and disadvantages etc. is given by [3]. The description of incremental and absolute optical encoders is particularly informative but unfortunately hardly any information is given on ultrason ic speed sensors except that they work on similar lines to Doppler speed sensors i.e. speed is measured by the compression of sound waves and the corresponding change in frequency is proportiona·1 to the speed. A short description of optical encoders is given by [8] but no detail is given. Shaft encoders are used in all of the Eye-Bot family of robots [5]. The encoders are used via a Pl controller to maintain constant wheel speed, keep the robot moving in a straight line and to update vehicle position and orientation [5]. Unfortunately there is no mention as to how efficient or accurate this is. 16 There is always some differential slippage in the wheels, which can cause pure dead reckoning systems to go awry [15]. This is backed up by the statement that there is positioning error due to wheel slippage or uneven ground [24] and [21 ]. Also for some drive systems (such as tracked vehicles) the wheel slippage is such that no meaningful information can be obtained from the sensors. Dead reckoning (or Odometry) should be used with some other form of external sensor and compare positions on a map and thus estimating the position [15] and [24]. This would be a good idea as the other sensors or external referencing can be used to nullify the errors in the odometry and vice-versa. In general from the literature read it seems that Odometry is not a topic, which is currently being researched except in combination with other techniques. It also appears that most scientists do not view Odometry as being very accurate and thus they are looking at more accurate systems and at systems, which give some range information. 2.3.2 Heading This section covers sensors that are used to determine a robots direction. These sensors can be used in compliment with Odometry sensors to give a direction or with range sensors to give a direction (usually in both cases to a point on a map). Heading sensors are most often used to compensate for the foremost weakness in Odometry, which is from errors due to slippage [3]. The two most common types of heading sensors are gyroscopes and compasses [3]. An extremely good description of the different types of gyroscopes and compasses giving the advantages and disadvantages of each is given by [3]. An indication of the cost is also given and it is stated that some of the more accurate gyroscopes and compasses can be very expensive. A good general description of gyroscopes and how they work is given by [8] but the description does not go into any detail. Offset error leads to continuous drift 17 from changes in temperature over time (22]. This is only for a specific type of gyroscope but other gyroscopes seem to have problems with the offset error as well. In general apart from [22] there does not seem to be much research being undertaken with heading sensors. This is probably because companies are carrying out most of the research and development in order to produce new types or improvements. Also it is a relatively mature field where a lot of money has to be invested in order to produce only small improvements. 2.3.3 Tactile This section covers sensors that are used for touch sensing. Sensors of this type were not considered as useful for the project as one of the aims was to try and avoid objects rather than reacting when the robot comes in contact with the object. Most scientific literature and research on mobile robotics also seems to be moving away from the use of tactile sensors except for in legged robots and robotic arms used for pick and place type applications. 2.3.4 Range This section covers sensors that can detect obstacles at a distance from the robot. This section was considered to be very important, as one of the aims was to try and avoid objects, which is what range sensors are used for. Infra-Red The IR range sensors that were used in the Eye-Bot family due to a number of reasons generate false readings from time to time [5]. This is also consistent with most other IR sensors. The accuracy of an IR range finder is reflectance dependent (21] i.e. errors become significant when the return signal is weak. 18 Ultrasonic Ultrasonic sensors are not good at detecting angle but the range resolution is accurate [24]. Detecting the angle seems to be a common problem with range sensors but this should be able to be overcome by scanning or by using two sensors and triangulating the readings. A good general description of ultrasonic and optical range finders and how they work is given by [8] but it is not covered in any detail. Ground based RF beacons and GPS An entire section is devoted to ground based RF beacons and GPS systems by [3] but both of these systems are well beyond the range of this project in budget. They are also more suited to long range out-door applications. Laser Scanners A good description of a 2-D laser scanner and its application to environment modelling is given by [12] . The complexity of calculations and noise however make this system difficult to implement. The cost of laser systems was also prohibitive for their use in this project. 2.3.5 Ultrasonics The use of ultrasonics seems to be the best option due its low cost and reasonably accurate ranging. It is however not very good with angular accuracy but this should be able to be overcome through the sensor arrangement. The following is a review of the current literature on ultrasonics within the mobile robotics field. A very good description of the problems associated with obstacle detection using ultrasonic range finders is given by [2]. If a surface is perpendicular to the sensor then most of the energy will be reflected back but if the surface is at right angles only an undetectable amount of energy will be reflected back [2] . A good description of why this occurs is also given. In the situation where most of the energy is reflected away from the sensor there is also a chance 19 that it will then reflect off another obstacle and back to the sensor. In this case the sensor would see a false obstacle (an obstacle which is not where it seems to be) similar to what we see when we look in a mirror. The amount of reflected sound depends strongly on surface structure of the obstacle and that unfortunately most common indoor objects have a smooth surface, which decreases the amount of reflection [2]. Increasing the frequency (decreasing the wavelength) increases the amount of reflection but increases the energy dissipation [2]. Another side affect of this is that the signal processing required is also much more difficult at high frequenc ies. The angle of a smooth surface, which can be detected, can be up to 40-45Q if a high receiver gain is used [2]. It is also mentioned that this causes a decrease in directionality and occasional misreading of distance. The directionality of the transmitters can also cause problems [2]. This is because as the sound spreads out and bounces back, if there is a wide angle of spread we are less likely to know from where it was reflected. Environmental noise is very likely to occur when more than one robot is operating in the same environment [4]. There is no mention however to noise created by other machinery or whether there are any ambient noise problems. Further reading seems to suggest that ambient noise or noise from machinery is not a significant problem as the frequencies used are not common and are very confined. Cross-talk noise is when one sensor picks up the signal emitted by another sensor on the same robot [4]. Ref. [4] then goes into detail about the methods of rejecting noise and does a good job of explaining how it is achieved. The main problem with sonar (ultrasonic) sensors is that instead of bouncing back toward the sensor. The sound pulse can hit an obstacle and bounce away from the sensor. Then either the sensor sees nothing or objects, like 20 reflections in a mirror, appear to be much farther away [23]. This is a very good description of what is a major problem in ultrasonic sensing. This is also backed up by [17]. Ref. [23] however does not mention angle or dispersal, which may also cause problems where the angle is also important for determining position. Ultrasonics do not have any problems with dark or dim conditions, luminosity, colour or transparency because they do not work by optical means [17]. Ultrasonics can however be affected by temperature and humidity [17]. This would be because these change the acoustical properties of the air making sound travel faster or slower. This should not be a severe problem except in extreme conditions and if the accuracy was vital then a temperature sensor could be incorporated and the appropriate adjustments made accordingly. The minimum step size, which can be taken , is determined by the maximum distance at which the hardest object to detect (an edge) can be detected [11 ]. The method used by [11] uses the previous statement as its basis and also uses angular detection by rotating the sensor and finding the central peak of any signal, which occurs. As a consequence of the detection mechanism in the sonar, the depth reading refers to the depth of the nearest reflecting surface [6]. There is no mention as to what happens when the nearest surface gives a much weaker signal than a surface behind it and it would be reasonable to assume that the larger signal would drown out the smaller one. Not much reference is given to this problem in other texts and it may be that the problem is one of different objects being more difficult to detect than others. Ref. [6] goes on to describe a good method of the use of a rotating ultrasonic device. No reference is given as to how the method overcomes any of the major problems of ultrasonic sensing. This is probably due to the main concentration of the article being on the World Modelling system. 21 An ingenious method for three-dimensional detection of objects using ultrasonic sensors is described by (?]. The system works by using triangulation of the return signal by three sensors set at the corners of an equilateral triangle. This system gives accuracies of a few millimetres in distance and a few degrees in angle and elevation [7]. This statement is well backed up by the text and shows a reasonable solution to the inherent angular accuracy problem of ultrasonic sensors. There seems to have been a lot of work in recent years involving ultrasonic sensors but the majority of it seems to be in better use of the information obtained from the sensors. A lot of the work that has been done on the sensors also seems to be theoretical and simulation based rather than practical implementations of sensor systems. Some work has also been done in trying to cut out or eliminate some of the problems associated with ultrasonic sensors and it is obvious that there is still plenty of opportunity for research in this area. 2.4 Control In general the novel and new techniques of control such as Fuzzy Logic, Neural Networks and Genetic Algorithms/Programming seem to be very hot topics at the moment. The regular type control methods now only seem to appear when another topic is being tested in order to cut down on programming difficulty in the available literature. The following sections only give a small review of the main points. 2.4.1 Regular Control 22 Regular control seems to have been used for almost every application before Fuzzy Logic, Neural Networks and Genetic Algorithms/Programming took over certain applications due to being better able to cope with the situation. Regular control covers such a broad range of applications and types that it would take too much work to cover them all. Also due to them only being mentioned in modern literature where some other research topic is the main topic it seems that research has moved away from this field. For these reasons a review of literature on this field was not included even though regular control was intended to be used for this project. 2.4.2 Fuzzy Logic There are three reasons why Fuzzy controllers are difficult to design [1 ]: 1) The choice of appropriate inputs to make Fuzzy. 2) The definition of rules, and the possibility to give more importance to rules, or to group several rules. 3) The way to defuzzify outputs of the system. Ref. [1] proposed an interesting new approach to the design of Fuzzy controllers where it is argued that the global behaviour is the fusion of local behaviours of each physical part, instead of the fusion of high-level 23 behaviours. A good description of Fuzzy control and how it is achieved is also given by [1 ]. 2.4.3 Neural Network A typical approach is to use neural networks for non-linear system modelling [9]. This is because neural networks are very good for approximating complex non-linear functions. A real robotic system is used by [9] for testing the neural network whereas most previous work has been on simulations. The vast majority of neural network research still relies on fixed-architecture networks trained through back-propagation [14]. There are two major problems with this approach [14]: 1) The "appropriate" network architecture varies from application to application but it is difficult to guess this architecture. Also even within the same application functional complexity requirements can vary widely. 2) Back-propagation and other gradient descent techniques tend to converge rather slowly. The use of flexible cascade neural networks and extended Kalman filtering respectively to solve the two problems is then described by [14 ]. 2.4.4 Genetic Algorithm/Programming Genetic algorithms are search strategies, which use a mechanism analogous to evolution of life in nature [18]. This statement is backed up by most literature on this topic. It is widely recognised that genetic algorithms work even for problems where traditional algorithms cannot find a satisfactory solution within a reasonable amount of time [18]. This is where the real advantage of genetic algorithms is realised but [18] does not state this. Ref. [18] then explains how genetic algorithms can be used for motion planning in time-varying or unknown environments. This is very important for outdoor work where this covers the majority of environments. 24 2.5 Navigation Navigation in general is a hot topic at the moment with a wide variety of types and applications being discussed. The reason for this is that navigation is extremely difficult to do reliably and quickly with the limited computing power on a mobile robot. Also there are many ways in which it can be achieved with varying degrees of success. There is however no one method that is close to being ideal. 2.5.1 Odometry Dead reckoning is widely used for mobile robot navigation because of its simplicity and easy maintenance [16] and [3]. There is also reference to the low cost of dead reckoning systems. Simplicity, maintenance and cost are all important factors in most applications unless there is a large amount of funding and resources. Encoder navigation can provide accurate information when the encoder errors are carefully calibrated [16] . This of course depends on the type of drive configuration and environment but no mention is given to this. Inertial sensors such as gyroscopes and accelerometers can also be used but that these also have problems with errors [16]. While odometry provides good short-term accuracy, the integration of incremental motion information over time leads inevitably to the accumulation of errors [3]. Ref. [3] gives an excellent description of the different odometry errors, the measurement of the errors and techniques to minimise them. Nevertheless odometry or dead reckoning does not seem to be being researched much at the moment. This is most likely because it has been thoroughly researched and that there are a lot of advances taking place in the more complex forms of navigation. Why odometry is commonly used in robot navigation is due to low cost but there now seems to be a trend towards the more complex forms of navigation. 2.5.2 Active Beacon Navigation 25 Active beacons are considered to be at odds with complete robot autonomy but they offer many advantages to counter this [3] . Active beacon navigation is the most common navigation aid on ships and aeroplanes [3]. This gives an example of the range available to this type of system it also gives a relative example of the likely cost. Active beacons can also be detected reliably and provide very accurate positioning information with minimal processing [3]. All of these points are valid and highly desirable. Active beacon navigation systems have very high installation and maintenance costs [3]. This is highly undesirable and in a lot of cases uneconomic. Accurate placement of beacons is required for accurate positioning [3] . As long as the robot is placed in a position to accurately measure the distances to the beacons at the start of its run then there should not be a problem unless the beacons move which is highly unlikely. It seems that researchers in general are not looking at active beacon navigation at the moment. This could possibly be because as [3] has stated they are at odds with complete robot autonomy or that they are too expensive. It could also be that there is not much left to research on this topic. Active beacon navigation also has the added disadvantage of being very fixed and inflexible which means that unexpected obstacles need to be avoided by a different method. This therefore means that active beacon navigation really only has a place in extremely structured and non-varying environments. Active beacon navigation is not being used for this project due to the cost and because the environment types intended to be used for this project are unstructured and dynamic (contain moving objects such as people) . 26 2.5.3 Landmark Navigation Ref. [24] used a system where the basic system uses odometry but the robot uses landmark navigation to keep the odometry measurement accurate. Ref. [24] then proposed the following system for navigation: 1) Find the landmark in the real environment and detect its range and/or direction by using an external sensor embodied with the robot. 2) Estimate robot's position by comparing external sensor data with landmark map, which the robot possesses. 3) Estimate robot's position by odometry. 4) Combine these estimated positions using uncertainty evolution techniques and renew the estimated position. This type of technique using odometry as the base and landmark navigation to correct the odometry measurements seems to be relatively common and a relatively good description of how the system works is given by [24]. Although [24] does not state it, coming across an unexpected obstacle is a problem with landmark navigation. Ref. [24] does not address this problem as the robot stops when an unexpected obstacle is encountered and waits for it to be removed. In image based landmark recognition changes in illumination, external clutter and changing geometry affect variability of the landmarks [19]. It is difficult to make use of accurate 3D information in landmark recognition applications [19]. It is not stated why this is but it is presumably because of the previous reasons. A good technique is to have a sequence of images of an object from common viewing angles and to use "visual learning" to teach the robot to recognise objects from these images [19]. An explanation is then given on how this achieved and how to overcome the various problems. This would also presumably use up a lot of memory, which can be a problem on a mobile robot with the space requirements and limited computing power. 27 Ref. [3] describes landmarks as being distinct features that a robot can recognise from its sensory input. This is a good definition and is much easier to understand than most other definitions given by other authors. Landmarks usually have a fixed and known position and are carefully chosen to be easy to identify [3]. These two conditions would seem to be essential for a landmark recognition technique to work. Ref. [3] describes the typical landmark recognition technique as follows: 1) Acquire sensory information. 2) Detect and segment landmarks. 3) Establish correspondence between sensed data and the stored map. 4) Calculate position. This is essentially the same as the first two steps outlined by [24]. Most other landmark navigation systems use similar techniques so [3] is correct in stating that it is a typical techn ique. Ref . [3] recognises that there are two distinct types of landmarks. These are defined as being natural landmarks and artificial landmarks. Ref. [3] then goes on to discuss the two types of landmarks , the advantages/disadvantages of each and the techniques used for landmark recognition in each case. Landmark recognition seems to be a good technique for navigation if the landmarks can be detected and identified reliably. It unfortunately requires a large memory to store the images or image segments in and requires complicated visual signal processing to get useful information from the cameras/sensors. This is beyond the scope of this project, as the time required implementing even a basic recognition system would take up the entire project. This is because vision systems require considerable amounts of signal processing and computer power. 28 2.5.4 Map Based Positioning Ref. [13] proposed the use of local maps as a set of best landmarks used for planning and executing safe motions. This is a good idea because the robot can then concentrate on the local area around it rather than trying to look at the entire global picture. Ref. [13] then goes on to describe a technique of global navigation , which is achieved through the use of a group of local maps linked via uncertainty transforms. While most researchers have addressed map learning, most have not addressed the ability of maps to be adaptive to changes in the environment [1 O]. In the real world environments are dynamic and change over time [1 O]. This means that regular landmark based navigation can be confused by changes in the environment. Ref. [1 O] proposed the use of an evidence grid type map where the objects can be changed and the robot will update its long-term map to accommodate the changes because the evidence it gathers suggests that something has changed . This system may have problems if too many objects change at once because the robot will not have enough known landmarks left to localize itself with. It is however a huge improvement on fixed maps. This method is however a very good method and the previous problem could be overcome by having the robot remember where it has previously been. Although most robots use maps few can create their own maps [23]. Ref. [23] uses maps in a different way where the robot explores its environment and creates its own map. Ref. [13] proposed the use of a technique called frontier exploration where the robot applies the following principle: Given what you know about the world, where should you move to gain as much new information as possible? Ref. [13] used a grid system where the robot changes the values of the cells depending on whether something is in the grid cell or not. This system is very 29 robust but it would be even better if the cells were treated as an evidence grid such as [1 O] used. Map-based positioning is a technique where the robot uses its sensors to create a map of its local environment and then compares it to a global map stored in its memory [3]. There is no reference to systems similar to what [23] uses but this may be due to the technique being a new one. Ref. [3] gives a complete list of the advantages and disadvantages of map-based positioning and also gives a good explanation of the building and matching of the maps. This is then followed by an explanation of the different types of maps (geometric and topographical). Overall , map based positioning seems to be the best method of positioning, which is in the budget and complexity range of th is project. The methods of map production and updating by the robot itself are also very good ideas and are suitable for both unstructured and dynamic environments. 30 3 MECHANICAL DESIGN 3.1 Materials and Methods The mechanical design was relatively easy and straightforward as there was no research and very little development of the design. It was decided that the chassis and drive system should be solid, well constructed and able to take a variety of sensor types and control systems. The design initially started as being orientated around the wheel design and followed this the whole way through . Sufficient space was also left open for the motors, the control circuitry, the batteries and the sensors. The reason for the design being orientated around the wheels is because of an interesting wheel design and drive system being chosen. This system operates using the Mecanum principle. The Mecanum principle is described in detail in the section on the Mecanum principle in the Background. The mechanical design was carried out using Solid Works , which is excellent for this type of design work . 3.1.1 Wheels It started with getting the basic configuration of the wheels to comply with the Mecanum principle. Several different techniques and layouts were tried before the first wheel design was created . The factors considered were: 1) Is the wheel stable. 2) Is the wheel design physically able to be made. 3) Does it conform to the Mecanum principle. Once a wheel design was decided on a model of the wheel was created to see if it could be constructed using the facilities available. This resulted in several minor changes but the basic idea was kept the same. 31 Figure 3.1 Final design of the wheel shown as printed from Solid Works. Figure 3.2 Picture of the actual wheel. 32 The construction of the wheel was relatively time consuming as the parts were difficult to make and all had to be correct or the wheel could not be assembled correctly. The wheel frame was made from solid Aluminium bar, which was machined to the correct shape. The rollers were made from Nylon and machined in a CNC lathe. The roller shafts, axle and connecting bolts were all made from silver steel. Spacers were made to fit between the two halves of the wheel frame in order to make the two halves meet. These spacers were made from 3mm aluminium plate. The spacers were made in order to solve the problem of the two halves of the wheel frame not meeting and this is described in the results section. 3.1.2 Chassis The chassis was the next part to be designed as this linked the wheels and the motors together and provides a base for the batteries, the control circuit and the sensors. The chassis was originally designed as a single piece but this was changed when the majority of the literature was read and it all seemed to say that suspension was required because all of the wheels have to be touching the ground at all times for the Mecanum drive system to work correctly. This required constructing separate sections to the chassis to hold each wheel and motor in such a way that they could rotate and form a suspensioy system. These sections were remade after it was found that the method o'f connecting them to the main chassis was not practical. The chassis was constructed from square Aluminium tube and bar. The cross pieces of the chassis were made from Aluminium channel and the top tray is Aluminium sheet. The whole chassis bolts together, which means that parts can be changed at a later date. 33 3.1.3 Motors and Batteries The motors were very difficult to obtain, as the drive requires a low speed (around 1 00rpm) and high torque. Initially small kitset model motors were tried but these were not built strong enough to handle the torque requirements. The next stage was to look at all available motors. This resulted in finding out that there was almost nothing in the range between the kitset motors and industrial type motors. All of the catalogue motor and gearbox sets were in the $300 plus range, which was beyond the project budget. The only remaining option was to look at motors, which were part of a different application. This resulted in four options: 1) Barbeque rotisserie motors, which had a high torque but were too slow and were noisy. 2) Battery powered drill or screwdriver motors, which were the correct speed and torque but were slightly expensive and difficult to mount. 3) Car windscreen wiper motors, which had plenty of torque and were cheap but were difficult to mount and drew much too high a current. 4) Car electric window motors, which had more than enough torque, were the correct speed and were cheap (when obtained from a car wrecker). The electric window motors were chosen and turned out to be a good decision except for the high current drain but this was minimised by using relatively modern motors. The motors turned out to be the perfect size for the robot and had a good mounting system. The high current drain unfortunately meant that the batteries go flat quickly and the motor control circuit had to be made more robust. The batteries were relatively simple to choose as a large storage capacity with high current rating and low cost was required. This meant that the only practical option was a sealed lead-acid battery. 34 3.2 Results The results of this section are relatively easy to determine. It either works or it doesn't. The wheels had a few minor problems. The first problem was that it was very difficult to get the holes lined up so that the roller shafts were correctly aligned. This resulted in a few extra holes in the wheels before it was corrected. The second problem was that the rollers did not have enough space between them. This was caused by moving the roller shaft location holes slightly to accommodate some slight changes in the machining. The assembly of the wheels turned up a number of new problems, which unfortunately could not be solved adequately as all the parts for the wheels had already been made. The main problem was that the holes for the rol ler shafts had been drilled at slightly the wrong angle, which meant that the two halves of the wheel frame did not meet when the wheel was assembled. A secondary problem was that the holes for the bolts, which held the two halves of the wheels together also did not line up correctly. This could have easily been avoided by drilling the holes after the wheels had been assembled. This however was not thought of before the wheels had been made and therefore more holes had to be drilled after the wheels were assembled. The production of the chassis also had some problems with it but these were solved eventually without too much time being waisted. Essentially apart from the time taken to complete the mechanical design it was successful and relatively few changes were made. This is mainly due to a lot of work being done in the design stage, seeking advice from the technicians on the design and when the parts were actually being produced. On the down side it would have taken less time (time that could have been used in research) and resulted in less mistakes if there had been sufficient funding and/or resources to allow all the construction to be done by the technicians. The pictures below (Figure 3.3 and 3.4) show the real results of the mechanical design: Figure 3.3 Solid Works drawing of the final assembly of the mechanical design. Figure 3.4 Digital photo of the chassis and wheel unit. More detailed pictures and engineering drawings of the mechanical design and some of its components can also be found in Appendix A. 35 4 SENSOR DESIGN 4.1 Ultrasonic Sensing This section provides some of the fundamentals of ultrasonic sensing and is adapted from [3]. 36 Most of these methods are applicable to ultrasonic sensing and comparisons are given between the different types of range sensing which is also helpful. Sensors for Map-Based Positioning Most sensors used for the purpose of map building involve some kind of distance measurement. There are three basically different approaches to measuring range: 1) Sensors based on measuring the time of flight (TOF) of a pulse of emitted energy traveling to a reflecting object, then echoing back to a receiver. 2) The phase-shift measurement (or phase-detection) ranging technique involves continuous wave transmission as opposed to the short-pulsed outputs used in TOF systems. 3) Sensors based on frequency-modulated (FM) radar. This technique is somewhat related to the (amplitude-modulated) phase-shift measurement technique. Time-of-Flight Range Sensors Many of today's range sensors use the time-of-flight (TOF) method. The measured pulses typically come from an ultrasonic, RF, or optical energy source. Therefore , the relevant parameters involved in range calculation are the speed of sound in air (roughly 0.3 m/ms - 1 ft/ms), and the speed of light (0.3 m/ns - 1 ft/ns). Using elementary physics, distance is determined by multiplying the velocity of the energy wave by the time required to travel the round-trip distance: d= Vt where d = round-trip distance v = speed of propagation t = elapsed time. 37 (1) The measured time is representative of traveling twice the separation distance (i.e., out and back) and must therefore be reduced by half to result in actual range to the target. The advantages of TOF systems arise from the direct nature of their straight-line active sensing. The returned signal follows essentially the same path back to a receiver located coaxially with or in close proximity to the transmitter. In fact, it is possible in some cases for the transmitting and receiving transducers to be the same device. The absolute range to an obseNed point is directly available as output with no complicated analysis required, and the technique is not based on any assumptions concerning the planar properties or orientation of the target surface. The missing parts problem seen in triangulation does not arise because minimal or no offset distance between transducers is needed. Furthermore, TOF sensors maintain range accuracy in a linear fashion as long as reliable echo detection is sustained, while triangulation schemes suffer diminishing accuracy as · distance to the target increases. Potential error sources for TOF systems include the following: 1) Variations in the speed of propagation, particularly in the case of acoustical systems. 2) Uncertainties in determining the exact time of arrival of the reflected pulse. 3) Inaccuracies in the timing circuitry used to measure the round-trip time of flight. 4) Interaction of the incident wave with the target surface. Each of these areas will be briefly addressed below, and discussed later in more detail. 38 a. Propagation Speed For mobile robotics applications, changes in the propagation speed of electromagnetic energy are for the most part inconsequential and can basically be ignored. This is not the case, however, for acoustically based systems, where the speed of sound is markedly influenced by temperature changes, and to a lesser extent by humidity. (The speed of sound is actually proportional to the square root of temperature in degrees Rankine.) An ambient temperature shift of just 30 F can cause a 0.3meter (1 ft) error at a measured distance of 10 meters (35 ft). b. Detection Uncertainties So-called time-walk errors are caused by the wide dynamic range in returned signal strength due to varying reflectivities of target surfaces. These differences in returned signal intensity influence the rise time of the detected pulse, and in the case of fixed-threshold detection will cause the more reflective targets to appear closer. For this reason, constant tract ion timing discriminators are typically employed to establish the detector threshold at some specified fraction of the peak value of the received pulse. c. Timing Considerations Due to the relatively slow speed of sound in air, compared to light, acoustically based systems face milder timing demands than their light-based counterparts and as a result are less expensive. Conversely, the propagation speed of electromagnetic energy can place severe requirements on associated control and measurement circuitry in optical or RF implementations. As a result, TOF sensors based on the speed of light require sub-nanosecond timing circuitry to measure distances with a resolution of about a foot. More specifically, a desired resolution of 1 millimeter requires a timing accuracy of 3 39 Pico seconds (3x10 s). This capability is somewhat expensive to realize and may not be cost effective for certain applications, particularly at close range where high accuracies are required. d. Surface Interaction When light, sound, or radio waves strike an object, any detected echo represents only a small portion of the original signal. The remaining energy reflects in scattered directions and can be absorbed by or pass through the target, depending on surface characteristics and the angle of incidence of the beam. Instances where no return signal is received at all can occur because of specular reflection at the object's surface, especially in the ultrasonic region of the energy spectrum. If the transmission source approach angle meets or exceeds a certain critical value, the reflected energy will be deflected outside of the sensing envelope of the receiver. In cluttered environments sound waves can reflect from (multiple) objects and can then be received by other sensors. This phenomenon is known as crosstalk (see Figure 4.1 ). To compensate, repeated measurements are often averaged to bring the signal-to-noise ratio within acceptable levels, but at the expense of additional time required to determine a single range value. Figure 4.1 I ',j~~=~~alk Crosstalk 1pll\:~~ I t' path "-, / \ '· \ I \ /f \ \ \ ':t . ; / / \ \ ' "·t't .. 'y /// \ ·../ °t: 1 I ,' ; .wf.'I /\.' \;;·' '• a 'W ... , .,. ey>' ~ " "' ~i.~->/ : •,., . . ;: ·<.-.. ~:;,, --- . ---- -; \ ./ 4; J ~•tob.]IB)_i'"' ~ '~- nirncri,;-n / 1\ >Ill I robut / ·h ' \\ o l n;y · . n ' ' \ ... >~ / ···,¼,. WIii i ' \, ' t,IU . / / ~;;:;;~'1i'4 '-. ~ ~~'\ . . :,) l. ·i '·.I.,./ I .: •. ~v ~/"if"/ %. J i'·,. J'·. /jJ''I · ::J::_f M 6'ire. ~ b ,4-"\ r~~ t~~ • a. · e:•· ;.. ... ·'41 t:·~-J } ¼'¼~" Crosstalk is a phenomenon in which one sonar picks 40 up the echo from another. One can distinguish between a. direct crosstalk and b. indirect crosstalk. [3] Ultrasonic TOF Systems Ultrasonic TOF ranging is today the most common technique employed on indoor mobile robotics systems, primarily due to the ready availability of low­ cost systems and their ease of interface. Over the past decade, much research has been conducted investigating applicability in such areas as world modeling and collision avoidance, position estimation, and motion detection. Several researchers have more recently begun to assess the effectiveness of ultrasonic sensors in exterior settings. Phase-Shift Measurement The phase-shift measurement (or phase-detection) ranging technique involves continuous wave transmission as opposed to the short-pulsed outputs used in TOF systems. A beam of amplitude-modulated laser, RF, or acoustical energy is directed towards the target. A small portion of this wave (potentially up to six orders of magnitude less in amplitude) is reflected by the object's surface back to the detector along a direct path. The returned energy is compared to a simultaneously generated reference that has been split off from the original signal, and the relative phase shift between the two is measured as illustrated in Figure 4.2 to ascertain the round-trip distance the 41 wave has traveled. For high-frequency RF- or laser-based systems, detection is usually preceded by heterodyning the reference and received signals with an intermediate frequency (while preserving the relative phase shift) to allow the phase detector to operate at a more convenient lower frequency. TX X Rx \ n=a I I I I I I ,\ I ____., n=7 d Liquid Surface Figure 4.2 Relationship between outgoing and reflected waveforms, where x is the distance corresponding to the differential phase. The relative phase shift expressed as a function of distance to the reflecting target surface is: =( 4 TTd)/A (2) Where = phase shift d = distance to target A= modulation wavelength . 42 The desired distance to target d as a function of the measured phase shift exceeds 360. degrees) . This ambiguity interval is the maximum range that allows the phase difference to go through one complete cycle of 360 degrees: Ra=cl2f where R0 = ambiguity range interval f = modulation frequency c = speed of light. (6) 44 Referring again to Figure 4.2, it can be seen that the total round-trip distance 2d is equal to some integer number of wavelengths nA plus the fractional wavelength distance x associated with the phase shift. Since the cosine relationship is not single valued for all of 1, there will be more than one distance d corresponding to any given phase shift measurement: ,. .. _ + .• ··( 4JLu') . ( 2n(x t 11/1.)) 1..U'.'1(.) - \.:OS - - COS · • ,;i_ ., x(5); Vd = 1; else Vd = O; end if V2 > x(5); Ve= 1; else Ve= O; end if V3 > x(5); Vf = 1; else Vf = O; end V = Vd*Ve·vf; Find the ¢¥im~nl poi~t of,tpe,sum of the outside pair of ' . • sensors •t' O' ? ' Eiad the maximum point ofJbe sum of the middle pair of sensors Eind the maximum ., ' point of the sµm of tbe inside pail'. of sensors: Figure 4,9 Block diagram of the program extension. 58 This produces thresholding , which means that if the signal is above a certain level it is counted as a one otherwise it is a zero. The two outside sensor signals are added together as are the next pair and the inside pair. These 59 signals are passed through the thresholding after which the resulting signals are multiplied together. This results in a signal which has a value of one only when all of the three resulting signals have a value of one i.e. if any of the signals is zero multiplying will mean that the output will be zero. As this still did not produce the desired results another small modification was made. This modification involved doing a sensor sweep at three slightly different frequencies. The results for these sweeps were recorded and when the last sweep had been completed they were all summed together. The reasoning behind this was that at the different frequencies the side lobes would be in a slightly different place and therefore when they were added some of the effects of the side lobes would cancel out. This would hopefully enable the use of a lower threshold value. This produced an output that was not much better than the previous one and it was thought that this would be about the correct time to test if the simulations were accurate before any more significant work was done. A model of the array was therefore created. The spacings of the sensors were all measured and positioned accurately in order to get it as close to the simulated result as possible. The model was then mounted on a dividing head to get the required angular steps and to give a stable base. A flat object (this being the easiest to detect) was placed in front of the array at two metres (the distance of the array focal point). The array was then moved past the object in steps and the distance results recorded . This was then repeated for other distances with the results again being recorded. 4.2.1 Frequency Modulation As the results show the previous method was not practical and another method had to be used. The next idea was to use frequency modulation. It was hoped that this method would be a lot more accurate in the distance measurement. Also it was hoped the angular measurement could be obtained by sweeping past an object and finding the centre point. This would be achieved by recording where the object first occurred and the point at 60 which it disappeared and halving the difference to get the point at which the object actually occurred. This method was also intended to avoid the problems of minimum range and diffuse signals. The minimum range should ideally be zero with this method because there is no need to wait until the signal goes out before the returning signal is detected. Also the problem of diffuse signals becomes less because frequency modulation does not depend on the amplitude of the returning signal. This therefore means that a very weak signal should be able to be detected as easily as a strong signal. This method was also simulated using Orcad, which was used to create a circuit and test its functionality. This produced good results and therefore a test circuit was produced. The test circuit was produced by placing the components and wire linkages on Breadboard. Unfortunately the test circuit was difficult to get working due to some points in the circuit having to be tuned exactly right before the circuit would work correctly. Some extra amplification also had to be put in to get strong enough signals. With some parts of the circuit being analog and other parts requiring digital inputs it also meant that Schmitt inverters had to be put in to create appropriate signals. The Figure 4.1 O below shows how the frequency modulation system works: Received signal R PLL 1 vco 1 25Hz Square wave 25Hz Sine v.rave PLL2 Output .------tVC02 T Transmitted signal Figure 4.10 Diagram of the frequency modulation/demodulation circuit. 61 The frequency modulation is produced by sending a sine wave (25Hz) into the voltage input of a VCO (Voltage Controlled Oscillator). The frequency of this signal is the modulating frequency and the amplitude of the signal effects how much the carrier signal (40kHz) will deviate from its central frequency. This modulated signal is then transmitted and the corresponding reflection is received. The received signal is passed through three amplifiers to create a big enough signal and is fed into a PLL (Phased Locked Loop) where it is compared with a 40kHz signal (generated by a VCO set at constant 40kHz oscillation). The output signal from this stage is a 25Hz signal. This signal is amplified and passed into another PLL where it is compared with the original 25Hz signal in a square waveform. The output is a square wave of 25Hz, which has a varying duty cycle (time it spends on compared to time it spends off). The variation in the duty cycle is directly proportional to the distance of the reflecting object (for more detail see Figure 4.11 ). This output can then be turned into a constant voltage by taking its average and thus the distance is measured. 62 One wavelength Voltage 12V ~ ~ ,--- - - ov Time ~ Percent o time on com ared to p percent of time off= percent duty Figure 4.11 Representation of the output. The circuit was finally completed and tested. The results proved to be as good as the expectations and therefore it was decided that this circuit should be turned into a PCB. The PCB construction started by modifying the circuit in Orcad to reflect the changes made during the testing phase. The final circuit is shown by the circuit diagrams on the following pages (these were copied directly from Orcad): J4 • · le~.:~ .. i ~70k . . • R13 Vi·, i,i:ib . . 10k Figure 4.12 The amplifier circuitry. 63 Three amplifiers were used on the signal pickup in order to produce a signal with a usable strength. Each amplifier was set at maximum giving a combined amplification 19683 times greater than the original signal. This is because the amount of signal reflected even by a good object is much less than the transmitted signal. The conversion back into an electrical signal also reduces it further and the result ing signal is about three orders of magnitude smaller than the transmitted signal. The remaining amplifier was used after the first PLL due to the small output signal. F:21 .. F:25 \/,/'·.,·-~-:c~· -i~ · 4.71< \.•~ . . F:22 --~-\•\ ... M BC327k . F:27 .. 2 j t--~--•'•·i'c•\, · 4.7k //.:h/ Q5 ~·-~ _ . . - . . F:2:3 . . oo ) ~ ' ·V·,'\ 4.7k ..... 8 C3:37 I') -9c3:q 4.7k ..... , ,.,., . COt-l2 . . R23 .. 'l.'t '• · 1\l · 1k . 11< 'vDO Figure 4.13 H-Bridge circuit used for driving the transmitter. 64 The H-Bridge circuit drives the transmitter both high and low producing twice the magnitude in the output signal than would otherwise be possible. This produces a much more powerful output giving an increased chance of objects being detected. U2A . \ • • 1. 1 ... 1 ', \ . "\: j . -1.. '0,_ _) . C04093 B · \lllA'vEA2 1-ni---~-~­ . W.A'.vE A.1 •t~. · 10k TC1 ·Gt-ID t--;-;'----, ~ ........ ..,_._, rc2 · srnco ,-.......------~ __ __..?_,T.R1 · BIAS - 1~0 ·-~ ~ R3'/ . S TR2 · FSKI g : t; :Wk ~: R36 1 82k :voo. C12 U2C 2206C P . s ... ~ :'\ (i ~ _;i:,10 . C040938_ c1 :i. ·1u · \too Vtib Figure 4.14 Oscillator circuit. 65 The microchip in this circuit is an oscillator circuit, which is used to produce a 25Hz sine wave. This sine wave is then input into a VCO (Voltage Controlled Oscillator) to provide the frequency modulation. The sine wave provides the modulating wave. Its frequency is 25Hz and this was chosen to give a useful