IEEE ©2001 IEEE. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works must be obtained from the IEEE.

Return to Table of Contents


An Autonomous Race Car Design Competition

Thomas W. Matthews and Richard R. Spencer, Senior Member, IEEE


Abstract - This paper will describe an innovative collaboration between industry and academia in creating a meaningful design experience for undergraduate electrical engineering students.  The design project involves designing, building and testing an autonomous model racecar.  The course culminates in a competition.

A primary goal of the competition is to provide undergraduates with a meaningful design experience with an emphasis on electronic circuits.  This contest has a different flavor from the well-established IEEE Micromouse competition in the sense that it places the emphasis on the design and construction of an electronic sensing and control system without the microprogramming necessary to solve a maze (although a microprocessor can certainly be used).  It is hoped that by placing the emphasis on the circuitry, the course will encourage more undergraduates to go into the field of electronic circuit design.

The learning experience offered by the competition is shaped by, among other things, the format and rules of the competition, the students?preparation in terms of circuit and control system theory and practice, and by the format of the design project course.  This paper will describe the competition in detail and discuss factors affecting the educational experience.


I.  Background

A.  History and Development

In 1993, engineers from National Semiconductor began collaboration with the University of California, Davis to sponsor a design competition [1].  Both National Semiconductor and the university were interested in a design competition that would place an emphasis on circuit-level design issues, and not on microprogramming.  It was decided that a project involving sensing and control could provide a suitable setting for such a design experience.

The project chosen was to design and build a control system to guide a model car around a defined course.  The competition would be to navigate the course in the shortest time.  The course would be delineated by a signal-carrying wire taped to the floor, making it possible to sense the wire magnetically or to sense the tape optically.  The challenges would then include sensing the course, controlling the steering to keep the car on the course, and controlling the speed of the car.  Because of the connection to automobile racing, and in recognition of the industrial sponsor, the activity would be known as the “NATCAR?competition.

The cars were to be autonomous.  Each car would carry its control system and batteries.  In addition, the signal driving the wire had to be continuous; it could not convey any instructions to the car.  Because model cars designed for radio-remote controlled use are readily available, it was decided to supply them to the students to relieve them of the mechanical design and fabrication task (it should be noted, however, that mechanical factors under student control do play a role in the competition).

As the concept of the competition was developed, the sponsors envisioned that a variety of approaches to the problem would be possible.  Some thought was given to each of the design challenges to ensure that possible solutions would be consistent with the goals set forth above.  The following paragraphs summarize how the original rules were developed.

One obvious design challenge then is for the car to sense the location of the course with respect to the car.  Those students opting to use magnetic sensing might drive the wire with an alternating current signal, allowing detection of the wire using pickup coils mounted on the car.  In order to encourage creativity, however, the choice of drive signal for the wire was left up to each design team.  For example, it was conceivable that students would send direct current through the wire and use a Hall-effect device to detect it.

Another form of sensing the course was also made possible.  Since the wire would no doubt have to be taped to the floor, the tape could be sensed optically.  To facilitate this method of detection, the tape used was selected to contrast with the floor.  Students therefore could decide to use an optical or magnetic detection method, or a combination of both.  A multiplicity of solutions is desirable in a design competition.

The steering control system would have to use information from the sensors to guide the car.  The students would have to consider the type of sensor output available, and how to adjust parameters such as loop gain (the steering control is a feed-back system), dynamic response, and compensating offsets in order to center the car on the track.

Another design challenge concerns the control of the car's speed.  A single-setting motor drive control would be the easiest solution, but with the significant disadvantage that the drive setting is determined by the most difficult part of the course (i.e., the part requiring the slowest speed to stay on track).  Various methods of controlling the car's speed were envisioned.  These methods might involve some combination of auxiliary sensors and/or signals already present in the steering control system.

What circuit-level design issues arise from these design challenges?  Whether or not a microcontroller is used, analog sensor signals have to be converted to appropriate levels (i.e., with correct gain and biasing).  Also, the parameters of the feedback control loop must be adjusted for maximum performance.  A fully analog implementation offers some definite advantages: it is easier to adjust, it does not require a development system, and the signals present at various points in the control system are directly measurable.  On the other hand, the use of a microcontroller allows changes to be made through software and it facilitates the use of algorithms involving memory or non-linearity.  Neither approach offers an inherent, overriding advantage over the other.

B.  The role of the Sponsors

The sponsors provide the basic hardware needed by the competitors, including cars, batteries, analog and digital integrated circuits, and microcontroller development hardware.  They also provide funds for the purchase of miscellaneous electronic components needed during the design process.  Another way in which support is given is through visits made to each campus by employees of the sponsor.  The students appreciate the opportunity to interact with visiting engineers as they discuss technical aspects of their designs.  Students also learn about the engineering profession from this experience.  Finally, the sponsors host the intramural NATCAR competition at their headquarters in Santa Clara, California.


II.  The Competition Rules And The Learning Experience

The rules have evolved as a result of the sponsors' efforts to improve the learning experience.  Some rule changes have also been in response to the growing number of competition participants.  Besides the University of California at Davis (UCD), four other institutions have participated: San Jose State University (SJSU), the University of California, Berkeley (UCB), Oklahoma State University (OSU), and California State University, Sacramento (CSUS).  Major contest rules will be summarized here in their present form, along with the thinking behind them.  A detailed listing of the current competition rules is available at  www.ece.ucdavis.edu/natcar/.

A.  The Car

The car entered in the competition is subject to certain size restrictions.  This is done primarily so that the competition organizers can make sure that the course has adequate clearance in all directions, and that the car can be sensed by the automatic timing device.  Originally, the car and its electro-mechanical parts (steering servo and drive motor) were all required to be of the same type.  This was done to focus the competition on the sensor and control circuitry.  As competitors began to suggest modifications to the basic chassis, it was decided to increase the scope of the competition to include the mechanical aspects.  The car originally used by the competitors still makes a fine starting point; it is an off-the-shelf 1/10-scale radio controlled electric car chassis.

The car must be electric powered and use a standard 7.2-Volt radio-controlled vehicle battery.  This rule puts all entries on an equal basis as far as their energy source is concerned.  Two 9-Volt transistor radio batteries may also be used to power circuitry (e.g., operational amplifiers).

B.  The Racecourse

The rules for the course layout are well specified.  The competitors will therefore know what type of course to expect, but will not know the actual course until the time of the competition.  Three basic rules for the course layout are:  1)  the course may be any length and configuration, but all turns will have a radius greater than or equal to 3 feet.  Typical courses in the past have been between 50 and 200 feet in overall length with at least one straightaway of 15 feet or more.  2)  The course may cross itself, but the crossing will never occur at an angle less than 60 degrees.  3)  The course may have sections that are parallel to each other, but they will be at least 3 feet apart.

The course is marked with a 1-inch wide white floor tape on top of some dark-colored carpet.  This specification is important for those using optical detection of the track.  The venue for the competition cannot always be arranged far in advance, so the precise color of the carpet cannot be published with the rules.  White vinyl floor tape will contrast well enough with almost any commercial carpet, however.

The tape is put down on top of a wire which forms a complete circuit and is driven by a 75kHz sinusoidal signal.  The signal current will be within 20% of 0.5 amp RMS.  In the original competition, each group was allowed to drive the wire with any reasonable signal (i.e., available from a typical student laboratory signal generator or power supply).  The signal frequency and amplitude are now a specified value instead of optional primarily to reduce the setup time required by each group as they take their turn on the course (although they are allowed to make minor adjustments to the frequency).  The issue of setup time has become more important as the number of entries in the competition has grown, and in this case it was deemed necessary to standardize the signal for the sake of staying on a reasonable schedule.  It should be noted that in the past, groups opting to drive the wire chose a signal similar to the one now specified.

Another factor that makes individualized drive signals a problem is the electrical inductance of the wire used to define the course.  For a long course, this inductance can be high enough to significantly limit the current it will draw from a common laboratory signal generator.  This problem can be solved by resonating the course with a series capacitor to cancel the inductance.  If a fixed capacitor is used, the range of useable frequencies is limited.  A variable capacitor could be used, but another adjustment would lengthen the setup time.

The course also has small Styrofoam cones placed at various points along the course no less than 18 inches away from the tape.  A timing penalty will be assessed for each cone that is hit by a car while negotiating the course.  This rule was introduced as an objective way to reward those cars that hold the track better.

C.  Running the Race

Two different courses are used at the competition.  Each group runs each course, and the two course times for each group are added.  The rules for the conduct of the competition are necessarily detailed to ensure fair and impartial proceedings; hence they are only summarized here.

Based on a random drawing to determine the competition order, each group is assigned a 10-minute session on each course.  During their session, the group makes any setup adjustments needed (e.g., for adjustments to the car or minor changes to the driving signal) and makes as many attempts at the course as time permits.  The shortest recorded time to complete the course becomes that group's official time for that course.

The group may make adjustments to the car between runs, but may not program the car with specific knowledge of the course.  For example, a group might make their first attempt at a course with the car set to a conservative speed (one at which it is fairly certain that the car will successfully negotiate the course).  Then the speed setting can be increased on successive runs until the car cannot hold the course.  If the car is capable of memorizing course information, it may be switched from learning mode to a racing mode in-between runs.

Each group is allowed to abort their 10-minute session once for each course.  They will be given the remaining time or 5 minutes, whichever is less, to complete the course at the next available time.  This rule was included out of a desire that an unexpected, correctable hardware problem would not have to be found and repaired under highly stressful (timed) conditions.  This option has been used by a number of groups in past competitions, so the sponsors allow some extra time after the scheduled sessions for the make-ups.

The first prize goes to the group with the lowest total time.  An additional prize may be awarded to the car judged to have the simplest (most economical) and highest performing design.  To facilitate the design judging, competitors are required to submit complete schematic diagrams of their car's circuitry at the start of the competition.


III.  Circuit-Level Design Issues

Some of the design challenges presented by this project are summarized below, and comments are made concerning what the students have learned while working in each area.  The nature of the challenges faced by each group has been different, depending on their particular approach.  Some general observations about the learning experience can still be made, however.  The discussion will be divided into three sections, each dealing with a major area of the system design.  The three areas are:  the sensors and interface circuitry, the control algorithms, and the output interfaces and power distribution.

A.  The Sensors and Interface Circuitry

Students using coils to sense the signal current in the wire will deal with electromagnetic field theory and fundamentals of electric circuits.  The strength of the signal induced on the pickup coil varies inversely with its distance from the wire and also with its orientation with respect to the wire.  Students need to understand this behavior to explain and mitigate non-linearity in the steering control system.  The amplitude of the coil's output also depends on the frequency of the signal, due to the resonant circuit formed by the coil and its effective parallel capacitance and resistance.  Hence, if the resonance is to be exploited to increase the signal output, all sensors must resonate at nearly the same frequency.  Otherwise, the sensors must have fairly flat frequency response in the vicinity of 75kHz.

The AC signal induced on the pickup coil is usually rectified to obtain a varying DC voltage representative of the coil's distance from the wire.   The output of the pickup coil may not need to be amplified prior to the rectifier because of the strong signal current in the wire.  If a simple diode rectifier is used, however, a significant increase in sensitivity can be obtained by overcoming the forward voltage drop of the diode by some means.  The so-called "ideal diode" operational amplifier circuit is often chosen for this purpose.  But the students discover that the amplifier used must have a relatively high slew rate for the circuit to perform as expected.  This is an example of a practical problem encountered while working on the project.

The type, location, and number of sensors used also varies.  A simple configuration is shown in Fig. 1.  Two pickup coils (labeled "A") are located on either side of the car near the front wheels.  The difference between the corresponding two signal strengths becomes the error signal for the steering control (i.e., the location of the car with respect to being centered on the rack). Photosensors can be used instead of coils, but they are only capable of indicating if tape is "seen" in a particular location or not.  It is also possible to use a combination of coils and photo-sensors.

Fig. 1.  Car and Basic Pickup Coil Configuration

B.  The Control Algorithms

The control algorithms used can be implemented in the analog domain, or in the digital domain with a microprocessor or a programmable logic array (PAL).  The steering control is typically a proportional feedback control loop, with some increase in performance possible with the inclusion of a differential (time derivative) component of the error signal [2],[3].

If the control algorithm is implemented with operational amplifiers (op-amps), the students must design and construct basic circuits including summing amplifiers and level-shifters.  It is also quite desirable to be able to adjust the control loop gain, the steering centering, etc.  Hence the students will design stages with variable parameters and plan for variable signal levels at certain points in their circuits.  The gain and output signal range of the steering control should be sufficient to drive the steering wheels over their full range.  They must decide where in their circuits to place trimming potentiometers to achieve the desired effect.

Getting the car to stay on the track at slow speeds is one objective, but for high-performance, the issue of control loop stability must be addressed.  The students learn that a model of the system must be developed to provide a basis for decisions in this area.  A model that works fairly well is one with a delay and an integration in the loop.  The major source of delay in the system is the servo driving the steering linkage.  A sudden change in the pulse-width modulated (PWM) drive signal to the servo will cause it to move to the corresponding position at a constant rate (actually, this is analogous to slew rate in an operational amplifier).  The integration is the result of the fact that steering error accumulates as the car moves down the track (the integrator gain also varies with the car's speed).  This model correctly shows that the response of the steering control system can be improved by adding a bit of the error signal's time derivative in the feedback loop to offset the effects of the integrator pole.

The car may not always stay on the course, however.  Losing the course is most common if a long straightaway is followed by a minimum-radius curve.  Most designs include the ability to remember which side of the car the track was most recently on (i.e., which way to go to return to the course).  The memory may be implemented in digital circuitry, or it may be in the form of hysteresis comparators.

A variety of steering control methods have been tried.  Entries have used an array of photo-sensors at the front of the car, each one corresponding to a certain steering wheel position and a certain level of motor drive.  Another entry actually used a linear scanner array from a FAX machine to "look" at the track.

The control system may also be implemented with a microcontroller.  This would facilitate algorithms involving memory.  In addition, non-linear functions could be used in the control systems (perhaps to linearize the output of the pickup coils as a function of distance).  The use of a microcontroller requires a development system to debug software, however, and may require analog-to-digital converters for sensor interface.

Some algorithm for controlling the speed of the car is also very valuable.  A simple control system would utilize an additional pickup coil attached to a straight extension pole in front of the car, shown as coil "B" in Figure 1.  When the car is aligned with a straight track, this coil picks up a stronger signal.  The motor drive signal is made proportional to the strength of this signal and as a result, the car goes faster on straight-aways and slower on turns.  This system can work well open loop, but some designs have used feedback of the car's speed to form a closed-loop control system.  Active braking has also been used to slow the car quickly.

C.  The Output Interfaces and Power Distribution

The off-the-shelf cars have a standard radio-control "servo" for steering.  This device operates the steering linkage in response to a PWM input signal.  Students investigate the operation of the servo, learning the signal conditions corresponding to full left, full right, center, etc.  They then must design the appropriate interface to drive the servo from their control circuitry.  Students using analog circuitry must generate a PWM signal using a 555 timer integrated circuit or another method (e.g., a triangle wave generator and a comparator).  This provides an experience in designing circuitry to meet specifications that they themselves determined experimentally.

The drive motor is also controlled using a PWM signal.  Students usually know that a power transistor is needed to drive the motor, but they are not generally aware of the design considerations for such high-current switching circuits.  While working on this part of the design, a number of unexpected practical problems surface.

A power metal-oxide-semiconductor transistor (MOSFET) is used to switch the motor current.  These transistors can switch high currents in very short times, and hence create significant noise spikes.  A common problem is that noise spikes travel through the MOSFET and into the control circuitry, causing erratic behavior.  This direction is backwards to the expected direction of the signal flow, and hence students have difficulty locating the cause of this problem.  With some help, they can understand the problem, solve it, and perhaps learn to look at circuits in new ways.

Another design consideration is that the drive motor can draw high peak currents (approaching 20A).  This current can develop significant voltage across connections and across long or thin wires.  If a voltage develops in the "source" circuit of the MOSFET, the effective control signal is reduced.  The "on" resistance of the transistor will then not be as low, resulting in more power dissipation in the transistor and less power available to the motor.  In general, the idea is to keep the high-current wiring short and separate from sensitive circuits.

Students learn that interference and noise control is an essential part of the design.  Some principles used are: single-point grounding, twisted-pair wiring, passive filtering, and power supply isolation through the use of separate regulators.  These topics are best taught in the context of a practical application.


IV.  Teaching The Course

A.  Administration

Students participating in this design competition have been enrolled in an associated course at their respective institutions. Presently at SJSU and UCD, the student's involvement with the project lasts an academic year, so enrollment during successive terms is required.  At UCD and UCB, a course dedicated to this competition is offered that fulfills a requirement for an electronic design laboratory.  At SJSU and CSUS, students participating in the competition are enrolled in the standard sequence of senior project courses.  Course enrollments have been as large as 10 groups (20 students) at one institution.

During the early part of the course, class activities are conducted to help the students get started.  An overview is presented that clarifies the design challenges and discusses some previously successful approaches to certain problems.  Also, students perform laboratory exercises to gain experience with certain essential functional blocks and their associated circuitry.  The corresponding lab reports have been used in the grading process.

B.  Mentoring

The faculty advisor provides guidance and is a technical resource for the students, but does not make design decisions for the students.  The challenge in teaching a projects course such as this one is to be a mentor to the students, helping them to make sound decisions on their own.

One way in which the advisor can guide the students is by asking the right questions of them.  This approach is especially helpful in the teaching of troubleshooting.  Very often students build a circuit, apply power, and when it doesn't work right away, conclude that the entire approach is flawed.  In this case, the advisor can ask questions that will hopefully guide the students to the specific problem.  But perhaps even more important, the students are exposed to a logical and productive troubleshooting thought process.  This same approach of asking questions is also valuable in helping students evaluate the possible outcomes of a design decision.

Another area in which most students can benefit from mentoring is in balancing analysis and experimentation.  Some students have great difficulty feeling confident enough with the design to build and test anything, while others avoid analysis entirely and just "play" at the workbench.  In either case, the advisor can help students get started in the neglected area by giving just enough help to inspire the necessary confidence.

Finally, it has been found to be quite helpful to set deadlines for pieces of the project.  For example, at some early date the students might be required to have a car that simply follows an oval track at low speed.  In this way, they are discouraged from spending a lot of time on refinements before a basic system exists.  Students learn a lot from completing this task, and they are better able to implement useful improvements after designing a basic system.


V.  Evaluations

The industrial sponsor, National Semiconductor, has given enthusiastic support to the competition as it has grown since 1993.  They are seeking to increase the number of participating institutions in future competitions.  They view their involvement in the competition as an opportunity to meet and perhaps recruit students while facilitating a challenging (and fun) design experience.  Some NATCAR participants have gone on to work for National Semiconductor.

The competition meets the educational goals originally set forth by the sponsors.  Institutions participating in the NATCAR competition view the experience as beneficial to the student and have always continued their involvement for the following year.  A number of students have commented that after their involvement with this course, they are much more confident during job interviews.  This can be taken as an indication that the students become better at relating theory to practice, which is a major objective of engineering design courses.

Feedback from the students has been collected in the form of course evauations (where the NATCAR competition has been incorporated into a senior design course, separate course evaluations should be obtained).  Also, faculty members typically discuss the experience with their students after the competition.


VI.  Conclusions

A design competition has been described which emphasizes circuit-level design issues and control systems.  The affect of the course rules on the student's educational experience has been discussed.  Some factors involved in teaching the course have been presented.


References

[1] Thomas Matthews and Richard R. Spencer, "An Automonous Race Car Design Competition," 1997 Frontiers  in Education Conference Proceedings, Volume III, pp. 1583-1587,  IEEE Catalog Number 97CH36099.
[2] Norman S. Nise, Control Systems Engineering, Benjamin/Cummings 1995.
[3] Ramakant Gayakwad and Leonard Sokoloff, Analog and Digital Control Systems, Prentice Hall 1988.


Author Contact Information

Thomas W. Matthews
Department of Electrical and Electronic Engineering
California State University Sacramento
Sacramento California 95819-6019
Phone: (916) 278-6085
Fax: (916) 278-7215
E-mail: matthews@ecs.csus.edu

Richard R. Spencer 
Department of Electrical and Computer Engineering
University of California, Davis, CA 95616
Phone: (530) 752-6885
E-mail: spencer@ece.ucdavis.edu
http://www.ece.ucdavis.edu/~spencer
 


Return to Table of Contents