You are on page 1of 22

UNIVERSITY OF ILLINOIS, URBANA-CHAMPAIGN

Traction Control for the Formula Hybrid Car


ECE 445 Senior Design Project

Team # 29 Akshay Ekkundi Jon Westerhoff Hyung Seo Park T.A: Jim Kolodziej
02/24/2011

Page |2

Table of contents 1. Objective 1.1 Benefits 1.2 Features 2. Design Overview 2.1 Block Diagram and Block Descriptions 2.1.1 Wheel Sensors 2.1.2 Delphi Adaptor 2.1.3 NI cRIO 9074 2.1.4 NI 9401 2.1.5 NI 9205 2.1.6 Celesco CLP-100 potentiometer 2.1.7 Controls 2.1.8 Motor Torque 2.1.9 Regeneration 2.1.10 Performance 2.1.11 LabVIEW code 2.2 Schematics 2.3 Design Alternatives 3. Verification 4. Cost analysis and Schedule 4.1 Cost Analysis 4.1.1 Labor 4.1.2 Parts 5. Conclusion 5.1 Accomplishments 5.2 Uncertainties 5.3 Future Work 5.5 Ethical Considerations 3 3 4 4 4 5 5 5 5 6 6 6 6 6 7 7 13 15 16 19 19 19 19 21 21 21 21 22

Page |3

1. Objective:
Formula Hybrid is an organization here at the University of Illinois that designs, tests, and races an open wheeled, formula hybrid racecar. Formula Hybrid brings students from various disciplines and builds the racecar from scratch. Everything from the chassis to the various control systems in the car are all built and designed from scratch. As a part of this project we plan to design and build a traction control system for the racing car. Traction control is a very important feature in every racing car. It ensures that the car does not lose traction which leads to losing speed due to loss of traction in the back wheel caused by excess torque being applied in an effort to go faster. Traction control is an integral part of system that enables the racing car to be moving as quickly as possible without hindrance. To implement the traction control we will be using sensors on both the front and the back wheels to measure the wheel speeds. Base on the measurement, we will determine if each of the back wheels is spinning either 5% faster or slower than the average speed of the front wheels combined. In this case our system will calculate the optimum slip and then provide either positive or negative torque to the back wheels in order to prevent the car from losing traction. We decided to use the average of the front wheels as we did not want the car to lose speed on one side because one of the wheels in the front was moving too slow while taking a turn. Another aspect of our project is to build a system for regenerative breaking in the car so that we can make the car as efficient as possible but converting its kinetic energy into electric energy and then storing that energy in a bank of capacitors for later use. This makes the car more efficient and the car now has power that it can use for various purposes later. We decided to take on this project as all of us have always been interested in motorsports. We saw working with Formula Hybrid as a valuable opportunity to gain experience from working with groups of motivated students whose goal is a title in national competition. We are eager to apply all the techniques and knowledge we learned here to various aspects of our design such as on sensors, DSP and control systems. 1.1 Benefits: Reduces the slippage in the back wheels when excessive positive or negative torque applied to it. Helps the car not lose grip while cornering which will help it obtain optimal speeds and thus aid in getting a faster lap time. Another important benefit of our system is that it will make the car safer to drive at higher speeds, which is very essential for a race car. Implementing regeneration will help us recharge the batteries in the car which is a good way of not letting energy go to waste and making the car very efficient.

Page |4

In the end our system can be essential in helping the car secure a first place in the competition which would be great for us as we will have helped our university win at a major competition.

1.2 Features: Automates the traction control. Lab View programming used to implement controls. Potentiometer used at the throttle pedal to implement regenerative breaking.

2. Design overview 2.1 Block Diagram and Block Descriptions

Braking

Wheel Sensors

CRIO

Controller

Motor Torque

Regeneration

Page |5

2.1.1 Wheel Sensors: The Sensors that we have decided to use for this project are going to be the Cherry GS101205 Series, Gear tooth speed sensors. These speed sensors are going to be mounted on all the 4 wheels and they will use a gear that will be mounted on the wheel on the wheel that has teeth with a height of .200 and a width of .100 and a width spacing of about .400. We will use these sensors to determine the wheel speed of each of the wheels. We shall further use these wheel speeds to implement the traction control design. The sensor will communicate via a 5V TTL logic signal. 2.1.2 Delphi adapter In order to get any information from the Cherry sensors a special adapter is needed. The adapter is the Delphi 121662280 connector which is specified by the sensor documentation. The adapter will allow for a water tight connection between the sensor and the wires that run to the cRIO Module. This is very beneficial as the sensors will be located near the road, and could result in the assembly getting wet during operation. If the assembly is not waterproof an electrical short could occur compromising the system as a whole. 2.1.3 NI cRIO 9074 The NI cRIO 9074 is possibly the most important component of our system. All the data recorded by the sensors is transmitted to the cRIO using the NI 9403 adapter. The cRIO then uses this information from the Sensors along with the Lab view code written by us, and takes the appropriate action by increasing or decreasing torque to the back wheels of the car. The cRIO can do all this processing as there is a FPGA board built into it. The cRIO is also used for other purposes other than traction control in the system. It has 8 slots and has an input Voltage range till 30 V which works perfectly for our system. 2.1.4 NI cRIO Module 9401 In order to communicate between LabVIEW code and the instrumentation on the car the hybrid team is using National Instruments cRIO programmable controller. The controller has 8 bays that can accept any of a number of input/output modules. These modules can communicate with digital as well as analog signals depending on specific requirements. The Hall Effect sensors that were chosen communicate via digital signal which is high when a tooth is in front of the sensor and goes low when a tooth is not present. The module that was chosen is the NI 9401 which has 8 high speed digital I/O channels that are referenced to four COM channels. All the I/O channels are capable of handling 5 V TTL logic signals. This is a perfect fit for the Cherry Speed sensors which output a 5V logic signal. The module will be able to accept all four signals from the speed sensor outputs as well as will be able to output the required control signals to the other devices on the car.

Page |6

2.1.5 NI cRIO Module 9205 The throttle position that is determined based on the output of the potentiometer communicates via an analog signal. Because of this the module with which communication between the cRIO and the speed sensors achieved will not be able to communicate with it, because the 9401 module is a digital only module. This means that an analog module will also need to be used. The module chosen for this purpose is the NI 9205 analog input module. This module can accommodate up to four differential analog signals. This module was chosen because the differential input will help to suppress any of the noise that might be picked up via transmission from the throttle to the cRIO. Also because the module has four inputs it will be able to accept the throttle sensors redundant outputs. 2.1.6 Celesco CLP 100 Linear Potentiometer In order to implement the regenerative breaking we decided to use a linear potentiometer in order to decide the position of the pedal. The potentiometer has a range of zero to 5Kohms and has a linear output. The potentiometer is rated to be able to handle up to 24V. The input to the potentiometer was decided to be 12 volts such that when mounted in the car the effective output range is .67V when the pedal is at zero and 11.5V when the pedal is fully depressed. This was the best choice as it gave accurate position readings as well as was a standard voltage being used in the car. 2.1.7 Controls The controls will assess the situational data from the CRIO and decide the proper course of action. If the wheels are spinning too fast as indicative of spinning then the controls will decide whether to apply the brakes or to reduce the motor torque, or both. Depending on which course of action is taken a signal will be sent to the proper system for action. 2.1.8 Motor Torque When the controller decides that the motor needs to lessen the amount of torque being put out this subsystem will reduce the current to the motor such that the torque momentarily drops and the drive wheels can slow down to regain traction. The controller will also be able to send negative torque to the drive wheels to assist with the traction control. This will provide the car with the main form of braking. 2.1.9 Regeneration The regenerative braking will occur when the driver wants to slow down the car. The amount of regeneration will depend on the cars speed as well as the position of the throttle pedal. When the car is at rest and the throttle is at zero percent, no torque will be applied by the motor. As soon as the pedal is pressed the motor will exert positive torque on the wheels, which will cause the car to accelerate. This will continue until the car reaches the speed that correlates with the current

Page |7

position of the pedal. At this point the torque will drop to a point that cancels out friction and maintains the current speed. Then when the pedal is released the controller will assess the speed of the car and compare it to the position of the throttle. If the throttle is at a lower position than the speed dictates the controller will then decide how much the throttle is below the speed and apply a proportional negative torque which will slow down the car. This will in turn increase the EMF in the motor to such a level that it is higher than the battery supply voltage. Thus a current will be induced to flow into the batteries and recover some of the kinetic energy lost as the car slows down. 2.1.10 Performance The systems operation will depend upon several factors: the condition of the track, the condition of the tires, and the driver. The system should be able to achieve a slip of no more than 5% on all track conditions. Also the tires should never reach a slip below -5 % when braking. The system will also need to be able to completely lock the cars tires in the case of emergency. 2.1.11 LabVIEW Code

Figure 2.1 Complete pedal code for throttle and regeneration The code depicted in figure 2.1 reads the throttle voltage from the potentiometer as well as the RPM from the motor and uses it to calculate the proper amount of torque to output to the motor. The first block in the diagram is shown in figure 2.2 and uses the potentiometer voltage as well as user defined values to calculate the position of the pedal from zero to one. The dead zone is defined by equation 1. This is the amount of throttle position in which the motor receives no torque command. It is needed so that if the throttle pedal is accidentally bumped the car does not start running. The pedal position is then defined by equation 2. After the pedal position is calculated it is sent through a block that limits

Page |8 the output to be within the range of zero to one. This is required so if there is a discrepancy with the minimum or maximum voltage the car does not behave incorrectly. Vdead = dead*(Vmax-Vmin)+Vmin Equation 1. Tpos= (V-Vdead)/(Vmax-Vdead) Equation 2. Once the throttle position is calculated it is fed into figure 2.3 to calculate based on the speed of the car whether to accelerate or decelerate. If the throttle position is less than the current speed from zero to one then the code assigns equation 3 to be the output, otherwise if the throttle position is greater than the speed of the car equation 4 is used. The output of this block is then sent to the torque block in figure 2.4 which turns the amount of acceleration into an acceptable torque amount -.4 to 1. The low end must be stopped at -.4 such that the motor only regenerates 40% as this is the maximum amount the batteries in the car can handle. accel = (RPMmax*Tp - (RPM+1))/(RPM +1) equation 3. accel = (RPMmax*Tp-RPM-1)/(RPMmax - RPM -1) equation 4.

Figure 2.2 Code to calculate pedal position

Page |9

Figure 2.3 Code to calculate amount of acceleration

Figure 2.4 Code to assign amount of torque The code in figure 2.5 is used to read the sensor signal raw and output the speed in both RPM as well as frequency of teeth passing the gear. The sensor displays a high voltage when there is not a tooth in front of it and then goes low when there is a tooth. Because of this operation the code generates a spike whenever the signal returns high after a tooth passes. It then counts the amount of time that passes until the next pulse is generated. This time is input to a running average that keeps track of the last N times and outputs the average. This allows for a more accurate reading of the period of the waveform. Form the period the frequency can then be calculated by taking the inverse of the period. Once the frequency is known the RPM are easily calculated using equation 5 and the number of teeth on the gear. RPM = freq*60/teeth Equation 5.

P a g e | 10

Figure 2.5 Code to calculate wheel speed The code in figure 2.6 implements the traction control system (TCS) using fuzzy logic controller.

Figure 2.6 Traction Control System Algorithm There are two input variables for the fuzzy logic controller one of which is defined as follow:

P a g e | 11

Error= Equation 6. where both Front Wheel Speed and Rear Wheel Speed are taken as the average speed of left and right wheels, i.e. Front Wheel Speed= Rear Wheel Speed= .

The necessity of using average speed of both left and right wheel speed rather than using one of the two to compute error comes from the observation that the trajectory of each wheel when vehicle passes corner is different. For instance, when the car turns left at the corner, the path the left wheel travels is shorter than the path the right wheel travels which implies the speed of the left wheel is small compared to that of the right wheel. Another input is change in error and it comes from while loop in bottom left corner. It is defined as simply the difference between current error and previous error, i.e. Change in error=Current error Previous error Equation 7. Those two numerical or crisp inputs for the fuzzy logic controller are fuzzified into membership functions shown in figure 2.6 and figure 2.7. Note that both inputs have the range of -1 to 1 and are fuzzified into five membership functions. There is a comprise between the number of membership functions and computation speed. A larger number of membership functions will give more precise results but less computation speed and vice versa.

Figure 2.7 Membership Function for the input Error

P a g e | 12

Figure 2.8 Membership Function for the input Change in Error

Figure 2.9 Membership Function for the output Torque The linguistic output is generated based on the membership function 2.8 and a rule base shown below. Conditions Output Error=Zo Torque=Zo Error=Pme Torque=Pme AND Change in Error=Not(Big) Error=Pme Torque=Pbig AND Change in Error=Big Error=Pbig Torque=Pbig Error=Nme Torque=Nme AND Change in Error=Not(Big) Error=Nme Torque=Nbig AND Change in Error=Big Error=Nbig Torque=Nbig Rule Base for fuzzy logic controller The output of this fuzzy controller is the amount of torque that needs to be applied to the rear wheels. It is scaled so that it could be incorporated to the pedal code.

P a g e | 13

The processes of fuzzy controller could be summarized into three steps: fuzzification, rule base, and defuzzification. Fuzzification is a process in which the controller associates crisp or numerical inputs with the corresponding input linguistic variables using the membership functions specified for each input. Rule base is used to generate the linguistic outputs. Defuzzification is the conversion of the output linguistic variable to crisp outputs using membership functions for the corresponding outputs. The controller can be optimized by tuning these membership function and it could be done experimentally.

2.2 Schematics

Sensor Circuit

P a g e | 14
GS101205 SENSOR DIO0 DIO16 LEFT FRONT WHEEL VCC DIO17 OUTPUT DIO18 GROUND DIO19 DIO4 DIO20 NI 9403 DIO21 MODULE DIO22 DIO7 DIO23 COM COM COM COM DIO8 DIO24 DIO9 DIO25 DIO10 DIO26 DIO11 DIO27 DIO12 GS101205 SENSOR LEFT REAR WHEEL VCC DIO30 OUTPUT DIO31 GROUND RSVD GROUND DIO15 OUTPUT DIO28 DIO13 DIO29 DIO14 VCC RIGHT REAR WHEEL GS101205 SENSOR DIO6 DIO5 DIO3 GROUND DIO2 OUTPUT DIO1 VCC RIGHT FRONT WHEEL GS101205 SENSOR

5Vdc

external power source

Title SENSOR CIRCUIT Size A Date: Document Number <Doc> Wednesday , February 23, 2011 Sheet 1 of 1 Rev rev

Sensor Connection Circuit


1A 2A 3A 4A 5A 6A 7A 8A 9A 1A 2A 3A 4A 5A 6A 7A 8A 9A 1A 2A 3A 4A 5A 6A 7A 8A 9A 1A 2A 3A 4A 5A 6A 7A 8A 9A 1A 2A 3A 4A 5A 6A 7A 8A 9A RS-232 7 R S232 0 1A 2A 3A 4A 5A 6A 7A 8A 9A 10A 11A 12A 13A 14A 15A 16A 17A 18A 19A 20A 21A 22A 23A 24A 25A 1B 2B 3B 4B 5B 6B 7B 8B 9B 10B 11B 12B 13B 14B 15B 16B 17B 18B 19B 20B 21B 22B 23B 24B 25B RS-232

NI CRIO 9074

NI 9404 Module

RS-232 6

RS-2325

RS-232 1

RS-232 4

RS-232 3

1A 2A 3A 4A 5A 6A 7A 8A 9A 10A 11A 12A 13A 14A 15A 16A 17A 18A 19A 20A 21A 22A 23A 24A 25A

1B 2B 3B 4B 5B 6B 7B 8B 9B 10B 11B 12B 13B 14B 15B 16B 17B 18B 19B 20B 21B 22B 23B 24B 25B

RS-232 NI 9215 Module

RS-232 2

1A 2A 3A 4A 5A 6A 7A 8A 9A

Title CRIO - MODULE Size A Date: Document Number <Doc> Thursday , February 24, 2011 Sheet 1 of 1 Rev red

Module connections to CRIO

P a g e | 15

Output PP82 Ground PP82 Supply +5V 0.2 PP82 Output PP81 Ground PP81

AI0+ AI0AI1+ AI1AI2+ AI2NI 9215

Supply +5V 0.2 PP81 AI3+ AI3NC COM R1 1M R2 1M

5Vdc

NI 9205 analog input module

2.3 General Design Alternatives


This project has several areas in which it could be improved. The first of these is the regenerative braking. The current method for regeneration uses a torque limit such that the batteries are not overloaded when regeneration occurs. This method works just fine for the current hardware in the car but if the motor are the batteries were to be changed it would no longer suffice. The remedy to this would be to install instead a current limiter onto the batteries that could be set to allow only the maximum amount of current for the particular battery pack. This would eliminate the problem of switching components and not having the correct torque limit such as the batteries would be overloaded. The method for enforcing the traction control also has places in which it could be made more efficient. The method used now is to use the motor to either accelerate or decelerate the rear wheels based on the average speed of the front two wheels. This only allows for the system to control the rear tires together. In some situations such as a sharp turn or a slick patch on the

P a g e | 16

road one of the tires may slip a lot more than the other and since the average is being used to detect slip one side may lose traction for a significant amount of time before the system detects the error. Instead sensors on each side should reference to each other so that if any one tire is slipping it is easily detected. This would also benefit if the motor is used in tandem with the mechanical brake system of the car so that all four wheels can be adjusted individually to maintain optimum traction no matter what the circumstances. However for this to be effective in tight turns it would be required to calculate the proper amount of excess spin that the outside tires would encounter. This could be done by using the cars physical dimensions as well as sensor to detect the radius of the turn.

3.Verification
All four sensors mounted on the vehicles were successfully tested using portable multimeter and 5k pull-up resistor connected in series with the sensors. High voltage ( each case when the wheel was spinning and the voltage was low ( was detected for

) when the wheel was

stationary. The code for receiving the sensor data and outputting the wheel speed was also tested using a single gear and was able to accurately display the speed(as shown in figure 3.4). TCS can be tested using data logging and observing how the car behaves differently based on the speed vs. time plot. Unfortunately, we were not able to test or demonstrate that traction control system works fully due to malfunctioning of control box. The outputs generated by LabVIEW, however, indicate that the code for TCS is fully functional. Shown below are the results in several different scenarios.

P a g e | 17

Figure 3.1 Output for the system when error is within 5% As designed, output torque when the error stays within 5% as expected.

P a g e | 18

Figure 3.2 Output for the system for positive error Positive output is generated when the error is positive, i.e. the velocity of the front wheels is larger than that of the rear wheels. In such case, positive torque will be applied to each real wheel.

Figure 3.3 Output for the system for negative error When the error is negative, i.e. when the rear wheels are spinning faster than the front wheels, negative torque or brake is applied to each rear wheels.

P a g e | 19

Figure 3.4 screen shot of data acquisition code test

4. Cost and Schedule:


4.1 Cost Analysis
4.1.1. Labor Akshay Ekkundi Jon Westerhoff Hyung Seo Park Total Labor Costs 4.1.2. Parts Cherry GS101205 Gear tooth Speed Sensor Quantity Needed: 6 Total Price: $ 192.18 Retailer: Newark InOne Price/Unit: $ 32.03 $ 55/hr x 2.5 x 200 hrs = $ 27,500.00 $ 55/hr x 2.5 x 200 hrs = $ 27,500.00 $ 55/hr x 2.5 x 200 hrs = $ 27,500.00 $ 82,500.00

P a g e | 20

LabVIEW Full Quantity Needed: 1 Total Price: $ 2,599.00 Retailer: National Instruments Price/Unit: $ 2,599.00

Delphi Automotive connectors 3P FM Gray CON ASSY 150.2 SERIES Quantity Needed: 8 Total Price: $ 27.12 Retailer: Mouser Electronics, Inc. Price/Unit: $ 3.39

NI CRIO Adapter Module 9401 Quantity Needed: 1 Total Price: $ 269.00 Retailer: National Instruments Price/Unit: $ 369.00

NI 9934 25pin D-Sub connector kit Quantity Needed: 1 Total Price: $ 109.00 Retailer: National Instruments Price/Unit: $ 369.00

NI CRIO Adapter Module 9205 Quantity Needed: 1 Total Price: $ 799.00 NI cRIO 9074 Quantity Needed: 1 Total Price: $ 2,699.00 Retailer: National Instruments Price/Unit: $ 2,699.00 Retailer: National Instruments Price/Unit: $ 499.00

Celesco CLP 100 Linear Potentiometer Quantity Needed: 1 Total Price: $ 289.00 Retailer: Celesco Price/Unit: $ 289.00

Pull Up Resistors [2 Watts] Multiple Values: 1000 Ohms Quantity Needed: 8 Total Price: $ 5.44 1800 Ohms Quantity Needed: 8 Total Price: $ 5.44 Retailer: BC Components Price/Unit: $ 0.68 Retailer: BC Components Price/Unit: $ 0.68

P a g e | 21

2400 Ohms Quantity Needed: 8 Total Price: $ 5.44 3000 Ohms Quantity Needed: 8 Total Price: $ 5.44 Retailer: BC Components Price/Unit: $ 0.68 Retailer: BC Components Price/Unit: $ 0.68

Total Price of Parts: $ 7,005.06 Total Cost [Labor + Parts]: $ 82,500.00 + $ 7,005.06 = $ 89,505.06

5. Conclusion:
5.1 Accomplishments:
The LabVIEW algorithms were vital to this project. The algorithms that were created in LabVIEW were successfully able to recognize when there was a difference in the speeds in the front and the back wheels and take the appropriate action accordingly. The pedal code also worked properly however the regeneration had to be limited to 40% so as not to overcook the batteries. The low voltage control box housing the cRIO was successfully wired and mounted onto the car. Similarly the sensors were also mounted onto the wheels successfully.

5.2 Uncertainties:
The main aim of the project was to implement traction control on the car and make sure that the system works at high speeds when the car is moving around a circuit. However due to delays with the Formula Hybrid team in assembling the car, the whole system could actually be tested on the car. Although all the modules worked separately in the lab and theoretically, we did not have the time to test them all together. Thus one uncertainty would be to see how efficiently the whole system worked and if any tweaks would be required. Another uncertainty was that we limited the regeneration to 40% by imposing a torque limit, so as to not overcook the batteries. This method worked for the car however it definitely was not the most efficient method. A possible correction to this method would be to add a current limiter going into the battery; this would make the system more efficient.

5.3 Future Work:


This was the teams first attempt at creating a traction control system for the car and the end product was a pretty good one. However this product should be used as a stepping stone for more

P a g e | 22

efficient and accurate traction control and regenerative breaking systems. The University of Illinois is going to continue to take part in the completion in the future. For the future cars, our product should be used however tweaks such as more accurate sensors, reducing the error from 5% to 3% should be attempted to be done. With enough time and research this is very possible and this product can be easily transformed into a much more accurate and efficient system. Also for the regenerative breaking research should be done as to how to increase the regenerative capacity from 40% to 100% regeneration. Better equipment and more efficient code will definitely aid in this being able to happen.

5.4 Ethical Consideration


If the traction control does not function properly, for instance, when the system fails to lock up all wheels when it is supposed to, the driver will loses control of his car and face potentially serious danger. Therefore, it is essential to make sure that our code is redundant and thoroughly tested.

References:
[1] "NI CRIO-9074 - Integrated 400 MHz Real-Time Controller and 2M Gate FPGA - National Instruments." National Instruments: Test, Measurement, and Embedded Systems. Web. 04 May 2011. <http://sine.ni.com/nips/cds/view/p/lang/en/nid/203964>. [2] "NI 9205 - 32-Ch 200 MV to 10 V, 16-Bit, 250 KS/s Analog Input Module - National Instruments." National Instruments: Test, Measurement, and Embedded Systems. Web. 04 May 2011. <http://sine.ni.com/nips/cds/view/p/lang/en/nid/208800>. [3] "NI 9401 8 Ch, 5 V/TTL High-Speed Bidirectional Digital I/O Module." National Instruments: Test, Measurement, and Embedded Systems. Web. 04 May 2011. <http://sine.ni.com/nips/cds/view/p/lang/en/nid/208809>. [4] "Cherry GS101205 Series." Cherry Switches, Sensors, Keyboards and Automotive Modules. Web. 04 May 2011. <http://www.cherrycorp.com/english/sensors/Speed_Direction/gs101205.htm>. [5] "Linear Potentiometer." Celesco. Web. 4 May 2011. <http://www.celesco.com/_datasheets/clp.pdf>.

You might also like